Skip to content

Upload document

Request

Stores a document linked to an issued disposable certificate. Supported document types: identification evidence, signed contracts (e.g. CA22D), audit logs, identity assertions.

Note: if the disposable was issued with enrollDisposableWitheIDAssertion, the assertion is stored automatically — do not upload it with this method.

Security
basicAuth and sslCertificate
Path
lraIdstringrequired

Local Registration Authority (LRA) identifier.

Bodyapplication/jsonrequired
deviceCodestringrequired

Device code of the issued certificate, returned by enroll (deviceCode).

Example:"RHIDP0000000000000"
idOtpinteger, (int32)

OTP certificate identifier returned by enroll (certIdOtp). Use 0 if the disposable has otpType=NO_OTP.

Example:1234567
typeDocstringrequired

Type of document to upload.

Enum:"IDENTIFICATION_DOC""CONTRACT""AUDIT_LOG""IDENTITY_ASSERTION"
Example:"CONTRACT"
extensionstringrequired

File extension (not case-sensitive). Allowed values: pdf, zip, png, jpeg, jpg, docx, doc, odt, xml, json, txt, mp4, m4a, m4v.

Example:"pdf"
filestringrequired

Base64-encoded file content.

Example:"<base64-encoded file>"
externalKeystring

Optional external reference key.

Example:"external_key_sample"
curl -i -X POST \
  -u '<username>:<password>' \
  'https://lean.namirialtsp.com/RAWS_DISPOSABLE/api/document/{lraId}/uploadDoc' \
  -H 'Content-Type: application/json' \
  -d '{
    "deviceCode": "RHIDP0000000000000",
    "idOtp": 1234567,
    "typeDoc": "CONTRACT",
    "extension": "pdf",
    "file": "<base64-encoded PDF>"
  }'

Responses

OK

Bodyapplication/json
deviceCodestring

Device code of the certificate the document is linked to.

Example:"RHIDP0000000000000"
filenamestring

Server-generated filename for the uploaded document.

Example:"1234567_a4ece4b3e9626ccfd3bac2eb77c0c1d7950be77e190a64fcf1957279e677ffc7.pdf"
typeDocstring

Type of the uploaded document.

Enum:"IDENTIFICATION_DOC""CONTRACT""AUDIT_LOG""IDENTITY_ASSERTION"
Example:"CONTRACT"
externalKeystring or null

External reference key, if provided in the request. null if not provided.

Example:"external_key_sample"
uploadDateinteger, (int64)

Upload timestamp in epoch milliseconds.

Example:1733496805136
Response
{ "deviceCode": "RHIDP0000000000000", "filename": "1234567_a4ece4b3e9626ccfd3bac2eb77c0c1d7950be77e190a64fcf1957279e677ffc7.pdf", "typeDoc": "CONTRACT", "externalKey": null, "uploadDate": 1733496805136 }