Search of customers [Private]

This endpoint allows you to search for customers.

Method name:/v2/customer/find
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
emailstringBODYNO-Customer email.
walletIdstringBODYNO-Unique identifier of customer wallet in KunaCore.
phoneNumberstringBODYNO-Customer's phone number.
fullNamestringBODYNO-Full name of the client in format "{firstName} {lastName}".
commentstringBODYNO-Additional comment about the customer.
externalIdstringBODYNO-Any string that identify client in your system.
referralIdstringBODYNO-For referral program, if supported. ID of another customer
createdFromstringBODYNO-ISO 8601 date string. Search records by field “createdAt” that were created after this date.
createdTostringBODYNO-ISO 8601 date string. Search records by field “createdAt” that were created before this date.
takeintBODYNO-Number of records to take.
skipintBODYNO-Number of records to skip.

Exemplary request

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

const body = {
  email: "[email protected]",
  fullName: "Alexander Smith"
};

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/find"
headers = {
    "accept": "application/json",
    "Content-Type": "application/json",
    "Authorization": "Bearer " + data.accessToken # data.accessToken - generated a JWT token via /v2/auth/login.
}
body = {
    "email": "[email protected]",
    "fullName": "Alexander Smith"
}

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
  }
}