Stay up to date

Developer changelog

Tools

Edit orders with our new Order Editing APIs

Effective June 19, 2019

Action required

New

We are excited to announce the developer preview and API for one of our most requested features, editing orders. This feature will allow merchants to add and remove line items, as well as adjust line item quantities. Here’s what developers need to know about this new feature.

As of June 19, 2019, the order editing developer preview will be available in development stores with the Unite developer preview enabled for you to test and build against. The associated GraphQL API will be exposed on the unstable version of the Admin API. The Order Editing API will not be available via the REST Admin API.

Once released to merchants later this year, editing orders will allow merchants to alter line item quantities, add new items to a customer’s order, and remove items. To enable developers and partners to prepare for the general availability release of editing orders this summer, we have made the feature available for testing on development stores with the Unite developer preview enabled. Effective immediately you will find an “Edit order” option at the top of each order in the Shopify admin in your development store:

Edit order button

Selecting the Edit order option will take you to the order edit screen where you can then make your adjustments to the order. If the order total changes, then you need to collect or refund a payment amount.

What does order editing mean for developers of public apps or custom integrations?

While this release makes no backward incompatible changes to any of Shopify’s APIs, the introduction of order editing does allow merchants to change facets of an order in such a way that fields that were previously immutable or considered to changed only in rare circumstances will now be subject to more regular updates.

If a merchant were to add a line item to an order, as expected, the addition will be reflected in the line_items array on the order payload. However, the edit to the order will also have an impact on status and monetary values throughout the payload. For example, total_price will increase, financial_status will be set to partially_paid, all values under total_line_items_price_set will be adjusted, total_tax may increase and in turn tax_lines would also be updated.

When a merchant edits an order, the orders/updated webhook will fire, so that your public apps or custom integrations can monitor changes to orders.

What developers need to know

  • Merchants will be able to edit item quantities, as well as add and remove line items
  • Orders can be edited by merchants for up to 60 days after they were first created
  • A fulfilled line item can not be edited
  • If an order is partially fulfilled, then unfulfilled items can still be edited
  • Order values that were previously immutable or rarely subject to change may now be updated via an order edit
  • The orders/updated webhook will fire whenever an order is edited
  • Order editing will be exposed via the GraphQL Admin API
  • Order editing will not be available the REST Admin API

Do I need to update my app?

This depends on the nature of your app and your specific implementation. We are recommending that all public apps and custom integrations that consume order payloads are tested thoroughly with the order editing feature. Pay special attention to ensure that a change in order state does not negatively impact your app. The feature is available on developer preview stores and you can start testing immediately.

Order Editing API

Order editing is exposed via the GraphQL Admin API and is currently available in the unstable version of the API and will work with developer preview stores only. The Order Editing API establishes a new pattern, starting with a begin mutation, a series of edits, and finally a commit. The orderEditBegin mutation creates a CalculatedOrder object which tracks all the changes you want to make to the order. When you are satisfied with your changes, the orderEditCommit mutation persists the changes to the order. For more information about editing orders via the API, see our Order Editing with GraphQL guide.

Get started in the Unite developer preview The ability to edit orders is exclusively available in the Unite developer preview. To get started with the developer preview, create a new development store with the Unite 2019 developer preview enabled and explore our documentation.

Getting support and providing feedback

As always, we’re very keen to hear your feedback about use cases and concerns about the introduction of order editing. Once you’ve had a chance to try out the feature on your developer preview stores, please join us in the forums.

Known Issue: June 18th - Orders that are edited using the new Order Editing feature or API will not have those changes reflected in the fulfillment orders assigned to that order. A fix is expected shortly. If you want to test the features currently, we recommend you do so on independent development store with developer preview enabled until the fix is made.