Addresses
Addresses are shared records: one address can be attached to clients, vendors, contacts, warehouses and documents.
Use cases: Create an address once, then attach it by id wherever it is needed — a client's billing address, a warehouse location, a document's recipient.
GET
/addressesList addresses with optional filtering and pagination.
Query Parameters
| Name | Type | Description | |
|---|---|---|---|
search | string | Free-text search across relevant fields. | |
name | string | Filter by address name. | |
city | string | Filter by city. | |
street | string | Filter by street. | |
sortBy | string | Column to sort by. | |
sortOrder | string | "asc" or "desc". | |
limit | number | Items per page. Default 50, clamped to 1-200. | |
offset | number | Row offset to start from (default 0). | |
page | number | 1-based page number (default 1). Converted to an offset; an explicit `offset` wins over it. | |
pageSize | number | Alias of `limit`. Wins over `limit` when both are sent. |
Request
curl -X GET "https://api.glance.co.il/addresses" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"Response
Response
{
"data": [
{
"id": 88,
"name": "Head office",
"city": "תל אביב",
"street": "הרצל",
"streetNumber": "12",
"notes": null
}
],
"pagination": {
"total": 9,
"limit": 50,
"offset": 0,
"hasMore": false,
"page": 1,
"pageSize": 50,
"totalPages": 1
}
}GET
/addresses/id/:idGet a single address.
Returned flat, not wrapped in `data`. `vendorId` mirrors the row's `entityId`; `vendors` carries each supplier's own SKU and buying price.
Path Parameters
| Name | Type | Description | |
|---|---|---|---|
id | number | required | The address id. |
Request
curl -X GET "https://api.glance.co.il/addresses/id/:id" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"Response
Response
{
"id": 88,
"name": "Head office",
"city": "תל אביב",
"street": "הרצל",
"streetNumber": "12",
"notes": null
}POST
/addresses/createCreate an address.
Every field is optional. There is no postal code or country field — Israeli addresses are held as city, street and street number.
Body Parameters
| Name | Type | Description | |
|---|---|---|---|
name | string | A label for the address, e.g. "Head office". | |
city | string | City. | |
street | string | Street. | |
streetNumber | string | Street number. | |
notes | string | Free-text notes. |
Request
curl -X POST "https://api.glance.co.il/addresses/create" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "example_name",
"city": "example_city",
"street": "example_street",
"streetNumber": "example_streetNumber",
"notes": "example_notes"
}'Response
Response
{
"success": true,
"addressId": 88
}PUT
/addresses/:idUpdate an address. All fields are optional.
An empty body is accepted and returns the address unchanged. Because the record is shared, editing it changes it everywhere it is attached.
Path Parameters
| Name | Type | Description | |
|---|---|---|---|
id | number | required | The address id. |
Body Parameters
| Name | Type | Description | |
|---|---|---|---|
name | string | A label for the address. | |
city | string | City. | |
street | string | Street. | |
streetNumber | string | Street number. | |
notes | string | Free-text notes. |
Request
curl -X PUT "https://api.glance.co.il/addresses/:id" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "example_name",
"city": "example_city",
"street": "example_street",
"streetNumber": "example_streetNumber",
"notes": "example_notes"
}'Response
Response
{
"success": true,
"address": {
"id": 88,
"name": "Head office",
"city": "תל אביב",
"street": "הרצל",
"streetNumber": "12",
"notes": null
}
}DELETE
/addresses/:idDelete an address.
Refused while the address is still attached to something — detach it first.
Path Parameters
| Name | Type | Description | |
|---|---|---|---|
id | number | required | The address id. |
Request
curl -X DELETE "https://api.glance.co.il/addresses/:id" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"Response
Response
{
"success": true
}