API reference
Items
The catalogue of products and services, with their price and VAT. Document lines reference items by id. 5 operations.
List items
GET /items
Returns a paginated, filterable list of items. By default returns 20 items starting at offset 0.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
offset | query | number | Number of records to skip (offset) |
limit | query | number | Maximum number of records to return |
sort | query | string | Sort field and order (e.g. name:asc, unitPrice:desc) |
search | query | string | Global search term |
name | query | string | Filter by name |
type | query | string | Filter by type One of: PRODUCT, SERVICE |
unitPrice | query | number | Filter by unit price |
unitType | query | string | Filter by unit type One of: BOX, CUBIC_METER, DAY, HOUR, KILOGRAM, LITER, METER, MONTH, NA, PACKAGE, SQUARE_METER, UNIT, WEEK |
taxRate | query | number | Filter by tax rate |
vatRate | query | string | Filter by VAT rate One of: EXEMPT, INTERMEDIATE, NORMAL, REDUCED |
vatExemptionReason | query | string | Filter by VAT exemption reason |
withholdingTaxPercent | query | number | Filter by withholding tax percentage |
withholdingTaxType | query | string | Filter by withholding tax type One of: IRC, IRS, IS |
withholdingTaxAvailable | query | boolean | Filter by withholding tax availability |
withholdingTaxReason | query | string | Filter by withholding tax reason |
isArchived | query | boolean | Filter by archived status |
vatTerritory | query | string | Filter by VAT territory One of: AZORES, CONTINENTAL, MADEIRA, UNKNOWN |
isAutoVATEnabled | query | boolean | Filter by automatic VAT enabled |
curl 'https://api.fiz.co/items' \
--header "x-api-key: $FIZ_API_KEY"import { Fiz } from '@fiz-co/sdk';
const fiz = new Fiz(); // reads FIZ_API_KEY
const result = await fiz.items.list();from fiz_sdk import Fiz
fiz = Fiz() # reads FIZ_API_KEY
result = fiz.items.list()<?php
require 'vendor/autoload.php';
$fiz = new Fiz\Fiz(); // reads FIZ_API_KEY
$result = $fiz->items->list();Response 200
List of items returned successfully
| Field | Type | Description |
|---|---|---|
[]. | string | Unique item identifier |
[]. | string · can be null | Item name |
[]. | string · can be null | Item description |
[]. | string | Item type One of: PRODUCT, SERVICE |
[]. | string · can be null | Payment terms |
[]. | number · can be null | Unit price before VAT |
[]. | number · can be null | Unit price including VAT, computed from the price before VAT and the item's rate, rounded to the cent |
[]. | string · can be null | Unit type One of: BOX, CUBIC_METER, DAY, HOUR, KILOGRAM, LITER, METER, MONTH, NA, PACKAGE, SQUARE_METER, UNIT, WEEK |
[]. | string · can be null | Default discount type for the catalogue item One of: AMOUNT, PERCENT |
[]. | number · can be null | Default discount percentage for the catalogue item |
[]. | number · can be null | Default absolute per-unit discount amount for the catalogue item |
[]. | string · can be null | VAT rate One of: EXEMPT, INTERMEDIATE, NORMAL, REDUCED |
[]. | string · can be null | VAT territory One of: AZORES, CONTINENTAL, MADEIRA, UNKNOWN |
[]. | string · can be null | OSS country |
[]. | number · can be null | Tax rate |
[]. | string · can be null | VAT exemption reason |
[]. | number · can be null | Withholding tax percentage |
[]. | string · can be null | Withholding tax type One of: IRC, IRS, IS |
[]. | boolean · can be null | Withholding tax available |
[]. | string · can be null | Withholding tax reason |
[]. | boolean · can be null | Automatic VAT mode available |
[]. | boolean · can be null | Automatic VAT enabled |
Errors
400Invalid parameters401Unauthorized - API key missing or invalid429The OAuth connection’s request limit is reached. Nothing was executed: repeat the same request after Retry-After seconds.
Create item
POST /items
Creates a new item/product in the system
Request body
Data required to create the item
| Field | Type | Description |
|---|---|---|
name required | string | Item name |
description | string | Item description |
type required | string | Item type One of: PRODUCT, SERVICE |
unitPrice | number | Unit price before VAT. Send unitPrice OR unitPriceWithVat, not both. |
unitPriceWithVat | number | Unit price including VAT, instead of unitPrice. Converted to the price before VAT at the item's rate and stored that way: if the rate changes later, the VAT-inclusive price moves and the price before VAT stays. Cannot be sent with an amount discount (unitDiscountType=AMOUNT or unitDiscountAmount), which is before VAT: use a percentage discount. |
unitType | string | Unit type One of: BOX, CUBIC_METER, DAY, HOUR, KILOGRAM, LITER, METER, MONTH, NA, PACKAGE, SQUARE_METER, UNIT, WEEK |
unitDiscountType | string | Default discount type for the catalogue item (optional). Without this field no discount is applied, even if unitDiscountPercent or unitDiscountAmount is set. Deprecated (still works): a discount depends on the deal, not the item — prefer the invoice line discount (discountType/discountPercent/discountAmount). One of: AMOUNT, PERCENT |
unitDiscountPercent | number | Default discount percentage for the catalogue item (e.g. 10 for 10%). Requires unitDiscountType=PERCENT. Deprecated (still works): a discount depends on the deal, not the item — prefer the invoice line discount (discountType/discountPercent/discountAmount). |
unitDiscountAmount | number | Default absolute per-unit discount amount for the catalogue item. Requires unitDiscountType=AMOUNT and must not exceed unitPrice. Deprecated (still works): a discount depends on the deal, not the item — prefer the invoice line discount (discountType/discountPercent/discountAmount). |
vatRate required | string | VAT rate One of: EXEMPT, INTERMEDIATE, NORMAL, REDUCED |
vatTerritory | string | VAT territory One of: CONTINENTAL, MADEIRA, AZORES |
ossCountry | string | OSS country (mutually exclusive with vatTerritory). Deprecated (still works): the OSS country depends on the customer, not the item. |
taxRate | number | Tax rate (percentage). When omitted it is derived from vatRate and the territory, or from the OSS country. On an OSS item (ossCountry) it must be one of the rates that country applies to the vatRate band (0 when exempt); it is required when the country has two rates in the same band. |
vatExemptionReason | string | VAT exemption reason |
termsOfPayment | string | Payment terms |
isAutoVATEnabled | boolean | Automatic VAT enabled |
withholdingTaxAvailable | boolean | Withholding tax available. Deprecated (still works): whether a document withholds depends on the customer — prefer withholdingTaxEnabled/withholdingTaxPercent on the invoice line. |
withholdingTaxPercent | number | Withholding tax percentage. Deprecated (still works): whether a document withholds depends on the customer — prefer withholdingTaxEnabled/withholdingTaxPercent on the invoice line. |
withholdingTaxType | string | Withholding tax type. Deprecated (still works): whether a document withholds depends on the customer — prefer withholdingTaxEnabled/withholdingTaxPercent on the invoice line. One of: IRC, IRS, IS |
withholdingTaxReason | string | Withholding tax reason. Deprecated (still works): whether a document withholds depends on the customer — prefer withholdingTaxEnabled/withholdingTaxPercent on the invoice line. |
# Once per operation. Keep it and reuse it on every retry.
IDEMPOTENCY_KEY=$(uuidgen)curl --request POST 'https://api.fiz.co/items' \
--header "x-api-key: $FIZ_API_KEY" \
--header 'Content-Type: application/json' \
--header "Idempotency-Key: ${IDEMPOTENCY_KEY:?set the operation key first, in the step above}" \
--data '{
"name": "TV LG 55",
"type": "PRODUCT",
"vatRate": "NORMAL",
"unitPrice": 1500
}'import { Fiz } from '@fiz-co/sdk';
const fiz = new Fiz(); // reads FIZ_API_KEY
const result = await fiz.items.create({
name: 'TV LG 55',
type: 'PRODUCT',
vatRate: 'NORMAL',
unitPrice: 1500,
});from fiz_sdk import Fiz
fiz = Fiz() # reads FIZ_API_KEY
result = fiz.items.create({
"name": "TV LG 55",
"type": "PRODUCT",
"vatRate": "NORMAL",
"unitPrice": 1500,
})<?php
require 'vendor/autoload.php';
$fiz = new Fiz\Fiz(); // reads FIZ_API_KEY
$result = $fiz->items->create([
'name' => 'TV LG 55',
'type' => 'PRODUCT',
'vatRate' => 'NORMAL',
'unitPrice' => 1500,
]);Response 201
Item created successfully
| Field | Type | Description |
|---|---|---|
id | string | Unique item identifier |
name | string · can be null | Item name |
description | string · can be null | Item description |
type | string | Item type One of: PRODUCT, SERVICE |
termsOfPayment | string · can be null | Payment terms |
unitPrice | number · can be null | Unit price before VAT |
unitPriceWithVat | number · can be null | Unit price including VAT, computed from the price before VAT and the item's rate, rounded to the cent |
unitType | string · can be null | Unit type One of: BOX, CUBIC_METER, DAY, HOUR, KILOGRAM, LITER, METER, MONTH, NA, PACKAGE, SQUARE_METER, UNIT, WEEK |
unitDiscountType | string · can be null | Default discount type for the catalogue item One of: AMOUNT, PERCENT |
unitDiscountPercent | number · can be null | Default discount percentage for the catalogue item |
unitDiscountAmount | number · can be null | Default absolute per-unit discount amount for the catalogue item |
vatRate | string · can be null | VAT rate One of: EXEMPT, INTERMEDIATE, NORMAL, REDUCED |
vatTerritory | string · can be null | VAT territory One of: AZORES, CONTINENTAL, MADEIRA, UNKNOWN |
ossCountry | string · can be null | OSS country |
taxRate | number · can be null | Tax rate |
vatExemptionReason | string · can be null | VAT exemption reason |
withholdingTaxPercent | number · can be null | Withholding tax percentage |
withholdingTaxType | string · can be null | Withholding tax type One of: IRC, IRS, IS |
withholdingTaxAvailable | boolean · can be null | Withholding tax available |
withholdingTaxReason | string · can be null | Withholding tax reason |
autoVATModeAvailable | boolean · can be null | Automatic VAT mode available |
isAutoVATEnabled | boolean · can be null | Automatic VAT enabled |
Errors
400Invalid data401Unauthorized - API key missing or invalid409A request with this idempotency key is still being processed, or the outcome of the first attempt is unknown422The idempotency key was already used with a different request body429The OAuth connection’s request limit is reached. Nothing was executed: repeat the same request after Retry-After seconds.
Get item by ID
GET /items/{id}
Returns a single item by its unique identifier
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | string | Unique item identifier |
curl 'https://api.fiz.co/items/ID' \
--header "x-api-key: $FIZ_API_KEY"import { Fiz } from '@fiz-co/sdk';
const fiz = new Fiz(); // reads FIZ_API_KEY
const result = await fiz.items.retrieve('ID');from fiz_sdk import Fiz
fiz = Fiz() # reads FIZ_API_KEY
result = fiz.items.retrieve("ID")<?php
require 'vendor/autoload.php';
$fiz = new Fiz\Fiz(); // reads FIZ_API_KEY
$result = $fiz->items->retrieve('ID');Response 200
Item found
| Field | Type | Description |
|---|---|---|
id | string | Unique item identifier |
name | string · can be null | Item name |
description | string · can be null | Item description |
type | string | Item type One of: PRODUCT, SERVICE |
termsOfPayment | string · can be null | Payment terms |
unitPrice | number · can be null | Unit price before VAT |
unitPriceWithVat | number · can be null | Unit price including VAT, computed from the price before VAT and the item's rate, rounded to the cent |
unitType | string · can be null | Unit type One of: BOX, CUBIC_METER, DAY, HOUR, KILOGRAM, LITER, METER, MONTH, NA, PACKAGE, SQUARE_METER, UNIT, WEEK |
unitDiscountType | string · can be null | Default discount type for the catalogue item One of: AMOUNT, PERCENT |
unitDiscountPercent | number · can be null | Default discount percentage for the catalogue item |
unitDiscountAmount | number · can be null | Default absolute per-unit discount amount for the catalogue item |
vatRate | string · can be null | VAT rate One of: EXEMPT, INTERMEDIATE, NORMAL, REDUCED |
vatTerritory | string · can be null | VAT territory One of: AZORES, CONTINENTAL, MADEIRA, UNKNOWN |
ossCountry | string · can be null | OSS country |
taxRate | number · can be null | Tax rate |
vatExemptionReason | string · can be null | VAT exemption reason |
withholdingTaxPercent | number · can be null | Withholding tax percentage |
withholdingTaxType | string · can be null | Withholding tax type One of: IRC, IRS, IS |
withholdingTaxAvailable | boolean · can be null | Withholding tax available |
withholdingTaxReason | string · can be null | Withholding tax reason |
autoVATModeAvailable | boolean · can be null | Automatic VAT mode available |
isAutoVATEnabled | boolean · can be null | Automatic VAT enabled |
Errors
400Invalid ID401Unauthorized - API key missing or invalid404Item not found429The OAuth connection’s request limit is reached. Nothing was executed: repeat the same request after Retry-After seconds.
Update item
PATCH /items/{id}
Updates an existing item/product
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | string | Unique item identifier |
Request body
Item fields to update
| Field | Type | Description |
|---|---|---|
name | string | Item name |
description | string | Item description |
unitPrice | number | Unit price before VAT. Send unitPrice OR unitPriceWithVat, not both. |
unitPriceWithVat | number | Unit price including VAT, instead of unitPrice. Converted to the price before VAT at the item's rate and stored that way: if the rate changes later, the VAT-inclusive price moves and the price before VAT stays. Cannot be sent with an amount discount (unitDiscountType=AMOUNT or unitDiscountAmount), which is before VAT: use a percentage discount. |
unitType | string | Unit type One of: BOX, CUBIC_METER, DAY, HOUR, KILOGRAM, LITER, METER, MONTH, NA, PACKAGE, SQUARE_METER, UNIT, WEEK |
vatRate | string | VAT rate One of: EXEMPT, INTERMEDIATE, NORMAL, REDUCED |
vatTerritory | string | VAT territory One of: CONTINENTAL, MADEIRA, AZORES |
ossCountry | string | OSS country (mutually exclusive with vatTerritory). Deprecated (still works): the OSS country depends on the customer, not the item. |
taxRate | number | Tax rate (percentage). When omitted it is derived from vatRate and the territory, or from the OSS country. On an OSS item (ossCountry) it must be one of the rates that country applies to the vatRate band (0 when exempt); it is required when the country has two rates in the same band. |
vatExemptionReason | string | VAT exemption reason |
termsOfPayment | string | Payment terms |
isAutoVATEnabled | boolean | Automatic VAT enabled |
withholdingTaxAvailable | boolean | Withholding tax available. Deprecated (still works): whether a document withholds depends on the customer — prefer withholdingTaxEnabled/withholdingTaxPercent on the invoice line. |
withholdingTaxPercent | number | Withholding tax percentage. Deprecated (still works): whether a document withholds depends on the customer — prefer withholdingTaxEnabled/withholdingTaxPercent on the invoice line. |
withholdingTaxType | string | Withholding tax type. Deprecated (still works): whether a document withholds depends on the customer — prefer withholdingTaxEnabled/withholdingTaxPercent on the invoice line. One of: IRC, IRS, IS |
withholdingTaxReason | string | Withholding tax reason. Deprecated (still works): whether a document withholds depends on the customer — prefer withholdingTaxEnabled/withholdingTaxPercent on the invoice line. |
type required | string | Item type One of: PRODUCT, SERVICE |
unitDiscountType | string · can be null | Discount type for the catalogue item. Send null to remove the discount. If omitted, the type already stored on the item is kept. Deprecated (still works): a discount depends on the deal, not the item — prefer the invoice line discount (discountType/discountPercent/discountAmount). One of: AMOUNT, PERCENT |
unitDiscountPercent | number | Discount percentage for the catalogue item (e.g. 10 for 10%). Requires unitDiscountType=PERCENT, either in the request or already stored on the item. Deprecated (still works): a discount depends on the deal, not the item — prefer the invoice line discount (discountType/discountPercent/discountAmount). |
unitDiscountAmount | number | Absolute per-unit discount amount for the catalogue item. Requires unitDiscountType=AMOUNT, either in the request or already stored on the item, and must not exceed unitPrice. Deprecated (still works): a discount depends on the deal, not the item — prefer the invoice line discount (discountType/discountPercent/discountAmount). |
# Once per operation. Keep it and reuse it on every retry.
IDEMPOTENCY_KEY=$(uuidgen)curl --request PATCH 'https://api.fiz.co/items/ID' \
--header "x-api-key: $FIZ_API_KEY" \
--header 'Content-Type: application/json' \
--header "Idempotency-Key: ${IDEMPOTENCY_KEY:?set the operation key first, in the step above}" \
--data '{
"type": "PRODUCT"
}'import { Fiz } from '@fiz-co/sdk';
const fiz = new Fiz(); // reads FIZ_API_KEY
const result = await fiz.items.update('ID', {
type: 'PRODUCT',
});from fiz_sdk import Fiz
fiz = Fiz() # reads FIZ_API_KEY
result = fiz.items.update("ID", {
"type": "PRODUCT",
})<?php
require 'vendor/autoload.php';
$fiz = new Fiz\Fiz(); // reads FIZ_API_KEY
$result = $fiz->items->update('ID', [
'type' => 'PRODUCT',
]);Response 200
Item updated successfully
| Field | Type | Description |
|---|---|---|
id | string | Unique item identifier |
name | string · can be null | Item name |
description | string · can be null | Item description |
type | string | Item type One of: PRODUCT, SERVICE |
termsOfPayment | string · can be null | Payment terms |
unitPrice | number · can be null | Unit price before VAT |
unitPriceWithVat | number · can be null | Unit price including VAT, computed from the price before VAT and the item's rate, rounded to the cent |
unitType | string · can be null | Unit type One of: BOX, CUBIC_METER, DAY, HOUR, KILOGRAM, LITER, METER, MONTH, NA, PACKAGE, SQUARE_METER, UNIT, WEEK |
unitDiscountType | string · can be null | Default discount type for the catalogue item One of: AMOUNT, PERCENT |
unitDiscountPercent | number · can be null | Default discount percentage for the catalogue item |
unitDiscountAmount | number · can be null | Default absolute per-unit discount amount for the catalogue item |
vatRate | string · can be null | VAT rate One of: EXEMPT, INTERMEDIATE, NORMAL, REDUCED |
vatTerritory | string · can be null | VAT territory One of: AZORES, CONTINENTAL, MADEIRA, UNKNOWN |
ossCountry | string · can be null | OSS country |
taxRate | number · can be null | Tax rate |
vatExemptionReason | string · can be null | VAT exemption reason |
withholdingTaxPercent | number · can be null | Withholding tax percentage |
withholdingTaxType | string · can be null | Withholding tax type One of: IRC, IRS, IS |
withholdingTaxAvailable | boolean · can be null | Withholding tax available |
withholdingTaxReason | string · can be null | Withholding tax reason |
autoVATModeAvailable | boolean · can be null | Automatic VAT mode available |
isAutoVATEnabled | boolean · can be null | Automatic VAT enabled |
Errors
400Invalid data401Unauthorized - API key missing or invalid409A request with this idempotency key is still being processed, or the outcome of the first attempt is unknown422The idempotency key was already used with a different request body429The OAuth connection’s request limit is reached. Nothing was executed: repeat the same request after Retry-After seconds.
Archive item
DELETE /items/{id}
Archives an item by its unique identifier. The item is not permanently removed, only marked as archived.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | string | Unique item identifier |
# Once per operation. Keep it and reuse it on every retry.
IDEMPOTENCY_KEY=$(uuidgen)curl --request DELETE 'https://api.fiz.co/items/ID' \
--header "x-api-key: $FIZ_API_KEY" \
--header "Idempotency-Key: ${IDEMPOTENCY_KEY:?set the operation key first, in the step above}"import { Fiz } from '@fiz-co/sdk';
const fiz = new Fiz(); // reads FIZ_API_KEY
const result = await fiz.items.delete('ID');from fiz_sdk import Fiz
fiz = Fiz() # reads FIZ_API_KEY
result = fiz.items.delete("ID")<?php
require 'vendor/autoload.php';
$fiz = new Fiz\Fiz(); // reads FIZ_API_KEY
$result = $fiz->items->delete('ID');Response 200
Item archived successfully
| Field | Type | Description |
|---|---|---|
id | string | Unique item identifier |
name | string · can be null | Item name |
description | string · can be null | Item description |
type | string | Item type One of: PRODUCT, SERVICE |
termsOfPayment | string · can be null | Payment terms |
unitPrice | number · can be null | Unit price before VAT |
unitPriceWithVat | number · can be null | Unit price including VAT, computed from the price before VAT and the item's rate, rounded to the cent |
unitType | string · can be null | Unit type One of: BOX, CUBIC_METER, DAY, HOUR, KILOGRAM, LITER, METER, MONTH, NA, PACKAGE, SQUARE_METER, UNIT, WEEK |
unitDiscountType | string · can be null | Default discount type for the catalogue item One of: AMOUNT, PERCENT |
unitDiscountPercent | number · can be null | Default discount percentage for the catalogue item |
unitDiscountAmount | number · can be null | Default absolute per-unit discount amount for the catalogue item |
vatRate | string · can be null | VAT rate One of: EXEMPT, INTERMEDIATE, NORMAL, REDUCED |
vatTerritory | string · can be null | VAT territory One of: AZORES, CONTINENTAL, MADEIRA, UNKNOWN |
ossCountry | string · can be null | OSS country |
taxRate | number · can be null | Tax rate |
vatExemptionReason | string · can be null | VAT exemption reason |
withholdingTaxPercent | number · can be null | Withholding tax percentage |
withholdingTaxType | string · can be null | Withholding tax type One of: IRC, IRS, IS |
withholdingTaxAvailable | boolean · can be null | Withholding tax available |
withholdingTaxReason | string · can be null | Withholding tax reason |
autoVATModeAvailable | boolean · can be null | Automatic VAT mode available |
isAutoVATEnabled | boolean · can be null | Automatic VAT enabled |
Errors
400Invalid ID401Unauthorized - API key missing or invalid404Item not found409A request with this idempotency key is still being processed, or the outcome of the first attempt is unknown422The idempotency key was already used with a different request body429The OAuth connection’s request limit is reached. Nothing was executed: repeat the same request after Retry-After seconds.
Errors
Errors share one shape: statusCode, message, code and error, with the request id in the X-Request-Id header.