Skip to Content

Upload the signing certificate

POST
/v1/ec/businesses/{id}/certificates

The .p12 and its password are verified (the certificate must belong to the business and be valid) and sealed: the API can no longer open them; only the signing process can. The last certificate you upload signs test and live documents while it is valid; when it expires no earlier one signs, even if still valid: upload a new one.

Authorization

headerAuthorizationBearer <token>

Your API key, which acts for the one business it was created for: fb_live_… keys work at api.fiscalbase.io and issue in live, and fb_sandbox_… keys work at api-sandbox.fiscalbase.io and issue in sandbox, on the simulated SRI. A key sent to the other host is refused with api_key_wrong_host, which names its host.

Path Parameters

id*string
Formatuuid

Header Parameters

idempotency-key?string

Send the same key to retry safely: a repeat of the same request answers what the first answered, without doing it again. Keys are scoped to your key's business and environment; the same key with another request is 409 idempotency_key_reused.

Length1 <= length <= 255
Fiscalbase-Environment?string

The environment the call acts in. Required with a person's session; a key's own environment is the one that counts, so a key may leave it out, and naming another is 422 environment_mismatch.

Value in"sandbox""test""live"
Fiscalbase-Business?string

The business the call acts for. With a person's session, the one the call is about (without it, a call about one business is 422 business_required and a list covers every business of the organization); a key acts for its own, so naming another is 422 business_mismatch.

Formatuuid
Fiscalbase-Channel?string

Which of Fiscalbase's own integrations a key's call comes from, recorded as the channel of the documents it issues: a record, not a permission. Without it, api. A person's call is always console.

Value in"api""mcp"
Fiscalbase-Agent?string

The AI agent a key's call comes from, as its client names itself (the MCP server sets it); recorded with the request and shown in the console's request log.

Request Body

multipart/form-data
  1. body
file*file

The .p12 file.

Formatbinary
password*string
Length1 <= length <= 200

Response Body

Saved

application/json
  1. response
holder*|

Who signs: the holder's name, as the certification authority writes it in the certificate (its CN). Null if the certificate does not carry it.

holder_identification*|

The holder's cedula or, if the certificate does not carry it, their RUC. The certification authority writes it in its own extension or in the holder's serialNumber. Null if it cannot be read.

holder_identification_type*|

What holder_identification is: cedula (10 digits) or ruc (13). Null if there is none.

Value in"cedula""ruc"null
kind*|

natural_person if the holder signs for themselves, legal_representative if they represent a company. Only known for certificates uploaded since Fiscalbase started reading it; null on earlier ones or if the certification authority does not say.

Value in"natural_person""legal_representative"null
issuer_name*|

The certification authority that issued it, under the name it is known by: its organization (O) without the legal form, such as "Security Data".

subject*string

The holder's full distinguished name (RFC 4514), as it appears in the certificate. To show a person, use holder and holder_identification.

issuer*string

The full distinguished name of its issuer (RFC 4514). To show a person, use issuer_name.

serial_number*string
valid_from*string
Formatdate-time
valid_until*string
Formatdate-time
Example Request
curl -X POST 'https://api.fiscalbase.io/v1/ec/businesses/497f6eca-6276-4993-bfeb-53cbbbba6f08/certificates' \  -F 'file=string' \  -F 'password=string'
Example Response
{  "holder": "string",  "holder_identification": "string",  "holder_identification_type": "cedula",  "kind": "natural_person",  "issuer_name": "string",  "subject": "string",  "issuer": "string",  "serial_number": "string",  "valid_from": "2019-08-24T14:15:22Z",  "valid_until": "2019-08-24T14:15:22Z"}