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.

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.
page
numberPage number (default 1).
limit
numberItems 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/:visibleId

Retrieve a single client by its visible ID, including contacts and addresses.

Path Parameters

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

Create a new client record.

Body Parameters

NameTypeDescription
name
stringrequiredClient display name.
taxId
stringTax identification number.
email
stringPrimary email address (must be a valid email).
type
stringClient type: "MURSHE", "COMPANY", or "PATOOR".
addressId
numberID of an existing address to link.
paymentTermType
stringPayment term type: "CURRENT_PLUS_DAYS" or "DAYS_ONLY".
paymentTermDays
numberNumber of days for payment terms.
bankNumber
stringBank number.
branchNumber
stringBranch number.
accountNumber
stringBank account number.
contact
objectPrimary contact to create alongside the client.
firstName
stringrequiredContact first name.
lastName
stringContact last name.
phoneNumber
stringContact phone number.
email
stringContact email (must be a valid email).
addressId
numberID 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/:visibleId

Update an existing client. Only the fields you provide will be changed.

Path Parameters

NameTypeDescription
visibleId
numberrequiredThe client visible ID.

Body Parameters

NameTypeDescription
name
stringClient display name.
taxId
stringTax identification number.
email
stringPrimary email address (must be a valid email).
type
stringClient type: "MURSHE", "COMPANY", or "PATOOR".
addressId
numberID of an existing address to link.
paymentTermType
stringPayment term type: "CURRENT_PLUS_DAYS" or "DAYS_ONLY".
paymentTermDays
numberNumber of days for payment terms.
bankNumber
stringBank number.
branchNumber
stringBranch number.
accountNumber
stringBank account number.
contact
objectPrimary contact to update or create.
firstName
stringrequiredContact first name.
lastName
stringContact last name.
phoneNumber
stringContact phone number.
email
stringContact email (must be a valid email).
addressId
numberID 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"
  }
}