Skip to content

Search API reference

Find an endpoint or a guide of the Sovgate API reference and jump straight to it.

The promotion code object

A code that gives a coupon's discount.

A promotion code gives its coupon's discount. A coupon can have many codes, each with limits of its own within the coupon's.

Attributes

NameTypeDescription
idstringUnique identifier, starting promo_.
objectstringAlways promotion_code.
livemodebooleantrue in live mode.
couponstringIts coupon, cpn_....
codestringThe code itself.
activebooleanWhether it can be used.
first_time_onlybooleanOnly customers who have never paid you.
one_per_customerbooleanEach customer can use it once.
minimum_amountinteger or nullThe order's items must come to this, in cents, before discounts and tax.
customerstring or nullOnly this customer can use it.
expires_attimestamp or nullIts last moment; null: as long as the coupon.
max_redemptionsinteger or nullA limit of its own.
times_redeemedintegerHow many times it was used.
createdtimestampWhen it was created.

Example

json
{  "id": "promo_22c793f0f6e03e802cd4a00f",  "object": "promotion_code",  "livemode": false,  "coupon": "cpn_20b5e71de063737f5f3e2920",  "code": "LAUNCH20",  "active": true,  "first_time_only": false,  "one_per_customer": true,  "minimum_amount": null,  "customer": null,  "expires_at": null,  "max_redemptions": null,  "times_redeemed": 4,  "created": "2026-11-20T09:30:00Z"}

Endpoints

EndpointWhat it does
POST /v1/promotion_codesAdd a code to a coupon.
GET /v1/promotion_codes/{id}Get a promotion code by its ID.
POST /v1/promotion_codes/{id}/deactivateStop a code working.
POST /v1/promotion_codes/{id}/activateLet a deactivated code work again.
GET /v1/promotion_codesList your promotion codes, newest first.