تخطَّ إلى المحتوى

الخصومات

1 عمليات

GET/discounts#

List discounts (read-only)

discounts:read

Requires the discounts:read scope. Discounts are read-only for apps: redemption accounting stays first-party, used_count is the app-visible redemption summary.

المعاملات

الاسمالنوعالوصف
cursorquerystring
limitqueryinteger
الافتراضي:50

الاستجابات

200

Discount page

الاسمالنوعالوصف
dataمطلوبDiscount[]
next_cursorمطلوبيقبل nullstring

Pass back as cursor to fetch the next page; null on the last page.

  • 401

    Missing, invalid, expired, or revoked token

  • 403

    Required live scope is missing

  • 429

    Token budget exhausted (180 requests/minute, 60 writes/minute per install)

الطلب
curl -X GET "https://dukkan.one/platform-api/v1/discounts?limit=50" \
  -H "Authorization: Bearer $DUKKAN_ACCESS_TOKEN"
الاستجابة
{
  "data": [
    {
      "id": "6f1d2c3b-4a59-4e8f-9b70-2d1c3e4f5a6b",
      "method": "code",
      "code": "invalid_request",
      "title": "Summer sale",
      "value_type": "percentage",
      "target": "order",
      "percent": 15,
      "amount": {
        "amount_minor": 275000,
        "currency": "SYP",
        "decimals": 0
      },
      "is_active": true,
      "usage_limit_total": 100,
      "used_count": 12,
      "applies_to_pos": true,
      "applies_to_online": true,
      "starts_at": "2026-08-18T16:00:00Z",
      "ends_at": "2026-08-18T16:00:00Z",
      "created_at": "2026-08-18T16:00:00Z",
      "updated_at": "2026-08-18T16:00:00Z"
    }
  ],
  "next_cursor": "eyJjcmVhdGVkX2F0IjoiMjAyNi0wOC0xOFQxNjowMDowMFoifQ"
}