Make changes to an order that was created by an App

Solved

Make changes to an order that was created by an App

tajbowness
Shopify Partner
15 2 4

Hello,

 

I'm trying to change the tracking link on an order that was created by an app (Sellbrite).

 

I'm using Python and the Shopify Python API Wrapper to make requests. 

https://github.com/Shopify/shopify_python_api

 

 

order = shopify.Order.find(1234...).to_dict()

trackingLink = "https://parcelsapp.com/en/tracking/TRACKINGNUMBER..."

order.fulfillments[0].tracking_url = trackingLink

print(order.save())  # Returns True

 

 

After checking the order the change was not made.

 

Testing whether if the issue is with my code I'll also change the order note after changing the tracking_url.

 

 

... 

order.fulfillments[0].tracking_url = trackingLink
order.note = "test"

print(order.save())  # Returns True

 

 

The changes to the note was made but not the tracking link. 

 

I haven't tested this on a draft order I'd create myself, but I believe the issue is coming from the order being made by an app. As also attempting to manually edit the order it prompts me with this.

 

Screen Shot 2024-02-22 at 11.25.30 am.png

This is just on the normal Shopify Backend ( Backend > Orders > Order > Edit)

 

Hoping to know if anyone could provide any insight, any help would be much appreciated! Thanks

Accepted Solution (1)

Liam
Shopify Staff
2873 312 821

This is an accepted solution.

Could you use the fulfillmentTrackingInfoUpdateV2 mutation to update the tracking URL? You can provide the `fulfillmentId` and `trackingInfoInput` as arguments to this mutation -and the `trackingInfoInput` is an object that contains the tracking URL:

 

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

View solution in original post

Replies 2 (2)

Liam
Shopify Staff
2873 312 821

This is an accepted solution.

Could you use the fulfillmentTrackingInfoUpdateV2 mutation to update the tracking URL? You can provide the `fulfillmentId` and `trackingInfoInput` as arguments to this mutation -and the `trackingInfoInput` is an object that contains the tracking URL:

 

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

tajbowness
Shopify Partner
15 2 4

Woah! That worked thanks, Liam!