This method creates the label and customs documents for a particular parcel within an allocated consignment. The documents are created in a Base64-encoded format.


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 Printing Properties.

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 createPaperworkForParcel.

  3. Enter the authorisation for the request.

  4. Specify the code of the existing consignment containing the parcel for which paperwork is to be generated.

  5. Specify the parcel for which paperwork is to be generated, by giving its parcelNumber (e.g. '1' or '2', etc.).

  6. Enter the parameters for document generation.

  7. Click Arrow.png to submit the request.

Example Request

<soapenv:Envelope xmlns:xsi="" xmlns:xsd="" xmlns:soapenv="" xmlns:ser="urn:DeliveryManager/services" xmlns:soapenc="">
      <ser:createPaperworkForParcel soapenv:encodingStyle="">
         <consignmentCode xsi:type="soapenc:string">DMC4BY1V4HMR</consignmentCode>
         <parcelNumber xsi:type="xsd:int">2</parcelNumber>
         <parameters xmlns:tns="">

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

Example Response

<soapenv:Envelope xmlns:soapenv="" xmlns:xsd="" xmlns:xsi="">
      <ns1:createPaperworkForParcelResponse soapenv:encodingStyle="" xmlns:ns1="urn:DeliveryManager/services">
         <createPaperworkForParcelReturn xsi:type="ns2:Paperwork" xmlns:ns2="urn:DeliveryManager/types">
            <documents xsi:type="soapenc:base64Binary" xsi:nil="true" xmlns:soapenc=""/>
            <labels xsi:type="soapenc:base64Binary" xmlns:soapenc="">JVBERi0xLjQ.....c4MAolJUVPRgo=</labels>

Decode and Print the Labels and Customs Documents

The results are generated in up to two strings at the bottom of the response: a labels string containing the label(s) for each parcel, and a documents string containing the customs documents.

The strings are Base64-encoded, as in the example response above, where the strings have been truncated for aesthetic purposes.

To generate the labels or documents from the associated string, you need to copy and load the string into a Base64 decoder (e.g. Refer to Store the Paperwork and Print Later.