Get a promotion
Returns one promotion. A limited token gets only whether it applies to recurring billings, which a cart needs to tell the shopper. Secret, trusted and limited tokens may call it.
AuthorizationBearer <token>A secret, trusted or limited token. See Authentication.
promotion_id*stringThe promotion id.
show?stringComma-separated fields to return; all others are left out. Use dot notation for child fields (customer.email). You cannot send show and hide together (400). See Customizing output.
hide?stringComma-separated fields to leave out of the response. Use dot notation for child fields (customer.email). You cannot send show and hide together (400). See Customizing output.
formatted?booleanWhen true, the object also has a formatted child with amounts and dates as display text in the shopper's language and currency (for example $19.99 or November 7, 2026). The default is false. See Localized formatting.
falseThe promotion.
application/json- response
A discount rule: a coupon shoppers enter, a cross-sell offered next to another product, or an up-sell offered in place of one. A limited token gets only object, url, promotion_id, apply_to_recurring and apply_to_recurring_count.
object*"promotion"The object type. Always promotion.
"promotion"url*stringThe URL of this promotion in the API.
uripromotion_id*stringThe id of the promotion.
name?|Your name for the promotion. Not returned to limited tokens.
test?booleanTrue for a test-mode promotion. Not returned to limited tokens.
account_id?stringThe account the promotion belongs to. Not returned to limited tokens.
date_created?stringWhen the promotion was created. Not returned to limited tokens.
date-timedate_modified?stringWhen the promotion was last changed. Not returned to limited tokens.
date-timetype?stringThe kind of promotion. Not returned to limited tokens.
"coupon""cross_sell""up_sell"active?booleanTrue when the promotion can be used. Not returned to limited tokens.
apply_to_recurring*booleanTrue when the discount also applies to a subscription's later billings.
apply_to_recurring_count*|How many later billings get the discount, or null for all of them. Only used when apply_to_recurring is true.
use_count?integerHow many times the promotion has been used. Not returned to limited tokens.
expires?|When the promotion stops working, or null for never. Not returned to limited tokens.
date-timecomments?|Your notes. Not returned to limited tokens.
config?||The rules of the promotion, by type. Not returned to limited tokens.
formatted?Present only when you send formatted=true.
curl -X GET 'https://api.comecero.com/api/v1/promotions/string'{ "object": "promotion", "url": "https://api.comecero.com/api/v1/promotions/0070576784690PtKDqfI", "promotion_id": "0070576784690PtKDqfI", "name": "Ten percent off", "test": true, "account_id": "AB1234", "date_created": "2026-11-02T20:13:16Z", "date_modified": "2026-11-02T20:13:16Z", "type": "coupon", "active": true, "apply_to_recurring": false, "apply_to_recurring_count": null, "use_count": 4, "expires": "2026-12-31T23:59:59Z", "comments": null, "config": { "type": "order", "code": "SAVE10", "generator_prefix": null, "generator_secret_key": null, "discount_percent": 0.1, "discount_amount": null, "product_ids": null, "exclude_product_ids": false, "max_uses_per_customer": 1, "max_uses_global": null }}Create a promotion POST
Creates a coupon, cross-sell or up-sell. A new promotion is inactive unless you send `active: true`. For a coupon with a `generator_prefix`, a `generator_secret_key` is made when you do not send one. Secret and trusted tokens may call it.
Update a promotion POST
Changes a promotion. Send only the fields you want to change. The type cannot change, and neither can a coupon's `code` or `generator_prefix`. Setting `apply_to_recurring` to false clears `apply_to_recurring_count`. Secret and trusted tokens may call it.