> For the complete documentation index, see [llms.txt](https://offerslook-api.gitbook.io/api-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://offerslook-api.gitbook.io/api-documentation/networkapi/affiliatepostbacksmd_md/create_a_new_post_back_of_the_affiliate.md).

# Create a new post back of the affiliate

| HTTP method | Endpoint                     |
| ----------- | ---------------------------- |
| **POST**    | **/v1/affiliate\_postbacks** |

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

***Adding a new parameter, event\_id, in Affiliate Postback module method. It is compatible with last version, and the default value is 1.***

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

| Field         | Type    | Description                                                                                   | Nullable |
| ------------- | ------- | --------------------------------------------------------------------------------------------- | -------- |
| offer\_id     | integer |                                                                                               | No       |
| affiliate\_id | integer |                                                                                               | No       |
| event\_id     | integer | Event id.                                                                                     |          |
| code          | string  | Must be URL format.                                                                           | No       |
| type          | integer | The type of Postback URL.   Allowed values:   1:Image Pixel;   2:Postback URL;   3:HTML Pixel | No       |

## 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" id="response-body-parameters"></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" id="example-request"></a>

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

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

```
    {
      "affiliate_id": 40,
      "offer_id": 8,
      "event_id": 1,
      "type": 2,
      "code": "https://offerslook.gitbooks.io/api-documentation/content/affiliatepostbacks/affiliatepostbacksmd_md.html"
    }
```

## Example response <a href="#example-response" id="example-response"></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": 1467857354
        }
      }
    }
```
