Discounts

List discounts

Retrieve a paginated list of discounts with powerful filtering options. Discounts can be coupon codes that customers enter at checkout, or automatic sale discounts applied based on conditions. Results are sorted by creation date (newest first) by default.

Authorization

Public key
x-fngs-public-key<token>

In: header

Query Parameters

ids?array<>

GET /v0/discounts/list Parameter

termOrId?string

GET /v0/discounts/list Parameter

status?string

GET /v0/discounts/list Parameter

Value in

  • "active"
  • "inactive"
type?string

GET /v0/discounts/list Parameter

Value in

  • "code"
  • "sale"
currency?string

GET /v0/discounts/list Parameter

Value in

  • "AFN"
  • "ALL"
  • "DZD"
  • "AOA"
  • "ARS"
  • "AMD"
  • "AWG"
  • "AUD"
  • "AZN"
  • "BSD"
  • "BDT"
  • "BBD"
  • "BZD"
  • "BMD"
  • "BOB"
  • "BAM"
  • "BWP"
  • "BRL"
  • "BHD"
  • "GBP"
  • "BND"
  • "BGN"
  • "BIF"
  • "BYN"
  • "KHR"
  • "CAD"
  • "CVE"
  • "KYD"
  • "KWD"
  • "XAF"
  • "XPF"
  • "CLP"
  • "CNY"
  • "COP"
  • "KMF"
  • "CDF"
  • "CRC"
  • "HRK"
  • "CZK"
  • "DKK"
  • "DJF"
  • "DOP"
  • "XCD"
  • "EGP"
  • "ETB"
  • "EUR"
  • "FKP"
  • "FJD"
  • "GMD"
  • "GEL"
  • "GIP"
  • "GTQ"
  • "GNF"
  • "GYD"
  • "HTG"
  • "HNL"
  • "HKD"
  • "HUF"
  • "ISK"
  • "INR"
  • "IDR"
  • "ILS"
  • "JMD"
  • "JPY"
  • "JOD"
  • "KZT"
  • "KES"
  • "KGS"
  • "LAK"
  • "LBP"
  • "LSL"
  • "LRD"
  • "MOP"
  • "MKD"
  • "MGA"
  • "MWK"
  • "MYR"
  • "MVR"
  • "MRO"
  • "MUR"
  • "MXN"
  • "MDL"
  • "MNT"
  • "MAD"
  • "MZN"
  • "MMK"
  • "NAD"
  • "NPR"
  • "ANG"
  • "TWD"
  • "NZD"
  • "NIO"
  • "NGN"
  • "NOK"
  • "OMR"
  • "PKR"
  • "PAB"
  • "PGK"
  • "PYG"
  • "PEN"
  • "PHP"
  • "PLN"
  • "QAR"
  • "RON"
  • "RUB"
  • "RWF"
  • "SHP"
  • "SVC"
  • "WST"
  • "STD"
  • "SAR"
  • "RSD"
  • "SCR"
  • "SLL"
  • "SGD"
  • "SBD"
  • "SOS"
  • "ZAR"
  • "KRW"
  • "LKR"
  • "SRD"
  • "SZL"
  • "SEK"
  • "CHF"
  • "TJS"
  • "TZS"
  • "THB"
  • "TND"
  • "TOP"
  • "TTD"
  • "TRY"
  • "UGX"
  • "UAH"
  • "AED"
  • "UYU"
  • "USD"
  • "UZS"
  • "VUV"
  • "VEF"
  • "VND"
  • "XOF"
  • "YER"
  • "ZMW"
  • "SLE"
  • "XCG"
  • "SSP"
  • "VES"
  • "MRU"
  • "STN"
  • "VED"
validFrom?|

GET /v0/discounts/list Parameter

Formatint64
Range0 <= value <= 9007199254740991
validUntil?|

GET /v0/discounts/list Parameter

Formatint64
Range0 <= value <= 9007199254740991
orderBy?string

GET /v0/discounts/list Parameter

Value in

  • "createdAt"
  • "name"
  • "amount"
orderDirection?string

GET /v0/discounts/list Parameter

Value in

  • "ASC"
  • "DESC"
skip?|

GET /v0/discounts/list Parameter

Formatdouble
Range0 <= value <= 1.7976931348623157e+308
take?|

GET /v0/discounts/list Parameter

Formatdouble
Range0 <= value <= 1.7976931348623157e+308
archived?|

GET /v0/discounts/list Parameter

expired?|

GET /v0/discounts/list Parameter

withArchived?|

GET /v0/discounts/list Parameter

returnCount?|

GET /v0/discounts/list Parameter

Response Body

application/json

application/json

GET
/v0/discounts/list
curl -X GET "https://example.com/v0/discounts/list"
{  "status": "success",  "data": {    "discounts": [      {        "object": "discount",        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",        "type": "code",        "name": null,        "amount": "string",        "amountType": "fixed",        "discountCode": null,        "validFrom": null,        "validUntil": null,        "purchaseLimit": null,        "timesUsed": 0,        "status": "active",        "includesAllOffers": false,        "excludedOffers": [          "string"        ],        "currency": "AFN"      }    ],    "count": -1.7976931348623157e+308  }}