Skip to content
DocsAPI reference

Products

Search your catalog, inspect a product, and understand the product write endpoints.

List products

GET /api/admin/products

Requires an admin identity. API token callers need catalog:read. Results are scoped to the shop and exclude soft-deleted products.

bash
curl --get "$SELLFORGE_ADMIN_URL/api/admin/products" \
  -H "Authorization: Bearer $SELLFORGE_API_TOKEN" \
  --data-urlencode 'q=brake' \
  --data-urlencode 'status=published' \
  --data-urlencode 'limit=25'

Filters

ParameterValues or behavior
qSearches name, SKU, slug, and variant SKU
statusdraft, published, or archived
category_idCategory ID, or ohne for no category
brand_idBrand ID, or ohne for no brand
supplier_idSupplier ID, or ohne for no supplier
limit, offsetPagination parameters

Products are ordered by creation date, newest first. The response contains products, count, limit, and offset. Employee channel restrictions can reduce the returned page after pagination.

Retrieve a product

GET /api/admin/products/:id

bash
curl "$SELLFORGE_ADMIN_URL/api/admin/products/$PRODUCT_ID" \
  -H "Authorization: Bearer $SELLFORGE_API_TOKEN"

The response wraps the record in product.

Common fields

FieldMeaning
idProduct ID
name, slug, skuProduct identity
statusPublication state
typeSTANDARD, ASSEMBLY, or INTERNAL
base_price_centsGross base selling price in cents
cost_price_centsPurchase-cost field, nullable
category_id, brand_id, supplier_idRelated record IDs
variantsProduct variants
imagesProduct image data

Create a product

POST /api/products

Product writes use /api/products, rather than the administrative read-list prefix. A session must have an allowed role; API token writes need catalog:write and must pass the additional write-policy checks.

bash
curl "$SELLFORGE_ADMIN_URL/api/products" \
  -H "Authorization: Bearer $SELLFORGE_API_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "Workshop T-shirt",
    "sku": "TSHIRT-001",
    "status": "draft",
    "type": "STANDARD",
    "base_price_cents": 2490
  }'

name is required. status defaults to draft, type to STANDARD, and base_price_cents to 0. The schema also accepts descriptions, related IDs, variants, images, and options.

Update a product

PATCH /api/products/:id accepts a partial product body and returns the updated product.

json
{
  "name": "Workshop T-shirt — blue",
  "base_price_cents": 2690
}

Price and other sensitive changes are subject to the token policy when using machine credentials. An update to the base product is not a replacement for configuring channel-specific listings.

Storefront visibility

The public listing is GET /api/store/products. Publication, tenant, channel listing, and visibility rules determine what shoppers can see. See Storefront.

Source reviewed Checked against kernel fe5c475.

Found something unclear? Let us know

Start exploring

NavigateOpenEscClose