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
/contactsList all contacts with optional search and pagination.
Query Parameters
| Name | Type | Description | |
|---|---|---|---|
search | string | Free-text search across relevant fields. | |
page | number | Page number (default 1). | |
limit | number | Items 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/:visibleIdGet a single contact by visible ID.
Path Parameters
| Name | Type | Description | |
|---|---|---|---|
visibleId | number | required | The 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/createCreate a new contact.
Body Parameters
| Name | Type | Description | |
|---|---|---|---|
firstName | string | required | Contact first name. |
lastName | string | Contact last name. | |
phoneNumber | string | Phone number. | |
email | string | Email address (must be a valid email). | |
addressId | number | ID of an existing address to link. | |
clientVisibleId | number | Visible 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/:visibleIdUpdate an existing contact. Only provided fields are changed.
Path Parameters
| Name | Type | Description | |
|---|---|---|---|
visibleId | number | required | The contact visible ID. |
Body Parameters
| Name | Type | Description | |
|---|---|---|---|
firstName | string | Contact first name. | |
lastName | string | Contact last name. | |
phoneNumber | string | Phone number. | |
email | string | Email address (must be a valid email). | |
addressId | number | ID of an existing address to link. | |
clientVisibleId | number | Visible 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/:visibleIdPermanently delete a contact.
Path Parameters
| Name | Type | Description | |
|---|---|---|---|
visibleId | number | required | The 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
}
}