Items

Items represent products and services that can be used as line items in invoices and other commercial documents. The items API allows you to manage a catalog of reusable items, group them into collections (templates, carts, orders), and look up standard measurement units.

Item Endpoints

List Items

GET /api/v2/items

Retrieves a paginated list of items.

Query Parameters

Parameter Type Required Description
client_account_id integer Yes Filter items by client account
item_type string No Filter by type: ITEM or SERVICE
is_active boolean No Filter by active status (default: true). Pass null to include all
free_text string No Full-text search across item number and description
order_by string No Sort order (e.g., description, -created_at)
page integer No Page number (default: 1)
per_page integer No Items per page (default: 50, max: 100)
with string No Include related resources (supported: sales_unit, stock_unit, tax_code)

Response

{
  "data": [
    {
      "id": 1,
      "client_account_id": 7,
      "item_no": "PROD-001",
      "name": "Web Development Service",
      "item_type": "SERVICE",
      "sales_unit_id": 5,
      "stock_unit_id": null,
      "tax_code_id": 3,
      "price": "1500.000000",
      "metadata": null,
      "is_active": true,
      "autonomy_level": null
    }
  ],
  "meta": {
    "page": 1,
    "pages": 1,
    "per_page": 50,
    "records": 1
  }
}

Get Item

GET /api/v2/items/{id}

Retrieves a specific item by ID.

Query Parameters

Parameter Type Required Description
with string No Include related resources (supported: sales_unit, stock_unit, tax_code)

Response

{
  "id": 1,
  "client_account_id": 7,
  "item_no": "PROD-001",
  "name": "Web Development Service",
  "item_type": "SERVICE",
  "sales_unit_id": 5,
  "stock_unit_id": null,
  "tax_code_id": 3,
  "price": "1500.000000",
  "metadata": null,
  "is_active": true,
  "autonomy_level": null
}

Item Fields

Field Type Description
id integer Unique identifier
client_account_id integer Owning client account
item_no string Unique item number/code
name string Description (mapped from internal description column)
item_type string ITEM or SERVICE
sales_unit_id integer Default unit of measure for sales
stock_unit_id integer Unit of measure for inventory tracking
tax_code_id integer Default VAT/tax code
price decimal Default unit price
metadata object Arbitrary JSON metadata
is_active boolean Whether the item is active
autonomy_level string Per-item override of the client account’s automation/autonomy default. Values: NONE, DRAFT, FULL, or null to inherit from client_account_settings.autonomy_level

Create Item

POST /api/v2/items

Creates a new item.

Request Body

Field Type Required Description
client_account_id integer Yes The client account ID
item_no string Yes Unique item number/code (max 100 characters)
name string No Description of the item (max 250 characters)
item_type string No Item type: ITEM (physical product) or SERVICE
sales_unit_id integer Yes Unit of measure for sales (see Units)
stock_unit_id integer No Unit of measure for inventory tracking
tax_code_id integer Yes Tax/VAT code to apply
price decimal No Default unit price
metadata object No Arbitrary JSON metadata
autonomy_level string No Per-item automation override. Accepts NONE, DRAFT, FULL, or null to inherit the client account default

Example Request

{
  "client_account_id": 7,
  "item_no": "PROD-001",
  "name": "Web Development Service",
  "item_type": "SERVICE",
  "sales_unit_id": 5,
  "tax_code_id": 3,
  "price": "1500"
}

Response

Returns the created item with status 201 Created.

Update Item

PUT /api/v2/items/{id}

Updates an existing item. The client_account_id cannot be changed after creation.

Request Body

Same fields as Create Item, except client_account_id is immutable.

Response

Returns the updated item with status 200 OK.

Deactivate Item

DELETE /api/v2/items/{id}

Deactivates an item by setting its is_active status to false. The item record is preserved for historical purposes.

Response

Returns the deactivated item with is_active: false and status 200 OK.


Item Collection Endpoints

Item collections group items into reusable sets such as invoice templates, shopping carts, or orders.

List Item Collections

GET /api/v2/item-collections

Retrieves a paginated list of item collections.

Query Parameters

Parameter Type Required Description
client_account_id integer Yes Filter by client account
collection_type string No Filter by type: TEMPLATE, CART, or ORDER (comma-separated for multiple)
name string No Filter by collection name
with string No Include related resources. Supported: entries (and nested entries.item, entries.unit, entries.tax_code_details, entries.business_partner, entries.document_lines)
page integer No Page number (default: 1)
per_page integer No Items per page (default: 100, max: 100)

Response

{
  "data": [
    {
      "id": 10,
      "client_account_id": 7,
      "name": "Monthly Retainer",
      "collection_type": "TEMPLATE"
    }
  ],
  "meta": {
    "page": 1,
    "pages": 1,
    "per_page": 100,
    "records": 1
  }
}

Get Item Collection

GET /api/v2/item-collections/{id}

Retrieves a specific item collection by ID. Entries are included by default.

Query Parameters

Parameter Type Required Description
with string No Override default relations. Supported: entries (default), nested relations on entries: entries.item, entries.unit, entries.tax_code_details, entries.business_partner, entries.document_lines

Response

