Clients
Manage your client records. Clients can be individuals (MURSHE), companies (COMPANY), or exempt dealers (PATOOR).
Use cases: Use the Clients API to sync your CRM contacts, create clients before issuing invoices, or look up balances.
GET
/clientsList all clients with optional filtering and pagination.
`GET /clients/inactive` takes the same parameters and returns clients that have been deactivated.
Query Parameters
| Name | Type | Description | |
|---|---|---|---|
search | string | Free-text search across relevant fields. | |
type | string | Client type filter. One of "MURSHE", "COMPANY", or "PATOOR". | |
email | string | Filter by exact email address. | |
taxId | string | Filter by tax ID. | |
hasContacts | boolean | If true, return only clients that have contacts. | |
sortBy | string | Column to sort by. | |
sortOrder | string | "asc" or "desc". | |
limit | number | Items per page. Default 50, clamped to 1-200. | |
offset | number | Row offset to start from (default 0). | |
page | number | 1-based page number (default 1). Converted to an offset; an explicit `offset` wins over it. | |
pageSize | number | Alias of `limit`. Wins over `limit` when both are sent. |
Request
curl -X GET "https://api.glance.co.il/clients" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"Response
Response
{
"data": [
{
"id": 5531,
"visibleId": "7c1a9e40-2b3d-4f8a-9c6e-1d5b7a3f2e08",
"name": "Acme Corp",
"taxId": "515000000",
"email": "info@acme.com",
"phoneNumber": "03-5550000",
"type": "COMPANY",
"clientInternalCode": 104,
"balance": 5000,
"contacts": []
}
],
"pagination": {
"total": 42,
"limit": 50,
"offset": 0,
"hasMore": false,
"page": 1,
"pageSize": 50,
"totalPages": 1
}
}GET
/clients/id/:visibleIdGet a single client with contacts, addresses, balance and what makes it up.
The client is returned flat, not wrapped in `data`. A visibleId that matches nothing returns `null` with status 200 — check for it rather than relying on a 404. `GET /clients/entity/:entityId` takes the internal numeric id instead and returns the same shape.
Path Parameters
| Name | Type | Description | |
|---|---|---|---|
visibleId | string | required | The client's visibleId (UUID). |
Request
curl -X GET "https://api.glance.co.il/clients/id/:visibleId" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"Response
Response
{
"id": 5531,
"visibleId": "7c1a9e40-2b3d-4f8a-9c6e-1d5b7a3f2e08",
"name": "Acme Corp",
"taxId": "515000000",
"email": "info@acme.com",
"phoneNumber": "03-5550000",
"type": "COMPANY",
"clientInternalCode": 104,
"paymentTermType": "CURRENT_PLUS_DAYS",
"paymentTermDays": 30,
"address": {
"id": 88,
"city": "תל אביב",
"street": "הרצל",
"streetNumber": "12"
},
"addresses": [
{
"id": 88,
"isPrimary": true,
"city": "תל אביב"
}
],
"contacts": [
{
"id": 71,
"firstName": "Efi",
"lastName": "Levi",
"email": "efi@acme.com"
}
],
"logoFile": null,
"balance": 5000,
"expectedBalance": 6180,
"obligationBreakdown": {
"…": "what the balance is made of"
},
"openDocuments": {
"…": "the open documents behind it"
}
}POST
/clients/createCreate a new client.
The response acknowledges the creation; it does not echo the client. Read it back with GET /clients/id/:visibleId using the `visibleId` returned here.
Body Parameters
| Name | Type | Description | |
|---|---|---|---|
name | string | required | Client name. |
taxId | string | Tax ID / company number. Optional for a client (unlike a vendor, where it is required). | |
email | string | Client email address. | |
phoneNumber | string | Phone number, up to 20 characters. | |
type | string | Client type: "MURSHE" (licensed dealer), "COMPANY", or "PATOOR" (exempt dealer). | |
addressId | number | Id of an existing address to attach. | |
logoFileId | number | Id of an uploaded file to use as the client's logo. | |
paymentTermType | string | "CURRENT_PLUS_DAYS" (end of month plus N days) or "DAYS_ONLY" (N days from the document date). | |
paymentTermDays | number | The N in the payment term. Zero or more. | |
bankNumber | string | Bank code, up to 20 characters. | |
branchNumber | string | Branch number, up to 20 characters. | |
accountNumber | string | Account number, up to 50 characters. | |
existingContactId | number | Attach a contact that already exists instead of creating one. | |
contact | object | Create a contact along with the client. Only accepted here — the edit endpoint does not take it; use the Contacts API afterwards. | |
firstName | string | required | Contact first name. |
lastName | string | Contact last name. | |
phoneNumber | string | Contact phone number. | |
email | string | Contact email. | |
addressId | number | Address to attach to the contact. | |
hashavshevetEntityAccountKey | string | External bookkeeping account key, up to 8 characters. Saved only for users permitted to map accounting exports. This is the *external* key — distinct from `clientInternalCode`, the running number Glance assigns. | |
documentEmailOverrides | object | Per-document-type email recipients, e.g. send delivery notes to the warehouse and invoices to accounts payable. |
Request
curl -X POST "https://api.glance.co.il/clients/create" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "example_name",
"taxId": "example_taxId",
"email": "example_email",
"phoneNumber": "example_phoneNumber",
"type": "example_type",
"addressId": 0,
"logoFileId": 0,
"paymentTermType": "example_paymentTermType",
"paymentTermDays": 0,
"bankNumber": "example_bankNumber",
"branchNumber": "example_branchNumber",
"accountNumber": "example_accountNumber",
"existingContactId": 0,
"contact": {},
"hashavshevetEntityAccountKey": "example_hashavshevetEntityAccountKey",
"documentEmailOverrides": {}
}'Response
Response
{
"success": true,
"clientId": 5531,
"id": 5531,
"visibleId": "7c1a9e40-2b3d-4f8a-9c6e-1d5b7a3f2e08"
}PUT
/clients/edit/:visibleIdUpdate an existing client. All fields are optional.
There is no `contact` field here — contacts are created with the client or through the Contacts API. `PUT /clients/deactivate/:visibleId` and `PUT /clients/reactivate/:visibleId` take a client out of the active list and back.
Path Parameters
| Name | Type | Description | |
|---|---|---|---|
visibleId | string | required | The client's visibleId. |
Body Parameters
| Name | Type | Description | |
|---|---|---|---|
name | string | Client name. | |
taxId | string | Tax ID. | |
email | string | Email address. | |
phoneNumber | string | Phone number, up to 20 characters. | |
type | string | "MURSHE", "COMPANY", or "PATOOR". | |
addressId | number | Address to attach; `null` detaches it. | |
logoFileId | number | File id to use as the client's logo. | |
paymentTermType | string | "CURRENT_PLUS_DAYS" or "DAYS_ONLY"; `null` clears the term and falls back to the company default. | |
paymentTermDays | number | Days for the payment term; `null` clears it. | |
bankNumber | string | Bank code. | |
branchNumber | string | Branch number. | |
accountNumber | string | Account number. | |
creditLimit | number | Credit limit for this client; `null` removes it. | |
specialVat | number | A VAT rate for this client only, 0-100. `null` restores the company rate. | |
roundDocumentTotal | string | "use_default", "round" or "none" — whether documents for this client round to whole shekels. | |
clientInternalCode | number | string | Override the running internal client code. `null` or an empty string clears it; omit to leave it as it is. | |
accountingCustomerNumber | string | Customer number in your accounting system. | |
taxDeductionsFileNumber | string | Withholding-tax file number. | |
hashavshevetEntityAccountKey | string | External bookkeeping account key. An empty string leaves it unchanged rather than clearing it. | |
documentEmailOverrides | object | Per-document-type email recipients. `null` clears them. | |
currencyPolicyJson | object | Per-currency exchange-rate policy for this client. A currency absent from the map inherits the company policy; `null` removes the override entirely. | |
balance | number | Set the client's balance directly. An accounting correction, not an ordinary update — the balance is otherwise derived from documents. | |
expectedBalance | number | Set the client's expected balance (what they still owe once open orders and delivery notes turn into invoices) directly. Like `balance`, a correction: the difference is written as an opening-balance transaction, and only when it exceeds an agora. |
Request
curl -X PUT "https://api.glance.co.il/clients/edit/:visibleId" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "example_name",
"taxId": "example_taxId",
"email": "example_email",
"phoneNumber": "example_phoneNumber",
"type": "example_type",
"addressId": 0,
"logoFileId": 0,
"paymentTermType": "example_paymentTermType",
"paymentTermDays": 0,
"bankNumber": "example_bankNumber",
"branchNumber": "example_branchNumber",
"accountNumber": "example_accountNumber",
"creditLimit": 0,
"specialVat": 0,
"roundDocumentTotal": "example_roundDocumentTotal",
"clientInternalCode": "example_clientInternalCode",
"accountingCustomerNumber": "example_accountingCustomerNumber",
"taxDeductionsFileNumber": "example_taxDeductionsFileNumber",
"hashavshevetEntityAccountKey": "example_hashavshevetEntityAccountKey",
"documentEmailOverrides": {},
"currencyPolicyJson": {},
"balance": 0,
"expectedBalance": 0
}'Response
Response
{
"success": true,
"visibleId": "7c1a9e40-2b3d-4f8a-9c6e-1d5b7a3f2e08"
}