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.
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. | |
page | number | Page number (default 1). | |
limit | number | Items per page (default 50). |
Request
curl -X GET "https://api.glance.co.il/clients" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"Response
Response
{
"data": [
{
"visibleId": 1,
"name": "Acme Corp",
"taxId": "515000000",
"email": "info@acme.com",
"type": "COMPANY",
"createdAt": "2024-01-15T10:00:00Z",
"balance": 5000
}
],
"pagination": {
"total": 42,
"limit": 50,
"offset": 0,
"hasMore": false
}
}GET
/clients/id/:visibleIdRetrieve a single client by its visible ID, including contacts and addresses.
Path Parameters
| Name | Type | Description | |
|---|---|---|---|
visibleId | number | required | The client visible ID. |
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
{
"data": {
"visibleId": 1,
"name": "Acme Corp",
"taxId": "515000000",
"email": "info@acme.com",
"type": "COMPANY",
"paymentTermType": "CURRENT_PLUS_DAYS",
"paymentTermDays": 30,
"bankNumber": "12",
"branchNumber": "345",
"accountNumber": "6789000",
"contacts": [
{
"visibleId": 1,
"firstName": "John",
"lastName": "Doe",
"email": "john@acme.com",
"phoneNumber": "050-1234567"
}
],
"addresses": [
{
"id": 1,
"street": "123 Main St",
"city": "Tel Aviv",
"zip": "6100000"
}
],
"balance": 5000,
"createdAt": "2024-01-15T10:00:00Z"
}
}POST
/clients/createCreate a new client record.
Body Parameters
| Name | Type | Description | |
|---|---|---|---|
name | string | required | Client display name. |
taxId | string | Tax identification number. | |
email | string | Primary email address (must be a valid email). | |
type | string | Client type: "MURSHE", "COMPANY", or "PATOOR". | |
addressId | number | ID of an existing address to link. | |
paymentTermType | string | Payment term type: "CURRENT_PLUS_DAYS" or "DAYS_ONLY". | |
paymentTermDays | number | Number of days for payment terms. | |
bankNumber | string | Bank number. | |
branchNumber | string | Branch number. | |
accountNumber | string | Bank account number. | |
contact | object | Primary contact to create alongside the client. | |
firstName | string | required | Contact first name. |
lastName | string | Contact last name. | |
phoneNumber | string | Contact phone number. | |
email | string | Contact email (must be a valid email). | |
addressId | number | ID of an existing address to link to the contact. |
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",
"type": "example_type",
"addressId": 0,
"paymentTermType": "example_paymentTermType",
"paymentTermDays": 0,
"bankNumber": "example_bankNumber",
"branchNumber": "example_branchNumber",
"accountNumber": "example_accountNumber",
"contact": {}
}'Response
Response
{
"data": {
"visibleId": 2,
"name": "New Client",
"type": "COMPANY",
"createdAt": "2024-03-20T14:30:00Z"
}
}PUT
/clients/edit/:visibleIdUpdate an existing client. Only the fields you provide will be changed.
Path Parameters
| Name | Type | Description | |
|---|---|---|---|
visibleId | number | required | The client visible ID. |
Body Parameters
| Name | Type | Description | |
|---|---|---|---|
name | string | Client display name. | |
taxId | string | Tax identification number. | |
email | string | Primary email address (must be a valid email). | |
type | string | Client type: "MURSHE", "COMPANY", or "PATOOR". | |
addressId | number | ID of an existing address to link. | |
paymentTermType | string | Payment term type: "CURRENT_PLUS_DAYS" or "DAYS_ONLY". | |
paymentTermDays | number | Number of days for payment terms. | |
bankNumber | string | Bank number. | |
branchNumber | string | Branch number. | |
accountNumber | string | Bank account number. | |
contact | object | Primary contact to update or create. | |
firstName | string | required | Contact first name. |
lastName | string | Contact last name. | |
phoneNumber | string | Contact phone number. | |
email | string | Contact email (must be a valid email). | |
addressId | number | ID of an existing address to link to the contact. |
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",
"type": "example_type",
"addressId": 0,
"paymentTermType": "example_paymentTermType",
"paymentTermDays": 0,
"bankNumber": "example_bankNumber",
"branchNumber": "example_branchNumber",
"accountNumber": "example_accountNumber",
"contact": {}
}'Response
Response
{
"data": {
"visibleId": 1,
"name": "Updated Corp",
"type": "COMPANY"
}
}