List Order Discounts
Beta/v1/sales/order-discountsThis endpoint is idempotent. Learn more
Returns a paginated list of the order discounts defined for the current account, newest first.
Pass q to narrow the list to discounts whose name or code contains the search text.
cursoroptional stringOpaque cursor token identifying where the page of results starts.
Use the cursor value embedded in a previous response's next_page_url or previous_page_url to fetch the adjacent page. Omit to start from the first page.
limitoptional integerMaximum number of results to return in a single page.
qoptional stringFree-text search term used to filter results.
Which fields are matched against the term varies by endpoint.
objectstringenumValues:listResource type identifier.
page_infoobjectPagination metadata.
next_page_urlstringnullableRelative URL that fetches the next page of results.
previous_page_urlstringnullableRelative URL that fetches the previous page of results.
has_next_pagebooleanWhether more results exist after this page.
has_prev_pagebooleanWhether results exist before this page.
dataarray of order_discountResources in this page.
idstringOrder discount ID.
objectstringenumValues:order_discountResource type identifier.
namestringDisplay name of the discount.
codestringThe code a buyer enters to apply this discount to an order.
Codes are unique within your account and are matched without regard to letter case.
percentagestring (decimal)The fraction of the order total taken off, as a decimal string.
This is a multiplier, not a whole percent: 0.1 takes 10% off. Only read when discount_type is percentage.
amountstring (decimal)The flat amount taken off the order total, as a decimal string.
Only read when discount_type is amount.
discount_typestringenumValues:percentageamountHow the discount is calculated.
percentage: the order total is reduced by the fraction inpercentage.amount: the order total is reduced by the flat amount inamount.
order_countintegerHow many sales orders this discount has been applied to, across all buyers.
created_atstring (date-time)Creation timestamp.
updated_atstring (date-time)Last updated timestamp.
Responses
Successful response for List Order Discounts