Products
Products are simple catalogue items linked to one category and optionally one brand. Use reference as the phase-one external SKU/reference field.
Endpoints
| Method | Path | Use |
|---|
| POST | /v1/products | Create a product. |
| GET | /v1/products | List products. Supports active, category_id, and brand_id. |
| GET | /v1/products/{id} | Read one product. |
| PATCH | /v1/products/{id} | Update provided fields. |
| DELETE | /v1/products/{id} | Deactivate the product. |
| DELETE | /v1/products/{id}/hard | Permanently delete the product when no business records reference it. |
Create example
curl -X POST https://api.fenestro.io/v1/products \
-H "Authorization: Bearer fen_live_xxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"category_id": 12,
"brand_id": 7,
"name": "Sliding aluminium window",
"reference": "WIN-SLIDE-001",
"base_price": 245.50,
"price_per_square_meter": 125.75,
"sale_unit": "unit",
"min_width": 400,
"max_width": 1600,
"min_height": 500,
"max_height": 2200,
"main_image_url": "https://cdn.example.com/window.jpg"
}'
Required fields
| Field | Notes |
|---|
category_id | Must belong to the authenticated tenant and be active. |
name | 2 to 200 characters. |
base_price | Non-negative decimal. |
Common optional fields
| Field | Notes |
|---|
brand_id | Must belong to the authenticated tenant and be active. |
reference | Maximum 50 characters. Unique per tenant when provided. |
price_per_square_meter | Non-negative decimal. |
price_adjustment_percentage | Between -100 and 100. |
sale_unit | Maximum 20 characters. |
main_image_url, technical_sheet_url | Absolute URLs. |
Common product errors
| Error | Meaning |
|---|
invalid_category | The category does not exist, is inactive, or belongs to another tenant. |
invalid_brand | The brand does not exist, is inactive, or belongs to another tenant. |
duplicate_reference | The product reference already exists for this tenant. |
product_in_use | The product is referenced by existing business records and cannot be permanently deleted. |
Use DELETE /v1/products/{id} for normal catalogue removal. Use hard delete only for mistaken or test products. After creating a product, use Options and Product steps to make it configurable.