Table of Contents

Order Creation

This section explains how UEAT sends an order to the POS system using the Open API. The goal is to ensure orders are acknowledged and processed reliably.


Flow Overview

The process involves:

  1. UEAT assembles the order in the Open API model.
  2. UEAT sends the order to the POS with a requestId for tracking.
  3. POS acknowledges receipt of the order (HTTP status only).

Sequence Diagram

sequenceDiagram

    participant UEAT as UEAT

    participant POS as POS

  

    UEAT->>POS: Send order (POST)

    POS-->>UEAT: Acknowledge receipt (HTTP status)

    POS->>UEAT: Return Order Status (PUT)

    UEAT-->>POS: Acknowledge status (if errors)


Endpoint

POST {POS Partner Endpoint}
Authorization: Bearer {JWT_TOKEN}

Note: Authentication uses a JWT token provided by UEAT during onboarding. See authentication for details.


Request Payload

{
  "Location": {
    "Id": "019a9794-ea27-71a8-bc7a-ecffd058546c",
    "Name": "Location 1",
    "PhoneNumber": "6478858481",
    "Address": {
      "Unit": null,
      "CivicNumber": "1130",
      "StreetName": "Boulevard Charest Ouest",
      "City": "Québec",
      "PostalCode": "J8Z 1T3"
    }
  },
  "OrderIds": {
    "OrderId": 1188,
    "ExternalOrderId": null
  },
  "Customer": {
    "FirstName": "n",
    "LastName": "gr",
    "PhoneNumber": "+1 418 555 2131",
    "Email": "ngr@ueat.io",
    "Allergies": null
  },
  "DeliveryInfo": null,
  "OrderTime": {
    "PreparationType": "Asap",
    "PickupDateTime": "2026-01-13T19:39:31.303+00:00"
  },
  "Items": [
    {
      "Id": "burger_veggie",
      "Name": "Burger Vege",
      "Quantity": 1,
      "UnitPrice": 850,
      "Modifiers": [],
      "Note": ""
    }
  ],
  "Promotions": [],
  "Fees": [
    {
      "Id": "serviceFee",
      "Amount": 700,
      "Type": "Service"
    }
  ],
  "PersonalizedQuestions": [
    {
      "Label": "This is a test question",
      "Answer": "Test 2"
    }
  ],
  "Service": {
    "Channel": "Web",
    "OrderType": "Takeout",
    "ProximityDeliveryInfo": "",
    "KioskId": ""
  },
  "CounterNotes": "",
  "Payment": {
    "Details": [],
    "IsOrderPaid": false,
    "PaymentDateTime": null,
    "Subtotal": 1550,
    "Taxes": [
      {
        "Amount": 78,
        "Name": "GST",
        "Type": "Federal"
      },
      {
        "Amount": 155,
        "Name": "QST",
        "Type": "State"
      }
    ],
    "Tips": 0,
    "Total": 1783
  }
}
  • requestId: Unique identifier for tracking. - In the Header
  • locationId: UEAT location identifier.
  • order: Complete order object (see Order Model Reference).

Response

The POS should return only the ReferenceID(check #), OrderID, a status code and optional system errors:

Success

{
	"check#" : "String",
	"orderID": "Int", //Provided in the initial payload
	"status": "String", // Completed, Rejected
	200 OK
}

Failure (system/communication errors only)

{
  "errors": [
    {
      "code": "TIMEOUT",
      "message": "POS did not respond in time"
    }
  ]
}

Important: Functional errors related to order content should not be returned here—they will be handled in a separate status update call.


Postman Example

curl -X POST "https://api.ueat.io/v2/orders" \
     -H "Authorization: Bearer YOUR_JWT_TOKEN" \
     -H "Content-Type: application/json" \
     -d '{
           "requestId": "123e4567-e89b-12d3-a456-426614174000",
           "locationId": "ueat_location_456",
           "order": { ... }
         }'

Timeout Handling

  • UEAT expects a response within 5 minutes.
  • If no response is received:
    • The order remains in UEAT’s cache for retry.
    • UEAT may cancel the order if the POS does not respond after the retry window.
  • Cancelation flow is currently not in the API scope.

Resend Order

When an order is rejected, UEAT support may resend a corrected order to the POS:

  • The OrderId remains the same.
  • UEAT will resend only if the status is rejected.
  • Completed orders cannot be resent.

Sequence Diagram

sequenceDiagram
    participant UEAT as UEAT
    participant POS as POS

    UEAT->>POS: Resend order (POST)
    POS-->>UEAT: Acknowledge receipt
    POS->>UEAT: Return updated status


Best Practices

  • Always include requestId for traceability.
  • Log both the request and acknowledgment response.
  • Monitor for timeouts and implement retry logic.
  • Ensure idempotency when resending orders.

Order Model

For the details on each Field, see Order Model Reference.

Order Creation Example

File Description
Example Order Creation #1 Take out order example
--- Delivery order example
--- Kiosk order example
--- Hub order example