Order Coupons
List Order Coupons
GET https://api.bigcommerce.com/stores/{store_hash}/v2/orders/{order_id}/couponsRequest
Lists all order coupons. Optional parameters can be passed in.
Type int | Type Name |
---|---|
0 | per_item_discount |
1 | percentage_discount |
2 | per_total_discount |
3 | shipping_discount |
4 | free_shipping |
5 | promotion |
Authentication
- X-Auth-Token in header
Parameters
- store_hash in path - string
- Accept in header with default of application/json - stringrequiredThe MIME type of the response body.
- order_id in path - integerrequiredID of the order.
- page in query with default of 1 - numberThe page to return in the response.
- limit in query with default of 50 - numberNumber of results to return.
example
curl --request GET \
--url 'https://api.bigcommerce.com/stores/[store_hash]/v2/orders/[order_id]/coupons' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: {{token}}'
Response
Body
array | application/json
idinteger
Numeric ID of the coupon code.Example: 3coupon_idinteger
Numeric ID of the associated coupon.Example: 1order_idinteger
Numeric ID of the associated order.Example: 120codestring or null
Coupon code, as a string.Example: S2549JM0Yamount
Amount of the discount. This information is returned as in integer. Dollar and percentage discounts will return the same. For example, $3 returns as3
while 5% will return as5
. Check the discount type to see what type of discount is available.Any of:number integer Type: stringExample: 5typeinteger
0: per_item_discount 1: percentage_discount 2: per_total_discount 3: shipping_discount 4: free_shipping 5: promotions
Allowed: 0 | 1 | 2 | 3 | 4 | 5
discountnumber
The amount off the order the discount is worth. For example, if an order subtotal is $90 and the discount is $3 then it will return as 3.000. If the discount is 3% then will return as 2.7000 or the amount of the order. (Float, Float-As-String, Integer)
Example: 2.7
response
[
{
"id": 3,
"coupon_id": 1,
"order_id": 120,
"code": "S2549JM0Y",
"amount": 5,
"type": 2,
"discount": 5
}
]
Did you find what you were looking for?