Shipments

Request a shipment document upload

Creates a pending proof-of-delivery document before creating a self-fulfilled shipment. Upload the file with every returned upload_headers entry, including Content-Type (the requested filetype), poll /shipments/documents/{file_id} until validation succeeds, then supply file_id to /shipments.

post/shipments/documents

Request

Request body

filenamestring required

Original filename for the file to be uploaded.

filetypestring required

MIME type of the file.

Example request

{
  "filename": "proof_of_delivery.pdf",
  "filetype": "application/pdf"
}

Response

Pending shipment document upload request.

idstring required
file_idstring required

Use when creating a self-fulfilled shipment after validation succeeds.

urlstring uri required

Stable storage URL for the staged document.

upload_urlstring uri required

Presigned S3 URL for uploading the file. Use this URL to PUT the file content.

upload_expires_atstring date-time required
object_keystring required
transfer_method'presigned_upload' required
upload_headersobject required
validation_profile'merchant_invoice_shipment_document_default' required

Example response

{
  "url": "https://bucket.s3.amazonaws.com/1234567890-proof_of_delivery.pdf",
  "upload_url": "https://bucket.s3.amazonaws.com/1234567890-proof_of_delivery.pdf?X-Amz-Algorithm=AWS4-HMAC-SHA256&..."
}

Changes

No recorded changes to this operation across all 1 revision of this API.