comecerodocs

Get a promotion

GET
/promotions/{promotion_id}

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.

Authorization

headerAuthorizationBearer <token>

A secret, trusted or limited token. See Authentication.

Path Parameters

promotion_id*string

The promotion id.

Query Parameters

show?string

Comma-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?string

Comma-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?boolean

When 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.

Defaultfalse

Response Body

The promotion.

application/json
  1. 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.

Value in"promotion"
url*string

The URL of this promotion in the API.

Formaturi
promotion_id*string

The id of the promotion.

name?|

Your name for the promotion. Not returned to limited tokens.

test?boolean

True for a test-mode promotion. Not returned to limited tokens.

account_id?string

The account the promotion belongs to. Not returned to limited tokens.

date_created?string

When the promotion was created. Not returned to limited tokens.

Formatdate-time
date_modified?string

When the promotion was last changed. Not returned to limited tokens.

Formatdate-time
type?string

The kind of promotion. Not returned to limited tokens.

Value in"coupon""cross_sell""up_sell"
active?boolean

True when the promotion can be used. Not returned to limited tokens.

apply_to_recurring*boolean

True 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?integer

How 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.

Formatdate-time
comments?|

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.

Example Request
curl -X GET 'https://api.comecero.com/api/v1/promotions/string'
Example Response
{  "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  }}