Create a consignment

Creating now and allocating later

If you want to create a parent pallet for a ship-to-store order, you can create a consignment and allocate it as two separate operations.

Create consignment request

You need the following to make a create consignment (without allocating it) request.

Data Description
Warehouses You cannot create consignments if warehouses are not configured for your Metapack shipper account. This is because the sender of a consignment is a warehouse (shipping location).

Using the Create a consignment operation, enter the following information:

  • Order details
  • Consignment dimensions and weight
  • Details about each parcel in the consignment

Example request

Copy
Copied
POST /shipping/v1/consignments HTTP/1.1
Host: api.metapack.com
API-Key: Basic Base64-encoded <username>:<password>
Content-Type: application/json

{
    "consignment": {
        "measurementUnits": {
            "weight": "kg",
            "measurement": "cm",
            "volume": "ml"
        },
        "orders": [
            {
                "orderRef": "help-centre-1",
                "value": {
                    "amount": 10,
                    "currencyCode": "GBP"
                }
            }
        ],
        "shipmentRef": "shipperRef12",
        "sender": {
            "code": "default",
            "addressLine1": "200 GRAY'S INN RD",
            "addressLine2": "4TH FLOOR",
            "postCode": "WC1X 8XZ",
            "countryCode": "GBR",
            "companyName": "test",
            "city": "London",
            "stateProvince": null,
            "contact": {
                "name": "test",
                "email": "help@metapack.com",
                "phone": "0612345678"
            }
        },
        "recipient": {
            "addressLine1": "200 Grays Inn",
            "addressLine2": "London",
            "postCode": "WC1X 8XC",
            "countryCode": "GBR",
            "companyName": "METAPACK LIMITED",
            "city": "London",
            "stateProvince": "",
            "timeZone": "Europe/London",
            "type": "business",
            "contact": {
                "name" : "help test",
                "email": "help@metapack.com",
                "phone": "0687654321"
            }
        },
        "supportingAgents": {
            "return": {
                "addressLine1": "200 Grays Inn",
                "addressLine2": " 4TH FLOOR",
                "city": "London",
                "postCode": "WC1X 8XC",
                "countryCode": "GBR",
                "companyName": "return wh",
                "type": "business",
                "addressReference": "",
                "contact": {
                    "name": "test",
                    "email": "help@metapack.com",
                    "phone": "+23312345678"
                }
            }
        },
        "parcels": [
            {
                "shipperRef": "1213",
                "packagingType": "BAG",
                "weight": {
                    "value": 1
                },
                "dimensions": {
                    "height": 10,
                    "width": 12,
                    "depth": 10
                },
                "value": {
                    "amount": 12,
                    "currencyCode": "GBP"
                },
                "items": [
                    {
                        "itemRef": "prod1",
                        "harmonisedCode": "1",
                        "countryOfOrigin": "GBR",
                        "fabricContent": "1",
                        "description": "prod1",
                        "itemType": "1",
                        "quantity": 1,
                        "value": {
                            "amount": 10
                        },
                        "exportReferenceNumber": null,
                        "exportLicenseNumber": null,
                        "batteryChemCode": null,
                        "weight": {
                            "value": 1
                        },
                        "dangerousGoods": {
                            "unId": "11",
                            "shippingName": "ship",
                            "productClass": "dangerous",
                            "packagingGroup": "12",
                            "measurementUnit": "12",
                            "packagingInstructions": "instruction",
                            "packagingInstructionSection": "22222",
                            "quantity": 1,
                            "packagingType": "bag",
                            "amount": 1,
                            "regulationAuthority": "ra",
                            "regulationLevelCode": "1",
                            "transportationMeans": "12",
                            "reportableQuantity": true,
                            "radioActive": false,
                            "subRiskClass": "22",
                            "technicalName": "222",
                            "additionalInfo": "22222",
                            "overPack": "1111"
                        }
                    }
                ]
            }
        ],
        "type": "delivery",
        "tags": [
            "cust1",
            "cust2",
            "cust3",
            "cust4",
            "cust5",
            "cust6",
            "cust7",
            "cust8",
            "cust9",
            "cust10"
        ]
    }
}

Create consignment response

201 (Created)

Significant parameters in a successful response are as follows.

Parameter Value Description
status UNALLOCATED You can modify, allocate, or delete the consignment, or add parcels to it.
carrierConsignmentCode null Allocating the consignment will change the value of this parameter.
consignmentCode This is the unique identifier of the consignment inside the Metapack Platform. You will need to use this parameter if you want to retrieve, update, allocate, or delete the consignment, or add parcels to it.

