Anchor to section titled 'undefined'

checkoutShippingAddressUpdateV2
mutation
deprecated

Requires unauthenticated_write_checkouts access scope.

Updates the shipping address of an existing checkout. The Storefront GraphQL Checkout API is deprecated and will be removed in a future version. Please see https://shopify.dev/changelog/deprecation-of-checkout-apis for more information.


Anchor to checkoutId
checkoutId
required

The ID of the checkout.

The shipping address to where the line items will be shipped.


Was this section helpful?

The updated checkout object.

The list of errors that occurred from executing the mutation.

The list of errors that occurred from executing the mutation. Use checkoutUserErrors instead.


Was this section helpful?

Examples

Hide code
DescriptionCopy
mutation updateShippingAddress($checkoutId: ID!, $shippingAddress: MailingAddressInput!) {
  checkoutShippingAddressUpdateV2(checkoutId: $checkoutId, shippingAddress: $shippingAddress) {
    checkout {
      shippingAddress {
        address1
        address2
        city
        company
        country
        firstName
        lastName
        province
        zip
      }
    }
    userErrors {
      field
      message
    }
    checkoutUserErrors {
      field
      message
      code
    }
  }
}
Hide code
Response
JSON
{
  "checkoutShippingAddressUpdateV2": {
    "checkout": {
      "shippingAddress": {
        "address1": "204 rue de l'Hopital",
        "address2": "#204",
        "city": "Montreal",
        "company": "Shopify",
        "country": "Canada",
        "firstName": "John",
        "lastName": "Smith",
        "province": "Quebec",
        "zip": "G1Q1Q9"
      }
    },
    "userErrors": [],
    "checkoutUserErrors": []
  }
}