Updating custom tracking url

I am from Carry, a same day delivery provider, and we are working with a retailer to be one of their carriers. We are not fully integrated with ShipHero as a carrier, so our plan was to rely on existing webhooks to receive the data we need and plug into our workflows.

We wanted to pass back a custom tracking URL to ShipHero using the shipping API. I was reading through this post which mentions the ability to set the tracking link when setting up a customer to use us as a carrier. I had a few questions regarding this setup.

  • What triggers the Shipment Updated webhook?
  • How can I associate a shipment with an order? The order webhook payload doesn’t contain a shipment id
  • How would I send a custom tracking link e.g. https://tracking.company.com/number123 to my client? I see the tracking_number and custom_tracking_url fields in the shipment api, but am not quite sure where and when to set them

Hello @Yash!

Welcome to the ShipHero Public-API Community!

  1. The Shipment Updated Webhook is triggered when a shipment is created. This can be using our UI to fulfill the order or creating a shipment through the API using the shipment_create mutation.
  2. At the moment of creation, the shipment is always associated with an order. In the UI because you are shipping a particular order and using the API because the mutation requires the order_id field to be complete.
  3. To set up a custom tracking link, you could set up a Generate Label Webhook. You can find more information here: Webhooks – Developer Resources | ShipHero. In a nutshell, this is setting up a custom shipping method in your retailer’s ShipHero account, which hast the custom_tracking_url. Whenever they ship an order using that method, we send a webhook to your endpoint requesting a label. In the response, apart from the label URL and other fields, you can send us a tracking_number, which we will append to the custom_tracking_url to build the whole URL.

Please let me know if you require further help.

Have a great day!
TomasFD

Thanks, this was very helpful!

From the link you sent us, it seems like our API would have to return an image. Our client was hoping to manually generate a generic label but just use the webhook to update tracking information. Is this possible?

Hello @yash!

Once created, Shipments or Labels can’t be modified.

Another option would be following this flow: Order Fulfillment – Developer Resources | ShipHero

This mimics the Fulfillment of an order but using the API. However, setting the order as Fulfilled and Subtracting inventory is not done automatically when creating the Shipment/Label, that is why you need to run all 3 mutations specified in that link.

Kind regards,
TomasFD