{
  "id": 10,
  "client_account_id": 7,
  "name": "Monthly Retainer",
  "collection_type": "TEMPLATE",
  "entries": [
    {
      "id": 100,
      "item_collection_id": 10,
      "item_id": 1,
      "description": "Web Development Service",
      "quantity": "10.000000",
      "price": "1500.000000",
      "currency_code": "NOK",
      "unit_id": 5,
      "tax_code_id": 3,
      "business_partner_id": null,
      "project_id": null,
      "recurring_start_date": null,
      "recurring_end_date": null,
      "recurring_terms": null,
      "recurring_interval": null,
      "refund_policy": null,
      "trial_end_date": null,
      "created_at": "2024-03-15T10:00:00Z",
      "created_by_id": 7,
      "updated_at": null,
      "updated_by_id": null
    }
  ]
}

Create Item Collection

POST /api/v2/item-collections

Creates a new item collection.

Request Body

Field Type Required Description
client_account_id integer Yes The client account ID
name string No Name for the collection (max 150 characters)
collection_type string Yes Type: TEMPLATE, CART, or ORDER

Example Request

{
  "client_account_id": 7,
  "name": "Monthly Retainer",
  "collection_type": "TEMPLATE"
}

Response

Returns the created collection with status 201 Created.

List Collection Entries

GET /api/v2/item-collections/{id}/entries

Retrieves entries within a collection with optional filtering.

Query Parameters

Parameter Type Required Description
item_id string No Filter by item IDs (comma-separated)
project_id string No Filter by project IDs (comma-separated)
include_used boolean No Include entries already used in documents
with string No Include related resources. Supported: item, unit, tax_code_details, business_partner, document_lines
order_by string No Sort order
page integer No Page number (default: 1)
per_page integer No Items per page (default: 100, max: 100)

Add Collection Entry

POST /api/v2/item-collections/{id}/entries

Adds a line item to a collection.

Request Body

Field Type Required Description
item_id integer No Reference to an item from the catalog
description string No Line description (max 1000 characters)
quantity decimal Yes Quantity
price decimal Yes Unit price
currency_code string No ISO 4217 currency code (e.g., NOK)
unit_id integer Yes Unit of measure
tax_code_id integer Yes Tax code
business_partner_id integer No Associated customer/supplier
project_id integer No Associated project
recurring_start_date date No Start date for recurring invoicing
recurring_end_date date No End date for recurring invoicing
recurring_terms string No IN_ADVANCE or IN_ARREARS
recurring_interval integer No Interval: MONTHLY, QUARTERLY, HALF_YEARLY, YEARLY
refund_policy string No NO_REFUND, PRORATED, or FULL_REFUND
trial_end_date date No End of trial period

Response

Returns the created entry with status 201 Created.

Update Collection Entry

PUT /api/v2/item-collections/{id}/entries/{entry_id}

Updates an existing entry. The item_collection_id cannot be changed.

Response

Returns the updated entry with status 202 Accepted.

Delete Collection Entry

DELETE /api/v2/item-collections/{id}/entries/{entry_id}

Permanently deletes an entry from the collection.

Response

Returns the deleted entry with status 200 OK.

Note: The backend currently returns 201 Created for this endpoint, which is a known quirk. This documentation uses 200 OK as the semantically correct status for a DELETE operation.

Collection Entry Relations

Pass any combination of these via the with query parameter on entry-listing endpoints to embed related resources inline.

Relation Description
item The catalog item this entry references (when item_id is set)
unit The unit of measure
tax_code_details Full tax code object for tax_code_id
business_partner The customer or supplier on the entry. Returns null when business_partner_id is not set
document_lines Document lines that have already consumed this entry

Unit Endpoints

Units represent standard measurement units (e.g., hours, pieces, kilograms) following the UN/ECE Recommendation 20/21 codes.

List Units

GET /api/v2/units

Retrieves all available units of measure.

Query Parameters

Parameter Type Required Description
order_by string No Sort order
page integer No Page number (default: 1)
per_page integer No Items per page (default: 100)

Response

{
  "data": [
    {
      "id": 1,
      "symbol": "stk",
      "un_ece_rec_20_code": "C62",
      "un_ece_rec_21_code": null,
      "description": "One (piece)"
    },
    {
      "id": 5,
      "symbol": "timer",
      "un_ece_rec_20_code": "HUR",
      "un_ece_rec_21_code": null,
      "description": "Hours"
    }
  ],
  "meta": {
    "page": 1,
    "pages": 1,
    "per_page": 100,
    "records": 2
  }
}

Get Unit

GET /api/v2/units/{id}

Retrieves a specific unit by ID.

Response

{
  "id": 5,
  "symbol": "timer",
  "un_ece_rec_20_code": "HUR",
  "un_ece_rec_21_code": null,
  "description": "Hours"
}

Item Types

Value Description
ITEM Physical product or good
SERVICE Service or labor

Collection Types

Value Description
TEMPLATE Reusable line item template for recurring invoices
CART Shopping cart or draft selection
ORDER Confirmed order

Error Responses

Status Code Description
400 Invalid request (missing required fields, cannot change client_account_id)
403 Forbidden (no access to client account)
404 Item or collection not found

Business Rules

  1. Items are scoped to a specific client account
  2. Users must have access to the client account to manage its items
  3. The client_account_id cannot be changed after item creation
  4. Deleting an item deactivates it rather than removing it, preserving historical data
  5. Item collections use cascade deletion: removing a collection also removes all its entries
  6. Units are system-wide and read-only

Common Use Cases

  1. Product catalog - Maintain a list of products and services with default pricing
  2. Invoice templates - Create reusable collections of line items for recurring invoices
  3. Recurring billing - Set up collection entries with recurring schedules and terms
  4. Multi-currency pricing - Specify currency codes on collection entries for international invoicing