Download OpenAPI specification:Download
The Shipping API is an easy-to-use REST-based API that enables you to manage all of your shipping needs without having to worry about the complexities of different carrier APIs and protocols.
For more information about the API, go to https://dev.metapack.com/.
Create and manage consignments. A shipment can be a single consignment or multiple consignments. You must create at least one consignment for a shipment before you can get shipping rates or create a label or a manifest for the shipment.
Retrieve all consignments that meet specific search criteria.
If any consignments have been allocated, the associated carrier and carrier service information is also returned. You can use this information to plan your deliveries and keep your customers updated.
Success
Bad Request
Unauthorized
Internal Server Error
curl -i -X GET \ -u <username>:<password> \ 'https://api.sbx.metapack.com/shipping/v1/consignments?orderReference=string&consignmentTrackingIdentifier=string&parcelTrackingIdentifier=string&parcelCode=string'
[- {
- "measurementUnits": {
- "weight": "kg",
- "measurement": "cm",
- "volume": "ml"
}, - "orders": [
- {
- "orderRef": "string",
- "orderDate": "2019-08-24T14:15:22Z",
- "value": {
- "amount": 0,
- "currencyCode": "string"
}, - "shippingCharge": {
- "amount": 0,
- "currencyCode": "string"
}, - "insuranceCharge": {
- "amount": 0,
- "currencyCode": "string"
}, - "otherCharge": {
- "amount": 0,
- "currencyCode": "string"
}
}
], - "parcels": [
- {
- "parcelCode": "string",
- "parcelIndex": 0,
- "shipperRef": "cartonId-123456",
- "packagingType": "string",
- "weight": {
- "value": 0
}, - "dimensions": {
- "height": 0,
- "width": 0,
- "depth": 0,
- "diameter": 0
}, - "value": {
- "amount": 0,
- "currencyCode": "string"
}, - "items": [
- {
- "itemRef": "string",
- "harmonisedCode": "string",
- "countryOfOrigin": "string",
- "fabricContent": "string",
- "description": "string",
- "itemType": "string",
- "quantity": 0,
- "value": {
- "amount": 0
}, - "weight": {
- "value": 0
}, - "dangerousGoods": {
- "unId": "string",
- "shippingName": "string",
- "productClass": "1.2",
- "packagingGroup": "string",
- "measurementUnit": "string",
- "packagingInstructions": "string",
- "quantity": 0,
- "packageType": "string",
- "amount": 0,
- "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"
}
], - "deliveryLegs": [
- {
- "trackingIdentifier": "string",
- "trackingURL": "string"
}
]
}
], - "status": "unallocated",
- "type": "delivery",
- "sender": {
- "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"
}
}, - "recipient": {
- "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"
}
}, - "supportingAgents": {
- "property1": {
- "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"
}
}, - "property2": {
- "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"
}
}
}, - "deliveryInformation": {
- "cutoffDateTime": "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,
- "currencyCode": "string"
}, - "property2": {
- "amount": 0,
- "currencyCode": "string"
}
}, - "legs": [
- {
- "trackingIdentifier": "string",
- "trackingURL": "string",
- "trackingLinks": {
- "carrier": "string"
}
}
]
}, - "consignmentCode": "DMC4BY1V4HVY",
- "shipmentRef": "string",
- "attributes": {
- "cashOnDelivery": {
- "value": {
- "amount": 0,
- "currencyCode": "string"
}, - "paymentMethod": "string"
}, - "contentType": "string",
- "notificationType": "sms",
- "flexibleDelivery": {
- "deliveryInstructions": "string",
- "what3words": "string"
}, - "incoterms": "string"
}, - "manifestGroupCode": "string",
- "tags": [
- "string"
], - "allocatedDateTime": "2019-08-24T14:15:22Z",
- "service": {
- "carrierService": {
- "code": "string",
- "name": "string",
- "carrier": {
- "name": "string",
- "code": "string"
}
}
}, - "carrierConsignmentCode": "string"
}
]
Create a consignment without allocating it.
Alternatively, you can create it and use shipping rules to allocate it to the optimal carrier service associated with your Metapack shipper account.
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: The sender
of a consignment is a warehouse (shipping location), so warehouses must be configured for your Metapack shipper account. If you want to use shipping rules for allocation, carriers and carrier services must be configured for your 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
.
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. |
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. |
Consignment created
Bad Request
Unauthorized
Forbidden
Internal Server Error
{- "consignment": {
- "orders": [
- {
- "orderRef": "string",
- "orderDate": "2019-08-24T14:15:22Z",
- "value": {
- "amount": 0,
- "currencyCode": "string"
}, - "shippingCharge": {
- "amount": 0,
- "currencyCode": "string"
}, - "insuranceCharge": {
- "amount": 0,
- "currencyCode": "string"
}, - "otherCharge": {
- "amount": 0,
- "currencyCode": "string"
}
}
], - "measurementUnits": {
- "weight": "kg",
- "measurement": "cm",
- "volume": "ml"
}, - "shipmentRef": "string",
- "parcels": [
- {
- "shipperRef": "ref-123456",
- "packagingType": "string",
- "weight": {
- "value": 0
}, - "dimensions": {
- "height": 0,
- "width": 0,
- "depth": 0,
- "diameter": 0
}, - "value": {
- "amount": 0,
- "currencyCode": "string"
}, - "items": [
- {
- "itemRef": "string",
- "harmonisedCode": "string",
- "countryOfOrigin": "string",
- "fabricContent": "string",
- "description": "string",
- "itemType": "string",
- "quantity": 0,
- "value": {
- "amount": 0
}, - "weight": {
- "value": 0
}, - "dangerousGoods": {
- "unId": "string",
- "shippingName": "string",
- "productClass": "1.2",
- "packagingGroup": "string",
- "measurementUnit": "string",
- "packagingInstructions": "string",
- "quantity": 0,
- "packageType": "string",
- "amount": 0,
- "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"
}
]
}
], - "attributes": {
- "cashOnDelivery": {
- "value": {
- "amount": 0,
- "currencyCode": "string"
}, - "paymentMethod": "string"
}, - "contentType": "string",
- "notificationType": "sms",
- "flexibleDelivery": {
- "deliveryInstructions": "string",
- "what3words": "string"
}, - "incoterms": "string"
}, - "type": "delivery",
- "manifestGroupCode": "string",
- "tags": [
- "string"
], - "sender": {
- "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"
}
}, - "recipient": {
- "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"
}
}, - "supportingAgents": {
- "property1": {
- "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"
}
}, - "property2": {
- "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"
}
}
}
}, - "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"
}
}
{- "consignment": {
- "measurementUnits": {
- "weight": "kg",
- "measurement": "cm",
- "volume": "ml"
}, - "orders": [
- {
- "orderRef": "string",
- "orderDate": "2019-08-24T14:15:22Z",
- "value": {
- "amount": 0,
- "currencyCode": "string"
}, - "shippingCharge": {
- "amount": 0,
- "currencyCode": "string"
}, - "insuranceCharge": {
- "amount": 0,
- "currencyCode": "string"
}, - "otherCharge": {
- "amount": 0,
- "currencyCode": "string"
}
}
], - "parcels": [
- {
- "parcelCode": "string",
- "parcelIndex": 0,
- "shipperRef": "cartonId-123456",
- "packagingType": "string",
- "weight": {
- "value": 0
}, - "dimensions": {
- "height": 0,
- "width": 0,
- "depth": 0,
- "diameter": 0
}, - "value": {
- "amount": 0,
- "currencyCode": "string"
}, - "items": [
- {
- "itemRef": "string",
- "harmonisedCode": "string",
- "countryOfOrigin": "string",
- "fabricContent": "string",
- "description": "string",
- "itemType": "string",
- "quantity": 0,
- "value": {
- "amount": 0
}, - "weight": {
- "value": 0
}, - "dangerousGoods": {
- "unId": "string",
- "shippingName": "string",
- "productClass": "1.2",
- "packagingGroup": "string",
- "measurementUnit": "string",
- "packagingInstructions": "string",
- "quantity": 0,
- "packageType": "string",
- "amount": 0,
- "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"
}
], - "deliveryLegs": [
- {
- "trackingIdentifier": "string",
- "trackingURL": "string"
}
]
}
], - "status": "unallocated",
- "type": "delivery",
- "sender": {
- "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"
}
}, - "recipient": {
- "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"
}
}, - "supportingAgents": {
- "property1": {
- "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"
}
}, - "property2": {
- "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"
}
}
}, - "deliveryInformation": {
- "cutoffDateTime": "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,
- "currencyCode": "string"
}, - "property2": {
- "amount": 0,
- "currencyCode": "string"
}
}, - "legs": [
- {
- "trackingIdentifier": "string",
- "trackingURL": "string",
- "trackingLinks": {
- "carrier": "string"
}
}
]
}, - "consignmentCode": "DMC4BY1V4HVY",
- "shipmentRef": "string",
- "attributes": {
- "cashOnDelivery": {
- "value": {
- "amount": 0,
- "currencyCode": "string"
}, - "paymentMethod": "string"
}, - "contentType": "string",
- "notificationType": "sms",
- "flexibleDelivery": {
- "deliveryInstructions": "string",
- "what3words": "string"
}, - "incoterms": "string"
}, - "manifestGroupCode": "string",
- "tags": [
- "string"
], - "allocatedDateTime": "2019-08-24T14:15:22Z",
- "service": {
- "carrierService": {
- "code": "string",
- "name": "string",
- "carrier": {
- "name": "string",
- "code": "string"
}
}
}, - "carrierConsignmentCode": "string"
}, - "links": [
- {
- "operation": "GET",
- "rel": "string",
- "href": "string"
}
]
}
Retrieve a consignment with a specific consignment code.
If the consignment has been allocated, the associated carrier and carrier service information is also returned. You can use this information to plan your deliveries and keep your customers updated.
Consignment details
Bad Request
Unauthorized
Not Found
Internal Server Error
curl -i -X GET \ -u <username>:<password> \ 'https://api.sbx.metapack.com/shipping/v1/consignments/{consignmentCode}'
{- "consignment": {
- "measurementUnits": {
- "weight": "kg",
- "measurement": "cm",
- "volume": "ml"
}, - "orders": [
- {
- "orderRef": "string",
- "orderDate": "2019-08-24T14:15:22Z",
- "value": {
- "amount": 0,
- "currencyCode": "string"
}, - "shippingCharge": {
- "amount": 0,
- "currencyCode": "string"
}, - "insuranceCharge": {
- "amount": 0,
- "currencyCode": "string"
}, - "otherCharge": {
- "amount": 0,
- "currencyCode": "string"
}
}
], - "parcels": [
- {
- "parcelCode": "string",
- "parcelIndex": 0,
- "shipperRef": "cartonId-123456",
- "packagingType": "string",
- "weight": {
- "value": 0
}, - "dimensions": {
- "height": 0,
- "width": 0,
- "depth": 0,
- "diameter": 0
}, - "value": {
- "amount": 0,
- "currencyCode": "string"
}, - "items": [
- {
- "itemRef": "string",
- "harmonisedCode": "string",
- "countryOfOrigin": "string",
- "fabricContent": "string",
- "description": "string",
- "itemType": "string",
- "quantity": 0,
- "value": {
- "amount": 0
}, - "weight": {
- "value": 0
}, - "dangerousGoods": {
- "unId": "string",
- "shippingName": "string",
- "productClass": "1.2",
- "packagingGroup": "string",
- "measurementUnit": "string",
- "packagingInstructions": "string",
- "quantity": 0,
- "packageType": "string",
- "amount": 0,
- "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"
}
], - "deliveryLegs": [
- {
- "trackingIdentifier": "string",
- "trackingURL": "string"
}
]
}
], - "status": "unallocated",
- "type": "delivery",
- "sender": {
- "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"
}
}, - "recipient": {
- "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"
}
}, - "supportingAgents": {
- "property1": {
- "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"
}
}, - "property2": {
- "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"
}
}
}, - "deliveryInformation": {
- "cutoffDateTime": "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,
- "currencyCode": "string"
}, - "property2": {
- "amount": 0,
- "currencyCode": "string"
}
}, - "legs": [
- {
- "trackingIdentifier": "string",
- "trackingURL": "string",
- "trackingLinks": {
- "carrier": "string"
}
}
]
}, - "consignmentCode": "DMC4BY1V4HVY",
- "shipmentRef": "string",
- "attributes": {
- "cashOnDelivery": {
- "value": {
- "amount": 0,
- "currencyCode": "string"
}, - "paymentMethod": "string"
}, - "contentType": "string",
- "notificationType": "sms",
- "flexibleDelivery": {
- "deliveryInstructions": "string",
- "what3words": "string"
}, - "incoterms": "string"
}, - "manifestGroupCode": "string",
- "tags": [
- "string"
], - "allocatedDateTime": "2019-08-24T14:15:22Z",
- "service": {
- "carrierService": {
- "code": "string",
- "name": "string",
- "carrier": {
- "name": "string",
- "code": "string"
}
}
}, - "carrierConsignmentCode": "string"
}, - "links": [
- {
- "operation": "GET",
- "rel": "string",
- "href": "string"
}
]
}
Update an Unallocated
consignment. For example, change the order details or shipping rules of a consignment.
Prerequisite: If a consignment is Allocated
, use Delete consignment allocation before using this operation.
Note: You must resubmit the mandatory information of the consignment in addition to any other consignment data that you have added or modified.
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. |
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. |
Consignment updated
Bad Request
Unauthorized
Forbidden
Not Found
Conflict - Consignment cannot be modified because it is not in the correct consignment lifecycle status
Internal Server Error
{- "consignment": {
- "orders": [
- {
- "orderRef": "string",
- "orderDate": "2019-08-24T14:15:22Z",
- "value": {
- "amount": 0,
- "currencyCode": "string"
}, - "shippingCharge": {
- "amount": 0,
- "currencyCode": "string"
}, - "insuranceCharge": {
- "amount": 0,
- "currencyCode": "string"
}, - "otherCharge": {
- "amount": 0,
- "currencyCode": "string"
}
}
], - "measurementUnits": {
- "weight": "kg",
- "measurement": "cm",
- "volume": "ml"
}, - "shipmentRef": "string",
- "parcels": [
- {
- "shipperRef": "ref-123456",
- "packagingType": "string",
- "weight": {
- "value": 0
}, - "dimensions": {
- "height": 0,
- "width": 0,
- "depth": 0,
- "diameter": 0
}, - "value": {
- "amount": 0,
- "currencyCode": "string"
}, - "items": [
- {
- "itemRef": "string",
- "harmonisedCode": "string",
- "countryOfOrigin": "string",
- "fabricContent": "string",
- "description": "string",
- "itemType": "string",
- "quantity": 0,
- "value": {
- "amount": 0
}, - "weight": {
- "value": 0
}, - "dangerousGoods": {
- "unId": "string",
- "shippingName": "string",
- "productClass": "1.2",
- "packagingGroup": "string",
- "measurementUnit": "string",
- "packagingInstructions": "string",
- "quantity": 0,
- "packageType": "string",
- "amount": 0,
- "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"
}
]
}
], - "attributes": {
- "cashOnDelivery": {
- "value": {
- "amount": 0,
- "currencyCode": "string"
}, - "paymentMethod": "string"
}, - "contentType": "string",
- "notificationType": "sms",
- "flexibleDelivery": {
- "deliveryInstructions": "string",
- "what3words": "string"
}, - "incoterms": "string"
}, - "type": "delivery",
- "manifestGroupCode": "string",
- "tags": [
- "string"
], - "sender": {
- "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"
}
}, - "recipient": {
- "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"
}
}, - "supportingAgents": {
- "property1": {
- "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"
}
}, - "property2": {
- "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"
}
}
}
}, - "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"
}
}
{- "consignment": {
- "measurementUnits": {
- "weight": "kg",
- "measurement": "cm",
- "volume": "ml"
}, - "orders": [
- {
- "orderRef": "string",
- "orderDate": "2019-08-24T14:15:22Z",
- "value": {
- "amount": 0,
- "currencyCode": "string"
}, - "shippingCharge": {
- "amount": 0,
- "currencyCode": "string"
}, - "insuranceCharge": {
- "amount": 0,
- "currencyCode": "string"
}, - "otherCharge": {
- "amount": 0,
- "currencyCode": "string"
}
}
], - "parcels": [
- {
- "parcelCode": "string",
- "parcelIndex": 0,
- "shipperRef": "cartonId-123456",
- "packagingType": "string",
- "weight": {
- "value": 0
}, - "dimensions": {
- "height": 0,
- "width": 0,
- "depth": 0,
- "diameter": 0
}, - "value": {
- "amount": 0,
- "currencyCode": "string"
}, - "items": [
- {
- "itemRef": "string",
- "harmonisedCode": "string",
- "countryOfOrigin": "string",
- "fabricContent": "string",
- "description": "string",
- "itemType": "string",
- "quantity": 0,
- "value": {
- "amount": 0
}, - "weight": {
- "value": 0
}, - "dangerousGoods": {
- "unId": "string",
- "shippingName": "string",
- "productClass": "1.2",
- "packagingGroup": "string",
- "measurementUnit": "string",
- "packagingInstructions": "string",
- "quantity": 0,
- "packageType": "string",
- "amount": 0,
- "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"
}
], - "deliveryLegs": [
- {
- "trackingIdentifier": "string",
- "trackingURL": "string"
}
]
}
], - "status": "unallocated",
- "type": "delivery",
- "sender": {
- "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"
}
}, - "recipient": {
- "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"
}
}, - "supportingAgents": {
- "property1": {
- "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"
}
}, - "property2": {
- "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"
}
}
}, - "deliveryInformation": {
- "cutoffDateTime": "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,
- "currencyCode": "string"
}, - "property2": {
- "amount": 0,
- "currencyCode": "string"
}
}, - "legs": [
- {
- "trackingIdentifier": "string",
- "trackingURL": "string",
- "trackingLinks": {
- "carrier": "string"
}
}
]
}, - "consignmentCode": "DMC4BY1V4HVY",
- "shipmentRef": "string",
- "attributes": {
- "cashOnDelivery": {
- "value": {
- "amount": 0,
- "currencyCode": "string"
}, - "paymentMethod": "string"
}, - "contentType": "string",
- "notificationType": "sms",
- "flexibleDelivery": {
- "deliveryInstructions": "string",
- "what3words": "string"
}, - "incoterms": "string"
}, - "manifestGroupCode": "string",
- "tags": [
- "string"
], - "allocatedDateTime": "2019-08-24T14:15:22Z",
- "service": {
- "carrierService": {
- "code": "string",
- "name": "string",
- "carrier": {
- "name": "string",
- "code": "string"
}
}
}, - "carrierConsignmentCode": "string"
}, - "links": [
- {
- "operation": "GET",
- "rel": "string",
- "href": "string"
}
]
}
If the consignment is Unallocated
, using this operation deletes it.
However, if the consignment is Allocated
, using this operation first deallocates it and then deletes it.
Note: You can also use this operation if the consignment lifecycle status is Printed
or Ready to manifest
. You cannot use this operation if the status of consignment is a Manifested
or a later status.
Consignment deleted
Bad Request
Unauthorized
Forbidden
Not Found
Internal Server Error
curl -i -X DELETE \ -u <username>:<password> \ 'https://api.sbx.metapack.com/shipping/v1/consignments/{consignmentCode}'
{- "errorCode": "string",
- "message": "string",
- "systemMessage": "string",
- "traceID": "string",
- "timestamp": "2019-08-24T14:15:22Z"
}
Update specific numeric and text properties of an Unallocated
consignment.
Prerequisite: If a consignment is Allocated
, use Delete consignment allocation before using this operation.
Note: Currently, manifestGroupCode
is the only property of a consignment that can be modified by this operation.
Consignment updated
Bad Request
Unauthorized
Forbidden
Not Found
Conflict - Consignment cannot be modified because it is not in the correct consignment lifecycle status
Internal Server Error
{- "property1": "string",
- "property2": "string"
}
{- "consignment": {
- "measurementUnits": {
- "weight": "kg",
- "measurement": "cm",
- "volume": "ml"
}, - "orders": [
- {
- "orderRef": "string",
- "orderDate": "2019-08-24T14:15:22Z",
- "value": {
- "amount": 0,
- "currencyCode": "string"
}, - "shippingCharge": {
- "amount": 0,
- "currencyCode": "string"
}, - "insuranceCharge": {
- "amount": 0,
- "currencyCode": "string"
}, - "otherCharge": {
- "amount": 0,
- "currencyCode": "string"
}
}
], - "parcels": [
- {
- "parcelCode": "string",
- "parcelIndex": 0,
- "shipperRef": "cartonId-123456",
- "packagingType": "string",
- "weight": {
- "value": 0
}, - "dimensions": {
- "height": 0,
- "width": 0,
- "depth": 0,
- "diameter": 0
}, - "value": {
- "amount": 0,
- "currencyCode": "string"
}, - "items": [
- {
- "itemRef": "string",
- "harmonisedCode": "string",
- "countryOfOrigin": "string",
- "fabricContent": "string",
- "description": "string",
- "itemType": "string",
- "quantity": 0,
- "value": {
- "amount": 0
}, - "weight": {
- "value": 0
}, - "dangerousGoods": {
- "unId": "string",
- "shippingName": "string",
- "productClass": "1.2",
- "packagingGroup": "string",
- "measurementUnit": "string",
- "packagingInstructions": "string",
- "quantity": 0,
- "packageType": "string",
- "amount": 0,
- "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"
}
], - "deliveryLegs": [
- {
- "trackingIdentifier": "string",
- "trackingURL": "string"
}
]
}
], - "status": "unallocated",
- "type": "delivery",
- "sender": {
- "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"
}
}, - "recipient": {
- "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"
}
}, - "supportingAgents": {
- "property1": {
- "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"
}
}, - "property2": {
- "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"
}
}
}, - "deliveryInformation": {
- "cutoffDateTime": "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,
- "currencyCode": "string"
}, - "property2": {
- "amount": 0,
- "currencyCode": "string"
}
}, - "legs": [
- {
- "trackingIdentifier": "string",
- "trackingURL": "string",
- "trackingLinks": {
- "carrier": "string"
}
}
]
}, - "consignmentCode": "DMC4BY1V4HVY",
- "shipmentRef": "string",
- "attributes": {
- "cashOnDelivery": {
- "value": {
- "amount": 0,
- "currencyCode": "string"
}, - "paymentMethod": "string"
}, - "contentType": "string",
- "notificationType": "sms",
- "flexibleDelivery": {
- "deliveryInstructions": "string",
- "what3words": "string"
}, - "incoterms": "string"
}, - "manifestGroupCode": "string",
- "tags": [
- "string"
], - "allocatedDateTime": "2019-08-24T14:15:22Z",
- "service": {
- "carrierService": {
- "code": "string",
- "name": "string",
- "carrier": {
- "name": "string",
- "code": "string"
}
}
}, - "carrierConsignmentCode": "string"
}, - "links": [
- {
- "operation": "GET",
- "rel": "string",
- "href": "string"
}
]
}
Retrieve the labels and customs documents of an Allocated
consignment.
Note: You can also use this operation if the consignment lifecycle status is Printed
or Ready to manifest
.
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.
Consignment paperwork strings
Bad Request
Unauthorized
Forbidden
Not Found
Conflict - Wrong state for printing
Internal Server Error
curl -i -X GET \ -u <username>:<password> \ 'https://api.sbx.metapack.com/shipping/v1/consignments/{consignmentCode}/paperwork?type=label&format=pdf&dimension=6X4&resolution=200'
{- "paperwork": {
- "labels": "string",
- "customs": "string"
}, - "links": [
- {
- "operation": "GET",
- "rel": "string",
- "href": "string"
}
]
}
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,
- "currencyCode": "string"
}, - "shippingCharge": {
- "amount": 0,
- "currencyCode": "string"
}, - "insuranceCharge": {
- "amount": 0,
- "currencyCode": "string"
}, - "otherCharge": {
- "amount": 0,
- "currencyCode": "string"
}
}
], - "measurementUnits": {
- "weight": "kg",
- "measurement": "cm",
- "volume": "ml"
}, - "shipmentRef": "string",
- "parcels": [
- {
- "shipperRef": "ref-123456",
- "packagingType": "string",
- "weight": {
- "value": 0
}, - "dimensions": {
- "height": 0,
- "width": 0,
- "depth": 0,
- "diameter": 0
}, - "value": {
- "amount": 0,
- "currencyCode": "string"
}, - "items": [
- {
- "itemRef": "string",
- "harmonisedCode": "string",
- "countryOfOrigin": "string",
- "fabricContent": "string",
- "description": "string",
- "itemType": "string",
- "quantity": 0,
- "value": {
- "amount": 0
}, - "weight": {
- "value": 0
}, - "dangerousGoods": {
- "unId": "string",
- "shippingName": "string",
- "productClass": "1.2",
- "packagingGroup": "string",
- "measurementUnit": "string",
- "packagingInstructions": "string",
- "quantity": 0,
- "packageType": "string",
- "amount": 0,
- "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"
}
]
}
], - "attributes": {
- "cashOnDelivery": {
- "value": {
- "amount": 0,
- "currencyCode": "string"
}, - "paymentMethod": "string"
}, - "contentType": "string",
- "notificationType": "sms",
- "flexibleDelivery": {
- "deliveryInstructions": "string",
- "what3words": "string"
}, - "incoterms": "string"
}, - "type": "delivery",
- "manifestGroupCode": "string",
- "tags": [
- "string"
], - "sender": {
- "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"
}
}, - "recipient": {
- "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"
}
}, - "supportingAgents": {
- "property1": {
- "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"
}
}, - "property2": {
- "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"
}
}
}
}, - "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": {
- "measurementUnits": {
- "weight": "kg",
- "measurement": "cm",
- "volume": "ml"
}, - "orders": [
- {
- "orderRef": "string",
- "orderDate": "2019-08-24T14:15:22Z",
- "value": {
- "amount": 0,
- "currencyCode": "string"
}, - "shippingCharge": {
- "amount": 0,
- "currencyCode": "string"
}, - "insuranceCharge": {
- "amount": 0,
- "currencyCode": "string"
}, - "otherCharge": {
- "amount": 0,
- "currencyCode": "string"
}
}
], - "parcels": [
- {
- "parcelCode": "string",
- "parcelIndex": 0,
- "shipperRef": "cartonId-123456",
- "packagingType": "string",
- "weight": {
- "value": 0
}, - "dimensions": {
- "height": 0,
- "width": 0,
- "depth": 0,
- "diameter": 0
}, - "value": {
- "amount": 0,
- "currencyCode": "string"
}, - "items": [
- {
- "itemRef": "string",
- "harmonisedCode": "string",
- "countryOfOrigin": "string",
- "fabricContent": "string",
- "description": "string",
- "itemType": "string",
- "quantity": 0,
- "value": {
- "amount": 0
}, - "weight": {
- "value": 0
}, - "dangerousGoods": {
- "unId": "string",
- "shippingName": "string",
- "productClass": "1.2",
- "packagingGroup": "string",
- "measurementUnit": "string",
- "packagingInstructions": "string",
- "quantity": 0,
- "packageType": "string",
- "amount": 0,
- "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"
}
], - "deliveryLegs": [
- {
- "trackingIdentifier": "string",
- "trackingURL": "string"
}
]
}
], - "status": "unallocated",
- "type": "delivery",
- "sender": {
- "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"
}
}, - "recipient": {
- "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"
}
}, - "supportingAgents": {
- "property1": {
- "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"
}
}, - "property2": {
- "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"
}
}
}, - "deliveryInformation": {
- "cutoffDateTime": "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,
- "currencyCode": "string"
}, - "property2": {
- "amount": 0,
- "currencyCode": "string"
}
}, - "legs": [
- {
- "trackingIdentifier": "string",
- "trackingURL": "string",
- "trackingLinks": {
- "carrier": "string"
}
}
]
}, - "consignmentCode": "DMC4BY1V4HVY",
- "shipmentRef": "string",
- "attributes": {
- "cashOnDelivery": {
- "value": {
- "amount": 0,
- "currencyCode": "string"
}, - "paymentMethod": "string"
}, - "contentType": "string",
- "notificationType": "sms",
- "flexibleDelivery": {
- "deliveryInstructions": "string",
- "what3words": "string"
}, - "incoterms": "string"
}, - "manifestGroupCode": "string",
- "tags": [
- "string"
], - "allocatedDateTime": "2019-08-24T14:15:22Z",
- "service": {
- "carrierService": {
- "code": "string",
- "name": "string",
- "carrier": {
- "name": "string",
- "code": "string"
}
}
}, - "carrierConsignmentCode": "string"
}, - "paperwork": {
- "labels": "string",
- "customs": "string"
}, - "links": [
- {
- "operation": "GET",
- "rel": "string",
- "href": "string"
}
]
}
Add a parcel to an existing consignment.
If the consignment has already been Allocated
, the tracking code for the new parcel is generated automatically and returned in the response.
In addition, the weight and value of the new parcel are added to the weight and value of the consignment.
Note: You can also use this operation if the consignment lifecycle status is Unallocated
, Printed
, or Ready to manifest
. Using this operation resets the status of a modified consignment from Printed
or Ready to manifest
back to Allocated
until all labels are generated.
Parcel added to consignment
Bad Request
Unauthorized
Forbidden
Conflict - Parcel cannot be added because the consignment is in a consignment lifecycle status where it cannot be modified
Internal Server Error
{- "parcel": {
- "shipperRef": "ref-123456",
- "packagingType": "string",
- "weight": {
- "value": 0
}, - "dimensions": {
- "height": 0,
- "width": 0,
- "depth": 0,
- "diameter": 0
}, - "value": {
- "amount": 0,
- "currencyCode": "string"
}, - "items": [
- {
- "itemRef": "string",
- "harmonisedCode": "string",
- "countryOfOrigin": "string",
- "fabricContent": "string",
- "description": "string",
- "itemType": "string",
- "quantity": 0,
- "value": {
- "amount": 0
}, - "weight": {
- "value": 0
}, - "dangerousGoods": {
- "unId": "string",
- "shippingName": "string",
- "productClass": "1.2",
- "packagingGroup": "string",
- "measurementUnit": "string",
- "packagingInstructions": "string",
- "quantity": 0,
- "packageType": "string",
- "amount": 0,
- "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"
}
]
}
}
{- "parcel": {
- "parcelCode": "string",
- "parcelIndex": 0,
- "shipperRef": "cartonId-123456",
- "packagingType": "string",
- "weight": {
- "value": 0
}, - "dimensions": {
- "height": 0,
- "width": 0,
- "depth": 0,
- "diameter": 0
}, - "value": {
- "amount": 0,
- "currencyCode": "string"
}, - "items": [
- {
- "itemRef": "string",
- "harmonisedCode": "string",
- "countryOfOrigin": "string",
- "fabricContent": "string",
- "description": "string",
- "itemType": "string",
- "quantity": 0,
- "value": {
- "amount": 0
}, - "weight": {
- "value": 0
}, - "dangerousGoods": {
- "unId": "string",
- "shippingName": "string",
- "productClass": "1.2",
- "packagingGroup": "string",
- "measurementUnit": "string",
- "packagingInstructions": "string",
- "quantity": 0,
- "packageType": "string",
- "amount": 0,
- "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"
}
], - "deliveryLegs": [
- {
- "trackingIdentifier": "string",
- "trackingURL": "string"
}
]
}, - "links": [
- {
- "operation": "GET",
- "rel": "string",
- "href": "string"
}
]
}
Remove a parcel from a multi-parcel consignment.
The weight of the removed parcel is subtracted automatically from the weight of the consignment.
If the consignment has already been Allocated
, the charges are recalculated.
Note: You can also use this operation if the consignment lifecycle status is Unallocated
, Printed
, or Ready to manifest
. Using the operation does not change the status of a modified consignment.
Parcel removed from consignment
Bad Request
Unauthorized
Forbidden
Not Found
Conflict - Parcel cannot be removed because the consignment is in a consignment lifecycle status where it cannot be modified
Internal Server Error
curl -i -X DELETE \ -u <username>:<password> \ 'https://api.sbx.metapack.com/shipping/v1/consignments/{consignmentCode}/parcels/{parcelCode}'
{- "errorCode": "string",
- "message": "string",
- "systemMessage": "string",
- "traceID": "string",
- "timestamp": "2019-08-24T14:15:22Z"
}
Create a relationship between two consignments by associating a parcel in an “inner” (child) consignment with a parcel in an “outer” (parent) consignment, which facilitates parent-child tracking.
Note: You can use this operation if the consignment lifecycle status of each consignment is Unallocated
, Allocated
, Printed
, or Ready to manifest
. Using the operation does not change the status of a modified consignment.
Consignment is successfully consolidated with the outer consignment
Bad Request
Unauthorized
Forbidden
Not Found
Conflict - Consignment cannot be consolidated because the consignment is in a consignment lifecycle status where it cannot be modified
Internal Server Error
{- "containerConsignmentCode": "string",
- "containerParcelCode": "string"
}
{- "errorCode": "string",
- "message": "string",
- "systemMessage": "string",
- "traceID": "string",
- "timestamp": "2019-08-24T14:15:22Z"
}
Delete a consolidation of two consignments that are linked as "inner" (child) and "outer" (parent) consignments.
Note: You can use this operation if the consignment lifecycle status of each consignment is Unallocated
, Allocated
, Printed
, or Ready to manifest
. Using the operation does not change the status of a modified consignment.
Consolidation of consignments successfully deleted
Bad Request
Unauthorized
Forbidden
Not Found
Conflict - Consignment cannot be unlinked because the consignment is in a consignment lifecycle status where it cannot be modified
Internal Server Error
curl -i -X DELETE \ -u <username>:<password> \ 'https://api.sbx.metapack.com/shipping/v1/consignments/{consignmentCode}/parcels/{parcelCode}/consolidate'
{- "errorCode": "string",
- "message": "string",
- "systemMessage": "string",
- "traceID": "string",
- "timestamp": "2019-08-24T14:15:22Z"
}
Retrieve the labels and customs documents of a specific parcel in an Allocated
consignment.
Note: You can also use this operation if the consignment lifecycle status is Printed
or Ready to manifest
.
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.
Parcel paperwork strings
Bad Request
Unauthorized
Forbidden
Not Found
Conflict - Wrong state for printing
Internal Server Error
curl -i -X GET \ -u <username>:<password> \ 'https://api.sbx.metapack.com/shipping/v1/consignments/{consignmentCode}/parcels/{parcelCode}/paperwork?type=label&format=pdf&dimension=6X4&resolution=200'
{- "paperwork": {
- "labels": "string",
- "customs": "string"
}, - "links": [
- {
- "operation": "GET",
- "rel": "string",
- "href": "string"
}
]
}
Add a product to a parcel of an existing consignment.
Note: You can use this operation if the consignment lifecycle status is Unallocated
, Allocated
, Printed
, or Ready to manifest
. Using the operation does not change the status of a modified consignment.
required | object (Item) Trade items are the goods being shipped. Enter data about each trade item in a parcel. |
Successfully amended items
Bad Request
Unauthorized
Forbidden
Conflict - Wrong state for adding a product to a parcel
Internal Server Error
{- "item": {
- "itemRef": "string",
- "harmonisedCode": "string",
- "countryOfOrigin": "string",
- "fabricContent": "string",
- "description": "string",
- "itemType": "string",
- "quantity": 0,
- "value": {
- "amount": 0
}, - "weight": {
- "value": 0
}, - "dangerousGoods": {
- "unId": "string",
- "shippingName": "string",
- "productClass": "1.2",
- "packagingGroup": "string",
- "measurementUnit": "string",
- "packagingInstructions": "string",
- "quantity": 0,
- "packageType": "string",
- "amount": 0,
- "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"
}
}
{- "errorCode": "string",
- "message": "string",
- "systemMessage": "string",
- "traceID": "string",
- "timestamp": "2019-08-24T14:15:22Z"
}
Remove the products (items) from the parcel.
Note: You can use this operation if the consignment lifecycle status is Unallocated
, Allocated
, Printed
, or Ready to manifest
. Using the operation does not change the status of a modified consignment.
Successfully deleted items
Bad Request
Unauthorized
Forbidden
Conflict - Wrong state for deleting products from a parcel
Internal Server Error
curl -i -X DELETE \ -u <username>:<password> \ 'https://api.sbx.metapack.com/shipping/v1/consignments/{consignmentCode}/parcels/{parcelCode}/items/{itemRef}?quantityToDelete=0'
{- "errorCode": "string",
- "message": "string",
- "systemMessage": "string",
- "traceID": "string",
- "timestamp": "2019-08-24T14:15:22Z"
}
Use shipping rules to allocate an Unallocated
consignment to the optimal carrier service associated with your Metapack shipper account.
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.
Note: If a suitable subscribed carrier service is not found for the consignment, it will remain Unallocated
.
Consignment allocated
Consignment not allocated
Bad Request
Unauthorized
Forbidden
Conflict - Consignment cannot be allocated because it is not in the correct consignment lifecycle status
Internal Server Error
{- "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"
}
{- "consignment": {
- "measurementUnits": {
- "weight": "kg",
- "measurement": "cm",
- "volume": "ml"
}, - "orders": [
- {
- "orderRef": "string",
- "orderDate": "2019-08-24T14:15:22Z",
- "value": {
- "amount": 0,
- "currencyCode": "string"
}, - "shippingCharge": {
- "amount": 0,
- "currencyCode": "string"
}, - "insuranceCharge": {
- "amount": 0,
- "currencyCode": "string"
}, - "otherCharge": {
- "amount": 0,
- "currencyCode": "string"
}
}
], - "parcels": [
- {
- "parcelCode": "string",
- "parcelIndex": 0,
- "shipperRef": "cartonId-123456",
- "packagingType": "string",
- "weight": {
- "value": 0
}, - "dimensions": {
- "height": 0,
- "width": 0,
- "depth": 0,
- "diameter": 0
}, - "value": {
- "amount": 0,
- "currencyCode": "string"
}, - "items": [
- {
- "itemRef": "string",
- "harmonisedCode": "string",
- "countryOfOrigin": "string",
- "fabricContent": "string",
- "description": "string",
- "itemType": "string",
- "quantity": 0,
- "value": {
- "amount": 0
}, - "weight": {
- "value": 0
}, - "dangerousGoods": {
- "unId": "string",
- "shippingName": "string",
- "productClass": "1.2",
- "packagingGroup": "string",
- "measurementUnit": "string",
- "packagingInstructions": "string",
- "quantity": 0,
- "packageType": "string",
- "amount": 0,
- "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"
}
], - "deliveryLegs": [
- {
- "trackingIdentifier": "string",
- "trackingURL": "string"
}
]
}
], - "status": "unallocated",
- "type": "delivery",
- "sender": {
- "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"
}
}, - "recipient": {
- "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"
}
}, - "supportingAgents": {
- "property1": {
- "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"
}
}, - "property2": {
- "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"
}
}
}, - "deliveryInformation": {
- "cutoffDateTime": "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,
- "currencyCode": "string"
}, - "property2": {
- "amount": 0,
- "currencyCode": "string"
}
}, - "legs": [
- {
- "trackingIdentifier": "string",
- "trackingURL": "string",
- "trackingLinks": {
- "carrier": "string"
}
}
]
}, - "consignmentCode": "DMC4BY1V4HVY",
- "shipmentRef": "string",
- "attributes": {
- "cashOnDelivery": {
- "value": {
- "amount": 0,
- "currencyCode": "string"
}, - "paymentMethod": "string"
}, - "contentType": "string",
- "notificationType": "sms",
- "flexibleDelivery": {
- "deliveryInstructions": "string",
- "what3words": "string"
}, - "incoterms": "string"
}, - "manifestGroupCode": "string",
- "tags": [
- "string"
], - "allocatedDateTime": "2019-08-24T14:15:22Z",
- "service": {
- "carrierService": {
- "code": "string",
- "name": "string",
- "carrier": {
- "name": "string",
- "code": "string"
}
}
}, - "carrierConsignmentCode": "string"
}, - "links": [
- {
- "operation": "GET",
- "rel": "string",
- "href": "string"
}
]
}
Delete the allocation of a consignment to a subscribed carrier service and leave it Unallocated
.
Note: You can use this operation if the consignment lifecycle status is Allocated
, Printed
, or Ready to manifest
.
To verify that the consignment is Unallocated
, use the Get a consignment operation.
To reallocate the consignment, use the Allocate a consignment operation.
Allocation deleted
Bad Request
Unauthorized
Forbidden
Not Found
Conflict - Allocation cannot be deleted because the consignment is not in the correct consignment lifecycle status
Internal Server Error
curl -i -X DELETE \ -u <username>:<password> \ 'https://api.sbx.metapack.com/shipping/v1/consignments/{consignmentCode}/service'
{- "errorCode": "string",
- "message": "string",
- "systemMessage": "string",
- "traceID": "string",
- "timestamp": "2019-08-24T14:15:22Z"
}
Flag a Printed
consignment as Ready to manifest
.
You can then use the Create a manifest for future despatch operation to add the consignment to a post-dated manifest, which will change the status to Manifested
.
You can also reallocate or delete the consignment, or add parcels to it. Adding a parcel will change the status to Allocated
. Modifying the consignment will require deleting its allocation, which will change the status to Unallocated
.
Alternatively, flag a Ready to manifest
consignment as not manifest-ready, which changes the status back to Printed
.
You can then reallocate or delete the consignment, or add parcels to it. Adding a parcel will change the status to Allocated
. Modifying the consignment will require deleting its allocation, which will change the status to Unallocated
.
Consignment status changed
Bad Request
Unauthorized
Conflict - There was a conflict in the change of the consignment lifecycle status
Internal Server Error
curl -i -X POST \ -u <username>:<password> \ 'https://api.sbx.metapack.com/shipping/v1/consignments/{consignmentCode}/status?readyToShip=true'
{- "errorCode": "string",
- "message": "string",
- "systemMessage": "string",
- "traceID": "string",
- "timestamp": "2019-08-24T14:15:22Z"
}
Verify whether an Unallocated
consignment can be allocated using the specified shipping rules.
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. |
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. |
A subscribed carrier service is available at this time for consignment and its shipping rules
A subscribed carrier service is not available at this time for consignment and its shipping rules
Bad Request
Unauthorized
Forbidden
Internal Server Error
{- "consignment": {
- "orders": [
- {
- "orderRef": "string",
- "orderDate": "2019-08-24T14:15:22Z",
- "value": {
- "amount": 0,
- "currencyCode": "string"
}, - "shippingCharge": {
- "amount": 0,
- "currencyCode": "string"
}, - "insuranceCharge": {
- "amount": 0,
- "currencyCode": "string"
}, - "otherCharge": {
- "amount": 0,
- "currencyCode": "string"
}
}
], - "measurementUnits": {
- "weight": "kg",
- "measurement": "cm",
- "volume": "ml"
}, - "shipmentRef": "string",
- "parcels": [
- {
- "shipperRef": "ref-123456",
- "packagingType": "string",
- "weight": {
- "value": 0
}, - "dimensions": {
- "height": 0,
- "width": 0,
- "depth": 0,
- "diameter": 0
}, - "value": {
- "amount": 0,
- "currencyCode": "string"
}, - "items": [
- {
- "itemRef": "string",
- "harmonisedCode": "string",
- "countryOfOrigin": "string",
- "fabricContent": "string",
- "description": "string",
- "itemType": "string",
- "quantity": 0,
- "value": {
- "amount": 0
}, - "weight": {
- "value": 0
}, - "dangerousGoods": {
- "unId": "string",
- "shippingName": "string",
- "productClass": "1.2",
- "packagingGroup": "string",
- "measurementUnit": "string",
- "packagingInstructions": "string",
- "quantity": 0,
- "packageType": "string",
- "amount": 0,
- "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"
}
]
}
], - "attributes": {
- "cashOnDelivery": {
- "value": {
- "amount": 0,
- "currencyCode": "string"
}, - "paymentMethod": "string"
}, - "contentType": "string",
- "notificationType": "sms",
- "flexibleDelivery": {
- "deliveryInstructions": "string",
- "what3words": "string"
}, - "incoterms": "string"
}, - "type": "delivery",
- "manifestGroupCode": "string",
- "tags": [
- "string"
], - "sender": {
- "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"
}
}, - "recipient": {
- "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"
}
}, - "supportingAgents": {
- "property1": {
- "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"
}
}, - "property2": {
- "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"
}
}
}
}, - "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"
}
}
{- "errorCode": "string",
- "message": "string",
- "systemMessage": "string",
- "traceID": "string",
- "timestamp": "2019-08-24T14:15:22Z"
}
Add Ready to manifest
consignments to a post-dated manifest and clear the consignments from your current transactional flow.
You might want to do this because you expect a large number of orders to go out on a particular day in the future, but you want to leave sufficient time to pack and process them beforehand.
Manifest created
Bad Request
Unauthorized
Forbidden
Internal Server Error
{- "carrierCode": "string",
- "shippingLocationCode": "string",
- "manifestGroupCode": "string",
- "transactionType": "delivery",
- "despatchDate": "2019-08-24T14:15:22Z",
- "specifiedDateOnly": false
}
{- "links": [
- {
- "rel": "string",
- "href": "string"
}
]
}
Generate a manifest in Base64-encoded format.
Note: You can use this operation only if the consignment lifecycle status is Manifested
.
Tip: To generate the manifest as a PDF file, you must first decode the string inluded in a successful response by using a Base64 encoder/decoder and then send it to a network printer.
Manifest paperwork created
Bad Request
Unauthorized
Forbidden
Not Found
Internal Server Error
curl -i -X GET \ -u <username>:<password> \ 'https://api.sbx.metapack.com/shipping/v1/manifests/{manifestCode}/paperwork'
{- "paperwork": {
- "manifest": "string"
}, - "links": [
- {
- "rel": "string",
- "href": "string"
}
]
}
Verify which carrier services associated with your Metapack shipper account can offer the best rates for delivering a consignment.
You also have the option to specify shipping rules, which 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.
A successful response returns all carrier services that can deliver the consignment in order of shipping cost, with the cheapest first.
Prerequisites: Warehouses, carriers, carrier services, and carrier costs must be configured for your Metapack shipper account. Refer to API setup data.
Tip: You can reuse the request body for this operation to create a consignment.
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. |
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. |
Consignment shipping rates
Bad Request
Unauthorized
Internal Server Error
{- "consignment": {
- "orders": [
- {
- "orderRef": "string",
- "orderDate": "2019-08-24T14:15:22Z",
- "value": {
- "amount": 0,
- "currencyCode": "string"
}, - "shippingCharge": {
- "amount": 0,
- "currencyCode": "string"
}, - "insuranceCharge": {
- "amount": 0,
- "currencyCode": "string"
}, - "otherCharge": {
- "amount": 0,
- "currencyCode": "string"
}
}
], - "measurementUnits": {
- "weight": "kg",
- "measurement": "cm",
- "volume": "ml"
}, - "shipmentRef": "string",
- "parcels": [
- {
- "shipperRef": "ref-123456",
- "packagingType": "string",
- "weight": {
- "value": 0
}, - "dimensions": {
- "height": 0,
- "width": 0,
- "depth": 0,
- "diameter": 0
}, - "value": {
- "amount": 0,
- "currencyCode": "string"
}, - "items": [
- {
- "itemRef": "string",
- "harmonisedCode": "string",
- "countryOfOrigin": "string",
- "fabricContent": "string",
- "description": "string",
- "itemType": "string",
- "quantity": 0,
- "value": {
- "amount": 0
}, - "weight": {
- "value": 0
}, - "dangerousGoods": {
- "unId": "string",
- "shippingName": "string",
- "productClass": "1.2",
- "packagingGroup": "string",
- "measurementUnit": "string",
- "packagingInstructions": "string",
- "quantity": 0,
- "packageType": "string",
- "amount": 0,
- "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"
}
]
}
], - "attributes": {
- "cashOnDelivery": {
- "value": {
- "amount": 0,
- "currencyCode": "string"
}, - "paymentMethod": "string"
}, - "contentType": "string",
- "notificationType": "sms",
- "flexibleDelivery": {
- "deliveryInstructions": "string",
- "what3words": "string"
}, - "incoterms": "string"
}, - "type": "delivery",
- "manifestGroupCode": "string",
- "tags": [
- "string"
], - "sender": {
- "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"
}
}, - "recipient": {
- "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"
}
}, - "supportingAgents": {
- "property1": {
- "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"
}
}, - "property2": {
- "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"
}
}
}
}, - "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"
}
}
[- {
- "cutoffDateTime": "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,
- "currencyCode": "string"
}, - "property2": {
- "amount": 0,
- "currencyCode": "string"
}
}
}
]
Retrieve information about the warehouses, carriers, and carrier services associated with your Metapack shipper account.
Retrieve all carriers associated with your Metapack shipper account.
Prerequisite: Carriers must be configured for your Metapack shipper account. Refer to API setup data.
The carriers associated with your Metapack shipper account
Bad Request
Unauthorized
Not Found
Internal Server Error
curl -i -X GET \ -u <username>:<password> \ https://api.sbx.metapack.com/shipping/v1/carriers
[- {
- "name": "string",
- "code": "string"
}
]
Retrieve all carrier services associated with your Metapack shipper account.
Prerequisite: Carrier services must be configured for your Metapack shipper account. Refer to API setup data.
The carrier services associated with your Metapack shipper account
Bad Request
Unauthorized
Not Found
Internal Server Error
curl -i -X GET \ -u <username>:<password> \ 'https://api.sbx.metapack.com/shipping/v1/carriers/{carrierCode}/services'
[- {
- "name": "string",
- "code": "string"
}
]
Retrieve all warehouses associated with your Metapack shipper account.
A warehouse is any location used for shipping orders. Example locations include stores, distribution centres, and logistics channels.
Prerequisite: Warehouses must be configured for your Metapack shipper account. Refer to API setup data.
The warehouses associated with your Metapack shipper account
Bad Request
Unauthorized
Not Found
Internal Server Error
curl -i -X GET \ -u <username>:<password> \ https://api.sbx.metapack.com/shipping/v1/shippingLocations
[- {
- "name": "string",
- "code": "string"
}
]