Update shipping costs for unfilfilled orders

Niklas_g
Shopify Partner
34 8 22

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 5 (5)

Kalen_Jordan
Shopify Partner
452 16 66

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 22

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
452 16 66

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 22

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
452 16 66

Gotcha what's the BI tool?