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/settings

The 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/settings

Update 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

NameTypeDescription
name
stringCompany name.
type
string"MURSHE", "COMPANY" or "PATOOR".
email
stringCompany email.
phone
stringCompany phone, up to 40 characters. Printed in the document header when that field is enabled. `null` clears it.
addressId
numberId of an existing address record.
logoFileId
numberId of an uploaded logo. Omit to leave the current logo alone; send `null` to clear it.
signatureFileId
numberId of an uploaded signature image. Same omit-versus-null rule as the logo.
taxAmount
numberThe 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
numberDefault validity of a new quotation, in days.
defaultOrderDeliveryDays
numberDefault delivery lead time on a new order, in days.
hideOrderPrices
booleanPrint orders without prices.
hideDeliveryPrices
booleanPrint delivery notes without prices.
defaultWithholdingTaxRate
numberWithholding rate applied to a supplier with no valid certificate, 0–100. `null` means nothing is withheld unless the supplier carries their own rate.
defaultCashLedgerId
numberLedger a cash payment posts to by default.
defaultChecksLedgerId
numberLedger a cheque posts to by default.
defaultCreditCardLedgerId
numberLedger a card payment posts to by default.
defaultBankLedgerId
numberLedger 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
stringBrand colour applied over the template, as `#RRGGBB`. `null` means no colour — the documents you have today, unchanged.
letterheadMarginTopMm
numberTop margin, in millimetres, left blank for pre-printed letterhead paper, 0–100. `null` disables it — which is the default.
letterheadMarginBottomMm
numberBottom margin for letterhead paper, in millimetres.
docTypeMarginOverrides
objectLetterhead 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
objectWhich 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
objectExchange-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
booleanTurn vouchers and punch cards on for the company.
deriveBookingAvailabilityFromShifts
booleanDerive 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"
  }
}

Last updated