Disable customer via API

Hello,

Is there a way to update customer state to disabled? Either via REST or Graphql. The docs do state that the state field is read-only so I assume so not possible, but still wanted to check here if there is any update or roadmap of adding this functionality?

Thanks!

To stop the customer from logging in, from checking out, or both ? just curious to know

Hi @ells-t , Yes, customer state is a read only value in REST(docs) but you should be able to get there by trying this, a HTTP Post to customers.json.

{
	"customer": {
		"first_name": "Steve",
		"last_name": "Lastnsameson",
		"email": "coolemail@email.com",
		"phone": "+15149146011",
		"verified_email": true,
		"addresses": [
			{
				"address1": "123 Oak St",
				"city": "Ottawa",
				"province": "ON",
				"phone": "555-1212",
				"zip": "123 ABC",
				"last_name": "Lastnameson",
				"first_name": "Mother",
				"country": "CA"
			}
		],
		"password": "newpass",
		"password_confirmation": "newpass",
		"send_email_welcome": false
	}
}

This workaround will return a customer with an enabled state. Hope that helps!