For point-of-sale vendors and stores that want to connect a POS or back-office system to the Allizoo marketplace through the Partner API.
Status: v1, before launch. Allizoo is not live yet; production and sandbox hosts are issued during onboarding. The base URL shown on this page is the one for the environment you are reading it on. All example values (IDs, keys, secrets, names, amounts) are illustrative.
1. Overview
The Partner API lets a store's own system:
| Capability | How |
|---|---|
| Receive new orders | Subscribe to webhooks (order.paid) and/or poll GET /partner/v1/orders. |
| Read order details | GET /partner/v1/orders/{orderId} returns the store's own slice of the order with its line items and amounts. |
| Track order status | Subscribe to order.status webhooks and/or poll the order list. |
| Accept, reject, and mark orders ready | POST /partner/v1/orders/{orderId}/accept, /reject, /ready. |
| Read the catalog | GET /partner/v1/catalog/items returns the store's products (retail) or dishes (F&B). |
| Switch items on/off | PUT /partner/v1/catalog/items/{itemId}/availability; for dishes, also a "sold out" (86'd) flag with an optional return time. |
| Run the branch | GET /partner/v1/branches and PUT /partner/v1/branches/{branchId}/status: pause and resume taking orders (optionally until a set time), and for restaurants set the kitchen to open, busy or closed. |
A POS connected through the Partner API can do everything the Allizoo kitchen terminal does: receive new orders (by webhook and by polling), accept them with a preparation time, reject them, mark them ready, and pause, mark busy or reopen its branch. A store can therefore use its POS instead of the terminal. Printing kitchen tickets stays on the POS side.
Everything is scoped to one store (the store that issued the API key), and optionally to one branch of it (see Whole-store and branch keys). A key can never see another store's data.
Retail and F&B
Allizoo has two sections, and each store belongs to exactly one:
- Retail stores sell products with optional variants. Accepting an order moves it to
ACCEPTED_BY_VENDOR; marking it ready moves it toPACKED. - F&B (food and beverage) stores sell dishes with modifier groups. Accepting an order moves it to
PREPARING; marking it ready moves it toREADY_FOR_PICKUP.
The same endpoints serve both. The API picks the section from the key's store. Fields that only apply to one section are null or [] for the other (see the catalog reference). A retail order can contain items from several stores; each store sees only its own part (see Multi-store orders).
What the API does not expose
Customer identity, delivery address, payment details, and the platform's commission are never returned. Order payloads contain order, item, and amount data for the store's own slice only.
2. Getting access
2.1 Who can use the API
Any store that Allizoo has approved (and that is not suspended) can create keys and use every endpoint, reads and writes alike, on every plan. There are no access tiers and no per-key permissions beyond the choice between a whole-store key and a branch key (see 2.2).
The store's standing is checked on every request:
- A store that is not yet approved cannot create a key:
422 partner.vendor_not_approved. - If a store is no longer approved, every partner request fails with
403 partner.vendor_not_approved. Keys are not deleted and work again once the store is re-approved. - A suspended store's requests fail with
403 partner.vendor_suspended.
2.2 Creating an API key (done by the store owner)
Only the store's owner seat can manage keys and webhooks. Other staff roles get 403 vendor.insufficient_role.
- The owner signs in to the Allizoo vendor portal and opens Developer.
- Under API keys, enters a name (1 to 60 characters, for example "POS sync"), chooses Whole store or one branch, and selects Create key.
- The full key is shown once. Copy it into the POS settings immediately. If it is lost, revoke it and create a new one.
Details:
- A key looks like
<key-id>.<secret>(a UUID, a dot, then 64 hex characters). Treat the whole string as an opaque secret. - A store can hold up to 5 live whole-store keys and up to 5 live keys per branch. Creating a sixth in the same scope fails with
422 partner.key_cap_reached. - A store that is not yet approved cannot create a key (
422 partner.vendor_not_approved). - The portal lists each key by name, the branch it is bound to ("Whole store" or the branch name), the last 4 characters of its secret, creation time, last-used time, and revoked time. The secret is never shown again.
Whole-store and branch keys
When creating a key, the store owner chooses its scope. A whole-store key sees every branch of the store. A branch key behaves like a paired kitchen terminal: it acts for one branch only.
| Request | Whole-store key | Branch key |
|---|---|---|
GET /partner/v1/orders |
All branches' orders | Only that branch's orders |
| Read, accept, ready or reject another branch's order | Allowed | 404 order.not_found |
GET /partner/v1/branches |
All branches | Only its own branch |
PUT /partner/v1/branches/{branchId}/status |
Any branch of the store | Its own branch; another branch gives 404 branch.not_found |
| Catalog reads | Allowed | Allowed |
PUT /partner/v1/catalog/items/{itemId}/availability |
Allowed | 403 partner.store_wide_key_required (availability applies to every branch) |
Webhook endpoints are store-wide (see Webhooks): a branch POS should filter incoming events on branch_id. A store with several branches can create one key per branch.
The same operations exist as owner-authenticated HTTP endpoints, shown here for completeness. They use the owner's portal session, not an API key (an API key gets 403 common.forbidden on them):
| Method and path | Purpose | Success |
|---|---|---|
GET /vendor/api-keys |
List the store's keys (revoked ones included) | 200 { items: [...] } |
POST /vendor/api-keys body { "label": "POS sync", "branch_id": null } (branch_id: a branch UUID, or omit / null for a whole-store key) |
Create a key | 201, includes api_key once |
DELETE /vendor/api-keys/{keyId} |
Revoke a key | 204 |
2.3 Rotating and revoking keys
There is no in-place rotation. To rotate: create a new key, switch the integration to it, then revoke the old one. Each scope allows up to 5 live keys, so both can coexist during the switch.
Revoking a key takes effect on the next request: an access token minted from a revoked key is rejected immediately with 401 partner.key_revoked, even if the token has not expired. Revoked keys no longer count toward the key limit.
2.4 Exchanging a key for an access token
POST /partner/v1/token (no Authorization header needed)
{ "api_key": "<key-id>.<secret>" }
Response 200 (illustrative):
{
"access_token": "eyJhbGciOiJIUzI1NiJ9...",
"access_expires_in": 900,
"vendor_id": "0198a1b2-0000-7000-8000-000000000011"
}
access_expires_inis in seconds. At the time of writing it is 900 (15 minutes). Read the value from the response rather than hard-coding it.- There is no refresh token. When the token expires (or you receive
401 common.unauthenticated), exchange the key again. - Send the token on every partner request:
Authorization: Bearer <access_token>. - The exchange is limited to 30 requests per hour per client IP. Cache the token and renew it shortly before it expires; do not exchange on every request.
- Lockout: after 5 failed exchanges for the same key (wrong secret), that key is locked for 15 minutes. While locked, even the correct key gets
429 partner.key_lockedwithretry_after_msin the body. A successful exchange resets the failure counter.
| Status | code |
Meaning |
|---|---|---|
| 401 | partner.key_invalid |
Malformed, unknown, or wrong secret. The response does not reveal which. |
| 401 | partner.key_revoked |
The key was revoked. |
| 429 | partner.key_locked |
Too many failures. Wait retry_after_ms milliseconds. |
| 429 | common.rate_limited |
More than 30 exchanges per hour from this IP. |
3. Environments and base URL
The base URL for the environment you are reading this on is:
http://api:4000
All partner paths start with /partner/v1 and follow the base URL, for example http://api:4000/partner/v1/orders. Production and sandbox hosts are issued at onboarding.
Machine-readable spec. The Partner API's OpenAPI 3 document is served at http://api:4000/partner/openapi.json. It is generated from the running API, so it always matches it. Import it into Postman or Insomnia, or generate a client from it. Webhooks are described in this guide only (section 7).
Non-production environments may accept a webhook URL on http://localhost for local testing. Production requires public https URLs (see Webhook endpoint rules).
Keys, webhooks, and orders are per environment. A sandbox key does not work in production.
4. Conventions
| Topic | Rule |
|---|---|
| Format | JSON request and response bodies (Content-Type: application/json). Field names are snake_case. |
| IDs | UUIDs. Path IDs that are not UUIDs get 400. |
| Timestamps | ISO 8601 in UTC with milliseconds, for example 2026-09-17T10:00:00.000Z. |
| Date filters | date_from and date_to on the order list are YYYY-MM-DD calendar days in Asia/Riyadh time, inclusive of both days. |
| Money | Integer halalas (1 SAR = 100 halalas). Never floats. Field names end in _halalas. |
| Rates | Basis points (_bps, 10 000 = 100%). The partner payloads currently expose no rate fields. |
| Pagination | Cursor-based. ?limit= accepts 1 to 50 (default 20; an invalid or non-positive value falls back to 20; above 50 is capped at 50). The response contains next_cursor; pass it back as ?cursor=. null means no more pages. Treat the cursor as opaque. |
| Ordering | Order list and catalog list: newest first. |
| Idempotency | Required on order and availability writes (see 4.1); not needed for branch status. |
| Bilingual text | Names are always returned in both languages: title_ar and title_en (and name_ar and name_en for modifiers). |
| Errors | application/problem+json (see Errors). |
| Rate limits | See Rate limits. |
4.1 Idempotency
Every order and availability write (accept, ready, reject, availability) requires an Idempotency-Key header. Without it the API returns 400 partner.idempotency_key_required. The branch status endpoint does not need one: it sets an absolute state, so retrying it is always safe.
- Use a unique value per operation (for example a UUID you generate and store with the POS action). Use the same value only when retrying the same call.
- Responses are remembered for 24 hours, scoped to your API key. If you repeat a key within that time, you get the original
200response again and nothing is re-executed, even if the path or body differ. Never reuse a key for a different order or item. - Only successful responses are remembered. A request that failed can be retried with the same key.
5. Endpoint reference
All endpoints below require Authorization: Bearer <access_token> unless stated otherwise. Any approved store can call all of them. A branch key is limited to its own branch (see Whole-store and branch keys).
| Method | Path | Purpose |
|---|---|---|
| POST | /partner/v1/token |
Exchange an API key for an access token (public) |
| GET | /partner/v1/orders |
List the store's orders |
| GET | /partner/v1/orders/{orderId} |
One order with line items |
| POST | /partner/v1/orders/{orderId}/accept |
Accept an order |
| POST | /partner/v1/orders/{orderId}/ready |
Mark an order ready |
| POST | /partner/v1/orders/{orderId}/reject |
Reject an order |
| GET | /partner/v1/catalog/items |
List catalog items |
| PUT | /partner/v1/catalog/items/{itemId}/availability |
Set item availability (whole-store keys only) |
| GET | /partner/v1/branches |
List the key's branches and their status |
| PUT | /partner/v1/branches/{branchId}/status |
Pause, resume, or set the kitchen status of a branch |
5.1 POST /partner/v1/token
See section 2.4.
5.2 GET /partner/v1/orders
Lists the orders that include this store, newest first. Each row is the store's own slice of the order. A branch key lists only its branch's orders.
Query parameters (all optional):
| Parameter | Description |
|---|---|
status |
Exact status value, for example PAID. Any other string simply returns no rows. |
date_from, date_to |
YYYY-MM-DD (Asia/Riyadh), based on when the order was placed. Either or both. If date_to is before date_from, the span exceeds 366 days, or a value is malformed, the response is 400 order.range_invalid. |
limit, cursor |
Pagination (see conventions). |
The list includes orders that are not yet paid (
PLACED). Only act on an order once it isPAID. To fetch only new, payable orders, filter withstatus=PAID.Exception: cash on delivery. A cash order is placed without an advance payment, so it arrives as
PLACEDand staysPLACEDuntil the store accepts it; it never becomesPAIDand never produces anorder.paidwebhook (anorder.statuswebhook withPLACEDannounces it). It is recognisable bycash_to_collect_halalas > 0— what the rider collects at the door for this store's slice. Accept or reject it like any new order, but do not treat it as paid (no settled sale, no "paid" receipt). An order can be part wallet, part cash;cash_to_collect_halalasis then the cash part. Orders paid in advance carrycash_to_collect_halalas: 0.
Response 200 (illustrative):
{
"items": [
{
"order_id": "0198a1b2-0000-7000-8000-0000000000a1",
"order_number": "MKT-EXAMPLE-01",
"order_vendor_group_id": "0198a1b2-0000-7000-8000-0000000000e1",
"branch_id": "0198a1b2-0000-7000-8000-000000000201",
"section": "FNB",
"status": "PAID",
"is_primary": true,
"placed_at": "2026-09-17T10:00:00.000Z",
"scheduled_for": null,
"vendor_confirmed_at": null,
"ready_at": null,
"delivered_at": null,
"subtotal_halalas": 5000,
"vat_halalas": 750,
"delivery_fee_halalas": 1000,
"promo_discount_halalas": 0,
"vendor_payout_amount_halalas": 4250,
"cancellation_reason": null
}
],
"next_cursor": null
}
5.3 GET /partner/v1/orders/{orderId}
Returns the same fields as a list row plus lines. The lines are only the store's own live lines (lines removed from the order are not shown).
Response 200 (illustrative):
{
"order_id": "0198a1b2-0000-7000-8000-0000000000a1",
"order_number": "MKT-EXAMPLE-01",
"order_vendor_group_id": "0198a1b2-0000-7000-8000-0000000000e1",
"branch_id": "0198a1b2-0000-7000-8000-000000000201",
"section": "FNB",
"status": "PAID",
"is_primary": true,
"placed_at": "2026-09-17T10:00:00.000Z",
"scheduled_for": null,
"vendor_confirmed_at": null,
"ready_at": null,
"delivered_at": null,
"subtotal_halalas": 5000,
"vat_halalas": 750,
"delivery_fee_halalas": 1000,
"promo_discount_halalas": 0,
"vendor_payout_amount_halalas": 4250,
"cancellation_reason": null,
"lines": [
{
"order_item_id": "0198a1b2-0000-7000-8000-0000000000b1",
"product_variant_id": null,
"menu_item_id": "0198a1b2-0000-7000-8000-0000000000c1",
"title_ar": "برجر",
"title_en": "Burger",
"quantity": 2,
"unit_price_halalas": 2500,
"line_subtotal_halalas": 5000,
"modifier_option_ids": ["0198a1b2-0000-7000-8000-0000000000d1"]
}
]
}
Field notes:
| Field | Notes |
|---|---|
order_id, order_number |
The order's identifier and its human-readable number. |
order_vendor_group_id |
The store's slice of the order. This is the ID that appears in order.paid webhooks. |
branch_id |
The branch that prepares this store's slice of the order. Also on every webhook payload. |
section |
RETAIL or FNB. |
status |
Current order status. See order statuses. The status belongs to the whole order. |
is_primary |
true if this store is the order's primary store. Only the primary store can accept, reject, or mark ready (see below). |
placed_at |
When the order was placed. |
scheduled_for |
For scheduled orders, the requested time; otherwise null. |
vendor_confirmed_at, ready_at, delivered_at |
Timestamps set as the order progresses, else null. |
subtotal_halalas |
Sum of this store's line subtotals. |
vat_halalas, delivery_fee_halalas, promo_discount_halalas |
See section 8. |
vendor_payout_amount_halalas |
The store's payout amount for its slice, as computed by the platform. |
cash_to_collect_halalas |
Cash the rider collects at the door for this store's slice; 0 when the order was paid in advance. |
cancellation_reason |
The reason recorded with a cancellation or rejection, if any; otherwise null. |
lines[].product_variant_id |
Retail lines: the variant ordered (match to variants[].id in the catalog). null for F&B. |
lines[].menu_item_id |
F&B lines: the dish ordered (match to the catalog item id). null for retail. |
lines[].title_ar, title_en |
Name captured at order time. |
lines[].modifier_option_ids |
F&B: chosen modifier option IDs (match to modifiers[].options[].id in the catalog). [] when none. |
Errors: 404 order.not_found if the store has no part in this order, or if a branch key is used for an order of another branch (it does not reveal whether the order exists).
5.4 POST /partner/v1/orders/{orderId}/accept
Accepts a paid order. Requires Idempotency-Key.
Optional body:
{ "prep_minutes": 25 }
prep_minutes: integer from 1 to 180, the store's stated preparation time. Omit the body (or send{}) to accept with the branch's default. Any other field is rejected with422. The platform may ignoreprep_minutesif the prep-time capability is not enabled for your environment.- Allowed only from
PAID— or fromPLACEDfor a cash on delivery order (cash_to_collect_halalas > 0) — and only for the order's primary store. - Retail: status becomes
ACCEPTED_BY_VENDOR. F&B: status becomesPREPARING. - If the customer paid with Tabby or Tamara, accepting also triggers capture of the authorised payment on the platform's side. You do not call anything for this.
- Duplicates are not errors. If the order was already accepted (by a second request with a new idempotency key, by the portal, or by auto-accept), the response is
200with the current order, and nothing runs again.
Response 200: the full order object (same shape as 5.3), with the new status.
5.5 POST /partner/v1/orders/{orderId}/ready
Marks the order ready for pickup by the rider. Requires Idempotency-Key. No body.
- Retail:
ACCEPTED_BY_VENDORtoPACKED. F&B:PREPARINGtoREADY_FOR_PICKUP. - Primary store only.
- If a rider has already been assigned, the status stays
ASSIGNED_TO_RIDERand the ready time is recorded.
Response 200: the full order object.
5.6 POST /partner/v1/orders/{orderId}/reject
Rejects an order the store cannot fulfil. Requires Idempotency-Key.
{ "reason": "Item out of stock" }
reason: 1 to 500 characters (trimmed). Required. No other fields.- Allowed only from
PLACEDorPAID, and only for the primary store. After acceptance, an order cannot be rejected through the API. - Status becomes
REJECTED.
Response 200: the full order object.
Write errors (accept, ready, reject)
| Status | code |
When |
|---|---|---|
| 400 | partner.idempotency_key_required |
Missing or empty Idempotency-Key. |
| 404 | order.not_found |
The store has no part in the order, or the store is not the order's primary (a co-store's write is a 404, not a 403), or the order belongs to another branch than a branch key's. |
| 409 | order.invalid_transition |
The order's status does not allow this action (for example accepting an order that is not PAID, or one that has been cancelled or rejected). |
| 422 | common.validation_failed |
Invalid body (for example prep_minutes out of range, unknown field, empty reason). The response lists errors[] with path and message. |
5.7 GET /partner/v1/catalog/items
Lists the store's catalog: products for a retail store, dishes for an F&B store. One response shape for both; section-specific fields are null or [] when they do not apply.
Query: limit, cursor (see conventions).
Response 200 (F&B example, illustrative):
{
"items": [
{
"id": "0198a1b2-0000-7000-8000-0000000000c1",
"section": "FNB",
"sku": null,
"title_ar": "برجر",
"title_en": "Burger",
"category": "Burgers",
"base_price_halalas": 2500,
"compare_at_price_halalas": null,
"is_available": true,
"is_86d": false,
"is_86d_until": null,
"variants": [],
"modifiers": [
{
"id": "0198a1b2-0000-7000-8000-0000000000f1",
"name_ar": "إضافات",
"name_en": "Extras",
"min_select": 0,
"max_select": 2,
"options": [
{
"id": "0198a1b2-0000-7000-8000-0000000000d1",
"name_ar": "جبنة",
"name_en": "Cheese",
"price_delta_halalas": 300
}
]
}
],
"updated_at": "2026-09-17T09:00:00.000Z"
}
],
"next_cursor": null
}
Retail example (abridged):
{
"id": "0198a1b2-0000-7000-8000-000000000101",
"section": "RETAIL",
"sku": "SHIRT-001",
"title_ar": "قميص",
"title_en": "Shirt",
"category": null,
"base_price_halalas": 5000,
"compare_at_price_halalas": null,
"is_available": true,
"is_86d": null,
"is_86d_until": null,
"variants": [
{
"id": "0198a1b2-0000-7000-8000-000000000102",
"sku": null,
"title_ar": "كبير",
"title_en": "Large",
"price_delta_halalas": 0
}
],
"modifiers": [],
"updated_at": "2026-09-17T09:00:00.000Z"
}
| Field | Notes |
|---|---|
id |
Item ID. Use it in the availability endpoint. For F&B it equals menu_item_id on order lines. |
sku |
Retail product SKU (may be null). Always null for F&B. |
category |
Category label, may be null. |
base_price_halalas |
Base price in halalas. |
compare_at_price_halalas |
The "was" price for display, or null. |
is_available |
Whether the item can be ordered. |
is_86d |
F&B only: the dish is marked sold out. null for retail. |
is_86d_until |
F&B only: when a sold-out mark ends automatically, or null. |
variants[] |
Retail only. id is what appears as product_variant_id on order lines. price_delta_halalas is added to the base price. [] for F&B. |
modifiers[] |
F&B only: modifier groups with min_select, max_select, and options[] (with price_delta_halalas). [] for retail. |
5.8 PUT /partner/v1/catalog/items/{itemId}/availability
Changes an item's availability. Requires Idempotency-Key. Send at least one field; unknown fields are rejected. Availability applies to every branch of the store, so this endpoint needs a whole-store key.
{ "is_available": false }
F&B only:
{ "is_86d": true, "is_86d_until": "2026-09-17T18:00:00+03:00" }
| Field | Type | Notes |
|---|---|---|
is_available |
boolean | Turns the item on or off. |
is_86d |
boolean | F&B only. Marks a dish sold out. |
is_86d_until |
ISO 8601 string with offset, or null |
F&B only. When the sold-out mark ends. Requires is_86d: true in the same body when it is not null. |
Response 200: the updated catalog item (same shape as a list item).
Errors:
| Status | code |
When |
|---|---|---|
| 400 | partner.idempotency_key_required |
Missing Idempotency-Key. |
| 403 | partner.store_wide_key_required |
The request used a branch key. |
| 404 | common.not_found |
The item does not exist or belongs to another store. |
| 409 | catalog.item_blocked |
The platform has taken this item down. It cannot be changed. |
| 422 | partner.field_not_applicable |
is_86d or is_86d_until sent by a retail store. |
| 422 | common.validation_failed |
Empty body, unknown field, or is_86d_until without is_86d: true. |
5.9 GET /partner/v1/branches
Lists the branches the key acts for: every branch of the store for a whole-store key, only its own branch for a branch key. Counts as a read (600 per minute per key).
Query (all optional): cursor, limit (1 to 50, default 20); see conventions.
Response 200 (illustrative):
{
"items": [
{
"id": "0198a1b2-0000-7000-8000-000000000201",
"name_ar": "فرع العليا",
"name_en": "Olaya",
"is_accepting_orders": false,
"closed_until": "2026-09-17T11:00:00.000Z",
"is_paused": true,
"kitchen_status": "BUSY",
"updated_at": "2026-09-17T10:30:00.000Z"
}
],
"next_cursor": null
}
| Field | Notes |
|---|---|
id |
Branch ID. The same value appears as branch_id on orders and webhook payloads. |
name_ar, name_en |
Branch names. |
is_accepting_orders |
Whether the branch has been switched on to take orders. |
closed_until |
When a timed pause ends automatically, or null. |
is_paused |
Whether the branch is currently paused, as computed by the server. Read this field, not is_accepting_orders: a timed pause that has expired leaves is_accepting_orders false but is_paused false. |
kitchen_status |
Restaurants (F&B): OPEN, BUSY or CLOSED. null for retail stores. |
updated_at |
When the branch was last changed. |
5.10 PUT /partner/v1/branches/{branchId}/status
Pauses or resumes a branch, and for restaurants sets its kitchen status. Counts as a write (120 per minute per key). No Idempotency-Key is needed: the call sets an absolute state, so retries are safe.
Send at least one field; unknown fields are rejected.
| Field | Type | Notes |
|---|---|---|
is_accepting_orders |
boolean | false pauses the branch: it stops taking new customer orders. true resumes and clears closed_until. |
closed_until |
ISO 8601 string with offset, or null |
A timed pause: the branch resumes by itself at this time. A non-null value needs is_accepting_orders: false in the same body and must be in the future. |
kitchen_status |
OPEN, BUSY, CLOSED |
Restaurants (F&B) only. BUSY lengthens the preparation time customers see. A retail store gets 422 branch.invalid_field_for_section, and nothing else in that body is applied. |
Examples (illustrative):
{ "is_accepting_orders": false, "closed_until": "2026-09-17T11:00:00+03:00" }
{ "is_accepting_orders": true }
{ "kitchen_status": "BUSY" }
Response 200: the branch object (same shape as in 5.9) after the change.
Errors:
| Status | code |
When |
|---|---|---|
| 400 | common.bad_request |
branchId is not a UUID. |
| 404 | branch.not_found |
The branch does not exist, belongs to another store, or is not the branch a branch key is bound to. |
| 422 | common.validation_failed |
Empty body, unknown field, closed_until without is_accepting_orders: false, or closed_until not in the future. |
| 422 | branch.invalid_field_for_section |
kitchen_status sent by a retail store. |
6. Order statuses
Status values are uppercase strings. Treat the set as open: handle unknown values gracefully.
Retail: PLACED, PAID, ACCEPTED_BY_VENDOR, PACKED, ASSIGNED_TO_RIDER, PICKED_UP, OUT_FOR_DELIVERY, DELIVERED.
F&B: PLACED, PAID, ACCEPTED_BY_VENDOR, PREPARING, READY_FOR_PICKUP, ASSIGNED_TO_RIDER, PICKED_UP, OUT_FOR_DELIVERY, DELIVERED.
Both: CANCELLATION_REQUESTED, CANCELLED, REJECTED.
What the store can do through the API:
| From status | Action | Result |
|---|---|---|
PLACED, PAID |
reject |
REJECTED |
PAID |
accept |
Retail: ACCEPTED_BY_VENDOR. F&B: PREPARING. |
Retail ACCEPTED_BY_VENDOR / F&B PREPARING |
ready |
Retail: PACKED. F&B: READY_FOR_PICKUP. |
ASSIGNED_TO_RIDER |
ready |
Status unchanged; ready time recorded. |
Later statuses (rider assignment, pickup, delivery) and cancellations are driven by the platform, riders, and customers, and show up as status changes you can read or receive by webhook. An order in CANCELLATION_REQUESTED cannot be accepted, marked ready, or rejected through the API.
A newly placed order is PLACED until payment succeeds, then becomes PAID. PAID is the state in which a store should accept or reject.
Multi-store retail orders
A retail order can include items from several stores. One store is the order's primary.
- Every store can read its own slice (
GET), and gets its ownorder.paidwebhook for it. - Each store only sees its own lines and amounts. Other stores' lines never appear.
branch_idis the branch of your own store that prepares your slice. - Only the primary store can accept, mark ready, or reject. A co-store's attempt returns
404 order.not_found.is_primarytells you which you are. order.statuswebhooks go to the primary store only.
7. Webhooks
Webhooks push a small notification to your server when an order is paid or changes status. The payload is a notification, not a data feed: it contains identifiers and the new status. Call GET /partner/v1/orders/{orderId} to fetch the details.
7.1 Events
| Event | Sent to | When |
|---|---|---|
order.paid |
Every store that has a slice of the order (one event per store, each carrying that store's order_vendor_group_id) |
The order's payment succeeds. This is your "new order to accept" signal. |
order.status |
The order's primary store only | Every time the order lands in a new status except PLACED (including PAID). |
ping |
The endpoint you test | When the store owner selects "Send test event". |
When an order becomes PAID, the primary store receives both order.paid and order.status (status: "PAID") if subscribed to both. An endpoint only receives the event types it subscribed to. Nothing is sent for PLACED.
Webhook endpoints are store-wide: an endpoint receives the events of every branch of the store, whatever key your POS uses for API calls. A POS that serves one branch should filter events on branch_id.
7.2 Payload
Order events share this JSON envelope. Exactly these fields are sent:
{
"event_id": "order.paid:0198a1b2-0000-7000-8000-0000000000e1",
"type": "order.paid",
"occurred_at": "2026-09-17T10:00:05.123Z",
"order_id": "0198a1b2-0000-7000-8000-0000000000a1",
"order_number": "MKT-EXAMPLE-01",
"order_vendor_group_id": "0198a1b2-0000-7000-8000-0000000000e1",
"branch_id": "0198a1b2-0000-7000-8000-000000000201",
"status": "PAID",
"section": "FNB"
}
| Field | Notes |
|---|---|
event_id |
Stable identifier for the event. Same value on every retry. Use it to deduplicate. |
type |
order.paid, order.status, or ping. |
occurred_at |
ISO 8601 UTC time the event was created. |
order_id, order_number |
The order. Fetch details with the order endpoint. |
order_vendor_group_id |
The store's slice. Can be null on order.status if the primary store has no slice recorded. |
branch_id |
The branch concerned. On order.paid, the branch that prepares that store's slice. On order.status, the primary store's branch. Filter on it if your POS serves one branch. |
status |
The order's new status. |
section |
RETAIL or FNB. |
event_id formats:
| Type | Format |
|---|---|
order.paid |
order.paid:<order_vendor_group_id> |
order.status |
order.status:<order_id>:<status> |
ping |
ping:<uuid> |
A ping event has a different body:
{
"event_id": "ping:0198a1b2-0000-7000-8000-0000000000aa",
"type": "ping",
"occurred_at": "2026-09-17T10:00:00.000Z",
"webhook_id": "0198a1b2-0000-7000-8000-0000000000bb"
}
7.3 Registering an endpoint (store owner)
In the vendor portal's Developer page, under Webhooks, the owner adds an endpoint URL and chooses the events. The page shows the signing secret once (64 hex characters); store it securely. The portal can also send a test event, pause or resume an endpoint, delete it, and show recent deliveries with their results.
Rules:
- Up to 3 endpoints per store (
422 partner.webhook_cap_reachedbeyond that). - URL up to 2048 characters,
httpsonly, a host name (no IP address), no username or password in the URL, and port 443 (default). Violations return422 partner.webhook_url_invalid, with the reason indetail(invalid_url,insecure_scheme,userinfo_not_allowed,ip_literal_not_allowed,port_not_allowed). - At send time we resolve your host name. If any resolved address is private, loopback, link-local, or carrier-grade NAT (RFC 1918 ranges,
127.0.0.0/8,169.254.0.0/16,100.64.0.0/10,0.0.0.0/8, and their IPv6 equivalents), or the name cannot be resolved, the delivery is abandoned immediately without retry (last_error: blocked_address). Your endpoint must be publicly reachable. - Redirects are not followed. A 3xx counts as a failure; register the final URL.
The equivalent owner-authenticated HTTP endpoints (not callable with an API key):
| Method and path | Purpose | Success |
|---|---|---|
GET /vendor/webhooks |
List endpoints (never includes the secret) | 200 { items } |
POST /vendor/webhooks body { "url": "https://...", "events": ["order.paid", "order.status"] } |
Register (the secret is returned once) | 201 |
PATCH /vendor/webhooks/{webhookId} body: any of url, events, is_active |
Update, or pause with is_active: false |
200 |
DELETE /vendor/webhooks/{webhookId} |
Delete the endpoint and its delivery log | 204 |
GET /vendor/webhooks/{webhookId}/deliveries?limit&cursor |
Delivery log, newest first | 200 { items, next_cursor } |
POST /vendor/webhooks/{webhookId}/test |
Send a signed ping through the real delivery pipeline |
201 (a delivery record) |
events must contain at least one of order.paid, order.status, ping. A test ping is sent regardless of the subscribed events.
Webhook endpoint object (illustrative; the secret appears only in the 201 response to create):
{
"id": "0198a1b2-0000-7000-8000-0000000000bb",
"url": "https://pos.example.com/allizoo/webhook",
"events": ["order.paid", "order.status"],
"is_active": true,
"last_success_at": "2026-09-17T10:00:06.000Z",
"last_failure_at": null,
"consecutive_failures": 0,
"created_at": "2026-09-16T08:00:00.000Z"
}
A delivery record (from the deliveries list):
{
"id": "0198a1b2-0000-7000-8000-0000000000cc",
"event_type": "order.paid",
"event_id": "order.paid:0198a1b2-0000-7000-8000-0000000000e1",
"attempts": 1,
"next_attempt_at": null,
"last_status_code": 200,
"last_error": null,
"delivered_at": "2026-09-17T10:00:06.000Z",
"dead_at": null,
"created_at": "2026-09-17T10:00:05.500Z"
}
A delivery is delivered when delivered_at is set, gave up when dead_at is set, and otherwise pending (see next_attempt_at). last_error values include http_<status> (for example http_500), blocked_address, endpoint_inactive, the URL rejection reasons above, or a short network error message (including timeouts).
7.4 Request we send
POST to your URL with a JSON body and these headers:
| Header | Value |
|---|---|
Content-Type |
application/json |
User-Agent |
Allizoo-Webhooks/1 |
X-Allizoo-Event-Id |
The event's event_id |
X-Allizoo-Event-Type |
order.paid, order.status, or ping |
X-Allizoo-Timestamp |
Unix time in seconds when this attempt was signed |
X-Allizoo-Signature |
v1=<hex> (see below) |
Respond with any 2xx status within 10 seconds. Anything else, including a timeout, a connection error, a 3xx, 4xx or 5xx, counts as a failed attempt and is retried. Do slow work after responding.
7.5 Verifying the signature
Always verify before trusting a webhook.
Algorithm
- Take the
X-Allizoo-Timestampheader value (a string of digits) and the raw request body exactly as received (do not parse and re-serialise it). - Build the string
<timestamp>.<raw body>(timestamp, a literal dot, raw body). - Compute HMAC-SHA256 of that string, keyed with your endpoint's signing secret (use the secret string as-is, as UTF-8 bytes), and encode as lowercase hex.
- The expected header is
v1=followed by that hex. Compare it toX-Allizoo-Signaturewith a constant-time comparison. - Reject the request if the timestamp differs from your clock by more than 300 seconds. This blocks replays of captured requests.
Each retry is re-signed with a fresh timestamp, so the 300-second window applies to each attempt. The body bytes are the same on every attempt.
Node.js (Express)
import crypto from 'node:crypto';
import express from 'express';
const SECRET = process.env.ALLIZOO_WEBHOOK_SECRET; // the endpoint's signing secret
const MAX_SKEW_SECONDS = 300;
function verify(rawBody, timestampHeader, signatureHeader) {
const ts = Number(timestampHeader);
if (!Number.isInteger(ts)) return false;
if (Math.abs(Math.floor(Date.now() / 1000) - ts) > MAX_SKEW_SECONDS) return false;
const expected =
'v1=' +
crypto
.createHmac('sha256', SECRET)
.update(`${timestampHeader}.${rawBody}`, 'utf8')
.digest('hex');
const a = Buffer.from(expected, 'utf8');
const b = Buffer.from(String(signatureHeader ?? '').trim(), 'utf8');
return a.length === b.length && crypto.timingSafeEqual(a, b);
}
const app = express();
// Capture the raw body: do NOT use express.json() on this route.
app.post('/allizoo/webhook', express.raw({ type: 'application/json' }), (req, res) => {
const raw = req.body.toString('utf8');
if (!verify(raw, req.get('x-allizoo-timestamp'), req.get('x-allizoo-signature'))) {
return res.sendStatus(401);
}
const event = JSON.parse(raw);
// De-duplicate on event.event_id, then enqueue work and answer fast.
res.sendStatus(200);
});
Python (Flask)
import hashlib
import hmac
import os
import time
from flask import Flask, request
SECRET = os.environ["ALLIZOO_WEBHOOK_SECRET"] # the endpoint's signing secret
MAX_SKEW_SECONDS = 300
def verify(raw_body: bytes, ts_header: str, sig_header: str) -> bool:
try:
ts = int(ts_header)
except (TypeError, ValueError):
return False
if abs(time.time() - ts) > MAX_SKEW_SECONDS:
return False
signed = ts_header.encode() + b"." + raw_body
expected = "v1=" + hmac.new(SECRET.encode(), signed, hashlib.sha256).hexdigest()
return hmac.compare_digest(expected.encode(), (sig_header or "").strip().encode())
app = Flask(__name__)
@app.post("/allizoo/webhook")
def webhook():
raw = request.get_data() # raw bytes, before any JSON parsing
if not verify(raw, request.headers.get("X-Allizoo-Timestamp"), request.headers.get("X-Allizoo-Signature")):
return "", 401
event = request.get_json(force=True)
# De-duplicate on event["event_id"], then enqueue work and answer fast.
return "", 200
Test vector (skips the clock check; use it to unit-test your implementation):
| Item | Value |
|---|---|
| Secret | 64 repetitions of the letter a |
| Timestamp | 1800000000 |
| Raw body | {"event_id":"ping:1","type":"ping"} |
Expected X-Allizoo-Signature |
v1=b60ab3e16d3803a5a105a21158c74b3867d4410bf38a74b07370a2222adeeb65 |
7.6 Retries, duplicates, and ordering
Retry schedule. A failed delivery is retried at these intervals after each failed attempt: 1 minute, 5 minutes, 30 minutes, 2 hours, 6 hours, then 24 hours three times. That is 9 attempts in total over roughly 3 days. After the ninth failure, the delivery is marked as gave up (dead_at) and is not retried.
Duplicates. Because we retry until we receive a 2xx, the same event can reach you more than once (for example, if your server processed it but the response was lost). Deduplicate on event_id (or the X-Allizoo-Event-Id header). We also create at most one delivery per endpoint for a given event_id.
Ordering. Events are delivered independently, each with its own retry timer. There is no ordering guarantee: if an earlier event is still being retried, a later one can arrive first. Use the status in the payload as a hint, and call GET /partner/v1/orders/{orderId} to read the current state before acting.
One event per order and status. order.status has one event_id per order_id and status. If an order ever re-enters a status it already had, no second event is generated for it, so do not rely on webhooks alone: reconcile by polling the order list periodically (for example status=PAID and your active statuses).
Pausing and deleting.
- A delivery whose endpoint is paused (or deleted) when its next attempt comes due is abandoned (
endpoint_inactive) and is not replayed when you resume. Deleting an endpoint also deletes its delivery log. - If the platform temporarily suspends webhook delivery, events are queued and sent when delivery resumes.
Replay. There is no API to resend a delivery that gave up. After an outage, use GET /partner/v1/orders (filter by status and date_from/date_to) to catch up.
Endpoints are not disabled automatically after repeated failures; check consecutive_failures, last_failure_at, and the delivery log in the portal.
8. Money, tax and units
- All amounts are integer halalas.
2500means SAR 25.00. Do not convert through floating-point numbers. - Order amounts are for the store's own slice of the order:
subtotal_halalas: the sum of the store's line subtotals (unit_price_halalasmultiplied byquantity).vat_halalas: the VAT charged to the customer on that subtotal. In the current checkout it is 15% of the subtotal, rounded to the nearest halala (for examplesubtotal_halalas: 5000givesvat_halalas: 750).delivery_fee_halalas: the delivery fee for the store's slice, without any VAT on the fee.promo_discount_halalas: any promotion discount applied to the slice (0 if none).vendor_payout_amount_halalas: the payout amount computed by the platform for the store's slice.
- Line amounts:
unit_price_halalasandline_subtotal_halalason order lines. Catalog prices:base_price_halalas,compare_at_price_halalas, andprice_delta_halalas(variant or modifier option price, added to the base price). - The partner payloads do not expose customer-level totals, tips, delivery VAT, or platform commission.
- Rates, where they exist, are in basis points (10 000 = 100%). No rate fields are currently exposed.
9. Errors
Errors use application/problem+json:
{
"type": "about:blank",
"title": "Not Found",
"status": 404,
"detail": "order not found",
"instance": "/partner/v1/orders/0198a1b2-0000-7000-8000-0000000000a1",
"code": "order.not_found",
"request_id": "d4c6f0aa-example"
}
- Branch on
code(stable), not ondetailtext. - Quote
request_idwhen contacting support. - Validation failures use
status: 422,code: "common.validation_failed", and anerrorsarray of{ "path": "...", "message": "..." }. - Lockout responses include
retry_after_ms.
Codes you may see on partner endpoints:
| Status | code |
Meaning |
|---|---|---|
| 400 | common.bad_request |
Malformed JSON or path parameter. |
| 400 | partner.idempotency_key_required |
Missing Idempotency-Key on a write. |
| 400 | order.range_invalid |
Invalid date_from / date_to. |
| 401 | common.unauthenticated |
Missing, invalid or expired bearer token. Exchange the key again. |
| 401 | partner.key_invalid |
API key unknown or invalid. |
| 401 | partner.key_revoked |
API key revoked. |
| 403 | common.forbidden |
The token is not a partner token (for example, calling a non-partner route). |
| 403 | partner.vendor_not_approved |
The store is no longer approved. Works again once re-approved. |
| 403 | partner.vendor_suspended |
The store is suspended. |
| 403 | partner.store_wide_key_required |
A branch key tried to change item availability. |
| 404 | order.not_found |
No such order for this store, a co-store tried a write, or the order belongs to another branch than a branch key's. |
| 404 | branch.not_found |
No such branch for this store, or not the branch a branch key is bound to. |
| 404 | common.not_found |
Catalog item not found for this store. |
| 404 | feature.not_enabled |
The Partner API is temporarily disabled by the platform. |
| 409 | order.invalid_transition |
The order's status does not allow the action. |
| 409 | catalog.item_blocked |
Item taken down by the platform. |
| 422 | common.validation_failed |
Body failed validation. |
| 422 | partner.field_not_applicable |
Field not valid for a retail store (is_86d, is_86d_until). |
| 422 | branch.invalid_field_for_section |
kitchen_status sent for a retail store. |
| 422 | partner.vendor_not_approved |
A store that is not yet approved tried to create an API key (owner portal). |
| 429 | common.rate_limited |
Rate limit exceeded. |
| 429 | partner.key_locked |
Key locked after repeated failed exchanges. |
| 500 | common.internal_error |
Unexpected error. Retry later; quote request_id if it persists. |
Retry guidance: retry 429 after the wait indicated; retry 5xx with exponential backoff, re-using the same Idempotency-Key for order and availability writes. Do not retry 4xx (other than 429) without changing the request.
10. Rate limits and versioning
Limits (per API key, counted in fixed windows):
| Calls | Limit |
|---|---|
Reads (GET, including branches) |
600 per minute |
Writes (POST accept/ready/reject, PUT availability, PUT branch status) |
120 per minute |
| Token exchange | 30 per hour per client IP |
Rate-limited responses carry the headers X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset (seconds until the window resets), and, on 429, Retry-After (seconds). Prefer webhooks over tight polling.
Versioning. All partner paths carry /v1. Allizoo's policy is that additive changes (new fields, new endpoints, new webhook event types) stay in v1, and breaking changes ship under /v2 with a six-month overlap. Write clients that ignore unknown fields and tolerate new status values and event types.
11. Integration checklist
Build and test (sandbox)
- Ask your Allizoo contact for sandbox and production hosts and for an approved sandbox store.
- The store owner creates an API key in Developer, choosing Whole store or one branch (one key per branch for a POS that serves a single branch), and you store it as a secret.
- Implement the token exchange. Cache the token, send
Authorization: Bearer ..., and renew before expiry or on401. - Pull the catalog (
GET /partner/v1/catalog/items, followingnext_cursor) and map your POS items to Allizoo item and variant IDs. - Implement order intake: poll
GET /partner/v1/orders?status=PAIDand/or receive webhooks. - Implement the actions you need: accept (with
prep_minutes), ready, reject (with reason). Generate a uniqueIdempotency-Keyfor each. - Implement availability switching if your POS tracks stock or sold-out dishes (needs a whole-store key).
- Set up branch status: read
GET /partner/v1/branches(useis_paused), and wire your POS's pause, busy and reopen controls toPUT /partner/v1/branches/{branchId}/status. - Register your webhook URL; ask the owner to send a test event and confirm your server verifies the signature with the test vector and the real event. If your POS serves one branch, filter events on
branch_id. - Handle duplicates (
event_id), out-of-order delivery (re-fetch the order), and409 order.invalid_transition. - Handle all documented error codes and respect rate limits.
Go-live
- Production key created by the store owner; stored in a secret manager. Old sandbox keys revoked.
- Webhook URL is public
httpswith a valid certificate and responds2xxin well under 10 seconds. - Signing secret stored securely. Signature and 300-second timestamp checks enforced.
- Webhook handler is idempotent on
event_id. - A periodic reconciliation poll runs, so missed webhooks (including events that gave up after retries) are caught.
- Alerting on repeated
401,403,429, and5xxresponses, and on webhookconsecutive_failures. - Each key has the right scope: a branch key per branch, or a whole-store key if you need item availability.
- Your POS handles
403 partner.vendor_not_approvedand403 partner.vendor_suspended(the keys work again when the store is back in good standing). - Branch status (pause, busy, reopen) works from the POS, and the POS reads
is_paused. - A rotation procedure is documented: create new key, deploy, revoke old key.
- Support contact and
request_idlogging in place.
12. Not supported yet
These are not available through the Partner API today:
- Creating, editing, or deleting catalog items; changing prices, names, categories, or modifiers (only availability can be changed).
- Stock or inventory quantities (read or write), and per-branch availability (availability applies to every branch).
- Cancelling an order, approving or declining a customer's cancellation request, refunds, or removing order lines.
- Assigning riders, rider or delivery details, and marking an order picked up or delivered.
- Customer details (name, phone, address) and payment details.
- An
order createdevent at placement (order.paidis the first event; nothing is sent forPLACED). - Webhooks for catalog changes.
- A "changes since" filter on the order or catalog lists; use webhooks plus periodic reconciliation.
- Webhooks for co-stores' status changes (
order.statusgoes to the primary store only), and status writes by co-stores. - Signing-secret rotation for webhooks (delete and re-create the endpoint to get a new secret) and replaying a delivery that gave up.
- Automatic disabling of failing webhook endpoints.
- Managing keys or webhooks with an API key (the store owner does this in the portal).
- Menu and price sync from the POS to Allizoo (the menu is managed in the Allizoo portal).
- A single developer account that links many stores. Each store creates its own key today.
- Webhook endpoints limited to one branch. Endpoints are store-wide; filter on
branch_id. - Fine-grained key permissions (a key is either whole-store or bound to one branch).
13. Changelog
- 2026-10-15 — v1. Every approved store can connect a POS, on every plan. Keys can be bound to one branch. New branch endpoints (
GET /partner/v1/branches,PUT /partner/v1/branches/{branchId}/status).branch_idon every order and webhook payload. OpenAPI document at/partner/openapi.json.