Courier Label Allocation
Allocate a courier service and generate shipping labels for B2B shipments. This endpoint proxies to the Delivered courier management system to select the optimal courier, generate tracking details, and return a printable label.
Direction Host → WMS
HTTP Method POST
Path /outbound/b2b/courier/allocate
Request Body
Section titled “Request Body”{ "deliveryAddress": { "address": { "name": "John Smith", "companyName": "Acme Retail", "houseNameNumber": "Unit 5", "streetName": "High Street", "line2": "Industrial Estate", "city": "Manchester", "state": "", "postcode": "M1 2AB", "countryCode": "GB", "emailAddress": "john@acmeretail.com", "phoneNumber": "+441234567890" }, "consigneeAddress": { "name": "Jane Doe", "companyName": "Acme Retail", "houseNameNumber": "Unit 5", "streetName": "High Street", "line2": "Industrial Estate", "city": "Manchester", "state": "", "postcode": "M1 2AB", "countryCode": "GB", "emailAddress": "jane@acmeretail.com", "phoneNumber": "+441234567891" } }, "returnAddress": { "name": "Returns Dept", "companyName": "Warehouse Co", "houseNameNumber": "Warehouse 01", "streetName": "Distribution Park", "line2": "", "city": "Warrington", "state": "", "postcode": "WA1 1AA", "countryCode": "GB", "emailAddress": "returns@warehouse.com", "phoneNumber": "+441234567892" }, "order": { "orderId": "ORD-2024-001234", "currencyCode": "GBP", "clientName": "Acme Retail", "citizenID": null, "replacement": false }, "shipment": { "shipmentId": "SHP-2024-001234", "height": 30, "length": 50, "width": 40, "weight": 5200, "currency": "GBP", "value": 149.99, "shippingCost": 12.50, "shippingTax": 2.50, "incoTerms": "DAP", "contentDescription": "Consumer electronics", "palletId": "PLT-001", "ssccBarcode": "00012345678901234567", "shipmentIndex": "1", "deliveryTypeIds": [1, 2], "products": [ { "productId": 12345, "productIdString": "PROD-ABC123", "quantity": 2, "unitValue": 49.99, "unitWeight": 1500, "description": "Wireless Headphones", "harmonisationCode": "8518300090", "hazardous": false, "countryOfOrigin": "CN" } ] }, "warehouse": { "id": 1, "address": { "name": "Warehouse Manager", "companyName": "Warehouse Co", "houseNameNumber": "Warehouse 01", "streetName": "Distribution Park", "line2": "", "city": "Warrington", "state": "", "postcode": "WA1 1AA", "countryCode": "GB", "emailAddress": "ops@warehouse.com", "phoneNumber": "+441234567893" } }, "requestDateTime": { "localDateTime": "2024-01-25T09:00:00" }, "fxRates": { "baseCurrency": "GBP", "fxRates": { "EUR": 1.15, "USD": 1.27 } }, "expectedDespatchDate": "2024-01-26"}Responses
Section titled “Responses”200: Courier allocated and label generated
{ "status": "SUCCESS", "courierService": { "courierName": "DPD", "courierId": 42, "serviceName": "Next Day", "serviceId": 101 }, "trackingDetails": { "trackingNumber": "DPD123456789", "trackingUrl": "https://track.dpd.co.uk/DPD123456789" }, "label": { "mediaType": "application/pdf", "base64Label": "JVBERi0xLjQK..." }, "failureMessages": []}400: Validation failed
{ "status": "FAILED", "courierService": null, "trackingDetails": null, "label": null, "failureMessages": [ { "courierId": 42, "serviceName": "Next Day", "errorMessage": "Invalid postcode format" } ]}