Details of customer [Private]

The endpoint allows you to get complete information about the customer on the KunaCore side, having only its KunaCore ID. The ID is assigned when the customer is created.

Method name:/v2/customer/details
Request type:POST

📘

To call private endpoints, you need to get a JWT token or an API key for authentication.

Here you can learn in detail how to successfully authenticate.

Data dictionary

NameTypeParameter typeRequiredRangeDescription
idstringBODYNO-Customer ID.

Exemplary request

const url = BASE_URL;
const path = "/v2/customer/details";

const body = {
  id: "6d962783-f0cf-420d-a511-3a48c71c5595",
};

const options = {
  method: "POST",
  headers: {
    accept: "application/json",
    "Content-Type": "application/json",
    "Authorization": `Bearer ${data.accessToken}` // data.accessToken - generated a JWT token via /v2/auth/login.
  },
  body: JSON.stringify(body),
};

fetch(url + path, options)
  .then((response) => response.json())
  .then((showResponse) => console.log(showResponse.data));
import requests

url = BASE_URL
path = "/v2/customer/details"
headers = {
    "accept": "application/json",
    "Content-Type": "application/json",
    "Authorization": "Bearer " + data.accessToken # data.accessToken - generated a JWT token via /v2/auth/login.
}
body = {
    "id": "6d962783-f0cf-420d-a511-3a48c71c5595"
}

request = requests.post(url + path, headers=headers, json=body)
print(request.json())

How to call private endpoints here

Swagger here

Response

{
  "data": {
    "id": "6d962783-f0cf-420d-a511-3a48c71c5595",                      // Customer’s ID
    "comment": null,                                                   // Note for the customer  account
    "createdAt": "2024-02-26T16:36:14.499Z",                           // Account creation date
    "email": "[email protected]",                                     // Customer’s email
    "firstName": "Alex",                                               // Customer’s name
    "lastName": "Smith",                                               // Customer’s surname
    "phoneNumber": "+380991234567",                                    // Customer’s phone number
    "externalId": null,                                                // Customer’s external ID
    "walletId": "6d962783-f0cf-420d-a511-3a48c71c5595",                // Customer’s wallet ID
    "referralId": "1f44b1c7-9fd4-4d20-b9a4-7aca3646d0d5"               // External ID of the referral account
  }
}