Skip to content

Request a shipment document upload

Request

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.

Security
bearerAuth or basicAuth
Bodyapplication/jsonrequired

Request body for obtaining a signed URL for file upload.

filenamestringrequired

Original filename for the file to be uploaded.

Example:"proof_of_delivery.pdf"
filetypestringrequired

MIME type of the file.

Example:"application/pdf"
curl -i -X POST \
  https://docs.resolvepay.com/_mock/merchant-api/openapi/shipments/documents \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "filename": "proof_of_delivery.pdf",
    "filetype": "application/pdf"
  }'

Responses

Pending shipment document upload request.

Bodyapplication/json
idstringrequired
file_idstringrequired

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

urlstring, (uri)required

Stable storage URL for the staged document.

Example:"https://bucket.s3.amazonaws.com/1234567890-proof_of_delivery.pdf"
upload_urlstring, (uri)required

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

Example:"https://bucket.s3.amazonaws.com/1234567890-proof_of_delivery.pdf?X-Amz-Algorithm=AWS4-HMAC-SHA256&..."
upload_expires_atstring, (date-time)required
object_keystringrequired
transfer_methodstringrequired
Value:"presigned_upload"
upload_headersobjectrequired
validation_profilestringrequired
Value:"merchant_invoice_shipment_document_default"
Response
{ "id": "string", "file_id": "string", "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&...", "upload_expires_at": "2019-08-24T14:15:22Z", "object_key": "string", "transfer_method": "presigned_upload", "upload_headers": { "property1": "string", "property2": "string" }, "validation_profile": "merchant_invoice_shipment_document_default" }