How it works
- 1
Staff press a stage on the kitchen display.
- 2
Your system sends the event to Raqeb with the restaurant's API key.
- 3
Raqeb stores it and answers 200 right away.
- 4
The branch camera films that moment photo and clip, on the same order.
The first stage of a delivery-app order creates the order in Raqeb. Every later stage of the same delivery_number within 12 hours is added to that order.
Endpoint and API key
- Endpoint
POST https://raqebai.com/api/v1/kds/events- Content type
application/json, or a form (see Body format)- API key
X-API-Key: rqk_…header- Body
- JSON (recommended) or a form, up to 64 KB, one event per request
- Rate limit
- 600 events per minute per key
- One key per restaurant, used for all its branches. It always starts with
rqk_. - The restaurant creates it in Raqeb (Camera settings → Kitchen display → Create key) and sends it to you separately. It is shown to them once.
- Send it only in the header — never in the URL or the body. Keep it server-side, not in code shipped to a browser or tablet.
- If the restaurant creates a new key, the old one stops at once and you receive
401until you switch.
Body format
| Format | Accepted? | Notes |
|---|---|---|
| JSON | Yes — recommended | An object, or a list (kept as items). Read even if Content-Type is missing. Keeps nested data and types (number, text, empty), so it is read most exactly. |
| Form | Yes | x-www-form-urlencoded, for systems that cannot send JSON. Needs the header Content-Type: application/x-www-form-urlencoded. Every value is flat text. |
| XML, plain text, files | Not yet | Refused with 422. If your system only sends XML, tell us and we will add it. |
Two ways to connect
Pick the one that is easier for you. Both use the same endpoint, API key and answers.
Way 1 · Our format
Send the fields below. Nothing to set up on our side.
Events
The event field. Go by the meaning, not the name: handover_done is ready for pickup, done_handover_and_calling is handed over.
| Value | Meaning | What Raqeb does |
|---|---|---|
handover_done | Ready for pickup (calling) | Photo and clip of this stage |
done_handover_and_calling | Handed over | Photo and clip of this stage |
recall_button | Recalled to preparation | Photo and clip of this stage |
test_event | Connection test | Stored; shows the branch code to the restaurant. Nothing is filmed |
Fields
event_idrequiredUnique ID of this event (a UUID is ideal), up to 80 characters. Send the same value when you retry — an event is stored once per
event_id.eventrequiredOne of the values in Events.
branch_coderequiredThe branch's code in your system, up to 64 characters (e.g.
BR-01). Keep it stable per branch.branch_nameoptionalThe branch's name in your system. Helps the restaurant link the code.
delivery_numberrequiredThe order number from the delivery app (HungerStation, Jahez, Keeta, …), complete, as the app shows it.
order_numberoptionalYour own receipt number. Shown for reference only.
customer_typerequiredplatformfor delivery-app orders. Any other value is stored but not filmed.event_time_utcrequiredWhen the stage was pressed, ISO 8601, e.g.
2026-12-01T14:05:09Z.Must carry a time zone (Zor+03:00) — a time without one is refused (stale_event). Accepted from 7 days in the past to 5 minutes ahead.any other fieldoptionalStored with the event as sent (e.g.
elapsed_seconds,clip_window_hint).
Example
{
"event_id": "6f1c2a9e-1b7d-4c55-9a0e-2f4b8d3e7c11",
"event": "handover_done",
"branch_code": "BR-01",
"branch_name": "Olaya Branch",
"delivery_number": "HS-500123987",
"order_number": "1045",
"customer_type": "platform",
"event_time_utc": "2026-12-01T14:05:09Z",
"elapsed_seconds": 412
}curl -X POST https://raqebai.com/api/v1/kds/events \
-H "Content-Type: application/json" \
-H "X-API-Key: rqk_YOUR_KEY" \
-d '{
"event_id": "test-BR-01-001",
"event": "test_event",
"branch_code": "BR-01",
"branch_name": "Olaya Branch",
"event_time_utc": "2026-12-01T14:00:00Z"
}'Go-live steps
- 1RestaurantRestaurant: Creates the key in Raqeb and sends it to you with this page's link.
- 2YouYou: Add the endpoint and key to your system.
- 3YouYou: Send a
test_eventfrom every branch, with itsbranch_code. - 4RestaurantRestaurant: Links each code that arrived to its branch (Branch codes).
- 5RestaurantRestaurant: Chooses which stages each camera films (none chosen = all stages).
- 6BothBoth: One real delivery-app order; check that it is answered
documented.
Keep the sending device's clock synced (automatic time). The photo is taken from the recording at event_time_utcexactly. The camera recorder's clock needs nothing from you — Raqeb's branch program sets it.
Responses
Every answer says whether your message was received: "received": true or "received": false, and the order number we read. Never resend a message that got 200.
HTTP/1.1 200 OK
{
"received": true,
"message": "Message received.",
"order_number": "HS-500123987",
"status": "documented",
"detail": "The order was documented with a photo and clip."
}HTTP/1.1 401 Unauthorized
{
"received": false,
"message": "Message not received: the API key is missing or wrong.",
"error": "invalid_key"
}| Field | Meaning |
|---|---|
received | true — we have your message. false — we do not; see error. |
message | The same, in words. |
order_number | The delivery-app order number we read from your message, so you can match the answer to your order. null in way 2 until your fields are mapped. (Not the order_numberfield of way 1's request, which is your receipt number.) |
status | What became of it — see Event status. |
detail | The status, in words. |
error | Only when not received: why (invalid_key, too_large, not_json, …). |
HTTP codes and retries
| Response | Meaning | What to do |
|---|---|---|
200 | Received (received: true). | Nothing. Do not resend. |
401 | Missing, wrong or revoked key (invalid_key). | Do not retry. Ask the restaurant for its current key. |
413 | Body larger than 64 KB. | Send a smaller body. |
422 | Not JSON or a form (not_json), a value we cannot store such as NaN or a NUL character (bad_value), or a message in our format without event_id (event_id_missing). | Fix the request. |
429 | More than 600 events per minute for this key. | Retry shortly, same event_id. |
5xx / timeout | The event may not have been stored. | Retry with the same event_id and growing waits (e.g. 5 s, 30 s, 2 min, 10 min). |
Offline branch?Queue the messages and send them when the connection is back, each with the original time of the press. The photo is taken from the camera's recording at that instant, so a delay of up to 7 days loses nothing.
Event status
The status inside a received answer says what became of the message. It is for your logs; the restaurant sees the same list under Latest events.
| status | Meaning |
|---|---|
documented | The order was created in Raqeb and this stage was filmed. |
attached | This stage was added to an order an earlier stage created. |
test | Test event received. |
duplicate | This event_id was received before. |
awaiting_mapping | Your own format (way 2), stored. When Raqeb maps your fields, messages from the last 24 hours are acted on. |
unmapped_branch | The branch code is not linked yet. Filmed automatically if it is linked within a day. |
not_platform | customer_type is not platform. |
no_number | delivery_number is missing or too short to be a delivery-app order number. |
stale_event | The time is missing, cannot be read, has no time zone (way 1), or is outside the accepted window. |
ignored_type | Unknown event value. |
camera_off / no_camera | Camera documenting is off, or no camera films this stage (restaurant setting). |
restaurant_stopped | The restaurant's account is stopped. |
failed | Our error. The event is stored and logged for our team; resending it will not change the result. |