Clients
Manage your client records. Clients can be individuals (MURSHE), companies (COMPANY), or exempt dealers (PATOOR).
/clientsList all clients with optional filtering and pagination.
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 email — a substring match, so `acme.com` finds every address at that domain. Use `exactEmail` to find one customer. | |
exactEmail | string | Filter by one exact email address. Surrounding spaces are ignored and the comparison is case-insensitive, so `Dana@Example.com ` finds `dana@example.com` — and never `adana@example.com`. | |
phone | string | Filter by phone number. Only the digits are compared, so `050-123 4567` finds `0501234567`, and an Israeli number matches in both its local (`05x…`) and international (`9725x…`) form. | |
taxId | string | Filter by tax ID. | |
hasContacts | boolean | If true, return only clients that have contacts. | |
groupId | number | Only clients in this customer group. | |
customFieldId | number | Only clients with a value in this custom field. Add `customFieldValue` to narrow it. | |
customFieldValue | string | With `customFieldId`: only clients whose value contains this text. Without it, any non-empty value matches. | |
debtStatus | string | "owes" (the client owes you), "credit" (you owe the client) or "settled" (zero). The debt is the one the list shows: what the client owes on documents and on external income invoices. | |
minDebt | number | Only clients whose debt is at least this amount. | |
ids | string | Comma-separated numeric client ids, up to 2,000 — only these clients, e.g. the rows selected on a list. | |
leads | string | "exclude" or "only". With the CRM module, a client card on an open or lost stage of the leads board is a lead. Omitted, the list includes leads, as before. | |
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
{
"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,
"expectedBalance": 0,
"uninvoiced": {
"count": 2,
"amount": 1180
},
"contacts": []
}
],
"pagination": {
"total": 42,
"limit": 50,
"offset": 0,
"hasMore": false,
"page": 1,
"pageSize": 50,
"totalPages": 1
}
}/clients/exportThe clients list as an Excel file, with the same filters and sorting as GET /clients.
Query Parameters
| Name | Type | Description | |
|---|---|---|---|
search | string | Free-text search across relevant fields. | |
sortBy | string | Column to sort by. | |
sortOrder | string | "asc" or "desc". |
Request
curl -X GET "https://api.glance.co.il/clients/export" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"Response
(binary — an .xlsx file, with Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)/clients/duplicatesExisting clients that look like the one you are about to create — check before opening a second card for the same party.
Query Parameters
| Name | Type | Description | |
|---|---|---|---|
taxId | string | Matched by digits only, so `51-500000-0` finds `515000000`. Ignored below 5 digits. | |
phoneNumber | string | Matched as an Israeli number, so `054-1234567` and `+972 54 1234567` are the same. Ignored below 8 digits. | |
email | string | Exact match, ignoring case and surrounding spaces. | |
name | string | Exact match, ignoring case and extra spaces. Ignored below 2 characters. | |
exclude | string | A client visibleId to leave out — the card being edited. |
Request
curl -X GET "https://api.glance.co.il/clients/duplicates" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"Response
{
"data": [
{
"visibleId": "7c1a9e40-2b3d-4f8a-9c6e-1d5b7a3f2e08",
"name": "Acme Corp",
"taxId": "515000000",
"phoneNumber": "054-1234567",
"email": "info@acme.com",
"isActive": true,
"matchedOn": [
"taxId",
"phoneNumber"
]
}
]
}/clients/id/:visibleIdGet a single client with contacts, addresses, balance and what makes it up.
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
{
"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": -1180,
"obligationBreakdown": {
"…": "what the balance is made of"
},
"openDocuments": {
"…": "the open documents behind it"
},
"isVendor": true,
"vendorPayable": 1180
}/clients/id/:visibleId/statementThe client's statement (כרטסת): every document issued to the client, oldest first, with its debit or credit and a running balance.
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/statement" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"Response
{
"rows": [
{
"key": "doc:90211",
"date": "2026-09-02T09:14:00.000Z",
"kind": "DOCUMENT",
"documentId": 90211,
"documentVisibleId": "b2e7c4a1-0d3f-4e9b-8a6c-5f1d2e3a4b5c",
"documentType": "INVOICE",
"documentTypeLabel": "חשבונית מס",
"documentNumber": 150162,
"description": "ריטיינר ספטמבר",
"total": 7847,
"currencyCode": "ILS",
"debit": 7847,
"credit": 0,
"runningBalance": 7847,
"financial": true,
"status": "OPEN",
"isOpen": true,
"remainingAmount": 7847,
"cancelled": false,
"issue": null
},
{
"key": "doc:90240",
"date": "2026-09-05T11:02:00.000Z",
"kind": "DOCUMENT",
"documentId": 90240,
"documentVisibleId": "c9a1f3e2-7b4d-4c6e-9d8f-2a1b3c4d5e6f",
"documentType": "ORDER",
"documentTypeLabel": "הזמנה",
"documentNumber": 3012,
"description": null,
"total": 590,
"currencyCode": "ILS",
"debit": 0,
"credit": 0,
"runningBalance": 7847,
"financial": false,
"status": "OPEN",
"isOpen": true,
"remainingAmount": 590,
"cancelled": false,
"issue": null
}
],
"finalBalance": 7847,
"issues": 0,
"checksEnabled": true
}/clients/id/:visibleId/agingThe client's open invoices by days past their due date — the aging report for one client.
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/aging" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"Response
{
"asOfDate": "2026-10-15T20:59:59.999Z",
"currencyCode": "ILS",
"buckets": [
{
"key": "current",
"label": "שוטף"
},
{
"key": "d0_30",
"label": "0-30"
},
{
"key": "d31_60",
"label": "31-60"
},
{
"key": "d61_90",
"label": "61-90"
},
{
"key": "d90_plus",
"label": "90+"
}
],
"totals": {
"current": 1200,
"d0_30": 0,
"d31_60": 7847,
"d61_90": 0,
"d90_plus": 0
},
"total": 9047,
"debts": [
{
"documentVisibleId": "b2e7c4a1-0d3f-4e9b-8a6c-5f1d2e3a4b5c",
"documentNumber": 150162,
"documentType": "INVOICE",
"creationDate": "2026-09-02T09:14:00.000Z",
"payBy": "2026-09-02",
"remainingAmount": 7847,
"daysOverdue": 43,
"bucket": "d31_60"
}
]
}/clients/createCreate a new client.
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. | |
asLead | boolean | Open the card as a lead, on the first open stage of the leads board. Only with the CRM module; ignored without it. No `client.created` webhook goes out for a lead until it becomes a client. |
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": {},
"asLead": true
}'Response
{
"success": true,
"clientId": 5531,
"id": 5531,
"visibleId": "7c1a9e40-2b3d-4f8a-9c6e-1d5b7a3f2e08"
}/clients/edit/:visibleIdUpdate an existing client. All fields are optional.
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
{
"success": true,
"visibleId": "7c1a9e40-2b3d-4f8a-9c6e-1d5b7a3f2e08"
}/clients/id/:visibleId/vendor-roleMake an existing client a vendor too, so a party you both sell to and buy from has one card instead of two.
Path Parameters
| Name | Type | Description | |
|---|---|---|---|
visibleId | string | required | The client's visibleId. |
Request
curl -X POST "https://api.glance.co.il/clients/id/:visibleId/vendor-role" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"Response
{
"success": true,
"entityId": 5531,
"visibleId": "7c1a9e40-2b3d-4f8a-9c6e-1d5b7a3f2e08",
"alreadyHadRole": false
}/clients/merge/previewWhat merging one client card into another would move — call it before POST /clients/merge.
Query Parameters
| Name | Type | Description | |
|---|---|---|---|
source | string | required | visibleId of the duplicate card, the one that goes away. |
target | string | required | visibleId of the card that stays. |
Request
curl -X GET "https://api.glance.co.il/clients/merge/preview" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"Response
{
"source": {
"name": "Acme Corp",
"taxId": null
},
"target": {
"name": "Acme Corp Ltd",
"taxId": "515000000"
},
"moves": [
{
"label": "מסמכים",
"count": 35
},
{
"label": "תנועות יתרה",
"count": 61
}
]
}/clients/mergeMerge a duplicate client card into another. Everything that points at the duplicate moves to the card that stays.
Body Parameters
| Name | Type | Description | |
|---|---|---|---|
sourceVisibleId | string | required | The duplicate card, which becomes inactive. |
targetVisibleId | string | required | The card that stays. |
Request
curl -X POST "https://api.glance.co.il/clients/merge" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"sourceVisibleId": "example_sourceVisibleId",
"targetVisibleId": "example_targetVisibleId"
}'Response
{
"success": true,
"moved": {
"documents.entityId": 35,
"balanceTransactions.entityId": 61,
"ledgers": 1
}
}