🧾 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

FieldTypeDescription
branch_idstringThe ID of the branch receiving the order
brand_idstringID of the brand placing the order
partner_referencestringExternal system reference (e.g., "Jahez: 12327")
notestringOptional customer note
totalfloatTotal price of the order including tax
subtotalfloatSubtotal before tax
taxfloatTotal tax applied
statusstringInitial order status (e.g. PENDING, ACCEPTED, etc.)
customer.phonestringCustomer phone number (optional)
customer.namestringCustomer name (optional)
products[]arrayList of ordered products
products[].idstringProduct ID (must match the menu structure)
products[].quantityintegerQuantity of the product ordered
products[].totalfloatTotal price for the product (with modifiers)
products[].notestringOptional note for the product
products[].modifiers[]arrayList of selected modifiers (optional)
modifiers[].idstringModifier ID
modifiers[].quantityintegerQuantity of the modifier
modifiers[].notestringOptional 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.