# Update the settings for the cap

| HTTP method | Endpoint                        |
| ----------- | ------------------------------- |
| **PUT**     | **/v1/offers/{offer\_id}/caps** |

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

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

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

| Field                | Type    | Description                                                        | Nullable |
| -------------------- | ------- | ------------------------------------------------------------------ | -------- |
| adv\_cap\_revenue    | string  | Advertiser cap revenue limit.                                      | No       |
| adv\_cap\_click      | integer | Advertiser cap click limit.                                        | No       |
| adv\_cap\_type       | integer | Cap type:  0 none ;  1 total\_count ;  2 daily\_count ;  3 revenue | No       |
| adv\_cap\_conversion | integer | Advertiser cap conversion limit.                                   | No       |
| aff\_cap\_payout     | string  | Affiliate cap payout limit.                                        | No       |
| aff\_cap\_click      | integer | Affiliate cap click limit                                          | No       |
| aff\_cap\_type       | integer | Cap type:  0 none ;  1 total\_count ;  2 daily\_count ;  3 payout  | No       |
| aff\_cap\_conversion | integer | Affiliate cap conversion limit.                                    | No       |
| cap\_timezone        | string  | Timezone                                                           |          |

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

| Field                | Type    | Description                                                        |
| -------------------- | ------- | ------------------------------------------------------------------ |
| id                   | integer |                                                                    |
| offer\_id            | integer | A string that uniquely identifies this offer.                      |
| adv\_cap\_revenue    | string  | Advertiser cap revenue limit.                                      |
| adv\_cap\_click      | integer | Advertiser cap click limit.                                        |
| adv\_cap\_type       | integer | Cap type:  0 none ;  1 total\_count ;  2 daily\_count ;  3 revenue |
| adv\_cap\_conversion | integer | Advertiser cap conversion limit.                                   |
| aff\_cap\_payout     | string  | Affiliate cap payout limit.                                        |
| aff\_cap\_click      | integer | Affiliate cap click limit                                          |
| aff\_cap\_type       | integer | Cap type:  0 none ;  1 total\_count ;  2 daily\_count ;  3 payout  |
| aff\_cap\_conversion | integer | Affiliate cap conversion limit.                                    |
| cap\_timezone        | string  | Timezone selected.                                                 |

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

**Request PUT** <https://{networkname}.api.offerslook.com/v1/offers/3147/caps>

**Request PUT** <http://{networkname}.api.offerslook.com/v1/offers/3147/caps>

```
    {
      "adv_cap_type": 1,
      "adv_cap_conversion": 100,
      "aff_cap_type": 1,
      "aff_cap_conversion": 90
    }
```

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

```
    {
      "code": 0,
      "message": "Success",
      "data": {
        "offer_cap": {
          "id": 102,
          "offer_id": 102,
          "cap_budget": null,
          "cap_click": null,
          "cap_type": null,
          "cap_conversion": null,
          "adv_cap_type": 1,
          "adv_cap_click": 100,
          "adv_cap_conversion": 0,
          "adv_cap_revenue": "0",
          "aff_cap_type": 1,
          "aff_cap_click": 90,
          "aff_cap_conversion": 0,
          "aff_cap_payout": "0.000",
          "cap_timezone": "Asia/Hong_Kong"
        }
      }
    }
```
