FOMDocs
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

FieldTypeDescription
idstring
order_nostringe.g. ORD-0319
statusnew, confirmed, out_for_delivery, delivered, cancelled
payment_methodunknown, cod, prepaid, kbzpay, wavepay, other
payment_statusunpaid, paid, refunded
paid_atstringCan be null.
currencystringe.g. MMK
subtotalnumbere.g. 20000
delivery_feenumbere.g. 2000
totalnumbere.g. 22000
notestringCan be null.
sourcestringe.g. manual
tracking_urlstringThe customer's tracking page. Can be null.
customerobject
customer.idstring
customer.namestringe.g. Daw Aye Aye
customer.phonestringe.g. 09 9871 2345
customer.townshipstringCan be null.
customer.addressstringCan be null.
itemsarray of objects
items[].idstring
items[].product_idstringCan be null.
items[].variant_idstringCan be null.
items[].namestringe.g. Cotton T-shirt (Red / M)
items[].qtynumbere.g. 2
items[].unit_pricenumbere.g. 12000
items[].line_totalnumbere.g. 24000
deliveryobjectCan be null.
delivery.idstring
delivery.statusscheduled, out_for_delivery, delivered
delivery.scheduled_atstringCan be null.
delivery.delivered_atstringCan be null.
revisionnumberSend as expected_revision when changing it.
created_atstring
updated_atstring

List orders, newest first, or changes since a time

GET /public/v1/orders

Scope: orders:read

Query parameters

FieldTypeRequiredDescription
limitnumberDefault 50. 1–100.
cursorstringThe next_cursor from the previous page.
updated_sincestringOnly 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
statusnew, confirmed, out_for_delivery, delivered, cancelled
customer_idstring

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/orders

Scope: 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

FieldTypeRequiredDescription
customer_idstringAn existing customer.
customerobject
customer.namestringYese.g. Daw Aye Aye
customer.phonestringYesFinds the existing customer with this phone, or adds one. e.g. 09 9871 2345
customer.townshipstringCan be null. e.g. Hlaing
customer.addressstringCan be null.
itemsarray of objectsYes
items[].variant_idstringA product variant. Its name and price are used when you leave them out.
items[].namestringNeeded when there is no variant_id. e.g. T-shirt (Red, M)
items[].qtynumberYesAt least 1. e.g. 2
items[].unit_pricenumberPrice for one; the variant's price when left out. At least 0. e.g. 12000
payment_methodunknown, cod, prepaid, kbzpay, wavepay, otherDefault "cod".
delivery_feenumberAt least 0. e.g. 3000
notestringCan be null.
statusnew, confirmedDefault "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

FieldTypeRequiredDescription
orderIdstringYes

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}/status

Scope: 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

FieldTypeRequiredDescription
orderIdstringYes

Body

FieldTypeRequiredDescription
statusnew, confirmed, out_for_delivery, delivered, cancelledYes
notestringCan be null.
expected_revisionnumberThe 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
  }'

On this page