appendParcelsToConsignment

This method allows you to add one or more parcels to an existing consignment, using the Parcels Array.

If the consignment has already been allocated, then the tracking codes for the new parcel(s) are generated automatically and returned in the response. The sum of the new parcels’ weights is added to the consignment weight and, similarly, the sum of the new parcels’ values is added to the consignment value.

Note

If the consignment is at the 'Ready to Manifest' status, then a successful appendParcelsToConsignment call will reset it to the 'Allocated' status.

If you are modifying a consignment at the consignment level, i.e. where the consignmentLevelDetailsFlag is set to true, then you can pass in zeros for both the weight and value, resulting in no overall change to the consignment. However, if the consignmentLevelDetailsFlag is set to false, which is the recommendation, particularly for international shipments, then the weight and value are mandatory in the Parcels Array.

Note

It is assumed that you have worked through Creating your first Request to a Service, and are familiar with the Properties needed to Call or Create a Consignment and Parcels Array.

How to submit a request

Proceed as follows:

  1. If you have not already done so, open a new project using the WSDL ConsignmentService.xml.

  2. Create a new request under appendParcelsToConsignment.

  3. Enter the authorisation for the request.

  4. Specify the code of the existing consignment.

  5. Add one or more parcels to the Parcels Array.

  6. Set recalculateTaxAndDuty to false.

  7. Click Arrow.png to submit the request.

Example Request

<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="urn:DeliveryManager/services" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
   <soapenv:Header/>
   <soapenv:Body>
      <ser:appendParcelsToConsignment soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
         <consignmentCode xsi:type="soapenc:string">DMC4BY1V3PZN</consignmentCode>
         <parcels soapenc:arrayType="ns2:Parcel[1]" xsi:type="soapenc:Array">
                  <parcels xsi:type="ns2:Parcel">
                     <cartonId xsi:type="soapenc:string">08K02JTY8</cartonId>
                     <code xsi:type="soapenc:string" xsi:nil="true"/>
                     <destinationReference xsi:type="soapenc:string" xsi:nil="true"/>
                     <dutyPaid xsi:type="xsd:double">0.0</dutyPaid>
                     <number xsi:type="xsd:int">1</number>
                     <originReference xsi:type="soapenc:string" xsi:nil="true"/>
                     <outerConsignmentCode xsi:type="soapenc:string" xsi:nil="true"/>
                     <outerParcelNumber xsi:type="xsd:int">0</outerParcelNumber>
                     <parcelDepth xsi:type="xsd:double">61.0</parcelDepth>
                     <parcelHeight xsi:type="xsd:double">46.0</parcelHeight>
                     <parcelValue xsi:type="xsd:double">1.0</parcelValue>
                     <parcelWeight xsi:type="xsd:double">1.0</parcelWeight>
                     <parcelWidth xsi:type="xsd:double">46.0</parcelWidth>
                     <products soapenc:arrayType="ns2:Product[1]" xsi:type="soapenc:Array">
                        <products xsi:type="ns2:Product">
                           <countryOfOrigin xsi:type="soapenc:string">GBR</countryOfOrigin>
                           <fabricContent xsi:type="soapenc:string">1</fabricContent>
                           <harmonisedProductCode xsi:type="soapenc:string">1</harmonisedProductCode>
                           <miscellaneousInfo xsi:type="soapenc:Array" xsi:nil="true"/>
                           <productCode xsi:type="soapenc:string">1</productCode>
                           <productDescription xsi:type="soapenc:string">1</productDescription>
                           <productQuantity xsi:type="xsd:long">1</productQuantity>
                           <productTypeDescription xsi:type="soapenc:string">1</productTypeDescription>
                           <totalProductValue xsi:type="xsd:double">20.0</totalProductValue>
                           <unitProductWeight xsi:type="xsd:double">2.0</unitProductWeight>
                               <dangerousGoods soapenc:arrayType="ns2:DangerousGoods[2]" xsi:type="soapenc:Array">
                                 <dangerousGoods xsi:type="ns2:DangerousGoods">
                                 <unId>UNID 3090</unId>
                                 <shippingName>Lithium metal batteries</shippingName>
                                 <productClass>9</productClass>
                                 <packagingGroup>III</packagingGroup>
                                 <packagingInstructions>Must be placed in inner packagings that completely enclose the cell or battery then placed in an outer packaging</packagingInstructions>
                                 <packagingInstructionSection>965</packagingInstructionSection>
                                 <amount>2</amount>
                                 <measurementUnit>Kg</measurementUnit>
                                 <additionalInfo>Lithium ion batteries packed in accordance with packing instruction 965 are forbidden on passenger aircraft</additionalInfo>
                                 </dangerousGoods>
                               </dangerousGoods>
                        </products>
                     </products>
                     <recipientReference xsi:type="soapenc:string" xsi:nil="true"/>
                     <reference xsi:type="soapenc:string" xsi:nil="true"/>
                     <senderReference xsi:type="soapenc:string" xsi:nil="true"/>
                     <trackingCode xsi:type="soapenc:string" xsi:nil="true"/>
                     <trackingUrl xsi:type="soapenc:string" xsi:nil="true"/>
                  </parcels>   
                  </parcels>
         <recalculateTaxAndDuty xsi:type="xsd:boolean">false</recalculateTaxAndDuty>
      </ser:appendParcelsToConsignment>
   </soapenv:Body>
