> 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/affiliates/sub-resources/affiliate_blocked/create_a_new_affiliate_blocked.md).

# Create a new affiliate blocked

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

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

| Field          | Type    | Description                                                                                                                                                                                                          | Nullable |
| -------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- |
| advertiser\_id | integer | The unique id for the advertiser. **Note: if  the category is 2,must set the advertiser\_id.**                                                                                                                       | No       |
| offer\_id      | integer | The unique id for the offer.   **Note: if the setting is for All Offer, just simply set offer\_id as 0.**                                                                                                            | No       |
| affiliate\_id  | integer | The unique id for the affiliate                                                                                                                                                                                      | No       |
| category       | string  | The type for this affiliate blocked. Allow type: 1 Offer 2 Advertiser                                                                                                                                                | No       |
| type           | integer | The type for this affiliate blocked.   Allow type： 1 Source ID  2 Aff Sub1  3 Aff Sub2  4 Aff Sub3   5 Aff Sub4   6 Aff Sub5                                                                                         | No       |
| value          | string  | The value for the affiliate blocked.                                                                                                                                                                                 | No       |
| list\_type     | string  | Allow Values: 1 Blacklist; 2 Whitelist. **Note:if list\_type=1, all the clicks and conversions with this value will be rejected. If list\_type=2, all the clicks and conversions won't success without this value.** | No       |

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

| Field          | Type    | Description                                                                                                                                                                                                          |    |
| -------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -- |
| id             | integer | The unique id for the block.                                                                                                                                                                                         |    |
| affiliate\_id  | integer | The unique id for the affiliate.                                                                                                                                                                                     |    |
| offer\_id      | integer | The unique id for the offer.                                                                                                                                                                                         |    |
| type           | integer | The type for this affiliate blocked.   Allow type： 1 Source ID  2 Aff Sub1  3 Aff Sub2  4 Aff Sub3   5 Aff Sub4   6 Aff Sub5                                                                                         |    |
| value          | string  | The value for the affiliate blocked.                                                                                                                                                                                 |    |
| create\_time   | integer | Create time.                                                                                                                                                                                                         |    |
| update\_time   | integer | Update time.                                                                                                                                                                                                         |    |
| advertiser\_id | integer | The unique id for the advertiser.                                                                                                                                                                                    |    |
| category       | string  | The type for this affiliate blocked. Allow type: 1 Offer 2 Advertiser                                                                                                                                                |    |
| list\_type     | string  | Allow Values: 1 Blacklist; 2 Whitelist. **Note:if list\_type=1, all the clicks and conversions with this value will be rejected. If list\_type=2, all the clicks and conversions won't success without this value.** | No |

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

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

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

```
    {
  "advertiser_id":0,
  "affiliate_id": 5547,
  "category": "1",
  "offer_id": 36077,
  "type": "1",
  "value": "string",
  "list_type":"1"
}
```

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

```
    {
    "code": 0,
    "message": "Success",
    "data": {
        "affiliate_block": {
            "id": 9,
            "affiliate_id": 5547,
            "offer_id": 36077,
            "type": 1,
            "value": "string",
            "create_time": 1533022310,
            "update_time": 0,
            "advertiser_id": 0,
            "category": 1,
            "list_type":"1"

        }
    }
}
```
