Amazon Services
Amazon Marketplace Web Service (Amazon MWS) Documentation
Amazon MWS Documentation

How to extract a shipping label file

The CreateShipment and GetShipment operations return a shipping label file in PDF, PNG, or ZPL format, depending on the carrier. Amazon compresses the document data before returning it as a Base64-encoded string.

To extract document data from a compressed file

  1. Decode the Base64-encoded string.
  2. Save the decoded string with a “.gzip” extension.
  3. Extract the PDF, PNG, or ZPL file from the GZIP file.

CreateShipment and GetShipment also return a Base64-encoded MD5 hash to validate the document data.