API reference · version 1
Contacts
Customers, suppliers and address-book contacts.
- GET
/contactsList contacts - GET
/contacts/{id}Get a contact - POST
/contactsCreate a contact - PATCH
/contacts/{id}Update a contact
List contacts
GET/api/v1/contacts
Customers, suppliers and address-book contacts, newest first.
Query parameters
| Field | Type | Description |
|---|---|---|
| limit | integer | Records per page, 1–100 (default 25).≥ 1 · ≤ 100 · default 25 |
| cursor | string | The nextCursor of the previous page.at most 64 characters |
| updatedSince | string | Only records changed at or after this instant (records without a change time: created). |
| role | enum | one of customers, suppliers, others |
| q | string | Name, code, email or tax number contains.at most 80 characters |
| active | enum | one of true, false |
Example
curl "https://your-workspace.omnibooks.online/api/v1/contacts?role=customers&q=gulf" \
-H "Authorization: Bearer $OMNIBOOKS_KEY"{
"data": [
{
"id": "cmabc123def456",
"code": "C-0042",
"name": "Gulf Star Trading LLC",
"kind": "INVOICE",
"legalName": null,
"isCustomer": true,
"isSupplier": false,
"email": "accounts@gulfstar.example",
"phone": "+968 2412 3456",
"taxRegistrationNumber": null,
"addressLine1": null,
"addressLine2": null,
"city": null,
"postalCode": null,
"poBox": null,
"buildingNumber": null,
"district": null,
"countryCode": "OM",
"paymentTermsDays": 30,
"creditLimit": "105.000",
"currency": "OMR",
"notes": null,
"isActive": true,
"customFields": {
"delivery_slot": "Morning"
},
"people": [
{
"id": "cmabc123def456",
"name": "Gulf Star Trading LLC",
"jobTitle": null,
"email": "accounts@gulfstar.example",
"phone": "+968 2412 3456",
"mobile": null,
"isPrimary": false
}
],
"balance": {
"receivable": "105.000",
"payable": "105.000"
},
"createdAt": "2026-11-30T08:15:00.000Z",
"updatedAt": "2026-11-30T08:15:00.000Z"
}
],
"nextCursor": null
}Answer fields
| Field | Type | Description |
|---|---|---|
| datarequired | array of object | |
| data[].idrequired | string | An OmniBooks id. |
| data[].coderequired | string | Left out = the next free number. |
| data[].namerequired | string | Display name. |
| data[].kindrequired | enum | INVOICE, CREDIT_NOTE or DEBIT_NOTE (a debit note adds to an invoice already issued).one of COMPANY, INDIVIDUAL |
| data[].legalNamerequired | string | Registered name, if different.may be null |
| data[].isCustomerrequired | boolean | A customer. |
| data[].isSupplierrequired | boolean | A supplier. |
| data[].emailrequired | string | may be null |
| data[].phonerequired | string | may be null |
| data[].taxRegistrationNumberrequired | string | VAT/GST number, checked against the contact's country.may be null |
| data[].addressLine1required | string | may be null |
| data[].addressLine2required | string | may be null |
| data[].cityrequired | string | may be null |
| data[].postalCoderequired | string | may be null |
| data[].poBoxrequired | string | may be null |
| data[].buildingNumberrequired | string | Saudi national address: building number.may be null |
| data[].districtrequired | string | District; in the UAE the emirate, in India the state.may be null |
| data[].countryCoderequired | string | ISO 3166 two-letter code.may be null |
| data[].paymentTermsDaysrequired | number | Days to the due date on new documents. |
| data[].creditLimitrequired | string | A decimal amount as a string, e.g. "105.000".may be null |
| data[].currencyrequired | string | ISO 4217 code; left out = the contact's currency, else the company's base currency.may be null |
| data[].notesrequired | string | Notes; on sales documents they are printed.may be null |
| data[].isActiverequired | boolean | |
| data[].customFieldsrequired | object (by key) | The company's custom fields, by key (GET /custom-fields lists them). Empty fields are left out. |
| data[].peoplerequired | array of object | |
| data[].people[].idrequired | string | An OmniBooks id. |
| data[].people[].namerequired | string | Display name. |
| data[].people[].jobTitlerequired | string | may be null |
| data[].people[].emailrequired | string | may be null |
| data[].people[].phonerequired | string | may be null |
| data[].people[].mobilerequired | string | may be null |
| data[].people[].isPrimaryrequired | boolean | |
| data[].balance | object | Base currency; only on GET /contacts/{id}. |
| data[].balance.receivablerequired | string | A decimal amount as a string, e.g. "105.000". |
| data[].balance.payablerequired | string | A decimal amount as a string, e.g. "105.000". |
| data[].createdAtrequired | string | An instant, ISO 8601 in UTC. |
| data[].updatedAtrequired | string | An instant, ISO 8601 in UTC. |
| nextCursorrequired | string | Pass as cursor for the next page; null on the last page.may be null |
Get a contact
GET/api/v1/contacts/{id}
One contact with its people and its balances in base currency.
Path
| Field | Type | Description |
|---|---|---|
| idrequired | string | The record's id. |
Example
curl "https://your-workspace.omnibooks.online/api/v1/contacts/<id>" \
-H "Authorization: Bearer $OMNIBOOKS_KEY"{
"id": "cmabc123def456",
"code": "C-0042",
"name": "Gulf Star Trading LLC",
"kind": "INVOICE",
"legalName": null,
"isCustomer": true,
"isSupplier": false,
"email": "accounts@gulfstar.example",
"phone": "+968 2412 3456",
"taxRegistrationNumber": null,
"addressLine1": null,
"addressLine2": null,
"city": null,
"postalCode": null,
"poBox": null,
"buildingNumber": null,
"district": null,
"countryCode": "OM",
"paymentTermsDays": 30,
"creditLimit": "105.000",
"currency": "OMR",
"notes": null,
"isActive": true,
"customFields": {
"delivery_slot": "Morning"
},
"people": [
{
"id": "cmabc123def456",
"name": "Gulf Star Trading LLC",
"jobTitle": null,
"email": "accounts@gulfstar.example",
"phone": "+968 2412 3456",
"mobile": null,
"isPrimary": false
}
],
"balance": {
"receivable": "105.000",
"payable": "105.000"
},
"createdAt": "2026-11-30T08:15:00.000Z",
"updatedAt": "2026-11-30T08:15:00.000Z"
}Answer fields
| Field | Type | Description |
|---|---|---|
| idrequired | string | An OmniBooks id. |
| coderequired | string | Left out = the next free number. |
| namerequired | string | Display name. |
| kindrequired | enum | INVOICE, CREDIT_NOTE or DEBIT_NOTE (a debit note adds to an invoice already issued).one of COMPANY, INDIVIDUAL |
| legalNamerequired | string | Registered name, if different.may be null |
| isCustomerrequired | boolean | A customer. |
| isSupplierrequired | boolean | A supplier. |
| emailrequired | string | may be null |
| phonerequired | string | may be null |
| taxRegistrationNumberrequired | string | VAT/GST number, checked against the contact's country.may be null |
| addressLine1required | string | may be null |
| addressLine2required | string | may be null |
| cityrequired | string | may be null |
| postalCoderequired | string | may be null |
| poBoxrequired | string | may be null |
| buildingNumberrequired | string | Saudi national address: building number.may be null |
| districtrequired | string | District; in the UAE the emirate, in India the state.may be null |
| countryCoderequired | string | ISO 3166 two-letter code.may be null |
| paymentTermsDaysrequired | number | Days to the due date on new documents. |
| creditLimitrequired | string | A decimal amount as a string, e.g. "105.000".may be null |
| currencyrequired | string | ISO 4217 code; left out = the contact's currency, else the company's base currency.may be null |
| notesrequired | string | Notes; on sales documents they are printed.may be null |
| isActiverequired | boolean | |
| customFieldsrequired | object (by key) | The company's custom fields, by key (GET /custom-fields lists them). Empty fields are left out. |
| peoplerequired | array of object | |
| people[].idrequired | string | An OmniBooks id. |
| people[].namerequired | string | Display name. |
| people[].jobTitlerequired | string | may be null |
| people[].emailrequired | string | may be null |
| people[].phonerequired | string | may be null |
| people[].mobilerequired | string | may be null |
| people[].isPrimaryrequired | boolean | |
| balance | object | Base currency; only on GET /contacts/{id}. |
| balance.receivablerequired | string | A decimal amount as a string, e.g. "105.000". |
| balance.payablerequired | string | A decimal amount as a string, e.g. "105.000". |
| createdAtrequired | string | An instant, ISO 8601 in UTC. |
| updatedAtrequired | string | An instant, ISO 8601 in UTC. |
Create a contact
POST/api/v1/contacts
Creates a customer, a supplier, both, or an address-book contact (neither). Without a code the next free number is given (C-0001 customers, S-0001 suppliers, P-0001 others). The tax number is checked against the contact's country.
Body
| Field | Type | Description |
|---|---|---|
| code | string | Left out = the next free number.may be null |
| namerequired | string | Display name.at least 2 characters · at most 160 characters |
| kind | enum | INVOICE, CREDIT_NOTE or DEBIT_NOTE (a debit note adds to an invoice already issued).one of COMPANY, INDIVIDUAL · default "COMPANY" |
| legalName | string | Registered name, if different.at most 200 characters · may be null |
| isCustomerrequired | boolean | A customer. |
| isSupplierrequired | boolean | A supplier. |
| string | at most 160 characters · may be null | |
| phone | string | at most 40 characters · may be null |
| contactPerson | string | at most 120 characters · may be null |
| taxRegistrationNumber | string | VAT/GST number, checked against the contact's country.at most 40 characters · may be null |
| legalNameAr | string | at most 200 characters · may be null |
| addressLine1 | string | at most 160 characters · may be null |
| addressLine2 | string | at most 160 characters · may be null |
| city | string | at most 80 characters · may be null |
| postalCode | string | at most 12 characters · may be null |
| poBox | string | at most 20 characters · may be null |
| buildingNumber | string | Saudi national address: building number.at most 10 characters · may be null |
| district | string | District; in the UAE the emirate, in India the state.at most 80 characters · may be null |
| addressAr | string | at most 300 characters · may be null |
| identifierScheme | string | When there is no VAT number: CR, CID, PASNUM or OTHID (e-invoices).at most 8 characters · may be null |
| identifierValue | string | The identifier's number.at most 40 characters · may be null |
| countryCode | string | ISO 3166 two-letter code.at most 2 characters · may be null |
| paymentTermsDaysrequired | integer | Days to the due date on new documents.≥ 0 · ≤ 365 |
| creditLimit | string | number | Decimal string; empty = none.may be null |
| defaultAccountId | string | Pre-selected account on new lines.at most 64 characters · may be null |
| currency | string | ISO 4217 code; left out = the contact's currency, else the company's base currency.at most 3 characters · may be null |
| notes | string | Notes; on sales documents they are printed.at most 2000 characters · may be null |
| customFields | object (by key) | Custom field values by key (GET /custom-fields). Only the keys you send change; an empty value clears one; unknown keys are refused.may be null |
Example
curl -X POST "https://your-workspace.omnibooks.online/api/v1/contacts" \
-H "Authorization: Bearer $OMNIBOOKS_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"name": "Gulf Star Trading LLC",
"isCustomer": true,
"isSupplier": false,
"email": "accounts@gulfstar.example",
"phone": "+968 2412 3456",
"taxRegistrationNumber": "OM1100223344",
"city": "Muscat",
"countryCode": "OM",
"paymentTermsDays": 30,
"customFields": {
"region": "North"
}
}'{
"id": "cmabc123def456",
"code": "C-0042",
"name": "Gulf Star Trading LLC",
"kind": "INVOICE",
"legalName": null,
"isCustomer": true,
"isSupplier": false,
"email": "accounts@gulfstar.example",
"phone": "+968 2412 3456",
"taxRegistrationNumber": null,
"addressLine1": null,
"addressLine2": null,
"city": null,
"postalCode": null,
"poBox": null,
"buildingNumber": null,
"district": null,
"countryCode": "OM",
"paymentTermsDays": 30,
"creditLimit": "105.000",
"currency": "OMR",
"notes": null,
"isActive": true,
"customFields": {
"delivery_slot": "Morning"
},
"people": [
{
"id": "cmabc123def456",
"name": "Gulf Star Trading LLC",
"jobTitle": null,
"email": "accounts@gulfstar.example",
"phone": "+968 2412 3456",
"mobile": null,
"isPrimary": false
}
],
"balance": {
"receivable": "105.000",
"payable": "105.000"
},
"createdAt": "2026-11-30T08:15:00.000Z",
"updatedAt": "2026-11-30T08:15:00.000Z"
}Answer fields
| Field | Type | Description |
|---|---|---|
| idrequired | string | An OmniBooks id. |
| coderequired | string | Left out = the next free number. |
| namerequired | string | Display name. |
| kindrequired | enum | INVOICE, CREDIT_NOTE or DEBIT_NOTE (a debit note adds to an invoice already issued).one of COMPANY, INDIVIDUAL |
| legalNamerequired | string | Registered name, if different.may be null |
| isCustomerrequired | boolean | A customer. |
| isSupplierrequired | boolean | A supplier. |
| emailrequired | string | may be null |
| phonerequired | string | may be null |
| taxRegistrationNumberrequired | string | VAT/GST number, checked against the contact's country.may be null |
| addressLine1required | string | may be null |
| addressLine2required | string | may be null |
| cityrequired | string | may be null |
| postalCoderequired | string | may be null |
| poBoxrequired | string | may be null |
| buildingNumberrequired | string | Saudi national address: building number.may be null |
| districtrequired | string | District; in the UAE the emirate, in India the state.may be null |
| countryCoderequired | string | ISO 3166 two-letter code.may be null |
| paymentTermsDaysrequired | number | Days to the due date on new documents. |
| creditLimitrequired | string | A decimal amount as a string, e.g. "105.000".may be null |
| currencyrequired | string | ISO 4217 code; left out = the contact's currency, else the company's base currency.may be null |
| notesrequired | string | Notes; on sales documents they are printed.may be null |
| isActiverequired | boolean | |
| customFieldsrequired | object (by key) | The company's custom fields, by key (GET /custom-fields lists them). Empty fields are left out. |
| peoplerequired | array of object | |
| people[].idrequired | string | An OmniBooks id. |
| people[].namerequired | string | Display name. |
| people[].jobTitlerequired | string | may be null |
| people[].emailrequired | string | may be null |
| people[].phonerequired | string | may be null |
| people[].mobilerequired | string | may be null |
| people[].isPrimaryrequired | boolean | |
| balance | object | Base currency; only on GET /contacts/{id}. |
| balance.receivablerequired | string | A decimal amount as a string, e.g. "105.000". |
| balance.payablerequired | string | A decimal amount as a string, e.g. "105.000". |
| createdAtrequired | string | An instant, ISO 8601 in UTC. |
| updatedAtrequired | string | An instant, ISO 8601 in UTC. |
Errors this endpoint may answer
422 CODE_TAKEN: The code is already used.
Update a contact
PATCH/api/v1/contacts/{id}
Changes only the fields you send; the whole contact is then checked as on the screen. A contact with sales documents stays a customer (and one with purchases a supplier).
Path
| Field | Type | Description |
|---|---|---|
| idrequired | string | The record's id. |
Body
| Field | Type | Description |
|---|---|---|
| code | string | Left out = the next free number.may be null |
| name | string | Display name.at least 2 characters · at most 160 characters |
| kind | enum | INVOICE, CREDIT_NOTE or DEBIT_NOTE (a debit note adds to an invoice already issued).one of COMPANY, INDIVIDUAL · default "COMPANY" |
| legalName | string | Registered name, if different.at most 200 characters · may be null |
| isCustomer | boolean | A customer. |
| isSupplier | boolean | A supplier. |
| string | at most 160 characters · may be null | |
| phone | string | at most 40 characters · may be null |
| contactPerson | string | at most 120 characters · may be null |
| taxRegistrationNumber | string | VAT/GST number, checked against the contact's country.at most 40 characters · may be null |
| legalNameAr | string | at most 200 characters · may be null |
| addressLine1 | string | at most 160 characters · may be null |
| addressLine2 | string | at most 160 characters · may be null |
| city | string | at most 80 characters · may be null |
| postalCode | string | at most 12 characters · may be null |
| poBox | string | at most 20 characters · may be null |
| buildingNumber | string | Saudi national address: building number.at most 10 characters · may be null |
| district | string | District; in the UAE the emirate, in India the state.at most 80 characters · may be null |
| addressAr | string | at most 300 characters · may be null |
| identifierScheme | string | When there is no VAT number: CR, CID, PASNUM or OTHID (e-invoices).at most 8 characters · may be null |
| identifierValue | string | The identifier's number.at most 40 characters · may be null |
| countryCode | string | ISO 3166 two-letter code.at most 2 characters · may be null |
| paymentTermsDays | integer | Days to the due date on new documents.≥ 0 · ≤ 365 |
| creditLimit | string | number | Decimal string; empty = none.may be null |
| defaultAccountId | string | Pre-selected account on new lines.at most 64 characters · may be null |
| currency | string | ISO 4217 code; left out = the contact's currency, else the company's base currency.at most 3 characters · may be null |
| notes | string | Notes; on sales documents they are printed.at most 2000 characters · may be null |
| customFields | object (by key) | Custom field values by key (GET /custom-fields). Only the keys you send change; an empty value clears one; unknown keys are refused.may be null |
Example
curl -X PATCH "https://your-workspace.omnibooks.online/api/v1/contacts/<id>" \
-H "Authorization: Bearer $OMNIBOOKS_KEY" \
-H "Content-Type: application/json" \
-d '{
"phone": "+968 2412 9999",
"paymentTermsDays": 45
}'{
"id": "cmabc123def456",
"code": "C-0042",
"name": "Gulf Star Trading LLC",
"kind": "INVOICE",
"legalName": null,
"isCustomer": true,
"isSupplier": false,
"email": "accounts@gulfstar.example",
"phone": "+968 2412 3456",
"taxRegistrationNumber": null,
"addressLine1": null,
"addressLine2": null,
"city": null,
"postalCode": null,
"poBox": null,
"buildingNumber": null,
"district": null,
"countryCode": "OM",
"paymentTermsDays": 30,
"creditLimit": "105.000",
"currency": "OMR",
"notes": null,
"isActive": true,
"customFields": {
"delivery_slot": "Morning"
},
"people": [
{
"id": "cmabc123def456",
"name": "Gulf Star Trading LLC",
"jobTitle": null,
"email": "accounts@gulfstar.example",
"phone": "+968 2412 3456",
"mobile": null,
"isPrimary": false
}
],
"balance": {
"receivable": "105.000",
"payable": "105.000"
},
"createdAt": "2026-11-30T08:15:00.000Z",
"updatedAt": "2026-11-30T08:15:00.000Z"
}Answer fields
| Field | Type | Description |
|---|---|---|
| idrequired | string | An OmniBooks id. |
| coderequired | string | Left out = the next free number. |
| namerequired | string | Display name. |
| kindrequired | enum | INVOICE, CREDIT_NOTE or DEBIT_NOTE (a debit note adds to an invoice already issued).one of COMPANY, INDIVIDUAL |
| legalNamerequired | string | Registered name, if different.may be null |
| isCustomerrequired | boolean | A customer. |
| isSupplierrequired | boolean | A supplier. |
| emailrequired | string | may be null |
| phonerequired | string | may be null |
| taxRegistrationNumberrequired | string | VAT/GST number, checked against the contact's country.may be null |
| addressLine1required | string | may be null |
| addressLine2required | string | may be null |
| cityrequired | string | may be null |
| postalCoderequired | string | may be null |
| poBoxrequired | string | may be null |
| buildingNumberrequired | string | Saudi national address: building number.may be null |
| districtrequired | string | District; in the UAE the emirate, in India the state.may be null |
| countryCoderequired | string | ISO 3166 two-letter code.may be null |
| paymentTermsDaysrequired | number | Days to the due date on new documents. |
| creditLimitrequired | string | A decimal amount as a string, e.g. "105.000".may be null |
| currencyrequired | string | ISO 4217 code; left out = the contact's currency, else the company's base currency.may be null |
| notesrequired | string | Notes; on sales documents they are printed.may be null |
| isActiverequired | boolean | |
| customFieldsrequired | object (by key) | The company's custom fields, by key (GET /custom-fields lists them). Empty fields are left out. |
| peoplerequired | array of object | |
| people[].idrequired | string | An OmniBooks id. |
| people[].namerequired | string | Display name. |
| people[].jobTitlerequired | string | may be null |
| people[].emailrequired | string | may be null |
| people[].phonerequired | string | may be null |
| people[].mobilerequired | string | may be null |
| people[].isPrimaryrequired | boolean | |
| balance | object | Base currency; only on GET /contacts/{id}. |
| balance.receivablerequired | string | A decimal amount as a string, e.g. "105.000". |
| balance.payablerequired | string | A decimal amount as a string, e.g. "105.000". |
| createdAtrequired | string | An instant, ISO 8601 in UTC. |
| updatedAtrequired | string | An instant, ISO 8601 in UTC. |
Errors this endpoint may answer
422 ROLE_IN_USE: Removing the customer or supplier role from a contact that has documents.