Settings
Company-level configuration: identity and branding, VAT and rounding defaults, document design, letterhead margins and the exchange-rate policy.
Use cases: Read your account's tax rate and defaults before issuing documents, and set how issued documents look.
GET
/settingsThe whole session context: the authenticated user, the current company, and what this key may do.
Not wrapped in `data` — the five keys are at the top level. `currentCompany.taxAmount` is the company's VAT rate, and `hasPlan` says whether a plan is active. `GET /settings/roles` returns the role definitions on their own.
Request
curl -X GET "https://api.glance.co.il/settings" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"Response
Response
{
"user": {
"id": 12,
"firstName": "מיכל",
"lastName": "לוי",
"email": "michal@example.co.il",
"profilePicture": null
},
"currentCompany": {
"id": 42,
"name": "אלקבץ בע״מ",
"taxId": "515000000",
"type": "COMPANY",
"taxAmount": 18,
"email": "office@elkabetz.co.il",
"phone": "03-1234567",
"defaultVatMode": "BEFORE",
"documentTotalRounding": "none",
"documentTemplate": null,
"documentAccentColor": null,
"currencyPolicyJson": null,
"hasPlan": true
},
"userCompanies": [
{
"id": 42,
"name": "אלקבץ בע״מ"
}
],
"system": {
"…": "platform-level flags"
},
"actionRoles": {
"…": "which actions this key may perform"
},
"currentEmployee": null
}PUT
/settingsUpdate company settings. Every field is optional; only what you send is written.
A currency set to `"mode": "AUTO"` is **dropped** from the saved map rather than stored — no policy is exactly what "market rate" means, and keeping the entry would read as a deliberate override.
`GET /settings/currency-rates` previews the rates that would apply right now, taking `entityId`, `date`, `currencies` and `refresh=1` (to skip the cache), and answering `{ success, date, rates }`.
Body Parameters
| Name | Type | Description | |
|---|---|---|---|
name | string | Company name. | |
type | string | "MURSHE", "COMPANY" or "PATOOR". | |
email | string | Company email. | |
phone | string | Company phone, up to 40 characters. Printed in the document header when that field is enabled. `null` clears it. | |
addressId | number | Id of an existing address record. | |
logoFileId | number | Id of an uploaded logo. Omit to leave the current logo alone; send `null` to clear it. | |
signatureFileId | number | Id of an uploaded signature image. Same omit-versus-null rule as the logo. | |
taxAmount | number | The company VAT rate. | |
defaultVatMode | string | "BEFORE" (prices are quoted before VAT) or "INCLUDE" (VAT included). | |
documentTotalRounding | string | "none", "round" (to nearest), "round_up" or "round_down" — how document totals are rounded to whole shekels. | |
defaultQuotationValidityDays | number | Default validity of a new quotation, in days. | |
defaultOrderDeliveryDays | number | Default delivery lead time on a new order, in days. | |
hideOrderPrices | boolean | Print orders without prices. | |
hideDeliveryPrices | boolean | Print delivery notes without prices. | |
defaultWithholdingTaxRate | number | Withholding rate applied to a supplier with no valid certificate, 0–100. `null` means nothing is withheld unless the supplier carries their own rate. | |
defaultCashLedgerId | number | Ledger a cash payment posts to by default. | |
defaultChecksLedgerId | number | Ledger a cheque posts to by default. | |
defaultCreditCardLedgerId | number | Ledger a card payment posts to by default. | |
defaultBankLedgerId | number | Ledger a bank transfer posts to by default. | |
documentTemplate | string | "default" or "modern". `null` restores the default. An unknown value is rejected on save rather than at print time. | |
documentAccentColor | string | Brand colour applied over the template, as `#RRGGBB`. `null` means no colour — the documents you have today, unchanged. | |
letterheadMarginTopMm | number | Top margin, in millimetres, left blank for pre-printed letterhead paper, 0–100. `null` disables it — which is the default. | |
letterheadMarginBottomMm | number | Bottom margin for letterhead paper, in millimetres. | |
docTypeMarginOverrides | object | Letterhead margins per document type, as `{ "invoice": { "topMm": 40, "bottomMm": 20 } }`. A type not in the map falls back to the company-level margins; `null` clears the map. | |
letterheadHeaderFields | object | Which company details print in the PDF header, as booleans on `from`, `name`, `taxId`, `phone`, `email` and `address`. A missing key counts as visible, and `null` prints everything — the default. | |
currencyPolicyJson | object | Exchange-rate policy per currency, as `{ "USD": { "mode": "MARGIN", "marginPercent": 2 } }`. `mode` is "AUTO" (market rate), "MARGIN" (market plus `marginPercent`) or "FIXED" (`fixedRate`), and the matching field is required for the latter two. `null` clears the whole map. | |
prepaidPackagesEnabled | boolean | Turn vouchers and punch cards on for the company. | |
deriveBookingAvailabilityFromShifts | boolean | Derive booking availability from approved shifts rather than from the therapists' own hours. |
Request
curl -X PUT "https://api.glance.co.il/settings" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "example_name",
"type": "example_type",
"email": "example_email",
"phone": "example_phone",
"addressId": 0,
"logoFileId": 0,
"signatureFileId": 0,
"taxAmount": 0,
"defaultVatMode": "example_defaultVatMode",
"documentTotalRounding": "example_documentTotalRounding",
"defaultQuotationValidityDays": 0,
"defaultOrderDeliveryDays": 0,
"hideOrderPrices": true,
"hideDeliveryPrices": true,
"defaultWithholdingTaxRate": 0,
"defaultCashLedgerId": 0,
"defaultChecksLedgerId": 0,
"defaultCreditCardLedgerId": 0,
"defaultBankLedgerId": 0,
"documentTemplate": "example_documentTemplate",
"documentAccentColor": "example_documentAccentColor",
"letterheadMarginTopMm": 0,
"letterheadMarginBottomMm": 0,
"docTypeMarginOverrides": {},
"letterheadHeaderFields": {},
"currencyPolicyJson": {},
"prepaidPackagesEnabled": true,
"deriveBookingAvailabilityFromShifts": true
}'Response
Response
{
"success": true,
"company": {
"…": "the company row after the update"
}
}