Get tenant settings
const url = 'https://api.emite.cr/v1/tenants/me/settings';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.emite.cr/v1/tenants/me/settings \ --header 'Authorization: Bearer <token>'Returns { enabledCurrencies, defaultCurrency, notificationPreferences, formatPreferences, pdfBranding }, every value effective: a notice switch the company never set reads as its default, and every PDF branding field the company never changed is filled with the default look. Used by the web /settings/preferences and /settings/notifications pages.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”object
Currencies the company works in (ISO 4217): the ones its documents and item prices may use. At least one.
Currency new invoices and items start in; always one of enabledCurrencies.
The email and WhatsApp notice switches, every one with its effective value (a switch never written reads as its default: true, and daily for invoiceAcceptedEmisor).
object
Email the company's notification address when Hacienda rejects one of its documents.
Email the company when Hacienda has not answered about a document in 24 hours.
Email the company when one of its documents ends in error.
Email the company when the customer's copy of an accepted document cannot be sent because the customer's email address is invalid.
Email the CUSTOMER (the receiver) each accepted document, with its PDF, signed XML and Hacienda's response. false leaves the delivery to the company.
Email the company when a run of a recurring invoice schedule fails for good (the schedule pauses itself).
Email the company when an XML bulk-import batch finishes (it also governs the WhatsApp summary of batches that arrive through the inbound mailbox).
Email the company when the scheduled send of a draft fails (no credentials, quota exhausted, signing error…).
When the company hears that Hacienda accepted one of its documents: each (one email per document, PDF and XML attached), daily (a morning summary of the previous day, the default) or off.
Deprecated: has no effect, and the settings read always answers false.
Company-wide switch for WhatsApp notifications: false silences them for every member, whatever each one chose on the phone they linked (opt-in per member, off by default).
Remind the company, by email and on WhatsApp, of purchase documents whose acceptance deadline is near (3 days, 1 day and the last day of the deadline). A document left unanswered is presumed fully accepted.
Email the company ahead of its tax-calendar deadlines (7, 3 and 1 days before, and on the day).
Remind the owner and the administrators, once a quarter, to download the XML backup of the documents the company issued and received in production in that quarter.
How numbers, money and dates are written on its PDFs, emails and screens.
object
Locale that writes numbers, money and dates on the PDFs, emails and screens — independent of the language of the text. es-CR by default.
Length of dates, as Intl.DateTimeFormat's dateStyle in that locale. short by default.
Clock used for times. 24h by default.
How amounts name their currency, as Intl.NumberFormat's currencyDisplay: code (e.g. CRC), symbol, narrowSymbol (e.g. ₡, the default) or name (the currency's name).
The look of the company's PDFs, every field with its effective value (the default where the company changed nothing). The logo has its own endpoint.
object
Accent color (#RRGGBB) of the «Total a pagar» bar and the card accents.
Color of the dark surfaces (title band, header row of the lines table): accent uses accentColor, ink a neutral navy. headerBandColor overrides both.
Explicit #RRGGBB for those dark surfaces; null = follow headerBandMode.
Typeface of the whole document.
Where the logo sits in the header, relative to the company's details.
Box the logo is fitted into: sm 80×50 pt, md 110×70 pt, lg 140×90 pt.
Row padding of the lines and other-charges tables.
Alternate-row striping in those tables.
Deprecated: always true — every fiscal document carries the Hacienda QR.
Print the CAByS code under each line.
Print the company's economic activity in the header.
On a foreign-currency document, print the colones equivalent (the «Total en colones» row and the exchange rate).
Tagline under the company's name on PDFs in Spanish; null = none.
The tagline on PDFs in English; null = none.
Note in the page footer of PDFs in Spanish, before the legal footer; null = none.
The footer note on PDFs in English; null = none.
Message between the lines table and the totals on PDFs in Spanish; null = none.
The thank-you message on PDFs in English; null = none.
Faint diagonal text on every page of PDFs in Spanish; null = no watermark.
The watermark on PDFs in English; null = no watermark.
Example
{ "enabledCurrencies": [ "CRC", "USD" ], "defaultCurrency": "AED", "notificationPreferences": { "invoiceAcceptedEmisor": "each" }, "formatPreferences": { "formatLocale": "es-CR", "dateStyle": "short", "timeStyle": "12h", "currencyDisplay": "code" }, "pdfBranding": { "accentColor": "#2563EB", "headerBandMode": "accent", "fontFamily": "roboto", "logoPosition": "left", "logoSize": "sm", "tableDensity": "compact" }}Missing or invalid JWT / API key.