Activate User's Cashback Account
POSThttps://api.cleverhub.co/api/v2/cashbacks/activate
Activates a user to be eligible for receiving and withdrawing cashback through cashback campaigns. This endpoint validates the existence of the user and registers them for cashback activities. Required fields include user_id
, first_name
, and last_name
. Optional fields like email
and phone
help in user identification and communication.
Request
- application/json
Bodyrequired
The unique user ID provided by the merchant. This ID is used to identify the user in all cashback transactions.
user_123
The user's phone number in international format (e.g., "+61412345678").
+61412345678
The user's email address, used for notifications and identification.
user@example.com
The user's first name.
John
The user's last name.
Doe
Responses
- 200
- 400
- 401
User activated successfully.
- application/json
- Schema
- Example (auto)
Schema
The unique user ID assigned by the merchant.
8GAVZZKTI3
The unique identifier of the site associated with the user.
3BAVFJ6H
The user's first name.
John
The user's last name.
Doe
The user's email address.
example@gmail.com
The user's phone number.
+61412345678
The timestamp when the user was created in the cashback system.
2024-11-06T16:39:48.264Z
The timestamp when the user's information was last updated.
2024-11-06T16:39:48.264Z
{
"user_id": "8GAVZZKTI3",
"site_id": "3BAVFJ6H",
"first_name": "John",
"last_name": "Doe",
"email": "example@gmail.com",
"phone": "+61412345678",
"created_at": "2024-11-06T16:39:48.264Z",
"updated_at": "2024-11-06T16:39:48.264Z"
}
Bad Request
Unauthorized
Authorization: app-id
name: app-idtype: apiKeyin: headerdescription: A unique identifier assigned to each application.
name: secret-keytype: apiKeyin: headerdescription: A secure token associated with the `app-id`.
- csharp
- curl
- dart
- go
- http
- java
- javascript
- kotlin
- c
- nodejs
- objective-c
- ocaml
- php
- powershell
- python
- r
- ruby
- rust
- shell
- swift
- HTTPCLIENT
- RESTSHARP
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://api.cleverhub.co/api/v2/cashbacks/activate");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("app-id", "<app-id>");
request.Headers.Add("secret-key", "<app-id>");
var content = new StringContent("{\n \"user_id\": \"user_123\",\n \"phone\": \"+61412345678\",\n \"email\": \"user@example.com\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\"\n}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());