# Compensation request

**POST**

Send information about a customer-initiated request for compensation, such as a refund or a reship, in order to receive a fraud or abuse decision. The request can be made on an order level or at the item level. The response may also include recommendations based on your abuse prevention policies.

## Credentials

**HTTP Basic** basicAuth

---

## Path Parameters

| Name | Type | Required |
|------|------|----------|
| id   | string | * |

## Header Parameters

| Name               | Type   | Required |
|--------------------|--------|----------|
| api-version       | string | * |
| x-forter-siteid   | string | * |

## Body Parameters

| Name                        | Type                                   | Required |
|-----------------------------|----------------------------------------|----------|
| body                        | unifiedCompensationRequestRequest      | * |

### Description

| Name                                  | Type                        | Required |
|---------------------------------------|-----------------------------|----------|
| accountId                             | string                      | *        |
| additionalEventIdentifiers             | object                      |          |
| additionalInformation                  | object                      |          |
| compensationRequest                    | CompensationRequest         | *        |
| connectionInformation                   | ConnectionInformation       | *        |
| eventId                               | string                      | *        |
| eventTime                             | number                      | *        |
| hasProofOfPurchase                    | boolean                     | nullable |
| isGuestAccount                         | boolean                     | *        |
| merchantAgentData                     | object                      |          |
| merchantIdentifiers                     | object                      |          |
| originalOrderId                       | string                      | *        |
| status                                 | object                      | *        |

### Responses

- **200**

**Example unifiedCompensationRequestResponse**
```json
{
  "correlationId": "string",
  "decisionReason": "string",
  "forterDecision": "string",
  "merchantPolicyId": "string",
  "recommendations": ["string"],
  "status": "string"
}
```

- **400** Bad Request (Often missing a required parameter)
- **401** Unauthorized (No valid API key provided)
- **404** Not Found (The requested item doesn't exist)
- **500** Server Error (Something went wrong on Forter's end)

---

## Request

**Curl**

```bash
curl --request POST \
  --url https://api.forter-secure.com/v2/unified-compensation-request/{id} \
  --header 'accept: application/json' \
  --header 'content-type: application/json' \
  --header 'api-version: 10.1' \
  --header 'x-forter-siteid: a1b2c3d4e5f6' \
  --data '{
    "accountId": "e520-ba9a-367-60b",
    "additionalEventIdentifiers": {},
    "additionalInformation": {},
    "compensationRequest": {
        "initiationType": "CALL_CENTER",
        "items": [
            {
                "basicItemData": {
                    "discount": {
                        "couponCodeUsed": "FATHERSDAY2015",
                        "couponDiscountAmount": {}
                    },
                    "name": "White GenericBrand handbag",
                    "price": {},
                    "quantity": 1,
                    "type": "TANGIBLE"
                },
                "itemCompensationData": {
                    "initiationTime": 1415287568000,
                    "requestedReturnType": "SHIP_TO_WAREHOUSE"
                }
            }
        ],
        "orderCompensationData": {
            "initiationTime": 1415287568000,
            "requestedReturnType": "SHIP_TO_WAREHOUSE"
        },
        "totalRequestedAmount": {}
    },
    "connectionInformation": {
        "customerIP": "10.0.0.127",
        "userAgent": "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.73 Safari/537.36"
    },
    "eventId": "r48987fgdse0r",
    "eventTime": 1415287568000,
    "isGuestAccount": false,
    "merchantAgentData": {},
    "merchantIdentifiers": {},
    "originalOrderId": "2356fdse0rr489",
    "status": {
        "itemStatus": [
            {
                "basicItemData": {
                    "discount": {
                        "couponCodeUsed": "FATHERSDAY2015",
                        "couponDiscountAmount": {}
                    },
                    "name": "White GenericBrand handbag",
                    "price": {},
                    "quantity": 1,
                    "type": "TANGIBLE"
                },
                "statusData": {
                    "compensationTypeGranted": "REFUND",
                    "reasonCategory": "CHANGED_MY_MIND",
                    "returnMethodGranted": "SHIP_TO_WAREHOUSE",
                    "statusLog": {},
                    "updatedStatus": "ACCEPTED_BY_MERCHANT"
                }
            }
        ],
        "merchantAgentData": {},
        "shippingRefundedAmount": {},
        "statusData": {
            "compensationTypeGranted": "REFUND",
            "reasonCategory": "CHANGED_MY_MIND",
            "returnMethodGranted": "SHIP_TO_WAREHOUSE",
            "statusLog": {},
            "updatedStatus": "ACCEPTED_BY_MERCHANT"
        },
        "totalGrantedAmount": {}
    }
}'
```

### Responses

**200**

**Example unifiedCompensationRequestResponse**
```json
{
  "correlationId":"HGJ7512345H3DE",
  "decisionReason":"",
  "forterDecision":"approve",
  "merchantPolicyId":"0ee8ba28a8654c659addbae9253b707c",
  "recommendations":[""],
  "status":"success"
}
```
