FOMDocs
Reference

Customers API

Every customers endpoint, its fields and an example.

Generated from FOM's OpenAPI document. Every request needs an API key; see Authentication.

The customer object

FieldTypeDescription
idstring
namestringe.g. Daw Aye Aye
phonestringe.g. 09 9871 2345
townshipstringCan be null.
addressstringCan be null.
archivedboolean
revisionnumberSend as expected_revision when changing it.
created_atstring
updated_atstring

List customers, newest first, or changes since a time

GET /public/v1/customers

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

Returns

A page of customer objects (The customer object).

Example

curl "https://api.getfom.com/public/v1/customers?limit=50&updated_since=2026-11-25T08%3A00%3A00.000Z" \
  -H "Authorization: Bearer $FOM_API_KEY"

Add a customer

POST /public/v1/customers

Scope: customers:write

The phone must not belong to another customer in the shop.

Body

FieldTypeRequiredDescription
namestringYese.g. Daw Aye Aye
phonestringYesFinds the existing customer with this phone, or adds one. e.g. 09 9871 2345
townshipstringCan be null. e.g. Hlaing
addressstringCan be null.

Returns

The customer (The customer object).

Example

curl -X POST "https://api.getfom.com/public/v1/customers" \
  -H "Authorization: Bearer $FOM_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "name": "Daw Aye Aye",
    "phone": "09 9871 2345",
    "township": "Hlaing"
  }'

One customer

GET /public/v1/customers/{customerId}

Scope: customers:read

Path parameters

FieldTypeRequiredDescription
customerIdstringYes

Returns

The customer (The customer object).

Example

curl "https://api.getfom.com/public/v1/customers/CUSTOMER_ID" \
  -H "Authorization: Bearer $FOM_API_KEY"

Change a customer's name, phone or address

PATCH /public/v1/customers/{customerId}

Scope: customers:write

Path parameters

FieldTypeRequiredDescription
customerIdstringYes

Body

FieldTypeRequiredDescription
namestring
phonestring
townshipstringCan be null.
addressstringCan be null.
expected_revisionnumber

Returns

The customer (The customer object).

Example

curl -X PATCH "https://api.getfom.com/public/v1/customers/CUSTOMER_ID" \
  -H "Authorization: Bearer $FOM_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "address": "No. 12, Baho Road"
  }'

On this page