# Update a promotion

> Changes a draft, scheduled or paused promotion.

Source: https://docs.tappay.mn/reference/promotions/update/

Changes a promotion in `DRAFT`, `SCHEDULED` or `PAUSED`. Send `If-Match` with the version to avoid overwriting another change.

`PATCH /api/v1/promotions/{promotion_id}` Since 2026-09-27

### Authentication

Secret key (Bearer)

### Headers

| Name | Type | Required | Values | Description |
| - | - | - | - | - |
| `TapPay-Version` | string | no | | |
| `TapPay-Timestamp` | string | no | | |
| `TapPay-Nonce` | string | no | | |
| `TapPay-Signature` | string | no | | |

### Path parameters

| Name | Type | Required | Values | Description |
| - | - | - | - | - |
| `promotion_id` | string (uuid) | yes | | |

### Request body

| Name | Type | Required | Values | Description |
| - | - | - | - | - |
| `title` | object | no | | |
| `title.mn` | string | yes | | |
| `title.en` | string \| null | no | | |
| `body` | object | no | | |
| `body.mn` | string | yes | | |
| `body.en` | string \| null | no | | |
| `media` | array\<object> | no | | |
| `media[].url` | string (uri) | yes | | |
| `media[].kind` | string | yes | `IMAGE` | |
| `benefit` | object | no | | |
| `benefit.kind` | string | yes | `PERCENT_OFF`, `AMOUNT_OFF`, `FREE_ITEM`, `BUNDLE_PRICE`, `FREE_DELIVERY`, `LOYALTY`, `INFO` | |
| `benefit.rate` | number | no | | |
| `benefit.max_amount` | integer \| null | no | | |
| `benefit.amount` | integer | no | | |
| `benefit.offering_id` | string | no | | |
| `benefit.quantity` | integer | no | | |
| `benefit.offering_ids` | array\<string> | no | | |
| `benefit.rule_text` | string | no | | |
| `benefit.progress` | object \| null | no | | |
| `benefit.progress.current` | integer | yes | | |
| `benefit.progress.target` | integer | yes | | |
| `scope` | object | no | | |
| `scope.kind` | string | yes | `MERCHANT`, `LOCATIONS`, `OFFERINGS`, `CATEGORIES` | |
| `scope.location_ids` | array\<string (uuid)> | no | | |
| `scope.offering_ids` | array\<string> | no | | |
| `scope.category_ids` | array\<string> | no | | |
| `conditions` | object | no | | |
| `conditions.min_order_amount` | integer \| null | no | | |
| `conditions.fulfillment_modes` | array \| null | no | | |
| `conditions.time_windows` | array \| null | no | | |
| `conditions.first_order_only` | boolean | no | | |
| `conditions.code` | string \| null | no | | |
| `conditions.stackable` | boolean | no | | |
| `targeting` | object | no | | |
| `targeting.kind` | string | yes | `ALL`, `NEARBY`, `PAST_CUSTOMERS`, `STICKER_VISITORS` | |
| `targeting.radius_m` | integer | no | | |
| `targeting.within_days` | integer | no | | |
| `starts_at` | string (date-time) | no | | |
| `ends_at` | string \| null | no | | |
| `limits` | object | no | | |
| `limits.per_payer` | integer \| null | no | | |
| `limits.total_redemptions` | integer \| null | no | | |
| `limits.budget_amount` | integer \| null | no | | |

### Response 200

