Coupons

Get Coupons

Retrieves the coupons.

get/v1/shops/{shopId}/coupons

Request body

pageinteger

Page number.

perPageinteger

Items per page, 1-100. Must be at least 1. Must not be greater than 100.

orderColumn'id' | 'code' | 'discount' | 'uses' | 'start_date' | 'expiration_date' | 'last_used_at' | 'total_saved' | 'revenue_attributed'
orderDirection'asc' | 'desc'
codestring

Filter by coupon code.

idsinteger[]

Filter by coupon IDs.

statusesstring[]
type'percentage' | 'fixed'
globalboolean

Only global (all-products) coupons.

Example request

{
  "page": 1
}

Response

current_pageinteger
first_page_urlstring
frominteger
last_pageinteger
last_page_urlstring
next_page_urlstring
pathstring
per_pageinteger
prev_page_urlstring
tointeger
totalinteger

Example response

{
  "current_page": 1,
  "data": [
    {
      "id": 1,
      "shop_id": 1,
      "code": "SAVE10",
      "global": true,
      "discount": "10.00",
      "uses": 0,
      "max_uses": null,
      "max_uses_per_customer": null,
      "min_invoice_price": null,
      "allowed_emails": null,
      "disable_if_volume_discount": false,
      "type": "percentage",
      "start_date": null,
      "expiration_date": null,
      "uses_count_mode": "pending",
      "last_used_at": null,
      "total_saved": "0.00",
      "revenue_attributed": "0.00",
      "items": []
    }
  ],
  "first_page_url": "http://api.sellauth.test/v1/shops/1/coupons?page=1",
  "from": 1,
  "last_page": 1,
  "last_page_url": "http://api.sellauth.test/v1/shops/1/coupons?page=1",
  "links": [
    {
      "url": null,
      "label": "« Previous",
      "active": false
    },
    {
      "url": "http://api.sellauth.test/v1/shops/1/coupons?page=1",
      "label": "1",
      "active": true
    },
    {
      "url": null,
      "label": "Next »",
      "active": false
    }
  ],
  "next_page_url": null,
  "path": "http://api.sellauth.test/v1/shops/1/coupons",
  "per_page": 20,
  "prev_page_url": null,
  "to": 1,
  "total": 1
}

Changes

No recorded changes to this endpoint across all 1 revision of this API.