Upload Evidence Files
Evidence files — receipts, shipping documentation, screenshots — are uploaded through the Files API and then referenced
from a counter by their file_id. Files are uploaded directly to storage with a short-lived presigned URL and are ready
to attach to a counter as soon as the upload completes.
The upload flow
1. Request an upload slot
POST /api/v1/files/create reserves a file and returns a presigned upload target. purpose is dispute_evidence.
The upload_url expires 10 minutes after creation. For dispute_evidence, content_type must be one of
application/pdf, image/png, image/jpeg, or image/tiff, and size_bytes must be at most 5 MiB (5,242,880
bytes). A request outside these limits is rejected before an upload slot is issued.
2. Upload the file to storage
POST the file to upload_url as multipart/form-data, including every key from upload_fields before the file part.
3. Read it back (optional) and reference it
The file is ready to attach as soon as the upload completes. GET /api/v1/files/{file_id} returns its metadata and a
short-lived (5-minute) presigned download_url if you need to read it back.
Reference the file_id from a counter’s evidence_items (see
Respond with Evidence).
Rules to know
Files must belong to you. Every file_id you attach to a counter must have been created by your own sales channel.
A file_id owned by another channel is rejected (422).
- Expiry. Freshly uploaded files have a short orphan lifetime and age out if never used. Submitting a counter is what extends a referenced file’s retention to the post-resolution window — so attach-and-submit, don’t upload-and-forget.