> ## Documentation Index
> Fetch the complete documentation index at: https://docs.partnero.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update promotion code

> Update an existing promotion code

## Endpoint

```
PUT https://api.partnero.com/v1/promotion-codes
```

## Request Body

| Parameter                   | Type    | Required | Description                                      |
| --------------------------- | ------- | -------- | ------------------------------------------------ |
| `code`                      | string  | Yes      | Promotion code to update                         |
| `limit_to_specific_partner` | boolean | No       | Restrict to specific partner                     |
| `coupon_specific_partners`  | array   | Yes\*    | Required if limit\_to\_specific\_partner is true |
| `metadata`                  | object  | No       | Custom key-value pairs                           |

## Request

```bash cURL theme={null}
curl --location --request PUT 'https://api.partnero.com/v1/promotion-codes' \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "code": "PROMO123",
    "metadata": {
      "campaign": "summer_sale"
    }
  }'
```

## Response

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "data": {
      "code": "PROMO123",
      "first_time_order": true,
      "limit_to_specific_partner": false,
      "coupon_specific_partners": [],
      "limit_to_specific_customer": false,
      "coupon_specific_customers": [],
      "minimum_order_status": true,
      "minimum_order_value": 22,
      "expiration_date_status": false,
      "expiration_date_value": null,
      "redemption_times_status": false,
      "redemption_times_value": null,
      "metadata": {
        "campaign": "summer_sale"
      }
    },
    "status": 1,
    "message": "Promotion code updated in the app successfully."
  }
  ```
</ResponseExample>
