Reference
Orders API
Every orders endpoint, its fields and an example.
Generated from FOM's OpenAPI document. Every request needs an API key; see Authentication.
The order object
| Field | Type | Description |
|---|---|---|
id | string | |
order_no | string | e.g. ORD-0319 |
status | new, confirmed, out_for_delivery, delivered, cancelled | |
payment_method | unknown, cod, prepaid, kbzpay, wavepay, other | |
payment_status | unpaid, paid, refunded | |
paid_at | string | Can be null. |
currency | string | e.g. MMK |
subtotal | number | e.g. 20000 |
delivery_fee | number | e.g. 2000 |
total | number | e.g. 22000 |
note | string | Can be null. |
source | string | e.g. manual |
tracking_url | string | The customer's tracking page. Can be null. |
customer | object | |
customer.id | string | |
customer.name | string | e.g. Daw Aye Aye |
customer.phone | string | e.g. 09 9871 2345 |
customer.township | string | Can be null. |
customer.address | string | Can be null. |
items | array of objects | |
items[].id | string | |
items[].product_id | string | Can be null. |
items[].variant_id | string | Can be null. |
items[].name | string | e.g. Cotton T-shirt (Red / M) |
items[].qty | number | e.g. 2 |
items[].unit_price | number | e.g. 12000 |
items[].line_total | number | e.g. 24000 |
delivery | object | Can be null. |
delivery.id | string | |
delivery.status | scheduled, out_for_delivery, delivered | |
delivery.scheduled_at | string | Can be null. |
delivery.delivered_at | string | Can be null. |
revision | number | Send as expected_revision when changing it. |
created_at | string | |
updated_at | string |
List orders, newest first, or changes since a time
GET /public/v1/ordersScope: orders:read
Query parameters
| Field | Type | Required | Description |
|---|---|---|---|
limit | number | Default 50. 1–100. | |
cursor | string | The next_cursor from the previous page. | |
updated_since | string | Only records changed at or after this time, oldest change first. Keep the last updated_at you saw and ask from there to sync. e.g. 2026-11-25T08:00:00.000Z | |
status | new, confirmed, out_for_delivery, delivered, cancelled | ||
customer_id | string |
Returns
A page of order objects (The order object).
Example
curl "https://api.getfom.com/public/v1/orders?limit=50&updated_since=2026-11-25T08%3A00%3A00.000Z" \
-H "Authorization: Bearer $FOM_API_KEY"Create an order
POST /public/v1/ordersScope: orders:write
Give a customer_id, or a customer with a phone: an existing customer with that phone is used. Items with a variant_id take its name and price unless you send them. Stock is taken when the order is confirmed.
Body
| Field | Type | Required | Description |
|---|---|---|---|
customer_id | string | An existing customer. | |
customer | object | ||
customer.name | string | Yes | e.g. Daw Aye Aye |
customer.phone | string | Yes | Finds the existing customer with this phone, or adds one. e.g. 09 9871 2345 |
customer.township | string | Can be null. e.g. Hlaing | |
customer.address | string | Can be null. | |
items | array of objects | Yes | |
items[].variant_id | string | A product variant. Its name and price are used when you leave them out. | |
items[].name | string | Needed when there is no variant_id. e.g. T-shirt (Red, M) | |
items[].qty | number | Yes | At least 1. e.g. 2 |
items[].unit_price | number | Price for one; the variant's price when left out. At least 0. e.g. 12000 | |
payment_method | unknown, cod, prepaid, kbzpay, wavepay, other | Default "cod". | |
delivery_fee | number | At least 0. e.g. 3000 | |
note | string | Can be null. | |
status | new, confirmed | Default "new". |
Returns
The order (The order object).
Example
curl -X POST "https://api.getfom.com/public/v1/orders" \
-H "Authorization: Bearer $FOM_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"customer": {
"name": "Daw Aye Aye",
"phone": "09 9871 2345",
"township": "Hlaing"
},
"items": [
{
"name": "T-shirt (Red, M)",
"qty": 2,
"unit_price": 12000
}
],
"delivery_fee": 3000
}'One order with its items, customer and delivery
GET /public/v1/orders/{orderId}Scope: orders:read
Path parameters
| Field | Type | Required | Description |
|---|---|---|---|
orderId | string | Yes |
Returns
The order (The order object).
Example
curl "https://api.getfom.com/public/v1/orders/ORDER_ID" \
-H "Authorization: Bearer $FOM_API_KEY"Change an order's status
POST /public/v1/orders/{orderId}/statusScope: orders:write
Moves stock, deliveries and customer messages the same way as in FOM. Send expected_revision to be sure nobody changed the order since you read it.
Path parameters
| Field | Type | Required | Description |
|---|---|---|---|
orderId | string | Yes |
Body
| Field | Type | Required | Description |
|---|---|---|---|
status | new, confirmed, out_for_delivery, delivered, cancelled | Yes | |
note | string | Can be null. | |
expected_revision | number | The order revision you last saw; the change is refused if someone changed it since. |
Returns
The order (The order object).
Example
curl -X POST "https://api.getfom.com/public/v1/orders/ORDER_ID/status" \
-H "Authorization: Bearer $FOM_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"status": "confirmed",
"expected_revision": 3
}'