| Name | Type | Required | Values | Description |
| - | - | - | - | - |
| `success` | boolean | yes | `true` | |
| `data` | object | yes | | |
| `data.promotion_id` | string | yes | | |
| `data.merchant_code` | string | yes | | |
| `data.title` | object | yes | | |
| `data.title.mn` | string | yes | | |
| `data.title.en` | string \| null | no | | |
| `data.body` | object | yes | | |
| `data.body.mn` | string | yes | | |
| `data.body.en` | string \| null | no | | |
| `data.media` | array\<object> | yes | | |
| `data.media[].url` | string | yes | | |
| `data.media[].kind` | string | yes | | |
| `data.benefit` | object | yes | | |
| `data.benefit.kind` | string | yes | `PERCENT_OFF`, `AMOUNT_OFF`, `FREE_ITEM`, `BUNDLE_PRICE`, `FREE_DELIVERY`, `LOYALTY`, `INFO` | |
| `data.benefit.rate` | number | no | | |
| `data.benefit.max_amount` | integer \| null | no | | |
| `data.benefit.amount` | integer | no | | |
| `data.benefit.offering_id` | string | no | | |
| `data.benefit.quantity` | integer | no | | |
| `data.benefit.offering_ids` | array\<string> | no | | |
| `data.benefit.rule_text` | string | no | | |
| `data.benefit.progress` | object \| null | no | | |
| `data.benefit.progress.current` | integer | yes | | |
| `data.benefit.progress.target` | integer | yes | | |
| `data.scope` | object | yes | | |
| `data.scope.kind` | string | yes | `MERCHANT`, `LOCATIONS`, `OFFERINGS`, `CATEGORIES` | |
| `data.scope.location_ids` | array\<string (uuid)> | no | | |
| `data.scope.offering_ids` | array\<string> | no | | |
| `data.scope.category_ids` | array\<string> | no | | |
| `data.conditions` | object | yes | | |
| `data.conditions.min_order_amount` | integer \| null | no | | |
| `data.conditions.fulfillment_modes` | array \| null | no | | |
| `data.conditions.time_windows` | array \| null | no | | |
| `data.conditions.first_order_only` | boolean | no | | |
| `data.conditions.code` | string \| null | no | | |
| `data.conditions.stackable` | boolean | no | | |
| `data.targeting` | object | yes | | |
| `data.targeting.kind` | string | yes | `ALL`, `NEARBY`, `PAST_CUSTOMERS`, `STICKER_VISITORS` | |
| `data.targeting.radius_m` | integer | no | | |
| `data.targeting.within_days` | integer | no | | |
| `data.starts_at` | string | yes | | |
| `data.ends_at` | string \| null | yes | | |
| `data.limits` | object | yes | | |
| `data.limits.per_payer` | integer \| null | no | | |
| `data.limits.total_redemptions` | integer \| null | no | | |
| `data.limits.budget_amount` | integer \| null | no | | |
| `data.status` | string | yes | `DRAFT`, `SCHEDULED`, `ACTIVE`, `PAUSED`, `ENDED`, `BLOCKED` | |
| `data.status_reason` | string \| null | yes | | |
| `data.version` | integer | yes | | |
| `data.redeemed_count` | integer | yes | | |
| `data.redeemed_amount` | integer | yes | | |
| `data.published_at` | string \| null | yes | | |
| `data.created_at` | string | yes | | |
| `data.updated_at` | string | yes | | |

### Errors

