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.
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
| Parameter | Values or behavior |
|---|---|
q | Searches name, SKU, slug, and variant SKU |
status | draft, published, or archived |
category_id | Category ID, or ohne for no category |
brand_id | Brand ID, or ohne for no brand |
supplier_id | Supplier ID, or ohne for no supplier |
limit, offset | Pagination 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
curl "$SELLFORGE_ADMIN_URL/api/admin/products/$PRODUCT_ID" \
-H "Authorization: Bearer $SELLFORGE_API_TOKEN"
The response wraps the record in product.
Common fields
| Field | Meaning |
|---|---|
id | Product ID |
name, slug, sku | Product identity |
status | Publication state |
type | STANDARD, ASSEMBLY, or INTERNAL |
base_price_cents | Gross base selling price in cents |
cost_price_cents | Purchase-cost field, nullable |
category_id, brand_id, supplier_id | Related record IDs |
variants | Product variants |
images | Product 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.
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.
{
"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.
Found something unclear? Let us know