π§Ύ Create Order
This endpoint is called by Blend to create a new order in the POS system.
Endpoint: GET /api/orders
Description: Blend uses this to send a new order to the POS.
Authorization: Required (Authorization: Bearer \<token>
)
π¦ Example Request
{
"branch_id": "1",
"brand_id": "5000",
"partner_reference": "Jahez: 12327",
"note": "cut in half please",
"total": 11.5,
"subtotal": 10,
"tax": 1.15,
"status": "PENDING", // ACCEPTED, PREPARING, CANCELED, REJECTED, TIME_OUT
"customer": { //customer is optional
"phone": "0122222",
"name": "ssssw"
},
"products": [
{
"id": "101",
"quantity": 2,
"total": 11.5,
"note": null,
"modifiers": [
{
"id": "301",
"quantity": 2,
"total": 0,
"note": "Add cheese" // Optional: Note for the modifier
}
]
}
]
}
π Field Descriptions
Field | Type | Description |
---|---|---|
branch_id | string | The ID of the branch receiving the order |
brand_id | string | ID of the brand placing the order |
partner_reference | string | External system reference (e.g., "Jahez: 12327") |
note | string | Optional customer note |
total | float | Total price of the order including tax |
subtotal | float | Subtotal before tax |
tax | float | Total tax applied |
status | string | Initial order status (e.g. PENDING , ACCEPTED , etc.) |
customer.phone | string | Customer phone number (optional) |
customer.name | string | Customer name (optional) |
products[] | array | List of ordered products |
products[].id | string | Product ID (must match the menu structure) |
products[].quantity | integer | Quantity of the product ordered |
products[].total | float | Total price for the product (with modifiers) |
products[].note | string | Optional note for the product |
products[].modifiers[] | array | List of selected modifiers (optional) |
modifiers[].id | string | Modifier ID |
modifiers[].quantity | integer | Quantity of the modifier |
modifiers[].note | string | Optional note for the modifier |
π§Ύ Response POS
β
Success
{
"success": true,
"message": "Order created successfully",
"order_id": "123456"
}
π§ Behavior
- This is the core entry point for orders sent from Blend to the POS.
- The POS should:
- Create the order in its internal system.
- Respond with success or error.
π§ Example Use Cases
- A customer places an order from a delivery app (e.g., Jahez), routed through Blend.
- An admin pushes an order manually for testing or fulfillment.
- A retry happens after the order was missed or failed earlier.
β Notes
- Ensure product_id and modifier_id exist in the POS and match Blend's menu data.
- If product is not available in the selected branch, the POS should reject the order with a proper error.
- The POS can optionally delay printing or confirmation until status is updated (e.g., ACCEPTED).
- Authentication is mandatory β return 401 if token is missing or invalid.
- If any modifier is unknown or invalid, respond with a validation error.
Updated 10 days ago