Skip to content

Upload a document

Request

Step 1 of 2. Creates the document record and returns a presigned upload URL; PUT the file content to that URL, then call POST /documents/{id}/confirm — the confirm step is what verifies the bytes landed and attaches the file to its requirement. A document that is never confirmed stays invisible to the bank.

Pass requirementID (a requirement id from GET /loans/{id}/documents) so the upload satisfies that requirement and goes to the bank for review. Every requirement of the loan, with or without a file, is in requirements of that response. Omit it only for a loan-level attachment that answers no requirement — those are not surfaced for review.

Security
ApiKeyAuth
Path
idstringrequired
Headers
Idempotency-Keystring, <= 255 characters

Optional opaque key (e.g. a UUID) to make this upload safely retryable. A replay with the same key returns the original response instead of creating a duplicate record.

Bodyapplication/jsonrequired
namestring, [ 1 .. 255 ] charactersrequired
typestring, non-emptyrequired

MIME type of the file. The upload is accepted when the type is one of application/pdf, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document, application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-powerpoint, application/vnd.openxmlformats-officedocument.presentationml.presentation, image/jpeg, image/jpg, image/png, image/gif, image/webp, image/svg+xml, video/mp4, video/webm, video/ogg, video/quicktime, video/x-msvideo, audio/mpeg, audio/mp3, audio/wav, audio/ogg, audio/webm, audio/aac, or when the file name ends with one of .pdf, .doc, .docx, .xls, .xlsx, .ppt, .pptx, .jpg, .jpeg, .png, .gif, .webp, .svg, .mp4, .webm, .ogg, .mov, .avi, .mp3, .wav, .aac.

sizeinteger, ( 0 .. 150000000 ]required

Size of the file in bytes. The maximum is 150000000 bytes (150 MB).

requirementIDstring
curl -i -X POST \
  'https://api.pioneerft.com/api/public/v1/loans/{id}/documents' \
  -H 'Authorization: Bearer <YOUR_API Key_HERE>' \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: string' \
  -d '{
    "name": "string",
    "type": "string",
    "size": 1,
    "requirementID": "string"
  }'

Responses

Document record created with presigned upload URL

Bodyapplication/json
dataobject
Response
{ "data": { "id": "string", "uploadUrl": "http://example.com", "expiresAt": "2019-08-24T14:15:22Z" } }