Magento 1.x Software Support Notice

For Magento Commerce 1, Magento is providing software support through June 2020. Depending on your Magento Commerce 1 version, software support may include both quality fixes and security patches. Please review our Magento Software Lifecycle Policy to see how your version of Magento Commerce 1 is supported.

For Magento Open Source 1.5 to 1.9, Magento is providing software security patches through June 2020 to ensure those sites remain secure and compliant. Visit our information page for more details about our software maintenance policy and other considerations for your business.


Edit this page on GitHub

Module: Mage_Customer

The Mage_Customer module allows you to create, retrieve, update, and delete customers and customer addresses.


Allows you to create, retrieve, update, and delete data about customers.

Resource Name: customer



Fault Code Fault Message
100 Invalid customer data. Details in error message.
101 Invalid filters specified. Details in error message.
102 Customer does not exist.
103 Customer not deleted. Details in error message.


Example 1. View, create, update, and delete a customer
$proxy = new SoapClient('http://magentohost/api/soap/?wsdl');

$newCustomer = array(
    'firstname'  => 'First',
    'lastname'   => 'Last',
    'email'      => 'test@example.com',
    //for my version of magento ( you SHOULD NOT
    // hash the password, as in:
    // 'password_hash' => 'password'
    'password_hash'   => md5('password'),
    // password hash can be either regular or salted md5:
    // $hash = md5($password);
    // $hash = md5($salt.$password).':'.$salt;
    // both variants are valid
    'store_id'   => 0,
    'website_id' => 0

$newCustomerId = $proxy->call($sessionId, 'customer.create', array($newCustomer));

// Get new customer info
var_dump($proxy->call($sessionId, 'customer.info', $newCustomerId));

// Update customer
$update = array('firstname'=>'Changed Firstname');
$proxy->call($sessionId, 'customer.update', array($newCustomerId, $update));

var_dump($proxy->call($sessionId, 'customer.info', $newCustomerId));

// Delete customer
$proxy->call($sessionId, 'customer.delete', $newCustomerId);

Customer Groups

Allows you to retrieve the customer groups.

Resource Name: customer_group