Render a sample invoice PDF with the given branding
const url = 'https://api.emite.cr/v1/tenants/me/pdf-branding/preview?locale=es';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"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"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url 'https://api.emite.cr/v1/tenants/me/pdf-branding/preview?locale=es' \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "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" }'Renders a synthetic 3-line invoice using the tenant's real identity (name, logo, location) but with the provided branding overrides — NOT persisted. The web settings page debounces this endpoint to power its live preview pane. Locale defaults to es; pass ?locale=en for English.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”object
Hex color #RRGGBB. Null to reset.
Example
#2563EBColor 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.
Example
inkHex color #RRGGBB; overrides headerBandMode. Null to reset.
Example
#1E293BTypeface of the whole document; roboto by default. A character the family lacks is drawn in Inter. Null to reset.
Example
robotoWhere the logo sits in the header: left or right (the default) of the company's details, or center, above them. Null to reset.
Example
rightBox 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.
Example
mdRow padding of the lines and other-charges tables: compact, normal (the default) or comfortable. Null to reset.
Example
normalAlternate-row striping. Null to reset.
Example
trueIgnored: 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.
Example
trueRender the per-line CABYS code subtext.
Example
trueRender the issuer economic-activity line.
Example
trueRender the CRC equivalent for foreign-currency docs.
Example
trueShort 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.
Example
Soluciones tecnológicas a su medidaThe tagline on PDFs rendered in English. Empty or null = no tagline.
Example
Tailored tech solutionsNote in the page footer of PDFs rendered in Spanish, printed BEFORE the legal footer, which always stays. Empty or null = no note.
Example
Cuenta BAC: CR05... | SINPE: 8888-0000The footer note on PDFs rendered in English. Empty or null = no note.
Example
Bank account... | Mobile pay: 8888-0000Message between the lines table and the totals, on PDFs rendered in Spanish. Empty or null = no message.
Example
¡Gracias por su compra!The thank-you message on PDFs rendered in English. Empty or null = none.
Example
Thank you for your business!Faint diagonal text stamped on every page of PDFs rendered in Spanish (e.g. COPIA). Empty or null = no watermark.
Example
COPIAThe watermark on PDFs rendered in English. Empty or null = no watermark.
Example
COPYResponses
Section titled “Responses”Binary application/pdf stream (no JSON envelope).
Missing or invalid JWT / API key.