Skip to content

Render a sample invoice PDF with the given branding

POST
/v1/tenants/me/pdf-branding/preview
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.

locale
string
Allowed values: es en
Media typeapplication/json
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

Binary application/pdf stream (no JSON envelope).

Media typeapplication/pdf
string format: binary

Missing or invalid JWT / API key.