Skip to content

Magento - Create Customer

This module allows creating customers in Magento 2 with personal information and billing/shipping addresses.

FieldTypeRequiredDescription
credentials_idstringYesCredentials ID
emailstringYesCustomer email
firstnamestringYesFirst name
lastnamestringYesLast name
passwordstringNoPassword
group_idnumberNoGroup ID (default: 1)
website_idnumberNoWebsite ID (default: 1)
store_idnumberNoStore ID (default: 1)
genderstringNo1=Male, 2=Female
dobstringNoDate of birth
taxvatstringNoTax ID
billing_*stringNoBilling fields
shipping_*stringNoShipping fields
FieldDescription
store_urlMagento store base URL (e.g.: https://mystore.com)
access_tokenIntegration access token with customer write permissions
{
"success": true,
"customer": {},
"customer_id": 123,
"email": "cliente@ejemplo.com",
"message": "Customer \"cliente@ejemplo.com\" created successfully with ID 123"
}
{
"credentials_id": "magento_tienda",
"email": "nuevo@cliente.com",
"firstname": "Juan",
"lastname": "Garcia"
}
{
"credentials_id": "magento_tienda",
"email": "cliente@ejemplo.com",
"firstname": "Pedro",
"lastname": "Martinez",
"billing_street": "Calle Mayor 123",
"billing_city": "Madrid",
"billing_region": "Madrid",
"billing_postcode": "28001",
"billing_country": "ES",
"billing_telephone": "+34600123456"
}
{
"credentials_id": "magento_tienda",
"email": "empresa@mayorista.com",
"firstname": "Carlos",
"lastname": "Empresa S.L.",
"group_id": 2,
"taxvat": "B12345678"
}
  • The email must be unique
  • If no password is specified, the customer will not be able to log in
  • Country codes are ISO 2-letter (ES, MX, US, etc.)
  • Regions must match those configured in Magento
  • MagentoGetCustomers - Get existing customers
  • MagentoUpdateCustomer - Update customer information
  • MagentoGetOrders - Get customer orders