Ordexs API v1 Get an API key

Offers

Check a discount code

POSThttps://api.ordexs.com/v1/discounts/preview

Whether a code works right now (active, started, not ended, not used up) and what it would take off these lines. A shopper's own per-customer limit is checked only when the order is placed.

Body

  • codestringRequired

    1–20 characters

  • line_itemsarray of objects

    up to 100 items

    2 child fields
    • variant_idstringRequired

      starts with var_

    • quantityintegerRequired

      1–999

Returns

200 OK · The check. DiscountPreview

  • objectstring

    always "discount_preview"

  • codestring
  • validboolean
  • discount_idstring or null
  • namestring or null
  • amountMoney or null
    2 child fields
    • amountstringRequired
    • currencystringRequired

Errors

Every error has the same shape. This endpoint can answer with: