Update product
PUT
/v1/products/{id}Updates a product. Only provided fields are updated. Returns 409 when the product number is already used.
Requires one ofproducts:writewrite:draftwrite:ledger
Path parameters
- Product ID
Body
application/json
- Product number (varenummer). Must be unique within the company; null or empty clears it.
- Product name
- Default quantity
- unitstringUnitOne of
unithourdaykilometerweekmonth - unit_pricenumberUnit price (excl. VAT)
- sales_account_numberintegerAccount 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 archived404The resource does not exist in this company409The product number is already used429Rate limit exceeded500Internal Server Error
Every error has the same shape. See Errors.
curl -X PUT https://api.numina.app/v1/products/550e8400-e29b-41d4-a716-446655440000 \
-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/550e8400-e29b-41d4-a716-446655440000", {
method: "PUT",
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.put(
"https://api.numina.app/v1/products/550e8400-e29b-41d4-a716-446655440000",
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
}