Skip to content

Update tenant settings (transactional with audit log)

PATCH
/v1/tenants/me/settings
curl --request PATCH \
--url https://api.emite.cr/v1/tenants/me/settings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "enabledCurrencies": [ "CRC", "USD" ], "defaultCurrency": "AED", "notificationPreferences": { "invoiceRejected": true, "invoiceTimeout": true, "invoiceError": true, "recipientUndeliverable": false, "invoiceAcceptedReceiver": false, "recurringFailed": true, "importCompleted": true, "scheduledSendFailed": true, "invoiceAcceptedEmisor": "each", "invoiceAcceptedReceiverCopyToSelf": false, "whatsappEnabled": true, "acceptanceReminders": true, "fiscalReminders": true, "archiveReminders": true }, "formatPreferences": { "formatLocale": "es-CR", "dateStyle": "short", "timeStyle": "12h", "currencyDisplay": "code" }, "pdfBranding": { "accentColor": "#2563EB", "headerBandMode": "accent", "headerBandColor": "#1E293B", "fontFamily": "roboto", "logoPosition": "left", "logoSize": "sm", "tableDensity": "compact", "tableRowStripe": true, "showQr": true, "showCabys": true, "showEconomicActivity": true, "showColonesEquivalent": true, "taglineEs": "Soluciones tecnológicas a su medida", "taglineEn": "Tailored tech solutions", "footerNoteEs": "Cuenta BAC: CR05... | SINPE: 8888-0000", "footerNoteEn": "Bank account... | Mobile pay: 8888-0000", "thankYouEs": "¡Gracias por su compra!", "thankYouEn": "Thank you for your business!", "watermarkTextEs": "COPIA", "watermarkTextEn": "COPY" } }'

PATCH with shallow-merge semantics: enabledCurrencies and defaultCurrency are REPLACED; notificationPreferences, formatPreferences and pdfBranding are merged field by field (only the fields sent change; a pdfBranding field sent as null goes back to its default). Concurrent edits are serialized. Disabling a currency does not touch items — their prices in it are kept and come back if it is enabled again — but is refused while drafts use it, and a document in a disabled currency cannot be created. defaultCurrency must end up among enabledCurrencies (400 DEFAULT_CURRENCY_NOT_ENABLED); writing pdfBranding needs a plan with PDF branding (402 FEATURE_NOT_IN_PLAN). Every successful update is audited. Returns the settings after the update, as GET does.

Media typeapplication/json
object
enabledCurrencies

Currencies the company works in, as ISO 4217 codes; REPLACES the whole list (at least one). Dropping a currency that still has draft invoices answers 409 CURRENCY_HAS_DRAFTS; the item prices in it are kept and come back if it is enabled again.

Array<string>
Example
[
"CRC",
"USD"
]
defaultCurrency

Currency new invoices and new items start in. It must be one of the enabled currencies after this update (400 DEFAULT_CURRENCY_NOT_ENABLED).

string
Allowed values: AED AFN ALL AMD ANG AOA ARS AUD AWG AZN BAM BBD BDT BGN BHD BIF BMD BND BOB BOV BRL BSD BTN BWP BYR BZD CAD CDF CHE CHF CHW CLF CLP CNY COP COU CRC CUC CUP CVE CZK DJF DKK DOP DZD EGP ERN ETB EUR FJD FKP GBP GEL GHS GIP GMD GNF GTQ GYD HKD HNL HRK HTG HUF IDR ILS INR IQD IRR ISK JMD JOD JPY KES KGS KHR KMF KPW KRW KWD KYD KZT LAK LBP LKR LRD LSL LYD MAD MDL MGA MKD MMK MNT MOP MRO MUR MVR MWK MXN MXV MYR MZN NAD NGN NIO NOK NPR NZD OMR PAB PEN PGK PHP PKR PLN PYG QAR RON RSD RUB RWF SAR SBD SCR SDG SEK SGD SHP SLL SOS SRD SSP STD SVC SYP SZL THB TJS TMT TND TOP TRY TTD TWD TZS UAH UGX USD USN UYI UYU UZS VEF VND VUV WST XAF XCD XDR XOF XPF XSU XUA YER ZAR ZMW ZWL
Example
CRC
notificationPreferences

The email and WhatsApp notice switches. Partial: only the fields sent change, the rest keep their stored value.

object
invoiceRejected

Email the company's notification address when Hacienda rejects one of its documents.

