Add coupon codes

Adds new codes to an existing coupon. This operation is additive — existing codes are preserved and the new codes are appended.

Code handling

  • Case: Codes are normalized to uppercase on storage. summer10 and SUMMER10 are treated as the same code.
  • Duplicates: Duplicate codes within a single request are accepted without error and echoed verbatim in the response, but storage silently dedupes to a single entry per unique (case-insensitive) code. Call GET /coupons/{coupon_id}/codes after a write to confirm the stored state.
  • Format: Codes must contain only alphanumeric characters, hyphens, and underscores. Spaces and other special characters are rejected.
Path Params
string
required

The unique path identifier for the coupon.

Body Params
codes
array of strings
required

Coupon codes to add to the coupon.

Code handling

  • Case: Codes are normalized to uppercase on storage. summer10 and SUMMER10 are stored as the same code.
  • Duplicates: Duplicate codes within a single request do not cause the request to be rejected. The API accepts the request, returns result: success, and echoes every submitted code verbatim in the response. However, storage silently dedupes (case-insensitively) to a single entry per unique code. Call GET /coupons/{coupon_id}/codes after the write to confirm the stored state.
  • Format: Alphanumeric characters, hyphens, and underscores only. Spaces and other special characters are rejected.
codes*
Responses

Language
Credentials
Basic
base64
:
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json