HAAT Integration Docs

Submit order

Accept a customer order from HAAT into the market POS.

POST/api/submit-order

HAAT posts the order to your POS.

Example:

integrator-token: YOUR_INTEGRATOR_TOKEN
organization-token: YOUR_ORGANIZATION_TOKEN
REQUEST BODY SCHEMA: application/json
Itemsrequired
object[]

Order lines from HAAT.

Coderequired
integer

Product code from the catalog.

Name
string | null

Product name. Can be null.

SalePricerequired
number

Unit sale price.

Quantityrequired
number

Ordered quantity.

Unitsrequired
integer

1 Countable, 2 Weighable KG, 3 Weighable Quantity.

Totalrequired
number

SalePrice * Quantity.

Paymentsrequired
object[]

How the customer paid.

Amountrequired
number

Payment amount.

PaymentTyperequired
integer

1 Cash, 2 Credit card.

Comments
string | null

Payment note. Can be null.

Comments
string | null

Order note. Can be null.

Totalrequired
number

Order total.

RESPONSE BODY SCHEMA: application/json
status
string

Result status, for example success.

message
string

Human-readable result.

posOrderId
string

Your POS order id.

Responses

200 — Order accepted

Return posOrderId from your POS.

401 — Missing or invalid tokens

Validate both tokens before accepting the order.

Request example
cURL
bash
curl -X POST https://pos.example.com/api/submit-order \
  -H "integrator-token: YOUR_INTEGRATOR_TOKEN" \
  -H "organization-token: YOUR_ORGANIZATION_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"Items":[{"Code":76868,"SalePrice":12.5,"Quantity":2,"Units":2,"Total":25}],"Payments":[{"Amount":25,"PaymentType":2}],"Total":25}'
Response example
200
json
{"status":"success","message":"Order accepted","posOrderId":"MKT-78456"}

Type to search…

↑↓ navigate↵ openesc close