Item types
Item types label the lines of invoices and estimates: Service, Product, or types you add. Invoices and estimates share one list. One type is the default for new lines that bill hours and fees, and one is the default for new lines that bill expenses.
Who can use it
Section titled “Who can use it”Item types are shared by the whole business: everyone who may use them sees the same list. With your personal access token you can read item types if your permission profile lets you view the invoices module, and create, rename, delete or change the defaults if it lets you edit invoices. Administrators can do all of this. Members and managers can do what their permission profile grants; managing people adds nothing here. A client portal login is refused with 403.
The item type object
Section titled “The item type object”One item type a line can carry.
| Field | Type | Description |
|---|---|---|
id |
string | The item type’s id. Read only. |
name |
string | The name printed in the Item type column of invoice and estimate lines, 1 to 100 characters, unique in the business. |
isDefaultForHours |
boolean | Whether new lines for hours and fees get this type (Default for hours in the app). Exactly one type holds it; giving it to one type takes it from the type that held it. |
isDefaultForExpenses |
boolean | Whether new lines for expenses get this type (Default for expenses in the app). Exactly one type holds it; giving it to one type takes it from the type that held it. |
position |
integer | Where the type sits in the app’s list and pickers, counting from 1. Read only. |
createdAt |
datetime | When the type was created. Read only. |
updatedAt |
datetime | When the type last changed. Read only. |
Endpoints
Section titled “Endpoints”List item types
Section titled “List item types”Returns the business’s item types in the order the app shows them, paged. A business always has at least one: if it has none yet, the first request creates Service (default for hours and fees) and Product (default for expenses).
GET /v1/item-typesParameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
page |
query | integer | No | Page number, default 1. |
limit |
query | integer | No | Rows per page, default 20, max 1000. |
search |
query | string | No | Matches part of the name. |
updatedSince |
query | datetime | No | Only item types changed at or after this moment. Records deleted since then are not reported. |
Rules
403when the token’s person may not view the invoices module.
Example request
curl "https://api.onesuite.io/v1/item-types" \ -H "X-API-Key: $ONESUITE_TOKEN"const response = await fetch("https://api.onesuite.io/v1/item-types", { headers: { "X-API-Key": process.env.ONESUITE_TOKEN, },});const data = await response.json();Example response — status 200
{ "data": [ { "id": "cm1itype0service", "name": "Service", "isDefaultForHours": true, "isDefaultForExpenses": false, "position": 1, "createdAt": "2026-03-02T08:15:00.000Z", "updatedAt": "2026-03-02T08:15:00.000Z" }, { "id": "cm1itype0product", "name": "Product", "isDefaultForHours": false, "isDefaultForExpenses": true, "position": 2, "createdAt": "2026-03-02T08:15:00.000Z", "updatedAt": "2026-03-02T08:15:00.000Z" }, { "id": "cm1itype0hosting", "name": "Hosting", "isDefaultForHours": false, "isDefaultForExpenses": false, "position": 3, "createdAt": "2026-11-20T10:02:11.000Z", "updatedAt": "2026-11-20T10:02:11.000Z" } ], "totalCount": 3, "page": 1, "limit": 20}Get an item type
Section titled “Get an item type”Returns one item type.
GET /v1/item-types/:idParameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id |
path | string | Yes | The item type’s id. |
Rules
403when the token’s person may not view the invoices module.404when no item type with this id exists in the business.
Example request
curl "https://api.onesuite.io/v1/item-types/cm1itype0service" \ -H "X-API-Key: $ONESUITE_TOKEN"const response = await fetch("https://api.onesuite.io/v1/item-types/cm1itype0service", { headers: { "X-API-Key": process.env.ONESUITE_TOKEN, },});const data = await response.json();Example response — status 200
{ "data": { "id": "cm1itype0service", "name": "Service", "isDefaultForHours": true, "isDefaultForExpenses": false, "position": 1, "createdAt": "2026-03-02T08:15:00.000Z", "updatedAt": "2026-03-02T08:15:00.000Z" }}Create an item type
Section titled “Create an item type”Adds an item type at the end of the list. It can be used on invoice and estimate lines straight away.
POST /v1/item-typesParameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
name |
body | string | Yes | The name, 1 to 100 characters, unique in the business. |
isDefaultForHours |
body | boolean | No | Make it the default for new lines that bill hours and fees. Default false. |
isDefaultForExpenses |
body | boolean | No | Make it the default for new lines that bill expenses. Default false. |
Rules
403when the token’s person may not edit invoices.400when the name is empty or longer than 100 characters.409when another item type already has this name.- Making it a default takes that default from the type that held it.
- Answers 201 with the new type.
Example request
curl "https://api.onesuite.io/v1/item-types" \ -X POST \ -H "X-API-Key: $ONESUITE_TOKEN" \ -H "Content-Type: application/json" \ -d '{"name":"Hosting"}'const response = await fetch("https://api.onesuite.io/v1/item-types", { method: "POST", headers: { "X-API-Key": process.env.ONESUITE_TOKEN, "Content-Type": "application/json", }, body: JSON.stringify({ name: "Hosting", }),});const data = await response.json();Example response — status 201
{ "data": { "id": "cm1itype0hosting", "name": "Hosting", "isDefaultForHours": false, "isDefaultForExpenses": false, "position": 3, "createdAt": "2026-11-20T10:02:11.000Z", "updatedAt": "2026-11-20T10:02:11.000Z" }}Update an item type
Section titled “Update an item type”Changes the fields you send: renames an item type or makes it a default. A new name shows on every invoice and estimate line that uses the type.
PATCH /v1/item-types/:idParameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id |
path | string | Yes | The item type’s id. |
name |
body | string | No | The new name, 1 to 100 characters, unique in the business. |
isDefaultForHours |
body | boolean | No | Send true to make it the default for new lines that bill hours and fees. |
isDefaultForExpenses |
body | boolean | No | Send true to make it the default for new lines that bill expenses. |
Rules
403when the token’s person may not edit invoices.404when no item type with this id exists in the business.400when the name is empty or longer than 100 characters.409when another item type already has this name.- Making it a default takes that default from the type that held it.
- Answers 200 with the updated item type.
Example request
curl "https://api.onesuite.io/v1/item-types/cm1itype0hosting" \ -X PATCH \ -H "X-API-Key: $ONESUITE_TOKEN" \ -H "Content-Type: application/json" \ -d '{"name":"Hosting & domains"}'const response = await fetch("https://api.onesuite.io/v1/item-types/cm1itype0hosting", { method: "PATCH", headers: { "X-API-Key": process.env.ONESUITE_TOKEN, "Content-Type": "application/json", }, body: JSON.stringify({ name: "Hosting & domains", }),});const data = await response.json();Example response — status 200
{ "data": { "id": "cm1itype0hosting", "name": "Hosting & domains", "isDefaultForHours": false, "isDefaultForExpenses": false, "position": 3, "createdAt": "2026-11-20T10:02:11.000Z", "updatedAt": "2026-11-20T10:30:00.000Z" }}Delete an item type
Section titled “Delete an item type”Deletes an item type that no invoice or estimate line uses.
DELETE /v1/item-types/:idParameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id |
path | string | Yes | The item type’s id. |
Rules
403when the token’s person may not edit invoices.404when no item type with this id exists in the business.409when any invoice or estimate line uses it.409when it is the business’s last item type; a business needs at least one.- Answers 200 with a confirmation message.
Example request
curl "https://api.onesuite.io/v1/item-types/cm1itype0hosting" \ -X DELETE \ -H "X-API-Key: $ONESUITE_TOKEN"const response = await fetch("https://api.onesuite.io/v1/item-types/cm1itype0hosting", { method: "DELETE", headers: { "X-API-Key": process.env.ONESUITE_TOKEN, },});const data = await response.json();Example response — status 200
{ "message": "Item type deleted"}