Coupons

Add, edit, and delete anything related to coupons.

Coupon

coupon_code
string

The unique coupon code for this coupon

coupon_type
string

The type of coupon code (price, percentage, shipping, free-item, bogo-price, bogo-percentage)

coupon_discount
number

The total discount.

no_filters
boolean

If set, this overrides any selection of manufacturer, category, or product.

manufacturer_id
integer

Limit to a manufacturer, you may only set manufacturer, category, or product; not a combination.

category_id
integer

Limit to a category, you may only set manufacturer, category, or product; not a combination.

product_id
integer

Limit to a product, you may only set manufacturer, category, or product; not a combination.

apply_coupon_to_shipping
boolean

Should this coupon apply to the shipping amount.

coupon_message
string

Message to customer on successful redemption.

max_redemptions
string

Max number of times (overall) that a coupon can be redeemed. Use a positive integer or unlimited.

min_required
number

Minimum items required in the cart for coupon to apply.

times_redeemed
number

Number of times this coupon has been redeemed.

expiration_date
string

Date the coupon will expire.

subscription_coupon_duration_type
string

The type way the coupon applies to a subscription product (forever, once, repeating).

subscription_coupon_duration_times
integer

The number of times, if limited, to apply a coupon to a subscription.

{
  • "coupon_code": "string",
  • "coupon_type": "string",
  • "coupon_discount": 0,
  • "no_filters": true,
  • "manufacturer_id": 0,
  • "category_id": 0,
  • "product_id": 0,
  • "apply_coupon_to_shipping": true,
  • "coupon_message": "string",
  • "max_redemptions": "string",
  • "min_required": 0,
  • "times_redeemed": 0,
  • "expiration_date": "string",
  • "subscription_coupon_duration_type": "string",
  • "subscription_coupon_duration_times": 0
}

Gets a list of coupons

This allows you to get a list of coupons

SecuritybearerAuth or basicAuth
Request
query Parameters
page
integer <int64>

Page number starting at 1

perpage
integer <int64>

Number of items per page

sortby
string

Sort results by term

sortdir
string

Sort results ASC or DESC

search
string

Filter coupons by a search term

Responses
200

Successful operation

400

Unauthorized

get/coupons
Request samples
Response samples
application/json
[
  • {
    }
]

Add a Coupons

This allows you to add a new coupon

SecuritybearerAuth
Request
Request Body schema: application/json
required

Submit any or all elements to add a new coupon.

coupon_code
required
string

The coupon code for this coupon.

coupon_type
string

The type of coupon code (price, percentage, shipping, free-item, bogo-price, bogo-percentage)

coupon_discount
number

The total discount.

no_filter
boolean

Turn off filters for this coupon, disables manufacturer, category, or product selections.

manufacturer_id
integer

Limit to a manufacturer.

category_id
integer

Limit to a category.

product_id
integer

Limit to a product.

apply_coupon_to_shipping
boolean

Should this coupon apply to the shipping amount.

coupon_message
string

Message to customer on successful redemption.

times_redeemed
number

Number of times this coupon has been redeemed.

max_redemptions
string

Max number of times (overall) that a coupon can be redeemed. Use a positive integer or unlimited.

min_required
number

Minimum sub total required in the cart for coupon to apply.

expiration_date
string

Date the coupon will expire.

subscription_coupon_duration_type
string

The type way the coupon applies to a subscription product (forever, once, repeating).

subscription_coupon_duration_times
integer

The number of times, if limited, to apply a coupon to a subscription.

Responses
200

Successful operation

400

Unauthorized

post/coupons
Request samples
application/json
{
  • "coupon_code": "string",
  • "coupon_type": "string",
  • "coupon_discount": 0,
  • "no_filter": true,
  • "manufacturer_id": 0,
  • "category_id": 0,
  • "product_id": 0,
  • "apply_coupon_to_shipping": true,
  • "coupon_message": "string",
  • "times_redeemed": 0,
  • "max_redemptions": "string",
  • "min_required": 0,
  • "expiration_date": "string",
  • "subscription_coupon_duration_type": "string",
  • "subscription_coupon_duration_times": 0
}
Response samples
application/json
{
  • "coupon_code": "string",
  • "coupon_type": "string",
  • "coupon_discount": 0,
  • "no_filters": true,
  • "manufacturer_id": 0,
  • "category_id": 0,
  • "product_id": 0,
  • "apply_coupon_to_shipping": true,
  • "coupon_message": "string",
  • "max_redemptions": "string",
  • "min_required": 0,
  • "times_redeemed": 0,
  • "expiration_date": "string",
  • "subscription_coupon_duration_type": "string",
  • "subscription_coupon_duration_times": 0
}

