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

updateCustomer

Example Query
1mutation ExampleMutation($reCaptchaV2: ReCaptchaV2Input, $input: UpdateCustomerInput) {
2 updateCustomer(reCaptchaV2: $reCaptchaV2, input: $input) {
3 customer {
4 entityId
5 company
6 customerGroupId
7 customerGroupName
8 email
9 firstName
10 lastName
11 notes
12 phone
13 taxExemptCategory
14 }
15 errors
16 }
17}
Variables
1{
2 "reCaptchaV2": {
3 "token": "example"
4 },
5 "input": {
6 "firstName": "example",
7 "lastName": "example",
8 "email": "example",
9 "phone": "example",
10 "company": "example",
11 "formFields": {
12 "checkboxes": [
13 {
14 "fieldEntityId": 0,
15 "fieldValueEntityIds": [
16 0
17 ]
18 }
19 ],
20 "multipleChoices": [
21 {
22 "fieldEntityId": 0,
23 "fieldValueEntityId": 0
24 }
25 ],
26 "numbers": [
27 {
28 "fieldEntityId": 0,
29 "number": 0
30 }
31 ],
32 "dates": [
33 {
34 "fieldEntityId": 0,
35 "date": "DateTime"
36 }
37 ],
38 "texts": [
39 {
40 "fieldEntityId": 0,
41 "text": "example"
42 }
43 ],
44 "multilineTexts": [
45 {
46 "fieldEntityId": 0,
47 "multilineText": "example"
48 }
49 ],
50 "passwords": [
51 {
52 "fieldEntityId": 0,
53 "password": "example"
54 }
55 ]
56 }
57 }
58}
Example response
1{
2 "data": {
3 "updateCustomer": {
4 "customer": {
5 "entityId": 0,
6 "company": "example",
7 "customerGroupId": 0,
8 "customerGroupName": "example",
9 "email": "example",
10 "firstName": "example",
11 "lastName": "example",
12 "notes": "example",
13 "phone": "example",
14 "taxExemptCategory": "example"
15 },
16 "errors": [
17 {
18 "message": "example"
19 }
20 ]
21 }
22 }
23}
Update a customer.
Was this page helpful?
Previous

registerCustomer

Next

addCustomerAddress

Built with

Arguments

reCaptchaV2ReCaptchaV2InputOptional
Recaptcha token.
inputUpdateCustomerInputRequired
Input for the customer update operation.

Returns

an UpdateCustomerResult
errorslist of UpdateCustomerErrors
The errors, if any, that occured during the update operation.
customerCustomer
The customer that was updated.