BMW APIs
BMW APIs is fully integrated with the WordPress REST API. This allows Binary MLM WooCommerce interact with your WordPress site by sending and receiving data as JSON (JavaScript Object Notation) objects. Using the Binary MLM WooCommerce REST API you can create users, withdrawals and it provides data access to the content of Binary users like which is publicly accessible via the REST API. while private content, password-protected content, payout details, commissions details, withdrawal details and user's personal data is only available with authentication.
Request/Response format
APIs response format is JSON. Requests contains the status, errors, message and data keys. Successful requests will return a true status.
Example
{
"status": true,
"errors": [],
"message": "",
"user": {
"ID": "33",
"user_login": "user1",
"user_nicename": "user1",
}
}
Pagination
You may also specify the offset from the first resource using the ?start=&limit=
parameter:
GET /downliners?start=5&limit=10
BMW user login API
The login user API allow you to login user and generate the token which is Encoded by JWT Authentication RS256 Encryption method.
Here {{site_url}}
will be your website url ex. https://xyz.com
, and /wp-json/letscms/v1
is a start url of our APIs, this will be used in all APIs related to BMW REST APIs.
POST: {{site_url}}/wp-json/letscms/v1/auth/login
Parameter | Type | Position | # | Description |
---|---|---|---|---|
username | string |
Body |
Required |
User Name allows only normal strings and numbers, special charactors not allowed in username. |
password | string |
Body |
Required |
Password allows Aa-Zz,0-9,Special charactors. |
Parameter | username |
---|---|
Type | string |
Position | Body |
# | Required |
Description | User Name allows only normal strings and numbers, special charactors not allowed in username. |
Parameter | password |
Type | string |
Position | Body |
# | Required |
Description | Password allows Aa-Zz,0-9,Special charactors. |
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => '{{site_url}}/wp-json/letscms/v1/auth/login',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => array('username' => 'test','password' => '1122'),
CURLOPT_HTTPHEADER => array(
'Cookie: language=en-gb'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var form = new FormData();
form.append("username", "test");
form.append("password", "1122");
var settings = {
"url": "{{site_url}}/wp-json/letscms/v1/auth/login",
"method": "POST",
"timeout": 0,
"headers": {
"Cookie": "language=en-gb; PHPSESSID=h6uv3gqr958jpbuvv2ca6e1dlf"
},
"processData": false,
"mimeType": "multipart/form-data",
"contentType": false,
"data": form
};
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require('request');
var options = {
'method': 'POST',
'url': '{{site_url}}/wp-json/letscms/v1/auth/login',
'headers': {
'Cookie': 'language=en-gb; PHPSESSID=h6uv3gqr958jpbuvv2ca6e1dlf'
},
formData: {
'username': 'test',
'password': '1122'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
url = "{{site_url}}/wp-json/letscms/v1/auth/login"
payload={'username': 'test',
'password': '1122'}
files=[
]
headers = {
'Cookie': 'language=en-gb; PHPSESSID=h6uv3gqr958jpbuvv2ca6e1dlf'
}
response = requests.request("POST", url, headers=headers, data=payload, files=files)
print(response.text)
var client = new RestClient("{{site_url}}/wp-json/letscms/v1/auth/login");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AlwaysMultipartFormData = true;
request.AddParameter("username", "test");
request.AddParameter("password", "1122");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request POST '{{site_url}}/wp-json/letscms/v1/auth/login' \
--form 'username="test"' \
--form 'password="1122"'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = new MultipartBody.Builder().setType(MultipartBody.FORM)
.addFormDataPart("username","test")
.addFormDataPart("password","1122")
.build();
Request request = new Request.Builder()
.url("{{site_url}}/wp-json/letscms/v1/auth/login")
.method("POST", body)
.build();
Response response = client.newCall(request).execute();
require "uri"
require "net/http"
url = URI("{{site_url}}/wp-json/letscms/v1/auth/login")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)
form_data = [['username', 'test'],['password', '1122']]
request.set_form form_data, 'multipart/form-data'
response = http.request(request)
puts response.read_body
Response
{
"status": true,
"errors": [],
"message": "",
"letscms_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.ey....",
"user": {
"ID": "2",
"user_login": "test",
"user_nicename": "test",
"user_email": "test1@test.com",
"user_url": "",
"user_registered": "2021-01-02 06:10:15",
"user_activation_key": "",
"user_status": "0",
"display_name": "test",
"first_name": "",
"last_name": ""
},
"bmw_user": {
"id": "1",
"user_id": "2",
"user_name": "test",
"user_key": "912874503",
"parent_key": "0",
"sponsor_key": "0",
"position": "left",
"qualified_points": "0.000",
"own_points": "0.000",
"left_points": "0.000",
"right_points": "0.000",
"creation_date": "0000-00-00 00:00:00",
"payment_status": "1",
"payment_date": "2021-01-02 06:10:15",
"network_row": "0"
}
}
BMW user register API
The register user API allow you to register user, this will generate the token and give you user personal details. Personal details contains the wp user details and unilvel mlm user related data.
POST: /wp-json/letscms/v1/auth/register
Parameter | Type | Position | # | Description |
---|---|---|---|---|
first_name | string |
Body |
Required |
First name is belongs to user's Name |
last_name | string |
Body |
Required |
Last name is belongs to user's surname |
username | string |
Body |
Required |
username is a unique string, this is allows only Aa-Zz and 0-9 charactors. |
password | string |
Body |
Required |
Password allows Aa-Zz,0-9 and Special charactors. |
string |
Body |
Required |
Each user must have the unique email address same email address not allowed. | |
bmw_user | string |
Body |
Required |
This parameter contains some special data, which is must for be a binary mlm user. Following next parameters are child of bmw_user parameter. |
phone | integer |
Body |
Required |
phone number must be a set of 10 integer values. |
sponsor_name | string |
Body |
Required |
Sponsor name is related to unlivel user whose wants to be a sponsor of this registered user. |
parent_name | string |
Body |
Required |
Parent name is related to binary user whose wants to be a parent of this registered user. According to binary, A user can be a parent of 2 users. |
position | string |
Body |
Required |
New register user can join left or right position of his parent . |
address | string |
Body |
Required |
Address is user's residence location. |
Parameter | first_name |
---|---|
Type | string |
Position | Body |
# | Required |
Description | First name is belongs to user's Name |
Parameter | last_name |
Type | string |
Position | Body |
# | Required |
Description | Last name is belongs to user's surname |
Parameter | username |
Type | string |
Position | Body |
# | Required |
Description | username is a unique string, this is allows only Aa-Zz and 0-9 charactors. |
Parameter | password |
Type | string |
Position | Body |
# | Required |
Description | Password allows Aa-Zz,0-9 and Special charactors. |
Parameter | |
Type | string |
Position | Body |
# | Required |
Description | Each user must have the unique email address same email address not allowed. |
Parameter | umw_user |
Type | string |
Position | Body |
# | Required |
Description | This parameter contains some special data, which is must for be a unilevel mlm user. Following next parameters are child of umw_user parameter. |
Parameter | phone |
Type | number |
Position | Body |
# | Required |
Description | phone number must be a set of 10 integer values. |
Parameter | sponsor_name |
Type | string |
Position | Body |
# | Required |
Description | Sponsor name is related to unlivel user whose wants to be a sponsor of this registered user. |
Parameter | parent_name |
Type | string |
Position | Body |
# | Required |
Description | Parent name is related to unlivel user whose wants to be a parent of this registered user. According to unilevel, A user can be a parent of unlimited users but if admin set the limit of referrals then this will be a parent of limited users. |
Parameter | position |
Type | string |
Position | Body |
# | Required |
Description | New register user can join left or right position of his parent . |
Parameter | address |
Type | string |
Position | Body |
# | Required |
Description | Address is user's residence location. |
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => '{{site_url}}/wp-json/letscms/v1/auth/register',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => array(
'username' => 'test18',
'first_name' => 'test',
'last_name' => '18',
'password' => '11223344',
'email' => 'test18@test.com',
'bmw_user[sponsor_name]' => 'test',
'bmw_user[parent_name]' => 'test14',
'bmw_user[phone]' => '9999999999',
'bmw_user[position]' => 'right',
'bmw_user[address]' => 'abc'),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var form = new FormData();
form.append("username", "test18");
form.append("first_name", "test");
form.append("last_name", "18");
form.append("password", "11223344");
form.append("email", "test18@test.com");
form.append("bmw_user[sponsor_name]", "test");
form.append("bmw_user[parent_name]", "test14");
form.append("bmw_user[phone]", "9999999999");
form.append("bmw_user[position]", "right");
form.append("bmw_user[address]", "abc");
var settings = {
"url": "{{site_url}}/wp-json/letscms/v1/auth/register",
"method": "POST",
"timeout": 0,
"processData": false,
"mimeType": "multipart/form-data",
"contentType": false,
"data": form
};
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require('request');
var options = {
'method': 'POST',
'url': '{{ site_url }}/wp-json/letscms/v1/auth/register',
'headers': {
},
formData: {
'username': 'test18',
'first_name': 'test',
'last_name': '18',
'password': '11223344',
'email': 'test18@test.com',
'bmw_user[sponsor_name]': 'test',
'bmw_user[parent_name]': 'test14',
'bmw_user[phone]': '9999999999',
'bmw_user[position]': 'right',
'bmw_user[address]': 'abc'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
url = "{{site_url}}/wp-json/letscms/v1/auth/register"
payload={'username': 'test18',
'first_name': 'test',
'last_name': '18',
'password': '11223344',
'email': 'test18@test.com',
'bmw_user[sponsor_name]': 'test',
'bmw_user[parent_name]': 'test14',
'bmw_user[phone]': '8868882111',
'bmw_user[position]': 'right',
'bmw_user[address]': 'abc'}
files=[
]
headers = {}
response = requests.request("POST", url, headers=headers, data=payload, files=files)
print(response.text)
var client = new RestClient("{{ site_url }}/wp-json/letscms/v1/auth/register");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AlwaysMultipartFormData = true;
request.AddParameter("username", "test18");
request.AddParameter("first_name", "test");
request.AddParameter("last_name", "18");
request.AddParameter("password", "11223344");
request.AddParameter("email", "test18@test.com");
request.AddParameter("bmw_user[sponsor_name]", "test");
request.AddParameter("bmw_user[parent_name]", "test14");
request.AddParameter("bmw_user[phone]", "9999999999");
request.AddParameter("bmw_user[position]", "right");
request.AddParameter("bmw_user[address]", "abc");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request POST '{{site_url}}/wp-json/letscms/v1/auth/register' \
--form 'username="test18"' \
--form 'first_name="test"' \
--form 'last_name="18"' \
--form 'password="11223344"' \
--form 'email="test18@test.com"' \
--form 'bmw_user[sponsor_name]="test"' \
--form 'bmw_user[parent_name]="test14"' \
--form 'bmw_user[phone]="9999999999"' \
--form 'bmw_user[position]="right"' \
--form 'bmw_user[address]="abc"'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = new MultipartBody.Builder().setType(MultipartBody.FORM)
.addFormDataPart("username","test18")
.addFormDataPart("first_name","test")
.addFormDataPart("last_name","18")
.addFormDataPart("password","11223344")
.addFormDataPart("email","test18@test.com")
.addFormDataPart("bmw_user[sponsor_name]","test")
.addFormDataPart("bmw_user[parent_name]","test14")
.addFormDataPart("bmw_user[phone]","9999999999")
.addFormDataPart("bmw_user[position]","right")
.addFormDataPart("bmw_user[address]","abc")
.build();
Request request = new Request.Builder()
.url("{{site_url}}/wp-json/letscms/v1/auth/register")
.method("POST", body)
.build();
Response response = client.newCall(request).execute();
require "uri"
require "net/http"
url = URI("{{site_url}}/wp-json/letscms/v1/auth/register")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)
form_data = [
['username', 'test18'],['first_name', 'test'],['last_name', '18'],['password', '11223344'],['email', 'test18@test.com'],['bmw_user[sponsor_name]', 'test'],['bmw_user[parent_name]', 'test14'],['bmw_user[phone]', '9999999999'],['bmw_user[position]', 'right'],['bmw_user[address]', 'abc']]
request.set_form form_data, 'multipart/form-data'
response = http.request(request)
puts response.read_body
Response
{
"status": true,
"errors": [],
"message": "",
"letscms_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9....",
"user": {
"ID": "21",
"user_login": "test18",
"user_nicename": "test18",
"user_email": "test18@test.com",
"user_url": "",
"user_registered": "2021-01-10 05:49:30",
"user_activation_key": "1610257771:$P$BiDU/dod5e71QMn5c6xi7dcc4GL6Cf.",
"user_status": "0",
"display_name": "test 18"
},
"bmw_user": {
"id": "18",
"user_id": "21",
"user_name": "test18",
"user_key": "378219654",
"parent_key": "192735648",
"sponsor_key": "912874503",
"position": "right",
"qualified_points": "0.000",
"own_points": "0.000",
"left_points": "0.000",
"right_points": "0.000",
"creation_date": "2021-01-10 11:19:31",
"payment_status": "0",
"payment_date": "0000-00-00 00:00:00",
"network_row": "3"
}
}
GET User info API
The user info API is stands for GET request, which is provide the user information by letscms_token
.
GET: /wp-json/letscms/v1/user-info
Parameter | Type | Position | # | Description |
---|---|---|---|---|
letscms_token | string |
Headers |
Required |
Letscms Token is generate when user attempt login or register API. |
Parameter | letscms_token |
---|---|
Type | string |
Position | Headers |
# | Optional |
Description | Each user have unique id, this is known as user id. |
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => '{{site_url}}/wp-json/letscms/v1/user_info',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_POSTFIELDS => array('key' => '1'),
CURLOPT_HTTPHEADER => array(
'letscms_token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.',
'Cookie: PHPSESSID=onp12foas4cn1dsdodjv9ri1qm'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var form = new FormData();
form.append("key", "1");
var settings = {
"url": "{{site_url}}/wp-json/letscms/v1/user_info",
"method": "GET",
"timeout": 0,
"headers": {
"letscms_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9..",
"Cookie": "PHPSESSID=onp12foas4cn1dsdodjv9ri1qm"
},
"processData": false,
"mimeType": "multipart/form-data",
"contentType": false,
"data": form
};
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require('request');
var options = {
'method': 'GET',
'url': '{{site_url}}/wp-json/letscms/v1/user_info',
'headers': {
'letscms_token': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...',
'Cookie': 'PHPSESSID=onp12foas4cn1dsdodjv9ri1qm'
},
formData: {
'key': '1'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
url = "{{site_url}}/wp-json/letscms/v1/user_info"
payload={'key': '1'}
files=[
]
headers = {
'letscms_token': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...',
'Cookie': 'PHPSESSID=onp12foas4cn1dsdodjv9ri1qm'
}
response = requests.request("GET", url, headers=headers, data=payload, files=files)
print(response.text)
var client = new RestClient("{{site_url}}/wp-json/letscms/v1/user_info");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("letscms_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9....");
request.AddHeader("Cookie", "PHPSESSID=onp12foas4cn1dsdodjv9ri1qm");
request.AlwaysMultipartFormData = true;
request.AddParameter("key", "1");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request GET '{{site_url}}/wp-json/letscms/v1/user_info' \
--header 'letscms_token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.e...' \
--header 'Cookie: PHPSESSID=onp12foas4cn1dsdodjv9ri1qm' \
--form 'key="1"'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("{{site_url}}/wp-json/letscms/v1/user_info")
.method("GET", null)
.addHeader("letscms_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.....")
.addHeader("Cookie", "PHPSESSID=onp12foas4cn1dsdodjv9ri1qm")
.build();
Response response = client.newCall(request).execute();
require "uri"
require "net/http"
url = URI("{{site_url}}/wp-json/letscms/v1/user_info")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["letscms_token"] = "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...."
request["Cookie"] = "PHPSESSID=onp12foas4cn1dsdodjv9ri1qm"
form_data = [['key', '1']]
request.set_form form_data, 'multipart/form-data'
response = http.request(request)
puts response.read_body
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => '{{site_url}}/wp-json/letscms/v1/umw-get-user-info?user_id=33',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'Cookie: PHPSESSID=auojsobvada704p45fo28j4217'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var settings = {
"url": "{{site_url}}/wp-json/letscms/v1/umw-get-user-info?user_id=33",
"method": "GET",
"timeout": 0,
"headers": {
"Cookie": "PHPSESSID=auojsobvada704p45fo28j4217"
},
};
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require('request');
var options = {
'method': 'GET',
'url': '{{site_url}}/wp-json/letscms/v1/umw-get-user-info?user_id=33',
'headers': {
'Cookie': 'PHPSESSID=auojsobvada704p45fo28j4217'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
url = "{{site_url}}/wp-json/letscms/v1/umw-get-user-info?user_id=33"
payload={}
headers = {
'Cookie': 'PHPSESSID=auojsobvada704p45fo28j4217'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
var client = new RestClient("{{site_url}}/wp-json/letscms/v1/umw-get-user-info?user_id=33");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Cookie", "PHPSESSID=auojsobvada704p45fo28j4217");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request GET '{{site_url}}/wp-json/letscms/v1/umw-get-user-info?user_id=33' \
--header 'Cookie: PHPSESSID=auojsobvada704p45fo28j4217'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("{{site_url}}/wp-json/letscms/v1/umw-get-user-info?user_id=33")
.method("GET", null)
.addHeader("Cookie", "PHPSESSID=auojsobvada704p45fo28j4217")
.build();
Response response = client.newCall(request).execute();
require "uri"
require "net/http"
url = URI("{{site_url}}/wp-json/letscms/v1/umw-get-user-info?user_id=33")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["Cookie"] = "PHPSESSID=auojsobvada704p45fo28j4217"
response = http.request(request)
puts response.read_body
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => '{{site_url}}/wp-json/letscms/v1/umw-get-user-info?user_key=184930752',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'Cookie: PHPSESSID=auojsobvada704p45fo28j4217'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var settings = {
"url": "{{site_url}}/wp-json/letscms/v1/umw-get-user-info?user_key=184930752",
"method": "GET",
"timeout": 0,
"headers": {
"Cookie": "PHPSESSID=auojsobvada704p45fo28j4217"
},
};
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require('request');
var options = {
'method': 'GET',
'url': '{{site_url}}/wp-json/letscms/v1/umw-get-user-info?user_key=184930752',
'headers': {
'Cookie': 'PHPSESSID=auojsobvada704p45fo28j4217'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
url = "{{site_url}}/wp-json/letscms/v1/umw-get-user-info?user_key=184930752"
payload={}
headers = {
'Cookie': 'PHPSESSID=auojsobvada704p45fo28j4217'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
var client = new RestClient("{{site_url}}/wp-json/letscms/v1/umw-get-user-info?user_key=184930752");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Cookie", "PHPSESSID=auojsobvada704p45fo28j4217");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request GET '{{site_url}}/wp-json/letscms/v1/umw-get-user-info?user_key=184930752' \
--header 'Cookie: PHPSESSID=auojsobvada704p45fo28j4217'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("{{site_url}}/wp-json/letscms/v1/umw-get-user-info?user_key=184930752")
.method("GET", null)
.addHeader("Cookie", "PHPSESSID=auojsobvada704p45fo28j4217")
.build();
Response response = client.newCall(request).execute();
require "uri"
require "net/http"
url = URI("{{site_url}}/wp-json/letscms/v1/umw-get-user-info?user_key=184930752")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["Cookie"] = "PHPSESSID=auojsobvada704p45fo28j4217"
response = http.request(request)
puts response.read_body
Response
{
"status": true,
"errors": [],
"message": "",
"user": {
"ID": "33",
"user_login": "user1",
"user_pass": "$P$Bk5/kkw1bXzptSHiYCW5W3bnb6gu9a.",
"user_nicename": "user1",
"user_email": "user1@test.com",
"user_url": "",
"user_registered": "2020-12-27 07:27:18",
"user_activation_key": "",
"user_status": "0",
"display_name": "user1"
},
"umw_user": {
"id": "1",
"user_id": "33",
"user_name": "user1",
"user_key": "184930752",
"parent_key": "0",
"sponsor_key": "0",
"payment_status": "1",
"level": "5",
"status": "0",
"created_at": "2020-12-27 07:27:19",
"paid_at": "0000-00-00 00:00:00",
"network_row": "0"
}
}
BMW user bank details API
The Bank details user API allow you to get user bank details, this will retrn you user bank account details.
GET: /wp-json/letscms/v1/bank_details
Parameter | Type | Position | # | Description |
---|---|---|---|---|
letscms_token | string |
Headers |
Required |
Letscms Token is generate when user attempt login or register API. |
Parameter | letscms_token |
---|---|
Type | string |
Position | Headers |
# | Required |
Description | Letscms Token is generate when user attempt login or register API |
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => '{{site_url}}/wp-json/letscms/v1/bank_details',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'letscms_token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...',
'Cookie: PHPSESSID=onp12foas4cn1dsdodjv9ri1qm'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var settings = {
"url": "{{site_url}}/wp-json/letscms/v1/bank_details",
"method": "GET",
"timeout": 0,
"headers": {
"letscms_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...",
"Cookie": "PHPSESSID=onp12foas4cn1dsdodjv9ri1qm"
},
};
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require('request');
var options = {
'method': 'GET',
'url': '{{site_url}}/wp-json/letscms/v1/bank_details',
'headers': {
'letscms_token': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9....',
'Cookie': 'PHPSESSID=onp12foas4cn1dsdodjv9ri1qm'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
url = "{{site_url}}/wp-json/letscms/v1/bank_details"
payload={}
headers = {
'letscms_token': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...',
'Cookie': 'PHPSESSID=onp12foas4cn1dsdodjv9ri1qm'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
var client = new RestClient("{{site_url}}/wp-json/letscms/v1/bank_details");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("letscms_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9....");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request GET '{{site_url}}/wp-json/letscms/v1/bank_details' \
--header 'letscms_token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9....' \
--header 'Cookie: PHPSESSID=onp12foas4cn1dsdodjv9ri1qm'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("{{site_url}}/wp-json/letscms/v1/bank_details")
.method("GET", null)
.addHeader("letscms_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9....")
.build();
Response response = client.newCall(request).execute();
require "uri"
require "net/http"
url = URI("{{site_url}}/wp-json/letscms/v1/bank_details")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["letscms_token"] = "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...."
request["Cookie"] = "PHPSESSID=onp12foas4cn1dsdodjv9ri1qm"
response = http.request(request)
puts response.read_body
Response
{
"status": true,
"errors": [],
"message": "",
"bank_details": [
{
"user_key": "912874503",
"account_holder": "test",
"account_number": "1236543567",
"bank_name": "abcsssaaaaaa",
"branch": "qqwwwwww",
"ifsc_code": "eeeeedddd",
"contact_number": "4444444444",
"insert_date": "2021-01-05 05:45:44"
}
],
"language": {
"holder_name": "Account Holder Name",
"account_number": "Account Number",
"bank_name": "Bank Name",
"branch": "Branch Name",
"ifsc_code": "IFSC Code",
"contact_no": "Contact No"
}
}
BMW User Bank Details Save API
The User Bank Details Save API allow you to save user bank details, this will retrn you user bank details save or not.
POST: /wp-json/letscms/v1/bank_details_save
Parameter | Type | Position | # | Description |
---|---|---|---|---|
letscms_token | string |
Headers |
Required |
Letscms Token is generate when user attempt login or register API. |
account_holder_name | String |
Body |
Required |
Account holder name . |
account_number | Integer |
Body |
Required |
User account number. |
bank_name | String |
Body |
Required |
User bank name. |
branch | String |
Body |
Required |
Branch name of Bank. |
ifsc_code | String |
Body |
Required |
IFSC code of bank branch. |
contact_number | Integer |
Body |
Required |
User Contact number. |
Parameter | letscms_token |
---|---|
Type | string |
Position | Headers |
# | Required |
Description | Letscms Token is generate when user attempt login or register API |
Parameter | account_holder_name |
Type | String |
Position | Body |
# | Required |
Description | Account holder name . |
Parameter | account_number |
Type | Integer |
Position | Body |
# | Required |
Description | User account number. |
Parameter | bank_name |
Type | Float |
Position | Body |
# | Required |
Description | User bank name. |
Parameter | branch |
Type | String |
Position | Body |
# | Required |
Description | Branch name of Bank. |
Parameter | ifsc_code |
Type | String |
Position | Body |
# | Required |
Description | IFSC code of bank branch. |
Parameter | contact_number |
Type | Integer |
Position | Body |
# | Required |
Description | User Contact number. |
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => '{{SITE_URL}}/wp-json/letscms/v1/bank_details_save',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => array('account_holder_name' => 'test','account_number' => '1236543567','bank_name' => 'bankname','branch' => 'bankbranch','ifsc_code' => 'bankifsc','contact_number' => '9999999999'),
CURLOPT_HTTPHEADER => array(
'letscms_token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...',
'Cookie: PHPSESSID=onp12foas4cn1dsdodjv9ri1qm'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var form = new FormData();
form.append("account_holder_name", "test");
form.append("account_number", "1236543567");
form.append("bank_name", "bankname");
form.append("branch", "bankbranch");
form.append("ifsc_code", "bankifsc");
form.append("contact_number", "9999999999");
var settings = {
"url": "{{site_url}}/wp-json/letscms/v1/bank_details_save",
"method": "POST",
"timeout": 0,
"headers": {
"letscms_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...",
"Cookie": "PHPSESSID=onp12foas4cn1dsdodjv9ri1qm"
},
"processData": false,
"mimeType": "multipart/form-data",
"contentType": false,
"data": form
};
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require('request');
var options = {
'method': 'POST',
'url': '{{site_url}}/wp-json/letscms/v1/bank_details_save',
'headers': {
'letscms_token': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...',
'Cookie': 'PHPSESSID=onp12foas4cn1dsdodjv9ri1qm'
},
formData: {
'account_holder_name': 'test',
'account_number': '1236543567',
'bank_name': 'bankname',
'branch': 'bankbranch',
'ifsc_code': 'bankifsc',
'contact_number': '9999999999'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
url = "{{site_url}}/wp-json/letscms/v1/bank_details_save"
payload={'account_holder_name': 'test',
'account_number': '1236543567',
'bank_name': 'bankname',
'branch': 'bankbranch',
'ifsc_code': 'bankifsc',
'contact_number': '9999999999'}
files=[
]
headers = {
'letscms_token': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...',
'Cookie': 'PHPSESSID=onp12foas4cn1dsdodjv9ri1qm'
}
response = requests.request("POST", url, headers=headers, data=payload, files=files)
print(response.text)
var client = new RestClient("{{site_url}}/wp-json/letscms/v1/bank_details_save");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("letscms_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...");
request.AddHeader("Cookie", "PHPSESSID=onp12foas4cn1dsdodjv9ri1qm");
request.AlwaysMultipartFormData = true;
request.AddParameter("account_holder_name", "test");
request.AddParameter("account_number", "1236543567");
request.AddParameter("bank_name", "bankname");
request.AddParameter("branch", "bankbranch");
request.AddParameter("ifsc_code", "bankifsc");
request.AddParameter("contact_number", "9999999999");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request POST '{{site_url}}/wp-json/letscms/v1/bank_details_save' \
--header 'letscms_token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9....' \
--header 'Cookie: PHPSESSID=onp12foas4cn1dsdodjv9ri1qm' \
--form 'account_holder_name="test"' \
--form 'account_number="1236543567"' \
--form 'bank_name="bankname"' \
--form 'branch="bankbranch"' \
--form 'ifsc_code="bankifsc"' \
--form 'contact_number="9999999999"'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = new MultipartBody.Builder().setType(MultipartBody.FORM)
.addFormDataPart("account_holder_name","test")
.addFormDataPart("account_number","1236543567")
.addFormDataPart("bank_name","bankname")
.addFormDataPart("branch","bankbranch")
.addFormDataPart("ifsc_code","bankifsc")
.addFormDataPart("contact_number","9999999999")
.build();
Request request = new Request.Builder()
.url("{{site_url}}/wp-json/letscms/v1/bank_details_save")
.method("POST", body)
.addHeader("letscms_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...")
.addHeader("Cookie", "PHPSESSID=onp12foas4cn1dsdodjv9ri1qm")
.build();
Response response = client.newCall(request).execute();
require "uri"
require "net/http"
url = URI("{{site_url}}/wp-json/letscms/v1/bank_details_save")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)
request["letscms_token"] = "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9..."
request["Cookie"] = "PHPSESSID=onp12foas4cn1dsdodjv9ri1qm"
form_data = [['account_holder_name', 'test'],['account_number', '1236543567'],['bank_name', 'bankname'],['branch', 'bankbranch'],['ifsc_code', 'bankifsc'],['contact_number', '9999999999']]
request.set_form form_data, 'multipart/form-data'
response = http.request(request)
puts response.read_body
Response
{
"status": true,
"errors": [],
"message": "Bank Details successfully Saved"
}
BMW user Payout API
The user Payout list API allow you to get user All payout details, this will retrn you user payout list.
GET: /wp-json/letscms/v1/payout_list
Parameter | Type | Position | # | Description |
---|---|---|---|---|
letscms_token | string |
Headers |
Required |
Letscms Token is generate when user attempt login or register API. |
start | integer |
Params |
Optional |
Start is index from where index data fetch. Just like offset data from start index. |
limit | integer |
Params |
Optional |
Limit is a number value , |
Parameter | letscms_token |
---|---|
Type | string |
Position | Headers |
# | Required |
Description | Letscms Token is generate when user attempt login or register API |
Parameter | start |
Type | Integer |
Position | Params |
# | Optional |
Description | Start is index from where index data fetch. Just like offset data from start index |
Parameter | limit |
Type | Integer |
Position | Params |
# | Optional |
Description |
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => '{{site_url}}/wp-json/letscms/v1/payout_list?start=0&limit=10',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'letscms_token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9......',
'Cookie: PHPSESSID=onp12foas4cn1dsdodjv9ri1qm'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var settings = {
"url": "{{site_url}}/wp-json/letscms/v1/payout_list?start=0&limit=10",
"method": "GET",
"timeout": 0,
"headers": {
"letscms_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.......",
"Cookie": "PHPSESSID=onp12foas4cn1dsdodjv9ri1qm"
},
};
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require('request');
var options = {
'method': 'GET',
'url': '{{site_url}}/wp-json/letscms/v1/payout_list?start=0&limit=10',
'headers': {
'letscms_token': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9....',
'Cookie': 'PHPSESSID=onp12foas4cn1dsdodjv9ri1qm'
},
form: {
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
url = "{{site_url}}/wp-json/letscms/v1/payout_list?start=0&limit=10"
payload={}
headers = {
'letscms_token': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.....',
'Cookie': 'PHPSESSID=onp12foas4cn1dsdodjv9ri1qm'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
var client = new RestClient("{{site_url}}/wp-json/letscms/v1/payout_list?start=0&limit=10");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("letscms_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9......");
request.AddHeader("Cookie", "PHPSESSID=onp12foas4cn1dsdodjv9ri1qm");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request GET '{{site_url}}/wp-json/letscms/v1/payout_list?start=0&limit=10' \
--header 'letscms_token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9....' \
--header 'Cookie: PHPSESSID=onp12foas4cn1dsdodjv9ri1qm'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("{{site_url}}/wp-json/letscms/v1/payout_list?start=0&limit=10")
.method("GET", null)
.addHeader("letscms_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...")
.addHeader("Cookie", "PHPSESSID=onp12foas4cn1dsdodjv9ri1qm")
.build();
Response response = client.newCall(request).execute();
require "uri"
require "net/http"
url = URI("{{site_url}}/wp-json/letscms/v1/payout_list?start=0&limit=10")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["letscms_token"] = "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9......."
request["Cookie"] = "PHPSESSID=onp12foas4cn1dsdodjv9ri1qm"
response = http.request(request)
puts response.read_body
Response
{
"status": true,
"errors": [],
"message": "",
"payout": [
{
"id": "1",
"user_key": "912874503",
"payout_id": "1",
"pair_commission": "2.000",
"referral_commission": "6.000",
"level_commission": "6.000",
"bonus_amount": "6.000",
"total_points": "0.000",
"total_amount": "16.000",
"tax": "2.000",
"service_charge": "2.000",
"insert_date": "2021-01-05 08:54:54"
}
]
}
BMW User Payout details
The User Payout details helps user to get user's single payout details by payout id, this will retrn you all commissions relates to a payout id.
GET: /wp-json/letscms/v1/payout_details
Parameter | Type | Position | # | Description |
---|---|---|---|---|
letscms_token | string |
Headers |
Required |
Letscms Token is generate when user attempt login or register API. |
payout_id | Integer |
Params |
Required |
Payout id . |
Parameter | letscms_token |
---|---|
Type | string |
Position | Headers |
# | Required |
Description | Letscms Token is generate when user attempt login or register API |
Parameter | payout_id |
Type | Integer |
Position | Params |
# | Required |
Description | Payout id. |
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => '{{site_url}}/wp-json/letscms/v1/payout_details?payout_id=1',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'letscms_token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...',
'Cookie: PHPSESSID=mp9usqhuifnd21mn49ur26n8fs'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var settings = {
"url": "{{site_url}}/wp-json/letscms/v1/payout_details?payout_id=1",
"method": "GET",
"timeout": 0,
"headers": {
"letscms_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...",
"Cookie": "PHPSESSID=mp9usqhuifnd21mn49ur26n8fs"
},
};
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require('request');
var options = {
'method': 'GET',
'url': '{{site_url}}/wp-json/letscms/v1/payout_details?payout_id=1',
'headers': {
'letscms_token': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9....',
'Cookie': 'PHPSESSID=mp9usqhuifnd21mn49ur26n8fs'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
url = "{{site_url}}/wp-json/letscms/v1/payout_details?payout_id=1"
payload={}
headers = {
'letscms_token': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...',
'Cookie': 'PHPSESSID=mp9usqhuifnd21mn49ur26n8fs'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
var client = new RestClient("{{site_url}}/wp-json/letscms/v1/payout_details?payout_id=1");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("letscms_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9....");
request.AddHeader("Cookie", "PHPSESSID=mp9usqhuifnd21mn49ur26n8fs");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request GET '{{site_url}}/wp-json/letscms/v1/payout_details?payout_id=1' \
--header 'letscms_token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...' \
--header 'Cookie: PHPSESSID=mp9usqhuifnd21mn49ur26n8fs'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("{{site_url}}/wp-json/letscms/v1/payout_details?payout_id=1")
.method("GET", null)
.addHeader("letscms_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...")
.addHeader("Cookie", "PHPSESSID=mp9usqhuifnd21mn49ur26n8fs")
.build();
Response response = client.newCall(request).execute();
require "uri"
require "net/http"
url = URI("{{site_url}}/wp-json/letscms/v1/payout_details?payout_id=1")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["letscms_token"] = "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...."
request["Cookie"] = "PHPSESSID=mp9usqhuifnd21mn49ur26n8fs"
response = http.request(request)
puts response.read_body
Response
{
"status": true,
"errors": [],
"message": "",
"user_key": "912874503",
"ref_commission": [
{
"id": "1",
"user_key": "912874503",
"child_key": "280514976",
"amount": "2.000",
"status": "2",
"payout_id": "1",
"order_id": "25",
"date_notified": "2021-01-05 08:45:54"
},
{
"id": "2",
"user_key": "912874503",
"child_key": "192735648",
"amount": "2.000",
"status": "2",
"payout_id": "1",
"order_id": "26",
"date_notified": "2021-01-05 08:50:38"
},
{
"id": "3",
"user_key": "912874503",
"child_key": "817532649",
"amount": "2.000",
"status": "2",
"payout_id": "1",
"order_id": "27",
"date_notified": "2021-01-05 08:53:11"
}
],
"pair_commission": [
{
"id": "1",
"user_key": "912874503",
"childs": "a:2:{i:0;s:9:\"280514976\";i:1;s:9:\"692371504\";}",
"amount": "2.000",
"status": "2",
"payout_id": "1",
"insert_date": "2021-01-05 08:46:57"
}
],
"bonus_commission": [
{
"id": "1",
"user_key": "912874503",
"amount": "2.00",
"bonus_count": "2",
"status": "2",
"payout_id": "1",
"insert_date": "2021-01-05 08:46:57"
},
{
"id": "2",
"user_key": "912874503",
"amount": "4.00",
"bonus_count": "4",
"status": "2",
"payout_id": "1",
"insert_date": "2021-01-05 08:53:23"
}
],
"level_commission": [
{
"id": "1",
"user_key": "280514976",
"sponsor_key": "912874503",
"amount": "2.000",
"level": "1",
"status": "2",
"payout_id": "1",
"insert_date": "2021-01-05 08:45:54"
},
{
"id": "2",
"user_key": "192735648",
"sponsor_key": "912874503",
"amount": "2.000",
"level": "1",
"status": "2",
"payout_id": "1",
"insert_date": "2021-01-05 08:50:39"
},
{
"id": "3",
"user_key": "817532649",
"sponsor_key": "912874503",
"amount": "2.000",
"level": "1",
"status": "2",
"payout_id": "1",
"insert_date": "2021-01-05 08:53:11"
}
]
}
BMW user Pair Commission API
The user Pair Commission list API allow you to get user All pair details, this will retrn you user pair commission list.
GET: /wp-json/letscms/v1/pair_commission
Parameter | Type | Position | # | Description |
---|---|---|---|---|
letscms_token | string |
Headers |
Required |
Letscms Token is generate when user attempt login or register API. |
start | integer |
Params |
Optional |
Start is index from where index data fetch. Just like offset data from start index. |
limit | integer |
Params |
Optional |
Limit is a number value , |
Parameter | letscms_token |
---|---|
Type | string |
Position | Headers |
# | Required |
Description | Letscms Token is generate when user attempt login or register API |
Parameter | start |
Type | Integer |
Position | Params |
# | Optional |
Description | Start is index from where index data fetch. Just like offset data from start index |
Parameter | limit |
Type | Integer |
Position | Params |
# | Optional |
Description |
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => '{{site_url}}/wp-json/letscms/v1/pair_commission?start=0&limit=10',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'letscms_token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9....',
'Cookie: PHPSESSID=onp12foas4cn1dsdodjv9ri1qm'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var settings = {
"url": "{{site_url}}/wp-json/letscms/v1/pair_commission?start=0&limit=10",
"method": "GET",
"timeout": 0,
"headers": {
"letscms_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.....",
"Cookie": "PHPSESSID=onp12foas4cn1dsdodjv9ri1qm"
},
};
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require('request');
var options = {
'method': 'GET',
'url': '{{site_url}}/wp-json/letscms/v1/pair_commission?start=0&limit=10',
'headers': {
'letscms_token': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...',
'Cookie': 'PHPSESSID=onp12foas4cn1dsdodjv9ri1qm'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
url = "{{site_url}}/wp-json/letscms/v1/pair_commission?start=0&limit=10"
payload={}
headers = {
'letscms_token': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.....',
'Cookie': 'PHPSESSID=onp12foas4cn1dsdodjv9ri1qm'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
var client = new RestClient("{{site_url}}/wp-json/letscms/v1/pair_commission?start=0&limit=10");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("letscms_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.....");
request.AddHeader("Cookie", "PHPSESSID=onp12foas4cn1dsdodjv9ri1qm");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request GET '{{site_url}}/wp-json/letscms/v1/pair_commission?start=0&limit=10' \
--header 'letscms_token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...' \
--header 'Cookie: PHPSESSID=onp12foas4cn1dsdodjv9ri1qm'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("{{site_url}}/wp-json/letscms/v1/pair_commission?start=0&limit=10")
.method("GET", null)
.addHeader("letscms_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...")
.addHeader("Cookie", "PHPSESSID=onp12foas4cn1dsdodjv9ri1qm")
.build();
Response response = client.newCall(request).execute();
require "uri"
require "net/http"
url = URI("{{site_url}}/wp-json/letscms/v1/pair_commission?start=0&limit=10")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["letscms_token"] = "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9..."
request["Cookie"] = "PHPSESSID=onp12foas4cn1dsdodjv9ri1qm"
response = http.request(request)
puts response.read_body
Response
{
"status": true,
"errors": [],
"message": "",
"pair_commission": [
{
"id": "1",
"user_key": "912874503",
"childs": "a:2:{i:0;s:9:\"280514976\";i:1;s:9:\"692371504\";}",
"amount": "2.000",
"status": "2",
"payout_id": "1",
"insert_date": "2021-01-05 08:46:57"
}
]
}
BMW user Referral Commission API
The user Referral Commission list API allow you to get user All referral details, this will retrn you user referral commission list.
GET: /wp-json/letscms/v1/ref_commission
Parameter | Type | Position | # | Description |
---|---|---|---|---|
letscms_token | string |
Headers |
Required |
Letscms Token is generate when user attempt login or register API. |
start | integer |
Params |
Optional |
Start is index from where index data fetch. Just like offset data from start index. |
limit | integer |
Params |
Optional |
Limit is a number value , |
Parameter | letscms_token |
---|---|
Type | string |
Position | Headers |
# | Required |
Description | Letscms Token is generate when user attempt login or register API |
Parameter | start |
Type | Integer |
Position | Params |
# | Optional |
Description | Start is index from where index data fetch. Just like offset data from start index |
Parameter | limit |
Type | Integer |
Position | Params |
# | Optional |
Description |
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => '{{site_url}}/wp-json/letscms/v1/ref_commission?start=0&limit=10',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'letscms_token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...',
'Cookie: PHPSESSID=onp12foas4cn1dsdodjv9ri1qm'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var settings = {
"url": "{{site_url}}/wp-json/letscms/v1/ref_commission?start=0&limit=10",
"method": "GET",
"timeout": 0,
"headers": {
"letscms_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9....",
"Cookie": "PHPSESSID=onp12foas4cn1dsdodjv9ri1qm"
},
};
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require('request');
var options = {
'method': 'GET',
'url': '{{site_url}}/wp-json/letscms/v1/ref_commission?start=0&limit=10',
'headers': {
'letscms_token': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9....',
'Cookie': 'PHPSESSID=onp12foas4cn1dsdodjv9ri1qm'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
url = "{{site_url}}/wp-json/letscms/v1/ref_commission?start=0&limit=10"
payload={}
headers = {
'letscms_token': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...',
'Cookie': 'PHPSESSID=onp12foas4cn1dsdodjv9ri1qm'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
var client = new RestClient("{{site_url}}/wp-json/letscms/v1/ref_commission?start=0&limit=10");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("letscms_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...");
request.AddHeader("Cookie", "PHPSESSID=onp12foas4cn1dsdodjv9ri1qm");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request GET '{{site_url}}/wp-json/letscms/v1/ref_commission?start=0&limit=10' \
--header 'letscms_token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...' \
--header 'Cookie: PHPSESSID=onp12foas4cn1dsdodjv9ri1qm'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("{{site_url}}/wp-json/letscms/v1/ref_commission?start=0&limit=10")
.method("GET", null)
.addHeader("letscms_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9....")
.addHeader("Cookie", "PHPSESSID=onp12foas4cn1dsdodjv9ri1qm")
.build();
Response response = client.newCall(request).execute();
require "uri"
require "net/http"
url = URI("{{site_url}}/wp-json/letscms/v1/ref_commission?start=0&limit=10")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["letscms_token"] = "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9..."
request["Cookie"] = "PHPSESSID=onp12foas4cn1dsdodjv9ri1qm"
response = http.request(request)
puts response.read_body
Response
{
"status": true,
"errors": [],
"message": "",
"pair_commission": [
{
"id": "1",
"user_key": "912874503",
"childs": "a:2:{i:0;s:9:\"280514976\";i:1;s:9:\"692371504\";}",
"amount": "2.000",
"status": "2",
"payout_id": "1",
"insert_date": "2021-01-05 08:46:57"
}
]
}
BMW User Level Commission API
The user Level Commission list API allow you to get user All Level details, this will retrn you user level commission list.
GET: /wp-json/letscms/v1/level_commission
Parameter | Type | Position | # | Description |
---|---|---|---|---|
letscms_token | string |
Headers |
Required |
Letscms Token is generate when user attempt login or register API. |
start | integer |
Params |
Optional |
Start is index from where index data fetch. Just like offset data from start index. |
limit | integer |
Params |
Optional |
Limit is a number value , |
Parameter | letscms_token |
---|---|
Type | string |
Position | Headers |
# | Required |
Description | Letscms Token is generate when user attempt login or register API |
Parameter | start |
Type | Integer |
Position | Params |
# | Optional |
Description | Start is index from where index data fetch. Just like offset data from start index |
Parameter | limit |
Type | Integer |
Position | Params |
# | Optional |
Description |
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => '{{site_url}}/wp-json/letscms/v1/level_commission?start=0&limit=10',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'letscms_token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9....',
'Cookie: PHPSESSID=onp12foas4cn1dsdodjv9ri1qm'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var settings = {
"url": "{{site_url}}/wp-json/letscms/v1/level_commission?start=0&limit=10",
"method": "GET",
"timeout": 0,
"headers": {
"letscms_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9....",
"Cookie": "PHPSESSID=onp12foas4cn1dsdodjv9ri1qm"
},
};
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require('request');
var options = {
'method': 'GET',
'url': '{{site_url}}/wp-json/letscms/v1/level_commission?start=0&limit=10',
'headers': {
'letscms_token': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9....',
'Cookie': 'PHPSESSID=onp12foas4cn1dsdodjv9ri1qm'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
url = "{{site_url}}//wp-json/letscms/v1/level_commission?start=0&limit=10"
payload={}
headers = {
'letscms_token': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9....',
'Cookie': 'PHPSESSID=onp12foas4cn1dsdodjv9ri1qm'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
var client = new RestClient("{{site_url}}/wp-json/letscms/v1/level_commission?start=0&limit=10");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("letscms_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9....");
request.AddHeader("Cookie", "PHPSESSID=onp12foas4cn1dsdodjv9ri1qm");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request GET '{{site_url}}/wp-json/letscms/v1/level_commission?start=0&limit=10' \
--header 'letscms_token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9....' \
--header 'Cookie: PHPSESSID=onp12foas4cn1dsdodjv9ri1qm'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("{{site_url}}/wp-json/letscms/v1/level_commission?start=0&limit=10")
.method("GET", null)
.addHeader("letscms_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9....")
.addHeader("Cookie", "PHPSESSID=onp12foas4cn1dsdodjv9ri1qm")
.build();
Response response = client.newCall(request).execute();
require "uri"
require "net/http"
url = URI("{{site_url}}/wp-json/letscms/v1/level_commission?start=0&limit=10")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["letscms_token"] = "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...."
request["Cookie"] = "PHPSESSID=onp12foas4cn1dsdodjv9ri1qm"
response = http.request(request)
puts response.read_body
Response
{
"status": true,
"errors": [],
"message": "",
"level_commission": [
{
"id": "1",
"user_key": "280514976",
"sponsor_key": "912874503",
"amount": "2.000",
"level": "1",
"status": "2",
"payout_id": "1",
"insert_date": "2021-01-05 08:45:54"
},
{
"id": "2",
"user_key": "192735648",
"sponsor_key": "912874503",
"amount": "2.000",
"level": "1",
"status": "2",
"payout_id": "1",
"insert_date": "2021-01-05 08:50:39"
},
{
"id": "3",
"user_key": "817532649",
"sponsor_key": "912874503",
"amount": "2.000",
"level": "1",
"status": "2",
"payout_id": "1",
"insert_date": "2021-01-05 08:53:11"
}
]
}
BMW User Bonus Commission API
The user Bonus Commission list API allow you to get user All Bonus details, this will retrn you user bonus commission list.
GET: /wp-json/letscms/v1/bonus_commission
Parameter | Type | Position | # | Description |
---|---|---|---|---|
letscms_token | string |
Headers |
Required |
Letscms Token is generate when user attempt login or register API. |
start | integer |
Params |
Optional |
Start is index from where index data fetch. Just like offset data from start index. |
limit | integer |
Params |
Optional |
Limit is a number value , |
Parameter | letscms_token |
---|---|
Type | string |
Position | Headers |
# | Required |
Description | Letscms Token is generate when user attempt login or register API |
Parameter | start |
Type | Integer |
Position | Params |
# | Optional |
Description | Start is index from where index data fetch. Just like offset data from start index |
Parameter | limit |
Type | Integer |
Position | Params |
# | Optional |
Description |
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => '{{site_url}}/wp-json/letscms/v1/bonus_commission?start=0&limit=10',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'letscms_token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9....',
'Cookie: PHPSESSID=onp12foas4cn1dsdodjv9ri1qm'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var settings = {
"url": "{{site_url}}/wp-json/letscms/v1/bonus_commission?start=0&limit=10",
"method": "GET",
"timeout": 0,
"headers": {
"letscms_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.......",
"Cookie": "PHPSESSID=onp12foas4cn1dsdodjv9ri1qm"
},
};
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require('request');
var options = {
'method': 'GET',
'url': '{{site_url}}/wp-json/letscms/v1/bonus_commission?start=0&limit=10',
'headers': {
'letscms_token': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.....',
'Cookie': 'PHPSESSID=onp12foas4cn1dsdodjv9ri1qm'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
url = "{{site_url}}/wp-json/letscms/v1/bonus_commission?start=0&limit=10"
payload={}
headers = {
'letscms_token': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9....',
'Cookie': 'PHPSESSID=onp12foas4cn1dsdodjv9ri1qm'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
var client = new RestClient("{{site_url}}/wp-json/letscms/v1/bonus_commission?start=0&limit=10");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("letscms_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...");
request.AddHeader("Cookie", "PHPSESSID=onp12foas4cn1dsdodjv9ri1qm");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request GET '{{site_url}}/wp-json/letscms/v1/bonus_commission?start=0&limit=10' \
--header 'letscms_token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...' \
--header 'Cookie: PHPSESSID=onp12foas4cn1dsdodjv9ri1qm'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("{{site_url}}/wp-json/letscms/v1/bonus_commission?start=0&limit=10")
.method("GET", null)
.addHeader("letscms_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...")
.addHeader("Cookie", "PHPSESSID=onp12foas4cn1dsdodjv9ri1qm")
.build();
Response response = client.newCall(request).execute();
require "uri"
require "net/http"
url = URI("{{site_url}}/wp-json/letscms/v1/bonus_commission?start=0&limit=10")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["letscms_token"] = "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9..."
request["Cookie"] = "PHPSESSID=onp12foas4cn1dsdodjv9ri1qm"
response = http.request(request)
puts response.read_body
Response
{
"status": true,
"errors": [],
"message": "",
"bonus_commission": [
{
"id": "1",
"user_key": "912874503",
"amount": "2.00",
"bonus_count": "2",
"status": "2",
"payout_id": "1",
"insert_date": "2021-01-05 08:46:57"
},
{
"id": "2",
"user_key": "912874503",
"amount": "4.00",
"bonus_count": "4",
"status": "2",
"payout_id": "1",
"insert_date": "2021-01-05 08:53:23"
}
]
}
BMW User Geneology API
The user Geneology API allow you to get user All Geneology details, this will retrn you user geneology data.
GET: /wp-json/letscms/v1/user_geneology
Parameter | Type | Position | # | Description |
---|---|---|---|---|
letscms_token | string |
Headers |
Required |
Letscms Token is generate when user attempt login or register API. |
Parameter | letscms_token |
---|---|
Type | string |
Position | Headers |
# | Required |
Description | Letscms Token is generate when user attempt login or register API |
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => '{{site_url}}/wp-json/letscms/v1/user_geneology',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'letscms_token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...',
'Cookie: PHPSESSID=onp12foas4cn1dsdodjv9ri1qm'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var settings = {
"url": "{{site_url}}/wp-json/letscms/v1/user_geneology",
"method": "GET",
"timeout": 0,
"headers": {
"letscms_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...",
"Cookie": "PHPSESSID=onp12foas4cn1dsdodjv9ri1qm"
},
};
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require('request');
var options = {
'method': 'GET',
'url': '{{site_url}}/wp-json/letscms/v1/user_geneology',
'headers': {
'letscms_token': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.',
'Cookie': 'PHPSESSID=onp12foas4cn1dsdodjv9ri1qm'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
url = "{{site_url}}/wp-json/letscms/v1/user_geneology"
payload={}
headers = {
'letscms_token': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9....',
'Cookie': 'PHPSESSID=onp12foas4cn1dsdodjv9ri1qm'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
var client = new RestClient("{{site_url}}/wp-json/letscms/v1/user_geneology");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("letscms_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9....");
request.AddHeader("Cookie", "PHPSESSID=onp12foas4cn1dsdodjv9ri1qm");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request GET '{{site_url}}/wp-json/letscms/v1/user_geneology' \
--header 'letscms_token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9....' \
--header 'Cookie: PHPSESSID=onp12foas4cn1dsdodjv9ri1qm'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("{{site_url}}/wp-json/letscms/v1/user_geneology")
.method("GET", null)
.addHeader("letscms_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9....")
.addHeader("Cookie", "PHPSESSID=onp12foas4cn1dsdodjv9ri1qm")
.build();
Response response = client.newCall(request).execute();
require "uri"
require "net/http"
url = URI("{{site_url}}/wp-json/letscms/v1/user_geneology")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["letscms_token"] = "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9..."
request["Cookie"] = "PHPSESSID=onp12foas4cn1dsdodjv9ri1qm"
response = http.request(request)
puts response.read_body
Response
{
"status": true,
"errors": [],
"message": "",
"geneology_data": {
"name": "test",
"imageUrl": "http://abc.com/wooapi/wp-content/plugins/wpbmw-new/image/user_paid.png",
"userData": {
"sponsor": "No",
"parent": "No",
"position": "Left",
"total_earning": "₹120+",
"total_widral": "₹40+",
"downlines": "8",
"left_link": false,
"right_link": false
},
"profileUrl": "http://abc.com/wooapi/wp-admin/admin.php?page=bmp-user-reports&user_id=2&user_key=912874503",
"isLoggedUser": false,
"userKey": "912874503",
"children": [
{
"name": "test3",
"imageUrl": "http://abc.com/wooapi/wp-content/plugins/wpbmw-new/image/user_paid.png",
"userData": {
"sponsor": "Test",
"parent": "Test",
"position": "Left",
"total_earning": "₹0.000",
"total_widral": "₹0.000",
"downlines": "0",
"left_link": false,
"right_link": false
},
"profileUrl": "http://abc.com/wooapi/wp-admin/admin.php?page=bmp-user-reports&user_id=4&user_key=692371504",
"isLoggedUser": false,
"userKey": "692371504",
"children": [
{
"name": "test14",
"imageUrl": "http://abc.com/wooapi/wp-content/plugins/wpbmw-new/image/user_paid.png",
"userData": {
"sponsor": "Test",
"parent": "Test3",
"position": "Left",
"total_earning": "₹0.000",
"total_widral": "₹0.000",
"downlines": "0",
"left_link": "http://abc.com/wooapi/register/?parent=14&leg=left",
"right_link": false
},
"profileUrl": "http://abc.com/wooapi/wp-admin/admin.php?page=bmp-user-reports&user_id=14&user_key=192735648",
"isLoggedUser": false,
"userKey": "192735648",
"children": [
{
"name": "test18",
"imageUrl": "http://abc.com/wooapi/wp-content/plugins/wpbmw-new/image/user.png",
"userData": {
"sponsor": "Test",
"parent": "Test14",
"position": "Right",
"total_earning": "₹0.000",
"total_widral": "₹0.000",
"downlines": "0",
"left_link": "http://abc.com/wooapi/register/?parent=21&leg=left",
"right_link": "http://abc.com/wooapi/register/?parent=21&leg=right"
},
"profileUrl": "http://abc.com/wooapi/wp-admin/admin.php?page=bmp-user-reports&user_id=21&user_key=378219654",
"isLoggedUser": false,
"userKey": "378219654",
"children": ""
}
]
},
]
},
]
}
}
BMW User Wthdrawal API
The User Withdrawal API allow you to get user All Withdrawal details, this will retrn you user Withdrawal data.
GET: /wp-json/letscms/v1/withdrawal
Parameter | Type | Position | # | Description |
---|---|---|---|---|
letscms_token | string |
Headers |
Required |
Letscms Token is generate when user attempt login or register API. |
Parameter | letscms_token |
---|---|
Type | string |
Position | Headers |
# | Required |
Description | Letscms Token is generate when user attempt login or register API |
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => '{{site_url}}/wp-json/letscms/v1/withdrawal',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'letscms_token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...',
'Cookie: PHPSESSID=onp12foas4cn1dsdodjv9ri1qm'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var settings = {
"url": "{{site_url}}/wp-json/letscms/v1/withdrawal",
"method": "GET",
"timeout": 0,
"headers": {
"letscms_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.....",
"Cookie": "PHPSESSID=onp12foas4cn1dsdodjv9ri1qm"
},
};
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require('request');
var options = {
'method': 'GET',
'url': '{{ site_url }}/wp-json/letscms/v1/withdrawal',
'headers': {
'letscms_token': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9....',
'Cookie': 'PHPSESSID=onp12foas4cn1dsdodjv9ri1qm'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
url = "{{site_url}}/wp-json/letscms/v1/withdrawal"
payload={}
headers = {
'letscms_token': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9....',
'Cookie': 'PHPSESSID=onp12foas4cn1dsdodjv9ri1qm'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
var client = new RestClient("{{site-url}}/wp-json/letscms/v1/withdrawal");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("letscms_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9....");
request.AddHeader("Cookie", "PHPSESSID=onp12foas4cn1dsdodjv9ri1qm");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request GET '{{site_url}}/wp-json/letscms/v1/withdrawal' \
--header 'letscms_token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...' \
--header 'Cookie: PHPSESSID=onp12foas4cn1dsdodjv9ri1qm'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("{{site_url}}/wp-json/letscms/v1/withdrawal")
.method("GET", null)
.addHeader("letscms_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9....")
.addHeader("Cookie", "PHPSESSID=onp12foas4cn1dsdodjv9ri1qm")
.build();
Response response = client.newCall(request).execute();
require "uri"
require "net/http"
url = URI("{{site_url}}/wp-json/letscms/v1/withdrawal")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["letscms_token"] = "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9....."
request["Cookie"] = "PHPSESSID=onp12foas4cn1dsdodjv9ri1qm"
response = http.request(request)
puts response.read_body
Response
{
"status": false,
"errors": [],
"message": "",
"withdrawal_info": {
"user_key": "912874503",
"total_balance": "4.00",
"requested_amount": "4.00",
"pending_withdrawal": "2.00"
},
"general_setting": {
"bmw_plan_base": "price",
"bmw_affiliate_url": "16",
"bmw_register_url": "9",
"bmw_order_success_status": "wc-completed",
"bmw_otp_verification": "1",
"bmw_withdrawal_limit_min": "2",
"bmw_withdrawal_limit_max": "1000"
},
"language": {
"heading": "Withdrawal",
"text_account_details": "Account Details",
"text_current_balance": "Current Balance",
"text_requested_balance": "Requested Balance",
"text_pending_balance": "Pending Balance",
"text_withdrawal_amount": "WithdrawalAmount",
"text_withdrawal_limit": "Withdrawal Limit",
"text_enter_amount": "Enter Amount",
"text_withdrawal_list": "Withdrawal List",
"text_id": "Id",
"text_transaction_id": "Transaction Id",
"text_amount": "Amount",
"text_status": "Status",
"text_mode": "Mode",
"text_initdate": "Init Date",
"text_processdate": "Process Date"
},
"all_withdrawal_data": [
{
"id": "1",
"user_id": "2",
"amount": "2.00",
"withdrawal_fee": "0.00",
"witholding_tax": "0.00",
"tax_status": "0",
"withdrawal_initiated": "1",
"withdrawal_mode": "bank_transfer",
"other_method": "",
"withdrawal_initiated_comment": "Withdrawal Request Initiated",
"withdrawal_initiated_date": "2021-01-05 08:55:41",
"payment_processed": "1",
"payment_processed_date": "2021-01-05",
"payment_mode": "bank_transfer",
"transaction_id": "123456",
"user_bank_name": "abcsssaaaaaa",
"user_bank_account_no": "1236543567"
},
{
"id": "2",
"user_id": "2",
"amount": "2.00",
"withdrawal_fee": "0.00",
"witholding_tax": "0.00",
"tax_status": "0",
"withdrawal_initiated": "1",
"withdrawal_mode": "",
"other_method": "",
"withdrawal_initiated_comment": "Withdrawal Request Initiated",
"withdrawal_initiated_date": "2021-01-05 12:20:20",
"payment_processed": "0",
"payment_processed_date": "0000-00-00",
"payment_mode": "",
"transaction_id": "",
"user_bank_name": "",
"user_bank_account_no": ""
}
]
}
BMW User Wthdrawal API
The User Withdrawal Request API allow you to post user Withdrawal request, this will retrn you user Withdrawal request sent or not.
POST: /wp-json/letscms/v1/withdrawal_request
Parameter | Type | Position | # | Description |
---|---|---|---|---|
letscms_token | string |
Headers |
Required |
Letscms Token is generate when user attempt login or register API. |
amount | Float |
Body |
Required |
This is amount that user want to withdrawal. |
Parameter | letscms_token |
---|---|
Type | string |
Position | Headers |
# | Required |
Description | Letscms Token is generate when user attempt login or register API |
Parameter | amount |
Type | Float |
Position | Body |
# | Required |
Description | This is amount that user want to withdrawal |
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => '{{site_url}}/wp-json/letscms/v1/withdrawal_request',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => array('amount' => '2'),
CURLOPT_HTTPHEADER => array(
'letscms_token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...',
'Cookie: PHPSESSID=onp12foas4cn1dsdodjv9ri1qm'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var form = new FormData();
form.append("amount", "2");
var settings = {
"url": "{{site_url}}/wp-json/letscms/v1/withdrawal_request",
"method": "POST",
"timeout": 0,
"headers": {
"letscms_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...",
"Cookie": "PHPSESSID=onp12foas4cn1dsdodjv9ri1qm"
},
"processData": false,
"mimeType": "multipart/form-data",
"contentType": false,
"data": form
};
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require('request');
var options = {
'method': 'POST',
'url': '{{site_url}}/wp-json/letscms/v1/withdrawal_request',
'headers': {
'letscms_token': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...',
'Cookie': 'PHPSESSID=onp12foas4cn1dsdodjv9ri1qm'
},
formData: {
'amount': '2'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
url = "{{site_url}}/wp-json/letscms/v1/withdrawal_request"
payload={'amount': '2'}
files=[
]
headers = {
'letscms_token': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...',
'Cookie': 'PHPSESSID=onp12foas4cn1dsdodjv9ri1qm'
}
response = requests.request("POST", url, headers=headers, data=payload, files=files)
print(response.text)
var client = new RestClient("{{site_url}}/wp-json/letscms/v1/withdrawal_request");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("letscms_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...");
request.AddHeader("Cookie", "PHPSESSID=onp12foas4cn1dsdodjv9ri1qm");
request.AlwaysMultipartFormData = true;
request.AddParameter("amount", "2");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request POST '{{site_url}}/wp-json/letscms/v1/withdrawal_request' \
--header 'letscms_token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...' \
--header 'Cookie: PHPSESSID=onp12foas4cn1dsdodjv9ri1qm' \
--form 'amount="2"'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = new MultipartBody.Builder().setType(MultipartBody.FORM)
.addFormDataPart("amount","2")
.build();
Request request = new Request.Builder()
.url("{{site_url}}/wp-json/letscms/v1/withdrawal_request")
.method("POST", body)
.addHeader("letscms_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9....")
.addHeader("Cookie", "PHPSESSID=onp12foas4cn1dsdodjv9ri1qm")
.build();
Response response = client.newCall(request).execute();
require "uri"
require "net/http"
url = URI("{{site_url}}/wp-json/letscms/v1/withdrawal_request")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)
request["letscms_token"] = "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9..."
request["Cookie"] = "PHPSESSID=onp12foas4cn1dsdodjv9ri1qm"
form_data = [['amount', '2']]
request.set_form form_data, 'multipart/form-data'
response = http.request(request)
puts response.read_body
Response
{
"status": true,
"errors": [],
"message": "Withdrawal Request submit successfully"
}
BMW User Join Bmw API
The User Join Bmw helps simple user to be a Bmp user, this will retrn you user join bmw success or error .
POST: /wp-json/letscms/v1/Join_bmw
Parameter | Type | Position | # | Description |
---|---|---|---|---|
letscms_token | string |
Headers |
Required |
Letscms Token is generate when user attempt login or register API. |
sponsor_name | String |
Body |
Required |
Sponsor name . |
parent_name | Integer |
Body |
Required |
Parent name. |
position | String |
Body |
Required |
Position Left / Right. |
Parameter | letscms_token |
---|---|
Type | string |
Position | Headers |
# | Required |
Description | Letscms Token is generate when user attempt login or register API |
Parameter | sponsor_name |
Type | String |
Position | Body |
# | Required |
Description | Sponsor name . |
Parameter | parent_name |
Type | String |
Position | Body |
# | Required |
Description | Parent Name. |
Parameter | position |
Type | String |
Position | Body |
# | Required |
Description | Position Left / Right. |
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => '{{site_url}}/wp-json/letscms/v1/Join_bmw',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => array('sponsor_name' => 'test','parent_name' => 'test14','position' => 'left'),
CURLOPT_HTTPHEADER => array(
'letscms_token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9....',
'Cookie: PHPSESSID=onp12foas4cn1dsdodjv9ri1qm'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var form = new FormData();
form.append("sponsor_name", "test");
form.append("parent_name", "test14");
form.append("position", "left");
var settings = {
"url": "{{site_url}}/wp-json/letscms/v1/Join_bmw",
"method": "POST",
"timeout": 0,
"headers": {
"letscms_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9....",
"Cookie": "PHPSESSID=onp12foas4cn1dsdodjv9ri1qm"
},
"processData": false,
"mimeType": "multipart/form-data",
"contentType": false,
"data": form
};
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require('request');
var options = {
'method': 'POST',
'url': '{{site_url}}/wp-json/letscms/v1/Join_bmw',
'headers': {
'letscms_token': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9....',
'Cookie': 'PHPSESSID=onp12foas4cn1dsdodjv9ri1qm'
},
formData: {
'sponsor_name': 'test',
'parent_name': 'test14',
'position': 'left'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
url = "{{site_url}}/wp-json/letscms/v1/Join_bmw"
payload={'sponsor_name': 'test',
'parent_name': 'test14',
'position': 'left'}
files=[
]
headers = {
'letscms_token': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...',
'Cookie': 'PHPSESSID=onp12foas4cn1dsdodjv9ri1qm'
}
response = requests.request("POST", url, headers=headers, data=payload, files=files)
print(response.text)
var client = new RestClient("{{site_url}}/wp-json/letscms/v1/Join_bmw");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("letscms_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...");
request.AddHeader("Cookie", "PHPSESSID=onp12foas4cn1dsdodjv9ri1qm");
request.AlwaysMultipartFormData = true;
request.AddParameter("sponsor_name", "test");
request.AddParameter("parent_name", "test14");
request.AddParameter("position", "left");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request POST '{{site_url}}/wp-json/letscms/v1/Join_bmw' \
--header 'letscms_token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9....' \
--header 'Cookie: PHPSESSID=onp12foas4cn1dsdodjv9ri1qm' \
--form 'sponsor_name="test"' \
--form 'parent_name="test14"' \
--form 'position="left"'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = new MultipartBody.Builder().setType(MultipartBody.FORM)
.addFormDataPart("sponsor_name","test")
.addFormDataPart("parent_name","test14")
.addFormDataPart("position","left")
.build();
Request request = new Request.Builder()
.url("{{site_url}}/wp-json/letscms/v1/Join_bmw")
.method("POST", body)
.addHeader("letscms_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...")
.addHeader("Cookie", "PHPSESSID=onp12foas4cn1dsdodjv9ri1qm")
.build();
Response response = client.newCall(request).execute();
require "uri"
require "net/http"
url = URI("{{site_url}}/wp-json/letscms/v1/Join_bmw")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)
request["letscms_token"] = "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9..."
request["Cookie"] = "PHPSESSID=onp12foas4cn1dsdodjv9ri1qm"
form_data = [['sponsor_name', 'test'],['parent_name', 'test14'],['position', 'left']]
request.set_form form_data, 'multipart/form-data'
response = http.request(request)
puts response.read_body
Response
{
"status": true,
"errors": [],
"message": "Successfully join BMW network"
}
BMW Affiliate link API
The User Join Affiliate link API helps user to send a BMP user affiliate url, this will retrn you success or error .
POST: /wp-json/letscms/v1/send_affiliate_link
Parameter | Type | Position | # | Description |
---|---|---|---|---|
country_code | String |
Body |
Required |
Country code . |
phone | Integer |
Body |
Required |
Mobile Number . |
Parameter | country_code |
---|---|
Type | string |
Position | Body |
# | Required |
Description | Country code |
Parameter | phone |
Type | Integer |
Position | Body |
# | Required |
Description | Mobile Number. |
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => '{{site_url}}/wp-json/letscms/v1/send_affiliate_link',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => array('email' => 'tarun.letscms@gmail.com'),
CURLOPT_HTTPHEADER => array(
'letscms_token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...',
'Cookie: PHPSESSID=onp12foas4cn1dsdodjv9ri1qm'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var form = new FormData();
form.append("email", "tarun.letscms@gmail.com");
var settings = {
"url": "{{site_url}}/wp-json/letscms/v1/send_affiliate_link",
"method": "POST",
"timeout": 0,
"headers": {
"letscms_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...",
"Cookie": "PHPSESSID=onp12foas4cn1dsdodjv9ri1qm"
},
"processData": false,
"mimeType": "multipart/form-data",
"contentType": false,
"data": form
};
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require('request');
var options = {
'method': 'POST',
'url': '{{site_url}}/wp-json/letscms/v1/send_affiliate_link',
'headers': {
'letscms_token': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...',
'Cookie': 'PHPSESSID=onp12foas4cn1dsdodjv9ri1qm'
},
formData: {
'email': 'tarun.letscms@gmail.com'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
url = "{{site_url}}/wp-json/letscms/v1/send_affiliate_link"
payload={'email': 'tarun.letscms@gmail.com'}
files=[
]
headers = {
'letscms_token': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...',
'Cookie': 'PHPSESSID=onp12foas4cn1dsdodjv9ri1qm'
}
response = requests.request("POST", url, headers=headers, data=payload, files=files)
print(response.text)
var client = new RestClient("{{site_url}}/wp-json/letscms/v1/send_affiliate_link");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("letscms_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9....");
request.AddHeader("Cookie", "PHPSESSID=onp12foas4cn1dsdodjv9ri1qm");
request.AlwaysMultipartFormData = true;
request.AddParameter("email", "tarun.letscms@gmail.com");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request POST '{{site_url}}/wp-json/letscms/v1/send_affiliate_link' \
--header 'letscms_token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...' \
--header 'Cookie: PHPSESSID=onp12foas4cn1dsdodjv9ri1qm' \
--form 'email="tarun.letscms@gmail.com"'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = new MultipartBody.Builder().setType(MultipartBody.FORM)
.addFormDataPart("email","tarun.letscms@gmail.com")
.build();
Request request = new Request.Builder()
.url("{{site_url}}/wp-json/letscms/v1/send_affiliate_link")
.method("POST", body)
.addHeader("letscms_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...")
.addHeader("Cookie", "PHPSESSID=onp12foas4cn1dsdodjv9ri1qm")
.build();
Response response = client.newCall(request).execute();
require "uri"
require "net/http"
url = URI("{{site_url}}/wp-json/letscms/v1/send_affiliate_link")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)
request["letscms_token"] = "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9....."
request["Cookie"] = "PHPSESSID=onp12foas4cn1dsdodjv9ri1qm"
form_data = [['email', 'tarun.letscms@gmail.com']]
request.set_form form_data, 'multipart/form-data'
response = http.request(request)
puts response.read_body
Response
{
"status": true,
"errors": [],
"message": "Affiliate link successfully sent!"
}