You can use this method to store documents linked to the issued disposable:
- the evidence of the identification
- signed contracts (eg. CA22D)
- audit log of the signature process
Note: If the disposable is issued with the enrollDisposableWitheIDAssertion method you don't need to upload the assertion with this method. In this case the assertion is automatically stored.
For the full technical reference, see the OpenAPI specification.
POST /api/document/{lraId}/uploadDoc| Name | Required | Description |
|---|---|---|
Content-Type | Yes | Must be application/json. |
Authorization | Yes | Basic Auth credentials. |
| Parameter | Type | Required | Description |
|---|---|---|---|
lraId | integer | Yes | LRA identifier. |
| Parameter | Type | Required | Description |
|---|---|---|---|
deviceCode | string | Yes | The device code of the issued certificate. |
idOtp | integer | Yes | The OTP identification associated to the disposable. Use 0 if otpType=NO_OTP. |
typeDoc | string | Yes | Document type. Allowed values: IDENTIFICATION_DOC, CONTRACT, AUDIT_LOG, IDENTITY_ASSERTION. |
extension | string | Yes | File extension (not case-sensitive). Allowed: pdf, zip, png, jpeg, jpg, docx, doc, odt, xml, json, txt, mp4, m4a, m4v. |
file | string | Yes | File content, base64 encoded. |
externalKey | string | No | An external reference to the file. |
{
"idOtp": 2587763,
"deviceCode": "RHIDP2412011111111",
"externalKey": "external_key_sample",
"file": "encoded base 64 file",
"extension": "pdf",
"typeDoc": "CONTRACT"
}200 — Document uploaded
{
"deviceCode": "RHIDP2412011111111",
"typeDoc": "CONTRACT",
"externalKey": "external_key_sample",
"uploadDate": 1733496805136,
"filename": "3333217_a4ece4b3e9626ccfd3bac2eb77c0c1d7950be77e190a64fcf1957279e677ffc7.pdf"
}uploadDate is returned as a Unix timestamp in milliseconds (e.g. 1733496805136 = 2024-12-06T10:13:25Z).
All errors below return HTTP 500.
| Error code | Description |
|---|---|
| 242 | Input parameter invalid |
| 1027 | The document is duplicated |
| 1028 | The file exceeds the maximum size limit |
Error code 242 is returned when an invalid parameter is passed. Examples:
{
"code": 242,
"message": "deviceCode: should not be null"
}{
"code": 242,
"message": "extension: value 'docx' is not allowed"
}The parameters that can trigger error 242 are: deviceCode, lraid, idOtp, extension, typeDoc.
For authentication errors, see Authentication.