Create and announce a shipment synchronously
This endpoint announces a shipment synchronously under your API credentials.
International shipments
If you want to create a shipment to be sent to a destination country outside the EU, it’s mandatory to include additional information related to the shipment contents. This allows Sendcloud to automatically generate the required customs documentation based on the international shipping option selected. After the shipping label and associated documents are generated, you can retrieve and download them via the Retrieve a parcel document endpoint. Note that when passing along prices, mixed currencies are not accepted. Therefore, ensure that all price fields use the same currency.Authorizations
Basic Authentication using API key and secrets is currently the main authentication mechanism.
Headers
If you are an official Sendcloud Tech Partner, send your unique Sendcloud Partner UUID as a request header for the system to recognize you.
The header is not required but if it is set, the system will check it. An unknown or invalid UUID will cause a 400 error.
Body
Synchronous Announcement Shipment request object model
The ship with object can be used to define how you would like to send your shipment.
You can use a shipping_option_code. This is a unique identifier that displays what carrier and what set of shipping functionalities you want to use.
{
"type": "shipping_option_code",
"properties": {
"shipping_option_code": "postnl:standard/insured=3000",
"contract_id": 517
}
}Sendcloud Address object
The sender address for the shipment. You can either provide a sender_address_id to reference a pre-configured sender address (with optional address field overrides), or provide all address fields directly.
- Sender Address ID
- Address Object
Represents each package of the shipment. Note that you can send a maximum of 15 parcels per shipment to this endpoint.
To announce more than 15 parcels in the same shipment, you can use the Create and announce a shipment asynchronously endpoint.
Note: each carrier can have a lower than the default number of parcels limit per shipment.
1 - 15 elementsThe id of the brand. Brands can be added through the Sendcloud platform and be retrieved (alongside their id) from the Retrieve a list of brands endpoint.
42
Order number generated manually or by shop system
Price, consisting of a value and currency.
A reference that will be stored on the Shipment and returned in your responses. This is not sent to the carrier.
"shipment-1234"
An optional reference can be provided by the API user; if included, it must be unique across shipments of the user. Using the same reference more than once will result in a 409 HTTP status code and the associated object being returned.
"unique-value-1234"
A list of additional address validations to apply. At present, the only supported validation service is Here, and it is used exclusively for transactional contracts. To enable this feature, contract_id must be explicitly set and must reference a transactional contract.
When using the "Here" validation method, Sendcloud will attempt to verify and correct the provided address based on the best available match from the selected provider. For example, if you submit "city": "Amstredan", the system will automatically correct it to "city": "Amsterdam".
If no suitable match is found, the request will return an error.
Please note that only address components recognised by the selected provider will be kept. Any additional details included in address fields (e.g. "address_line_2": "Ring the blue doorbell") will be removed if they do not match the provider records.
For adding delivery notes or extra instructions, use the parcels.label_notes field instead.
here ["here"]Optional carrier-specific shipment-level fields.
The accepted shape depends on the carrier resolved from ship_with.
- Default
- DHL Express
Optional customs information that should be provided for international shipments. This information is used for generating customs documents.
{
"invoice_number": "INV-123",
"export_reason": "commercial_goods",
"export_type": "private",
"invoice_date": "2023-08-24",
"discount_granted": { "value": "14.99", "currency": "EUR" },
"freight_costs": null,
"insurance_costs": { "value": "3.60", "currency": "EUR" },
"other_costs": { "value": "1.2", "currency": "EUR" },
"goods_description": "Electronic components and accessories",
"general_notes": "Compliance: Goods comply with international safety standards (CE certified).",
"additional_declaration_statements": [
"With reference to the above shipment, I understate that the content is not made of leather parts of animal species protected by the Washington Convention.",
"I solemnly declare that the contents of this document represent a true and accurate account of the events as they occurred. I acknowledge my responsibility for the information presented herein and understand that any misrepresentation or falsification may result in legal consequences or other penalties as applicable."
],
"importer_of_record": {
"name": "John Doe",
"company_name": "ImporterCo",
"address_line_1": "Maple Avenue",
"house_number": "123",
"postal_code": "90210",
"city": "Springfield",
"country_code": "US",
"state_province_code": "US-MA",
"telephone": "+15551234567",
"email": "info@importer-of-record-example.com"
},
"tax_numbers": {
"sender": [
{
"name": "VAT",
"country_code": "NL",
"value": "NL123456789B01"
},
{
"name": "EORI",
"country_code": "NL",
"value": "NL123456789"
}
],
"receiver": [
{
"name": "EIN",
"country_code": "US",
"value": "123456789"
}
],
"importer_of_record": [
{
"name": "EIN",
"country_code": "US",
"value": "987654321"
}
]
}
}Node for service point information. Use the Retrieve a list of service points endpoint to find service points, or pass in the carrier's id for the service point.
If both the id and carrier_service_point_id are provided, the carrier_service_point_id will be prioritised.
- Sendcloud ID
- Carrier Service Point ID
Describes the format and resolution of the label.
Note: If you request a label in ZPL format and the carrier supports native ZPL, then it won't be possible to download the label in any other format later.
Defined delivery dates. The handover_at date indicates when the item will be handed over to the carrier by the merchant in ISO 8601. If this date is not passed the carrier default will be used. For most carriers this is the following working day.
Response
Shipment response
Create a shipment
Sync shipment response object model