updateCustomerEmail()

Customer has to be created using prepareRemoteAuth method.

Info: Enterprise account required. Contact us if you're interested about opening Enterprise account.

Parameters:

Name Type Description
publisherToken string Enterprise account required
customerEmail string Current customer email
newEmail string New customer email
- required parameter

Request:

    [
    {
    "method": "updateCustomerEmail",
    "params": {
    "publisherToken": "Xlrx-SjTLVMCsaRsOf2q2hvWKOlrF57yHknDRRRMX-13Fz-x ",
    "customerEmail": "some@email.com",
    "newEmail": "some-other@email.com"
    },
    "jsonrpc": "2.0",
    "id": 1
    }
    ]

Response:

    [
    {
    "result": {
    "success": true
    },
    "id": "1",
    "error": null,
    "jsonrpc": "2.0"
    }
    ]

Example:

<?php
    $customerEmail = 'current@email.com';
    $newCustomerEmail = 'new@email.com';

    $cleengApi = new Cleeng_Api();
    $cleengApi->setPublisherToken('VIJYHWzJEP4mt1DZThD7DV_FinBG0Yo3Q9oHfCFAjqA22jXP');//enterprise account required

    $cleengApi->updateCustomerEmail($customerEmail, $newCustomerEmail);
    

Remember! you can always check it by yourself using API Console - updateCustomerEmail()

Back to Customer API