Roles and permissions
When making API calls with an entity user token, keep in mind that:- The
/products*endpoints require a role with theproductpermission. - The
/measure_units*endpoints require a role with thereceivablepermission.
Manage measure units
A measure unit is the standard unit used to measure the quantity of a product. Depending on the entity’s country, measure units may be required for products before a receivable can be issued. Examples: meters, kilograms, pieces, hours. To create a measure unit, callPOST /measure_units:
id property that acts as an identifier for the created measure unit. This ID is required to assign a measure unit to a product.
One measure unit per productEach product can only be associated with a single measure unit. If a specific product is available in kilograms and tonnes, you can create multiple products, one for each measure unit.
List all measure units
To get a list of all created measure units, callGET /measure_units.
Retrieve a measure unit
To get information about a specific measure unit, call theGET /measure_units/{unit_id}.
Update a measure unit
To update a specific measure unit, call thePATCH /measure_units/{unit_id}.
Delete a measure unit
To delete an existing measure unit, call theDELETE /measure_units/{unit_id}.
Manage products
Create a product
You can create a new product by callingPOST /products. The request body needs to contain the product name, type (product or service), price per unit, and other necessary information.
Product pricingProduct prices must be specified in the minor units of currency, that is, the smallest currency unit available such as cent or penny. For example, 15 EUR is represented as 1500 (in euro cents).
id of the created product:
Product currencies on invoicesCurrencies of products added as line items on an invoice must always match the invoice’s base currency. You can create products and services in multiple currencies to match the invoice’s base currency.
List all products
To get a list of all created products, callGET /products. You can sort the products by name, and filter them by name, price, measure unit, and other fields. For a full list of available sort and filter parameters, see the description of the GET /products endpoint.
Some examples:
GET /products?name__icontains=shirt- get all products with “shirt” in the name (case-insensitive).GET /products?price__lte=10000¤cy=EUR- get all products whose price is €100 or less.GET /products?created_at__gte=2022-01-01T00%3A00%3A00- get all products added on or after January 1, 2022.GET /products?measure_unit_id=e3ef0046-450f-40e5-b2f1-7fcfefcff450- get all products that use a specific measure unit (such as kilograms or pieces).
Find receivables that include a specific product
To find invoices, quotes, or credit notes that include a specific product, useGET /receivables with the product_ids and product_ids__in filters.
product_ids is an AND filter and product_ids__in is an OR filter.
Examples
Spaces and line breaks have been added for readability only.
Retrieve a product
To get information about a specific product, callGET /products/{product_id}.
Edit a product
To edit an existing product, callPATCH /products/{product_id} .
Delete a product
To delete an existing product, callDELETE /product/{product_id}.