Shipments with Custom Labels

Hi all,

Just thought I would share my experience of using custom labels in ShipHero in case anyone else is running into the same problems that I experienced.

Establishing the webhook was quite easy. As the API documentation states, in order to set up a Generate Label Webhook, you need to give support@shiphero.com your token and the URL that you want to be hit when the “Print invoice and labels” button on Endeavor is pressed.

I did, however, run into some challenges with the webhook response. At first, my response used the PDF version of the label as shown in the code below:

{
“code”: “200”,
“shipping_method”: “Integromat”,
“tracking_number”: “9400 1092 0556 8001 1476 26”,
“cost”: “5.55”,
“label”: “https://shiphero.com/wp-content/uploads/2020/07/test-shiping-label.pdf”,
“customs_info”: “”,
“shipping_carrier”: “Api”
}

But when I clicked “Print invoice and labels”, I got the following error message:

Command ‘[‘gs’, ‘-dBATCH’, ‘-dNOPAUSE’, ‘-sOutputFile=/tmp/4wx7f0bb_%d.png’, ‘-sDEVICE=png16m’, ‘-dGraphicsAlphaBits=4’, ‘-dTextAlphaBits=4’, ‘-r300’, ‘/tmp/2020/07/27/4fb9e58782e66de8df93290e7c6fff5dc6f00c13e9f8039c1bbb240e7017a657/labels/137355740/4wx7f0bb.pdf’]’ returned non-zero exit status 1.

I then retried sending the webhook response with the PNG version of the label instead:

“label”:“https://secure.la.stamps.com/img/rnt_kb_files/RNTimages/SMARTIN_RNT_IMAGES/messageimages2817/shippinglabelwmessage2817.png

And although I received another error message:

“Parser must be a string or character stream, not NoneType”

I found that the label was now associated with my order and had no repercussions of ignoring the message and simply completing my order.

Hope this helps for anyone that is having trouble!