getCustomer()

Returns data about customer identified by given token.

Parameters:

Name Type Description
customerToken string Token that identifies the customer (see Must know about API).
- required parameter

Request:

    {
    "method": "getCustomer",
    "params": {
    "customerToken": "VIJYHWzJEP4mt1DZThD7DV_FinBG0Yo3Q9oHfCFAjqA22jXP"
    },
    "jsonrpc": "2.0",
    "id": 1
    }

Response:

    {
    "result": {
    "id": "761790883",
    "displayName": "John Doe",
    "firstName": "John",
    "lastName": "Doe",
    "currency": "USD",
    "locale": "en_US",
    "country": "US"
    },
    "id": "1",
    "error": null,
    "jsonrpc": "2.0"
    }

Example:

<?php
    $cleengApi =  new Cleeng_Api();

    $customerInfo = $cleengApi->getCustomer();

    echo $customerInfo->displayName;

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

Back to Customer API