Create a consignment, use shipping rules to allocate it, and generate Base64-encoded labels and customs documents for it.
Shipping rules enable you to search for an optimal subscribed carrier service by using acceptable and unacceptable collection and delivery days and date and time slots, carrier services, delivery location, and other filtering options.
Prerequisites: Warehouses, carriers, and carrier services must be configured for your Metapack shipper account. Refer to API setup data.
Note: If a suitable subscribed carrier service is not found for the consignment, it will still be created but will remain Unallocated
.
Tip: To generate the labels or documents from the strings included in a successful response, you must first decode the strings by using a Base64 encoder/decoder and then send them to a network printer.
required | object (ConsignmentRequest) One or more items going from the same origin to the same destination being despatched on the same date using the same carrier service. |
required | object (ShippingRules) For each consignment, you have the option to define specific allocation parameters for that consignment, or you can reuse a predefined allocation rule that you created previously. |
required | object (PaperworkRequest) |
Consignment created and allocated, including paperwork strings
Bad Request
Unauthorized
Forbidden
Internal Server Error
{- "consignment": {
- "orders": [
- {
- "orderRef": "string",
- "orderDate": "2019-08-24T14:15:22Z",
- "value": {
- "amount": 0.1,
- "currencyCode": "string"
}, - "shippingCharge": {
- "amount": 0.1,
- "currencyCode": "string"
}, - "insuranceCharge": {
- "amount": 0.1,
- "currencyCode": "string"
}, - "otherCharge": {
- "amount": 0.1,
- "currencyCode": "string"
}
}
], - "references": {
- "externalitemcode": "#123",
- "externalordercode": "ABC123",
- "specialProvision": "A123",
- "senderUKIMSNumber": "123456789",
- "recipientUKIMSNumber": "123456789"
}, - "measurementUnits": {
- "weight": "kg",
- "measurement": "cm",
- "volume": "ml"
}, - "shipmentRef": "string",
- "parcels": [
- {
- "shipperRef": "ref-123456",
- "packagingType": "string",
- "weight": {
- "value": 0.1
}, - "dimensions": {
- "height": 0.1,
- "width": 0.1,
- "depth": 0.1,
- "diameter": 0.1
}, - "value": {
- "amount": 0.1,
- "currencyCode": "string"
}, - "items": [
- {
- "itemRef": "string",
- "harmonisedCode": "string",
- "countryOfOrigin": "string",
- "fabricContent": "string",
- "description": "string",
- "itemType": "string",
- "quantity": 0,
- "value": {
- "amount": 0.1
}, - "weight": {
- "value": 0.1
}, - "dangerousGoods": {
- "unId": "string",
- "shippingName": "string",
- "productClass": "1.2",
- "packagingGroup": "string",
- "measurementUnit": "string",
- "packagingInstructions": "string",
- "quantity": 0.1,
- "packageType": "string",
- "amount": 0.1,
- "regulationAuthority": "string",
- "regulationLevelCode": "string",
- "transportationMeans": "string",
- "reportableQuantity": true,
- "radioActive": true,
- "subRiskClass": "string",
- "technicalName": "string",
- "additionalInfo": "string",
- "overPack": "string",
- "packagingInstructionSection": "string"
}, - "exportReferenceNumber": "string",
- "exportLicenseNumber": "string",
- "batteryChemCode": "string",
- "references": {
- "property1": "string",
- "property2": "string"
}, - "taxesPaid": true
}
]
}
], - "attributes": {
- "cashOnDelivery": {
- "value": {
- "amount": 0.1,
- "currencyCode": "string"
}, - "paymentMethod": "string"
}, - "contentType": "string",
- "notificationType": "sms",
- "flexibleDelivery": {
- "deliveryInstructions": "string",
- "what3words": "string"
}, - "incoterms": "string",
- "insurance": {
- "amount": 0.1,
- "currencyCode": "string"
}, - "podRequired": "any"
}, - "type": "delivery",
- "manifestGroupCode": "string",
- "tags": [
- "string"
], - "sender": {
- "building": "string",
- "floor": "string",
- "addressLine1": "string",
- "addressLine2": "string",
- "postCode": "string",
- "countryCode": "string",
- "companyName": "string",
- "city": "string",
- "stateProvince": "string",
- "timeZone": "string",
- "type": "Residential",
- "addressReference": "string",
- "code": "string",
- "contact": {
- "name": "string",
- "timeZone": "string",
- "language": "string",
- "email": "string",
- "phone": "string"
}, - "taxAndDuty": {
- "EORINumber": "string",
- "IOSSNumber": "string",
- "VATNumber": "string",
- "TAXIDNumber": "string"
}
}, - "recipient": {
- "building": "string",
- "floor": "string",
- "addressLine1": "string",
- "addressLine2": "string",
- "postCode": "string",
- "countryCode": "string",
- "companyName": "string",
- "city": "string",
- "stateProvince": "string",
- "timeZone": "string",
- "type": "Residential",
- "addressReference": "string",
- "code": "string",
- "contact": {
- "name": "string",
- "timeZone": "string",
- "language": "string",
- "email": "string",
- "phone": "string"
}, - "taxAndDuty": {
- "EORINumber": "string",
- "IOSSNumber": "string",
- "VATNumber": "string",
- "TAXIDNumber": "string"
}
}, - "supportingAgents": {
- "property1": {
- "building": "string",
- "floor": "string",
- "addressLine1": "string",
- "addressLine2": "string",
- "postCode": "string",
- "countryCode": "string",
- "companyName": "string",
- "city": "string",
- "stateProvince": "string",
- "timeZone": "string",
- "type": "Residential",
- "addressReference": "string",
- "code": "string",
- "contact": {
- "name": "string",
- "timeZone": "string",
- "language": "string",
- "email": "string",
- "phone": "string"
}, - "taxAndDuty": {
- "EORINumber": "string",
- "IOSSNumber": "string",
- "VATNumber": "string",
- "TAXIDNumber": "string"
}
}, - "property2": {
- "building": "string",
- "floor": "string",
- "addressLine1": "string",
- "addressLine2": "string",
- "postCode": "string",
- "countryCode": "string",
- "companyName": "string",
- "city": "string",
- "stateProvince": "string",
- "timeZone": "string",
- "type": "Residential",
- "addressReference": "string",
- "code": "string",
- "contact": {
- "name": "string",
- "timeZone": "string",
- "language": "string",
- "email": "string",
- "phone": "string"
}, - "taxAndDuty": {
- "EORINumber": "string",
- "IOSSNumber": "string",
- "VATNumber": "string",
- "TAXIDNumber": "string"
}
}
}, - "totalDiscountValue": {
- "amount": 0.1,
- "currencyCode": "string"
}, - "pickingRef": "string",
- "movementIndicator": "b2b",
- "windsorNotAtRiskIndicator": true,
- "isReturn": true,
- "committedDeliveryWindow": {
- "from": "2019-08-24T14:15:22Z",
- "to": "2019-08-24T14:15:22Z"
}
}, - "shippingRules": {
- "collectionSlots": {
- "acceptable": [
- {
- "from": "2019-08-24T14:15:22Z",
- "to": "2019-08-24T14:15:22Z"
}
], - "unacceptable": [
- {
- "from": "2019-08-24T14:15:22Z",
- "to": "2019-08-24T14:15:22Z"
}
]
}, - "deliverySlots": {
- "acceptable": [
- {
- "from": "2019-08-24T14:15:22Z",
- "to": "2019-08-24T14:15:22Z"
}
], - "unacceptable": [
- {
- "from": "2019-08-24T14:15:22Z",
- "to": "2019-08-24T14:15:22Z"
}
]
}, - "collectionDays": {
- "monday": true,
- "tuesday": true,
- "wednesday": true,
- "thursday": true,
- "friday": true,
- "saturday": true,
- "sunday": true
}, - "deliveryDays": {
- "monday": true,
- "tuesday": true,
- "wednesday": true,
- "thursday": true,
- "friday": true,
- "saturday": true,
- "sunday": true
}, - "carrierServices": [
- "string"
], - "code": "string"
}, - "paperwork": {
- "format": "string",
- "dimension": "string",
- "type": "string",
- "resolution": "string"
}
}
{- "consignment": {
- "consignmentCode": "DMC4BY1V4HVY",
- "measurementUnits": {
- "weight": "kg",
- "measurement": "cm",
- "volume": "ml"
}, - "orders": [
- {
- "orderRef": "string",
- "orderDate": "2019-08-24T14:15:22Z",
- "value": {
- "amount": 0.1,
- "currencyCode": "string"
}, - "shippingCharge": {
- "amount": 0.1,
- "currencyCode": "string"
}, - "insuranceCharge": {
- "amount": 0.1,
- "currencyCode": "string"
}, - "otherCharge": {
- "amount": 0.1,
- "currencyCode": "string"
}
}
], - "parcels": [
- {
- "parcelCode": "string",
- "parcelIndex": 0,
- "shipperRef": "cartonId-123456",
- "packagingType": "string",
- "weight": {
- "value": 0.1
}, - "dimensions": {
- "height": 0.1,
- "width": 0.1,
- "depth": 0.1,
- "diameter": 0.1
}, - "value": {
- "amount": 0.1,
- "currencyCode": "string"
}, - "items": [
- {
- "itemRef": "string",
- "harmonisedCode": "string",
- "countryOfOrigin": "string",
- "fabricContent": "string",
- "description": "string",
- "itemType": "string",
- "quantity": 0,
- "value": {
- "amount": 0.1
}, - "weight": {
- "value": 0.1
}, - "dangerousGoods": {
- "unId": "string",
- "shippingName": "string",
- "productClass": "1.2",
- "packagingGroup": "string",
- "measurementUnit": "string",
- "packagingInstructions": "string",
- "quantity": 0.1,
- "packageType": "string",
- "amount": 0.1,
- "regulationAuthority": "string",
- "regulationLevelCode": "string",
- "transportationMeans": "string",
- "reportableQuantity": true,
- "radioActive": true,
- "subRiskClass": "string",
- "technicalName": "string",
- "additionalInfo": "string",
- "overPack": "string",
- "packagingInstructionSection": "string"
}, - "exportReferenceNumber": "string",
- "exportLicenseNumber": "string",
- "batteryChemCode": "string",
- "references": {
- "property1": "string",
- "property2": "string"
}, - "taxesPaid": true
}
], - "deliveryLegs": [
- {
- "trackingIdentifier": "string",
- "trackingURL": "string"
}
], - "carrier": {
- "identifier": "string"
}
}
], - "status": "unallocated",
- "type": "delivery",
- "sender": {
- "building": "string",
- "floor": "string",
- "addressLine1": "string",
- "addressLine2": "string",
- "postCode": "string",
- "countryCode": "string",
- "companyName": "string",
- "city": "string",
- "stateProvince": "string",
- "timeZone": "string",
- "type": "Residential",
- "addressReference": "string",
- "code": "string",
- "contact": {
- "name": "string",
- "timeZone": "string",
- "language": "string",
- "email": "string",
- "phone": "string"
}, - "taxAndDuty": {
- "EORINumber": "string",
- "IOSSNumber": "string",
- "VATNumber": "string",
- "TAXIDNumber": "string"
}
}, - "recipient": {
- "building": "string",
- "floor": "string",
- "addressLine1": "string",
- "addressLine2": "string",
- "postCode": "string",
- "countryCode": "string",
- "companyName": "string",
- "city": "string",
- "stateProvince": "string",
- "timeZone": "string",
- "type": "Residential",
- "addressReference": "string",
- "code": "string",
- "contact": {
- "name": "string",
- "timeZone": "string",
- "language": "string",
- "email": "string",
- "phone": "string"
}, - "taxAndDuty": {
- "EORINumber": "string",
- "IOSSNumber": "string",
- "VATNumber": "string",
- "TAXIDNumber": "string"
}
}, - "supportingAgents": {
- "property1": {
- "building": "string",
- "floor": "string",
- "addressLine1": "string",
- "addressLine2": "string",
- "postCode": "string",
- "countryCode": "string",
- "companyName": "string",
- "city": "string",
- "stateProvince": "string",
- "timeZone": "string",
- "type": "Residential",
- "addressReference": "string",
- "code": "string",
- "contact": {
- "name": "string",
- "timeZone": "string",
- "language": "string",
- "email": "string",
- "phone": "string"
}, - "taxAndDuty": {
- "EORINumber": "string",
- "IOSSNumber": "string",
- "VATNumber": "string",
- "TAXIDNumber": "string"
}
}, - "property2": {
- "building": "string",
- "floor": "string",
- "addressLine1": "string",
- "addressLine2": "string",
- "postCode": "string",
- "countryCode": "string",
- "companyName": "string",
- "city": "string",
- "stateProvince": "string",
- "timeZone": "string",
- "type": "Residential",
- "addressReference": "string",
- "code": "string",
- "contact": {
- "name": "string",
- "timeZone": "string",
- "language": "string",
- "email": "string",
- "phone": "string"
}, - "taxAndDuty": {
- "EORINumber": "string",
- "IOSSNumber": "string",
- "VATNumber": "string",
- "TAXIDNumber": "string"
}
}
}, - "deliveryInformation": {
- "cutOffDate": "2019-08-24T14:15:22Z",
- "collectionWindow": {
- "from": "2019-08-24T14:15:22Z",
- "to": "2019-08-24T14:15:22Z"
}, - "deliveryWindow": {
- "from": "2019-08-24T14:15:22Z",
- "to": "2019-08-24T14:15:22Z"
}, - "service": {
- "carrierService": {
- "code": "string",
- "name": "string",
- "carrier": {
- "name": "string",
- "code": "string"
}
}
}, - "shippingCosts": {
- "property1": {
- "amount": 0.1,
- "currencyCode": "string"
}, - "property2": {
- "amount": 0.1,
- "currencyCode": "string"
}
}, - "legs": [
- {
- "trackingIdentifier": "string",
- "trackingURL": "string",
- "trackingLinks": {
- "carrier": "string"
}
}
]
}, - "shipmentRef": "string",
- "attributes": {
- "cashOnDelivery": {
- "value": {
- "amount": 0.1,
- "currencyCode": "string"
}, - "paymentMethod": "string"
}, - "contentType": "string",
- "notificationType": "sms",
- "flexibleDelivery": {
- "deliveryInstructions": "string",
- "what3words": "string"
}, - "incoterms": "string",
- "insurance": {
- "amount": 0.1,
- "currencyCode": "string"
}, - "podRequired": "any"
}, - "manifestGroupCode": "string",
- "tags": [
- "string"
], - "allocatedDateTime": "2019-08-24T14:15:22Z",
- "service": {
- "carrierService": {
- "code": "string",
- "name": "string",
- "carrier": {
- "name": "string",
- "code": "string"
}
}
}, - "carrierConsignmentCode": "string",
- "pickingRef": "string",
- "totalDiscountValue": {
- "amount": 0.1,
- "currencyCode": "string"
}, - "references": {
- "externalitemcode": "#123",
- "externalordercode": "ABC123",
- "specialProvision": "A123",
- "senderUKIMSNumber": "123456789",
- "recipientUKIMSNumber": "123456789"
}, - "movementIndicator": "b2b",
- "windsorNotAtRiskIndicator": true,
- "isReturn": true,
- "committedDeliveryWindow": {
- "from": "2019-08-24T14:15:22Z",
- "to": "2019-08-24T14:15:22Z"
}
}, - "paperwork": {
- "labels": "string",
- "customs": "string"
}, - "links": [
- {
- "operation": "GET",
- "rel": "string",
- "href": "string"
}
]
}