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.

Authentication: an API key (x-api-key) or an OAuth access token.

Parameters

NameInTypeDescription
offsetquerynumberNumber of records to skip (offset)
limitquerynumberMaximum number of records to return
sortquerystringSort field and order (e.g. name:asc, unitPrice:desc)
searchquerystringGlobal search term
namequerystringFilter by name
typequerystringFilter by type
One of: PRODUCT, SERVICE
unitPricequerynumberFilter by unit price
unitTypequerystringFilter by unit type
One of: BOX, CUBIC_METER, DAY, HOUR, KILOGRAM, LITER, METER, MONTH, NA, PACKAGE, SQUARE_METER, UNIT, WEEK
taxRatequerynumberFilter by tax rate
vatRatequerystringFilter by VAT rate
One of: EXEMPT, INTERMEDIATE, NORMAL, REDUCED
vatExemptionReasonquerystringFilter by VAT exemption reason
withholdingTaxPercentquerynumberFilter by withholding tax percentage
withholdingTaxTypequerystringFilter by withholding tax type
One of: IRC, IRS, IS
withholdingTaxAvailablequerybooleanFilter by withholding tax availability
withholdingTaxReasonquerystringFilter by withholding tax reason
isArchivedquerybooleanFilter by archived status
vatTerritoryquerystringFilter by VAT territory
One of: AZORES, CONTINENTAL, MADEIRA, UNKNOWN
isAutoVATEnabledquerybooleanFilter 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

FieldTypeDescription
[].idstringUnique item identifier
[].namestring · can be nullItem name
[].descriptionstring · can be nullItem description
[].typestringItem type
One of: PRODUCT, SERVICE
[].termsOfPaymentstring · can be nullPayment terms
[].unitPricenumber · can be nullUnit price before VAT
[].unitPriceWithVatnumber · can be nullUnit price including VAT, computed from the price before VAT and the item's rate, rounded to the cent
[].unitTypestring · can be nullUnit type
One of: BOX, CUBIC_METER, DAY, HOUR, KILOGRAM, LITER, METER, MONTH, NA, PACKAGE, SQUARE_METER, UNIT, WEEK
[].unitDiscountTypestring · can be nullDefault discount type for the catalogue item
One of: AMOUNT, PERCENT
[].unitDiscountPercentnumber · can be nullDefault discount percentage for the catalogue item
[].unitDiscountAmountnumber · can be nullDefault absolute per-unit discount amount for the catalogue item
[].vatRatestring · can be nullVAT rate
One of: EXEMPT, INTERMEDIATE, NORMAL, REDUCED
[].vatTerritorystring · can be nullVAT territory
One of: AZORES, CONTINENTAL, MADEIRA, UNKNOWN
[].ossCountrystring · can be nullOSS country
[].taxRatenumber · can be nullTax rate
[].vatExemptionReasonstring · can be nullVAT exemption reason
[].withholdingTaxPercentnumber · can be nullWithholding tax percentage
[].withholdingTaxTypestring · can be nullWithholding tax type
One of: IRC, IRS, IS
[].withholdingTaxAvailableboolean · can be nullWithholding tax available
[].withholdingTaxReasonstring · can be nullWithholding tax reason
[].autoVATModeAvailableboolean · can be nullAutomatic VAT mode available
[].isAutoVATEnabledboolean · can be nullAutomatic VAT enabled

Errors

  • 400 Invalid parameters
  • 401 Unauthorized - API key missing or invalid
  • 429 The 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

Authentication: an API key (x-api-key) or an OAuth access token. Send an Idempotency-Key to retry this call safely.

Request body

Data required to create the item

