Items
List saved items
GET /i/v1/items
item.read. Non-archived by default (archived=true archived only, all both); q is a case-insensitive substring over name, description, sku, hsnCode and serviceCode; sorted most used first (-useCount), by name, or -lastUsedAt. The token’s mode decides which items are read.
Who can call it: API key or signed-in user.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
q | query | string | No | Case-insensitive substring over name, description, sku, hsnCode, serviceCode. At most 100 characters. |
itemType | query | string | No | One of goods | service. |
archived | query | string | No | false non-archived (default), true archived only, all both. One of false | true | all. Default: false. |
sort | query | string | No | One of -useCount | name | -lastUsedAt. Default: -useCount. |
page | query | number | No | Default: 1. At least 1. |
limit | query | number | No | Default: 20. Between 1 and 100. |
Example request
Responses
One page of items, meta.pagination set.
Errors: 400, 401, 403, 429, 500, 503
Save an item
POST /i/v1/items
item.create; charged per item before it is saved (refunded if the save fails). A goods item needs an hsnCode, a service item a serviceCode; productCategory is required; taxCategory is a code-list id of the organization’s jurisdiction (a line alias is stored resolved); sku, when sent, is unique among the organization’s non-archived items. Emits the invoice.item.created event.
Who can call it: API key or signed-in user.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | The item’s name. A line built from the item that sends no description or itemName of its own takes this. 1 to 255 characters. |
description | string or null | No | A longer description of the item; null and absent are the same. A line built from the item does not copy it. At most 1000 characters. |
itemType | string | Yes | goods (needs an hsnCode, no serviceCode) or service (needs a serviceCode, no hsnCode). It cannot be changed later. One of goods | service. |
hsnCode | string or null | No | Required for goods. |
serviceCode | string or null | No | Required for services. |
productCategory | string | Yes | The product category a line built from the item carries to the tax authority (the HS or service code’s description); never blank. 1 to 500 characters. |
unitCode | string | Yes | The unit of measure, as a unit code (EA each, HUR hour, KGM kilogram). |
unitPriceMinor | string | Yes | Minor units as a decimal string (₦1,500.50 → “150050”); at most 10^14 — the same maximum as an invoice line’s unit price. |
currency | string | Yes | ISO 4217 currency of unitPriceMinor. A line in another currency must send its own unitPrice. |
taxCategory | string | Yes | A tax-category id the jurisdiction serves, or a line alias (standard | zero | exempt). |
sku | string or null | No | Unique among the organization’s non-archived items. At most 64 characters. |
Example request
Responses
The saved item.
Errors: 400, 401, 402, 403, 409, 413, 415, 422, 429, 500, 503
Get a saved item
GET /i/v1/items/{id}
item.read. An archived item is readable by id (archivedAt set).
Who can call it: API key or signed-in user.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string (uuid) | Yes |
Example request
Responses
The item.
Errors: 400, 401, 403, 404, 429, 500, 503
Update a saved item
PATCH /i/v1/items/{id}
item.update. The create fields, all optional; itemType is immutable; a sku change obeys the unique rule; an archived item is editable but not usable on a line. Lines already built from the item never change. Charged ITEM_UPDATE per request only when the body changes something (a no-op edit is free; refunded when the write then changes nothing). Emits the invoice.item.updated event.
Who can call it: API key or signed-in user.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string (uuid) | Yes | |
Idempotency-Key | header | string | No | 8–128 characters of A–Z, a–z, 0–9, _ or -. A retry with the same key is not charged twice (the work is done again); the key is bound to its first request, so another request with it is 409 BIZ107. |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | No | The item’s name; it can be changed, not cleared. 1 to 255 characters. |
description | string or null | No | A longer description of the item; null clears it. At most 1000 characters. |
itemType | string | No | Immutable: only the stored value is accepted. One of goods | service. |
hsnCode | string or null | No | The HS code of a goods item; a goods item cannot clear it, a service item cannot carry one. |
serviceCode | string or null | No | The service code of a service item; a service item cannot clear it, a goods item cannot carry one. |
productCategory | string | No | The product category a line built from the item carries; it can be changed, not cleared. 1 to 500 characters. |
unitCode | string | No | The unit of measure, as a unit code. |
unitPriceMinor | string | No | Minor units as a decimal string, as on create (₦27,500.00 → “2750000”). |
currency | string | No | ISO 4217 currency of unitPriceMinor. |
taxCategory | string | No | A tax-category id the jurisdiction serves, or a line alias (standard | zero | exempt); stored resolved. |
sku | string or null | No | Unique among the organization’s non-archived items; null clears it. At most 64 characters. |
Example request
Responses
The item after the edit.
Errors: 400, 401, 402, 403, 404, 409, 413, 415, 422, 429, 500, 503
Delete a saved item
DELETE /i/v1/items/{id}
item.archive. Hard delete only while no invoice line of this mode’s database references the item (drafts included); otherwise 409 BIZ004 — archive it instead. Answers 200 {id, deleted: true}. Emits the invoice.item.deleted event.
Who can call it: API key or signed-in user.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string (uuid) | Yes |
Example request
Responses
The item was deleted.
Errors: 400, 401, 403, 404, 409, 429, 500, 503
Archive a saved item
POST /i/v1/items/{id}/archive
item.archive. Idempotent (an archived item answers 200 with the same view). An archived item is left out of the item list by default and refused on a new line (409 BIZ004); lines that already carry it are untouched. Emits the invoice.item.archived event.
Who can call it: API key or signed-in user.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string (uuid) | Yes |
Example request
Responses
The archived item.
Errors: 400, 401, 403, 404, 429, 500, 503
Unarchive a saved item
POST /i/v1/items/{id}/unarchive
item.archive. Idempotent. Refused 409 RES002 when another non-archived item took the sku meanwhile. Emits the invoice.item.unarchived event.
Who can call it: API key or signed-in user.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string (uuid) | Yes |
Example request
Responses
The item, live again.
Errors: 400, 401, 403, 404, 409, 429, 500, 503