Gets a coupon by code

This allows you to get a coupon from your store by coupon code

SecuritybearerAuth or basicAuth
Request
path Parameters
coupon_code
required
string^[0-9a-zA-Z\$\%]+$

Coupon Code

Responses
200

Successful operation

400

Unauthorized

get/coupons/{coupon_code}
Request samples
Response samples
application/json
{
  • "coupon_code": "string",
  • "coupon_type": "string",
  • "coupon_discount": 0,
  • "no_filters": true,
  • "manufacturer_id": 0,
  • "category_id": 0,
  • "product_id": 0,
  • "apply_coupon_to_shipping": true,
  • "coupon_message": "string",
  • "max_redemptions": "string",
  • "min_required": 0,
  • "times_redeemed": 0,
  • "expiration_date": "string",
  • "subscription_coupon_duration_type": "string",
  • "subscription_coupon_duration_times": 0
}

Updates a coupon by code

This allows you to update a coupon

SecuritybearerAuth
Request
path Parameters
coupon_code
required
string^[0-9a-zA-Z\$\%]+$

Coupon Code

Request Body schema: application/json
required

Submit any or all elements to update the coupon.

coupon_code
string

The coupon code for this coupon.

coupon_type
string

The type of coupon code (price, percentage, shipping, free-item, bogo-price, bogo-percentage)

coupon_discount
number

The total discount.

no_filter
boolean

Turn off filters for this coupon, disables manufacturer, category, or product selections.

manufacturer_id
integer

Limit to a manufacturer.

category_id
integer

Limit to a category.

product_id
integer

Limit to a product.

apply_coupon_to_shipping
boolean

Should this coupon apply to the shipping amount.

coupon_message
string

Message to customer on successful redemption.

times_redeemed
number

Number of times this coupon has been redeemed.

max_redemptions
string

Max number of times (overall) that a coupon can be redeemed. Use a positive integer or unlimited.

min_required
number

Minimum sub total required in the cart for coupon to apply.

expiration_date
string

Date the coupon will expire.

subscription_coupon_duration_type
string

The type way the coupon applies to a subscription product (forever, once, repeating).

subscription_coupon_duration_times
integer

The number of times, if limited, to apply a coupon to a subscription.

Responses
200

Successful operation

400

Unauthorized

patch/coupons/{coupon_code}
Request samples
application/json
{
  • "coupon_code": "string",
  • "coupon_type": "string",
  • "coupon_discount": 0,
  • "no_filter": true,
  • "manufacturer_id": 0,
  • "category_id": 0,
  • "product_id": 0,
  • "apply_coupon_to_shipping": true,
  • "coupon_message": "string",
  • "times_redeemed": 0,
  • "max_redemptions": "string",
  • "min_required": 0,
  • "expiration_date": "string",
  • "subscription_coupon_duration_type": "string",
  • "subscription_coupon_duration_times": 0
}
Response samples
application/json
{
  • "coupon_code": "string",
  • "coupon_type": "string",
  • "coupon_discount": 0,
  • "no_filters": true,
  • "manufacturer_id": 0,
  • "category_id": 0,
  • "product_id": 0,
  • "apply_coupon_to_shipping": true,
  • "coupon_message": "string",
  • "max_redemptions": "string",
  • "min_required": 0,
  • "times_redeemed": 0,
  • "expiration_date": "string",
  • "subscription_coupon_duration_type": "string",
  • "subscription_coupon_duration_times": 0
}

Deletes a coupon by code

This allows you to delete a coupon from your store

SecuritybearerAuth
Request
path Parameters
coupon_code
required
string^[0-9a-zA-Z\$\%]+$

Coupon Code

Responses
200

Successful operation

400

Unauthorized

delete/coupons/{coupon_code}
Request samples
Response samples
application/json
{
  • "coupon_code": "string",
  • "coupon_type": "string",
  • "coupon_discount": 0,
  • "no_filters": true,
  • "manufacturer_id": 0,
  • "category_id": 0,
  • "product_id": 0,
  • "apply_coupon_to_shipping": true,
  • "coupon_message": "string",
  • "max_redemptions": "string",
  • "min_required": 0,
  • "times_redeemed": 0,
  • "expiration_date": "string",
  • "subscription_coupon_duration_type": "string",
  • "subscription_coupon_duration_times": 0
}