Change the billing address on an order#

Use the addBillingAddressToOrder mutation to set or replace the billing address on an existing order.

Input: AddBillingAddressToOrderInput!

NameTypeRequiredDescription
order_id
String!
RequiredThe ID of the order to update.
address
AddressInput!
RequiredThe new billing address.

Returns: Order

NameTypeRequiredDescription
id
ID!
RequiredThe ID
number
String!
RequiredOrder number
total
Money!
RequiredTotal value
currency
Currency!
RequiredCurrency code

Example#

mutation AddBillingAddress($input: AddBillingAddressToOrderInput!) {
  addBillingAddressToOrder(input: $input) {
    order {
      id
      billing {
        address {
          address_line_1
          locality
          postal_code
          country_code
        }
      }
    }
  }
}
{
  "input": {
    "order_id": "ord_72fca344-2a6f-4c3e-b4ca-029920b2522a",
    "address": {
      "address_line_1": "Keizersgracht 313",
      "locality": "Amsterdam",
      "postal_code": "1016 EE",
      "country_code": "NL"
    }
  }
}

Notes#

  • Calling this mutation on an order that already has a billing address replaces the existing address.
  • Authentication requires a valid API key passed as a Bearer token. See Authentication.
Query Runnerhttps://afosto.app/graphql

No query loaded

Click play on any code block in the docs to load a query here.