Add Loan Document

This request uploads a loan document.

This request is a bit different from our others listed here in our documentation:

  • This request requires two steps. (Pretty exciting, right?) The first step is acquiring a URL to send the upload file to. Then, the second step is actually uploading the file to the account through the URL.
  • Most of our requests on this site can be tried in-page; however, this one doesn't quite work that way. We'll provide the information for trying this in your own REST client, though.

For an example of how loan documents work within the UI, take a look at our Loan Documents article.

Step 1 - Generate Upload URL

The first step to adding a loan document is generating a URL. Here, send a POST request to the following URL:{ID})/document/upload

This step requires a JSON payload, and the payload should be formatted like the following example:

  "sectionId": 1, // This is the ID of the "section"——or category——that the document is filed under. You can create your own sections.
  "fileName": "file.jpg",
  "customFileName": "Loan Document"
Authorization:<Bearer token>
Autopal-Instance-Id:<Tenant ID>

A successful request will result in a response like the following:

  "d": {
    "id": "89",
    "fileName": "file.jpg",
    "uploadUrl": "",
    "customFileName": "Loan Document",
    "mime": "image/jpeg"

This response includes a uploadUrl field. This field holds the URL used in the next step.

Step 2 - Upload Document


This step does not require authentication. Do not use any headers.

To upload the document, send a PUT request to the uploadUrl returned by the request in the step above. Here are examples of the payload in both cURL and Python:


--upload-file "C:\Users\filepath\file.jpg" 

import requests

url = ""

file = open(r'C:\Users\filepath\file.jpg', 'rb')

response = requests.put(url, data=file)

print('Status:', request.status_code)

If using Postman, it's possible to upload files easily by selecting the 'Binary' body type and using the 'Upload File' button.