FieldTypeDescription
name requiredstringItem name
descriptionstringItem description
type requiredstringItem type
One of: PRODUCT, SERVICE
unitPricenumberUnit price before VAT. Send unitPrice OR unitPriceWithVat, not both.
unitPriceWithVatnumberUnit 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.
unitTypestringUnit type
One of: BOX, CUBIC_METER, DAY, HOUR, KILOGRAM, LITER, METER, MONTH, NA, PACKAGE, SQUARE_METER, UNIT, WEEK
unitDiscountTypestringDefault 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
unitDiscountPercentnumberDefault 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).
unitDiscountAmountnumberDefault 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 requiredstringVAT rate
One of: EXEMPT, INTERMEDIATE, NORMAL, REDUCED
vatTerritorystringVAT territory
One of: CONTINENTAL, MADEIRA, AZORES
ossCountrystringOSS country (mutually exclusive with vatTerritory). Deprecated (still works): the OSS country depends on the customer, not the item.
taxRatenumberTax 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.
vatExemptionReasonstringVAT exemption reason
termsOfPaymentstringPayment terms
isAutoVATEnabledbooleanAutomatic VAT enabled
withholdingTaxAvailablebooleanWithholding tax available. Deprecated (still works): whether a document withholds depends on the customer — prefer withholdingTaxEnabled/withholdingTaxPercent on the invoice line.
withholdingTaxPercentnumberWithholding tax percentage. Deprecated (still works): whether a document withholds depends on the customer — prefer withholdingTaxEnabled/withholdingTaxPercent on the invoice line.
withholdingTaxTypestringWithholding 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
withholdingTaxReasonstringWithholding 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

FieldTypeDescription
idstringUnique item identifier
namestring · can be nullItem name
descriptionstring · can be nullItem description
typestringItem type
One of: PRODUCT, SERVICE
termsOfPaymentstring · can be nullPayment terms
unitPricenumber · can be nullUnit price before VAT
unitPriceWithVatnumber · can be nullUnit price including VAT, computed from the price before VAT and the item's rate, rounded to the cent
unitTypestring · can be nullUnit type
One of: BOX, CUBIC_METER, DAY, HOUR, KILOGRAM, LITER, METER, MONTH, NA, PACKAGE, SQUARE_METER, UNIT, WEEK
unitDiscountTypestring · can be nullDefault discount type for the catalogue item
One of: AMOUNT, PERCENT
unitDiscountPercentnumber · can be nullDefault discount percentage for the catalogue item
unitDiscountAmountnumber · can be nullDefault absolute per-unit discount amount for the catalogue item
vatRatestring · can be nullVAT rate
One of: EXEMPT, INTERMEDIATE, NORMAL, REDUCED
vatTerritorystring · can be nullVAT territory
One of: AZORES, CONTINENTAL, MADEIRA, UNKNOWN
ossCountrystring · can be nullOSS country
taxRatenumber · can be nullTax rate
vatExemptionReasonstring · can be nullVAT exemption reason
withholdingTaxPercentnumber · can be nullWithholding tax percentage
withholdingTaxTypestring · can be nullWithholding tax type
One of: IRC, IRS, IS
withholdingTaxAvailableboolean · can be nullWithholding tax available
withholdingTaxReasonstring · can be nullWithholding tax reason
autoVATModeAvailableboolean · can be nullAutomatic VAT mode available
isAutoVATEnabledboolean · can be nullAutomatic VAT enabled

Errors

  • 400 Invalid data
  • 401 Unauthorized - API key missing or invalid
  • 409 A request with this idempotency key is still being processed, or the outcome of the first attempt is unknown
  • 422 The idempotency key was already used with a different request body
  • 429 The 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

Authentication: an API key (x-api-key) or an OAuth access token.

Parameters

NameInTypeDescription
id requiredpathstringUnique 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

