Upload Documents

The Document Upload API suite allows you to fully automate your KYC workflows with BlueSnap. Using these endpoints, you can build out a customer-facing experience for your vendors to get approved, all behind your Marketplace brand.

There are three steps to the document upload process:

  1. Receive a document request webhook from BlueSnap.
  2. Send a Retrieve Document Request API request and provide the details to your customer.
  3. Provide your customer with the ability to upload files to BlueSnap.

1. Receive Webhook from BlueSnap

Listen for notifications with transactionType= APPLICATION_DOCUMENT_REQUEST. This notification contains the vendor_id and case_id. The vendor_id is also included in the webhook you receive after creating the vendor. This will be your key for association to inform your customer they have action to take.

For example:

transactionType=APPLICATION_DOCUMENT_REQUEST&vendor_id=1165743&case_id=5005a00002kAF6sAAG&ipnId=937b8a9a-a31f-48b1-8db6-9b5a331d5c9c

2. Retrieve Document Information

Once you receive the notifications, take the values provided and call the Retrieve Document Request API for the appropriate case and vendor ID. This ensures you have the latest information at the time of processing the request to show your vendor what to upload.

Recommendations

When vendors access your platform, they should be shown requirements with as much detail as possible. We recommend displaying the real-time docGenericDescription and docType. If docUnderwriterNotes is present in the GET response, you should also display this parameter.

📘

Keep the following key points in mind:

  • Receiving a successful GET response signals that you are ready to upload documents using the Document Upload request (as long as the docLimit has not been reached).
  • You can only upload documents that are listed in the GET response details.

Step 3: Upload Files to BlueSnap

Next, provide your customer with the ability to upload files to BlueSnap. Call the Create Document Upload API as detailed below to provide a document upload experience:

  1. The user can upload a file and convert it to Base64 encrypted string. This encrypted string will be the value of the content parameter.
  2. Define the title parameter using the filename of the file the customer uploads.
  3. You can parse the fileType from what they provide.
  4. If desired, you can allow your vendor to provide a description.
  5. Submit POST requests (one per file), with the B64 string.
  6. Display a success message to your vendor after all operations are complete.
  7. Optional: Send a subsequent GET to ensure the applicable ‘status’ variables have updated from “Requested” to “Received”. If the docsRecieved value is lower than docLimit, you can still upload more documents for a docType that has a status of “Received”.