Uploads file
Uploads supporting documents to a specific shipment by its ID. This method is used for attaching invoices, product specifications, customs declarations, or other shipment-related documents required for processing and clearance. Files are stored and linked to the shipment, ensuring better traceability and compliance.
⚠️ Region restriction: This method is available only for European shipments (EU/EU and EU/UA directions). It is not available for shipments originating from Ukraine.
File naming: • If the "fileName" parameter is provided, the uploaded file will be stored with that name. • If "fileName" is not provided, the default file name will be set to "invoice".
Use cases:
"I want to upload a client invoice in PDF to shipment 980911" - send the base64-encoded content in "file", set
"fileName": "invoice.pdf"."I want to attach a product photo in JPEG" - encode the photo in base64, set
"fileName": "product-photo.jpeg".
Authorization JWT-token with a lifetime of 1 hour in header
Unique identifier of the shipment to which the files are attached.
This value represents the shipmentId of the European system.
Using a Ukrainian shipment number will result in a validation error.
Base64-encoded document file (PDF, JPEG, or other supported formats).
Optional file name. Defaults to "invoice" if not provided.
File upload result
Indicates whether the file upload was successful.
Unauthorized
The specified resource was not found
Validation error
Connection time-out
POST /v.1.0/shipments/attachments/uploads/{id} HTTP/1.1
Host: api-stage.novapost.com/
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 100
{
"file": "/9j/4AAQSkZJRgABAQEAYABgAAD... (base64 content truncated)",
"fileName": "product-photo.jpeg"
}{
"success": true
}Last updated