Skip to main content

Upload an onboarding document

You can upload supporting documents using the API or on the Dashboard.

Prerequisites

Before you can upload a document, the collection status must be WaitingForDocument.

API guide​

Use the API to upload required documents in three steps.

Step 1: Generate upload URL​

  1. Call the generateSupportingDocumentUploadUrl mutation.
  2. Enter all required information: supportingDocumentCollectionId, filename, supportingDocumentPurpose, and supportingDocumentType.
  3. Add the GenerateSupportingDocumentUploadUrlSuccessPayload with required key/value pairs and url.
  4. Add other optional messages to the payload, either for validation or in case of rejection.

🔎 Open the mutation in API Explorer

mutation GenerateUploadUrl {
generateSupportingDocumentUploadUrl(
input: {
supportingDocumentCollectionId: "$COLLECTION_ID"
filename: "$DOCUMENT_FILE"
supportingDocumentPurpose: CompanyRegistration
supportingDocumentType: RegisterExtract
}
) {
... on GenerateSupportingDocumentUploadUrlSuccessPayload {
__typename
upload {
fields {
key
value
}
url
}
}
}
}

Step 2: Recover generated URL from payload​

Recover the generated url in the payload, as well as several pairs of keys and values.

Upload URL expiration

The url is only valid for seven days, after which you'd need to generate a new url.

{
"data": {
"generateSupportingDocumentUploadUrl": {
"__typename": "GenerateSupportingDocumentUploadUrlSuccessPayload",
"upload": {
"fields": [
{
"key": "Key",
"value": "INPUT/865ed98c-64aa-4288-a51a-e2f199287ab8"
},
{
"key": "X-Amz-Algorithm",
"value": "AWS4-HMAC-SHA256"
},
{
"key": "X-Amz-Credential",
"value": "ASIAWHEXXLUXL7AGJ4VK/20220705/eu-west-1/s3/aws4_request"
},
{
"key": "X-Amz-Date",
"value": "20220705T153359Z"
},
{
"key": "X-Amz-Security-Token",
"value": "FwoGZXIvYXdzEJH//////////wEaDCfPIY23o3yUfkdcBiKnBCMRiFV1ec3bQNAeD4yvIkMeVBuI3+XgizJ72OAseCffRFdhIIM9Bx80x6Mrb04IrtggYOm8GZZngpBwVJJwib06sXXYdAbkW59j2NKj7kE1FsiBs5MGq3lGpOgKHTWocr1et3vULY4Et2yLHkE1D+pwW4CExYqW6R2azviUhPJ2MACXLR2FvngTp5Wdz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xiUWZPdjM5dXdRSjh0eXVkMlRVZFpnMEtWQ0VLZlByN0lOWnlXZG9KYXlLMnNOV2Rmb0FnbGtFY0c5MHBNeDBjYVBINFZvdDlvRXBYOTNlajA0RXA2bFgyZDZTcGlveS84dTlHcXVqVXVmV2E5NHVDQWdFWENyZVRlN3NLT2V6a1pZR01pdnI0UFJBanVNYjdmbkRqR3pTQVhNcWh5OHhhN3o5SFNPbWlWaURndHY4V3pLdzFQc3hvSE10TlBFVCJ9XX0="
},
{
"key": "X-Amz-Signature",
"value": "994a3ba731d27a4606b90f4adc60b85af80ec8d2f048ffc37ebb97833c06657e"
},
{
"key": "X-Amz-Meta-X-Swan-Supporting-Document-Id",
"value": "865ed98c-64aa-4288-a51a-e2f199287ab8"
}
],
"url": "https://s3.eu-west-1.amazonaws.com/swan-supporting-document-master-sandbox"
}
}
}
}}

Step 3: Send POST request​

Send an HTTP POST request to the url without a Content-Type header using the following cURL command. Supported file formats are .pdf, .png, and .jpg.

curl --location --request POST '$UPLOAD_URL' \
--form 'Key="INPUT/$ID"' \
--form 'X-Amz-Algorithm="AWS4-HMAC-SHA256"' \
--form 'X-Amz-Credential="$CREDENTIAL"' \
--form 'X-Amz-Date="20220705T135458Z"' \
--form 'X-Amz-Security-Token="$TOKEN"' \
--form 'Policy="$POLICY"' \
--form 'X-Amz-Signature="$SIGNATURE"' \
--form 'X-Amz-Meta-X-Swan-Supporting-Document-Id="$DOCUMENT_ID"' \
--form 'file=@"$FILE_PATH"'

Replace all $VARIABLES with the values provided in the payload.

Upload successful

When you upload a document with the HTTP POST cURL command, Amazon sends a 204: No content error, but the document was successfully uploaded.

Dashboard: Onboarding​

Use the Dashboard to upload required documents.

  1. On your Dashboard, go to Data > Onboardings.
  2. Open the onboarding for which you'd like to upload documents. The onboarding status must be Ongoing (Valid).
  3. Open the Supporting documents tab.
  4. Upload all required documents in the Supporting documents section, either by dropping your file or browsing.
  5. If the button Upload another document is available, use it to upload more documents if needed.