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/clients

List all clients with optional filtering and pagination.

`GET /clients/inactive` takes the same parameters and returns clients that have been deactivated.

Query Parameters

NameTypeDescription
search
stringFree-text search across relevant fields.
type
stringClient type filter. One of "MURSHE", "COMPANY", or "PATOOR".
email
stringFilter by exact email address.
taxId
stringFilter by tax ID.
hasContacts
booleanIf true, return only clients that have contacts.
sortBy
stringColumn to sort by.
sortOrder
string"asc" or "desc".
limit
numberItems per page. Default 50, clamped to 1-200.
offset
numberRow offset to start from (default 0).
page
number1-based page number (default 1). Converted to an offset; an explicit `offset` wins over it.
pageSize
numberAlias 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/:visibleId

Get 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

NameTypeDescription
visibleId
stringrequiredThe 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/create

Create 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

NameTypeDescription
name
stringrequiredClient name.
taxId
stringTax ID / company number. Optional for a client (unlike a vendor, where it is required).
email
stringClient email address.
phoneNumber
stringPhone number, up to 20 characters.
type
stringClient type: "MURSHE" (licensed dealer), "COMPANY", or "PATOOR" (exempt dealer).
addressId
numberId of an existing address to attach.
logoFileId
numberId 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
numberThe N in the payment term. Zero or more.
bankNumber
stringBank code, up to 20 characters.
branchNumber
stringBranch number, up to 20 characters.
accountNumber
stringAccount number, up to 50 characters.
existingContactId
numberAttach a contact that already exists instead of creating one.
contact
objectCreate a contact along with the client. Only accepted here — the edit endpoint does not take it; use the Contacts API afterwards.
firstName
stringrequiredContact first name.
lastName
stringContact last name.
phoneNumber
stringContact phone number.
email
stringContact email.
addressId
numberAddress to attach to the contact.
hashavshevetEntityAccountKey
stringExternal 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
objectPer-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/:visibleId

Update 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

NameTypeDescription
visibleId
stringrequiredThe client's visibleId.

Body Parameters

NameTypeDescription
name
stringClient name.
taxId
stringTax ID.
email
stringEmail address.
phoneNumber
stringPhone number, up to 20 characters.
type
string"MURSHE", "COMPANY", or "PATOOR".
addressId
numberAddress to attach; `null` detaches it.
logoFileId
numberFile 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
numberDays for the payment term; `null` clears it.
bankNumber
stringBank code.
branchNumber
stringBranch number.
accountNumber
stringAccount number.
creditLimit
numberCredit limit for this client; `null` removes it.
specialVat
numberA 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 | stringOverride the running internal client code. `null` or an empty string clears it; omit to leave it as it is.
accountingCustomerNumber
stringCustomer number in your accounting system.
taxDeductionsFileNumber
stringWithholding-tax file number.
hashavshevetEntityAccountKey
stringExternal bookkeeping account key. An empty string leaves it unchanged rather than clearing it.
documentEmailOverrides
objectPer-document-type email recipients. `null` clears them.
currencyPolicyJson
objectPer-currency exchange-rate policy for this client. A currency absent from the map inherits the company policy; `null` removes the override entirely.
balance
numberSet the client's balance directly. An accounting correction, not an ordinary update — the balance is otherwise derived from documents.
expectedBalance
numberSet 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"
}

Last updated