Skip to main content
POST
/
v1
/
businesses
/
{businessId}
/
documents
/
{documentId}
/
complete
Complete document upload
curl --request POST \
  --url https://sandbox.layerfi.com/v1/businesses/{businessId}/documents/{documentId}/complete \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "upload_id": "<string>",
  "parts": [
    {
      "part_number": 123,
      "etag": "<string>"
    }
  ]
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "file_name": "<string>",
  "file_type": "<string>",
  "presigned_url": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

Content-Type
string

Content-Type must be set to application/json.

Path Parameters

businessId
string<uuid>
required

The UUID of the business.

documentId
string<uuid>
required

The UUID of the document returned from the create endpoint.

Body

application/json

Parameters for completing a multipart upload.

upload_id
string
required

The upload ID returned from the create document endpoint.

parts
object[]
required

List of parts that were uploaded, with their part numbers and ETags.

Response

Upload completed successfully.

A document stored in S3.

id
string<uuid>
required

The unique identifier of the document.

file_name
string
required

The name of the uploaded file.

file_type
string
required

The MIME type of the file.

document_type
enum<string>
required

The type of document.

Available options:
RECEIPT,
UNSTRUCTURED_BOOKKEEPING_CONTEXT,
OTHER
presigned_url
string | null

A presigned URL for downloading the document, if available.