packProductsToParcel

This method allows you to add a Products Array to an existing parcel within a consignment. You can do this at any stage up to and including 'Ready to manifest'.

Caution

If you are going to add a product with Dangerous Goods, then you must do this prior to allocation.

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 Products 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 packProductsToParcel.

  3. Enter the authorisation for the request.

  4. Specify the code of the existing consignment.

  5. Specify the parcel to which the products are to be added, by giving its parcelNumber (e.g. '1' or '2', etc.).

  6. Enter the Products Array.

  7. Set recalculateTaxAndDuty to false.

  8. Click Arrow.png to submit the request.

Example Request

The following example adds two products to a parcel in an unallocated consignment, the second of which contains Dangerous Goods:

<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:packProductsToParcel soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
         <consignmentCode xsi:type="soapenc:string">DMC4BY1V4KJ3</consignmentCode>
         <parcelNumber xsi:type="xsd:int">1</parcelNumber>
         <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">10</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">15</totalProductValue>
                     <unitProductWeight xsi:type="xsd:double">3.0</unitProductWeight>
                  </products>
                  <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>
         <recalculateTaxAndDuty xsi:type="xsd:boolean">false</recalculateTaxAndDuty>
      </ser:packProductsToParcel>
   </soapenv:Body>
</soapenv:Envelope>

If the input is valid, then the products are added to the specified parcel within the consignment, and true is returned, as in the example 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:packProductsToParcelResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="urn:DeliveryManager/services">
         <packProductsToParcelReturn xsi:type="xsd:boolean">true</packProductsToParcelReturn>
      </ns1:packProductsToParcelResponse>
   </soapenv:Body>
</soapenv:Envelope>

Next Steps

If you wish to confirm the addition of the products to the parcel, then find the consignment in the Delivery Manager GUI, and verify the number of products under the Products tab (refer to Adding Parcel and Product details). You should also, if relevant, check the products added under the Dangerous Goods tab (refer to Marking a Product as Dangerous Goods).