Example response

Copy
Copied
{
    "consignment": {
        "consignmentCode": "DMC4F923NZLR",
        "manifestGroupCode": null,
        "measurementUnits": {
            "weight": "kg",
            "measurement": "cm",
            "volume": "ml"
        },
        "orders": [
            {
                "orderRef": "help-centre-1",
                "orderDate": null,
                "value": {
                    "amount": 0
                },
                "shippingCharge": {
                    "value": 0,
                    "currencyCode": null
                }
            }
        ],
        "shipmentRef": null,
        "sender": {
            "addressLine1": "200 GRAY'S INN RD",
            "addressLine2": "4TH FLOOR",
            "city": "London",
            "postcode": "WC1X 8XZ",
            "countryCode": "GBR",
            "companyName": "test",
            "timeZone": "Europe/London",
            "contact": {
                "firstName": "test",
                "lastName": null,
                "title": null,
                "timeZone": "Europe/London",
                "email": "help@metapack.com",
                "phone": null
            }
        },
        "recipient": {
            "addressLine1": "200 Grays Inn",
            "addressLine2": "London",
            "city": "London",
            "postcode": "WC1 8XC",
            "countryCode": "GBR",
            "companyName": "METAPACK LIMITED",
            "timeZone": "Europe/London",
            "contact": {
                "firstName": "test recepient",
                "lastName": null,
                "title": null,
                "timeZone": "Europe/London",
                "language": "en",
                "email": "help@metapack.com",
                "phone": null
            }
        },
        "parcels": [
            {
                "parcelCode": "4F92CVC3G",
                "parcelIndex": 1,
                "shipperRef": "1213",
                "packagingType": "BAG",
                "weight": {
                    "value": 1
                },
                "dimensions": {
                    "height": 10,
                    "width": 12,
                    "depth": 10
                },
                "value": {
                    "amount": 12
                },
                "items": [
                    {
                        "itemRef": "prod1",
                        "harmonisedCode": "1",
                        "countryOfOrigin": "GBR",
                        "fabricContent": "1",
                        "description": "prod1",
                        "itemType": null,
                        "quantity": 1,
                        "value": {
                            "amount": 10
                        },
                        "exportReferenceNumber": null,
                        "exportLicenseNumber": null,
                        "batteryChemCode": null,
                        "weight": {
                            "value": 1
                        },
                        "dangerousGoods": {
                            "unId": "11",
                            "shippingName": "ship",
                            "productClass": "dangerous",
                            "packagingGroup": "12",
                            "measurementUnit": "12",
                            "packagingInstructions": "instruction",
                            "packagingInstructionSection": "22222",
                            "quantity": 1,
                            "packagingType": "bag",
                            "amount": 1,
                            "regulationAuthority": "ra",
                            "regulationLevelCode": null,
                            "transportationMeans": "12",
                            "reportableQuantity": true,
                            "radioActive": false,
                            "subRiskClass": "22",
                            "technicalName": "222",
                            "additionalInfo": "22222",
                            "overPack": "1111"
                        }
                    }
                ],
                "deliveryLegs": [
                    {
                        "trackIdentifier": null,
                        "trackingLinks": null
                    }
                ]
            }
        ],
        "status": "Unallocated",
        "attributes": {},
        "type": "Delivery",
        "tags": [
            "cust1",
            "cust2",
            "cust3",
            "cust4",
            "cust5",
            "cust6",
            "cust7",
            "cust8",
            "cust9",
            "cust10"
        ],
        "deliveryInformation": {
            "cutOffDate": null,
            "collectionWindow": {
                "from": "",
                "to": null
            },
            "deliveryWindow": {
                "from": null,
                "to": null
            }
        },
        "service": {
            "name": "",
            "code": "",
            "carrierService": {
                "code": null,
                "name": null,
                "carrier": {
                    "code": null
                }
            }
        },
        "supportingAgents": {
            "return": {
                "addressLine1": "200 Grays Inn",
                "addressLine2": " 4TH FLOOR",
                "city": "London",
                "postCode": "WC1 8XC",
                "countryCode": "GBR",
                "companyName": "return wh",
                "stateProvince": null,
                "addressReference": "",
                "contact": {
                    "name": null,
                    "timezone": "",
                    "language": "",
                    "email": null,
                    "phone": null
                }
            }
        },
        "carrierConsignmentCode": null
    },
    "links": [
        {
            "operation": "GET",
            "rel": "consignment",
            "href": "/consignments/DMC4F923NZLR"
        }
    ]
}

Related tasks