Update shipping costs for unfilfilled orders

Update shipping costs for unfilfilled orders

Niklas_g
Shopify Partner
34 8 23

Hello guys,

 

we use a custom payment method for our orders. However, sometimes the shipping weights change afterwards. Therefore, we want to automate the process and adjust the shipping costs/method via API. Is there a way to update the shipping costs for an unfulfilled order using the API? Independent of the payment. I can not find the right endpoint, can some help me please? 

Replies 7 (7)

Kalen_Jordan
Shopify Partner
803 39 147

Looks like this should work:

https://shopify.dev/docs/api/admin-graphql/2024-04/mutations/orderEditUpdateShippingLine

 

If you'd like me to build out a workflow automation using our app mesa to do this, just let me know.

Niklas_g
Shopify Partner
34 8 23

Hey, thank you for your response. 

I tried it but it seems that i can only update shippingLines that I added durring the orderEdit mutation but not the shipping that is currently on the order. "Updates a shipping line on the current order edit".

 

Do you have a other idea? 

 

 

Kalen_Jordan
Shopify Partner
803 39 147

Hmm - I could probably dig into it further and find a solution if you were interested in using our app mesa to implement this.

Niklas_g
Shopify Partner
34 8 23

Unfortunately, I need this in a middleware between a BI tool and Shopify. So an app is unfortunately not an option. Nevertheless, I'll keep the app solution in mind for other projects and get back to you when I have a suitable project for it.

Kalen_Jordan
Shopify Partner
803 39 147

Gotcha what's the BI tool?

Kalen_Jordan
Shopify Partner
803 39 147

Hey @Niklas_g - ironically I am now stuck on the same issue you were 🤣 Was expecting this to allow you to update the shipping line on the order but hitting a weird error message. Did you ever figure it out?

Kalen_Jordan
Shopify Partner
803 39 147

Figured it out - you have to do orderEditRemoveShippingLine and then orderEditAddShippingLine.