boolean
Example
true
invoiceTimeout

Email the company when Hacienda has not answered about a document in 24 hours.

boolean
Example
true
invoiceError

Email the company when one of its documents ends in error.

boolean
Example
true
recipientUndeliverable

Email the company when an accepted document's customer copy cannot be sent because the customer's email address is invalid.

boolean
Example
false
invoiceAcceptedReceiver

Send the CUSTOMER (the receiver) each accepted document by email, with its PDF, signed XML and Hacienda's response. false leaves the delivery to the company; a resend requested from the document still goes out.

boolean
Example
false
recurringFailed

Email the company when a run of a recurring invoice schedule fails for good (the schedule pauses itself).

boolean
Example
true
importCompleted

Email the company when an XML bulk-import batch finishes; it also governs the WhatsApp summary of batches that arrive through the inbound mailbox.

boolean
Example
true
scheduledSendFailed

Email the company when the scheduled send of a draft fails (no credentials, quota exhausted, signing error…).

boolean
Example
true
invoiceAcceptedEmisor

When the issuer 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) or off.

string
Allowed values: each daily off
Example
daily
invoiceAcceptedReceiverCopyToSelf

Deprecated: has no effect and reads back as false. Use invoiceAcceptedEmisor.

boolean
Example
false
whatsappEnabled

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).

boolean
Example
true
acceptanceReminders

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.

boolean
Example
true
fiscalReminders

Email the company ahead of its tax-calendar deadlines (7, 3 and 1 days before, and on the day).

boolean
Example
true
archiveReminders

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.

boolean
Example
true
formatPreferences

How numbers, money and dates are written on the PDFs, emails and screens. Partial: only the fields sent change.

object
formatLocale

Locale that writes numbers, money and dates on the PDFs, emails and screens — independent of the language of the text. One of es-CR (the default), es-MX, es-AR, es-ES, en-US, en-GB, pt-BR, fr-FR.

string
Allowed values: es-CR es-MX es-AR es-ES en-US en-GB pt-BR fr-FR
Example
es-CR
dateStyle

Length of dates, as Intl.DateTimeFormat's dateStyle in that locale. Defaults to short.

string
Allowed values: short medium long
Example
medium
timeStyle

Clock used for times. Defaults to 24h.

string
Allowed values: 12h 24h
Example
24h
currencyDisplay

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).

string
Allowed values: code symbol narrowSymbol name
Example
symbol
pdfBranding

The look of the company's PDFs (the logo has its own endpoint). Partial: only the fields sent change, and one sent as null goes back to its default. Writing it needs a plan with PDF branding (402 FEATURE_NOT_IN_PLAN).

object
accentColor

Hex color #RRGGBB. Null to reset.

string
nullable
Example
#2563EB
headerBandMode

Color of the dark surfaces — the title band and the header row of the lines table: accent uses accentColor, ink a neutral navy (the default). headerBandColor overrides both. Null to reset.

string
nullable
Allowed values: accent ink
Example
ink
headerBandColor

Hex color #RRGGBB; overrides headerBandMode. Null to reset.

string
nullable
Example
#1E293B
fontFamily

Typeface of the whole document; roboto by default. A character the family lacks is drawn in Inter. Null to reset.

string
nullable
Allowed values: roboto lora inter montserrat opensans merriweather
Example
roboto
logoPosition

Where the logo sits in the header: left or right (the default) of the company's details, or center, above them. Null to reset.

string
nullable
Allowed values: left center right
Example
right
logoSize

Box the logo is fitted into, keeping its proportions: sm (80×50 pt), md (110×70 pt, the default) or lg (140×90 pt). Null to reset.

string
nullable
Allowed values: sm md lg
Example
md
tableDensity

Row padding of the lines and other-charges tables: compact, normal (the default) or comfortable. Null to reset.

string
nullable
Allowed values: compact normal comfortable
Example
normal
tableRowStripe

Alternate-row striping. Null to reset.

boolean
nullable
Example
true
showQr

Ignored: every fiscal document carries the Hacienda QR, at the bottom right (the position MH-DGT-RES-0027-2024, art. 5, prescribes; the requirement itself is suspended by its Transitorio III). Accepted for backward compatibility.

boolean
nullable
Example
true
showCabys

Render the per-line CABYS code subtext.

boolean
nullable
Example
true
showEconomicActivity

Render the issuer economic-activity line.

