Vai al contenuto

Upload document

Richiesta

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.

Sicurezza
basicAuth and sslCertificate
Percorso
lraIdstringobbligatorio

Local Registration Authority (LRA) identifier.

Corpoapplication/jsonobbligatorio
deviceCodestringobbligatorio

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

Esempio:"RHIDP0000000000000"
idOtpinteger, (int32)

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

Esempio:1234567
typeDocstringobbligatorio

Type of document to upload.

Enum:"IDENTIFICATION_DOC""CONTRACT""AUDIT_LOG""IDENTITY_ASSERTION"
Esempio:"CONTRACT"
extensionstringobbligatorio

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

Esempio:"pdf"
filestringobbligatorio

Base64-encoded file content.

Esempio:"<base64-encoded file>"
externalKeystring

Optional external reference key.

Esempio:"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>"
  }'

Risposte

OK

Corpoapplication/json
deviceCodestring

Device code of the certificate the document is linked to.

Esempio:"RHIDP0000000000000"
filenamestring

Server-generated filename for the uploaded document.

Esempio:"1234567_a4ece4b3e9626ccfd3bac2eb77c0c1d7950be77e190a64fcf1957279e677ffc7.pdf"
typeDocstring

Type of the uploaded document.

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

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

Esempio:"external_key_sample"
uploadDateinteger, (int64)

Upload timestamp in epoch milliseconds.

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