NuminaDevelopers
Dashboard
Update product

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

  • idstring (uuid)Required
    Product ID

Body

application/json

  • product_numberstring· nullable· max 64 chars
    Product number (varenummer). Must be unique within the company; null or empty clears it.
  • descriptionstring· max 500 chars
    Product name
  • quantitynumber· ≥ 0
    Default quantity
  • unitstring
    Unit
    One ofunithourdaykilometerweekmonth
  • Unit price (excl. VAT)
  • Account number of a sales account (from GET /v1/accounts)
  • Use the sales account's default VAT code. Cannot be combined with vat_code.
  • vat_codestring· nullable
    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 failed
  • 401Invalid or missing authentication
  • 403Missing scope, or the company is archived
  • 404The resource does not exist in this company
  • 409The product number is already used
  • 429Rate limit exceeded
  • 500Internal Server Error

Every error has the same shape. See Errors.

cURL
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"
  }'
JavaScript
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();
Python
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
200
{
  "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
}