Closed blairanderson closed 5 years ago
FYI @hakanensari thank you for this GEM. Amazing 👍
@blairanderson I’m not sure if there any other operations elsewhere in the API that serve PDFs. This could certainly be something useful.
I’m off the grid now but will look into this when I return next month.
Yup. The documentation on page says:
The
GetPackageLabels
,GetUniquePackageLabels
,GetPalletLabels
, andGetBillOfLading
operations return PDF document data for printing shipping labels and carrier labels for an inbound shipment. Amazon compresses PDF document data before returning it as a Base64-encoded string. To obtain the actual PDF document, you must decode the Base64-encoded string, save it as a binary file with a “.zip” extension, and then extract the PDF file from the ZIP file. These operations also return a Base64-encoded MD5 hash to validate the document data.
I figure that people using this lib would want to do those other requests as well.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
On Oct 19, 2018, at 6:08 PM, stale[bot] notifications@github.com wrote:
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
@blairanderson sorry for the late response, and thanks for taking the time to post and explain.
I did some digging around and found that the Merchant Fulfilment API is also embedding labels, but in a slightly different way—they're gzipped instead of zipped. I'm not sure if it matters, but the keys are also named differently.
Long story short, it seems there are at least two slightly different paths.
The current parser simply delegates to MultiXml.parse
, which doesn't typecast values. This seems what we want to do here—detect and unpack values that contain binary data, perhaps saving the output to a TempFile
.
To he honest, I'm not sure either how to go about this. Perhaps a first good step could be to simply add a section on this to the README instead of attempting to shoehorn some complex logic into the main library 🤔
Totally cool.
I’m actually having trouble with carton labels for multi-sku shipments.
I do think it would be better just adding to the docs instead of implementing helpers because they might not get much direct usage.
Thanks again for help
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
https://docs.developer.amazonservices.com/en_US/fba_inbound/FBAInbound_ExtractingPdfDocumentData.html
This lib parses CSV files from other parts of the API and might be a nice addition for the PDF as well.
not sure if/how/where you would accept this.