List Offer Codes
Retrieve all offer codes for a product, including universal offer codes.Path Parameters
The unique identifier of the product
Response
Whether the request was successful
Array of offer code objects
Get Offer Code
Retrieve details for a specific offer code.Path Parameters
The unique identifier of the product
The unique identifier of the offer code
Response
Whether the request was successful
The offer code object
Create Offer Code
Create a new offer code for a product.Path Parameters
The unique identifier of the product
Body Parameters
The discount code that customers will use (letters, numbers, dashes, and underscores only)
Type of discount:
percent for percentage-based or fixed for fixed-amountFor percentage discounts: the percentage (0-100)
For fixed discounts: can be used instead of
amount_centsFor fixed discounts: the discount amount in cents (alternative to
amount_off)Whether the code applies to all of your products. Pass
"true" or "false" as a string.Maximum number of times this code can be used (omit for unlimited)
You must provide either
amount_off or amount_cents when creating an offer code. For percentage discounts, use amount_off. For fixed-amount discounts, use either parameter.Response
Whether the request was successful
The created offer code object
Update Offer Code
Update an existing offer code’s maximum purchase count.Path Parameters
The unique identifier of the product
The unique identifier of the offer code
Body Parameters
Maximum number of times this code can be used
Response
Whether the request was successful
The updated offer code object
Delete Offer Code
Soft delete an offer code (marks it as deleted but preserves data).Path Parameters
The unique identifier of the product
The unique identifier of the offer code
Response
Whether the request was successful
Error Codes
400
Bad Request - Missing required offer code parameters (
amount_off or amount_cents)401
Unauthorized - Invalid or missing access token
403
Forbidden - Insufficient permissions (requires
edit_products scope for create/update/delete)404
Not Found - Product or offer code not found
422
Unprocessable Entity - Invalid offer code parameters (e.g., discount exceeds product price)