Generate Label Webhook URL/file requirement

Hi there,

We’re using this feature and it’s doing almost exactly what we need except that the label_url we have to pass in has the requirement that it end in “.pdf”. So far this has prevented us from sending pdfs from most online services because they either clean the link or append authentication information to the end of the link; for instance, shippinglabel.com/label.pdf?api_key=1234. The base object/file is a pdf but to access it externally requires that authentication info.

We also noticed that if we just add “.pdf” to the end of any URL and send it in with the response, it “succeeds” but trying to print the label doesn’t work; like google.com.pdf

Would it possible to accept more than just URLs that end in .pdf?

Hello @Mike!

Can you share with us any orders you experienced this in? I looking for one of the first paragraphs and one of the second. I’d like to bring this up with the team.

Kind regards,
TomasFD

I don’t know any orders off the top of my head where this occurred because it was just during our own testing and we had to undo/correct them after the fact anyway. I do have the bodies of the requests sent for each of these scenarios when responding to the Generate Label Webhook, which I’ll add below and try to give context around the failure.

Here is an example of a valid label that is a “.pdf” but has auth info at the end which causes “Print Label” within the shipping.shiphero.com dashboard to fail. Ideally, this response should work as is.

{
"code":"200",
"cost":"8.62",
"label":"https://deliver.goshippo.com/8fe29ae388484abcbb4f8bba979f13a5.pdf?Expires=1678393333&Signature=Qr8WrA3uVFp0g2bBOK~f2QlaYnWG2ONg33pE~CmeGMmVRcLBDJL~ghk5zpXHm~z0S-4S5MNIgbLpCsDJNhJW5oEzzsmvbxNlbkn6t5If7DkP82wKltx9iRVZ2NSe~FN0bdvWiLMVGC55oBRXIig1fqgZnkZyvFugsg5vHK1pYqUOMuPPsWRdKPV5pFCTghdfYWpvQdQrs65HI9zn9lCZYp7tIvrV50ZxGwaWyLug4gxPrj6Lgrv~sLokvprVzaEo7qDxHQDAgdViOxPFcvPZ56t3Qe2l7MrEJhD-xy~8g6szwcqoKSdUSWdsIBPuhuFmJyYDN71RJNpY7tdTgdFT7A__&Key-Pair-Id=APKAJRICFXQ2S4YUQRSQ",
"customs_info":null,
"shipping_method":"Custom UPS",
"tracking_number":"1Z904R2A0393275261",
"shipping_carrier":"ups"
}

Here is an example where adding “.pdf” to the end of the link caused a “success” when using Print Label. The label link is legit without the .pdf, but Print Label fails unless we add that to the end. And then even though it succeeds, the label isn’t actually printable (because the link is simply invalid).

{
"code":"200",
"cost":"12.06",
"label":"https://drive.google.com/file/d/13EdEFgNSAvhfMkbUzQy0-poKhjnxiBKv/view?usp=sharing.pdf",
"customs_info":null,
"shipping_method":"Custom UPS",
"tracking_number":"1Z904R2A0398044948",
"shipping_carrier":"ups"
}

Hi there,

Any updates on this?