Update customer [Private]
This endpoint allows you to change or add customer information.
Method name: | /v2/customer/update |
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.
To update a customer, you need to specify the ID of the customer whose data needs to be updated, along with the values for the fields that have changed (the fields are the same as those used when the customer was created). You can update any data except for the customer ID and wallet ID.
It is important to note that this endpoint allows for changing the status of a user's wallet. The statuses that can be set are Active, Blocked, and Suspicious. Additionally, it should be noted that the institution (partner) cannot change the status types Blocked or Suspicious to any other statuses if they were set by Kuna.
Data dictionary
Name | Type | Parameter type | Required | Range | Description |
---|---|---|---|---|---|
id | string | BODY | YES | - | Unique customer identifier in KunaCore system. |
string | BODY | NO | - | Customer email. It must be unique for each customer. | |
phoneNumber | string | BODY | NO | - | Customer's phone number. |
firstName | string | BODY | NO | - | Customer's name. |
lastName | string | BODY | NO | - | Customer's surname. |
comment | string | BODY | NO | - | Additional comment about the customer. |
externalId | string | BODY | NO | - | Any string that identify the customer in your system. |
country | string | BODY | NO | UA, IT, ES, FR, etc. | Customer's country. (Country code in ISO 3166-1 Alfa2, e.g. UA - Ukraine, IT - Italy). |
verificationDocumentId | string | BODY | NO | - | ID of the document that was used by the client for the verification process (passport, driver's license, etc.) |
residenceAddress | string | BODY | NO | - | Customer's residential address. |
itn | string | BODY | NO | - | Individual taxpayer number of the customer. |
Exemplary request
const url = BASE_URL;
const path = "/v2/customer/update";
const body = {
id: "d0eab186-19f1-446f-8b9e-739945941b89",
email: "[email protected]",
firstName: "Alexander"
};
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/update"
headers = {
"accept": "application/json",
"Content-Type": "application/json",
"Authorization": "Bearer " + data.accessToken # data.accessToken - generated a JWT token via /v2/auth/login.
}
body = {
"id": "d0eab186-19f1-446f-8b9e-739945941b89",
"email": "[email protected]",
"firstName": "Alexander"
}
request = requests.post(url + path, headers=headers, json=body)
print(request.json())
How to call private endpoints 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
}
}
Updated 3 months ago