Contacts

Manage contacts that can be associated with clients. A contact represents an individual person (e.g. a billing contact at a company).

Use cases: Use contacts to store individual people linked to client accounts, such as billing managers or project leads.
GET/contacts

List all contacts with optional search and pagination.

Query Parameters

NameTypeDescription
search
stringFree-text search across relevant fields.
page
numberPage number (default 1).
limit
numberItems per page (default 50).

Request

curl -X GET "https://api.glance.co.il/contacts" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"

Response

Response
{
  "data": [
    {
      "visibleId": 1,
      "firstName": "John",
      "lastName": "Doe",
      "email": "john@acme.com",
      "phoneNumber": "050-1234567",
      "clientVisibleId": 1
    }
  ],
  "pagination": {
    "total": 15,
    "limit": 50,
    "offset": 0,
    "hasMore": false
  }
}
GET/contacts/id/:visibleId

Get a single contact by visible ID.

Path Parameters

NameTypeDescription
visibleId
numberrequiredThe contact visible ID.

Request

curl -X GET "https://api.glance.co.il/contacts/id/:visibleId" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"

Response

Response
{
  "data": {
    "visibleId": 1,
    "firstName": "John",
    "lastName": "Doe",
    "email": "john@acme.com",
    "phoneNumber": "050-1234567",
    "clientVisibleId": 1,
    "address": {
      "id": 1,
      "street": "123 Main St",
      "city": "Tel Aviv",
      "zip": "6100000"
    }
  }
}
POST/contacts/create

Create a new contact.

Body Parameters

NameTypeDescription
firstName
stringrequiredContact first name.
lastName
stringContact last name.
phoneNumber
stringPhone number.
email
stringEmail address (must be a valid email).
addressId
numberID of an existing address to link.
clientVisibleId
numberVisible ID of the client to associate this contact with.

Request

curl -X POST "https://api.glance.co.il/contacts/create" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "firstName": "example_firstName",
  "lastName": "example_lastName",
  "phoneNumber": "example_phoneNumber",
  "email": "example_email",
  "addressId": 0,
  "clientVisibleId": 0
}'

Response

Response
{
  "data": {
    "visibleId": 3,
    "firstName": "Jane",
    "lastName": "Smith",
    "email": "jane@example.com",
    "phoneNumber": "052-9876543",
    "clientVisibleId": 1
  }
}
PUT/contacts/edit/:visibleId

Update an existing contact. Only provided fields are changed.

Path Parameters

NameTypeDescription
visibleId
numberrequiredThe contact visible ID.

Body Parameters

NameTypeDescription
firstName
stringContact first name.
lastName
stringContact last name.
phoneNumber
stringPhone number.
email
stringEmail address (must be a valid email).
addressId
numberID of an existing address to link.
clientVisibleId
numberVisible ID of the client to associate this contact with.

Request

curl -X PUT "https://api.glance.co.il/contacts/edit/:visibleId" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "firstName": "example_firstName",
  "lastName": "example_lastName",
  "phoneNumber": "example_phoneNumber",
  "email": "example_email",
  "addressId": 0,
  "clientVisibleId": 0
}'

Response

Response
{
  "data": {
    "visibleId": 1,
    "firstName": "John",
    "lastName": "Doe-Updated",
    "email": "john.updated@acme.com"
  }
}
DELETE/contacts/delete/:visibleId

Permanently delete a contact.

Path Parameters

NameTypeDescription
visibleId
numberrequiredThe contact visible ID.

Request

curl -X DELETE "https://api.glance.co.il/contacts/delete/:visibleId" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"

Response

Response
{
  "data": {
    "success": true
  }
}