HAAT Integration Docs

Submit order

HAAT sends a new customer order to your POS in real time.

POST/api/orders

Reply with your posOrderId. The same Idempotency-Key must not create a second order.

Example:

Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9…
X-Haat-Version: 1.0
Idempotency-Key: 7dda287d-21de-4159-a058-e60618e9b786
HEADER SCHEMA
Authorizationrequired
string

Bearer <token>, or HMAC via X-Signature.

X-Haat-Versionrequired
string

Always 1.0.

Idempotency-Key
string

UUID. The same key must not create a second order.

Content-Typerequired
string

application/json.

REQUEST BODY SCHEMA: application/json
orderIdrequired
integer

HAAT order id.

businessIdrequired
integer

HAAT restaurant / store id.

customerrequired
object
namerequired
string
phonerequired
string
emailrequired
string

May be empty.

address
string | null
itemsrequired
object[]

Meals and deals only. Same Item shape for meals, deal meals, and variations.

idrequired
integer

HAAT menu item id.

quantityrequired
integer
pricerequired
number

Unit / original price for a meal or deal.

finalPricerequired
number

Meal: price + sum of direct variation price values (quantity not multiplied). Deal: price + sum of (child.finalPrice × child.quantity).

namerequired
string

English display name.

namesrequired
object

Localized names. Keys en, ar, he, fr when present.

variationsrequired
object[] | null

Meal with no add-ons: []. Addon / leaf: null. Deal: nested meals (same Item shape; nested isDeal is false).

isDealrequired
boolean

false on a meal (variations are add-ons). true only on the deal line (variations are selected meals).

paymentsrequired
object[]
paymentTyperequired
string

credit_card or cash.

amountrequired
number
payRestaurantrequired
number

Sum of payment amounts.

deliveryTyperequired
string

delivery, pickup, seat, or unknown.

customerNotesrequired
string

May be empty. Not null.

formatCreatedDaterequired
string

ISO-8601 UTC, for example 2026-10-26T08:00:00.000Z.

formatDeliveryDaterequired
string

ISO-8601 UTC.

formatReadyDaterequired
string

ISO-8601 UTC.

deliveryEstimationTimerequired
integer | null

Minutes from ready time to arrival.

restaurantDiscountrequired
number
remakerequired
boolean
RESPONSE BODY SCHEMA: application/json
statusrequired
string

For example success.

messagerequired
string

For example Order accepted.

posOrderIdrequired
string

Your POS order id.

Responses

200 — Order accepted

Return status, message, and posOrderId.

401 — Invalid or missing authentication token

Check Bearer or X-Signature.

Request example
cURL
bash
curl -X POST https://pos.example.com/api/orders \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "X-Haat-Version: 1.0" \
  -H "Idempotency-Key: 7dda287d-21de-4159-a058-e60618e9b786" \
  -H "Content-Type: application/json" \
  -d '{
  "orderId": 90001,
  "businessId": 120,
  "customer": {
    "name": "Abed",
    "phone": "0500000000",
    "email": "[email protected]",
    "address": null
  },
  "items": [
    {
      "id": 1001,
      "quantity": 1,
      "price": 30,
      "finalPrice": 34,
      "name": "Burger",
      "names": { "en": "Burger", "ar": "برغر", "he": "המבורגר", "fr": "Burger" },
      "variations": [
        {
          "id": 11,
          "quantity": 1,
          "price": 4,
          "finalPrice": 4,
          "name": "Cheese",
          "names": { "en": "Cheese", "ar": "جبنة", "he": "גבינה", "fr": "Fromage" },
          "variations": null,
          "isDeal": false
        }
      ],
      "isDeal": false
    },
    {
      "id": 2001,
      "quantity": 1,
      "price": 50,
      "finalPrice": 58,
      "name": "Family Deal",
      "names": { "en": "Family Deal", "ar": "صفقة عائلية", "he": "דיל משפחתי", "fr": "Menu familial" },
      "variations": [
        {
          "id": 3001,
          "quantity": 1,
          "price": 5,
          "finalPrice": 8,
          "name": "Deal Burger",
          "names": { "en": "Deal Burger", "ar": "برغر الصفقة", "he": "המבורגר הדיל", "fr": "Burger menu" },
          "variations": [
            {
              "id": 31,
              "quantity": 1,
              "price": 3,
              "finalPrice": 3,
              "name": "Cheese",
              "names": { "en": "Cheese", "ar": "جبنة", "he": "גבינה", "fr": "Fromage" },
              "variations": null,
              "isDeal": false
            }
          ],
          "isDeal": false
        }
      ],
      "isDeal": true
    }
  ],
  "payments": [
    { "paymentType": "credit_card", "amount": 60 }
  ],
  "payRestaurant": 60,
  "deliveryType": "delivery",
  "customerNotes": "",
  "formatCreatedDate": "2026-10-26T08:00:00.000Z",
  "formatDeliveryDate": "2026-10-26T08:30:00.000Z",
  "formatReadyDate": "2026-10-26T08:30:00.000Z",
  "deliveryEstimationTime": 15,
  "restaurantDiscount": 0,
  "remake": false
}'
Response example
200
json
{"status":"success","message":"Order accepted","posOrderId":"ORD-78456"}

Type to search…

↑↓ navigate↵ openesc close