A shipment you can build on
This synthetic example uses the actual request structure for POST /assignment/single. Replace the recipient and package details with appropriate test data. Availability depends on your account configuration.
JSON · PacSort Online request
{
"serviceLevel": "economy",
"distributionChannel": "package",
"labelsSettings": {
"layout": "a4_portrait",
"mode": "separate",
"positioning": "single"
},
"item": {
"invoiceReference": "DEMO-DELIVERY-1001",
"weight": 250,
"height": 3,
"length": 20,
"width": 15,
"recipient": {
"firstName": "Alex",
"lastName": "Example",
"countryCode": "SE",
"postalCode": "11122",
"city": "Stockholm",
"addressLine": "Exempelgatan 1",
"email": "recipient@example.com"
}
}
}cURL · create an assignment
curl -X POST 'https://api.pacsortonline.com/assignment/single' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data @pacsort-online-shipment.jsonBefore you send
Save the downloaded file as pacsort-online-shipment.json. Weight is in grams; height, length and width are in centimetres. The sample values describe one physical package. Executing this POST creates an assignment.
Mapping data from an order system
The source below is an illustrative external record, not a PacSort Online request. It contains no customer export or customer-specific configuration.
JSON · illustrative source record
{
"deliveryId": "DEMO-DELIVERY-1001",
"invoice": {
"invoiceNumber": "DEMO-INVOICE-1001"
},
"deliveryMethod": {
"methodName": "Standard delivery"
},
"customer": {
"emailAddress": "recipient@example.com",
"deliveryAddress": {
"firstName": "Alex",
"lastName": "Example",
"countryCode": "SE",
"zipcode": "11122",
"city": "Stockholm",
"addressLine1": "Exempelgatan 1"
}
}
}| Source field | PacSort Online field / action |
|---|---|
deliveryId | Use as item.invoiceReference if it is your chosen business reference. Keep a separate mapping to the returned assignment id. |
customer.deliveryAddress | Map to item.recipient: zipcode → postalCode, addressLine1 → addressLine. Copy the name, city and country fields. |
customer.emailAddress | item.recipient.email |
deliveryMethod.methodName | Translate your business rule into supported serviceLevel and distributionChannel values. This endpoint uses optimised routing; it does not accept a carrier name in the create request. |
| Package measurements | Supply item.weight, height, length and width from your packing data. They are absent from this source example. |
invoiceNumber, deliveryId and the returned PacSort Online id are different identifiers. Decide which external reference your warehouse scans and store its mapping explicitly.