</soapenv:Envelope>

For an example response and how to process the information, see below.

Example Response

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <soapenv:Body>
      <ns1:appendParcelsToConsignmentResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="urn:DeliveryManager/services">
         <appendParcelsToConsignmentReturn soapenc:arrayType="ns2:Parcel[1]" xsi:type="soapenc:Array" xmlns:ns2="urn:DeliveryManager/types" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
            <appendParcelsToConsignmentReturn xsi:type="ns2:Parcel">
               <CODParcelAmount xsi:type="xsd:double">0.0</CODParcelAmount>
               <cartonId xsi:type="soapenc:string">08K02JTY8</cartonId>
               <code xsi:type="soapenc:string">6822088000012106</code>
               <destinationReference xsi:type="soapenc:string"/>
               <dutyPaid xsi:type="xsd:double">0.0</dutyPaid>
               <number xsi:type="xsd:int">3</number>
               <originReference xsi:type="soapenc:string"/>
               <outerConsignmentCode xsi:type="soapenc:string" xsi:nil="true"/>
               <outerParcelNumber xsi:type="xsd:int">0</outerParcelNumber>
               <packageTypeCode xsi:type="soapenc:string" xsi:nil="true"/>
               <parcelDepth xsi:type="xsd:double">61.0</parcelDepth>
               <parcelHeight xsi:type="xsd:double">46.0</parcelHeight>
               <parcelPrintStatus xsi:type="soapenc:string">Not Printed</parcelPrintStatus>
               <parcelValue xsi:type="xsd:double">1.0</parcelValue>
               <parcelWeight xsi:type="xsd:double">1.0</parcelWeight>
               <parcelWidth xsi:type="xsd:double">46.0</parcelWidth>
               <products soapenc:arrayType="ns2:Product[1]" xsi:type="soapenc:Array">
                  <products xsi:type="ns2:Product">
                     <dangerousGoods soapenc:arrayType="ns2:DangerousGoods[1]" xsi:type="soapenc:Array">
                        <dangerousGoods xsi:type="ns2:DangerousGoods">
                           <unId xsi:type="soapenc:string">UNID 3090</unId>
                           <shippingName xsi:type="soapenc:string">Lithium metal batteries</shippingName>
                           <productClass xsi:type="soapenc:string">9</productClass>
                           <packagingGroup xsi:type="soapenc:string">III</packagingGroup>
                           <measurementUnit xsi:type="soapenc:string">Kg</measurementUnit>
                           <packagingInstructions xsi:type="soapenc:string">Must be placed in inner packagings that completely enclose the cell or battery then placed in an outer packaging</packagingInstructions>
                           <amount xsi:type="xsd:double">2.0</amount>
                           <additionalInfo xsi:type="soapenc:string">Lithium ion batteries packed in accordance with packing instruction 965 are forbidden on passenger aircraft</additionalInfo>
                           <packagingInstructionSection xsi:type="soapenc:string">965</packagingInstructionSection>
                        </dangerousGoods>
                     </dangerousGoods>
                     <countryOfOrigin xsi:type="soapenc:string">GBR</countryOfOrigin>
                     <fabricContent xsi:type="soapenc:string">1</fabricContent>
                     <harmonisedProductCode xsi:type="soapenc:string">1</harmonisedProductCode>
                     <miscellaneousInfo xsi:type="soapenc:Array" xsi:nil="true"/>
                     <productCode xsi:type="soapenc:string">1</productCode>
                     <productDescription xsi:type="soapenc:string">1</productDescription>
                     <productQuantity xsi:type="xsd:long">1</productQuantity>
                     <productTypeDescription xsi:type="soapenc:string">1</productTypeDescription>
                     <totalProductValue xsi:type="xsd:double">20.0</totalProductValue>
                     <unitProductWeight xsi:type="xsd:double">2.0</unitProductWeight>
                  </products>
               </products>
               <recipientReference xsi:type="soapenc:string"/>
               <reference xsi:type="soapenc:string"/>
               <senderReference xsi:type="soapenc:string"/>
               <trackingCode xsi:type="soapenc:string">6822088000012106</trackingCode>
               <trackingUrl xsi:type="soapenc:string">https://www.hermesworld.com/en/our_services/distribution/uk_distribution/parcel_tracking/parcel-tracking.html?trackingNumber=6822088000012106</trackingUrl>
            </appendParcelsToConsignmentReturn>
         </appendParcelsToConsignmentReturn>
      </ns1:appendParcelsToConsignmentResponse>
   </soapenv:Body>
</soapenv:Envelope>
                    

Next Steps

Verify the modified Consignment

If you wish to view the parcels that have been added to the consignment, you can use the GUI as follows:

  1. Log into the Delivery Manager Delta environment via the user account that was used to run the API:

    https://dm-delta.metapack.com/dm/ActionServlet?action=home
  2. Click Home and then select the Allocated status, followed by Search.

    Import_new_nav_bar_3.png
  3. Find the required consignment and open it under the Details tab, to see the new tracking code.

  4. If Dangerous Goods have been added, as in the example above, then move to the Dangerous Goods tab to view them:

    Import_new_nav_bar_6.png