This method allows you to remove a Products Array from an existing parcel within a consignment. You can do this at any stage up to and including 'Ready to manifest'.
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:
-
If you have not already done so, open a new project using the WSDL
ConsignmentService.xml
. -
Create a new request under
unpackProductsFromParcel
. -
Enter the authorisation for the request.
-
Specify the code of the existing consignment.
-
Specify the parcel from which the products are to be removed, by giving its parcelNumber (e.g. '1' or '2', etc.).
-
Enter the Products Array to be removed.
-
Set recalculateTaxAndDuty to
false
. -
Click to submit the request.
The following example removes two products from a parcel in a 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:unpackProductsFromParcel soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<consignmentCode xsi:type="soapenc:string">DMC4BY1V6XXS</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:unpackProductsFromParcel>
</soapenv:Body>
</soapenv:Envelope>
If the input is valid, then the products are removed from the specified parcel within the consignment, and true
is returned, as in the example below.
<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:unpackProductsFromParcelResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="urn:DeliveryManager/services"> <unpackProductsFromParcelReturn xsi:type="xsd:boolean">true</unpackProductsFromParcelReturn> </ns1:unpackProductsFromParcelResponse> </soapenv:Body> </soapenv:Envelope>
If you wish to confirm the removal of the products from 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 that the products have been removed from the Dangerous Goods tab (refer to Marking a Product as Dangerous Goods).