Skip to main content

Phase 5 β€” Chef Preparation

The flow where the chef receives a notification, processes the order, and updates its status to RideNDine for driver coordination.


Overview​

COOCO (notify) β†’ Chef β†’ COOCO (status update) β†’ RideNDine
StepFromToAction
5.1COOCOChefInternal notification
5.2ChefCOOCOPATCH /items/orders/:id
5.3COOCORideNDinePATCH /orders/status
5.4RideNDineCOOCOHTTP 200 acknowledge

Step 5.1 β€” Notify Chef (Internal)​

From: COOCO β†’ To: Chef

Purpose: Chef is notified of a paid order.

Directus Flow triggers when orders.payment_status = PAID:

  • Sends email / push notification to the chef

No requests are sent to RideNDine at this step.


Step 5.2 β€” Chef Updates Status​

From: Chef β†’ To: COOCO

Endpoint: PATCH /items/orders/:id

Chef updates via the OrderManagementPage:

Actionstatus
Accept orderPREPARING
Reject orderCANCELLED
Done cookingREADY_FOR_PICKUP

Step 5.3 β€” Sync Status to RideNDine​

From: COOCO β†’ To: RideNDine

Endpoint: PATCH /orders/status

Purpose: RideNDine knows when a driver needs to be dispatched.

Trigger: Directus Flow when orders.status changes, or an Extension hook.

Request Body​

{
"ridendine_order_id": "<orders.ridendine_order_id>",
"external_order_id": "<orders.id>",
"status": "PREPARING | READY | CANCELLED",
"estimated_ready_at": "<ISO8601>",
"chef_note": "<optional note>"
}

Step 5.4 β€” RideNDine Acknowledge​

From: RideNDine β†’ To: COOCO

RideNDine returns HTTP 200 confirming it has received the status.

COOCO logs to integration_events. No additional fields need to be saved.