Skip to content

Accept the pending documents on behalf of the company, through the link.

POST
/v1/legal/acceptance-links/accept
curl --request POST \
--url https://api.emite.cr/v1/legal/acceptance-links/accept \
--header 'Content-Type: application/json' \
--header 'user-agent: example' \
--data '{ "token": "example", "acceptances": [ { "documentType": "terminos-y-condiciones", "documentVersion": "3.0", "documentHash": "sha256:abcdef0123456789..." } ], "authority": true, "capacity": "holder" }'

Single use. The person declares the authority to bind the company (authority: true, else 400 LEGAL_AUTHORITY_REQUIRED), and must still be its owner or an admin (403 LEGAL_LINK_NOT_AUTHORIZED). Every pending document must be included, in its served version (400 LEGAL_ACCEPTANCE_INCOMPLETE). 409 LEGAL_LINK_ALREADY_USED the second time.

user-agent
required
string
Media typeapplication/json
object
token
required

The token of the acceptance link (/accept-legal?token=).

string
acceptances
required

At most 10 entries, and every document pending for the company must be among them, each in its served version with the hash of its text (400 LEGAL_ACCEPTANCE_INCOMPLETE when one is missing).

Array<object>
object
documentType
required

Slug of a document the company accepts: terminos-y-condiciones or politica-de-privacidad (the documents marked requiredForSignup). The Cookie Policy (politica-de-cookies) is only announced, never accepted (400 LEGAL_DOCUMENT_NOT_REQUIRED).

string
Allowed values: terminos-y-condiciones politica-de-privacidad politica-de-cookies
Example
terminos-y-condiciones
documentVersion
required

The version of the document served today (its version), up to 32 characters. Any other version is 409 OUTDATED_VERSION.

string
Example
3.0
documentHash
required

The SHA-256 of the exact Markdown text shown: sha256: followed by 64 hex digits, copied verbatim from the hash served with the document. It is the proof of which text was accepted; one that differs from the served text is 409 HASH_MISMATCH.

string
Example
sha256:abcdef0123456789...
authority
required

The person declares the authority to bind the company. Must be true (400 LEGAL_AUTHORITY_REQUIRED).

boolean
capacity
required

In which capacity the person declares it (Terms 1.3 and 3.2): holder (a natural person who is the taxpayer), legal_representative, or authorized by whoever represents the company. Recorded with the acceptance (400 LEGAL_CAPACITY_REQUIRED without it).

string
Allowed values: holder legal_representative authorized
Media typeapplication/json
object
acceptedAt
required

When the acceptance was recorded.

string format: date-time
documents
required

The documents and versions accepted through the link.

Array<object>
object
type
required

Slug of the document.

string
Allowed values: terminos-y-condiciones politica-de-privacidad politica-de-cookies
version
required

The version accepted.

string
Example
{
"documents": [
{
"type": "terminos-y-condiciones"
}
]
}