Website Orders — Overview
If a restaurant has its own website or mobile app, you push the orders it takes there into Hızlıyo with this API. The order lands on the restaurant's order screen exactly like a marketplace order: it rings, the restaurant accepts it, the ticket prints, a courier is assigned. Every step (accepted, preparing, on the way, delivered, cancelled) comes back to your site as a signed webhook.
Who is this for?
The developer building the restaurant's own website. The third-party POS / delivery integration is a separate product, documented under Guide.
Flow
- Credentials — Hızlıyo issues a
client_idandclient_secretfor the restaurant and hands them to you. They are bound to that restaurant: orders sent with them can only land at that restaurant. - Token — exchange them for a 60-minute access token.
- Order — when the customer checks out, call
POST /orders. - Status — every step on the restaurant screen reaches you as a webhook. If you miss one, poll
GET /orders/{orderId}.
Basics
| Base URL | https://gw.hizliyo.com/api/web-orders/v1 |
| Format | JSON, UTF-8, camelCase fields |
| Time | ISO-8601, UTC |
| Money | Turkish lira, up to 2 decimals |
| Payment | Hızlıyo does not take payments. Send paid if you charged the customer on your site, unpaid if they pay at the door |
Every response uses the same envelope:
{ "success": true, "message": null, "data": { } }On error success is false and data carries a machine-readable code — see Errors.
Authentication
POST /api/web-orders/v1/token
Content-Type: application/json
{ "clientId": "wo_3f9a1c...", "clientSecret": "hzl_live_..." }{
"success": true,
"data": { "accessToken": "eyJhbGciOi...", "tokenType": "Bearer", "expiresIn": 3600, "environment": "live" }
}Send the token on every other call: Authorization: Bearer eyJhbGciOi...
- Tokens live 60 minutes. Fetch a new one on 401; do not fetch one per request — the token endpoint allows 60 calls per hour per IP.
- Keep
client_secreton your server only. Never ship it to a browser or inside a mobile app. - When the secret is rotated, the old one keeps working for 24 hours.
Test mode
Credentials start in test mode (environment: "test").
- Orders sent with a test token do not reach the restaurant screen and are not billed.
- The response has
test: trueand an order number starting withWB-TEST-. - If a webhook URL is set, you receive
order.accepted,order.preparing,order.ready,order.on_the_way,order.deliveredroughly 30–60 seconds apart — test your integration end to end with it. DELETE /test-dataclears your test records.
When you are ready, Hızlıyo switches the credentials to live. Fetch a new token after going live — a test token stays a test token even after the account goes live.
Launch checklist
- [ ] Sending the same order twice (network error, retry) creates one order (
X-Idempotency-Key). - [ ] You verify the webhook signature.
- [ ] You poll
GET /orders/{orderId}when a webhook is missed. - [ ] You wait
Retry-Afteron 429. - [ ] You tell the customer when
order.rejectedororder.cancelledarrives.