> For the complete documentation index, see [llms.txt](https://the-wishlist-documentation.gitbook.io/the-wishlist-documentation-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://the-wishlist-documentation.gitbook.io/the-wishlist-documentation-docs/customer-rest-api/customers/updatecustomer.md).

# updateCustomer

Update a customer using either the TWC customer identifier, ***customerId*** or the retailer’s ***customerRef***.

```json
{"openapi":"3.0.3","info":{"title":"Customer REST API","version":"0.0.1"},"tags":[{"name":"customers","description":"Create, read, update and delete customers, and look them up by id, reference, email or alternate reference."}],"servers":[{"url":"https://api.au-aws.thewishlist.io/services/customerservice"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","scheme":"bearer","description":"OAuth2 bearer token issued by TWC Keycloak, sent as `Bearer <token>`."}},"parameters":{"customerId":{"name":"customerId","in":"query","required":false,"description":"TWC's unique customer identifier","schema":{"type":"string"}},"customerRef-2":{"name":"customerRef","in":"query","required":false,"description":"The retailer's internal customer identifier.  For Shopify customers this is the Shopify customer identifier.","schema":{"type":"string"}},"X-TWC-Tenant":{"name":"X-TWC-Tenant","in":"header","required":false,"description":"tenant-key (your retail store's unique identifier in TWC)","schema":{"type":"string"}}},"schemas":{"CustomerDto":{"type":"object","properties":{"accepts_marketing":{"type":"boolean"},"active":{"type":"boolean"},"addresses":{"type":"array","items":{"$ref":"#/components/schemas/AddressDto"}},"alternateCustomerRef":{"type":"string"},"attributeGroups":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/AttributeGroupDto"}},"averageSpendPerAnnum":{"type":"string"},"createdDate":{"type":"string","format":"date-time"},"customerRef":{"type":"string"},"customer_state":{"type":"string","enum":["disabled","invited","enabled","declined"]},"defaultAddress":{"$ref":"#/components/schemas/AddressDto"},"dob":{"type":"string","pattern":"^\\d{1,2}-\\d{1,2}-\\d{4}$"},"email":{"type":"string"},"firstName":{"type":"string","description":"first_name"},"id":{"type":"string"},"initials":{"type":"string"},"jobTitle":{"type":"string"},"joinedStoreId":{"type":"string"},"joinedStoreName":{"type":"string"},"lastModifiedDate":{"type":"string","format":"date-time"},"lastName":{"type":"string","description":"last_name"},"lastOrder":{"type":"string","format":"date-time"},"lastOrderDate":{"type":"string"},"lastOrderRef":{"type":"string"},"lifetimeOrderValue":{"type":"string"},"location":{"type":"string","description":"location"},"loyaltyTier":{"type":"string"},"marketing_optin_level":{"type":"string","enum":["single_opt_in","confirmed_opt_in","unknown"]},"marketing_preferences_updated_at":{"type":"string","format":"date-time"},"memberSince":{"type":"string"},"mobile":{"type":"string"},"optin_preferences":{"$ref":"#/components/schemas/OptinPreferencesDto"},"phone":{"type":"string"},"preferredStore":{"type":"string"},"privacy":{"type":"boolean"},"running12monthSpend":{"type":"number"},"sex":{"type":"string"},"spendToNextTier":{"type":"string"},"taxExempt":{"type":"boolean","description":"tax_exempt"},"taxExemptions":{"type":"array","description":"tax_exemptions","items":{"type":"string"}},"title":{"type":"string"},"totalOrders":{"type":"string"},"totalSpend":{"type":"number"},"verified_email":{"type":"boolean"},"vipStatus":{"type":"boolean"},"work":{"type":"string"}},"title":"CustomerDto"},"AddressDto":{"type":"object","properties":{"address1":{"type":"string"},"address2":{"type":"string"},"addressName":{"type":"string"},"city":{"type":"string"},"company":{"type":"string"},"country":{"type":"string"},"countryCode":{"type":"string"},"defaultAddress":{"type":"boolean","description":"default_address"},"email":{"type":"string"},"firstName":{"type":"string"},"id":{"type":"string"},"lastName":{"type":"string"},"phone":{"type":"string"},"postcode":{"type":"string"},"province":{"type":"string"},"provinceCode":{"type":"string"}},"title":"AddressDto"},"AttributeGroupDto":{"type":"object","properties":{"attributes":{"type":"object","additionalProperties":{"type":"string"}},"description":{"type":"string"}},"title":"AttributeGroupDto"},"OptinPreferencesDto":{"type":"object","properties":{"email":{"$ref":"#/components/schemas/OptinValuesDto"},"sms":{"$ref":"#/components/schemas/OptinValuesDto"}},"title":"OptinPreferencesDto"},"OptinValuesDto":{"type":"object","properties":{"opt_in_active":{"type":"boolean"},"opt_in_updated_at":{"type":"string","format":"date-time"},"opted_in_at":{"type":"string","format":"date-time"}},"title":"OptinValuesDto"}}},"paths":{"/api/v2/customers":{"put":{"summary":"updateCustomer","operationId":"updateCustomerUsingPUT","parameters":[{"$ref":"#/components/parameters/customerId"},{"$ref":"#/components/parameters/customerRef-2"},{"$ref":"#/components/parameters/X-TWC-Tenant"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"addresses":{"type":"array","items":{"type":"object","properties":{"address1":{"type":"string"},"address2":{"type":"string"},"addressName":{"type":"string"},"city":{"type":"string"},"company":{"type":"string"},"country":{"type":"string"},"countryCode":{"type":"string"},"defaultAddress":{"type":"boolean"},"email":{"type":"string"},"firstName":{"type":"string"},"id":{"type":"string"},"lastName":{"type":"string"},"phone":{"type":"string"},"postcode":{"type":"string"},"province":{"type":"string"},"provinceCode":{"type":"string"}}}},"alternateCustomerRef":{"type":"string"},"attributeGroups":{"type":"object","properties":{"property1":{"type":"object","properties":{"attributes":{"type":"object","properties":{"property1":{"type":"string"},"property2":{"type":"string"}}},"description":{"type":"string"}}},"property2":{"type":"object","properties":{"attributes":{"type":"object","properties":{"property1":{"type":"string"},"property2":{"type":"string"}}},"description":{"type":"string"}}}}},"customerRef":{"type":"string"},"dob":{"type":"string"},"email":{"type":"string"},"firstName":{"type":"string"},"id":{"type":"string"},"joinedStoreId":{"type":"string"},"joinedStoreName":{"type":"string"},"lastName":{"type":"string"},"loyaltyTier":{"type":"string"},"memberSince":{"type":"string"},"mobile":{"type":"string"},"optin_preferences":{"type":"object","properties":{"email":{"type":"object","properties":{"opt_in_active":{"type":"boolean"},"opt_in_updated_at":{"type":"string"},"opted_in_at":{"type":"string"}}},"sms":{"type":"object","properties":{"opt_in_active":{"type":"boolean"},"opt_in_updated_at":{"type":"string"},"opted_in_at":{"type":"string"}}}}},"phone":{"type":"string"},"preferredStore":{"type":"string"},"spendToNextTier":{"type":"string"},"vipStatus":{"type":"boolean"}}}}},"description":"customer","required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CustomerDto"}}}},"201":{"description":"Created"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}},"deprecated":false,"description":"Update a customer using either the TWC customer identifier, ***customerId*** or the retailer’s ***customerRef***.","tags":["customers"]}}}}
```
