How to modify order phone number using GraphQL mutation?

Topic summary

Main issue: Updating an order’s phone number via GraphQL is possible in Shopify Admin but not exposed in the public Admin GraphQL API.

  • Shopify Admin uses an internal GraphQL mutation (OrderContactUpdate) that accepts OrderInput with phone and email fields. A provided code snippet and variables show the mutation updating both fields on an order.

  • In the public Admin GraphQL API (referenced at version 2021-10), OrderInput does not define the phone field, preventing apps from programmatically changing the order phone number even though users can do it manually in Admin.

  • Technical context: GraphQL mutation is a write operation; OrderInput is the schema for the mutation’s input. The discrepancy is between internal Admin capabilities and public API schema.

  • Status/Outcome: No solution was identified. Another participant reported the same limitation. As of the latest message, it appears unchanged and unresolved, with an implied request for Shopify to add phone to OrderInput in the public API.

Summarized with AI on December 17. AI used: gpt-5.

In the Shopify Admin, you’re allowed to change the email address and phone number on an order. Shopify does the following GraphQL mutation.

mutation OrderContactUpdate($input: OrderInput!) {
  orderUpdate(input: $input) {
    order {
      id
      phone
      email
    }
    userErrors {
      field
      message
    }
  }
}

Variables:

{
    "input": {
        "id": "gid://shopify/Order/3986425053319",
        "phone": "+31612345678",
        "email": "name@domain.com"
    }
}

The same mutation exists on the public GraphQL API but the “phone” field is not defined on the OrderInput for the public API. I’d very much like it to have the phone field defined so we can do the same mutations as the user can do manually within the Shopify Admin.

2 Likes

I also went into the same problem. Any solutions? :folded_hands:

I haven’t checked in well over a year, so it might have been changed, but as far as I know, no solution.