Earn
Activate Earn
Activates earn for a user, so their balance starts generating yield. Earn must be enabled for your client.
Request
| Field | Type | Required | Description |
|---|---|---|---|
| Authorization | Header | Yes | Bearer <access_token> obtained from POST /api/v1/client/token. |
| user_id | Path | Yes | Identifier of the user. |
Response
| Field | Description |
|---|---|
| id | Identifier of the user’s earn account. |
| status | Status of the account. |
| earnEnabled | Whether earn is active for the user. |
| accumulatedEarnings | Earnings accumulated so far, or null. |
| annualRateLabel | Annual rate shown to the user or null. |
| registerDate | Creation date of the account. |
Errors
| Status | When |
|---|---|
| 404 | The user does not exist. |
| 500 | Earn is not enabled for your client (APPLICATION_ERROR, message Earn is not enabled for this client). |
PATCH
/
api
/
v1
/
admin
/
earn
/
activate
/
{user_id}
Activate Earn
curl --request PATCH \
--url https://test-api-kore.kravata.co/api/v1/admin/earn/activate/{user_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://test-api-kore.kravata.co/api/v1/admin/earn/activate/{user_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.patch(url, headers=headers)
print(response.text)const options = {method: 'PATCH', headers: {Authorization: 'Bearer <token>'}};
fetch('https://test-api-kore.kravata.co/api/v1/admin/earn/activate/{user_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://test-api-kore.kravata.co/api/v1/admin/earn/activate/{user_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://test-api-kore.kravata.co/api/v1/admin/earn/activate/{user_id}"
req, _ := http.NewRequest("PATCH", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://test-api-kore.kravata.co/api/v1/admin/earn/activate/{user_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://test-api-kore.kravata.co/api/v1/admin/earn/activate/{user_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "9f1c2b3a-4d5e-4f60-8a7b-1c2d3e4f5a6b",
"status": "APPROVED",
"registerDate": "2026-09-01T10:00:00",
"earnEnabled": true,
"accumulatedEarnings": 1520.35,
"annualRateLabel": "<annual rate label>"
}Activate Earn
curl --request PATCH \
--url https://test-api-kore.kravata.co/api/v1/admin/earn/activate/{user_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://test-api-kore.kravata.co/api/v1/admin/earn/activate/{user_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.patch(url, headers=headers)
print(response.text)const options = {method: 'PATCH', headers: {Authorization: 'Bearer <token>'}};
fetch('https://test-api-kore.kravata.co/api/v1/admin/earn/activate/{user_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://test-api-kore.kravata.co/api/v1/admin/earn/activate/{user_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://test-api-kore.kravata.co/api/v1/admin/earn/activate/{user_id}"
req, _ := http.NewRequest("PATCH", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://test-api-kore.kravata.co/api/v1/admin/earn/activate/{user_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://test-api-kore.kravata.co/api/v1/admin/earn/activate/{user_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "9f1c2b3a-4d5e-4f60-8a7b-1c2d3e4f5a6b",
"status": "APPROVED",
"registerDate": "2026-09-01T10:00:00",
"earnEnabled": true,
"accumulatedEarnings": 1520.35,
"annualRateLabel": "<annual rate label>"
}
