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
| Field | Type | Description |
|---|---|---|
id | string | |
name | string | e.g. Daw Aye Aye |
phone | string | e.g. 09 9871 2345 |
township | string | Can be null. |
address | string | Can be null. |
archived | boolean | |
revision | number | Send as expected_revision when changing it. |
created_at | string | |
updated_at | string |
List customers, newest first, or changes since a time
GET /public/v1/customersScope: customers: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 |
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/customersScope: customers:write
The phone must not belong to another customer in the shop.
Body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | e.g. Daw Aye Aye |
phone | string | Yes | Finds the existing customer with this phone, or adds one. e.g. 09 9871 2345 |
township | string | Can be null. e.g. Hlaing | |
address | string | Can 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
| Field | Type | Required | Description |
|---|---|---|---|
customerId | string | Yes |
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
| Field | Type | Required | Description |
|---|---|---|---|
customerId | string | Yes |
Body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | ||
phone | string | ||
township | string | Can be null. | |
address | string | Can be null. | |
expected_revision | number |
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"
}'