This endpoint allows uploading or updating multiple documents on an existing shipment in a single request.
How Bulk Document Upload Works: Each document in the request is validated and processed individually. If a document with the same document ID already exists in the shipment, its content will be updated. If the document does not exist, it will be created. Documents are first uploaded and stored in Carriyo, and then synced to the carrier system. You can upload documents at any stage of the shipment lifecycle - before or after the shipment is booked. However, the documents will only be uploaded to the carrier after the shipment is booked.
Prerequisites:
document_id or document_name.Important Behavior:
Documents uploaded or updated successfully. Returns the updated shipment object.
Bad Request - Document settings not found or validation failed.
Shipment not found.
[- {
- "document_id": "DOC123",
- "content_base64": "JVBERi0xLjQKJeLjz9MKMSAwIG9iago..."
}, - {
- "document_name": "Commercial Invoice",
- "content_base64": "JVBERi0xLjQKJeLjz9MKMSAwIG9iago..."
}
]{- "shipment_id": "XYZABC123",
- "entity_type": "FORWARD",
- "merchant": "MY_BRAND",
- "references": {
- "partner_order_reference": "string",
- "partner_shipment_reference": "string",
- "alternate_reference": "string",
- "other_references": [
- "string"
]
}, - "carrier_account": {
- "carrier": "DHL",
- "carrier_account_name": "My DHL Account",
- "carrier_id": "act_1261YQIU2eTuokipwqbNBV"
}, - "payment": {
- "payment_mode": "PRE_PAID",
- "pending_amount": 0,
- "total_amount": 0,
- "currency": "string"
}, - "insurance": {
- "amount": 0,
- "currency": "string"
}, - "collection": {
- "scheduled_date": "2022-01-01",
- "scheduled_from": "2022-01-01T10:00:000Z",
- "scheduled_to": "2022-01-01T12:00:000Z"
}, - "delivery": {
- "delivery_type": "string",
- "scheduled_date": "2022-01-01",
- "scheduled_from": "2022-01-01T10:00:000Z",
- "scheduled_to": "2022-01-01T12:00:000Z"
}, - "pickup": {
- "partner_location_id": "string",
- "contact_name": "Jo Bloggs",
- "contact_phone": 16175551212,
- "alternate_phone": 16175551210,
- "contact_email": "jo.bloggs@gmail.com",
- "address1": "1 Financial Centre Road",
- "address2": "Downtown Views, Apartment 101",
- "area": "DOWNTOWN-DUBAI",
- "input_area": "Downtown Dubai",
- "area_coords": [
- 0
], - "city": "DUBAI",
- "input_city": "Dubai",
- "city_coords": [
- 0
], - "state": "DUBAI",
- "input_state": "Dubai",
- "postcode": "E1 6AN",
- "country": "AE",
- "coords": [
- 41.40338
], - "type": "residential",
- "notes": "Leave the parcel next to the bin",
- "personal_id": {
- "id": "U123457896",
- "type": "Passport"
}, - "po_box": "string",
- "collection_point_id": "string",
- "custom_fields": {
- "property1": [
- "string"
], - "property2": [
- "string"
]
}, - "address_codes": [
- {
- "type": "WHAT_3_WORDS",
- "value": "string"
}
], - "registration_numbers": [
- {
- "type_code": "VAT",
- "value": "string",
- "issuerCountryCode": "string"
}
]
}, - "dropoff": {
- "partner_location_id": "string",
- "contact_name": "Jo Bloggs",
- "contact_phone": 16175551212,
- "alternate_phone": 16175551210,
- "contact_email": "jo.bloggs@gmail.com",
- "address1": "1 Financial Centre Road",
- "address2": "Downtown Views, Apartment 101",
- "area": "DOWNTOWN-DUBAI",
- "input_area": "Downtown Dubai",
- "area_coords": [
- 0
], - "city": "DUBAI",
- "input_city": "Dubai",
- "city_coords": [
- 0
], - "state": "DUBAI",
- "input_state": "Dubai",
- "postcode": "E1 6AN",
- "country": "AE",
- "coords": [
- 41.40338
], - "type": "residential",
- "notes": "Leave the parcel next to the bin",
- "personal_id": {
- "id": "U123457896",
- "type": "Passport"
}, - "po_box": "string",
- "collection_point_id": "string",
- "custom_fields": {
- "property1": [
- "string"
], - "property2": [
- "string"
]
}, - "address_codes": [
- {
- "type": "WHAT_3_WORDS",
- "value": "string"
}
], - "registration_numbers": [
- {
- "type_code": "VAT",
- "value": "string",
- "issuerCountryCode": "string"
}
]
}, - "items": [
- {
- "sku": "string",
- "product_item_code": "string",
- "description": "string",
- "barcode": "string",
- "image_link": "string",
- "quantity": 1,
- "price": {
- "amount": 0,
- "currency": "string"
}, - "cost": {
- "amount": 0,
- "currency": "string"
}, - "weight": {
- "value": 0,
- "unit": "kg"
}, - "origin_country": "string",
- "hs_code": "string",
- "dangerous_goods": true,
- "notes": "string"
}
], - "freight": {
- "packages": [
- {
- "package_reference": "string",
- "type": "pallet",
- "weight": {
- "value": 0,
- "unit": "kg"
}, - "dimension": {
- "width": 0,
- "height": 0,
- "depth": 0,
- "unit": "cm"
}, - "parent": "string"
}
]
}, - "customs": {
- "declared_value": {
- "amount": 0,
- "currency": "string"
}, - "incoterms": "CFR",
- "instructions": "string",
- "declaration_statement": "string",
- "seller": {
- "partner_location_id": "string",
- "contact_name": "Jo Bloggs",
- "contact_phone": 16175551212,
- "alternate_phone": 16175551210,
- "contact_email": "jo.bloggs@gmail.com",
- "address1": "1 Financial Centre Road",
- "address2": "Downtown Views, Apartment 101",
- "area": "DOWNTOWN-DUBAI",
- "input_area": "Downtown Dubai",
- "area_coords": [
- 0
], - "city": "DUBAI",
- "input_city": "Dubai",
- "city_coords": [
- 0
], - "state": "DUBAI",
- "input_state": "Dubai",
- "postcode": "E1 6AN",
- "country": "AE",
- "coords": [
- 41.40338
], - "type": "residential",
- "notes": "Leave the parcel next to the bin",
- "personal_id": {
- "id": "U123457896",
- "type": "Passport"
}, - "po_box": "string",
- "collection_point_id": "string",
- "custom_fields": {
- "property1": [
- "string"
], - "property2": [
- "string"
]
}, - "address_codes": [
- {
- "type": "WHAT_3_WORDS",
- "value": "string"
}
], - "registration_numbers": [
- {
- "type_code": "VAT",
- "value": "string",
- "issuerCountryCode": "string"
}
]
}, - "buyer": {
- "partner_location_id": "string",
- "contact_name": "Jo Bloggs",
- "contact_phone": 16175551212,
- "alternate_phone": 16175551210,
- "contact_email": "jo.bloggs@gmail.com",
- "address1": "1 Financial Centre Road",
- "address2": "Downtown Views, Apartment 101",
- "area": "DOWNTOWN-DUBAI",
- "input_area": "Downtown Dubai",
- "area_coords": [
- 0
], - "city": "DUBAI",
- "input_city": "Dubai",
- "city_coords": [
- 0
], - "state": "DUBAI",
- "input_state": "Dubai",
- "postcode": "E1 6AN",
- "country": "AE",
- "coords": [
- 41.40338
], - "type": "residential",
- "notes": "Leave the parcel next to the bin",
- "personal_id": {
- "id": "U123457896",
- "type": "Passport"
}, - "po_box": "string",
- "collection_point_id": "string",
- "custom_fields": {
- "property1": [
- "string"
], - "property2": [
- "string"
]
}, - "address_codes": [
- {
- "type": "WHAT_3_WORDS",
- "value": "string"
}
], - "registration_numbers": [
- {
- "type_code": "VAT",
- "value": "string",
- "issuerCountryCode": "string"
}
]
}, - "importer": {
- "partner_location_id": "string",
- "contact_name": "Jo Bloggs",
- "contact_phone": 16175551212,
- "alternate_phone": 16175551210,
- "contact_email": "jo.bloggs@gmail.com",
- "address1": "1 Financial Centre Road",
- "address2": "Downtown Views, Apartment 101",
- "area": "DOWNTOWN-DUBAI",
- "input_area": "Downtown Dubai",
- "area_coords": [
- 0
], - "city": "DUBAI",
- "input_city": "Dubai",
- "city_coords": [
- 0
], - "state": "DUBAI",
- "input_state": "Dubai",
- "postcode": "E1 6AN",
- "country": "AE",
- "coords": [
- 41.40338
], - "type": "residential",
- "notes": "Leave the parcel next to the bin",
- "personal_id": {
- "id": "U123457896",
- "type": "Passport"
}, - "po_box": "string",
- "collection_point_id": "string",
- "custom_fields": {
- "property1": [
- "string"
], - "property2": [
- "string"
]
}, - "address_codes": [
- {
- "type": "WHAT_3_WORDS",
- "value": "string"
}
], - "registration_numbers": [
- {
- "type_code": "VAT",
- "value": "string",
- "issuerCountryCode": "string"
}
]
}, - "exporter": {
- "partner_location_id": "string",
- "contact_name": "Jo Bloggs",
- "contact_phone": 16175551212,
- "alternate_phone": 16175551210,
- "contact_email": "jo.bloggs@gmail.com",
- "address1": "1 Financial Centre Road",
- "address2": "Downtown Views, Apartment 101",
- "area": "DOWNTOWN-DUBAI",
- "input_area": "Downtown Dubai",
- "area_coords": [
- 0
], - "city": "DUBAI",
- "input_city": "Dubai",
- "city_coords": [
- 0
], - "state": "DUBAI",
- "input_state": "Dubai",
- "postcode": "E1 6AN",
- "country": "AE",
- "coords": [
- 41.40338
], - "type": "residential",
- "notes": "Leave the parcel next to the bin",
- "personal_id": {
- "id": "U123457896",
- "type": "Passport"
}, - "po_box": "string",
- "collection_point_id": "string",
- "custom_fields": {
- "property1": [
- "string"
], - "property2": [
- "string"
]
}, - "address_codes": [
- {
- "type": "WHAT_3_WORDS",
- "value": "string"
}
], - "registration_numbers": [
- {
- "type_code": "VAT",
- "value": "string",
- "issuerCountryCode": "string"
}
]
}
}, - "charges": [
- {
- "type": "shipping",
- "amount": {
- "value": 0,
- "currency": "string"
}
}
], - "parcels": [
- {
- "parcel_id": "string",
- "partner_parcel_reference": "string",
- "description": "string",
- "weight": {
- "value": 0,
- "unit": "kg"
}, - "dimension": {
- "width": 0,
- "height": 0,
- "depth": 0,
- "unit": "cm"
}, - "parcel_items": [
- {
- "sku": "string",
- "quantity": 0
}
]
}
], - "post_shipping_info": {
- "status": "string",
- "reason_code": "string",
- "carrier_status": "string",
- "carrier_status_description": "string",
- "carrier_status_date": "2019-08-24T14:15:22Z",
- "carrier_status_location": "string",
- "tracking_no": "string",
- "parcel_tracking_numbers": [
- {
- "parcel_id": "string",
- "tracking_number": "string"
}
], - "default_label_url": "string",
- "carrier_pdf_label_url": "string",
- "carriyo_pdf_label_url": "string",
- "carriyo_zpl_label_url": "string",
- "carrier_tracking_url": "string",
- "carriyo_tracking_url": "string",
- "carriyo_feedback_url": "string",
- "carriyo_pinpoint_url": "string",
- "driver_name": "string",
- "driver_phone": "string",
- "recipient_name": "string",
- "proof_of_delivery": "string",
- "key_milestones": {
- "pending": "string",
- "error": "string",
- "booked": "string",
- "out_for_collection": "string",
- "ready_to_ship": "string",
- "cancelled": "string",
- "cancelled_by_carrier": "string",
- "failed_collection_attempt": "string",
- "shipped": "string",
- "in_transit": "string",
- "out_for_delivery": "string",
- "awaiting_customer_collection": "string",
- "delivered": "string",
- "delivery_confirmed": "string",
- "failed_delivery_attempt": "string",
- "ready_for_return": "string",
- "return_in_transit": "string",
- "returned": "string",
- "return_confirmed": "string",
- "suspended": "string",
- "missing": "string",
- "delayed": "string"
}, - "failed_delivery_attempts": 0,
- "estimated_delivery_date": "2019-08-24T14:15:22Z",
- "estimated_ship_date": "2019-08-24T14:15:22Z",
- "error_details": [
- {
- "level": "string",
- "code": "string",
- "field": "string",
- "message": "string",
- "source": "string",
- "trigger": "string",
- "type": "string"
}
], - "documents": [
- {
- "document_id": "string",
- "name": "string",
- "type": "commercial_invoice",
- "source": "carriyo",
- "format": "pdf",
- "url": "string",
- "carrier_upload_status": "pending",
- "carrier_upload_date": "2019-08-24T14:15:22Z",
- "message": "string"
}
]
}, - "custom_attributes": { },
- "order_date": "2022-01-01T09:00:00.000Z",
- "order_type": "HOME_DELIVERY",
- "creation_date": "2022-01-01T09:00:00.000Z",
- "update_date": "2022-01-01T09:00:00.000Z",
- "confirmation_date": "2022-01-01T09:00:00.000Z",
- "estimated_process_date": "2019-08-24T14:15:22Z",
- "promised_delivery_date": "2022-01-01T09:00:00.000Z",
- "original_promised_delivery_date": "2022-01-01T09:00:00.000Z",
- "estimated_shipping_cost": {
- "amount": 10,
- "currency": "USD",
- "breakdown": [
- {
- "amount": 10,
- "currency": "USD",
- "description": "Total VAT Charge"
}
]
}, - "language": "en",
- "return_request_id": "rma_123abcXYZ"
}