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

الكائنات

كل مخطط تعيده الواجهة أو تقبله، مع خصائصه ومثال مولَّد.

في هذه الصفحة

Error#

Every non-2xx response. 5xx bodies carry only internal_error and the request id.

الاسمالنوعالوصف
errorمطلوبobject
codeمطلوبstring

Stable machine code: invalid_request, unauthorized, forbidden, not_found, conflict, payload_too_large, rate_limited, internal_error, or a more specific code named on the operation.

messageمطلوبstring
request_idstring

Echo of X-Request-Id; quote it when reporting a problem.

detailsobject
مثال
{
  "error": {
    "code": "invalid_request",
    "message": "A human-readable explanation",
    "request_id": "req_01J8Z1K5X9",
    "details": {}
  }
}

Money#

Integer minor units plus the exponent that scales them. Never a float.

الاسمالنوعالوصف
amount_minorمطلوبinteger
currencyمطلوبstring
decimalsمطلوبinteger

Minor-unit exponent for THIS amount. Dukkan deviates from ISO 4217 (SYP is zero-decimal), so always scale by this field, never by an ISO currency table.

مثال
{
  "amount_minor": 275000,
  "currency": "SYP",
  "decimals": 0
}

OrderStatus#

Order lifecycle state. Transitions follow the server matrix; money-bearing states are reachable only through refunds.

القيم:placedapprovedprocessingshippeddelivereddelivered_failedreturnedcancelledcompletedpartially_refundedrefunded
مثال
"placed"

SettableOrderStatus#

Statuses an app may set through PATCH /orders/{id}/status. Money-bearing statuses are reachable only through refunds.

القيم:placedapprovedprocessingshippeddelivereddelivered_failedreturnedcancelled
مثال
"placed"

PaymentStatus#

Ledger-projected payment state. Independent of the delivery status: a delivered COD order is unpaid until the remittance is confirmed.

القيم:not_requiredunpaidpendingauthorizedpartially_paidpaidpartially_refundedrefundedfailed
مثال
"not_required"

WebhookTopic#

Webhook topic. Subscribing needs the read scope that governs the payload; app.uninstalled needs none and still delivers after revocation.

القيم:order.createdorder.status_changedorder.paidproduct.createdproduct.updatedproduct.deletedinventory.movement_createdfulfillment.requestedfulfillment.createdfulfillment.updatedrefund.createdapp.uninstalled
مثال
"order.created"

WebhookEnvelope#

Signed store event. Verify X-Dukkan-Hmac-Sha256 over {X-Dukkan-Timestamp}.{raw body} with the install's signing secret before parsing.

الاسمالنوعالوصف
idمطلوبstring

Event id. Deduplicate on this signed value, never on the delivery header.

api_versionمطلوب"v1"
topicمطلوبWebhookTopic

Webhook topic. Subscribing needs the read scope that governs the payload; app.uninstalled needs none and still delivers after revocation.

القيم:order.createdorder.status_changedorder.paidproduct.createdproduct.updatedproduct.deletedinventory.movement_createdfulfillment.requestedfulfillment.createdfulfillment.updatedrefund.createdapp.uninstalled
store_idمطلوبstring
install_idمطلوبstring

The install this delivery was fanned out to. Verify the signature with THIS install's secret and refuse a store mismatch.

sequenceمطلوبinteger

Strictly increasing per store with gaps. Order by it; never count on contiguity.

occurred_atمطلوبstring
testboolean

Present and true only for sandbox test deliveries (POST /webhooks/test). Absent in production traffic.

dataمطلوبobject
مثال
{
  "id": "6f1d2c3b-4a59-4e8f-9b70-2d1c3e4f5a6b",
  "api_version": "v1",
  "topic": "order.created",
  "store_id": "6f1d2c3b-4a59-4e8f-9b70-2d1c3e4f5a6b",
  "install_id": "6f1d2c3b-4a59-4e8f-9b70-2d1c3e4f5a6b",
  "sequence": 1661,
  "occurred_at": "2026-08-18T16:00:00Z",
  "test": true,
  "data": {}
}

Order#

PII-free order. Customer contact fields appear only on the detail endpoint with the clients:read scope.

الاسمالنوعالوصف
idمطلوبstring
order_numberمطلوبstring
statusمطلوبOrderStatus

Order lifecycle state. Transitions follow the server matrix; money-bearing states are reachable only through refunds.

القيم:placedapprovedprocessingshippeddelivereddelivered_failedreturnedcancelledcompletedpartially_refundedrefunded
payment_statusمطلوبPaymentStatus

Ledger-projected payment state. Independent of the delivery status: a delivered COD order is unpaid until the remittance is confirmed.

القيم:not_requiredunpaidpendingauthorizedpartially_paidpaidpartially_refundedrefundedfailed
sourceمطلوبيقبل nullstring

Sales channel that created the order (storefront, pos, admin, ...).

line_pricingمطلوبstring

How line totals relate to order totals. "gross": sum of line totals equals subtotal and the discount lives on the order. "net" (POS orders): line totals are net of the applied promo, so sum of line totals plus discount equals subtotal. Branch on this field when reconciling, never on source.

القيم:netgross
subtotalمطلوبMoney

Integer minor units plus the exponent that scales them. Never a float.

discountمطلوبMoney

Integer minor units plus the exponent that scales them. Never a float.

shippingمطلوبMoney

Integer minor units plus the exponent that scales them. Never a float.

taxمطلوبMoney

Integer minor units plus the exponent that scales them. Never a float.

totalمطلوبMoney

Integer minor units plus the exponent that scales them. Never a float.

paidمطلوبMoney

Integer minor units plus the exponent that scales them. Never a float.

refundedمطلوبMoney

Integer minor units plus the exponent that scales them. Never a float.

exchange_rateمطلوبيقبل nullobject

Snapshot of the rate applied when the order was priced in a non-store currency: rate = scaled / 10^scale.

scaledمطلوبinteger
scaleمطلوبinteger
tagsمطلوبstring[]

Merchant and app tags (see PATCH /orders/{id}).

created_atمطلوبstring
updated_atمطلوبstring
مثال
{
  "id": "6f1d2c3b-4a59-4e8f-9b70-2d1c3e4f5a6b",
  "order_number": "1042",
  "status": "placed",
  "payment_status": "not_required",
  "source": "online",
  "line_pricing": "net",
  "subtotal": {
    "amount_minor": 275000,
    "currency": "SYP",
    "decimals": 0
  },
  "discount": {
    "amount_minor": 275000,
    "currency": "SYP",
    "decimals": 0
  },
  "shipping": {
    "amount_minor": 275000,
    "currency": "SYP",
    "decimals": 0
  },
  "tax": {
    "amount_minor": 275000,
    "currency": "SYP",
    "decimals": 0
  },
  "total": {
    "amount_minor": 275000,
    "currency": "SYP",
    "decimals": 0
  },
  "paid": {
    "amount_minor": 275000,
    "currency": "SYP",
    "decimals": 0
  },
  "refunded": {
    "amount_minor": 275000,
    "currency": "SYP",
    "decimals": 0
  },
  "exchange_rate": {
    "scaled": 1300000,
    "scale": 4
  },
  "tags": [
    "string"
  ],
  "created_at": "2026-08-18T16:00:00Z",
  "updated_at": "2026-08-18T16:00:00Z"
}

