Request a document upload link
Returns a presigned URL and a documentId. Upload the file to that URL with one PUT, as described in Uploading the file. The file never passes through the API. The link is valid for 30 minutes.
Then confirm the document by sending its documentId in businessDocumentIdList on Update business profile. For an identity document, you can instead send it as idFrontDocumentUploadId.
Path
customerIduuidpathrequiredFrom Create business profile.
Body
documentTypestringrequiredBusinessDocument or UboIdentity. See document types.
documentCategorystringrequiredUp to 100 characters. For UboIdentity, the matching identity type code, such as PASSPORT. For BusinessDocument, the kind of document, such as ProofOfAddress.
contentTypestringrequiredapplication/pdf, image/jpeg or image/png. It is signed into the link, so your upload must send exactly this Content-Type.
uboIduuidRequired for UboIdentity: the person's uboId from the create response. Omit for BusinessDocument.
ownershipDetailIduuiddeprecatedThe previous name for uboId, still accepted. Sending both with different values is a 400.
No file name is sent. The stored file is named from documentCategory and contentType, for example PASSPORT.jpg. A fileName sent by an older integration is ignored.
Response
documentIduuidUse it to confirm the document.
uploadUrlstringPresigned URL to PUT the file to.
fileKeystringThe storage key.
expiresAtdate-timeWhen uploadUrl stops working.
Uploading the file
Send the file bytes as the raw body of a PUT to uploadUrl, with the Content-Type header set to exactly the contentType you requested. Send no other authentication: the link carries it.
- A
200from storage means the file landed. The document moves fromNewDocumenttoUploadedonce it passes malware scanning, usually within seconds. - A file that fails the scan is deleted and the document becomes
Quarantined. Request a new link and upload a clean file. - The file must really be the type you declared: a PDF for
application/pdf, a JPEG forimage/jpeg, a PNG forimage/png.
Finish each upload before you request another link with the same documentCategory for this business. Requesting a link removes any document with that category that has not been uploaded yet, even one for a different person. Two people's PASSPORT links requested back to back would lose the first.
Errors from the PUT come from storage, as XML, not from the API:
| Storage error | HTTP | When | What to do |
|---|---|---|---|
SignatureDoesNotMatch | 403 | The Content-Type header is missing or differs from contentType, or the URL was changed. | Send the exact contentType; use uploadUrl as returned. |
AccessDenied (Request has expired) | 403 | The link is older than 30 minutes. | Request a new link. |
Errors
Besides the common errors, the link request returns:
| Code | HTTP | When |
|---|---|---|
ValidationControl.Error | 400 | A field is invalid, uboId is missing for UboIdentity, or uboId and ownershipDetailId name different people. |
OwnershipDetail.NotAuthorized | 403 | The person belongs to another customer. |
OwnershipDetail.NotFound | 404 | No person on this customer has that id. |
Customer.AlreadySubmitted | 409 | An analyst is reviewing or has decided. |
DocumentUpload.PresignedUrlFailed | 500 | Storage could not issue a link. Retry later. |