FOMDocs
Reference

Products API

Every products endpoint, its fields and an example.

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

The product object

FieldTypeDescription
idstring
namestringe.g. Cotton T-shirt
descriptionstringCan be null.
option_namesarray of string
on_shop_pagebooleanListed on the public shop page.
archivedboolean
variantsarray of objects
variants[].idstring
variants[].option_valuesarray of string
variants[].labelstringe.g. Red / M
variants[].skustringCan be null.
variants[].pricenumbere.g. 12000
variants[].track_stockboolean
variants[].stock_qtynumbernull when stock is not tracked. Can be null.
variants[].low_stock_atnumberCan be null.
variants[].low_stockbooleanAt or below its low-stock level.
variants[].updated_atstring
revisionnumber
created_atstring
updated_atstringThe latest change to the product or any variant, stock included.

List products with variants and stock

GET /public/v1/products

Scope: products:read

With updated_since, a product counts as changed when it or any of its variants (including stock) changed.

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 product objects (The product object).

Example

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

Add a product with its variants

POST /public/v1/products

Scope: products:write

Body

FieldTypeRequiredDescription
namestringYese.g. Cotton T-shirt
descriptionstringCan be null.
option_namesarray of string
on_shop_pagebooleanDefault true.
variantsarray of objectsYes
variants[].idstringAn existing variant when updating; leave out to add one.
variants[].option_valuesarray of string
variants[].skustringCan be null.
variants[].pricenumberYesAt least 0. e.g. 12000
variants[].track_stockbooleanDefault true.
variants[].stock_qtynumberStarting stock for a new variant; change it later with the stock endpoint.
variants[].low_stock_atnumberCan be null.

Returns

The product (The product object).

Example

curl -X POST "https://api.getfom.com/public/v1/products" \
  -H "Authorization: Bearer $FOM_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "name": "Cotton T-shirt",
    "option_names": [
      "Colour",
      "Size"
    ],
    "variants": [
      {
        "option_values": [
          "Red",
          "M"
        ],
        "price": 12000
      }
    ]
  }'

One product with its variants and stock

GET /public/v1/products/{productId}

Scope: products:read

Path parameters

FieldTypeRequiredDescription
productIdstringYes

Returns

The product (The product object).

Example

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

Change a product

PATCH /public/v1/products/{productId}

Scope: products:write

Send variants to replace the list: give id for ones to keep; ones left out are archived. Change stock with the stock endpoint.

Path parameters

FieldTypeRequiredDescription
productIdstringYes

Body

FieldTypeRequiredDescription
namestring
descriptionstringCan be null.
option_namesarray of string
on_shop_pageboolean
variantsarray of objectsThe full list of variants; ones left out are archived.
variants[].idstringAn existing variant when updating; leave out to add one.
variants[].option_valuesarray of string
variants[].skustringCan be null.
variants[].pricenumberYesAt least 0. e.g. 12000
variants[].track_stockbooleanDefault true.
variants[].stock_qtynumberStarting stock for a new variant; change it later with the stock endpoint.
variants[].low_stock_atnumberCan be null.
expected_revisionnumber

Returns

The product (The product object).

Example

curl -X PATCH "https://api.getfom.com/public/v1/products/PRODUCT_ID" \
  -H "Authorization: Bearer $FOM_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "name": "Cotton T-shirt",
    "on_shop_page": true
  }'

Change a variant's stock

POST /public/v1/variants/{variantId}/stock

Scope: stock:write

Send delta to add or remove, or set after a stock count. Recorded in the stock history.

Path parameters

FieldTypeRequiredDescription
variantIdstringYes

Body

FieldTypeRequiredDescription
deltanumberAdd (or remove, if negative) this many. e.g. 5
setnumberSet stock to this count. e.g. 12
reasonmanual_adjust, restock, stock_countDefault "manual_adjust".
notestringCan be null.

Returns

The product (The product object).

Example

curl -X POST "https://api.getfom.com/public/v1/variants/VARIANT_ID/stock" \
  -H "Authorization: Bearer $FOM_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "delta": -2,
    "reason": "manual_adjust",
    "note": "Sold at the market"
  }'

On this page