πŸ” Update Order

Endpoint: POST /api/order/update

Description: Blend can update the order status (ACCEPTED, CANCELED, etc.)

Authorization: Required (Authorization: Bearer \<token>)

πŸ“¦ Example Request

{
    "order_id": "44456",
    "branch_id": "11",
    "brand_id": "5000",
    "status": "ACCEPTED" // ACCEPTED, PREPARING, CANCELED, REJECTED, TIME_OUT
}

πŸ—‚ Field Descriptions

FieldTypeDescription
order_idstringThe Blend-generated ID of the order to update
branch_idstringThe branch responsible for the order
brand_idstringID of the brand placing the order
statusstringNew order status: ACCEPTED, PREPARING, CANCELED, REJECTED, TIME_OUT


🧠 Behavior

  • Called by Blend when a change in order status needs to be reflected in the POS system.
  • The POS should:
    • Update internal records with the new status.
    • Trigger any internal flows (e.g., printing, refunding, order cancellation).

πŸ”§ Example Use Cases

  • Admin cancels the order via Blend β†’ status becomes CANCELED.
  • Kitchen confirms they’re preparing the order β†’ Blend pushes PREPARING.
  • `Timeout occurred on the delivery app β†’ Blend marks order as TIME_OUT.

βœ… Notes

  • The order_id matches the one received in the initial Create Order request.
  • If the order does not exist or has already been finalized, the POS may ignore or log it.
  • This API allows Blend to remain the single source of truth for order state.
  • Return appropriate HTTP codes:
    • 200 OK if updated
    • 404 if order not found
    • 401 if token missing or invalid