boolean
nullable
Example
true
showColonesEquivalent

Render the CRC equivalent for foreign-currency docs.

boolean
nullable
Example
true
taglineEs

Short line under the company's name, on PDFs rendered in Spanish (taglineEn is the English one; neither falls back to the other). Empty or null = no tagline.

string
nullable <= 120 characters
Example
Soluciones tecnológicas a su medida
taglineEn

The tagline on PDFs rendered in English. Empty or null = no tagline.

string
nullable <= 120 characters
Example
Tailored tech solutions
footerNoteEs

Note in the page footer of PDFs rendered in Spanish, printed BEFORE the legal footer, which always stays. Empty or null = no note.

string
nullable <= 300 characters
Example
Cuenta BAC: CR05... | SINPE: 8888-0000
footerNoteEn

The footer note on PDFs rendered in English. Empty or null = no note.

string
nullable <= 300 characters
Example
Bank account... | Mobile pay: 8888-0000
thankYouEs

Message between the lines table and the totals, on PDFs rendered in Spanish. Empty or null = no message.

string
nullable <= 200 characters
Example
¡Gracias por su compra!
thankYouEn

The thank-you message on PDFs rendered in English. Empty or null = none.

string
nullable <= 200 characters
Example
Thank you for your business!
watermarkTextEs

Faint diagonal text stamped on every page of PDFs rendered in Spanish (e.g. COPIA). Empty or null = no watermark.

string
nullable <= 30 characters
Example
COPIA
watermarkTextEn

The watermark on PDFs rendered in English. Empty or null = no watermark.

string
nullable <= 30 characters
Example
COPY
Media typeapplication/json
object
enabledCurrencies
required

Currencies the company works in (ISO 4217): the ones its documents and item prices may use. At least one.

Array<string>
Allowed values: AED AFN ALL AMD ANG AOA ARS AUD AWG AZN BAM BBD BDT BGN BHD BIF BMD BND BOB BOV BRL BSD BTN BWP BYR BZD CAD CDF CHE CHF CHW CLF CLP CNY COP COU CRC CUC CUP CVE CZK DJF DKK DOP DZD EGP ERN ETB EUR FJD FKP GBP GEL GHS GIP GMD GNF GTQ GYD HKD HNL HRK HTG HUF IDR ILS INR IQD IRR ISK JMD JOD JPY KES KGS KHR KMF KPW KRW KWD KYD KZT LAK LBP LKR LRD LSL LYD MAD MDL MGA MKD MMK MNT MOP MRO MUR MVR MWK MXN MXV MYR MZN NAD NGN NIO NOK NPR NZD OMR PAB PEN PGK PHP PKR PLN PYG QAR RON RSD RUB RWF SAR SBD SCR SDG SEK SGD SHP SLL SOS SRD SSP STD SVC SYP SZL THB TJS TMT TND TOP TRY TTD TWD TZS UAH UGX USD USN UYI UYU UZS VEF VND VUV WST XAF XCD XDR XOF XPF XSU XUA YER ZAR ZMW ZWL
defaultCurrency
required

Currency new invoices and items start in; always one of enabledCurrencies.

string
Allowed values: AED AFN ALL AMD ANG AOA ARS AUD AWG AZN BAM BBD BDT BGN BHD BIF BMD BND BOB BOV BRL BSD BTN BWP BYR BZD CAD CDF CHE CHF CHW CLF CLP CNY COP COU CRC CUC CUP CVE CZK DJF DKK DOP DZD EGP ERN ETB EUR FJD FKP GBP GEL GHS GIP GMD GNF GTQ GYD HKD HNL HRK HTG HUF IDR ILS INR IQD IRR ISK JMD JOD JPY KES KGS KHR KMF KPW KRW KWD KYD KZT LAK LBP LKR LRD LSL LYD MAD MDL MGA MKD MMK MNT MOP MRO MUR MVR MWK MXN MXV MYR MZN NAD NGN NIO NOK NPR NZD OMR PAB PEN PGK PHP PKR PLN PYG QAR RON RSD RUB RWF SAR SBD SCR SDG SEK SGD SHP SLL SOS SRD SSP STD SVC SYP SZL THB TJS TMT TND TOP TRY TTD TWD TZS UAH UGX USD USN UYI UYU UZS VEF VND VUV WST XAF XCD XDR XOF XPF XSU XUA YER ZAR ZMW ZWL
notificationPreferences
required

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
invoiceRejected
required

