Company Address
Manage the address that prints on the company's documents. An address is a separate record linked to the company via addressId. Create or edit an address here, then set it as the company's document address with addressId in Company Info.
Use cases: Set the billing address shown on invoices and receipts for a company you manage.
POST
/addresses/createCreate a new address for the authenticated company. All fields are optional. The company association is set automatically from your API key.
To make this the address printed on documents, send its addressId in a PUT /settings/ request (see Company Info).
Body Parameters
| Name | Type | Description | |
|---|---|---|---|
name | string | A label for the address (e.g. "Head office"). | |
city | string | City. | |
street | string | Street name. | |
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": 456
}PUT
/addresses/:idUpdate an existing address. The address must belong to the authenticated company.
Returns 404 ADDRESS_NOT_FOUND if the address does not exist or belongs to another company.
Path Parameters
| Name | Type | Description | |
|---|---|---|---|
id | number | required | The address ID to update. |
Body Parameters
| Name | Type | Description | |
|---|---|---|---|
name | string | A label for the address. | |
city | string | City. | |
street | string | Street name. | |
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": 456,
"name": "Head office",
"city": "Tel Aviv",
"street": "Rothschild",
"streetNumber": "1",
"notes": null
}
}