| Code | Status | Message |
| - | - | - |
| [`AUTH-001`](https://docs.tappay.mn/errors.md#AUTH-001) | 401 | The API key is missing, invalid or revoked. |
| [`EVT-206`](https://docs.tappay.mn/errors.md#EVT-206) | 401 | Production keys are not accepted in the sandbox. Use a sandbox key (sk_test\_/pk_test\_). |
| [`EVT-207`](https://docs.tappay.mn/errors.md#EVT-207) | 401 | Sandbox keys are not accepted in production. Use a production key (sk_live\_/pk_live\_). |
| [`AUTH-018`](https://docs.tappay.mn/errors.md#AUTH-018) | 403 | The request came from an IP address that is not on the key's allowlist. |
| [`AUTH-058`](https://docs.tappay.mn/errors.md#AUTH-058) | 403 | The API key does not have the scope this operation requires. |
| [`SIG-002`](https://docs.tappay.mn/errors.md#SIG-002) | 401 | The request timestamp is outside the allowed time window. |
| [`SIG-003`](https://docs.tappay.mn/errors.md#SIG-003) | 401 | The request signature is missing or does not match. |
| [`SIG-005`](https://docs.tappay.mn/errors.md#SIG-005) | 409 | This request nonce was already used. |
| [`VAL-014`](https://docs.tappay.mn/errors.md#VAL-014) | 400 | The TapPay-Version header is not a known API version. |
| [`BIZ-004`](https://docs.tappay.mn/errors.md#BIZ-004) | 403 | The terminal is not active. |
| [`BIZ-005`](https://docs.tappay.mn/errors.md#BIZ-005) | 403 | The merchant account is not in a state that allows this request. |
| [`PRM-001`](https://docs.tappay.mn/errors.md#PRM-001) | 404 | The promotion was not found. |
| [`PRM-002`](https://docs.tappay.mn/errors.md#PRM-002) | 422 | A promotion field is not valid. |
| [`PRM-003`](https://docs.tappay.mn/errors.md#PRM-003) | 409 | The promotion cannot be changed in its current status. |
| [`PRM-005`](https://docs.tappay.mn/errors.md#PRM-005) | 409 | The promotion was blocked by TapPay. |
| [`PRM-006`](https://docs.tappay.mn/errors.md#PRM-006) | 409 | The promo code is already used by another promotion. |

Try it in the playground: https://docs.tappay.mn/reference/promotions/update/

```bash title="curl"
curl -sS -X PATCH "https://api.tappay.mn/api/v1/promotions/PROMOTION_ID" \
  -H "Authorization: Bearer sk_test_YOUR_SECRET_KEY" \
  -H "TapPay-Version: 2026-09-27" \
  -H "Content-Type: application/json" \
  -d '{"benefit":{"kind":"PERCENT_OFF","rate":15,"max_amount":5000}}'
```

```js title="Node.js"
import { TapPay } from '@tappay-mn/node';

const tappay = new TapPay({ apiKey: 'sk_test_YOUR_SECRET_KEY' });
const promotion = await tappay.promotions.update({
  promotion_id: 'PROMOTION_ID',
  body: {
    benefit: {
      kind: 'PERCENT_OFF',
      rate: 15,
      max_amount: 5000,
    },
  },
});
console.log(JSON.stringify(promotion));
```

```php title="PHP"
<?php
require 'vendor/autoload.php';

use TapPay\TapPay;

$tappay = new TapPay(['apiKey' => 'sk_test_YOUR_SECRET_KEY']);
$promotion = $tappay->promotions->update([
    'promotion_id' => 'PROMOTION_ID',
    'body' => [
        'benefit' => [
            'kind' => 'PERCENT_OFF',
            'rate' => 15,
            'max_amount' => 5000,
        ],
    ],
]);
echo json_encode($promotion);
```

```python title="Python"
import json
import tappay

client = tappay.TapPay("sk_test_YOUR_SECRET_KEY")
promotion = client.promotions.update({
    "promotion_id": "PROMOTION_ID",
    "body": {
        "benefit": {
            "kind": "PERCENT_OFF",
            "rate": 15,
            "max_amount": 5000,
        },
    },
})
print(json.dumps(promotion))
```

```json title="Response"
{
  "success": true,
  "data": {
    "promotion_id": "0192f8a4-1b2c-7d3e-8f40-5a6b7c8d9f06",
    "merchant_code": "M-SANDBOX-01",
    "title": {
      "mn": "Кофе 10% хямд",
      "en": "10% off coffee"
    },
    "body": {
      "mn": "Бүх кофе 10% хямд.",
      "en": "All coffee is 10% off."
    },
    "media": [],
    "benefit": {
      "kind": "PERCENT_OFF",
      "rate": 15,
      "max_amount": 5000
    },
    "scope": {
      "kind": "MERCHANT"
    },
    "conditions": {
      "min_order_amount": null,
      "fulfillment_modes": null,
      "time_windows": null,
      "first_order_only": false,
      "code": null,
      "stackable": false
    },
    "targeting": {
      "kind": "ALL"
    },
    "starts_at": "2026-10-05T00:00:00.000Z",
    "ends_at": "2026-10-31T15:59:59.000Z",
    "limits": {
      "per_payer": 1,
      "total_redemptions": null,
      "budget_amount": null
    },
    "status": "DRAFT",
    "status_reason": null,
    "version": 2,
    "redeemed_count": 0,
    "redeemed_amount": 0,
    "published_at": null,
    "created_at": "2026-10-03T08:15:00.000Z",
    "updated_at": "2026-10-03T08:20:00.000Z"
  }
}
```