Email the company's notification address when Hacienda rejects one of its documents.

boolean
invoiceTimeout
required

Email the company when Hacienda has not answered about a document in 24 hours.

boolean
invoiceError
required

Email the company when one of its documents ends in error.

boolean
recipientUndeliverable
required

Email the company when the customer's copy of an accepted document cannot be sent because the customer's email address is invalid.

boolean
invoiceAcceptedReceiver
required

Email the CUSTOMER (the receiver) each accepted document, with its PDF, signed XML and Hacienda's response. false leaves the delivery to the company.

boolean
recurringFailed
required

Email the company when a run of a recurring invoice schedule fails for good (the schedule pauses itself).

boolean
importCompleted
required

Email the company when an XML bulk-import batch finishes (it also governs the WhatsApp summary of batches that arrive through the inbound mailbox).

boolean
scheduledSendFailed
required

Email the company when the scheduled send of a draft fails (no credentials, quota exhausted, signing error…).

boolean
invoiceAcceptedEmisor
required

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.

string
Allowed values: each daily off
invoiceAcceptedReceiverCopyToSelf
required

Deprecated: has no effect, and the settings read always answers false.

boolean
whatsappEnabled
required

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).

boolean
acceptanceReminders
required

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.

boolean
fiscalReminders
required

Email the company ahead of its tax-calendar deadlines (7, 3 and 1 days before, and on the day).

boolean
archiveReminders
required

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.

boolean
formatPreferences
required

How numbers, money and dates are written on its PDFs, emails and screens.

object
formatLocale
required

Locale that writes numbers, money and dates on the PDFs, emails and screens — independent of the language of the text. es-CR by default.

string
Allowed values: es-CR es-MX es-AR es-ES en-US en-GB pt-BR fr-FR
dateStyle
required

Length of dates, as Intl.DateTimeFormat's dateStyle in that locale. short by default.

string
Allowed values: short medium long
timeStyle
required

Clock used for times. 24h by default.

string
Allowed values: 12h 24h
currencyDisplay
required

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).

string
Allowed values: code symbol narrowSymbol name
pdfBranding
required

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
accentColor
required

Accent color (#RRGGBB) of the «Total a pagar» bar and the card accents.

string
headerBandMode
required

Color of the dark surfaces (title band, header row of the lines table): accent uses accentColor, ink a neutral navy. headerBandColor overrides both.

string
Allowed values: accent ink
headerBandColor
required

Explicit #RRGGBB for those dark surfaces; null = follow headerBandMode.

string
nullable
fontFamily
required

Typeface of the whole document.

string
Allowed values: roboto lora inter montserrat opensans merriweather
logoPosition
required

Where the logo sits in the header, relative to the company's details.

string
Allowed values: left center right
logoSize
required

Box the logo is fitted into: sm 80×50 pt, md 110×70 pt, lg 140×90 pt.

string
Allowed values: sm md lg
tableDensity
required

Row padding of the lines and other-charges tables.

string
Allowed values: compact normal comfortable
tableRowStripe
required

Alternate-row striping in those tables.

boolean
showQr
required

Deprecated: always true — every fiscal document carries the Hacienda QR.

boolean
showCabys
required

Print the CAByS code under each line.

boolean
showEconomicActivity
required

Print the company's economic activity in the header.

boolean
showColonesEquivalent
required

On a foreign-currency document, print the colones equivalent (the «Total en colones» row and the exchange rate).

boolean
taglineEs
required

Tagline under the company's name on PDFs in Spanish; null = none.

string
nullable
taglineEn
required

The tagline on PDFs in English; null = none.

string
nullable
footerNoteEs
required

Note in the page footer of PDFs in Spanish, before the legal footer; null = none.

string
nullable
footerNoteEn
required

The footer note on PDFs in English; null = none.

string
nullable
thankYouEs
required

Message between the lines table and the totals on PDFs in Spanish; null = none.

string
nullable
thankYouEn
required

The thank-you message on PDFs in English; null = none.

string
nullable
watermarkTextEs
required

Faint diagonal text on every page of PDFs in Spanish; null = no watermark.

string
nullable
watermarkTextEn
required

The watermark on PDFs in English; null = no watermark.

string
nullable
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.

Settings mutation requires the settings:write scope.

CURRENCY_HAS_DRAFTS — draft invoices in the currency being disabled. Resolve drafts first.