Skip to main content
POST
Upload a customs document
OAuth2 scopes required: write:parcel. See Scopes for OAuth apps.
Upload your own customs document, such as a certificate of origin, so it’s sent to the carrier together with the customs documents Sendcloud generates. The response contains the document id. To attach the document, add the id to customs_information.additional_documents when you create a shipment with any of the create shipment endpoints. You can attach up to 3 documents to a shipment.
This endpoint is in beta and only available to organizations with access to the additional customs documents beta. Other organizations get a 403 response. Details or behavior may change before the feature is generally available.
The request must be multipart/form-data with a file part and a document_type field. The file must be a PDF of at most 5 MB.
A document expires 30 days after upload. You can attach it to any number of shipments until then. After it expires, a create shipment request that includes the document fails with a 400 “not found or expired” error, and you need to upload the document again.
An organization can have at most 1000 uploaded documents that aren’t attached to a shipment yet. When you reach the limit, uploads fail with a 409 response until you attach documents or they expire.

Authorizations

Authorization
string
header
required

Basic Authentication using API key and secrets is currently the main authentication mechanism.

Body

multipart/form-data
file
file
required

The customs document. Must be a PDF of at most 5 MB.

document_type
enum<string>
required

The type of the customs document.

  • certificate_of_origin: A certificate of origin.
  • commercial_invoice: A commercial invoice.
  • customs_declaration: A customs declaration.
  • other: Any other document that customs needs.
Available options:
certificate_of_origin,
commercial_invoice,
customs_declaration,
other
Example:

"commercial_invoice"

Response

Created

data
Customs document · object
required

A customs document uploaded with the Upload a customs document endpoint.