Raqeb developers

Kitchen display (KDS) webhook

Your kitchen display sends one HTTPS request to Raqeb each time staff press an order stage. Raqeb films that moment with the branch camera and keeps the photo and clip on the same order.

The one thing every request needs: the restaurant's API key in the X-API-Key header. Without it, or with an old key, the request is refused (401). Details in Endpoint and API key.

How it works

  1. 1

    Staff press a stage on the kitchen display.

  2. 2

    Your system sends the event to Raqeb with the restaurant's API key.

  3. 3

    Raqeb stores it and answers 200 right away.

  4. 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 401 until you switch.

Body format

FormatAccepted?Notes
JSONYes — recommendedAn 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.
FormYesx-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, filesNot yetRefused 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.

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.

ValueMeaningWhat Raqeb does
handover_doneReady for pickup (calling)Photo and clip of this stage
done_handover_and_callingHanded overPhoto and clip of this stage
recall_buttonRecalled to preparationPhoto and clip of this stage
test_eventConnection testStored; shows the branch code to the restaurant. Nothing is filmed

Fields

  • event_idrequired

    Unique 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.

  • eventrequired

    One of the values in Events.

  • branch_coderequired

    The branch's code in your system, up to 64 characters (e.g. BR-01). Keep it stable per branch.

  • branch_nameoptional

    The branch's name in your system. Helps the restaurant link the code.

  • delivery_numberrequired

    The order number from the delivery app (HungerStation, Jahez, Keeta, …), complete, as the app shows it.

  • order_numberoptional

    Your own receipt number. Shown for reference only.

  • customer_typerequired

    platform for delivery-app orders. Any other value is stored but not filmed.

  • event_time_utcrequired

    When the stage was pressed, ISO 8601, e.g. 2026-12-01T14:05:09Z.Must carry a time zone (Z or +03:00) — a time without one is refused (stale_event). Accepted from 7 days in the past to 5 minutes ahead.

  • any other fieldoptional

    Stored with the event as sent (e.g. elapsed_seconds, clip_window_hint).

Example

Request body
{
  "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
}
Test from the command line
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

  1. 1RestaurantRestaurant: Creates the key in Raqeb and sends it to you with this page's link.
  2. 2YouYou: Add the endpoint and key to your system.
  3. 3YouYou: Send a test_event from every branch, with its branch_code.
  4. 4RestaurantRestaurant: Links each code that arrived to its branch (Branch codes).
  5. 5RestaurantRestaurant: Chooses which stages each camera films (none chosen = all stages).
  6. 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.

Received
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."
}
Not received
HTTP/1.1 401 Unauthorized
{
  "received": false,
  "message": "Message not received: the API key is missing or wrong.",
  "error": "invalid_key"
}
FieldMeaning
receivedtrue — we have your message. false — we do not; see error.
messageThe same, in words.
order_numberThe 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.)
statusWhat became of it — see Event status.
detailThe status, in words.
errorOnly when not received: why (invalid_key, too_large, not_json, …).

HTTP codes and retries

ResponseMeaningWhat to do
200Received (received: true).Nothing. Do not resend.
401Missing, wrong or revoked key (invalid_key).Do not retry. Ask the restaurant for its current key.
413Body larger than 64 KB.Send a smaller body.
422Not 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.
429More than 600 events per minute for this key.Retry shortly, same event_id.
5xx / timeoutThe 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.

statusMeaning
documentedThe order was created in Raqeb and this stage was filmed.
attachedThis stage was added to an order an earlier stage created.
testTest event received.
duplicateThis event_id was received before.
awaiting_mappingYour own format (way 2), stored. When Raqeb maps your fields, messages from the last 24 hours are acted on.
unmapped_branchThe branch code is not linked yet. Filmed automatically if it is linked within a day.
not_platformcustomer_type is not platform.
no_numberdelivery_number is missing or too short to be a delivery-app order number.
stale_eventThe time is missing, cannot be read, has no time zone (way 1), or is outside the accepted window.
ignored_typeUnknown event value.
camera_off / no_cameraCamera documenting is off, or no camera films this stage (restaurant setting).
restaurant_stoppedThe restaurant's account is stopped.
failedOur error. The event is stored and logged for our team; resending it will not change the result.