Read sales and the catalogue, write items, send orders to the till and receive signed webhooks. Money is always integer halalas (1 SAR = 100). Errors are JSON {error, message, details}; the message follows Accept-Language (ar or en). Lists answer {data, meta}.
Downloads
All three are generated from the same OpenAPI file as this page, so they always match the live API. No sign-in is needed.
Import it into Postman, set the {{token}} variable to your client token and run any request. «Subscribe» stores {{webhook_id}} and {{webhook_secret}}; the «Webhook signature» folder signs a sample delivery and sends it to {{receiver_url}}, so you can test your receiver before a real event happens.
Authentication
An account owner or manager creates an API client under Back office → Developers and chooses its abilities. The token is shown once. Send it on every call:
The token can also be sent as X-Api-Key. GET /ping answers the client, its abilities and the account: use it as the «test connection» call.
Abilities
Each endpoint needs one ability; a call without it answers 403 insufficient_ability with details.required_ability. pos:webhooks only manages subscriptions: to receive an event, or list its recent objects, the client also needs the ability that reads that data.
Ability
Endpoints
any
GET /ping
pos:read
GET /branches · GET /categories · GET /items · GET /items/{id} · GET /price-lists · GET /customers · GET /receipts · GET /receipts/{id} · GET /sessions/{id}/z-report · GET /stock/levels
pos:write
POST /items · PUT /items/{id}
pos:orders
POST /orders · GET /orders/{id} · POST /orders/{id}/cancel
pos:webhooks
GET /webhooks · POST /webhooks · GET /webhooks/events · GET /webhooks/events/{event}/recent · GET /webhooks/{id} · DELETE /webhooks/{id}
Rate limit
120 requests a minute per API client. A 429 answer carries Retry-After; every answer carries X-RateLimit-Limit and X-RateLimit-Remaining.
Calls whose token matches no active client share a per-address limit of 30 a minute. A plan without the Partner API feature answers 403 not_entitled.
Errors
Every error is JSON {error, message, details}; the message follows Accept-Language (ar or en). Money is always integer halalas (1 SAR = 100).
GET /receipts is oldest first and pages by cursor: pass the meta.next_since_id of the previous answer as ?since_id= until meta.has_more is false. The order is the order receipts reached the server, so a sale made offline and synced later is never skipped. Receipts that arrived in the last 5 seconds are held back until the batch that wrote them has finished.
POST /orders is idempotent on external_id per API client: sending the same order again answers 200 with duplicate: true and the same order, never a second ticket on the till. Cancelling an order twice is a no-op. Other writes take no idempotency key: on a timeout, read before you retry (GET /items?sku=…). Webhook deliveries may arrive more than once: drop repeats by X-Basmtak-Event-Id (the body's id).
Webhooks (REST hooks)
Subscribe with POST /webhooks {target_url, event} and unsubscribe with DELETE /webhooks/{id} — the Zapier and Make REST-hook pattern. Each delivery is a POST of {id, event, tenant_id, occurred_at, api_version, data}, retried with exponential backoff; 20 failures in a row (or a 410 answer) switch the subscription off.
What a delivery looks like
A POST with Content-Type application/json and the body {id, event, tenant_id, occurred_at, api_version, data}; data has the same shape the API returns for that object. Headers: X-Basmtak-Event, X-Basmtak-Event-Id, X-Basmtak-Delivery, X-Basmtak-Timestamp and X-Basmtak-Signature.
Verifying a delivery
X-Basmtak-Signature = "sha256=" + hex HMAC-SHA256(secret, X-Basmtak-Timestamp + "\n" + "POST" + "\n" + path + "\n" + hex SHA-256(raw body)). Reject timestamps older than five minutes. X-Basmtak-Event-Id is unique per event — use it to drop duplicates.
Worked example
With these inputs your code must produce exactly this signature (computed live by the code that signs real deliveries). Use the secret exactly as you received it, including whsec_, and the raw body bytes, before any JSON parsing.
Any 2xx answer within 10 seconds is a success. Anything else (another status, a timeout, a refused address) is retried after 60 seconds, doubling each time up to 6 hours; after 10 attempts the delivery is given up. 20 failed attempts in a row switch the subscription off, and a 410 Gone answer switches it off at once (the REST-hook way to unsubscribe). Only the status code is kept, never your answer's body.
The hook URL must be HTTPS on a public address (hooks.zapier.com and hook.*.make.com are). A Zap or scenario that only needs actions (create an order, create or update an item) or searches (find an item by sku or barcode, find a customer) calls the endpoints below directly.
Endpoints
meta Connectivity
GET/pingCheck the token and see the client's abilitiesAbility: any
Responses
200
The client, its abilities and the account
401
{error, message, details}
Error
catalogue Branches, categories, items, price lists and customers
GET/branchesList branchesAbility: pos:read
Parameters
page
query
integer
per_page
query
integer
Responses
200
A page of branches
BranchPage
GET/categoriesList categoriesAbility: pos:read
Parameters
page
query
integer
per_page
query
integer
Responses
200
A page of categories
GET/itemsList items with their variantsAbility: pos:read
Each variant carries `plu` (V + variant id), the reference to use in orders.
Parameters
page
query
integer
per_page
query
integer
category_id
query
integer
updated_since
query
string
ISO-8601; only items changed since then
sku
query
string
barcode
query
string
Responses
200
A page of items
ItemPage
POST/itemsCreate an item (one payload with its variants)Ability: pos:write
Same payload as the back office. Barcodes and SKUs are unique per account. Without variants one default variant is made at default_price_halalas.
Arrays present in the body (variants, modifier_group_ids, combo_slots) replace what is stored; rows without id are created, missing ids are deleted. Arrays absent are untouched.
Parameters
id
path
integer · required
Request body ItemWrite
Responses
200
The item
422
{error, message, details}
Error
GET/price-listsPrice lists with their pricesAbility: pos:read
Name, phone, email and address are returned only while the customer's marketing consent is granted (PDPL); otherwise they are null. VAT and CR numbers are always returned.
Parameters
page
query
integer
per_page
query
integer
updated_since
query
string
consented_only
query
boolean
Only customers whose latest marketing consent in the consent ledger is granted (never erased ones).
consent_channel
query
string
With consented_only, only consents that cover this channel.
Responses
200
A page of customers
object
sales Receipts, Z-reports and stock
GET/receiptsReceipts and credit notes, oldest first, with a since_id cursorAbility: pos:read
Pass the last receipt id you saw as since_id to get what arrived after it; meta.next_since_id is the value for the next call and meta.has_more says whether to call again now. The order is the server's arrival order, so receipts a till sold offline and synced later are never skipped. Receipts that arrived in the last few seconds are held back.
Parameters
since_id
query
string
branch_id
query
integer
kind
query
string
per_page
query
integer
Responses
200
Receipts after the cursor
ReceiptCursorPage
422
{error, message, details}
Error
GET/receipts/{id}One receipt or credit noteAbility: pos:read
Parameters
id
path
string · required
Responses
200
The receipt
object
404
{error, message, details}
Error
GET/sessions/{id}/z-reportThe Z-report of a closed till sessionAbility: pos:read
The Z as stored at close; deposits already invoiced are netted (prepayments_applied).
Parameters
id
path
string · required
Responses
200
The session with z_report, expected and counted
object
409
{error, message, details}
Error
GET/stock/levelsStock on hand per branch and variantAbility: pos:read
Parameters
page
query
integer
per_page
query
integer
branch_id
query
integer
variant_id
query
integer
low_only
query
boolean
Responses
200
A page of stock levels
orders Orders sent to the till's incoming-orders panel
POST/ordersSend an order to the tillAbility: pos:orders
The order appears on the branch till's incoming-orders panel; the cashier accepts it and the receipt is issued on the till. Idempotent on external_id per API client: a retry answers 200 with duplicate true. Lines reference a variant by variant_id, or plu / sku / barcode; a line nothing matches stays an open item with your name and price. Prices are VAT-inclusive halalas; a line without a price takes the catalogue price. Status changes come back as order.status_changed webhooks.
GET/orders/{id}The status of one of your ordersAbility: pos:orders
Parameters
id
path
string · required
Responses
200
The order
404
{error, message, details}
Error
POST/orders/{id}/cancelCancel one of your ordersAbility: pos:orders
Withdraws the order from the till's incoming-orders panel. Cancelling an order that is already cancelled answers the same order again. If the till already issued its receipt, the receipt stands and the cashier is asked to decide on a refund.
GET/webhooks/eventsThe events, each with sample dataAbility: pos:webhooks
Responses
200
{data: [{event, sample}]}
GET/webhooks/events/{event}/recentRecent real objects of one event (REST hook perform list)Ability: pos:webhooks
The newest real objects of one event, each wrapped in the envelope a delivery carries {id, event, tenant_id, occurred_at, api_version, data}, newest first. Zapier calls this as the REST Hook trigger's perform list when a user tests a Zap; Make uses it to fetch sample data. id is event:object-id (stable, for de-duplication), not the uuid of a live delivery. For order.status_changed, from is null and to is the current status. Besides pos:webhooks the client needs the ability that receives the event (pos:read, or pos:orders for order.status_changed). meta.sample is the static sample, for an account with no data yet.