Quickstart
You need a sandbox key (it starts with gok_test_). If you do not have one yet, see Getting access.
-
Set your key
Terminal window export GOORDER_API_KEY="gok_test_xxxxxxxxxxxxxxxxxxxxxxxx" -
Check the connection
Terminal window curl https://back.goorder.com/api/partner/v1/ping \-H "Authorization: Bearer $GOORDER_API_KEY"You should see
"environment": "sandbox"and the scopes of your key. -
Find an open store near your customer
Terminal window curl "https://back.goorder.com/api/partner/v1/stores?lat=25.2048&lng=55.2708&status=open&limit=5" \-H "Authorization: Bearer $GOORDER_API_KEY"Copy a store
id. Only stores that deliver to that point are returned, nearest first. -
Read its menu
Terminal window curl https://back.goorder.com/api/partner/v1/stores/STORE_ID/menu \-H "Authorization: Bearer $GOORDER_API_KEY"Copy an item
id(look for"available": true). -
Create an order
Terminal window curl -X POST https://back.goorder.com/api/partner/v1/orders \-H "Authorization: Bearer $GOORDER_API_KEY" \-H "Idempotency-Key: my-first-order-001" \-H "Content-Type: application/json" \-d '{"store_id": "STORE_ID","fulfilment": "delivery","items": [{ "item_id": "ITEM_ID", "quantity": 1 }],"customer": { "name": "Test Customer", "phone": "+971501234567" },"delivery_address": {"line1": "Marina Tower", "floor": "12", "apartment": "1204", "area": "Dubai Marina","location": { "lat": 25.2048, "lng": 55.2708 }},"payment_method": "cash"}'const res = await fetch('https://back.goorder.com/api/partner/v1/orders', {method: 'POST',headers: {Authorization: `Bearer ${process.env.GOORDER_API_KEY}`,'Idempotency-Key': 'my-first-order-001','Content-Type': 'application/json',},body: JSON.stringify({store_id: 'STORE_ID',fulfilment: 'delivery',items: [{ item_id: 'ITEM_ID', quantity: 1 }],customer: { name: 'Test Customer', phone: '+971501234567' },delivery_address: {line1: 'Marina Tower', floor: '12', apartment: '1204', area: 'Dubai Marina',location: { lat: 25.2048, lng: 55.2708 },},payment_method: 'cash',}),});const { data: order, error } = await res.json();import os, requestsres = requests.post("https://back.goorder.com/api/partner/v1/orders",headers={"Authorization": f"Bearer {os.environ['GOORDER_API_KEY']}","Idempotency-Key": "my-first-order-001",},json={"store_id": "STORE_ID","fulfilment": "delivery","items": [{"item_id": "ITEM_ID", "quantity": 1}],"customer": {"name": "Test Customer", "phone": "+971501234567"},"delivery_address": {"line1": "Marina Tower", "floor": "12", "apartment": "1204", "area": "Dubai Marina","location": {"lat": 25.2048, "lng": 55.2708},},"payment_method": "cash",},)order = res.json()["data"]The response is a
201with anOrderwhoseidstarts withsbx_and whosestatusisplaced. Run the same request again with the sameIdempotency-Keyand you get the same order back instead of a second one. -
Move it through the lifecycle
There is no restaurant in the sandbox, so you play it:
Terminal window curl -X POST https://back.goorder.com/api/partner/v1/sandbox/orders/ORDER_ID/advance \-H "Authorization: Bearer $GOORDER_API_KEY" \-H "Content-Type: application/json" -d '{}'Each call moves to the next status (
confirmed→preparing→ready→out_for_delivery→delivered) and fires the matching webhook. -
Read it back
Terminal window curl https://back.goorder.com/api/partner/v1/orders/ORDER_ID/tracking \-H "Authorization: Bearer $GOORDER_API_KEY"
- Receive events instead of polling: Webhooks
- The production-grade sequence of calls: Build an ordering flow
- Try every endpoint in the browser: API reference