Create Customer
This API offering to Create Customer.
POST {{Base_url}}/rest/V1/customers
This endpoint is used to create a new customer account in a Magento store. It allows administrators or third-party integrations to programmatically add customers. They can gain access to several features and benefits that enhance their shopping experience.
Body
{
"customer": {
"group_id": 1,
"created_in": "ZEPP Store view",
"email": "xyz@gmail.com",
"firstname": "xyz",
"lastname": "test",
"store_id": 1,
"website_id": 1,
"custom_attributes": [
{
"attribute_code": "mobile_number",
"value": "1234567890"
}
]
},
"password": "xyz@123"
}Root-Level Attributes
customerContains all the details about the customer being created. It is an object encapsulating customer-specific fields.
passwordThe password for the customer's account, used for login purposes.
Attributes within customer
customergroup_idThe ID of the customer group to which the customer belongs (e.g., General, Wholesale, or Retail).
created_inThe name of the store view where the account was created.
emailThe customer's email address, used as the login username.
firstnameThe first name of the customer.
lastnameThe last name of the customer.
store_idThe ID of the store view associated with the customer.
website_idThe ID of the website where the customer account is being created.
custom_attributesAn array of custom attributes specific to the customer. Each custom attribute is represented as an object.
Attributes within custom_attributes
custom_attributesattribute_codeThe code of the custom attribute being set (e.g.,
mobile_number).
valueThe value assigned to the corresponding custom attribute (e.g.,
1234567890formobile_number).
Responses
idThe unique identifier of the customer in Magento (primary key for the customer record).
group_idThe ID of the customer group. This determines the customer's pricing and tax rules (e.g., General, Wholesale).
created_atThe timestamp when the customer account was created (
YYYY-MM-DD HH:MM:SSformat).
updated_atThe timestamp of the last update made to the customer account (
YYYY-MM-DD HH:MM:SSformat).
created_inThe name of the store view where the customer account was created (e.g., "Default Store View").
emailThe email address associated with the customer account, used as their login username.
firstnameThe first name of the customer.
lastnameThe last name of the customer.
store_idThe ID of the store view to which the customer is associated.
website_id
The ID of the website where the customer account is registered.
addresses
An empty array because the customer currently has no saved addresses.
disable_auto_group_change
A flag that indicates whether the customer can be automatically moved to another group.
Value
0: Auto-group change is allowed.Value
1: Auto-group change is disabled.
Extension Attributes
is_subscribedA boolean flag indicating whether the customer is subscribed to the newsletter.
false: The customer is not subscribed.
Custom Attributes
The custom_attributes array contains custom fields for the customer.
attribute_codeThe code of the custom attribute (e.g.,
mobile_number).
valueThe value of the custom attribute (e.g.,
1234567890).
Last updated