OrderItem#

Immutable line snapshot.

الاسمالنوعالوصف
idمطلوبstring
variant_idمطلوبيقبل nullstring

Null for custom lines.

kindمطلوبstring

custom lines have no catalog link: they never touch inventory and refund by amount only.

القيم:variantcustom
nameمطلوبstring

Product name snapshot at order time.

quantityمطلوبinteger
unit_priceمطلوبMoney

Integer minor units plus the exponent that scales them. Never a float.

totalمطلوبMoney

Integer minor units plus the exponent that scales them. Never a float.

مثال
{
  "id": "6f1d2c3b-4a59-4e8f-9b70-2d1c3e4f5a6b",
  "variant_id": "6f1d2c3b-4a59-4e8f-9b70-2d1c3e4f5a6b",
  "kind": "variant",
  "name": "Olive oil 1 L",
  "quantity": 2,
  "unit_price": {
    "amount_minor": 275000,
    "currency": "SYP",
    "decimals": 0
  },
  "total": {
    "amount_minor": 275000,
    "currency": "SYP",
    "decimals": 0
  }
}

OrderCustomer#

Customer contact details. Requires the clients:read scope.

الاسمالنوعالوصف
first_nameمطلوبيقبل nullstring
last_nameمطلوبيقبل nullstring
emailمطلوبيقبل nullstring
phoneمطلوبيقبل nullstring
مثال
{
  "first_name": "string",
  "last_name": "string",
  "email": "string",
  "phone": "string"
}

FulfillmentLine#

الاسمالنوعالوصف
order_item_idمطلوبstring
quantityمطلوبinteger
مثال
{
  "order_item_id": "6f1d2c3b-4a59-4e8f-9b70-2d1c3e4f5a6b",
  "quantity": 2
}

Fulfillment#

A shipment covering some or all lines of an order.

الاسمالنوعالوصف
idمطلوبstring
providerمطلوبيقبل nullstring
tracking_numberمطلوبيقبل nullstring
statusمطلوبstring
القيم:pendingshippeddeliveredcancelled
created_atمطلوبstring
updated_atمطلوبstring
linesمطلوبFulfillmentLine[]
مثال
{
  "id": "6f1d2c3b-4a59-4e8f-9b70-2d1c3e4f5a6b",
  "provider": "Aramex",
  "tracking_number": "RX123456789SY",
  "status": "pending",
  "created_at": "2026-08-18T16:00:00Z",
  "updated_at": "2026-08-18T16:00:00Z",
  "lines": [
    {
      "order_item_id": "6f1d2c3b-4a59-4e8f-9b70-2d1c3e4f5a6b",
      "quantity": 2
    }
  ]
}

RefundLine#

الاسمالنوعالوصف
order_item_idمطلوبيقبل nullstring
quantityمطلوبinteger
amount_minorمطلوبinteger
مثال
{
  "order_item_id": "6f1d2c3b-4a59-4e8f-9b70-2d1c3e4f5a6b",
  "quantity": 2,
  "amount_minor": 275000
}

Refund#

An append-only refund against captured funds.

الاسمالنوعالوصف
idمطلوبstring
amountمطلوبMoney

Integer minor units plus the exponent that scales them. Never a float.

reasonمطلوبيقبل nullstring
created_atمطلوبstring
linesمطلوبRefundLine[]
مثال
{
  "id": "6f1d2c3b-4a59-4e8f-9b70-2d1c3e4f5a6b",
  "amount": {
    "amount_minor": 275000,
    "currency": "SYP",
    "decimals": 0
  },
  "reason": "correction",
  "created_at": "2026-08-18T16:00:00Z",
  "lines": [
    {
      "order_item_id": "6f1d2c3b-4a59-4e8f-9b70-2d1c3e4f5a6b",
      "quantity": 2,
      "amount_minor": 275000
    }
  ]
}

OrderReference#

Link from an order back to the app's own record.

الاسمالنوعالوصف
kindمطلوبstring

Record type in the app, e.g. quote.

numberمطلوبstring

Human-readable record number, e.g. Q-1042.

urlيقبل nullstring

Deep link into the app. Must be https on the app's registered origin; otherwise 422.

الافتراضي:null
مثال
{
  "kind": "string",
  "number": "string",
  "url": null
}

OrderAttributes#

Up to 20 keys ([a-z0-9_.-]{1,64}), scalar values up to 1000 UTF-8 bytes, 8192 bytes in total. Private to the calling app.

مثال
{}

OrderAttributesPatch#

Merged into the app's namespace; a null value deletes that key.

مثال
{}

OrderDetail#

Order with its immutable line snapshots and reconciliation collections.

الاسمالنوعالوصف
idمطلوبstring
order_numberمطلوبstring
statusمطلوبOrderStatus

Order lifecycle state. Transitions follow the server matrix; money-bearing states are reachable only through refunds.

القيم:placedapprovedprocessingshippeddelivereddelivered_failedreturnedcancelledcompletedpartially_refundedrefunded
payment_statusمطلوبPaymentStatus

Ledger-projected payment state. Independent of the delivery status: a delivered COD order is unpaid until the remittance is confirmed.

القيم:not_requiredunpaidpendingauthorizedpartially_paidpaidpartially_refundedrefundedfailed
sourceمطلوبيقبل nullstring

Sales channel that created the order (storefront, pos, admin, ...).

line_pricingمطلوبstring

How line totals relate to order totals. "gross": sum of line totals equals subtotal and the discount lives on the order. "net" (POS orders): line totals are net of the applied promo, so sum of line totals plus discount equals subtotal. Branch on this field when reconciling, never on source.

القيم:netgross
subtotalمطلوبMoney

Integer minor units plus the exponent that scales them. Never a float.

discountمطلوبMoney

Integer minor units plus the exponent that scales them. Never a float.

shippingمطلوبMoney

Integer minor units plus the exponent that scales them. Never a float.

taxمطلوبMoney

Integer minor units plus the exponent that scales them. Never a float.

totalمطلوبMoney

Integer minor units plus the exponent that scales them. Never a float.

paidمطلوبMoney

Integer minor units plus the exponent that scales them. Never a float.

refundedمطلوبMoney

