# Update the settings for an affiliate’s post back

| HTTP method | Endpoint                                    |
| ----------- | ------------------------------------------- |
| **PUT**     | **/v1/affiliate\_postbacks/{postback\_id}** |

**Note:offer\_id = 0, representing the choice of offers All.**

## Path parameters <a href="#path-parameters-1" id="path-parameters-1"></a>

| Parameter    | Description                     |
| ------------ | ------------------------------- |
| postback\_id | The unique id for the postback. |

## Request body parameters <a href="#request-body-parameters-0" id="request-body-parameters-0"></a>

| Field  | Type    | Description                                                                                    | Nullable |   |
| ------ | ------- | ---------------------------------------------------------------------------------------------- | -------- | - |
| code   | string  | The code of the postback.  Must be URL format.                                                 | No       |   |
| status | integer | The status of the postback.  Allowed values:  approved ; rejected                              |          |   |
| type   | integer | The type of Postback URL.   Allowed values:   1:Image Pixel;    2:Postback URL;   3:HTML Pixel |          |   |

## Tracking Parameters

|                 |                 |                  |                 |
| --------------- | --------------- | ---------------- | --------------- |
| {click\_id}     | {offer\_id}     | **{event\_id}**  | {country\_id}   |
| {aff\_id}       | {adv\_id}       | **{adv\_sub1}**  | **{adv\_sub2}** |
| **{adv\_sub3}** | {aff\_sub1}     | {aff\_sub2}      | {aff\_sub3}     |
| {aff\_sub4}     | {aff\_sub5}     | {source\_id}     | {agent}         |
| {click\_time}   | {payout}        | {referer}        | {accept\_lan}   |
| {ip}            | {unique\_click} | {currency}       | {ios\_idfa}     |
| {android\_id}   | {google\_aid}   | {conversion\_ip} | {amount}        |

## Response body parameters <a href="#response-body-parameters-2" id="response-body-parameters-2"></a>

| Field         | Type    | Description                                                                            |
| ------------- | ------- | -------------------------------------------------------------------------------------- |
| id            | integer | The unique id for the affiliate postback.                                              |
| offer\_id     | integer | Offer id.                                                                              |
| affiliate\_id | integer | Affiliate id.                                                                          |
| event\_id     | integer | Event id.                                                                              |
| code          | string  |                                                                                        |
| status        | string  | The status of the postback.                                                            |
| type          | integer | The type of code.   Possible Values:   1:Image Pixel;   2:Postback URL;   3:HTML Pixel |
| create\_time  | integer | Create time.                                                                           |
| update\_time  | integer | Update time.                                                                           |

## Example request <a href="#example-request-3" id="example-request-3"></a>

**Request PUT** <https://{networkname}.api.offerslook.com/v1/affiliate_postbacks/8>

**Request PUT** <http://{networkname}.api.offerslook.com/v1/affiliate_postbacks/8>

```
    {
      "code": "https://offerslook.gitbooks.io/api-documentation/content/affiliatepostbacks/affiliatepostbacksmd_md.html",
      "status": "approved",
      "type": 2
    }
```

### Example response <a href="#example-response-3" id="example-response-3"></a>

```
    {
      "code": 0,
      "message": "Success",
      "data": {
        "affiliate_postback": {
          "id": 8,
          "offer_id": 8,
          "affiliate_id": 40,
          "event_id": 1,
          "code": "https: //offerslook.gitbooks.io/api-documentation/content/affiliatepostbacks/affiliatepostbacksmd_md.html",
          "status": "approved",
          "type": 2,
          "create_time": 1467857354,
          "update_time": 1467857394
        }
      }
    }
```
