# Updating custom tracking url

**URL:** <https://community.shiphero.com/t/updating-custom-tracking-url/1977>\
**Category:** GraphQL API\
**Created:** [May 3, 2022, 8:10pm UTC](https://community.shiphero.com/t/updating-custom-tracking-url/1977 "2022-05-03T20:10:33Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![yash](https://avatars.discourse-cdn.com/v4/letter/y/f17d59/32.png) [@yash](https://community.shiphero.com/u/yash)\
**Post date:** [May 3, 2022, 8:10pm UTC](https://community.shiphero.com/t/updating-custom-tracking-url/1977/1 "2022-05-03T20:10:33Z")

</div>

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](https://community.shiphero.com/t/adding-a-new-shipping-carrier/46/7) 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](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

---

<div class="post-metadata">

**Author:** ![tomasfd](https://avatars.discourse-cdn.com/v4/letter/t/5daacb/32.png) [@tomasfd](https://community.shiphero.com/u/tomasfd)\
**Post date:** [May 4, 2022, 2:11pm UTC](https://community.shiphero.com/t/updating-custom-tracking-url/1977/2 "2022-05-04T14:11:10Z")

</div>

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](https://developer.shiphero.com/webhooks#generate-label-webhook). 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

---

<div class="post-metadata">

**Author:** ![yash](https://avatars.discourse-cdn.com/v4/letter/y/f17d59/32.png) [@yash](https://community.shiphero.com/u/yash)\
**Post date:** [May 9, 2022, 5:21pm UTC](https://community.shiphero.com/t/updating-custom-tracking-url/1977/3 "2022-05-09T17:21:56Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![tomasfd](https://avatars.discourse-cdn.com/v4/letter/t/5daacb/32.png) [@tomasfd](https://community.shiphero.com/u/tomasfd)\
**Post date:** [May 11, 2022, 2:21pm UTC](https://community.shiphero.com/t/updating-custom-tracking-url/1977/4 "2022-05-11T14:21:24Z")

</div>

Hello @yash!

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

Another option would be following this flow: [Order Fulfillment – Developer Resources | ShipHero](https://developer.shiphero.com/order-fulfillment/)

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

---

<div class="post-metadata">

**Author:** ![yash](https://avatars.discourse-cdn.com/v4/letter/y/f17d59/32.png) [@yash](https://community.shiphero.com/u/yash)\
**Post date:** [October 31, 2022, 2:10pm UTC](https://community.shiphero.com/t/updating-custom-tracking-url/1977/5 "2022-10-31T14:10:23Z")

</div>

Hi Tomas,

Just following up with a question on this post - if we add a custom shipping method to our retailer’s account, and they ship using that method, will they need to do anything else to mark the order as shipped?

Yash

---

<div class="post-metadata">

**Author:** ![sh-agent](https://avatars.discourse-cdn.com/v4/letter/s/e47774/32.png) [@sh-agent](https://community.shiphero.com/u/sh-agent)\
**Post date:** [October 31, 2022, 3:25pm UTC](https://community.shiphero.com/t/updating-custom-tracking-url/1977/6 "2022-10-31T15:25:53Z")

</div>

Hey @yash,

Thanks for reaching out.

If they are shipping through the UI then nothing else is needed. If shipping through the API then they would still need to follow the [flow](https://developer.shiphero.com/order-fulfillment/) mentioned above.

Please let me know if you have any questions or concerns.

Best,  
RayanP

---

<div class="post-metadata">

**Author:** ![yash](https://avatars.discourse-cdn.com/v4/letter/y/f17d59/32.png) [@yash](https://community.shiphero.com/u/yash)\
**Post date:** [October 31, 2022, 4:59pm UTC](https://community.shiphero.com/t/updating-custom-tracking-url/1977/7 "2022-10-31T16:59:57Z")

</div>

Perfect! They are shipping through the UI so I think nothing else is needed.
