Generate Label Webhook API

Hi,

We are using Webhook for label generation.According to the ShipHero API documentation, We will receive webhook body for the configured endpoint(https://someurl.com/print-label) and we are sending response as

{
“code”: “200”,
“shipping_method”: “Ground”,
“tracking_number”: “1adddsad11”,
“cost”: “”,
“label”: “s3.amazonaws.com/images/65259502/thermaltmpyjYG5K.pdf”,
“customs_info”: “Shipping Label”,
“shipping_carrier”: “ups”
}

While triggering the API from ShipHero it’s throwing error as

GraphQL error: Api error response from https://someurl.com/print-label
{
“code”: “200”,
“shipping_method”: “Ground”,
“tracking_number”: “1adddsad11”,
“cost”: “”,
“label”: “s3.amazonaws.com/images/65259502/thermaltmpyjYG5K.pdf”,
“customs_info”: “Shipping Label”,
“shipping_carrier”: “ups”
}

Please help me to understand what is wrong here?
Thanks in advance!

Hi @supritha!
Is there any chance you could share the order ID so I can check on our side?
That way I can get a better insight into what might be happening.
Thanks in advance!
Tom

Hi @tomasw,

Order ID 159241368.

Thanks in advance!

Thanks for that information @supritha!
Is it happening for all of your orders or just this one?
Is there any chance I could have a test order I could use to use as an example for our engineers?
Thanks again!
Tom

Hi @tomasw,

Thanks for the reply!

This happens for all the orders.
Please use Order ID: 159700741 for testing.

We have modified the response from

{
“code”: “200”,
“shipping_method”: “Ground”,
“tracking_number”: “1adddsad11”,
“cost”: “”,
“label”: “s3.amazonaws.com/images/65259502/thermaltmpyjYG5K.pdf 1”,
“customs_info”: “Shipping Label”,
“shipping_carrier”: “ups”
}

to

{
“code”: “200”,
“shipping_method”: “Ground”,
“tracking_number”: “1adddsad11”,
“cost”: “0.00”,
“label”: “s3.amazonaws.com/images/65259502/thermaltmpyjYG5K.pdf 1”,
“customs_info”: “”,
“shipping_carrier”: “ups”
}
Please let us know if anything needs to be changed here.

Thanks in advance!

Hi @supritha
Thanks for that information!

I’m actually seeing a response back, something like this:

{
    "code": "200",
    "shipping_method": "<edited>",
    "tracking_number": "<edited>",
    "cost": "",
    "label": "<edited>",
    "customs_info": "<edited>",
    "shipping_carrier": "<edited>"
} 

But in the header there is a 404 code:

Reference: <edited> 
Method: POST 
Status: 404 
Request: {"edited.."}

Is there any chance you could check with your team if the Status code is being set to 404 by default?
Thanks again!
Tom

Thanks for the update, @tomasw !

1 Like