For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Dev Portal
DocsAPI ReferenceLearnCommunityChangelog
DocsAPI ReferenceLearnCommunityChangelog
    • About Our APIs
  • REST
    • Overview
  • GraphQL
    • Overview
      • Playground
      • Explorer
          • MUTcreateCart
          • MUTdeleteCart
          • MUTaddCartLineItems
          • MUTupdateCartLineItem
          • MUTdeleteCartLineItem
          • MUTupdateCartCurrency
          • MUTassignCartToCustomer
          • MUTunassignCartFromCustomer
          • MUTcreateCartMetafield
          • MUTupdateCartMetafield
          • MUTdeleteCartMetafield
          • MUTcreateCartRedirectUrls
          • MUTcreateCheckout
          • MUTupdateCheckout
          • MUTaddCheckoutBillingAddress
          • MUTupdateCheckoutBillingAddress
          • MUTupdateCheckoutCustomerMessage
          • MUTselectCheckoutShippingOption
          • MUTapplyCheckoutCoupon
          • MUTunapplyCheckoutCoupon
          • MUTapplyCheckoutGiftCertificate
          • MUTunapplyCheckoutGiftCertificate
          • MUTapplyCheckoutSpamProtection
          • MUTaddCheckoutShippingConsignments
          • MUTupdateCheckoutShippingConsignment
          • MUTdeleteCheckoutConsignment
          • MUTcompleteCheckout
          • MUTlogin
          • MUTlogout
          • MUTcreateWishlist
          • MUTaddWishlistItems
          • MUTdeleteWishlistItems
          • MUTupdateWishlist
          • MUTdeleteWishlists
          • MUTloginWithCustomerLoginJwt
          • MUTsubmitContactUs
          • MUTgenerateSessionSyncJwt
          • MUTvalidateSessionSyncJwt
          • MUTproductViewedEvent
          • MUTpageViewedEvent
          • MUTvisitStartedEvent
          • MUTsearchProductEvent
          • MUTpreviewGiftCertificate
          • MUTregisterCompany
          • MUTaddProductReview
          • MUTchangePassword
          • MUTrequestResetPassword
          • MUTresetPassword
          • MUTregisterCustomer
          • MUTupdateCustomer
          • MUTaddCustomerAddress
          • MUTupdateCustomerAddress
          • MUTdeleteCustomerAddress
          • MUTpayment
          • MUTsubscribe
          • MUTunsubscribe
  • MCP
    • Overview
Dev Portal
LogoLogo
GraphQLStorefrontMutations

addCustomerAddress

Example Query
1mutation ExampleMutation($reCaptchaV2: ReCaptchaV2Input, $input: AddCustomerAddressInput) {
2 addCustomerAddress(reCaptchaV2: $reCaptchaV2, input: $input) {
3 address {
4 entityId
5 firstName
6 lastName
7 address1
8 address2
9 addressType
10 city
11 country
12 countryId
13 countryCode
14 }
15 errors
16 }
17}
Variables
1{
2 "reCaptchaV2": {
3 "token": "example"
4 },
5 "input": {
6 "firstName": "example",
7 "lastName": "example",
8 "address1": "example",
9 "address2": "example",
10 "city": "example",
11 "company": "example",
12 "countryCode": "example",
13 "stateOrProvince": "example",
14 "phone": "example",
15 "postalCode": "example"
16 }
17}
Example response
1{
2 "data": {
3 "addCustomerAddress": {
4 "address": {
5 "entityId": 0,
6 "firstName": "example",
7 "lastName": "example",
8 "address1": "example",
9 "address2": "example",
10 "addressType": "COMMERCIAL",
11 "city": "example",
12 "country": "example",
13 "countryId": 0,
14 "countryCode": "example"
15 },
16 "errors": [
17 {
18 "message": "example"
19 }
20 ]
21 }
22 }
23}
Submit a customer address.
Was this page helpful?
Previous

updateCustomer

Next

updateCustomerAddress

Built with

Arguments

reCaptchaV2ReCaptchaV2InputOptional
Recaptcha token.
inputAddCustomerAddressInputRequired
Input for adding a customer address.

Returns

an AddCustomerAddressResult
errorslist of AddCustomerAddressErrors
List of response errors when attempting to submit an address.
addressCustomerAddress
Customer address that was created.