Add a parcel to a consignment

A change to an order might require you to add a parcel to a consignment that is allocated but not yet manifested.

Unlike other operations that modify a consignment, parcel operations can be used on a consignment both before and after its status changes to ALLOCATED. However, a consignment cannot be modified in any way after its status changes to MANIFESTED.

Note

Adding dangerous goods to a consignment after it has been allocated might break the rules of the selected carrier or carrier service and cause delivery problems.

Add parcel request

You need the following to make an add parcel request.

Parameter Value Description
status UNALLOCATED or
ALLOCATED or
PRINTED or
READY TO MANIFEST
The consignment lifecycle status.
consignmentCode The consignment identifier generated by Metapack when a consignment is created.

Using the Add a parcel to a consignment operation, enter the following information:

  • Parcel details, including monetary value, dimensions, and weight
  • Delivery leg information

Example request

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

{
    "parcel": {
        "shipperRef": "32",
        "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",
                    "packageType": "BAG",
                    "measurementUnit": "12",
                    "packagingInstructions": "instruction",
                    "packagingInstructionSection": "22222",
                    "quantity": 1,
                    "amount": 1,
                    "regulationAuthority": "ra",
                    "regulationLevelCode": "1",
                    "transportationMeans": "12",
                    "reportableQuantity": true,
                    "radioActive": false,
                    "subRiskClass": "22",
                    "technicalName": "222",
                    "additionalInfo": "22222",
                    "overPack": "1111"
                }
            }
        ]
    }
}

Add parcel response

201 (Created)

A successful response means the following:

  • The parcels array of the consignment is updated.
  • If the status of the consignment is ALLOCATED , the tracking code for the new parcel is generated automatically and returned in the response.
  • The weight and value of the new parcel are added to the weight and value of the consignment.
  • If the status of the consignment was PRINTED or READY TO MANIFEST , adding the parcel changes the status to ALLOCATED . However, if the status of the consignment was UNALLOCATED or ALLOCATED , adding the parcel will not change the status .

Related tasks