FieldTypeDescription
idstringUnique item identifier
namestring · can be nullItem name
descriptionstring · can be nullItem description
typestringItem type
One of: PRODUCT, SERVICE
termsOfPaymentstring · can be nullPayment terms
unitPricenumber · can be nullUnit price before VAT
unitPriceWithVatnumber · can be nullUnit price including VAT, computed from the price before VAT and the item's rate, rounded to the cent
unitTypestring · can be nullUnit type
One of: BOX, CUBIC_METER, DAY, HOUR, KILOGRAM, LITER, METER, MONTH, NA, PACKAGE, SQUARE_METER, UNIT, WEEK
unitDiscountTypestring · can be nullDefault discount type for the catalogue item
One of: AMOUNT, PERCENT
unitDiscountPercentnumber · can be nullDefault discount percentage for the catalogue item
unitDiscountAmountnumber · can be nullDefault absolute per-unit discount amount for the catalogue item
vatRatestring · can be nullVAT rate
One of: EXEMPT, INTERMEDIATE, NORMAL, REDUCED
vatTerritorystring · can be nullVAT territory
One of: AZORES, CONTINENTAL, MADEIRA, UNKNOWN
ossCountrystring · can be nullOSS country
taxRatenumber · can be nullTax rate
vatExemptionReasonstring · can be nullVAT exemption reason
withholdingTaxPercentnumber · can be nullWithholding tax percentage
withholdingTaxTypestring · can be nullWithholding tax type
One of: IRC, IRS, IS
withholdingTaxAvailableboolean · can be nullWithholding tax available
withholdingTaxReasonstring · can be nullWithholding tax reason
autoVATModeAvailableboolean · can be nullAutomatic VAT mode available
isAutoVATEnabledboolean · can be nullAutomatic VAT enabled

Errors

  • 400 Invalid ID
  • 401 Unauthorized - API key missing or invalid
  • 404 Item not found
  • 429 The 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

Authentication: an API key (x-api-key) or an OAuth access token. Send an Idempotency-Key to retry this call safely.

Parameters

NameInTypeDescription
id requiredpathstringUnique item identifier

Request body

Item fields to update

FieldTypeDescription
namestringItem name
descriptionstringItem description
unitPricenumberUnit price before VAT. Send unitPrice OR unitPriceWithVat, not both.
unitPriceWithVatnumberUnit 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.
unitTypestringUnit type
One of: BOX, CUBIC_METER, DAY, HOUR, KILOGRAM, LITER, METER, MONTH, NA, PACKAGE, SQUARE_METER, UNIT, WEEK
vatRatestringVAT rate
One of: EXEMPT, INTERMEDIATE, NORMAL, REDUCED
vatTerritorystringVAT territory
One of: CONTINENTAL, MADEIRA, AZORES
ossCountrystringOSS country (mutually exclusive with vatTerritory). Deprecated (still works): the OSS country depends on the customer, not the item.
taxRatenumberTax 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.
vatExemptionReasonstringVAT exemption reason
termsOfPaymentstringPayment terms
isAutoVATEnabledbooleanAutomatic VAT enabled
withholdingTaxAvailablebooleanWithholding tax available. Deprecated (still works): whether a document withholds depends on the customer — prefer withholdingTaxEnabled/withholdingTaxPercent on the invoice line.
withholdingTaxPercentnumberWithholding tax percentage. Deprecated (still works): whether a document withholds depends on the customer — prefer withholdingTaxEnabled/withholdingTaxPercent on the invoice line.
withholdingTaxTypestringWithholding 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
withholdingTaxReasonstringWithholding tax reason. Deprecated (still works): whether a document withholds depends on the customer — prefer withholdingTaxEnabled/withholdingTaxPercent on the invoice line.
type requiredstringItem type
One of: PRODUCT, SERVICE
unitDiscountTypestring · can be nullDiscount 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
unitDiscountPercentnumberDiscount 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).
unitDiscountAmountnumberAbsolute 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

