Customers > Customers > customersModify
Commerce APICustomersCustomerscustomersModify
customersModify
POST:customers.json

Description

Modify one or multiple customers.

Permission bit: "customers.modify"

Topic: Customers

Arguments

data: [CustomerModify!]!

Main argument for mutations.


ids: [String!]!

List of customer ids. See also: Unique Identifiers

Example: ["cu_EQzGqWoY"]


shop_id: String!

Unique shop identifier. See also: Unique Identifiers

Example: "sh_EQzGqWoY"


Data Argument Fields

accepts_marketing: Boolean

Indicates whether the customer has consented to be sent marketing material via email

Example: false


addresses: [AddressCreate!]


customer_group_id: String

Customer group id, can only be set by shop admins

Example: "cg_EQzGqWoY"

Valid when: customer_group_id matches regexp pattern: ^cg_


default_billing_address_id: String

Default billing address index

Example: "ad_EQzGqWoY"


default_payment_source_id: String

Default stripe payment source id

Example: "card_1Ak9dNDVveQRXOWz2ZFPd73P"


default_shipping_address_id: String

Default shipping address index

Example: "ad_EQzGqWoY"


display_name: String

The name to display for other customers (under product reviews and such)

Example: "John S."

Valid when: display_name's length doesn't exceed 250 characters


email_confirmed: Boolean

Whether customer's email address was confirmed or not

Example: false


is_disposable_email: Boolean

Whether or not customer's email address looks suspicious (fraud)

Example: false


language: String

Preferred language of the customer


metadata: [KeyValueCreate!]


mobile: String

The mobile phone number of the customer (used for notifications)

Example: "45634634562"


mobile_notifications: Boolean

Whether to notify customer via mobile phone or not

Example: false


name: String

Name of the customer

Example: "John Smith"

Valid when: name is not empty

Valid when: name's length doesn't exceed 250 characters


preferred_currency: String

Currency customer prefers

Example: "USD"


reminder_messages: Boolean

Indicates whether the customer desires to get reminder emails

Example: false


tags: [String!]

Customer tags (can be used for organization)


tax_exempt: Boolean

Marks customer as tax-exempt, customer will not be charged any taxes

Example: false


timezone: String

Name of the time zone the customer is in

Example: "(GMT-05:00) Eastern Time"

Valid when: timezone's length doesn't exceed 50 characters


Result

[Customer!]

Preview (typescript)

Loading module