Discussing APIs and development related to customers, discounts, and order management.
Hi there,
I've having trouble editing the order from the admin interface. When I click on the "Edit" button on this page https://maxim-khanate.myshopify.com/admin/orders/2109272227904
I get the message "This order cannot be edited by this app." (see screenshot). I've read the linked page and it does not mention why I cannot edit an order on the admin page.
Note that this order was created by the app I developed. I guess I have 2 related questions: Why can't a merchant edit an order if it created by my app? How do I allow a merchant to edit app created orders?
Thanks!
Solved! Go to the solution
This is an accepted solution.
You can only edit orders in the admin created by the Shopify Sales Channel. As of August, apps can now edit orders that they’ve created via the GraphQL Admin API.
See the change log entry here:
https://shopify.dev/changelog/apps-can-now-edit-orders-they-created
This is an accepted solution.
Hey! To clarify the distinction.
You are not able to edit the order via the Shopify admin UI as it was created by your app. You can edit the order using the Draft Orders API via your app. If you want to modify the order, you will need to make your own order edit screen on top the Draft Orders API or use the Draft Orders API directly to manipulate the order.
Does that make sense?
This is an accepted solution.
You can only edit orders in the admin created by the Shopify Sales Channel. As of August, apps can now edit orders that they’ve created via the GraphQL Admin API.
See the change log entry here:
https://shopify.dev/changelog/apps-can-now-edit-orders-they-created
Thank you!
Turns out this doesn't quite work yet!
1. I created a draft order using https://shopify.dev/docs/admin-api/graphql/reference/mutation/draftordercreate?api%5Bversion%5D=2020...
2. then completed the draft order using https://shopify.dev/docs/admin-api/graphql/reference/mutation/draftordercomplete?api%5Bversion%5D=20...
3. which created this order https://maxim-khanate.myshopify.com/admin/orders/2805230207040
When I tried to edit the order on the admin UI at https://maxim-khanate.myshopify.com/admin/orders/2805230207040 I still get the same error message when I click on the Edit button.
Do you have any idea what I am doing wrong?
This is an accepted solution.
Hey! To clarify the distinction.
You are not able to edit the order via the Shopify admin UI as it was created by your app. You can edit the order using the Draft Orders API via your app. If you want to modify the order, you will need to make your own order edit screen on top the Draft Orders API or use the Draft Orders API directly to manipulate the order.
Does that make sense?
Got it! Thanks for the clarification.
No worries! It's often surprising what you can and cannot do with the various APIs and permissions, I've certainly gotten caught out a few times!
Hi, is there any workarounds for this?
What are the reasons behind making orders editable only through the same channel it was created?
Is this a frozen decision? Use case here is that we're a subscriptions app that specifically focuses on "subscription boxes", which are a bunch of products added programmatically to a box every month. Sometimes, though, the merchant wants to make a substitution, and with this configuration, they can't... unless we build an Order editing screen that's the exact same as your Order editing screen, or use Draft Orders but don't complete them.
So, is there any way to edit orders created by a private app, either through the Admin UI or Orders API?
I understand Drafts can be edited but I'm specifically looking for a way to edit orders, NOT drafts.
hey, did you figure out a solution?
Hi! Only for orders created via graphql and not rest?