POST coupons/quote

Request a quote for a coupon code.

Request

Body

The coupon code and associated information.

Property Description Type Details
Code The coupon code. string Length: 1-64, inclusive
ProductsAmount Optional calculated total cost of the order items. Lets the API calculate the final discount. decimal number -
ShippingAmount Optional calculated shipping/handling cost of the order. Lets the API calculate the final discount. decimal number -
{
  "code": "EXAMPLE",
  "productsAmount": 10.00,
  "shippingAmount": 2.95
}
<?xml version="1.0"?>
<Coupon xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <Code>EXAMPLE</Code>
  <ProductsAmount>10.00</ProductsAmount>
  <ShippingAmount>2.95</ShippingAmount>
</Coupon>

Response

Body

The discount information.

Property Description Type Details
ExpirationDateTime The date/time the coupon will expire. ISO 8601 date -
State The state of the coupon. CouponState -
Type The type of the coupon. CouponType -
Scope The scope of the coupon. CouponScope -
Percentage The discount percentage. Only present if type is "Percentage". integer -
Amount The fixed discount amount. Only present if type is "Amount". decimal number -
Calculated The final discount. Only present if products and shipping amounts were supplied in the request. decimal number -
{
  "expirationDateTime": "2025-02-01T00:00:00",
  "state": "Valid",
  "type": "Percentage",
  "scope": "Products",
  "percentage": 10,
  "calculated": 10.00
}
<?xml version="1.0"?>
<Quote xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <ExpirationDateTime>2025-02-01T00:00:00+01:00</ExpirationDateTime>
  <State>Valid</State>
  <Type>Percentage</Type>
  <Scope>Products</Scope>
  <Percentage>10</Percentage>
  <Amount xsi:nil="true" />
  <Calculated>10.00</Calculated>
</Quote>