Coupons

Fetches all coupons for a store id

get
Authorizations
AuthorizationstringRequired

An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.

Path parameters
storeIdstring · flake-idRequiredExample: 411486491630370816
Query parameters
limitinteger · int32 · min: 1 · max: 100Optional

The maximum number of items to return in a single request.

afterstring · flake-idOptional

Returns items after the specified ID. Used for forward pagination through results.

Example: 411486491630370816
beforestring · flake-idOptional

Returns items before the specified ID. Used for backward pagination through results.

Example: 411486491630370816
ascbooleanOptional

Determines the sort order of returned items. When true, items are returned in ascending order. When false, items are returned in descending order.

statusstring · enumOptional

Will filter by coupon status.

Possible values:
typestring · enumOptional

Will filter by coupon creation type.

Possible values:
Responses
get
/v1/stores/{storeId}/coupons
post
Authorizations
AuthorizationstringRequired

An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.

Path parameters
storeIdstring · flake-idRequiredExample: 411486491630370816
Body
enabledbooleanRequired
codestringRequired
notestringOptional
durationstring · enumRequired

Defines the duration for which a coupon remains valid.

Possible values:
duration_in_monthsnull | integerOptional
discount_typestring · enumRequired

Specifies the type of discount applied by a coupon.

Possible values:
discount_amountinteger · int64Required
discount_apply_individuallybooleanRequired
discount_apply_before_salesbooleanRequired
apply_to_productsstring · flake-id[]OptionalExample: 411486491630370816
apply_to_tagsstring · flake-id[]OptionalExample: 411486491630370816
usable_by_customer_idstring · flake-idOptionalExample: 411486491630370816
minimum_order_valueinteger · int64Required
redeem_limit_store_enabledbooleanRequired
redeem_limit_store_amountinteger · int64Required
redeem_limit_customer_enabledbooleanRequired
redeem_limit_customer_amountinteger · int64Required
usable_on_one_time_purchasebooleanRequired
usable_on_subscriptionbooleanRequired
usable_atnull | stringOptional
expires_atnull | stringOptional
Responses
post
/v1/stores/{storeId}/coupons

Retrieves a coupon by ID

get
Authorizations
AuthorizationstringRequired

An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.

Path parameters
storeIdstring · flake-idRequiredExample: 411486491630370816
couponIdstring · flake-idRequiredExample: 411486491630370816
Responses
get
/v1/stores/{storeId}/coupons/{couponId}

Deletes a coupon

delete
Authorizations
AuthorizationstringRequired

An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.

Path parameters
storeIdstring · flake-idRequiredExample: 411486491630370816
couponIdstring · flake-idRequiredExample: 411486491630370816
Responses
delete
/v1/stores/{storeId}/coupons/{couponId}

No content

Performs a Delta Update of a Coupon

patch
Authorizations
AuthorizationstringRequired

An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.

Path parameters
storeIdstring · flake-idRequiredExample: 411486491630370816
couponIdstring · flake-idRequiredExample: 411486491630370816
Body
enabledbooleanOptional
codestringOptional
notestringOptional
durationstring · enumOptional

Defines the duration for which a coupon remains valid.

Possible values:
duration_in_monthsnull | integerOptional
discount_typestring · enumOptional

Specifies the type of discount applied by a coupon.

Possible values:
discount_amountinteger · int64Optional
discount_apply_individuallybooleanOptional
discount_apply_before_salesbooleanOptional
apply_to_productsstring · flake-id[]OptionalExample: 411486491630370816
apply_to_tagsstring · flake-id[]OptionalExample: 411486491630370816
usable_by_customer_idstring · flake-idOptionalExample: 411486491630370816
minimum_order_valueinteger · int64Optional
redeem_limit_store_enabledbooleanOptional
redeem_limit_store_amountinteger · int64Optional
redeem_limit_customer_enabledbooleanOptional
redeem_limit_customer_amountinteger · int64Optional
usable_on_one_time_purchasebooleanOptional
usable_on_subscriptionbooleanOptional
usable_atnull | stringOptional
expires_atnull | stringOptional
Responses
patch
/v1/stores/{storeId}/coupons/{couponId}

Last updated

Was this helpful?