Create product
POST
/v1/productsCreates a product in the company's catalogue. Returns 409 when the product number is already used.
Requires one ofproducts:writewrite:draftwrite:ledger
Body
application/json
- Product number (varenummer). Must be unique within the company; null or empty clears it.
- Product name (required)
- Default quantity (default 1)
Default
1 - unitstringUnit (default unit)One of
unithourdaykilometerweekmonthDefault
"unit" - Unit price (excl. VAT)
- Account number of a sales account (from GET /v1/accounts)
- use_account_vatbooleanUse the sales account's default VAT code. Cannot be combined with vat_code.
- Sales VAT code (e.g. 'U25') from GET /v1/vat-codes, or null for no VAT. Setting it turns use_account_vat off.
Errors
400Invalid input or validation failed401Invalid or missing authentication403Missing scope, or the company is archived409The product number is already used429Rate limit exceeded500Internal Server Error
Every error has the same shape. See Errors.
curl -X POST https://api.numina.app/v1/products \
-H "Authorization: Bearer numi_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"product_number": "1001",
"description": "Consulting hour",
"quantity": 1,
"unit": "hour",
"unit_price": 950,
"sales_account_number": 1000,
"use_account_vat": true,
"vat_code": "U25"
}'const response = await fetch("https://api.numina.app/v1/products", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.NUMINA_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"product_number": "1001",
"description": "Consulting hour",
"quantity": 1,
"unit": "hour",
"unit_price": 950,
"sales_account_number": 1000,
"use_account_vat": true,
"vat_code": "U25"
}),
});
const data = await response.json();import os
import requests
response = requests.post(
"https://api.numina.app/v1/products",
headers={
"Authorization": f"Bearer {os.environ['NUMINA_API_KEY']}",
},
json={
"product_number": "1001",
"description": "Consulting hour",
"quantity": 1,
"unit": "hour",
"unit_price": 950,
"sales_account_number": 1000,
"use_account_vat": True,
"vat_code": "U25"
},
)
data = response.json()Response
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"product_number": "1001",
"description": "Consulting hour",
"quantity": 1,
"unit": "hour",
"unit_price": 950,
"sales_account_number": 1000,
"use_account_vat": true,
"vat_code": null
}