Skip to content
Documentation
Get started

Business

Import a signing certificate

POST
/v1/business/import-signing-certificate
curl --request POST \
--url https://api.timbro.do/v1/business/import-signing-certificate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "certificateP12Base64": "example", "password": "example" }'

Hands the business’s PKCS#12 archive and its password to Timbro’s custody once. Timbro uses the certificate for test, live, and DGII certification invoicing, including an environment the business binds later. When the business already has a certificate, importing a different valid one replaces it in every environment at once; the same certificate is a replay. A certificate from another signer than the one an environment enrolled is refused as certificate_signer_mismatch, and an import that collides with another one in progress as business_certificate_conflict, which the caller repeats. The import does not assert DGII production qualification.

Media typeapplication/json

Examplegenerated

{
"certificateP12Base64": "example",
"password": "example"
}
object
certificateP12Base64
required
string
>= 24 characters <= 200000 characters
password
required
string
>= 1 characters <= 256 characters

Default Response

Media typeapplication/json
Response fields and codes

The business the credential selects, its capabilities, and the requirements that remain.

object
object
required
string
Allowed value: business
id
required
string
/^business_[0-9a-hjkmnp-tv-z]{24,}$/
rnc
required
string
/^[0-9]{9}$/
legalName
required
string
>= 1 characters
economicActivity
required
Any of:
string
>= 1 characters <= 512 characters
revision
required
integer
capabilities
required

Invoices live.status is active only when the live signing certificate is active and at least one e-CF type in invoicing.live.documentTypes is ready. An empty or unreadable list is never active; requirements with mode: "live" name what is missing.

object
payments
required
object
requested
required
boolean
test
required
object
status
required
Any of:
string
Allowed value: active
live
required
object
status
required
Any of:
string
Allowed value: active
invoices
required
object
requested
required
boolean
test
required
object
status
required
Any of:
string
Allowed value: active
live
required
object
status
required
Any of:
string
Allowed value: active
fiscalDetails
required
object
commercialName
required
Any of:
string
address
required
Any of:
string
location
required
Any of:
object
placeId
required
string
/^place_[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/
catalogReleaseId
required
string
/^dr_[A-Za-z0-9._-]+$/
municipalityCode
required
Any of:
string
/^[0-9]{6}$/
name
required
string
>= 1 characters <= 160 characters
kind
required
Any of:
string
Allowed value: country
qualityStatus
required
Any of:
string
Allowed value: verified
ancestors
required

The places that contain the selected one, outermost first.

Array<object>
<= 32 items
object
placeId
required
string
/^place_[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/
name
required
string
>= 1 characters <= 160 characters
kind
required
Any of:
string
Allowed value: country
qualityStatus
required
Any of:
string
Allowed value: verified
phone
required
Any of:
string
email
required
Any of:
string
defaultIncomeType
required
Any of:
string
paymentsProfile
required
Any of:

Payer-facing support, address, and delivery terms. The legal name and RNC are the business’s.

object
displayName
required
string
>= 2 characters <= 80 characters /^(?=[\s\S]*\p{L})(?=\s*\S(?:[\s\S]*\S){1})(?!\s*(\S)\1*\s*$)[\s\S]+$/
statementDescriptor
required
string
>= 2 characters <= 22 characters /^(?=[\s\S]*\p{L})(?=\s*\S(?:[\s\S]*\S){1})(?!\s*(\S)\1*\s*$)[\s\S]+$/
permanentAddress
required

The selling merchant’s permanent business address.

object
line1
required
string
>= 3 characters <= 160 characters /^(?=[\s\S]*\p{L})(?=\s*\S(?:[\s\S]*\S){2})(?!\s*(\S)\1*\s*$)[\s\S]+$/
city
required
string
>= 2 characters <= 80 characters /^(?=[\s\S]*\p{L})(?=\s*\S(?:[\s\S]*\S){1})(?!\s*(\S)\1*\s*$)[\s\S]+$/
countryCode
required
string
/^[A-Z]{2}$/
line2
string
>= 1 characters <= 160 characters /\S/
province
string
>= 1 characters <= 80 characters /\S/
postalCode
string
>= 1 characters <= 20 characters /\S/
supportEmail
required
string format: email
<= 254 characters
supportPhone
required
string
/^\+[1-9][0-9]{7,14}$/
deliveryPolicy
required
discriminator: kind
object
kind
required
string
Allowed value: not_offered
paymentsProfileOrigin
required
Any of:
Any of:
string
Allowed value: derived
invoicing
required
object
test
required
Any of:
object
status
required
string
Allowed value: unavailable
cause
required
string
Allowed value: timbro_unreachable
live
required
Any of:
object
status
required
string
Allowed value: unavailable
cause
required
string
Allowed value: timbro_unreachable
requirements
required
Array<object>

One thing that must happen before a capability is active, and who acts on it. While a capability is active, a requirement it would otherwise block blocks nothing and is a warning. Live invoicing lists at most one requirement per reason class (legal_issuer_profile_required, signing_certificate_required, sequence_required, sequence_confirmation_pending), each with the e-CF documentTypes it affects. When Timbro refused the live Legal issuer profile, the first entry is fiscal_details_rejected instead, with field /fiscalDetails. The merchant owns all but sequence_confirmation_pending, which waits on dgii. default_income_type_required is deprecated and no longer returned: an invoicing business without a stored income type reads 01.

object
code
required
Any of:
string
Allowed value: capabilities_required
owner
required
Any of:
string
Allowed value: merchant
blocks
required
Array
<= 2 items
mode
Any of:
string
Allowed value: test
documentTypes

The e-CF types this requirement keeps from being issued, in type order. Absent when it applies to the whole environment.

Array
>= 1 items
field

JSON Pointer into this representation the requirement names.

string
errors
Array<object>
>= 1 items
object
code
required
string
message
required
string
onboardingUrl
required
string format: uri
request-id
required
string

Identifies this request. Quote it when you contact support.

Retry-After
string
/^[0-9]+$/

Seconds to wait before repeating this request or reading the resource again.