Update an unallocated consignment

You can change the order details or shipping rules of an unallocated consignment. These are classed as non-parcel changes.

Any non-parcel changes should be completed before a consignment is allocated. If the status of a consignment is ALLOCATED or PRINTED or READY TO MANIFEST, the allocation of the consignment must first be deleted before the consignment can be modified.

A consignment cannot be modified in any way after its status changes to MANIFESTED.

Update consignment request

You need the following to make an update consignment request.

Parameter Value Description
status UNALLOCATED The consignment lifecycle status.
consignmentCode The consignment identifier generated by Metapack when a consignment is created.

Using the Update an unallocated consignment operation, complete the following steps:

  1. Enter the consignmentCode of the consignment.
  2. Make the desired consignment or shipping rules changes in the request body.
Note

You must resubmit the mandatory information of the consignment in addition to any other consignment data that you have added or modified.

Example request

Copy
Copied
PUT /shipping/v1/consignments/{consignmentCode} 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": "ModifiedOrderRef",
                "value": {
                    "amount": 0,
                    "currencyCode": "GBP"
                }
            }
        ],
        "shipmentRef": "test",
        "sender": {
            "code": "default",
            "addressLine1": "200 GRAY'S INN RD",
            "addressLine2": "4TH FLOOR",
            "postCode": "WC1X 8XZ",
            "countryCode": "GBR",
            "companyName": "Appythings",
            "city": "London",
            "stateProvince": null,
            "timeZone": "Europe/London",
            "contact": {
                "name" : "help test",
                "email": "help@metapack.com",
                "phone": "0612345678"
            }
        },
        "recipient": {
            "addressLine1": "200 Grays Inn",
            "addressLine2": "London",
            "postCode": "WC1 8XC",
            "countryCode": "GBR",
            "companyName": "METAPACK LIMITED",
            "city": "London",
            "stateProvince": "",
            "timeZone": "Europe/London",
            "type": "Business",
            "contact": {
                "name" : "help test",
                "email": "help@metapack.com",
                "phone": "0612345678"
            }
        },
        "supportingAgents": {
            "return": {
                "addressLine1": "200 Grays Inn",
                "addressLine2": "london",
                "city": "London",
                "postCode": "WC1X 8XZ",
                "countryCode": "GBR",
                "companyName": "METAPACK LIMITED",
                "stateProvince": "",
                "type": "residential",
                "addressReference": "",
                "contact": {
                    "name": "test",
                    "email": "help@metapack.com",
                    "phone": "+31612345678"
                }
            }
        },
        "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"
        ]
    }
}

Update consignment response

200 (OK)

Significant parameters in a successful response are as follows.

Parameter Value Description
status UNALLOCATED You can reallocate or delete the consignment, or add parcels to it.

Example response

Copy
Copied
{
    "consignment": {
        "consignmentCode": "DMC4F923H0CG",
        "manifestGroupCode": null,
        "measurementUnits": {
            "weight": "kg",
            "measurement": "cm",
            "volume": "ml"
        },
        "orders": [
            {
                "orderRef": "ModifiedOrderRef",
                "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": "Appythings",
            "timeZone": "Europe/London",
            "contact": {
                "firstName": "test",
                "lastName": null,
                "title": null,
                "timeZone": "Europe/London",
                "email": "test@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",
                "lastName": null,
                "title": null,
                "timeZone": "Europe/London",
                "language": "en",
                "email": "help@metapack.com",
                "phone": null
            }
        },
        "parcels": [
            {
                "parcelCode": "4F92CVC3I",
                "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": "london",
                "city": "London",
                "postCode": "WC1X 8XZ",
                "countryCode": "GBR",
                "companyName": "METAPACK LIMITED",
                "stateProvince": null,
                "addressReference": "",
                "contact": {
                    "name": null,
                    "timezone": "",
                    "language": "",
                    "email": null,
                    "phone": null
                }
            }
        },
        "carrierConsignmentCode": null
    },
    "links": [
        {
            "operation": "GET",
            "rel": "consignment",
            "href": "/consignments/DMC4F923H0CG"
        }
    ]
}

Related tasks