Reschedule Multiple Coupon Codes

Sets or clears the custom validity window on up to 250 coupon codes of a bulk coupon promotion in a single atomic operation. **Notes** * Only supported for bulk coupon promotions (`coupon_type` of `BULK`); a 422 is returned otherwise. * `schedule: null` resets the selected codes to inherit the promotion's schedule. * Batches are limited to 250 coupon code ids; larger batches return a 422. * The operation is atomic — any invalid id (including ids that do not exist or belong to another promotion) fails the whole request with a 422. * Dates must be within the promotion's schedule, and `valid_until` must be after `valid_from`. * You cannot reschedule the codes of an archived promotion.

Authentication

X-Auth-Tokenstring
### OAuth scopes | UI Name | Permission | Parameter | |:--------|:-----------|:----------| | Marketing | modify | `store_v2_marketing` | | Marketing | read-only | `store_v2_marketing_read_only` | ### Authentication header | Header | Argument | Description | |:-------|:---------|:------------| | `X-Auth-Token` | `access_token` | For more about API accounts that generate `access_token`s, see [API Accounts and OAuth Scopes](/developer/docs/overview/api-fundamentals/api-accounts#api-accounts). | ### Further reading For example requests and more information about authenticating BigCommerce APIs, see [Authentication and Example Requests](/developer/docs/overview/api-fundamentals/api-accounts). For more about BigCommerce OAuth scopes, see [API Accounts and OAuth Scopes](/developer/docs/overview/api-fundamentals/api-accounts#api-accounts). For a list of API status codes, see [API Status Codes](/developer/api-reference/rest/overview#rest-http-status-codes).

Path parameters

promotion_idstringRequired
The ID of the associated promotion.
store_hashstringRequired
Permanent ID of the BigCommerce store.

Headers

AcceptstringRequiredDefaults to application/json
The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the response body.

Request

This endpoint expects an object.
idslist of integersRequired
The ids of the coupon codes to reschedule. All ids must exist and belong to the promotion. Limited to 250 ids per request.
scheduleobject or nullRequired

The custom schedule to apply to the selected codes. null resets the codes to inherit the promotion’s schedule.

Response

The coupon codes have the new schedule. The change applies to redemption immediately.

Errors

404
Not Found Error
422
Unprocessable Entity Error