Coupons

Retrieves the coupons.

get/v1/shops/{shopId}/coupons

Request

Request body

pageinteger nullable

Page number.

perPageinteger nullable

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' nullable
orderDirection'asc' | 'desc' nullable
codestring nullable

Filter by coupon code.

idsinteger[]

Filter by coupon IDs.

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

Only global (all-products) coupons.

Example request

{
  "page": 1
}

Response

current_pageinteger
first_page_urlstring
frominteger
last_pageinteger
last_page_urlstring
next_page_urlstring nullable
pathstring
per_pageinteger
prev_page_urlstring nullable
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",
      "page": null,
      "active": false
    },
    {
      "url": "http://api.sellauth.test/v1/shops/1/coupons?page=1",
      "label": "1",
      "page": 1,
      "active": true
    },
    {
      "url": null,
      "label": "Next »",
      "page": null,
      "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

    • breaking

      request property / was restricted to a list of enum values

    • breaking

      the response property // became nullable for the status

    • breaking

      the response property // became nullable for the status

    • breaking

      the response property // became nullable for the status

    • breaking

      the response property // became nullable for the status

    • breaking

      the response property // became nullable for the status

    • breaking

      the response property // became nullable for the status

    • breaking

      the response property // became nullable for the status

    • breaking

      the response property // became nullable for the status

    • breaking

      the response property became nullable for the status

    • breaking

      the response property became nullable for the status

    • info

      the request property became nullable

    • info

      the request property became nullable

    • info

      the request property became nullable

    • info

      the request property became nullable

    • info

      the request property became nullable

    • info

      the request property became nullable

    • info

      the request property became nullable

    • info

      added the new active enum value to the request property /

    • info

      added the new expired enum value to the request property /

    • info

      added the new scheduled enum value to the request property /

    • info

      added the new used_up enum value to the request property /

    • info

      added the optional property // to the response with the status