FieldTypeDescription
idstringUnique item identifier
namestring · can be nullItem name
descriptionstring · can be nullItem description
typestringItem type
One of: PRODUCT, SERVICE
termsOfPaymentstring · can be nullPayment terms
unitPricenumber · can be nullUnit price before VAT
unitPriceWithVatnumber · can be nullUnit price including VAT, computed from the price before VAT and the item's rate, rounded to the cent
unitTypestring · can be nullUnit type
One of: BOX, CUBIC_METER, DAY, HOUR, KILOGRAM, LITER, METER, MONTH, NA, PACKAGE, SQUARE_METER, UNIT, WEEK
unitDiscountTypestring · can be nullDefault discount type for the catalogue item
One of: AMOUNT, PERCENT
unitDiscountPercentnumber · can be nullDefault discount percentage for the catalogue item
unitDiscountAmountnumber · can be nullDefault absolute per-unit discount amount for the catalogue item
vatRatestring · can be nullVAT rate
One of: EXEMPT, INTERMEDIATE, NORMAL, REDUCED
vatTerritorystring · can be nullVAT territory
One of: AZORES, CONTINENTAL, MADEIRA, UNKNOWN
ossCountrystring · can be nullOSS country
taxRatenumber · can be nullTax rate
vatExemptionReasonstring · can be nullVAT exemption reason
withholdingTaxPercentnumber · can be nullWithholding tax percentage
withholdingTaxTypestring · can be nullWithholding tax type
One of: IRC, IRS, IS
withholdingTaxAvailableboolean · can be nullWithholding tax available
withholdingTaxReasonstring · can be nullWithholding tax reason
autoVATModeAvailableboolean · can be nullAutomatic VAT mode available
isAutoVATEnabledboolean · can be nullAutomatic VAT enabled

Errors

  • 400 Invalid data
  • 401 Unauthorized - API key missing or invalid
  • 409 A request with this idempotency key is still being processed, or the outcome of the first attempt is unknown
  • 422 The idempotency key was already used with a different request body
  • 429 The 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.

Authentication: an API key (x-api-key) or an OAuth access token. Send an Idempotency-Key to retry this call safely.

Parameters

NameInTypeDescription
id requiredpathstringUnique 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

FieldTypeDescription
idstringUnique item identifier
namestring · can be nullItem name
descriptionstring · can be nullItem description
typestringItem type
One of: PRODUCT, SERVICE
termsOfPaymentstring · can be nullPayment terms
unitPricenumber · can be nullUnit price before VAT
unitPriceWithVatnumber · can be nullUnit price including VAT, computed from the price before VAT and the item's rate, rounded to the cent
unitTypestring · can be nullUnit type
One of: BOX, CUBIC_METER, DAY, HOUR, KILOGRAM, LITER, METER, MONTH, NA, PACKAGE, SQUARE_METER, UNIT, WEEK
unitDiscountTypestring · can be nullDefault discount type for the catalogue item
One of: AMOUNT, PERCENT
unitDiscountPercentnumber · can be nullDefault discount percentage for the catalogue item
unitDiscountAmountnumber · can be nullDefault absolute per-unit discount amount for the catalogue item
vatRatestring · can be nullVAT rate
One of: EXEMPT, INTERMEDIATE, NORMAL, REDUCED
vatTerritorystring · can be nullVAT territory
One of: AZORES, CONTINENTAL, MADEIRA, UNKNOWN
ossCountrystring · can be nullOSS country
taxRatenumber · can be nullTax rate
vatExemptionReasonstring · can be nullVAT exemption reason
withholdingTaxPercentnumber · can be nullWithholding tax percentage
withholdingTaxTypestring · can be nullWithholding tax type
One of: IRC, IRS, IS
withholdingTaxAvailableboolean · can be nullWithholding tax available
withholdingTaxReasonstring · can be nullWithholding tax reason
autoVATModeAvailableboolean · can be nullAutomatic VAT mode available
isAutoVATEnabledboolean · can be nullAutomatic VAT enabled

Errors

  • 400 Invalid ID
  • 401 Unauthorized - API key missing or invalid
  • 404 Item not found
  • 409 A request with this idempotency key is still being processed, or the outcome of the first attempt is unknown
  • 422 The idempotency key was already used with a different request body
  • 429 The 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.

All resources