Skip to main content
GET
/
admin
/
discounts
할인 목록
curl --request GET \
  --url https://api.headlesscommerce.io/v1/admin/discounts \
  --header 'Authorization: Bearer <token>'
{
  "data": [
    {
      "id": "<string>",
      "name": "<string>",
      "description": "<string>",
      "code": "<string>",
      "type": "code",
      "value_type": "fixed",
      "value": 123,
      "target": "order",
      "usage_limit": 123,
      "usage_count": 123,
      "per_customer_limit": 123,
      "minimum_amount": {
        "amount": 123,
        "currency": "<string>"
      },
      "maximum_discount": {
        "amount": 123,
        "currency": "<string>"
      },
      "starts_at": "2023-11-07T05:31:56Z",
      "ends_at": "2023-11-07T05:31:56Z",
      "is_active": true,
      "conditions": [
        {
          "id": "<string>",
          "type": "product",
          "operator": "in",
          "values": [
            "<string>"
          ]
        }
      ],
      "metadata": {},
      "created_at": "2023-11-07T05:31:56Z"
    }
  ],
  "total_count": 123,
  "has_more": true,
  "next_cursor": "<string>"
}

Authorizations

Authorization
string
header
required

API Key. 예: sk_live_xxxxx 또는 pk_live_xxxxx

Query Parameters

limit
integer
default:20
Required range: 1 <= x <= 100
starting_after
string

이 ID 이후의 결과 반환 (cursor)

type
enum<string>
Available options:
code,
automatic
is_active
boolean

Response

200 - application/json

Success

data
object[]
total_count
integer

Admin API에서만 반환

has_more
boolean
next_cursor
string | null