Integer minor units plus the exponent that scales them. Never a float.

exchange_rateمطلوبيقبل nullobject

Snapshot of the rate applied when the order was priced in a non-store currency: rate = scaled / 10^scale.

scaledمطلوبinteger
scaleمطلوبinteger
tagsمطلوبstring[]

Merchant and app tags (see PATCH /orders/{id}).

created_atمطلوبstring
updated_atمطلوبstring
itemsمطلوبOrderItem[]
fulfillmentsمطلوبFulfillment[]
refundsمطلوبRefund[]
noteمطلوبيقبل nullstring

Order note (merchant or app).

attributesمطلوبOrderAttributes

The CALLING app's own attributes on this order. Other apps' namespaces are never returned.

customerOrderCustomer

Present only when the install holds the clients:read scope (customer-PII scope, DPA-gated). Absent entirely otherwise.

shipping_addressيقبل nullobject

Free-form delivery address snapshot. Present only with the clients:read scope; absent entirely otherwise. May be null when the order has no delivery address (e.g. POS sales).

مثال
{
  "id": "6f1d2c3b-4a59-4e8f-9b70-2d1c3e4f5a6b",
  "order_number": "1042",
  "status": "placed",
  "payment_status": "not_required",
  "source": "online",
  "line_pricing": "net",
  "subtotal": {
    "amount_minor": 275000,
    "currency": "SYP",
    "decimals": 0
  },
  "discount": {
    "amount_minor": 275000,
    "currency": "SYP",
    "decimals": 0
  },
  "shipping": {
    "amount_minor": 275000,
    "currency": "SYP",
    "decimals": 0
  },
  "tax": {
    "amount_minor": 275000,
    "currency": "SYP",
    "decimals": 0
  },
  "total": {
    "amount_minor": 275000,
    "currency": "SYP",
    "decimals": 0
  },
  "paid": {
    "amount_minor": 275000,
    "currency": "SYP",
    "decimals": 0
  },
  "refunded": {
    "amount_minor": 275000,
    "currency": "SYP",
    "decimals": 0
  },
  "exchange_rate": {
    "scaled": 1300000,
    "scale": 4
  },
  "tags": [
    "string"
  ],
  "created_at": "2026-08-18T16:00:00Z",
  "updated_at": "2026-08-18T16:00:00Z",
  "items": [
    {
      "id": "6f1d2c3b-4a59-4e8f-9b70-2d1c3e4f5a6b",
      "variant_id": "6f1d2c3b-4a59-4e8f-9b70-2d1c3e4f5a6b",
      "kind": "variant",
      "name": "Olive oil 1 L",
      "quantity": 2,
      "unit_price": {
        "amount_minor": 275000,
        "currency": "SYP",
        "decimals": 0
      },
      "total": {
        "amount_minor": 275000,
        "currency": "SYP",
        "decimals": 0
      }
    }
  ],
  "fulfillments": [
    {
      "id": "6f1d2c3b-4a59-4e8f-9b70-2d1c3e4f5a6b",
      "provider": "Aramex",
      "tracking_number": "RX123456789SY",
      "status": "pending",
      "created_at": "2026-08-18T16:00:00Z",
      "updated_at": "2026-08-18T16:00:00Z",
      "lines": [
        {
          "order_item_id": "6f1d2c3b-4a59-4e8f-9b70-2d1c3e4f5a6b",
          "quantity": 2
        }
      ]
    }
  ],
  "refunds": [
    {
      "id": "6f1d2c3b-4a59-4e8f-9b70-2d1c3e4f5a6b",
      "amount": {
        "amount_minor": 275000,
        "currency": "SYP",
        "decimals": 0
      },
      "reason": "correction",
      "created_at": "2026-08-18T16:00:00Z",
      "lines": [
        {
          "order_item_id": "6f1d2c3b-4a59-4e8f-9b70-2d1c3e4f5a6b",
          "quantity": 2,
          "amount_minor": 275000
        }
      ]
    }
  ],
  "note": "Stock count 2026-08-18",
  "attributes": {},
  "customer": {
    "first_name": "string",
    "last_name": "string",
    "email": "string",
    "phone": "string"
  },
  "shipping_address": {}
}

Variant#

الاسمالنوعالوصف
idمطلوبstring
product_idمطلوبstring
skuمطلوبيقبل nullstring
priceمطلوبMoney

Integer minor units plus the exponent that scales them. Never a float.

statusمطلوبstring
nameمطلوبstring

Variant label (e.g. أحمر / L).

attributesمطلوبobject

Option name → value, e.g. { color: 'أحمر', size: 'L' }.

barcodeمطلوبيقبل nullstring
compare_at_priceمطلوبيقبل nullMoney

Higher strike-through price when set.

image_urlمطلوبيقبل nullstring

Main image for this variant (own image, else the product's).

weight_gramمطلوبيقبل nullinteger
available_quantityمطلوبيقبل nullinteger

Stock minus reservations across the store's locations. Null when the product is not inventory-managed or the install lacks inventory:read.

مثال
{
  "id": "6f1d2c3b-4a59-4e8f-9b70-2d1c3e4f5a6b",
  "product_id": "6f1d2c3b-4a59-4e8f-9b70-2d1c3e4f5a6b",
  "sku": "OIL-1L",
  "price": {
    "amount_minor": 275000,
    "currency": "SYP",
    "decimals": 0
  },
  "status": "placed",
  "name": "Olive oil 1 L",
  "attributes": {},
  "barcode": "string",
  "compare_at_price": {
    "amount_minor": 275000,
    "currency": "SYP",
    "decimals": 0
  },
  "image_url": "string",
  "weight_gram": 1,
  "available_quantity": 1
}

VariantDetail#

Variant with its product's name and status (GET /products/variants).

الاسمالنوعالوصف
idمطلوبstring
product_idمطلوبstring
skuمطلوبيقبل nullstring
priceمطلوبMoney

Integer minor units plus the exponent that scales them. Never a float.

statusمطلوبstring
nameمطلوبstring

Variant label (e.g. أحمر / L).

attributesمطلوبobject

Option name → value, e.g. { color: 'أحمر', size: 'L' }.

barcodeمطلوبيقبل nullstring
compare_at_priceمطلوبيقبل nullMoney

Higher strike-through price when set.

image_urlمطلوبيقبل nullstring

Main image for this variant (own image, else the product's).

weight_gramمطلوبيقبل nullinteger
available_quantityمطلوبيقبل nullinteger

Stock minus reservations across the store's locations. Null when the product is not inventory-managed or the install lacks inventory:read.

product_nameمطلوبstring
product_statusمطلوبstring
مثال
{
  "id": "6f1d2c3b-4a59-4e8f-9b70-2d1c3e4f5a6b",
  "product_id": "6f1d2c3b-4a59-4e8f-9b70-2d1c3e4f5a6b",
  "sku": "OIL-1L",
  "price": {
    "amount_minor": 275000,
    "currency": "SYP",
    "decimals": 0
  },
  "status": "placed",
  "name": "Olive oil 1 L",
  "attributes": {},
  "barcode": "string",
  "compare_at_price": {
    "amount_minor": 275000,
    "currency": "SYP",
    "decimals": 0
  },
  "image_url": "string",
  "weight_gram": 1,
  "available_quantity": 1,
  "product_name": "string",
  "product_status": "string"
}

VariantList#

Batch variant lookup. Unknown ids are omitted, never errors.

الاسمالنوعالوصف
dataمطلوبVariantDetail[]
مثال
{
  "data": [
    {
      "id": "6f1d2c3b-4a59-4e8f-9b70-2d1c3e4f5a6b",
      "product_id": "6f1d2c3b-4a59-4e8f-9b70-2d1c3e4f5a6b",
      "sku": "OIL-1L",
      "price": {
        "amount_minor": 275000,
        "currency": "SYP",
        "decimals": 0
      },
      "status": "placed",
      "name": "Olive oil 1 L",
      "attributes": {},
      "barcode": "string",
      "compare_at_price": {
        "amount_minor": 275000,
        "currency": "SYP",
        "decimals": 0
      },
      "image_url": "string",
      "weight_gram": 1,
      "available_quantity": 1,
      "product_name": "string",
      "product_status": "string"
    }
  ]
}

ProductCategory#

الاسمالنوعالوصف
idمطلوبstring
nameمطلوبstring
مثال
{
  "id": "6f1d2c3b-4a59-4e8f-9b70-2d1c3e4f5a6b",
  "name": "Olive oil 1 L"
}

Product#

الاسمالنوعالوصف
idمطلوبstring
dsinمطلوبstring

Dukkan store item number: the merchant-facing product code.

nameمطلوبstring
statusمطلوبstring
updated_atمطلوبيقبل nullstring
image_urlمطلوبيقبل nullstring

Main product image.

image_colorمطلوبيقبل nullstring

Dominant colour of the main image (#rrggbb) for placeholders.

brandمطلوبيقبل nullstring
categoryمطلوبيقبل nullProductCategory
descriptionمطلوبيقبل nullstring

Plain text, at most 500 characters.

imagesstring[]

Gallery, present on GET /products/{id} only.

variantsمطلوبVariant[]
مثال
{
  "id": "6f1d2c3b-4a59-4e8f-9b70-2d1c3e4f5a6b",
  "dsin": "D7Q2K9",
  "name": "Olive oil 1 L",
  "status": "placed",
  "updated_at": "2026-08-18T16:00:00Z",
  "image_url": "string",
  "image_color": "string",
  "brand": "string",
  "category": {
    "id": "6f1d2c3b-4a59-4e8f-9b70-2d1c3e4f5a6b",
    "name": "Olive oil 1 L"
  },
  "description": "string",
  "images": [
    "string"
  ],
  "variants": [
    {
      "id": "6f1d2c3b-4a59-4e8f-9b70-2d1c3e4f5a6b",
      "product_id": "6f1d2c3b-4a59-4e8f-9b70-2d1c3e4f5a6b",
      "sku": "OIL-1L",
      "price": {
        "amount_minor": 275000,
        "currency": "SYP",
        "decimals": 0
      },
      "status": "placed",
      "name": "Olive oil 1 L",
      "attributes": {},
      "barcode": "string",
      "compare_at_price": {
        "amount_minor": 275000,
        "currency": "SYP",
        "decimals": 0
      },
      "image_url": "string",
      "weight_gram": 1,
      "available_quantity": 1
    }
  ]
}

Store#

Public identity and checkout facts of the token's store.

الاسمالنوعالوصف
idمطلوبstring
slugمطلوبstring
nameمطلوبstring
descriptionمطلوبيقبل nullstring
logo_urlمطلوبيقبل nullstring
banner_urlsمطلوبstring[]
storefront_urlمطلوبstring

Public https origin; a connected custom domain wins over the platform subdomain.

whatsapp_numberمطلوبيقبل nullstring
phoneمطلوبيقبل nullstring
addressمطلوبيقبل nullstring
accent_colorمطلوبيقبل nullstring

Published theme accent, or the store's primary colour.

localeمطلوبstring
timezoneمطلوبstring
countryمطلوبيقبل nullstring
pricing_currencyمطلوبobject

The currency catalog prices are stored in.

codeمطلوبstring
decimalsمطلوبinteger
storefront_currenciesمطلوبobject

Currencies a customer may pay in; POST /orders accepts these only.

allowedمطلوبstring[]
defaultمطلوبstring
fxمطلوبيقبل nullobject

Store-adjusted rates from the pricing currency, exactly what checkout applies; includes the base at identity. Null when no rate table is available.

baseمطلوبstring
as_ofمطلوبstring
ratesمطلوبobject
payment_methodsمطلوبobject[]

Enabled manual payment methods.

idمطلوبstring
القيم:codshamcash_manual
shamcash_idstring

Present for shamcash_manual: the pay-to id shown at checkout.

provincesمطلوبobject[]

Accepted shipping_address.province values with labels.

valueمطلوبstring
arمطلوبstring
enمطلوبstring
مثال
{
  "id": "6f1d2c3b-4a59-4e8f-9b70-2d1c3e4f5a6b",
  "slug": "string",
  "name": "Olive oil 1 L",
  "description": "string",
  "logo_url": "string",
  "banner_urls": [
    "string"
  ],
  "storefront_url": "string",
  "whatsapp_number": "string",
  "phone": "string",
  "address": "string",
  "accent_color": "string",
  "locale": "string",
  "timezone": "string",
  "country": "string",
  "pricing_currency": {
    "code": "invalid_request",
    "decimals": 0
  },
  "storefront_currencies": {
    "allowed": [
      "string"
    ],
    "default": "string"
  },
  "fx": {
    "base": "string",
    "as_of": "2026-08-18T16:00:00Z",
    "rates": {}
  },
  "payment_methods": [
    {
      "id": "cod",
      "shamcash_id": "6f1d2c3b-4a59-4e8f-9b70-2d1c3e4f5a6b"
    }
  ],
  "provinces": [
    {
      "value": "string",
      "ar": "string",
      "en": "string"
    }
  ]
}

Discount#

Read-only view of a discount. Redemption accounting stays first-party.

الاسمالنوعالوصف
idمطلوبstring
methodمطلوبstring
القيم:codeautomatic
codeمطلوبيقبل nullstring
titleمطلوبيقبل nullstring
value_typeمطلوبstring
القيم:percentagefixed_amountfree_shippingbuy_x_get_y
targetمطلوبstring
القيم:orderproductscategories
percentمطلوبيقبل nullnumber

Set only for percentage discounts; amount only for fixed_amount.

amountمطلوبيقبل nullMoney

Integer minor units plus the exponent that scales them. Never a float.

is_activeمطلوبboolean
usage_limit_totalمطلوبيقبل nullinteger
used_countمطلوبinteger
applies_to_posمطلوبboolean
applies_to_onlineمطلوبboolean
starts_atمطلوبيقبل nullstring
ends_atمطلوبيقبل nullstring
created_atمطلوبstring
updated_atمطلوبيقبل nullstring
مثال
{
  "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"
}

Movement#

One append-only stock movement.

الاسمالنوعالوصف
idمطلوبstring
sequenceمطلوبinteger

Monotonic insert sequence; the stable sort key for what happened in which order.

variant_idمطلوبيقبل nullstring
location_idمطلوبstring
deltaمطلوبinteger
stock_afterمطلوبinteger
reasonمطلوبstring
occurred_atمطلوبstring
مثال
{
  "id": "6f1d2c3b-4a59-4e8f-9b70-2d1c3e4f5a6b",
  "sequence": 1661,
  "variant_id": "6f1d2c3b-4a59-4e8f-9b70-2d1c3e4f5a6b",
  "location_id": "6f1d2c3b-4a59-4e8f-9b70-2d1c3e4f5a6b",
  "delta": -2,
  "stock_after": 38,
  "reason": "correction",
  "occurred_at": "2026-08-18T16:00:00Z"
}

WebhookSubscription#

One subscription per install; PUT is a full replace.

الاسمالنوعالوصف
idمطلوبstring
endpoint_urlمطلوبstring
topicsمطلوبWebhookTopic[]
statusمطلوبstring

disabled = quarantined after sustained delivery failures; re-PUT the subscription to resume.

القيم:activedisabled
consecutive_failuresمطلوبinteger
activated_atمطلوبstring

Events that occurred before this instant are never delivered to this subscription.

disabled_atمطلوبيقبل nullstring
secretstring

Present only on the PUT response that minted or rotated it. Store it immediately; it can never be read back.

مثال
{
  "id": "6f1d2c3b-4a59-4e8f-9b70-2d1c3e4f5a6b",
  "endpoint_url": "string",
  "topics": [
    "order.created"
  ],
  "status": "active",
  "consecutive_failures": 1,
  "activated_at": "2026-08-18T16:00:00Z",
  "disabled_at": "2026-08-18T16:00:00Z",
  "secret": "string"
}

Installation#

The install and the store it is bound to, as the platform sees them.

الاسمالنوعالوصف
installمطلوبobject
idمطلوبstring
app_idمطلوبstring
statusمطلوبstring

A token only resolves for an active install; suspended is reserved for billing holds surfaced through this document.

القيم:activesuspended
granted_scopesمطلوبstring[]

Scopes the merchant consented to.

effective_scopesمطلوبstring[]

Granted scopes intersected with the grantor's live permissions. This is what every request is checked against.

distribution_channelمطلوبstring
القيم:developmentprivatepublic
installed_atمطلوبstring
api_versionمطلوبstring

Dated v1 revision this server speaks (same value as X-Dukkan-Api-Version).

webhookمطلوبيقبل nullobject

The active subscription, or null when none is configured.

idمطلوبstring
endpoint_urlمطلوبstring
topicsمطلوبWebhookTopic[]
statusمطلوبstring

disabled = quarantined after sustained delivery failures; re-PUT the subscription to resume.

القيم:activedisabled
consecutive_failuresمطلوبinteger
activated_atمطلوبstring

Events that occurred before this instant are never delivered to this subscription.

disabled_atمطلوبيقبل nullstring
storeمطلوبobject
idمطلوبstring
slugمطلوبstring
nameمطلوبstring
currencyمطلوبstring
decimalsمطلوبinteger

Minor-unit exponent of the store currency.

localeمطلوبstring

Storefront locale (ar or en).

timezoneمطلوبstring

IANA zone derived from the store country; use it for day boundaries in reports.

countryمطلوبيقبل nullstring

ISO 3166-1 alpha-2 when the merchant set one.

is_developmentمطلوبboolean

True for sandbox stores. Test deliveries and dev sessions exist only here.

مثال
{
  "install": {
    "id": "6f1d2c3b-4a59-4e8f-9b70-2d1c3e4f5a6b",
    "app_id": "6f1d2c3b-4a59-4e8f-9b70-2d1c3e4f5a6b",
    "status": "active",
    "granted_scopes": [
      "string"
    ],
    "effective_scopes": [
      "string"
    ],
    "distribution_channel": "development",
    "installed_at": "2026-08-18T16:00:00Z",
    "api_version": "string",
    "webhook": {
      "id": "6f1d2c3b-4a59-4e8f-9b70-2d1c3e4f5a6b",
      "endpoint_url": "string",
      "topics": [
        "order.created"
      ],
      "status": "active",
      "consecutive_failures": 1,
      "activated_at": "2026-08-18T16:00:00Z",
      "disabled_at": "2026-08-18T16:00:00Z"
    }
  },
  "store": {
    "id": "6f1d2c3b-4a59-4e8f-9b70-2d1c3e4f5a6b",
    "slug": "string",
    "name": "Olive oil 1 L",
    "currency": "SYP",
    "decimals": 0,
    "locale": "string",
    "timezone": "string",
    "country": "string",
    "is_development": true
  }
}

WebhookTestEvent#

The accepted test event and its queued deliveries.

الاسمالنوعالوصف
event_idمطلوبstring
topicمطلوبWebhookTopic

Webhook topic. Subscribing needs the read scope that governs the payload; app.uninstalled needs none and still delivers after revocation.

القيم:order.createdorder.status_changedorder.paidproduct.createdproduct.updatedproduct.deletedinventory.movement_createdfulfillment.requestedfulfillment.createdfulfillment.updatedrefund.createdapp.uninstalled
sequenceمطلوبinteger
occurred_atمطلوبstring
testمطلوب"true"
dataمطلوبobject

The payload that was written, after overrides and validation.

deliveriesمطلوبobject[]

One row per subscription the event fanned out to; the worker sends within about a minute.

idمطلوبstring

Delivery id; also sent as X-Dukkan-Delivery-Id.

statusمطلوبstring
القيم:pendingdeliveringretry_scheduledsucceededdead
endpoint_urlمطلوبstring
مثال
{
  "event_id": "6f1d2c3b-4a59-4e8f-9b70-2d1c3e4f5a6b",
  "topic": "order.created",
  "sequence": 1661,
  "occurred_at": "2026-08-18T16:00:00Z",
  "test": true,
  "data": {},
  "deliveries": [
    {
      "id": "6f1d2c3b-4a59-4e8f-9b70-2d1c3e4f5a6b",
      "status": "pending",
      "endpoint_url": "string"
    }
  ]
}

OrderPage#

Cursor page of PII-free orders.

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

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

مثال
{
  "data": [
    {
      "id": "6f1d2c3b-4a59-4e8f-9b70-2d1c3e4f5a6b",
      "order_number": "1042",
      "status": "placed",
      "payment_status": "not_required",
      "source": "online",
      "line_pricing": "net",
      "subtotal": {
        "amount_minor": 275000,
        "currency": "SYP",
        "decimals": 0
      },
      "discount": {
        "amount_minor": 275000,
        "currency": "SYP",
        "decimals": 0
      },
      "shipping": {
        "amount_minor": 275000,
        "currency": "SYP",
        "decimals": 0
      },
      "tax": {
        "amount_minor": 275000,
        "currency": "SYP",
        "decimals": 0
      },
      "total": {
        "amount_minor": 275000,
        "currency": "SYP",
        "decimals": 0
      },
      "paid": {
        "amount_minor": 275000,
        "currency": "SYP",
        "decimals": 0
      },
      "refunded": {
        "amount_minor": 275000,
        "currency": "SYP",
        "decimals": 0
      },
      "exchange_rate": {
        "scaled": 1300000,
        "scale": 4
      },
      "tags": [
        "string"
      ],
      "created_at": "2026-08-18T16:00:00Z",
      "updated_at": "2026-08-18T16:00:00Z"
    }
  ],
  "next_cursor": "eyJjcmVhdGVkX2F0IjoiMjAyNi0wOC0xOFQxNjowMDowMFoifQ"
}

ProductPage#

Cursor page of products with variants.

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

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

مثال
{
  "data": [
    {
      "id": "6f1d2c3b-4a59-4e8f-9b70-2d1c3e4f5a6b",
      "dsin": "D7Q2K9",
      "name": "Olive oil 1 L",
      "status": "placed",
      "updated_at": "2026-08-18T16:00:00Z",
      "image_url": "string",
      "image_color": "string",
      "brand": "string",
      "category": {
        "id": "6f1d2c3b-4a59-4e8f-9b70-2d1c3e4f5a6b",
        "name": "Olive oil 1 L"
      },
      "description": "string",
      "images": [
        "string"
      ],
      "variants": [
        {
          "id": "6f1d2c3b-4a59-4e8f-9b70-2d1c3e4f5a6b",
          "product_id": "6f1d2c3b-4a59-4e8f-9b70-2d1c3e4f5a6b",
          "sku": "OIL-1L",
          "price": {
            "amount_minor": 275000,
            "currency": "SYP",
            "decimals": 0
          },
          "status": "placed",
          "name": "Olive oil 1 L",
          "attributes": {},
          "barcode": "string",
          "compare_at_price": {
            "amount_minor": 275000,
            "currency": "SYP",
            "decimals": 0
          },
          "image_url": "string",
          "weight_gram": 1,
          "available_quantity": 1
        }
      ]
    }
  ],
  "next_cursor": "eyJjcmVhdGVkX2F0IjoiMjAyNi0wOC0xOFQxNjowMDowMFoifQ"
}

DiscountPage#

Cursor page of discounts.

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

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

مثال
{
  "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"
}

MovementPage#

Cursor page of append-only inventory movements.

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

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

مثال
{
  "data": [
    {
      "id": "6f1d2c3b-4a59-4e8f-9b70-2d1c3e4f5a6b",
      "sequence": 1661,
      "variant_id": "6f1d2c3b-4a59-4e8f-9b70-2d1c3e4f5a6b",
      "location_id": "6f1d2c3b-4a59-4e8f-9b70-2d1c3e4f5a6b",
      "delta": -2,
      "stock_after": 38,
      "reason": "correction",
      "occurred_at": "2026-08-18T16:00:00Z"
    }
  ],
  "next_cursor": "eyJjcmVhdGVkX2F0IjoiMjAyNi0wOC0xOFQxNjowMDowMFoifQ"
}

CreateOrderItem#

One order line with the price the merchant agreed.

الاسمالنوعالوصف
variant_idمطلوبيقبل nullstring

Catalog variant, or null for a custom line.

namestring

Line label. Required when variant_id is null; ignored otherwise (the catalog name is snapshotted).

quantityمطلوبinteger
unit_price_minorمطلوبinteger

Agreed unit price in minor units of the order currency. Zero is allowed.

مثال
{
  "variant_id": "6f1d2c3b-4a59-4e8f-9b70-2d1c3e4f5a6b",
  "name": "Olive oil 1 L",
  "quantity": 2,
  "unit_price_minor": 1
}

CreateOrderRequest#

Create an order with app-set prices. Totals are recomputed server-side: subtotal = Σ quantity × unit_price_minor, total = subtotal − discount + shipping, tax 0.

الاسمالنوعالوصف
currencyمطلوبstring

One of the store's allowed storefront currencies; otherwise 422 currency_not_allowed.

statusstring

placed (default) lets the merchant review; approved records an explicit customer acceptance the app collected.

القيم:placedapproved
الافتراضي:"placed"
itemsمطلوبCreateOrderItem[]
discountيقبل nullobject

Order-level discount; must not exceed the sum of the lines.

الافتراضي:null
amount_minorمطلوبinteger
titleيقبل nullstring
الافتراضي:null
shippingمطلوبobject
amount_minorمطلوبinteger
methodمطلوبstring
القيم:deliverypickup
customerمطلوبobject
nameمطلوبstring
phoneمطلوبstring

Full international number with country code; stored normalised.

emailيقبل nullstring

Optional. Never invented when absent.

الافتراضي:null
shipping_addressيقبل nullobject

Required when shipping.method is delivery.

الافتراضي:null
addressمطلوبstring
provinceمطلوبstring

Syrian province value, e.g. damascus (see GET /store provinces).

cityيقبل nullstring
الافتراضي:null
notesيقبل nullstring
الافتراضي:null
payment_methodمطلوبstring

Must be enabled in the store; otherwise 409 payment_method_disabled.

القيم:codshamcash_manual
exchange_rateيقبل nullobject

Required when currency differs from the store's pricing currency, forbidden otherwise. rate = scaled / 10^scale, oriented 1 pricing-currency unit = rate order-currency units (same as GET /store fx).

الافتراضي:null
scaledمطلوبinteger
scaleمطلوبinteger
noteيقبل nullstring
الافتراضي:null
tagsstring[]

At most 10 tags after case-insensitive dedupe.

attributesOrderAttributes

Up to 20 keys ([a-z0-9_.-]{1,64}), scalar values up to 1000 UTF-8 bytes, 8192 bytes in total. Private to the calling app.

الافتراضي:{}
inventorystring
القيم:decrementskip
الافتراضي:"decrement"
مثال
{
  "currency": "SYP",
  "status": "placed",
  "items": [
    {
      "variant_id": "6f1d2c3b-4a59-4e8f-9b70-2d1c3e4f5a6b",
      "name": "Olive oil 1 L",
      "quantity": 2,
      "unit_price_minor": 1
    }
  ],
  "discount": {
    "amount_minor": 275000,
    "title": null
  },
  "shipping": {
    "amount_minor": 275000,
    "method": "delivery"
  },
  "customer": {
    "name": "Olive oil 1 L",
    "phone": "string",
    "email": null
  },
  "shipping_address": {
    "address": "string",
    "province": "string",
    "city": null,
    "notes": null
  },
  "payment_method": "cod",
  "exchange_rate": {
    "scaled": 1300000,
    "scale": 4
  },
  "note": null,
  "tags": [
    "string"
  ],
  "attributes": {},
  "inventory": "decrement"
}

UpdateOrderRequest#

Update the note, add/remove tags, or merge the app's own attributes. Money, lines, customer and address are immutable after creation.

الاسمالنوعالوصف
noteيقبل nullstring

Replace the order note; null clears it.

tagsobject

Set operations, never a replace: the merchant's and other apps' tags survive.

addstring[]

At most 10 tags after case-insensitive dedupe.

removestring[]

Removed case-insensitively.

attributesOrderAttributesPatch

Merged into the app's namespace; a null value deletes that key.

مثال
{
  "note": "Stock count 2026-08-18",
  "tags": {
    "add": [
      "string"
    ],
    "remove": [
      "string"
    ]
  },
  "attributes": {}
}

UpdateOrderStatusRequest#

Transition an order through the server matrix.

الاسمالنوعالوصف
statusمطلوبSettableOrderStatus

Statuses an app may set through PATCH /orders/{id}/status. Money-bearing statuses are reachable only through refunds.

القيم:placedapprovedprocessingshippeddelivereddelivered_failedreturnedcancelled
مثال
{
  "status": "placed"
}

CreateFulfillmentRequest#

Fulfill selected line quantities. Each order item may appear once.

الاسمالنوعالوصف
providerيقبل nullstring
tracking_numberيقبل nullstring
statusstring

"pending" reserves the quantities without auto-shipping the order (carrier booked, pickup not yet made); move to "shipped" via PATCH when the parcel leaves.

القيم:pendingshipped
الافتراضي:"shipped"
linesمطلوبobject[]
order_item_idمطلوبstring
quantityمطلوبinteger
مثال
{
  "provider": "Aramex",
  "tracking_number": "RX123456789SY",
  "status": "shipped",
  "lines": [
    {
      "order_item_id": "6f1d2c3b-4a59-4e8f-9b70-2d1c3e4f5a6b",
      "quantity": 2
    }
  ]
}

UpdateFulfillmentRequest#

Update tracking, mark delivered, cancel, or propose a COD remittance. At least one field is required.

الاسمالنوعالوصف
tracking_numberيقبل nullstring
statusstring
القيم:shippeddeliveredcancelled
cod_collected_minorinteger

COD remittance PROPOSAL: the cash the courier reports collecting (minor units; may be less than the order total). Moves no money. The merchant confirms in admin, and that confirmation writes the cod_collection ledger row which updates payment status and fires order.paid. One open proposal per order; re-sending updates it.

cod_collected_notestring
مثال
{
  "tracking_number": "RX123456789SY",
  "status": "shipped",
  "cod_collected_minor": 275000,
  "cod_collected_note": "string"
}

CreateRefundRequest#

Append a refund against captured funds.

الاسمالنوعالوصف
amount_minorمطلوبinteger
currencystring

Optional confirmation guard; 409 when it differs from the order's currency.

reasonيقبل nullstring
linesobject[]

Optional line breakdown; amounts must sum to amount_minor.

order_item_idمطلوبstring
quantityمطلوبinteger
amount_minorمطلوبinteger
restockobject

Return the refunded quantities to stock. Requires lines and the inventory:write scope. Untracked products are skipped.

location_idمطلوبstring
مثال
{
  "amount_minor": 275000,
  "currency": "SYP",
  "reason": "correction",
  "lines": [
    {
      "order_item_id": "6f1d2c3b-4a59-4e8f-9b70-2d1c3e4f5a6b",
      "quantity": 2,
      "amount_minor": 275000
    }
  ],
  "restock": {
    "location_id": "6f1d2c3b-4a59-4e8f-9b70-2d1c3e4f5a6b"
  }
}

CreateInventoryMovementRequest#

Append an inventory movement.

الاسمالنوعالوصف
variant_idمطلوبstring
location_idمطلوبstring
deltaمطلوبinteger

Signed quantity change. Absolute stock writes are forbidden.

reasonمطلوبstring
القيم:correctioninitialreturndamage
noteيقبل nullstring
مثال
{
  "variant_id": "6f1d2c3b-4a59-4e8f-9b70-2d1c3e4f5a6b",
  "location_id": "6f1d2c3b-4a59-4e8f-9b70-2d1c3e4f5a6b",
  "delta": -2,
  "reason": "correction",
  "note": "Stock count 2026-08-18"
}

UpsertWebhookSubscriptionRequest#

Create or replace the install's single subscription.

الاسمالنوعالوصف
endpoint_urlمطلوبstring

Public HTTPS URL. Private, loopback and IP-literal hosts are refused.

topicsمطلوبWebhookTopic[]
rotate_secretboolean

Mint a new signing secret and return it once in the response.

مثال
{
  "endpoint_url": "https://app.example.com/webhooks/dukkan",
  "topics": [
    "order.created"
  ],
  "rotate_secret": false
}

CreateWebhookTestEventRequest#

Fire one signed test delivery (sandbox stores only).

الاسمالنوعالوصف
topicمطلوبWebhookTopic

Webhook topic. Subscribing needs the read scope that governs the payload; app.uninstalled needs none and still delivers after revocation.

القيم:order.createdorder.status_changedorder.paidproduct.createdproduct.updatedproduct.deletedinventory.movement_createdfulfillment.requestedfulfillment.createdfulfillment.updatedrefund.createdapp.uninstalled
dataobject

Optional overrides merged over the platform-built sample payload for the topic (at most 16 KB).

مثال
{
  "topic": "order.created",
  "data": {}
}

OrderCreatedEventData#

الاسمالنوعالوصف
order_idمطلوبstring
order_numberمطلوبstring
statusمطلوبstring

Order status at creation (usually placed).

total_minorمطلوبinteger

Integer minor units of currency (scale by the store's decimals).

currencyمطلوبstring
sourceيقبل nullstring

Sales channel (storefront, pos, admin, app). Emitted since revision 2026-09-10.

مثال
{
  "order_id": "6f1d2c3b-4a59-4e8f-9b70-2d1c3e4f5a6b",
  "order_number": "1042",
  "status": "placed",
  "total_minor": 1,
  "currency": "SYP",
  "source": "online"
}

OrderStatusChangedEventData#

الاسمالنوعالوصف
order_idمطلوبstring
from_statusمطلوبstring
statusمطلوبstring

The status the order moved to.

مثال
{
  "order_id": "6f1d2c3b-4a59-4e8f-9b70-2d1c3e4f5a6b",
  "from_status": "string",
  "status": "placed"
}

OrderPaidEventData#

Fires when captured funds reach the order total, from the payments ledger only. COD orders reach it when the merchant confirms the courier's remittance, never on delivery.

الاسمالنوعالوصف
order_idمطلوبstring
amount_minorمطلوبinteger

Captured funds at the moment they crossed the order total.

currencyمطلوبstring
مثال
{
  "order_id": "6f1d2c3b-4a59-4e8f-9b70-2d1c3e4f5a6b",
  "amount_minor": 275000,
  "currency": "SYP"
}

ProductCreatedEventData#

الاسمالنوعالوصف
product_idمطلوبstring
مثال
{
  "product_id": "6f1d2c3b-4a59-4e8f-9b70-2d1c3e4f5a6b"
}

ProductUpdatedEventData#

الاسمالنوعالوصف
product_idمطلوبstring
variant_idstring

Set when a variant row changed rather than the product itself.

operationstring

Present on variant changes: which write on the variant fired the event.

القيم:insertupdatedelete
مثال
{
  "product_id": "6f1d2c3b-4a59-4e8f-9b70-2d1c3e4f5a6b",
  "variant_id": "6f1d2c3b-4a59-4e8f-9b70-2d1c3e4f5a6b",
  "operation": "insert"
}

ProductDeletedEventData#

الاسمالنوعالوصف
product_idمطلوبstring
مثال
{
  "product_id": "6f1d2c3b-4a59-4e8f-9b70-2d1c3e4f5a6b"
}

InventoryMovementCreatedEventData#

الاسمالنوعالوصف
movement_idمطلوبstring
variant_idمطلوبيقبل nullstring
location_idمطلوبstring
deltaمطلوبinteger
stock_afterمطلوبinteger
reasonمطلوبstring
مثال
{
  "movement_id": "6f1d2c3b-4a59-4e8f-9b70-2d1c3e4f5a6b",
  "variant_id": "6f1d2c3b-4a59-4e8f-9b70-2d1c3e4f5a6b",
  "location_id": "6f1d2c3b-4a59-4e8f-9b70-2d1c3e4f5a6b",
  "delta": -2,
  "stock_after": 38,
  "reason": "correction"
}

FulfillmentRequestedEventData#

A fulfillment was created as pending: a pickup is waiting to be booked by a carrier app.

الاسمالنوعالوصف
fulfillment_idمطلوبstring
order_idمطلوبstring
linesمطلوبobject[]
order_item_idمطلوبstring
quantityمطلوبinteger
مثال
{
  "fulfillment_id": "6f1d2c3b-4a59-4e8f-9b70-2d1c3e4f5a6b",
  "order_id": "6f1d2c3b-4a59-4e8f-9b70-2d1c3e4f5a6b",
  "lines": [
    {
      "order_item_id": "6f1d2c3b-4a59-4e8f-9b70-2d1c3e4f5a6b",
      "quantity": 2
    }
  ]
}

FulfillmentCreatedEventData#

الاسمالنوعالوصف
fulfillment_idمطلوبstring
order_idمطلوبstring
statusمطلوبstring
القيم:pendingshipped
tracking_numberمطلوبيقبل nullstring
linesمطلوبobject[]
order_item_idمطلوبstring
quantityمطلوبinteger
order_fully_fulfilledمطلوبboolean

True when every line of the order is now covered by a fulfillment.

مثال
{
  "fulfillment_id": "6f1d2c3b-4a59-4e8f-9b70-2d1c3e4f5a6b",
  "order_id": "6f1d2c3b-4a59-4e8f-9b70-2d1c3e4f5a6b",
  "status": "pending",
  "tracking_number": "RX123456789SY",
  "lines": [
    {
      "order_item_id": "6f1d2c3b-4a59-4e8f-9b70-2d1c3e4f5a6b",
      "quantity": 2
    }
  ],
  "order_fully_fulfilled": true
}

FulfillmentUpdatedEventData#

الاسمالنوعالوصف
fulfillment_idمطلوبstring
order_idمطلوبstring
statusمطلوبstring
القيم:pendingshippeddeliveredcancelled
previous_statusمطلوبstring
tracking_numberمطلوبيقبل nullstring
مثال
{
  "fulfillment_id": "6f1d2c3b-4a59-4e8f-9b70-2d1c3e4f5a6b",
  "order_id": "6f1d2c3b-4a59-4e8f-9b70-2d1c3e4f5a6b",
  "status": "pending",
  "previous_status": "string",
  "tracking_number": "RX123456789SY"
}

RefundCreatedEventData#

الاسمالنوعالوصف
refund_idمطلوبstring
order_idمطلوبstring
amount_minorمطلوبinteger

Integer minor units of currency (scale by the store's decimals).

currencyمطلوبstring
linesobject[]

Line breakdown when the refund carried one. Absent on POS refunds.

order_item_idمطلوبيقبل nullstring
quantityمطلوبinteger
amount_minorمطلوبinteger

Integer minor units of currency (scale by the store's decimals).

source"pos"

Present when the refund was written at the point of sale.

مثال
{
  "refund_id": "6f1d2c3b-4a59-4e8f-9b70-2d1c3e4f5a6b",
  "order_id": "6f1d2c3b-4a59-4e8f-9b70-2d1c3e4f5a6b",
  "amount_minor": 275000,
  "currency": "SYP",
  "lines": [
    {
      "order_item_id": "6f1d2c3b-4a59-4e8f-9b70-2d1c3e4f5a6b",
      "quantity": 2,
      "amount_minor": 275000
    }
  ],
  "source": "pos"
}

AppUninstalledEventData#

Farewell notice: the merchant removed the app. Tokens are already dead; delete what the DPA requires and stop calling the API for this install.

الاسمالنوعالوصف
app_idمطلوبstring
install_idمطلوبstring
مثال
{
  "app_id": "6f1d2c3b-4a59-4e8f-9b70-2d1c3e4f5a6b",
  "install_id": "6f1d2c3b-4a59-4e8f-9b70-2d1c3e4f5a6b"
}