LETS WOO APIs
Lets Woo APIs is fully integrated with the WordPress REST API. This allows WooCommerce interact with your WordPress site by sending and receiving data as JSON (JavaScript Object Notation) objects. Using the Lets Woo REST API you can create users, withdrawals and it provides data access to the content of 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
LETS WOO 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 LETS WOO 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 characters not allowed in username. |
password | string |
Body |
Required |
Password allows Aa-Zz,0-9,Special characters. |
Parameter | username |
---|---|
Type | string |
Position | Body |
# | Required |
Description | User Name allows only normal strings and numbers, special characters not allowed in username. |
Parameter | password |
Type | string |
Position | Body |
# | Required |
Description | Password allows Aa-Zz,0-9,Special characters. |
"http://wooapi.vxinfosystem.com/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' => 'user001@test.com','password' => '1234567890'),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var form = new FormData();
form.append("username", "user001@test.com");
form.append("password", "1234567890");
var settings = {
"url": "http://wooapi.vxinfosystem.com/wp-json/letscms/v1/auth/login",
"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': 'http://wooapi.vxinfosystem.com/wp-json/letscms/v1/auth/login',
'headers': {
},
formData: {
'username': 'user001@test.com',
'password': '1234567890'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
url = "http://wooapi.vxinfosystem.com/wp-json/letscms/v1/auth/login"
payload = {'username': 'user001@test.com',
'password': '1234567890'}
files = [
]
headers= {}
response = requests.request("POST", url, headers=headers, data = payload, files = files)
print(response.text.encode('utf8'))
var client = new RestClient("http://wooapi.vxinfosystem.com/wp-json/letscms/v1/auth/login");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AlwaysMultipartFormData = true;
request.AddParameter("username", "user001@test.com");
request.AddParameter("password", "1234567890");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request POST 'http://wooapi.vxinfosystem.com/wp-json/letscms/v1/auth/login' \
--form 'username=user001@test.com' \
--form 'password=1234567890'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = new MultipartBody.Builder().setType(MultipartBody.FORM)
.addFormDataPart("username", "user001@test.com")
.addFormDataPart("password", "1234567890")
.build();
Request request = new Request.Builder()
.url("http://wooapi.vxinfosystem.com/wp-json/letscms/v1/auth/login")
.method("POST", body)
.build();
Response response = client.newCall(request).execute();
require "uri"
require "net/http"
url = URI("http://wooapi.vxinfosystem.com/wp-json/letscms/v1/auth/login")
https = Net::HTTP.new(url.host, url.port);
https.use_ssl = true
request = Net::HTTP::Post.new(url)
form_data = [['username', 'user001@test.com'],['password', '1234567890']]
request.set_form form_data, 'multipart/form-data'
response = https.request(request)
puts response.read_body
Success Response
{
"status": true,
"errors": [],
"message": "",
"letscms_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJS..............UzI1NiJ9.gthX9fwdW2r9D33u872rqCQ",
"user": {
"ID": "6",
"user_login": "user001",
"user_nicename": "user001",
"user_email": "user001@test.com",
"user_url": "",
"user_registered": "2020-10-15 12:17:17",
"user_activation_key": "1602764238:$P$BUqBMTVtPQ4uQUa6dSSo12jbVHVoTL1",
"user_status": "0",
"display_name": "user001 test",
"first_name": "user001",
"last_name": "test"
}
}
Response Failed
{
"status": false,
"errors": {
"username": "username is required.",
"password": "password is required."
},
"message": "invalid login details."
}
LETS WOO 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 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 |
User name is a unique string, this is allows only Aa-Zz and 0-9 characters. |
password | string |
Body |
Required |
Password allows Aa-Zz,0-9 and Special characters. |
string |
Body |
Required |
Each user must have the unique email address same email address not allowed. |
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 | User name is a unique string, this is allows only Aa-Zz and 0-9 characters. |
Parameter | password |
Type | string |
Position | Body |
# | Required |
Description | Password allows Aa-Zz,0-9 and Special characters. |
Parameter | |
Type | string |
Position | Body |
# | Required |
Description | Each user must have the unique email address same email address not allowed. |
"http://wooapi.vxinfosystem.com/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' => 'user022','first_name' => 'User022','last_name' => 'Test','password' => '1234567890','email' => 'user022@test.com'),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var form = new FormData();
form.append("username", "user022");
form.append("first_name", "User022");
form.append("last_name", "Test");
form.append("password", "1234567890");
form.append("email", "user022@test.com");
var settings = {
"url": "http://wooapi.vxinfosystem.com/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': 'http://wooapi.vxinfosystem.com/wp-json/letscms/v1/auth/register',
'headers': {
},
formData: {
'username': 'user022',
'first_name': 'User022',
'last_name': 'Test',
'password': '1234567890',
'email': 'user022@test.com'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
url = "http://wooapi.vxinfosystem.com/wp-json/letscms/v1/auth/register"
payload = {'username': 'user022',
'first_name': 'User022',
'last_name': 'Test',
'password': '1234567890',
'email': 'user022@test.com'}
files = [
]
headers= {}
response = requests.request("POST", url, headers=headers, data = payload, files = files)
print(response.text.encode('utf8'))
var client = new RestClient("http://wooapi.vxinfosystem.com/wp-json/letscms/v1/auth/register");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AlwaysMultipartFormData = true;
request.AddParameter("username", "user022");
request.AddParameter("first_name", "User022");
request.AddParameter("last_name", "Test");
request.AddParameter("password", "1234567890");
request.AddParameter("email", "user022@test.com");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request POST 'http://wooapi.vxinfosystem.com/wp-json/letscms/v1/auth/register' \
--form 'username=user022' \
--form 'first_name=User022' \
--form 'last_name=Test' \
--form 'password=1234567890' \
--form 'email=user022@test.com'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = new MultipartBody.Builder().setType(MultipartBody.FORM)
.addFormDataPart("username", "user022")
.addFormDataPart("first_name", "User022")
.addFormDataPart("last_name", "Test")
.addFormDataPart("password", "1234567890")
.addFormDataPart("email", "user022@test.com")
.build();
Request request = new Request.Builder()
.url("http://wooapi.vxinfosystem.com/wp-json/letscms/v1/auth/register")
.method("POST", body)
.build();
Response response = client.newCall(request).execute();
require "uri"
require "net/http"
url = URI("http://wooapi.vxinfosystem.com/wp-json/letscms/v1/auth/register")
https = Net::HTTP.new(url.host, url.port);
https.use_ssl = true
request = Net::HTTP::Post.new(url)
form_data = [['username', 'user022'],['first_name', 'User022'],['last_name', 'Test'],['password', '1234567890'],['email', 'user022@test.com']]
request.set_form form_data, 'multipart/form-data'
response = https.request(request)
puts response.read_body
Success Response
{
"status": true,
"errors": [],
"message": "",
"letscms_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJS..............UzI1NiJ9.gthX9fwdW2r9D33u872rqCQ",
"user": {
"ID": "6",
"user_login": "user001",
"user_nicename": "user001",
"user_email": "user001@test.com",
"user_url": "",
"user_registered": "2020-10-15 12:17:17",
"user_activation_key": "1602764238:$P$BUqBMTVtPQ4uQUa6dSSo12jbVHVoTL1",
"user_status": "0",
"display_name": "user001 test",
"first_name": "user001",
"last_name": "test"
}
}
Response Failed
{
"status": false,
"errors": {
"username": "username is required",
"username": "username is already exists",
"first_name": "first name is required",
"last_name": "last name is required",
"password": "password is required",
"email": "email is required",
"email": "email already exists"
},
"message": ""
}
LETS WOO Add to Cart API
The "Add to Cart" API enables you to add any number of items to a customer's shopping cart and send the customer to the web site for completing the purchase.
POST: /wp-json/letscms/v1/cart/add-item
Parameter | Type | Position | # | Description |
---|---|---|---|---|
letscms_token | String |
headers |
Required |
Letscms Token is generate when user attempt login or register API. |
product_id | Integer |
Body |
Required |
Product id of the product that you want to add in cart. |
quantity | Integer |
Body |
Required |
Quentity of product how much product you want to purchase. |
Parameter | letscms_token |
---|---|
Type | String |
Position | headers |
# | Required |
Description | Letscms Token is generate when user attempt login or register API. |
Parameter | product_id |
Type | Integer |
Position | Body |
# | Required |
Description | Product id of the product that you want to add in cart. |
Parameter | quantity |
Type | Integer |
Position | Body |
# | Required |
Description | Quentity of product how much product you want to purchase. |
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "http://wooapi.vxinfosystem.com/wp-json/letscms/v1/cart/add-item",
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('product_id' => '316','quantity' => '10'),
CURLOPT_HTTPHEADER => array(
"letscms_token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJJRCI6IjYiLCJ1c2VyX2xvZ2luIjoidXNlcjAwMSIsInVzZXJfbmljZW5hbWUiOiJ1c2VyMDAxIiwidXNlcl9lbWFpbCI6InVzZXIwMDFAdGVzdC5jb20iLCJ1c2VyX3VybCI6IiIsInVzZXJfcmVnaXN0ZXJlZCI6IjIwMjAtMTAtMTUgMTI6MTc6MTciLCJ1c2VyX2FjdGl2YXRpb25fa2V5IjoiMTYwMjc2NDIzODokUCRCVXFCTVRWdFBRNHVRVWE2ZFNTbzEyamJWSFZvVEwxIiwidXNlcl9zdGF0dXMiOiIwIiwiZGlzcGxheV9uYW1lIjoidXNlcjAwMSB0ZXN0IiwibGFzdF9sb2dpbiI6MTYwODA5NjQ3MH0.JyU-3Y2N6h5ye2m31wf-m7lYStyDwxroEKU3Ko9_4pXwk23rVu_9PdoDXfhFWJKrWlGIjx8byj2ICFdKlLvASjRp6YSlj-VALStZzQawXL8-iXJroMrZjnkK4kNtkYG26TCEmEfbS3L-qTRtq2UYVl9TwJ6hEiTbYe0SCoJB5hQ5NNS4GEyniUU5pvPbTbFaGUQ7_4-9AWXVBYyrR0ng99qR9U2uwu7V1I9ChqK4VtmhdMkQr3UbnD7uz8RTUyOKTEGuKk6_2h7bLHcnC5eC3lFVmaDi07Detj8dClGKLHmuCAKGGsfJo0oeo5TiwtQ4nfg1t-t0miGuFg-kjv_7NGO5F-2UGUWNNa0AyxcTRr6y7F249caFYBsvU2fzGH34lOi9qlxH4qgh1Yg4HH7DAmCe7VRr85cxyquGHIJZHk9WlkWwU8HSHEQ59ZZhGdmqAHgVpElQb80v2_NFLBUH0doQIKfX9lKoxxHgH8yqmJk8DL1pYIX6kWheqHREoOkNWUMsm3HT8zYiDp1x-yOPUwrKwyxanExaEHebFIhusWEvKcyBMJSwgOF9MzNc6KRDu5VHK7Rqs68fSc6_jX6at731R-C9cVrO9jabzRXP4rohYU_FNQSuIgRIY0m0CfNbZ_4aJ1o8ulKu8g1rqPBdLTmT1Sag17ZswqtI7qwkEwI"
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var form = new FormData();
form.append("product_id", "316");
form.append("quantity", "10");
var settings = {
"url": "http://wooapi.vxinfosystem.com/wp-json/letscms/v1/cart/add-item",
"method": "POST",
"timeout": 0,
"headers": {
"letscms_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJJRCI6IjYiLCJ1c2VyX2xvZ2luIjoidXNlcjAwMSIsInVzZXJfbmljZW5hbWUiOiJ1c2VyMDAxIiwidXNlcl9lbWFpbCI6InVzZXIwMDFAdGVzdC5jb20iLCJ1c2VyX3VybCI6IiIsInVzZXJfcmVnaXN0ZXJlZCI6IjIwMjAtMTAtMTUgMTI6MTc6MTciLCJ1c2VyX2FjdGl2YXRpb25fa2V5IjoiMTYwMjc2NDIzODokUCRCVXFCTVRWdFBRNHVRVWE2ZFNTbzEyamJWSFZvVEwxIiwidXNlcl9zdGF0dXMiOiIwIiwiZGlzcGxheV9uYW1lIjoidXNlcjAwMSB0ZXN0IiwibGFzdF9sb2dpbiI6MTYwODA5NjQ3MH0.JyU-3Y2N6h5ye2m31wf-m7lYStyDwxroEKU3Ko9_4pXwk23rVu_9PdoDXfhFWJKrWlGIjx8byj2ICFdKlLvASjRp6YSlj-VALStZzQawXL8-iXJroMrZjnkK4kNtkYG26TCEmEfbS3L-qTRtq2UYVl9TwJ6hEiTbYe0SCoJB5hQ5NNS4GEyniUU5pvPbTbFaGUQ7_4-9AWXVBYyrR0ng99qR9U2uwu7V1I9ChqK4VtmhdMkQr3UbnD7uz8RTUyOKTEGuKk6_2h7bLHcnC5eC3lFVmaDi07Detj8dClGKLHmuCAKGGsfJo0oeo5TiwtQ4nfg1t-t0miGuFg-kjv_7NGO5F-2UGUWNNa0AyxcTRr6y7F249caFYBsvU2fzGH34lOi9qlxH4qgh1Yg4HH7DAmCe7VRr85cxyquGHIJZHk9WlkWwU8HSHEQ59ZZhGdmqAHgVpElQb80v2_NFLBUH0doQIKfX9lKoxxHgH8yqmJk8DL1pYIX6kWheqHREoOkNWUMsm3HT8zYiDp1x-yOPUwrKwyxanExaEHebFIhusWEvKcyBMJSwgOF9MzNc6KRDu5VHK7Rqs68fSc6_jX6at731R-C9cVrO9jabzRXP4rohYU_FNQSuIgRIY0m0CfNbZ_4aJ1o8ulKu8g1rqPBdLTmT1Sag17ZswqtI7qwkEwI"
},
"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': 'http://wooapi.vxinfosystem.com/wp-json/letscms/v1/cart/add-item',
'headers': {
'letscms_token': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJJRCI6IjYiLCJ1c2VyX2xvZ2luIjoidXNlcjAwMSIsInVzZXJfbmljZW5hbWUiOiJ1c2VyMDAxIiwidXNlcl9lbWFpbCI6InVzZXIwMDFAdGVzdC5jb20iLCJ1c2VyX3VybCI6IiIsInVzZXJfcmVnaXN0ZXJlZCI6IjIwMjAtMTAtMTUgMTI6MTc6MTciLCJ1c2VyX2FjdGl2YXRpb25fa2V5IjoiMTYwMjc2NDIzODokUCRCVXFCTVRWdFBRNHVRVWE2ZFNTbzEyamJWSFZvVEwxIiwidXNlcl9zdGF0dXMiOiIwIiwiZGlzcGxheV9uYW1lIjoidXNlcjAwMSB0ZXN0IiwibGFzdF9sb2dpbiI6MTYwODA5NjQ3MH0.JyU-3Y2N6h5ye2m31wf-m7lYStyDwxroEKU3Ko9_4pXwk23rVu_9PdoDXfhFWJKrWlGIjx8byj2ICFdKlLvASjRp6YSlj-VALStZzQawXL8-iXJroMrZjnkK4kNtkYG26TCEmEfbS3L-qTRtq2UYVl9TwJ6hEiTbYe0SCoJB5hQ5NNS4GEyniUU5pvPbTbFaGUQ7_4-9AWXVBYyrR0ng99qR9U2uwu7V1I9ChqK4VtmhdMkQr3UbnD7uz8RTUyOKTEGuKk6_2h7bLHcnC5eC3lFVmaDi07Detj8dClGKLHmuCAKGGsfJo0oeo5TiwtQ4nfg1t-t0miGuFg-kjv_7NGO5F-2UGUWNNa0AyxcTRr6y7F249caFYBsvU2fzGH34lOi9qlxH4qgh1Yg4HH7DAmCe7VRr85cxyquGHIJZHk9WlkWwU8HSHEQ59ZZhGdmqAHgVpElQb80v2_NFLBUH0doQIKfX9lKoxxHgH8yqmJk8DL1pYIX6kWheqHREoOkNWUMsm3HT8zYiDp1x-yOPUwrKwyxanExaEHebFIhusWEvKcyBMJSwgOF9MzNc6KRDu5VHK7Rqs68fSc6_jX6at731R-C9cVrO9jabzRXP4rohYU_FNQSuIgRIY0m0CfNbZ_4aJ1o8ulKu8g1rqPBdLTmT1Sag17ZswqtI7qwkEwI'
},
formData: {
'product_id': '316',
'quantity': '10'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
url = "http://wooapi.vxinfosystem.com/wp-json/letscms/v1/cart/add-item"
payload = {'product_id': '316',
'quantity': '10'}
files = [
]
headers = {
'letscms_token': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJJRCI6IjYiLCJ1c2VyX2xvZ2luIjoidXNlcjAwMSIsInVzZXJfbmljZW5hbWUiOiJ1c2VyMDAxIiwidXNlcl9lbWFpbCI6InVzZXIwMDFAdGVzdC5jb20iLCJ1c2VyX3VybCI6IiIsInVzZXJfcmVnaXN0ZXJlZCI6IjIwMjAtMTAtMTUgMTI6MTc6MTciLCJ1c2VyX2FjdGl2YXRpb25fa2V5IjoiMTYwMjc2NDIzODokUCRCVXFCTVRWdFBRNHVRVWE2ZFNTbzEyamJWSFZvVEwxIiwidXNlcl9zdGF0dXMiOiIwIiwiZGlzcGxheV9uYW1lIjoidXNlcjAwMSB0ZXN0IiwibGFzdF9sb2dpbiI6MTYwODA5NjQ3MH0.JyU-3Y2N6h5ye2m31wf-m7lYStyDwxroEKU3Ko9_4pXwk23rVu_9PdoDXfhFWJKrWlGIjx8byj2ICFdKlLvASjRp6YSlj-VALStZzQawXL8-iXJroMrZjnkK4kNtkYG26TCEmEfbS3L-qTRtq2UYVl9TwJ6hEiTbYe0SCoJB5hQ5NNS4GEyniUU5pvPbTbFaGUQ7_4-9AWXVBYyrR0ng99qR9U2uwu7V1I9ChqK4VtmhdMkQr3UbnD7uz8RTUyOKTEGuKk6_2h7bLHcnC5eC3lFVmaDi07Detj8dClGKLHmuCAKGGsfJo0oeo5TiwtQ4nfg1t-t0miGuFg-kjv_7NGO5F-2UGUWNNa0AyxcTRr6y7F249caFYBsvU2fzGH34lOi9qlxH4qgh1Yg4HH7DAmCe7VRr85cxyquGHIJZHk9WlkWwU8HSHEQ59ZZhGdmqAHgVpElQb80v2_NFLBUH0doQIKfX9lKoxxHgH8yqmJk8DL1pYIX6kWheqHREoOkNWUMsm3HT8zYiDp1x-yOPUwrKwyxanExaEHebFIhusWEvKcyBMJSwgOF9MzNc6KRDu5VHK7Rqs68fSc6_jX6at731R-C9cVrO9jabzRXP4rohYU_FNQSuIgRIY0m0CfNbZ_4aJ1o8ulKu8g1rqPBdLTmT1Sag17ZswqtI7qwkEwI'
}
response = requests.request("POST", url, headers=headers, data = payload, files = files)
print(response.text.encode('utf8'))
var client = new RestClient("http://wooapi.vxinfosystem.com/wp-json/letscms/v1/cart/add-item");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("letscms_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJJRCI6IjYiLCJ1c2VyX2xvZ2luIjoidXNlcjAwMSIsInVzZXJfbmljZW5hbWUiOiJ1c2VyMDAxIiwidXNlcl9lbWFpbCI6InVzZXIwMDFAdGVzdC5jb20iLCJ1c2VyX3VybCI6IiIsInVzZXJfcmVnaXN0ZXJlZCI6IjIwMjAtMTAtMTUgMTI6MTc6MTciLCJ1c2VyX2FjdGl2YXRpb25fa2V5IjoiMTYwMjc2NDIzODokUCRCVXFCTVRWdFBRNHVRVWE2ZFNTbzEyamJWSFZvVEwxIiwidXNlcl9zdGF0dXMiOiIwIiwiZGlzcGxheV9uYW1lIjoidXNlcjAwMSB0ZXN0IiwibGFzdF9sb2dpbiI6MTYwODA5NjQ3MH0.JyU-3Y2N6h5ye2m31wf-m7lYStyDwxroEKU3Ko9_4pXwk23rVu_9PdoDXfhFWJKrWlGIjx8byj2ICFdKlLvASjRp6YSlj-VALStZzQawXL8-iXJroMrZjnkK4kNtkYG26TCEmEfbS3L-qTRtq2UYVl9TwJ6hEiTbYe0SCoJB5hQ5NNS4GEyniUU5pvPbTbFaGUQ7_4-9AWXVBYyrR0ng99qR9U2uwu7V1I9ChqK4VtmhdMkQr3UbnD7uz8RTUyOKTEGuKk6_2h7bLHcnC5eC3lFVmaDi07Detj8dClGKLHmuCAKGGsfJo0oeo5TiwtQ4nfg1t-t0miGuFg-kjv_7NGO5F-2UGUWNNa0AyxcTRr6y7F249caFYBsvU2fzGH34lOi9qlxH4qgh1Yg4HH7DAmCe7VRr85cxyquGHIJZHk9WlkWwU8HSHEQ59ZZhGdmqAHgVpElQb80v2_NFLBUH0doQIKfX9lKoxxHgH8yqmJk8DL1pYIX6kWheqHREoOkNWUMsm3HT8zYiDp1x-yOPUwrKwyxanExaEHebFIhusWEvKcyBMJSwgOF9MzNc6KRDu5VHK7Rqs68fSc6_jX6at731R-C9cVrO9jabzRXP4rohYU_FNQSuIgRIY0m0CfNbZ_4aJ1o8ulKu8g1rqPBdLTmT1Sag17ZswqtI7qwkEwI");
request.AlwaysMultipartFormData = true;
request.AddParameter("product_id", "316");
request.AddParameter("quantity", "10");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request POST 'http://wooapi.vxinfosystem.com/wp-json/letscms/v1/cart/add-item' \
--header 'letscms_token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJJRCI6IjYiLCJ1c2VyX2xvZ2luIjoidXNlcjAwMSIsInVzZXJfbmljZW5hbWUiOiJ1c2VyMDAxIiwidXNlcl9lbWFpbCI6InVzZXIwMDFAdGVzdC5jb20iLCJ1c2VyX3VybCI6IiIsInVzZXJfcmVnaXN0ZXJlZCI6IjIwMjAtMTAtMTUgMTI6MTc6MTciLCJ1c2VyX2FjdGl2YXRpb25fa2V5IjoiMTYwMjc2NDIzODokUCRCVXFCTVRWdFBRNHVRVWE2ZFNTbzEyamJWSFZvVEwxIiwidXNlcl9zdGF0dXMiOiIwIiwiZGlzcGxheV9uYW1lIjoidXNlcjAwMSB0ZXN0IiwibGFzdF9sb2dpbiI6MTYwODA5NjQ3MH0.JyU-3Y2N6h5ye2m31wf-m7lYStyDwxroEKU3Ko9_4pXwk23rVu_9PdoDXfhFWJKrWlGIjx8byj2ICFdKlLvASjRp6YSlj-VALStZzQawXL8-iXJroMrZjnkK4kNtkYG26TCEmEfbS3L-qTRtq2UYVl9TwJ6hEiTbYe0SCoJB5hQ5NNS4GEyniUU5pvPbTbFaGUQ7_4-9AWXVBYyrR0ng99qR9U2uwu7V1I9ChqK4VtmhdMkQr3UbnD7uz8RTUyOKTEGuKk6_2h7bLHcnC5eC3lFVmaDi07Detj8dClGKLHmuCAKGGsfJo0oeo5TiwtQ4nfg1t-t0miGuFg-kjv_7NGO5F-2UGUWNNa0AyxcTRr6y7F249caFYBsvU2fzGH34lOi9qlxH4qgh1Yg4HH7DAmCe7VRr85cxyquGHIJZHk9WlkWwU8HSHEQ59ZZhGdmqAHgVpElQb80v2_NFLBUH0doQIKfX9lKoxxHgH8yqmJk8DL1pYIX6kWheqHREoOkNWUMsm3HT8zYiDp1x-yOPUwrKwyxanExaEHebFIhusWEvKcyBMJSwgOF9MzNc6KRDu5VHK7Rqs68fSc6_jX6at731R-C9cVrO9jabzRXP4rohYU_FNQSuIgRIY0m0CfNbZ_4aJ1o8ulKu8g1rqPBdLTmT1Sag17ZswqtI7qwkEwI' \
--form 'product_id=316' \
--form 'quantity=10'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = new MultipartBody.Builder().setType(MultipartBody.FORM)
.addFormDataPart("product_id", "316")
.addFormDataPart("quantity", "10")
.build();
Request request = new Request.Builder()
.url("http://wooapi.vxinfosystem.com/wp-json/letscms/v1/cart/add-item")
.method("POST", body)
.addHeader("letscms_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJJRCI6IjYiLCJ1c2VyX2xvZ2luIjoidXNlcjAwMSIsInVzZXJfbmljZW5hbWUiOiJ1c2VyMDAxIiwidXNlcl9lbWFpbCI6InVzZXIwMDFAdGVzdC5jb20iLCJ1c2VyX3VybCI6IiIsInVzZXJfcmVnaXN0ZXJlZCI6IjIwMjAtMTAtMTUgMTI6MTc6MTciLCJ1c2VyX2FjdGl2YXRpb25fa2V5IjoiMTYwMjc2NDIzODokUCRCVXFCTVRWdFBRNHVRVWE2ZFNTbzEyamJWSFZvVEwxIiwidXNlcl9zdGF0dXMiOiIwIiwiZGlzcGxheV9uYW1lIjoidXNlcjAwMSB0ZXN0IiwibGFzdF9sb2dpbiI6MTYwODA5NjQ3MH0.JyU-3Y2N6h5ye2m31wf-m7lYStyDwxroEKU3Ko9_4pXwk23rVu_9PdoDXfhFWJKrWlGIjx8byj2ICFdKlLvASjRp6YSlj-VALStZzQawXL8-iXJroMrZjnkK4kNtkYG26TCEmEfbS3L-qTRtq2UYVl9TwJ6hEiTbYe0SCoJB5hQ5NNS4GEyniUU5pvPbTbFaGUQ7_4-9AWXVBYyrR0ng99qR9U2uwu7V1I9ChqK4VtmhdMkQr3UbnD7uz8RTUyOKTEGuKk6_2h7bLHcnC5eC3lFVmaDi07Detj8dClGKLHmuCAKGGsfJo0oeo5TiwtQ4nfg1t-t0miGuFg-kjv_7NGO5F-2UGUWNNa0AyxcTRr6y7F249caFYBsvU2fzGH34lOi9qlxH4qgh1Yg4HH7DAmCe7VRr85cxyquGHIJZHk9WlkWwU8HSHEQ59ZZhGdmqAHgVpElQb80v2_NFLBUH0doQIKfX9lKoxxHgH8yqmJk8DL1pYIX6kWheqHREoOkNWUMsm3HT8zYiDp1x-yOPUwrKwyxanExaEHebFIhusWEvKcyBMJSwgOF9MzNc6KRDu5VHK7Rqs68fSc6_jX6at731R-C9cVrO9jabzRXP4rohYU_FNQSuIgRIY0m0CfNbZ_4aJ1o8ulKu8g1rqPBdLTmT1Sag17ZswqtI7qwkEwI")
.build();
Response response = client.newCall(request).execute();
require "uri"
require "net/http"
url = URI("http://wooapi.vxinfosystem.com/wp-json/letscms/v1/cart/add-item")
https = Net::HTTP.new(url.host, url.port);
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["letscms_token"] = "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJJRCI6IjYiLCJ1c2VyX2xvZ2luIjoidXNlcjAwMSIsInVzZXJfbmljZW5hbWUiOiJ1c2VyMDAxIiwidXNlcl9lbWFpbCI6InVzZXIwMDFAdGVzdC5jb20iLCJ1c2VyX3VybCI6IiIsInVzZXJfcmVnaXN0ZXJlZCI6IjIwMjAtMTAtMTUgMTI6MTc6MTciLCJ1c2VyX2FjdGl2YXRpb25fa2V5IjoiMTYwMjc2NDIzODokUCRCVXFCTVRWdFBRNHVRVWE2ZFNTbzEyamJWSFZvVEwxIiwidXNlcl9zdGF0dXMiOiIwIiwiZGlzcGxheV9uYW1lIjoidXNlcjAwMSB0ZXN0IiwibGFzdF9sb2dpbiI6MTYwODA5NjQ3MH0.JyU-3Y2N6h5ye2m31wf-m7lYStyDwxroEKU3Ko9_4pXwk23rVu_9PdoDXfhFWJKrWlGIjx8byj2ICFdKlLvASjRp6YSlj-VALStZzQawXL8-iXJroMrZjnkK4kNtkYG26TCEmEfbS3L-qTRtq2UYVl9TwJ6hEiTbYe0SCoJB5hQ5NNS4GEyniUU5pvPbTbFaGUQ7_4-9AWXVBYyrR0ng99qR9U2uwu7V1I9ChqK4VtmhdMkQr3UbnD7uz8RTUyOKTEGuKk6_2h7bLHcnC5eC3lFVmaDi07Detj8dClGKLHmuCAKGGsfJo0oeo5TiwtQ4nfg1t-t0miGuFg-kjv_7NGO5F-2UGUWNNa0AyxcTRr6y7F249caFYBsvU2fzGH34lOi9qlxH4qgh1Yg4HH7DAmCe7VRr85cxyquGHIJZHk9WlkWwU8HSHEQ59ZZhGdmqAHgVpElQb80v2_NFLBUH0doQIKfX9lKoxxHgH8yqmJk8DL1pYIX6kWheqHREoOkNWUMsm3HT8zYiDp1x-yOPUwrKwyxanExaEHebFIhusWEvKcyBMJSwgOF9MzNc6KRDu5VHK7Rqs68fSc6_jX6at731R-C9cVrO9jabzRXP4rohYU_FNQSuIgRIY0m0CfNbZ_4aJ1o8ulKu8g1rqPBdLTmT1Sag17ZswqtI7qwkEwI"
form_data = [['product_id', '316'],['quantity', '10']]
request.set_form form_data, 'multipart/form-data'
response = https.request(request)
puts response.read_body
Success Response
{
"status": true,
"errors": [],
"message": "Ship Your Idea added to cart!!",
"coupon_status": false,
"coupon_errors": [],
"data": {
"cart_item_count": 1
}
}
Response Failed
{
"status": false,
"errors": {
"product_id": "Product id is required",
"quantity": "quantity is required"
},
"message": "Please provide letscms_token in header",
"message": "product not exists. Perhaps it was deleted?"
}
LETS WOO Get Cart API
The "Get Cart" API call is used to return information on customer's shopping carts that are open, abandoned or completed, and are saved. This API use for get cart details.
GET: /wp-json/letscms/v1/cart?coupons[]=GET15&coupons[]=GET50
Parameter | Type | Position | # | Description |
---|---|---|---|---|
letscms_token | String |
headers |
Required |
Letscms Token is generate when user attempt login or register API. |
coupons | String |
Params |
Optional |
Array of coupons like coupons[]=GET15&coupons[]=GET50 |
Parameter | letscms_token |
---|---|
Type | String |
Position | headers |
# | Required |
Description | Letscms Token is generate when user attempt login or register API. |
Parameter | coupons |
Type | String |
Position | Params |
# | Optional |
Description | Array of coupons like coupons[]=GET15&coupons[]=GET50 |
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "http://wooapi.vxinfosystem.com/wp-json/letscms/v1/cart?coupons%5B%5D=GET15&coupons%5B%5D=GET50",
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.eyJJRCI6IjYiLCJ1c2VyX2xvZ2luIjoidXNlcjAwMSIsInVzZXJfbmljZW5hbWUiOiJ1c2VyMDAxIiwidXNlcl9lbWFpbCI6InVzZXIwMDFAdGVzdC5jb20iLCJ1c2VyX3VybCI6IiIsInVzZXJfcmVnaXN0ZXJlZCI6IjIwMjAtMTAtMTUgMTI6MTc6MTciLCJ1c2VyX2FjdGl2YXRpb25fa2V5IjoiMTYwMjc2NDIzODokUCRCVXFCTVRWdFBRNHVRVWE2ZFNTbzEyamJWSFZvVEwxIiwidXNlcl9zdGF0dXMiOiIwIiwiZGlzcGxheV9uYW1lIjoidXNlcjAwMSB0ZXN0IiwibGFzdF9sb2dpbiI6MTYwODA5NjQ3MH0.JyU-3Y2N6h5ye2m31wf-m7lYStyDwxroEKU3Ko9_4pXwk23rVu_9PdoDXfhFWJKrWlGIjx8byj2ICFdKlLvASjRp6YSlj-VALStZzQawXL8-iXJroMrZjnkK4kNtkYG26TCEmEfbS3L-qTRtq2UYVl9TwJ6hEiTbYe0SCoJB5hQ5NNS4GEyniUU5pvPbTbFaGUQ7_4-9AWXVBYyrR0ng99qR9U2uwu7V1I9ChqK4VtmhdMkQr3UbnD7uz8RTUyOKTEGuKk6_2h7bLHcnC5eC3lFVmaDi07Detj8dClGKLHmuCAKGGsfJo0oeo5TiwtQ4nfg1t-t0miGuFg-kjv_7NGO5F-2UGUWNNa0AyxcTRr6y7F249caFYBsvU2fzGH34lOi9qlxH4qgh1Yg4HH7DAmCe7VRr85cxyquGHIJZHk9WlkWwU8HSHEQ59ZZhGdmqAHgVpElQb80v2_NFLBUH0doQIKfX9lKoxxHgH8yqmJk8DL1pYIX6kWheqHREoOkNWUMsm3HT8zYiDp1x-yOPUwrKwyxanExaEHebFIhusWEvKcyBMJSwgOF9MzNc6KRDu5VHK7Rqs68fSc6_jX6at731R-C9cVrO9jabzRXP4rohYU_FNQSuIgRIY0m0CfNbZ_4aJ1o8ulKu8g1rqPBdLTmT1Sag17ZswqtI7qwkEwI"
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var settings = {
"url": "http://wooapi.vxinfosystem.com/wp-json/letscms/v1/cart?coupons[]=GET15&coupons[]=GET50",
"method": "GET",
"timeout": 0,
"headers": {
"letscms_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJJRCI6IjYiLCJ1c2VyX2xvZ2luIjoidXNlcjAwMSIsInVzZXJfbmljZW5hbWUiOiJ1c2VyMDAxIiwidXNlcl9lbWFpbCI6InVzZXIwMDFAdGVzdC5jb20iLCJ1c2VyX3VybCI6IiIsInVzZXJfcmVnaXN0ZXJlZCI6IjIwMjAtMTAtMTUgMTI6MTc6MTciLCJ1c2VyX2FjdGl2YXRpb25fa2V5IjoiMTYwMjc2NDIzODokUCRCVXFCTVRWdFBRNHVRVWE2ZFNTbzEyamJWSFZvVEwxIiwidXNlcl9zdGF0dXMiOiIwIiwiZGlzcGxheV9uYW1lIjoidXNlcjAwMSB0ZXN0IiwibGFzdF9sb2dpbiI6MTYwODA5NjQ3MH0.JyU-3Y2N6h5ye2m31wf-m7lYStyDwxroEKU3Ko9_4pXwk23rVu_9PdoDXfhFWJKrWlGIjx8byj2ICFdKlLvASjRp6YSlj-VALStZzQawXL8-iXJroMrZjnkK4kNtkYG26TCEmEfbS3L-qTRtq2UYVl9TwJ6hEiTbYe0SCoJB5hQ5NNS4GEyniUU5pvPbTbFaGUQ7_4-9AWXVBYyrR0ng99qR9U2uwu7V1I9ChqK4VtmhdMkQr3UbnD7uz8RTUyOKTEGuKk6_2h7bLHcnC5eC3lFVmaDi07Detj8dClGKLHmuCAKGGsfJo0oeo5TiwtQ4nfg1t-t0miGuFg-kjv_7NGO5F-2UGUWNNa0AyxcTRr6y7F249caFYBsvU2fzGH34lOi9qlxH4qgh1Yg4HH7DAmCe7VRr85cxyquGHIJZHk9WlkWwU8HSHEQ59ZZhGdmqAHgVpElQb80v2_NFLBUH0doQIKfX9lKoxxHgH8yqmJk8DL1pYIX6kWheqHREoOkNWUMsm3HT8zYiDp1x-yOPUwrKwyxanExaEHebFIhusWEvKcyBMJSwgOF9MzNc6KRDu5VHK7Rqs68fSc6_jX6at731R-C9cVrO9jabzRXP4rohYU_FNQSuIgRIY0m0CfNbZ_4aJ1o8ulKu8g1rqPBdLTmT1Sag17ZswqtI7qwkEwI"
},
};
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require('request');
var options = {
'method': 'GET',
'url': 'http://wooapi.vxinfosystem.com/wp-json/letscms/v1/cart?coupons[]=GET15&coupons[]=GET50',
'headers': {
'letscms_token': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJJRCI6IjYiLCJ1c2VyX2xvZ2luIjoidXNlcjAwMSIsInVzZXJfbmljZW5hbWUiOiJ1c2VyMDAxIiwidXNlcl9lbWFpbCI6InVzZXIwMDFAdGVzdC5jb20iLCJ1c2VyX3VybCI6IiIsInVzZXJfcmVnaXN0ZXJlZCI6IjIwMjAtMTAtMTUgMTI6MTc6MTciLCJ1c2VyX2FjdGl2YXRpb25fa2V5IjoiMTYwMjc2NDIzODokUCRCVXFCTVRWdFBRNHVRVWE2ZFNTbzEyamJWSFZvVEwxIiwidXNlcl9zdGF0dXMiOiIwIiwiZGlzcGxheV9uYW1lIjoidXNlcjAwMSB0ZXN0IiwibGFzdF9sb2dpbiI6MTYwODA5NjQ3MH0.JyU-3Y2N6h5ye2m31wf-m7lYStyDwxroEKU3Ko9_4pXwk23rVu_9PdoDXfhFWJKrWlGIjx8byj2ICFdKlLvASjRp6YSlj-VALStZzQawXL8-iXJroMrZjnkK4kNtkYG26TCEmEfbS3L-qTRtq2UYVl9TwJ6hEiTbYe0SCoJB5hQ5NNS4GEyniUU5pvPbTbFaGUQ7_4-9AWXVBYyrR0ng99qR9U2uwu7V1I9ChqK4VtmhdMkQr3UbnD7uz8RTUyOKTEGuKk6_2h7bLHcnC5eC3lFVmaDi07Detj8dClGKLHmuCAKGGsfJo0oeo5TiwtQ4nfg1t-t0miGuFg-kjv_7NGO5F-2UGUWNNa0AyxcTRr6y7F249caFYBsvU2fzGH34lOi9qlxH4qgh1Yg4HH7DAmCe7VRr85cxyquGHIJZHk9WlkWwU8HSHEQ59ZZhGdmqAHgVpElQb80v2_NFLBUH0doQIKfX9lKoxxHgH8yqmJk8DL1pYIX6kWheqHREoOkNWUMsm3HT8zYiDp1x-yOPUwrKwyxanExaEHebFIhusWEvKcyBMJSwgOF9MzNc6KRDu5VHK7Rqs68fSc6_jX6at731R-C9cVrO9jabzRXP4rohYU_FNQSuIgRIY0m0CfNbZ_4aJ1o8ulKu8g1rqPBdLTmT1Sag17ZswqtI7qwkEwI'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import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cyBMJSwgOF9MzNc6KRDu5VHK7Rqs68fSc6_jX6at731R-C9cVrO9jabzRXP4rohYU_FNQSuIgRIY0m0CfNbZ_4aJ1o8ulKu8g1rqPBdLTmT1Sag17ZswqtI7qwkEwI'
}
response = requests.request("GET", url, headers=headers, data = payload)
print(response.text.encode('utf8'))
var client = new RestClient("http://wooapi.vxinfosystem.com/wp-json/letscms/v1/cart?coupons[]=GET15&coupons[]=GET50");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("letscms_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJJRCI6IjYiLCJ1c2VyX2xvZ2luIjoidXNlcjAwMSIsInVzZXJfbmljZW5hbWUiOiJ1c2VyMDAxIiwidXNlcl9lbWFpbCI6InVzZXIwMDFAdGVzdC5jb20iLCJ1c2VyX3VybCI6IiIsInVzZXJfcmVnaXN0ZXJlZCI6IjIwMjAtMTAtMTUgMTI6MTc6MTciLCJ1c2VyX2FjdGl2YXRpb25fa2V5IjoiMTYwMjc2NDIzODokUCRCVXFCTVRWdFBRNHVRVWE2ZFNTbzEyamJWSFZvVEwxIiwidXNlcl9zdGF0dXMiOiIwIiwiZGlzcGxheV9uYW1lIjoidXNlcjAwMSB0ZXN0IiwibGFzdF9sb2dpbiI6MTYwODA5NjQ3MH0.JyU-3Y2N6h5ye2m31wf-m7lYStyDwxroEKU3Ko9_4pXwk23rVu_9PdoDXfhFWJKrWlGIjx8byj2ICFdKlLvASjRp6YSlj-VALStZzQawXL8-iXJroMrZjnkK4kNtkYG26TCEmEfbS3L-qTRtq2UYVl9TwJ6hEiTbYe0SCoJB5hQ5NNS4GEyniUU5pvPbTbFaGUQ7_4-9AWXVBYyrR0ng99qR9U2uwu7V1I9ChqK4VtmhdMkQr3UbnD7uz8RTUyOKTEGuKk6_2h7bLHcnC5eC3lFVmaDi07Detj8dClGKLHmuCAKGGsfJo0oeo5TiwtQ4nfg1t-t0miGuFg-kjv_7NGO5F-2UGUWNNa0AyxcTRr6y7F249caFYBsvU2fzGH34lOi9qlxH4qgh1Yg4HH7DAmCe7VRr85cxyquGHIJZHk9WlkWwU8HSHEQ59ZZhGdmqAHgVpElQb80v2_NFLBUH0doQIKfX9lKoxxHgH8yqmJk8DL1pYIX6kWheqHREoOkNWUMsm3HT8zYiDp1x-yOPUwrKwyxanExaEHebFIhusWEvKcyBMJSwgOF9MzNc6KRDu5VHK7Rqs68fSc6_jX6at731R-C9cVrO9jabzRXP4rohYU_FNQSuIgRIY0m0CfNbZ_4aJ1o8ulKu8g1rqPBdLTmT1Sag17ZswqtI7qwkEwI");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request GET 'http://wooapi.vxinfosystem.com/wp-json/letscms/v1/cart?coupons[]=GET15&coupons[]=GET50' \
--header 'letscms_token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJJRCI6IjYiLCJ1c2VyX2xvZ2luIjoidXNlcjAwMSIsInVzZXJfbmljZW5hbWUiOiJ1c2VyMDAxIiwidXNlcl9lbWFpbCI6InVzZXIwMDFAdGVzdC5jb20iLCJ1c2VyX3VybCI6IiIsInVzZXJfcmVnaXN0ZXJlZCI6IjIwMjAtMTAtMTUgMTI6MTc6MTciLCJ1c2VyX2FjdGl2YXRpb25fa2V5IjoiMTYwMjc2NDIzODokUCRCVXFCTVRWdFBRNHVRVWE2ZFNTbzEyamJWSFZvVEwxIiwidXNlcl9zdGF0dXMiOiIwIiwiZGlzcGxheV9uYW1lIjoidXNlcjAwMSB0ZXN0IiwibGFzdF9sb2dpbiI6MTYwODA5NjQ3MH0.JyU-3Y2N6h5ye2m31wf-m7lYStyDwxroEKU3Ko9_4pXwk23rVu_9PdoDXfhFWJKrWlGIjx8byj2ICFdKlLvASjRp6YSlj-VALStZzQawXL8-iXJroMrZjnkK4kNtkYG26TCEmEfbS3L-qTRtq2UYVl9TwJ6hEiTbYe0SCoJB5hQ5NNS4GEyniUU5pvPbTbFaGUQ7_4-9AWXVBYyrR0ng99qR9U2uwu7V1I9ChqK4VtmhdMkQr3UbnD7uz8RTUyOKTEGuKk6_2h7bLHcnC5eC3lFVmaDi07Detj8dClGKLHmuCAKGGsfJo0oeo5TiwtQ4nfg1t-t0miGuFg-kjv_7NGO5F-2UGUWNNa0AyxcTRr6y7F249caFYBsvU2fzGH34lOi9qlxH4qgh1Yg4HH7DAmCe7VRr85cxyquGHIJZHk9WlkWwU8HSHEQ59ZZhGdmqAHgVpElQb80v2_NFLBUH0doQIKfX9lKoxxHgH8yqmJk8DL1pYIX6kWheqHREoOkNWUMsm3HT8zYiDp1x-yOPUwrKwyxanExaEHebFIhusWEvKcyBMJSwgOF9MzNc6KRDu5VHK7Rqs68fSc6_jX6at731R-C9cVrO9jabzRXP4rohYU_FNQSuIgRIY0m0CfNbZ_4aJ1o8ulKu8g1rqPBdLTmT1Sag17ZswqtI7qwkEwI'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("http://wooapi.vxinfosystem.com/wp-json/letscms/v1/cart?coupons[]=GET15&coupons[]=GET50")
.method("GET", null)
.addHeader("letscms_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJJRCI6IjYiLCJ1c2VyX2xvZ2luIjoidXNlcjAwMSIsInVzZXJfbmljZW5hbWUiOiJ1c2VyMDAxIiwidXNlcl9lbWFpbCI6InVzZXIwMDFAdGVzdC5jb20iLCJ1c2VyX3VybCI6IiIsInVzZXJfcmVnaXN0ZXJlZCI6IjIwMjAtMTAtMTUgMTI6MTc6MTciLCJ1c2VyX2FjdGl2YXRpb25fa2V5IjoiMTYwMjc2NDIzODokUCRCVXFCTVRWdFBRNHVRVWE2ZFNTbzEyamJWSFZvVEwxIiwidXNlcl9zdGF0dXMiOiIwIiwiZGlzcGxheV9uYW1lIjoidXNlcjAwMSB0ZXN0IiwibGFzdF9sb2dpbiI6MTYwODA5NjQ3MH0.JyU-3Y2N6h5ye2m31wf-m7lYStyDwxroEKU3Ko9_4pXwk23rVu_9PdoDXfhFWJKrWlGIjx8byj2ICFdKlLvASjRp6YSlj-VALStZzQawXL8-iXJroMrZjnkK4kNtkYG26TCEmEfbS3L-qTRtq2UYVl9TwJ6hEiTbYe0SCoJB5hQ5NNS4GEyniUU5pvPbTbFaGUQ7_4-9AWXVBYyrR0ng99qR9U2uwu7V1I9ChqK4VtmhdMkQr3UbnD7uz8RTUyOKTEGuKk6_2h7bLHcnC5eC3lFVmaDi07Detj8dClGKLHmuCAKGGsfJo0oeo5TiwtQ4nfg1t-t0miGuFg-kjv_7NGO5F-2UGUWNNa0AyxcTRr6y7F249caFYBsvU2fzGH34lOi9qlxH4qgh1Yg4HH7DAmCe7VRr85cxyquGHIJZHk9WlkWwU8HSHEQ59ZZhGdmqAHgVpElQb80v2_NFLBUH0doQIKfX9lKoxxHgH8yqmJk8DL1pYIX6kWheqHREoOkNWUMsm3HT8zYiDp1x-yOPUwrKwyxanExaEHebFIhusWEvKcyBMJSwgOF9MzNc6KRDu5VHK7Rqs68fSc6_jX6at731R-C9cVrO9jabzRXP4rohYU_FNQSuIgRIY0m0CfNbZ_4aJ1o8ulKu8g1rqPBdLTmT1Sag17ZswqtI7qwkEwI")
.build();
Response response = client.newCall(request).execute();
require "uri"
require "net/http"
url = URI("http://wooapi.vxinfosystem.com/wp-json/letscms/v1/cart?coupons[]=GET15&coupons[]=GET50")
https = Net::HTTP.new(url.host, url.port);
https.use_ssl = true
request = Net::HTTP::Get.new(url)
request["letscms_token"] = "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJJRCI6IjYiLCJ1c2VyX2xvZ2luIjoidXNlcjAwMSIsInVzZXJfbmljZW5hbWUiOiJ1c2VyMDAxIiwidXNlcl9lbWFpbCI6InVzZXIwMDFAdGVzdC5jb20iLCJ1c2VyX3VybCI6IiIsInVzZXJfcmVnaXN0ZXJlZCI6IjIwMjAtMTAtMTUgMTI6MTc6MTciLCJ1c2VyX2FjdGl2YXRpb25fa2V5IjoiMTYwMjc2NDIzODokUCRCVXFCTVRWdFBRNHVRVWE2ZFNTbzEyamJWSFZvVEwxIiwidXNlcl9zdGF0dXMiOiIwIiwiZGlzcGxheV9uYW1lIjoidXNlcjAwMSB0ZXN0IiwibGFzdF9sb2dpbiI6MTYwODA5NjQ3MH0.JyU-3Y2N6h5ye2m31wf-m7lYStyDwxroEKU3Ko9_4pXwk23rVu_9PdoDXfhFWJKrWlGIjx8byj2ICFdKlLvASjRp6YSlj-VALStZzQawXL8-iXJroMrZjnkK4kNtkYG26TCEmEfbS3L-qTRtq2UYVl9TwJ6hEiTbYe0SCoJB5hQ5NNS4GEyniUU5pvPbTbFaGUQ7_4-9AWXVBYyrR0ng99qR9U2uwu7V1I9ChqK4VtmhdMkQr3UbnD7uz8RTUyOKTEGuKk6_2h7bLHcnC5eC3lFVmaDi07Detj8dClGKLHmuCAKGGsfJo0oeo5TiwtQ4nfg1t-t0miGuFg-kjv_7NGO5F-2UGUWNNa0AyxcTRr6y7F249caFYBsvU2fzGH34lOi9qlxH4qgh1Yg4HH7DAmCe7VRr85cxyquGHIJZHk9WlkWwU8HSHEQ59ZZhGdmqAHgVpElQb80v2_NFLBUH0doQIKfX9lKoxxHgH8yqmJk8DL1pYIX6kWheqHREoOkNWUMsm3HT8zYiDp1x-yOPUwrKwyxanExaEHebFIhusWEvKcyBMJSwgOF9MzNc6KRDu5VHK7Rqs68fSc6_jX6at731R-C9cVrO9jabzRXP4rohYU_FNQSuIgRIY0m0CfNbZ_4aJ1o8ulKu8g1rqPBdLTmT1Sag17ZswqtI7qwkEwI"
response = https.request(request)
puts response.read_body
Success Response
{
"status": true,
"errors": [],
"message": "",
"coupon_status": false,
"coupon_errors": {
"GET50": "Coupon \"get50\" is Expired!"
},
"data": {
"cart_items": [
{
"key": "3fe94a002317b5f9259f82690aeea4cd",
"product_id": "316",
"variation_id": 0,
"variation": [],
"quantity": "10",
"data_hash": "b5c1d5ca8bae6d4896cf1807cdf763f0",
"line_tax_data": {
"subtotal": [],
"total": []
},
"line_subtotal": 150,
"line_subtotal_tax": 0,
"line_total": 150,
"line_tax": 0,
"product_name": "Ship Your Idea",
"product_price": "15",
"product_image": "http://local.host/wp/fmw/wp-content/uploads/2020/10/poster_1_up.jpg"
}
],
"cart_totals": {
"subtotal": 150,
"subtotal_tax": 0,
"shipping_total": "0.00",
"shipping_tax": 0,
"shipping_taxes": [],
"discount_total": 75,
"discount_tax": 0,
"cart_contents_total": 150,
"cart_contents_tax": 0,
"cart_contents_taxes": [],
"fee_total": "0.00",
"fee_tax": 0,
"fee_taxes": [],
"total": 75,
"total_tax": 0
},
"coupon_discount_totals": {
"GET15": 75
},
"currency": "₹"
}
}
Response Failed
{
"status": false,
"errors": [],
"message": "Cart is Empty!"
}
LETS WOO Cart Count API
The "Cart Count" API call is used to return the quentity of item in your cart.
GET: /wp-json/letscms/v1/cart/count
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. |
"http://wooapi.vxinfosystem.com/wp-json/letscms/v1/cart/count",
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.eyJJRCI6IjYiLCJ1c2VyX2xvZ2luIjoidXNlcjAwMSIsInVzZXJfbmljZW5hbWUiOiJ1c2VyMDAxIiwidXNlcl9lbWFpbCI6InVzZXIwMDFAdGVzdC5jb20iLCJ1c2VyX3VybCI6IiIsInVzZXJfcmVnaXN0ZXJlZCI6IjIwMjAtMTAtMTUgMTI6MTc6MTciLCJ1c2VyX2FjdGl2YXRpb25fa2V5IjoiMTYwMjc2NDIzODokUCRCVXFCTVRWdFBRNHVRVWE2ZFNTbzEyamJWSFZvVEwxIiwidXNlcl9zdGF0dXMiOiIwIiwiZGlzcGxheV9uYW1lIjoidXNlcjAwMSB0ZXN0IiwibGFzdF9sb2dpbiI6MTYwODA5NjQ3MH0.JyU-3Y2N6h5ye2m31wf-m7lYStyDwxroEKU3Ko9_4pXwk23rVu_9PdoDXfhFWJKrWlGIjx8byj2ICFdKlLvASjRp6YSlj-VALStZzQawXL8-iXJroMrZjnkK4kNtkYG26TCEmEfbS3L-qTRtq2UYVl9TwJ6hEiTbYe0SCoJB5hQ5NNS4GEyniUU5pvPbTbFaGUQ7_4-9AWXVBYyrR0ng99qR9U2uwu7V1I9ChqK4VtmhdMkQr3UbnD7uz8RTUyOKTEGuKk6_2h7bLHcnC5eC3lFVmaDi07Detj8dClGKLHmuCAKGGsfJo0oeo5TiwtQ4nfg1t-t0miGuFg-kjv_7NGO5F-2UGUWNNa0AyxcTRr6y7F249caFYBsvU2fzGH34lOi9qlxH4qgh1Yg4HH7DAmCe7VRr85cxyquGHIJZHk9WlkWwU8HSHEQ59ZZhGdmqAHgVpElQb80v2_NFLBUH0doQIKfX9lKoxxHgH8yqmJk8DL1pYIX6kWheqHREoOkNWUMsm3HT8zYiDp1x-yOPUwrKwyxanExaEHebFIhusWEvKcyBMJSwgOF9MzNc6KRDu5VHK7Rqs68fSc6_jX6at731R-C9cVrO9jabzRXP4rohYU_FNQSuIgRIY0m0CfNbZ_4aJ1o8ulKu8g1rqPBdLTmT1Sag17ZswqtI7qwkEwI"
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var form = new FormData();
var settings = {
"url": "http://wooapi.vxinfosystem.com/wp-json/letscms/v1/cart/count",
"method": "GET",
"timeout": 0,
"headers": {
"letscms_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJJRCI6IjYiLC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,
"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': 'http://wooapi.vxinfosystem.com/wp-json/letscms/v1/cart/count',
'headers': {
'letscms_token': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJJRCI6IjYiLCJ1c2VyX2xvZ2luIjoidXNlcjAwMSIsInVzZXJfbmljZW5hbWUiOiJ1c2VyMDAxIiwidXNlcl9lbWFpbCI6InVzZXIwMDFAdGVzdC5jb20iLCJ1c2VyX3VybCI6IiIsInVzZXJfcmVnaXN0ZXJlZCI6IjIwMjAtMTAtMTUgMTI6MTc6MTciLCJ1c2VyX2FjdGl2YXRpb25fa2V5IjoiMTYwMjc2NDIzODokUCRCVXFCTVRWdFBRNHVRVWE2ZFNTbzEyamJWSFZvVEwxIiwidXNlcl9zdGF0dXMiOiIwIiwiZGlzcGxheV9uYW1lIjoidXNlcjAwMSB0ZXN0IiwibGFzdF9sb2dpbiI6MTYwODA5NjQ3MH0.JyU-3Y2N6h5ye2m31wf-m7lYStyDwxroEKU3Ko9_4pXwk23rVu_9PdoDXfhFWJKrWlGIjx8byj2ICFdKlLvASjRp6YSlj-VALStZzQawXL8-iXJroMrZjnkK4kNtkYG26TCEmEfbS3L-qTRtq2UYVl9TwJ6hEiTbYe0SCoJB5hQ5NNS4GEyniUU5pvPbTbFaGUQ7_4-9AWXVBYyrR0ng99qR9U2uwu7V1I9ChqK4VtmhdMkQr3UbnD7uz8RTUyOKTEGuKk6_2h7bLHcnC5eC3lFVmaDi07Detj8dClGKLHmuCAKGGsfJo0oeo5TiwtQ4nfg1t-t0miGuFg-kjv_7NGO5F-2UGUWNNa0AyxcTRr6y7F249caFYBsvU2fzGH34lOi9qlxH4qgh1Yg4HH7DAmCe7VRr85cxyquGHIJZHk9WlkWwU8HSHEQ59ZZhGdmqAHgVpElQb80v2_NFLBUH0doQIKfX9lKoxxHgH8yqmJk8DL1pYIX6kWheqHREoOkNWUMsm3HT8zYiDp1x-yOPUwrKwyxanExaEHebFIhusWEvKcyBMJSwgOF9MzNc6KRDu5VHK7Rqs68fSc6_jX6at731R-C9cVrO9jabzRXP4rohYU_FNQSuIgRIY0m0CfNbZ_4aJ1o8ulKu8g1rqPBdLTmT1Sag17ZswqtI7qwkEwI'
},
formData: {
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
url = "http://wooapi.vxinfosystem.com/wp-json/letscms/v1/cart/count"
payload = {}
files = {}
headers = {
'letscms_token': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJJRCI6IjYiLCJ1c2VyX2xvZ2luIjoidXNlcjAwMSIsInVzZXJfbmljZW5hbWUiOiJ1c2VyMDAxIiwidXNlcl9lbWFpbCI6InVzZXIwMDFAdGVzdC5jb20iLCJ1c2VyX3VybCI6IiIsInVzZXJfcmVnaXN0ZXJlZCI6IjIwMjAtMTAtMTUgMTI6MTc6MTciLCJ1c2VyX2FjdGl2YXRpb25fa2V5IjoiMTYwMjc2NDIzODokUCRCVXFCTVRWdFBRNHVRVWE2ZFNTbzEyamJWSFZvVEwxIiwidXNlcl9zdGF0dXMiOiIwIiwiZGlzcGxheV9uYW1lIjoidXNlcjAwMSB0ZXN0IiwibGFzdF9sb2dpbiI6MTYwODA5NjQ3MH0.JyU-3Y2N6h5ye2m31wf-m7lYStyDwxroEKU3Ko9_4pXwk23rVu_9PdoDXfhFWJKrWlGIjx8byj2ICFdKlLvASjRp6YSlj-VALStZzQawXL8-iXJroMrZjnkK4kNtkYG26TCEmEfbS3L-qTRtq2UYVl9TwJ6hEiTbYe0SCoJB5hQ5NNS4GEyniUU5pvPbTbFaGUQ7_4-9AWXVBYyrR0ng99qR9U2uwu7V1I9ChqK4VtmhdMkQr3UbnD7uz8RTUyOKTEGuKk6_2h7bLHcnC5eC3lFVmaDi07Detj8dClGKLHmuCAKGGsfJo0oeo5TiwtQ4nfg1t-t0miGuFg-kjv_7NGO5F-2UGUWNNa0AyxcTRr6y7F249caFYBsvU2fzGH34lOi9qlxH4qgh1Yg4HH7DAmCe7VRr85cxyquGHIJZHk9WlkWwU8HSHEQ59ZZhGdmqAHgVpElQb80v2_NFLBUH0doQIKfX9lKoxxHgH8yqmJk8DL1pYIX6kWheqHREoOkNWUMsm3HT8zYiDp1x-yOPUwrKwyxanExaEHebFIhusWEvKcyBMJSwgOF9MzNc6KRDu5VHK7Rqs68fSc6_jX6at731R-C9cVrO9jabzRXP4rohYU_FNQSuIgRIY0m0CfNbZ_4aJ1o8ulKu8g1rqPBdLTmT1Sag17ZswqtI7qwkEwI'
}
response = requests.request("GET", url, headers=headers, data = payload, files = files)
print(response.text.encode('utf8'))
var client = new RestClient("http://wooapi.vxinfosystem.com/wp-json/letscms/v1/cart/count");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("letscms_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJJRCI6IjYiLCJ1c2VyX2xvZ2luIjoidXNlcjAwMSIsInVzZXJfbmljZW5hbWUiOiJ1c2VyMDAxIiwidXNlcl9lbWFpbCI6InVzZXIwMDFAdGVzdC5jb20iLCJ1c2VyX3VybCI6IiIsInVzZXJfcmVnaXN0ZXJlZCI6IjIwMjAtMTAtMTUgMTI6MTc6MTciLCJ1c2VyX2FjdGl2YXRpb25fa2V5IjoiMTYwMjc2NDIzODokUCRCVXFCTVRWdFBRNHVRVWE2ZFNTbzEyamJWSFZvVEwxIiwidXNlcl9zdGF0dXMiOiIwIiwiZGlzcGxheV9uYW1lIjoidXNlcjAwMSB0ZXN0IiwibGFzdF9sb2dpbiI6MTYwODA5NjQ3MH0.JyU-3Y2N6h5ye2m31wf-m7lYStyDwxroEKU3Ko9_4pXwk23rVu_9PdoDXfhFWJKrWlGIjx8byj2ICFdKlLvASjRp6YSlj-VALStZzQawXL8-iXJroMrZjnkK4kNtkYG26TCEmEfbS3L-qTRtq2UYVl9TwJ6hEiTbYe0SCoJB5hQ5NNS4GEyniUU5pvPbTbFaGUQ7_4-9AWXVBYyrR0ng99qR9U2uwu7V1I9ChqK4VtmhdMkQr3UbnD7uz8RTUyOKTEGuKk6_2h7bLHcnC5eC3lFVmaDi07Detj8dClGKLHmuCAKGGsfJo0oeo5TiwtQ4nfg1t-t0miGuFg-kjv_7NGO5F-2UGUWNNa0AyxcTRr6y7F249caFYBsvU2fzGH34lOi9qlxH4qgh1Yg4HH7DAmCe7VRr85cxyquGHIJZHk9WlkWwU8HSHEQ59ZZhGdmqAHgVpElQb80v2_NFLBUH0doQIKfX9lKoxxHgH8yqmJk8DL1pYIX6kWheqHREoOkNWUMsm3HT8zYiDp1x-yOPUwrKwyxanExaEHebFIhusWEvKcyBMJSwgOF9MzNc6KRDu5VHK7Rqs68fSc6_jX6at731R-C9cVrO9jabzRXP4rohYU_FNQSuIgRIY0m0CfNbZ_4aJ1o8ulKu8g1rqPBdLTmT1Sag17ZswqtI7qwkEwI");
request.AlwaysMultipartFormData = true;
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request GET 'http://wooapi.vxinfosystem.com/wp-json/letscms/v1/cart/count' \
--header 'letscms_token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJJRCI6IjYiLCJ1c2VyX2xvZ2luIjoidXNlcjAwMSIsInVzZXJfbmljZW5hbWUiOiJ1c2VyMDAxIiwidXNlcl9lbWFpbCI6InVzZXIwMDFAdGVzdC5jb20iLCJ1c2VyX3VybCI6IiIsInVzZXJfcmVnaXN0ZXJlZCI6IjIwMjAtMTAtMTUgMTI6MTc6MTciLCJ1c2VyX2FjdGl2YXRpb25fa2V5IjoiMTYwMjc2NDIzODokUCRCVXFCTVRWdFBRNHVRVWE2ZFNTbzEyamJWSFZvVEwxIiwidXNlcl9zdGF0dXMiOiIwIiwiZGlzcGxheV9uYW1lIjoidXNlcjAwMSB0ZXN0IiwibGFzdF9sb2dpbiI6MTYwODA5NjQ3MH0.JyU-3Y2N6h5ye2m31wf-m7lYStyDwxroEKU3Ko9_4pXwk23rVu_9PdoDXfhFWJKrWlGIjx8byj2ICFdKlLvASjRp6YSlj-VALStZzQawXL8-iXJroMrZjnkK4kNtkYG26TCEmEfbS3L-qTRtq2UYVl9TwJ6hEiTbYe0SCoJB5hQ5NNS4GEyniUU5pvPbTbFaGUQ7_4-9AWXVBYyrR0ng99qR9U2uwu7V1I9ChqK4VtmhdMkQr3UbnD7uz8RTUyOKTEGuKk6_2h7bLHcnC5eC3lFVmaDi07Detj8dClGKLHmuCAKGGsfJo0oeo5TiwtQ4nfg1t-t0miGuFg-kjv_7NGO5F-2UGUWNNa0AyxcTRr6y7F249caFYBsvU2fzGH34lOi9qlxH4qgh1Yg4HH7DAmCe7VRr85cxyquGHIJZHk9WlkWwU8HSHEQ59ZZhGdmqAHgVpElQb80v2_NFLBUH0doQIKfX9lKoxxHgH8yqmJk8DL1pYIX6kWheqHREoOkNWUMsm3HT8zYiDp1x-yOPUwrKwyxanExaEHebFIhusWEvKcyBMJSwgOF9MzNc6KRDu5VHK7Rqs68fSc6_jX6at731R-C9cVrO9jabzRXP4rohYU_FNQSuIgRIY0m0CfNbZ_4aJ1o8ulKu8g1rqPBdLTmT1Sag17ZswqtI7qwkEwI'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("http://wooapi.vxinfosystem.com/wp-json/letscms/v1/cart/count")
.method("GET", null)
.addHeader("letscms_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJJRCI6IjYiLCJ1c2VyX2xvZ2luIjoidXNlcjAwMSIsInVzZXJfbmljZW5hbWUiOiJ1c2VyMDAxIiwidXNlcl9lbWFpbCI6InVzZXIwMDFAdGVzdC5jb20iLCJ1c2VyX3VybCI6IiIsInVzZXJfcmVnaXN0ZXJlZCI6IjIwMjAtMTAtMTUgMTI6MTc6MTciLCJ1c2VyX2FjdGl2YXRpb25fa2V5IjoiMTYwMjc2NDIzODokUCRCVXFCTVRWdFBRNHVRVWE2ZFNTbzEyamJWSFZvVEwxIiwidXNlcl9zdGF0dXMiOiIwIiwiZGlzcGxheV9uYW1lIjoidXNlcjAwMSB0ZXN0IiwibGFzdF9sb2dpbiI6MTYwODA5NjQ3MH0.JyU-3Y2N6h5ye2m31wf-m7lYStyDwxroEKU3Ko9_4pXwk23rVu_9PdoDXfhFWJKrWlGIjx8byj2ICFdKlLvASjRp6YSlj-VALStZzQawXL8-iXJroMrZjnkK4kNtkYG26TCEmEfbS3L-qTRtq2UYVl9TwJ6hEiTbYe0SCoJB5hQ5NNS4GEyniUU5pvPbTbFaGUQ7_4-9AWXVBYyrR0ng99qR9U2uwu7V1I9ChqK4VtmhdMkQr3UbnD7uz8RTUyOKTEGuKk6_2h7bLHcnC5eC3lFVmaDi07Detj8dClGKLHmuCAKGGsfJo0oeo5TiwtQ4nfg1t-t0miGuFg-kjv_7NGO5F-2UGUWNNa0AyxcTRr6y7F249caFYBsvU2fzGH34lOi9qlxH4qgh1Yg4HH7DAmCe7VRr85cxyquGHIJZHk9WlkWwU8HSHEQ59ZZhGdmqAHgVpElQb80v2_NFLBUH0doQIKfX9lKoxxHgH8yqmJk8DL1pYIX6kWheqHREoOkNWUMsm3HT8zYiDp1x-yOPUwrKwyxanExaEHebFIhusWEvKcyBMJSwgOF9MzNc6KRDu5VHK7Rqs68fSc6_jX6at731R-C9cVrO9jabzRXP4rohYU_FNQSuIgRIY0m0CfNbZ_4aJ1o8ulKu8g1rqPBdLTmT1Sag17ZswqtI7qwkEwI")
.build();
Response response = client.newCall(request).execute();
require "uri"
require "net/http"
url = URI("http://wooapi.vxinfosystem.com/wp-json/letscms/v1/cart/count")
https = Net::HTTP.new(url.host, url.port);
https.use_ssl = true
request = Net::HTTP::Get.new(url)
request["letscms_token"] = "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJJRCI6IjYiLCJ1c2VyX2xvZ2luIjoidXNlcj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(request)
puts response.read_body
LETS WOO Remove Cart Product API
The "Remove Cart Product" API call is used to remove item from cart, that you don't want to purchase.
POST: /wp-json/letscms/v1/cart/remove-item/3fe94a002317b5f9259f82690aeea4cd
Parameter | Type | Position | # | Description |
---|---|---|---|---|
letscms_token | String |
headers |
Required |
Letscms Token is generate when user attempt login or register API. |
cart_item_key | String |
Params |
Required |
Cart_item_key recieved from get cart api items array |
Parameter | letscms_token |
---|---|
Type | String |
Position | headers |
# | Required |
Description | Letscms Token is generate when user attempt login or register API. |
Parameter | cart_item_key |
Type | String |
Position | Params |
# | Required |
Description | Cart_item_key recieved from get cart api items array |
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "http://wooapi.vxinfosystem.com/wp-json/letscms/v1/cart/remove-item/3fe94a002317b5f9259f82690aeea4cd",
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_HTTPHEADER => array(
"letscms_token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJJRCI6IjYiLCJ1c2VyX2xvZ2luIjoidXNlcjAwMSIsInVzZXJfbmljZW5hbWUiOiJ1c2VyMDAxIiwidXNlcl9lbWFpbCI6InVzZXIwMDFAdGVzdC5jb20iLCJ1c2VyX3VybCI6IiIsInVzZXJfcmVnaXN0ZXJlZCI6IjIwMjAtMTAtMTUgMTI6MTc6MTciLCJ1c2VyX2FjdGl2YXRpb25fa2V5IjoiMTYwMjc2NDIzODokUCRCVXFCTVRWdFBRNHVRVWE2ZFNTbzEyamJWSFZvVEwxIiwidXNlcl9zdGF0dXMiOiIwIiwiZGlzcGxheV9uYW1lIjoidXNlcjAwMSB0ZXN0IiwibGFzdF9sb2dpbiI6MTYwODA5NjQ3MH0.JyU-3Y2N6h5ye2m31wf-m7lYStyDwxroEKU3Ko9_4pXwk23rVu_9PdoDXfhFWJKrWlGIjx8byj2ICFdKlLvASjRp6YSlj-VALStZzQawXL8-iXJroMrZjnkK4kNtkYG26TCEmEfbS3L-qTRtq2UYVl9TwJ6hEiTbYe0SCoJB5hQ5NNS4GEyniUU5pvPbTbFaGUQ7_4-9AWXVBYyrR0ng99qR9U2uwu7V1I9ChqK4VtmhdMkQr3UbnD7uz8RTUyOKTEGuKk6_2h7bLHcnC5eC3lFVmaDi07Detj8dClGKLHmuCAKGGsfJo0oeo5TiwtQ4nfg1t-t0miGuFg-kjv_7NGO5F-2UGUWNNa0AyxcTRr6y7F249caFYBsvU2fzGH34lOi9qlxH4qgh1Yg4HH7DAmCe7VRr85cxyquGHIJZHk9WlkWwU8HSHEQ59ZZhGdmqAHgVpElQb80v2_NFLBUH0doQIKfX9lKoxxHgH8yqmJk8DL1pYIX6kWheqHREoOkNWUMsm3HT8zYiDp1x-yOPUwrKwyxanExaEHebFIhusWEvKcyBMJSwgOF9MzNc6KRDu5VHK7Rqs68fSc6_jX6at731R-C9cVrO9jabzRXP4rohYU_FNQSuIgRIY0m0CfNbZ_4aJ1o8ulKu8g1rqPBdLTmT1Sag17ZswqtI7qwkEwI"
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var form = new FormData();
var settings = {
"url": "http://wooapi.vxinfosystem.com/wp-json/letscms/v1/cart/remove-item/3fe94a002317b5f9259f82690aeea4cd",
"method": "POST",
"timeout": 0,
"headers": {
"letscms_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJJRCI6IjYiLCJ1c2VyX2xvZ2luIjoidXNlcjAwMSIsInVzZXJfbmljZW5hbWUiOiJ1c2VyMDAxIiwidXNlcl9lbWFpbCI6InVzZXIwMDFAdGVzdC5jb20iLCJ1c2VyX3VybCI6IiIsInVzZXJfcmVnaXN0ZXJlZCI6IjIwMjAtMTAtMTUgMTI6MTc6MTciLCJ1c2VyX2FjdGl2YXRpb25fa2V5IjoiMTYwMjc2NDIzODokUCRCVXFCTVRWdFBRNHVRVWE2ZFNTbzEyamJWSFZvVEwxIiwidXNlcl9zdGF0dXMiOiIwIiwiZGlzcGxheV9uYW1lIjoidXNlcjAwMSB0ZXN0IiwibGFzdF9sb2dpbiI6MTYwODA5NjQ3MH0.JyU-3Y2N6h5ye2m31wf-m7lYStyDwxroEKU3Ko9_4pXwk23rVu_9PdoDXfhFWJKrWlGIjx8byj2ICFdKlLvASjRp6YSlj-VALStZzQawXL8-iXJroMrZjnkK4kNtkYG26TCEmEfbS3L-qTRtq2UYVl9TwJ6hEiTbYe0SCoJB5hQ5NNS4GEyniUU5pvPbTbFaGUQ7_4-9AWXVBYyrR0ng99qR9U2uwu7V1I9ChqK4VtmhdMkQr3UbnD7uz8RTUyOKTEGuKk6_2h7bLHcnC5eC3lFVmaDi07Detj8dClGKLHmuCAKGGsfJo0oeo5TiwtQ4nfg1t-t0miGuFg-kjv_7NGO5F-2UGUWNNa0AyxcTRr6y7F249caFYBsvU2fzGH34lOi9qlxH4qgh1Yg4HH7DAmCe7VRr85cxyquGHIJZHk9WlkWwU8HSHEQ59ZZhGdmqAHgVpElQb80v2_NFLBUH0doQIKfX9lKoxxHgH8yqmJk8DL1pYIX6kWheqHREoOkNWUMsm3HT8zYiDp1x-yOPUwrKwyxanExaEHebFIhusWEvKcyBMJSwgOF9MzNc6KRDu5VHK7Rqs68fSc6_jX6at731R-C9cVrO9jabzRXP4rohYU_FNQSuIgRIY0m0CfNbZ_4aJ1o8ulKu8g1rqPBdLTmT1Sag17ZswqtI7qwkEwI"
},
"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': 'http://wooapi.vxinfosystem.com/wp-json/letscms/v1/cart/remove-item/3fe94a002317b5f9259f82690aeea4cd',
'headers': {
'letscms_token': 'eyJ0eXAiOiJKV1QiLC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BdLTmT1Sag17ZswqtI7qwkEwI'
},
formData: {
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
url = "http://wooapi.vxinfosystem.com/wp-json/letscms/v1/cart/remove-item/3fe94a002317b5f9259f82690aeea4cd"
payload = {}
files = {}
headers = {
'letscms_token': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJJRCI6IjYiLCJ1c2VyX2xvZ2luIjoidXNlcjAwMSIsInVzZXJfbmljZW5hbWUiOiJ1c2VyMDAxIiwidXNlcl9lbWFpbCI6InVzZXIwMDFAdGVzdC5jb20iLCJ1c2VyX3VybCI6IiIsInVzZXJfcmVnaXN0ZXJlZCI6IjIwMjAtMTAtMTUgMTI6MTc6MTciLCJ1c2VyX2FjdGl2YXRpb25fa2V5IjoiMTYwMjc2NDIzODokUCRCVXFCTVRWdFBRNHVRVWE2ZFNTbzEyamJWSFZvVEwxIiwidXNlcl9zdGF0dXMiOiIwIiwiZGlzcGxheV9uYW1lIjoidXNlcjAwMSB0ZXN0IiwibGFzdF9sb2dpbiI6MTYwODA5NjQ3MH0.JyU-3Y2N6h5ye2m31wf-m7lYStyDwxroEKU3Ko9_4pXwk23rVu_9PdoDXfhFWJKrWlGIjx8byj2ICFdKlLvASjRp6YSlj-VALStZzQawXL8-iXJroMrZjnkK4kNtkYG26TCEmEfbS3L-qTRtq2UYVl9TwJ6hEiTbYe0SCoJB5hQ5NNS4GEyniUU5pvPbTbFaGUQ7_4-9AWXVBYyrR0ng99qR9U2uwu7V1I9ChqK4VtmhdMkQr3UbnD7uz8RTUyOKTEGuKk6_2h7bLHcnC5eC3lFVmaDi07Detj8dClGKLHmuCAKGGsfJo0oeo5TiwtQ4nfg1t-t0miGuFg-kjv_7NGO5F-2UGUWNNa0AyxcTRr6y7F249caFYBsvU2fzGH34lOi9qlxH4qgh1Yg4HH7DAmCe7VRr85cxyquGHIJZHk9WlkWwU8HSHEQ59ZZhGdmqAHgVpElQb80v2_NFLBUH0doQIKfX9lKoxxHgH8yqmJk8DL1pYIX6kWheqHREoOkNWUMsm3HT8zYiDp1x-yOPUwrKwyxanExaEHebFIhusWEvKcyBMJSwgOF9MzNc6KRDu5VHK7Rqs68fSc6_jX6at731R-C9cVrO9jabzRXP4rohYU_FNQSuIgRIY0m0CfNbZ_4aJ1o8ulKu8g1rqPBdLTmT1Sag17ZswqtI7qwkEwI'
}
response = requests.request("POST", url, headers=headers, data = payload, files = files)
print(response.text.encode('utf8'))
var client = new RestClient("http://wooapi.vxinfosystem.com/wp-json/letscms/v1/cart/remove-item/3fe94a002317b5f9259f82690aeea4cd");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("letscms_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJJRCI6IjYiLCJ1c2VyX2xvZ2luIjoidXNlcjAwMSIsInVzZXJfbmljZW5hbWUiOiJ1c2VyMDAxIiwidXNlcl9lbWFpbCI6InVzZXIwMDFAdGVzdC5jb20iLCJ1c2VyX3VybCI6IiIsInVzZXJfcmVnaXN0ZXJlZCI6IjIwMjAtMTAtMTUgMTI6MTc6MTciLCJ1c2VyX2FjdGl2YXRpb25fa2V5IjoiMTYwMjc2NDIzODokUCRCVXFCTVRWdFBRNHVRVWE2ZFNTbzEyamJWSFZvVEwxIiwidXNlcl9zdGF0dXMiOiIwIiwiZGlzcGxheV9uYW1lIjoidXNlcjAwMSB0ZXN0IiwibGFzdF9sb2dpbiI6MTYwODA5NjQ3MH0.JyU-3Y2N6h5ye2m31wf-m7lYStyDwxroEKU3Ko9_4pXwk23rVu_9PdoDXfhFWJKrWlGIjx8byj2ICFdKlLvASjRp6YSlj-VALStZzQawXL8-iXJroMrZjnkK4kNtkYG26TCEmEfbS3L-qTRtq2UYVl9TwJ6hEiTbYe0SCoJB5hQ5NNS4GEyniUU5pvPbTbFaGUQ7_4-9AWXVBYyrR0ng99qR9U2uwu7V1I9ChqK4VtmhdMkQr3UbnD7uz8RTUyOKTEGuKk6_2h7bLHcnC5eC3lFVmaDi07Detj8dClGKLHmuCAKGGsfJo0oeo5TiwtQ4nfg1t-t0miGuFg-kjv_7NGO5F-2UGUWNNa0AyxcTRr6y7F249caFYBsvU2fzGH34lOi9qlxH4qgh1Yg4HH7DAmCe7VRr85cxyquGHIJZHk9WlkWwU8HSHEQ59ZZhGdmqAHgVpElQb80v2_NFLBUH0doQIKfX9lKoxxHgH8yqmJk8DL1pYIX6kWheqHREoOkNWUMsm3HT8zYiDp1x-yOPUwrKwyxanExaEHebFIhusWEvKcyBMJSwgOF9MzNc6KRDu5VHK7Rqs68fSc6_jX6at731R-C9cVrO9jabzRXP4rohYU_FNQSuIgRIY0m0CfNbZ_4aJ1o8ulKu8g1rqPBdLTmT1Sag17ZswqtI7qwkEwI");
request.AlwaysMultipartFormData = true;
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request POST 'http://wooapi.vxinfosystem.com/wp-json/letscms/v1/cart/remove-item/3fe94a002317b5f9259f82690aeea4cd' \
--header 'letscms_token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJJRCI6IjYiLCJ1c2VyX2xvZ2luIjoidXNlcjAwMSIsInVzZXJfbmljZW5hbWUiOiJ1c2VyMDAxIiwidXNlcl9lbWFpbCI6InVzZXIwMDFAdGVzdC5jb20iLCJ1c2VyX3VybCI6IiIsInVzZXJfcmVnaXN0ZXJlZCI6IjIwMjAtMTAtMTUgMTI6MTc6MTciLCJ1c2VyX2FjdGl2YXRpb25fa2V5IjoiMTYwMjc2NDIzODokUCRCVXFCTVRWdFBRNHVRVWE2ZFNTbzEyamJWSFZvVEwxIiwidXNlcl9zdGF0dXMiOiIwIiwiZGlzcGxheV9uYW1lIjoidXNlcjAwMSB0ZXN0IiwibGFzdF9sb2dpbiI6MTYwODA5NjQ3MH0.JyU-3Y2N6h5ye2m31wf-m7lYStyDwxroEKU3Ko9_4pXwk23rVu_9PdoDXfhFWJKrWlGIjx8byj2ICFdKlLvASjRp6YSlj-VALStZzQawXL8-iXJroMrZjnkK4kNtkYG26TCEmEfbS3L-qTRtq2UYVl9TwJ6hEiTbYe0SCoJB5hQ5NNS4GEyniUU5pvPbTbFaGUQ7_4-9AWXVBYyrR0ng99qR9U2uwu7V1I9ChqK4VtmhdMkQr3UbnD7uz8RTUyOKTEGuKk6_2h7bLHcnC5eC3lFVmaDi07Detj8dClGKLHmuCAKGGsfJo0oeo5TiwtQ4nfg1t-t0miGuFg-kjv_7NGO5F-2UGUWNNa0AyxcTRr6y7F249caFYBsvU2fzGH34lOi9qlxH4qgh1Yg4HH7DAmCe7VRr85cxyquGHIJZHk9WlkWwU8HSHEQ59ZZhGdmqAHgVpElQb80v2_NFLBUH0doQIKfX9lKoxxHgH8yqmJk8DL1pYIX6kWheqHREoOkNWUMsm3HT8zYiDp1x-yOPUwrKwyxanExaEHebFIhusWEvKcyBMJSwgOF9MzNc6KRDu5VHK7Rqs68fSc6_jX6at731R-C9cVrO9jabzRXP4rohYU_FNQSuIgRIY0m0CfNbZ_4aJ1o8ulKu8g1rqPBdLTmT1Sag17ZswqtI7qwkEwI'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("text/plain");
MediaType JSON = MediaType.parse("application/json; charset=utf-8");
RequestBody body = RequestBody.create(JSON, "{}");
Request request = new Request.Builder()
.url("http://wooapi.vxinfosystem.com/wp-json/letscms/v1/cart/remove-item/3fe94a002317b5f9259f82690aeea4cd")
.method("POST", body)
.addHeader("letscms_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJJRCI6IjYiLCJ1c2VyX2xvZ2luIjoidXNlcjAwMSIsInVzZXJfbmljZW5hbWUiOiJ1c2VyMDAxIiwidXNlcl9lbWFpbCI6InVzZXIwMDFAdGVzdC5jb20iLCJ1c2VyX3VybCI6IiIsInVzZXJfcmVnaXN0ZXJlZCI6IjIwMjAtMTAtMTUgMTI6MTc6MTciLCJ1c2VyX2FjdGl2YXRpb25fa2V5IjoiMTYwMjc2NDIzODokUCRCVXFCTVRWdFBRNHVRVWE2ZFNTbzEyamJWSFZvVEwxIiwidXNlcl9zdGF0dXMiOiIwIiwiZGlzcGxheV9uYW1lIjoidXNlcjAwMSB0ZXN0IiwibGFzdF9sb2dpbiI6MTYwODA5NjQ3MH0.JyU-3Y2N6h5ye2m31wf-m7lYStyDwxroEKU3Ko9_4pXwk23rVu_9PdoDXfhFWJKrWlGIjx8byj2ICFdKlLvASjRp6YSlj-VALStZzQawXL8-iXJroMrZjnkK4kNtkYG26TCEmEfbS3L-qTRtq2UYVl9TwJ6hEiTbYe0SCoJB5hQ5NNS4GEyniUU5pvPbTbFaGUQ7_4-9AWXVBYyrR0ng99qR9U2uwu7V1I9ChqK4VtmhdMkQr3UbnD7uz8RTUyOKTEGuKk6_2h7bLHcnC5eC3lFVmaDi07Detj8dClGKLHmuCAKGGsfJo0oeo5TiwtQ4nfg1t-t0miGuFg-kjv_7NGO5F-2UGUWNNa0AyxcTRr6y7F249caFYBsvU2fzGH34lOi9qlxH4qgh1Yg4HH7DAmCe7VRr85cxyquGHIJZHk9WlkWwU8HSHEQ59ZZhGdmqAHgVpElQb80v2_NFLBUH0doQIKfX9lKoxxHgH8yqmJk8DL1pYIX6kWheqHREoOkNWUMsm3HT8zYiDp1x-yOPUwrKwyxanExaEHebFIhusWEvKcyBMJSwgOF9MzNc6KRDu5VHK7Rqs68fSc6_jX6at731R-C9cVrO9jabzRXP4rohYU_FNQSuIgRIY0m0CfNbZ_4aJ1o8ulKu8g1rqPBdLTmT1Sag17ZswqtI7qwkEwI")
.build();
Response response = client.newCall(request).execute();
require "uri"
require "net/http"
url = URI("http://wooapi.vxinfosystem.com/wp-json/letscms/v1/cart/remove-item/3fe94a002317b5f9259f82690aeea4cd")
https = Net::HTTP.new(url.host, url.port);
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["letscms_token"] = "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUz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ZswqtI7qwkEwI"
form_data = []
request.set_form form_data, 'multipart/form-data'
response = https.request(request)
puts response.read_body
Success Response
{
"status": true,
"errors": [],
"message": "Ship Your Idea removed from cart.",
"coupon_status": false,
"coupon_errors": [],
"data": {
"cart_item_count": 0
}
}
Response Failed
{
"status": false,
"errors": [],
"message": "Invalid item_key, product not exists. Perhaps it was deleted?"
}
LETS WOO Update Quantity API
The "Update Quantity" API call is used to update item quentity in cart, that you want to purchase.
POST: /wp-json/letscms/v1/cart/update-quantities
Parameter | Type | Position | # | Description |
---|---|---|---|---|
letscms_token | String |
headers |
Required |
Letscms Token is generate when user attempt login or register API. |
cart_data | String |
body |
Required |
Object of cart_item_key and their new quantaties |
Parameter | letscms_token |
---|---|
Type | String |
Position | headers |
# | Required |
Description | Letscms Token is generate when user attempt login or register API. |
Parameter | cart_data |
Type | String |
Position | body |
# | Required |
Description | Object of cart_item_key and their new quantaties |
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "http://wooapi.vxinfosystem.com/wp-json/letscms/v1/cart/update-quantities",
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('cart_data[6ea9ab1baa0efb9e19094440c317e21b]' => '10'),
CURLOPT_HTTPHEADER => array(
"letscms_token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJJRCI6IjYiLCJ1c2VyX2xvZ2luIjoidXNlcjAwMSIsInVzZXJfbmljZW5hbWUiOiJ1c2VyMDAxIiwidXNlcl9lbWFpbCI6InVzZXIwMDFAdGVzdC5jb20iLCJ1c2VyX3VybCI6IiIsInVzZXJfcmVnaXN0ZXJlZCI6IjIwMjAtMTAtMTUgMTI6MTc6MTciLCJ1c2VyX2FjdGl2YXRpb25fa2V5IjoiMTYwMjc2NDIzODokUCRCVXFCTVRWdFBRNHVRVWE2ZFNTbzEyamJWSFZvVEwxIiwidXNlcl9zdGF0dXMiOiIwIiwiZGlzcGxheV9uYW1lIjoidXNlcjAwMSB0ZXN0IiwibGFzdF9sb2dpbiI6MTYwODA5NjQ3MH0.JyU-3Y2N6h5ye2m31wf-m7lYStyDwxroEKU3Ko9_4pXwk23rVu_9PdoDXfhFWJKrWlGIjx8byj2ICFdKlLvASjRp6YSlj-VALStZzQawXL8-iXJroMrZjnkK4kNtkYG26TCEmEfbS3L-qTRtq2UYVl9TwJ6hEiTbYe0SCoJB5hQ5NNS4GEyniUU5pvPbTbFaGUQ7_4-9AWXVBYyrR0ng99qR9U2uwu7V1I9ChqK4VtmhdMkQr3UbnD7uz8RTUyOKTEGuKk6_2h7bLHcnC5eC3lFVmaDi07Detj8dClGKLHmuCAKGGsfJo0oeo5TiwtQ4nfg1t-t0miGuFg-kjv_7NGO5F-2UGUWNNa0AyxcTRr6y7F249caFYBsvU2fzGH34lOi9qlxH4qgh1Yg4HH7DAmCe7VRr85cxyquGHIJZHk9WlkWwU8HSHEQ59ZZhGdmqAHgVpElQb80v2_NFLBUH0doQIKfX9lKoxxHgH8yqmJk8DL1pYIX6kWheqHREoOkNWUMsm3HT8zYiDp1x-yOPUwrKwyxanExaEHebFIhusWEvKcyBMJSwgOF9MzNc6KRDu5VHK7Rqs68fSc6_jX6at731R-C9cVrO9jabzRXP4rohYU_FNQSuIgRIY0m0CfNbZ_4aJ1o8ulKu8g1rqPBdLTmT1Sag17ZswqtI7qwkEwI"
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var form = new FormData();
form.append("cart_data[6ea9ab1baa0efb9e19094440c317e21b]", "10");
var settings = {
"url": "http://wooapi.vxinfosystem.com/wp-json/letscms/v1/cart/update-quantities",
"method": "POST",
"timeout": 0,
"headers": {
"letscms_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9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qwkEwI"
},
"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': 'http://wooapi.vxinfosystem.com/wp-json/letscms/v1/cart/update-quantities',
'headers': {
'letscms_token': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJJRCI6IjYiLCJ1c2VyX2xvZ2luIjoidXNlcjAwMSIsInVzZXJfbmljZW5hbWUiOiJ1c2VyMDAxIiwidXNlcl9lbWFpbCI6InVzZXIwMDFAdGVzdC5jb20iLCJ1c2VyX3VybCI6IiIsInVzZXJfcmVnaXN0ZXJlZCI6IjIwMjAtMTAtMTUgMTI6MTc6MTciLCJ1c2VyX2FjdGl2YXRpb25fa2V5IjoiMTYwMjc2NDIzODokUCRCVXFCTVRWdFBRNHVRVWE2ZFNTbzEyamJWSFZvVEwxIiwidXNlcl9zdGF0dXMiOiIwIiwiZGlzcGxheV9uYW1lIjoidXNlcjAwMSB0ZXN0IiwibGFzdF9sb2dpbiI6MTYwODA5NjQ3MH0.JyU-3Y2N6h5ye2m31wf-m7lYStyDwxroEKU3Ko9_4pXwk23rVu_9PdoDXfhFWJKrWlGIjx8byj2ICFdKlLvASjRp6YSlj-VALStZzQawXL8-iXJroMrZjnkK4kNtkYG26TCEmEfbS3L-qTRtq2UYVl9TwJ6hEiTbYe0SCoJB5hQ5NNS4GEyniUU5pvPbTbFaGUQ7_4-9AWXVBYyrR0ng99qR9U2uwu7V1I9ChqK4VtmhdMkQr3UbnD7uz8RTUyOKTEGuKk6_2h7bLHcnC5eC3lFVmaDi07Detj8dClGKLHmuCAKGGsfJo0oeo5TiwtQ4nfg1t-t0miGuFg-kjv_7NGO5F-2UGUWNNa0AyxcTRr6y7F249caFYBsvU2fzGH34lOi9qlxH4qgh1Yg4HH7DAmCe7VRr85cxyquGHIJZHk9WlkWwU8HSHEQ59ZZhGdmqAHgVpElQb80v2_NFLBUH0doQIKfX9lKoxxHgH8yqmJk8DL1pYIX6kWheqHREoOkNWUMsm3HT8zYiDp1x-yOPUwrKwyxanExaEHebFIhusWEvKcyBMJSwgOF9MzNc6KRDu5VHK7Rqs68fSc6_jX6at731R-C9cVrO9jabzRXP4rohYU_FNQSuIgRIY0m0CfNbZ_4aJ1o8ulKu8g1rqPBdLTmT1Sag17ZswqtI7qwkEwI'
},
formData: {
'cart_data[6ea9ab1baa0efb9e19094440c317e21b]': '10'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
url = "http://wooapi.vxinfosystem.com/wp-json/letscms/v1/cart/update-quantities"
payload = {'cart_data[6ea9ab1baa0efb9e19094440c317e21b]': '10'}
files = [
]
headers = {
'letscms_token': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJJRCI6IjYiLCJ1c2VyX2xvZ2luIjoidXNlcjAwMSIsInVzZXJfbmljZW5hbWUiOiJ1c2VyMDAxIiwidXNlcl9lbWFpbCI6InVzZXIwMDFAdGVzdC5jb20iLCJ1c2VyX3VybCI6IiIsInVzZXJfcmVnaXN0ZXJlZCI6IjIwMjAtMTAtMTUgMTI6MTc6MTciLCJ1c2VyX2FjdGl2YXRpb25fa2V5IjoiMTYwMjc2NDIzODokUCRCVXFCTVRWdFBRNHVRVWE2ZFNTbzEyamJWSFZvVEwxIiwidXNlcl9zdGF0dXMiOiIwIiwiZGlzcGxheV9uYW1lIjoidXNlcjAwMSB0ZXN0IiwibGFzdF9sb2dpbiI6MTYwODA5NjQ3MH0.JyU-3Y2N6h5ye2m31wf-m7lYStyDwxroEKU3Ko9_4pXwk23rVu_9PdoDXfhFWJKrWlGIjx8byj2ICFdKlLvASjRp6YSlj-VALStZzQawXL8-iXJroMrZjnkK4kNtkYG26TCEmEfbS3L-qTRtq2UYVl9TwJ6hEiTbYe0SCoJB5hQ5NNS4GEyniUU5pvPbTbFaGUQ7_4-9AWXVBYyrR0ng99qR9U2uwu7V1I9ChqK4VtmhdMkQr3UbnD7uz8RTUyOKTEGuKk6_2h7bLHcnC5eC3lFVmaDi07Detj8dClGKLHmuCAKGGsfJo0oeo5TiwtQ4nfg1t-t0miGuFg-kjv_7NGO5F-2UGUWNNa0AyxcTRr6y7F249caFYBsvU2fzGH34lOi9qlxH4qgh1Yg4HH7DAmCe7VRr85cxyquGHIJZHk9WlkWwU8HSHEQ59ZZhGdmqAHgVpElQb80v2_NFLBUH0doQIKfX9lKoxxHgH8yqmJk8DL1pYIX6kWheqHREoOkNWUMsm3HT8zYiDp1x-yOPUwrKwyxanExaEHebFIhusWEvKcyBMJSwgOF9MzNc6KRDu5VHK7Rqs68fSc6_jX6at731R-C9cVrO9jabzRXP4rohYU_FNQSuIgRIY0m0CfNbZ_4aJ1o8ulKu8g1rqPBdLTmT1Sag17ZswqtI7qwkEwI'
}
response = requests.request("POST", url, headers=headers, data = payload, files = files)
print(response.text.encode('utf8'))
var client = new RestClient("http://wooapi.vxinfosystem.com/wp-json/letscms/v1/cart/update-quantities");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("letscms_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJJRCI6IjYiLCJ1c2VyX2xvZ2luIjoidXNlcjAwMSIsInVzZXJfbmljZW5hbWUiOiJ1c2VyMDAxIiwidXNlcl9lbWFpbCI6InVzZXIwMDFAdGVzdC5jb20iLCJ1c2VyX3VybCI6IiIsInVzZXJfcmVnaXN0ZXJlZCI6IjIwMjAtMTAtMTUgMTI6MTc6MTciLCJ1c2VyX2FjdGl2YXRpb25fa2V5IjoiMTYwMjc2NDIzODokUCRCVXFCTVRWdFBRNHVRVWE2ZFNTbzEyamJWSFZvVEwxIiwidXNlcl9zdGF0dXMiOiIwIiwiZGlzcGxheV9uYW1lIjoidXNlcjAwMSB0ZXN0IiwibGFzdF9sb2dpbiI6MTYwODA5NjQ3MH0.JyU-3Y2N6h5ye2m31wf-m7lYStyDwxroEKU3Ko9_4pXwk23rVu_9PdoDXfhFWJKrWlGIjx8byj2ICFdKlLvASjRp6YSlj-VALStZzQawXL8-iXJroMrZjnkK4kNtkYG26TCEmEfbS3L-qTRtq2UYVl9TwJ6hEiTbYe0SCoJB5hQ5NNS4GEyniUU5pvPbTbFaGUQ7_4-9AWXVBYyrR0ng99qR9U2uwu7V1I9ChqK4VtmhdMkQr3UbnD7uz8RTUyOKTEGuKk6_2h7bLHcnC5eC3lFVmaDi07Detj8dClGKLHmuCAKGGsfJo0oeo5TiwtQ4nfg1t-t0miGuFg-kjv_7NGO5F-2UGUWNNa0AyxcTRr6y7F249caFYBsvU2fzGH34lOi9qlxH4qgh1Yg4HH7DAmCe7VRr85cxyquGHIJZHk9WlkWwU8HSHEQ59ZZhGdmqAHgVpElQb80v2_NFLBUH0doQIKfX9lKoxxHgH8yqmJk8DL1pYIX6kWheqHREoOkNWUMsm3HT8zYiDp1x-yOPUwrKwyxanExaEHebFIhusWEvKcyBMJSwgOF9MzNc6KRDu5VHK7Rqs68fSc6_jX6at731R-C9cVrO9jabzRXP4rohYU_FNQSuIgRIY0m0CfNbZ_4aJ1o8ulKu8g1rqPBdLTmT1Sag17ZswqtI7qwkEwI");
request.AlwaysMultipartFormData = true;
request.AddParameter("cart_data[6ea9ab1baa0efb9e19094440c317e21b]", "10");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request POST 'http://wooapi.vxinfosystem.com/wp-json/letscms/v1/cart/update-quantities' \
--header 'letscms_token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJJRCI6IjYiLCJ1c2VyX2xvZ2luIjoidXNlcjAwMSIsInVzZXJfbmljZW5hbWUiOiJ1c2VyMDAxIiwidXNlcl9lbWFpbCI6InVzZXIwMDFAdGVzdC5jb20iLCJ1c2VyX3VybCI6IiIsInVzZXJfcmVnaXN0ZXJlZCI6IjIwMjAtMTAtMTUgMTI6MTc6MTciLCJ1c2VyX2FjdGl2YXRpb25fa2V5IjoiMTYwMjc2NDIzODokUCRCVXFCTVRWdFBRNHVRVWE2ZFNTbzEyamJWSFZvVEwxIiwidXNlcl9zdGF0dXMiOiIwIiwiZGlzcGxheV9uYW1lIjoidXNlcjAwMSB0ZXN0IiwibGFzdF9sb2dpbiI6MTYwODA5NjQ3MH0.JyU-3Y2N6h5ye2m31wf-m7lYStyDwxroEKU3Ko9_4pXwk23rVu_9PdoDXfhFWJKrWlGIjx8byj2ICFdKlLvASjRp6YSlj-VALStZzQawXL8-iXJroMrZjnkK4kNtkYG26TCEmEfbS3L-qTRtq2UYVl9TwJ6hEiTbYe0SCoJB5hQ5NNS4GEyniUU5pvPbTbFaGUQ7_4-9AWXVBYyrR0ng99qR9U2uwu7V1I9ChqK4VtmhdMkQr3UbnD7uz8RTUyOKTEGuKk6_2h7bLHcnC5eC3lFVmaDi07Detj8dClGKLHmuCAKGGsfJo0oeo5TiwtQ4nfg1t-t0miGuFg-kjv_7NGO5F-2UGUWNNa0AyxcTRr6y7F249caFYBsvU2fzGH34lOi9qlxH4qgh1Yg4HH7DAmCe7VRr85cxyquGHIJZHk9WlkWwU8HSHEQ59ZZhGdmqAHgVpElQb80v2_NFLBUH0doQIKfX9lKoxxHgH8yqmJk8DL1pYIX6kWheqHREoOkNWUMsm3HT8zYiDp1x-yOPUwrKwyxanExaEHebFIhusWEvKcyBMJSwgOF9MzNc6KRDu5VHK7Rqs68fSc6_jX6at731R-C9cVrO9jabzRXP4rohYU_FNQSuIgRIY0m0CfNbZ_4aJ1o8ulKu8g1rqPBdLTmT1Sag17ZswqtI7qwkEwI' \
--form 'cart_data[6ea9ab1baa0efb9e19094440c317e21b]=10'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = new MultipartBody.Builder().setType(MultipartBody.FORM)
.addFormDataPart("cart_data[6ea9ab1baa0efb9e19094440c317e21b]", "10")
.build();
Request request = new Request.Builder()
.url("http://wooapi.vxinfosystem.com/wp-json/letscms/v1/cart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jabzRXP4rohYU_FNQSuIgRIY0m0CfNbZ_4aJ1o8ulKu8g1rqPBdLTmT1Sag17ZswqtI7qwkEwI")
.build();
Response response = client.newCall(request).execute();
require "uri"
require "net/http"
url = URI("http://wooapi.vxinfosystem.com/wp-json/letscms/v1/cart/update-quantities")
https = Net::HTTP.new(url.host, url.port);
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["letscms_token"] = "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJJRCI6IjYiLCJ1c2VyX2xvZ2luIjoidXNlcjAwMSIsInVzZXJfbmljZW5hbWUiOiJ1c2VyMDAxIiwidXNlcl9lbWFpbCI6InVzZXIwMDFAdGVzdC5jb20iLCJ1c2VyX3VybCI6IiIsInVzZXJfcmVnaXN0ZXJlZCI6IjIwMjAtMTAtMTUgMTI6MTc6MTciLCJ1c2VyX2FjdGl2YXRpb25fa2V5IjoiMTYwMjc2NDIzODokUCRCVXFCTVRWdFBRNHVRVWE2ZFNTbzEyamJWSFZvVEwxIiwidXNlcl9zdGF0dXMiOiIwIiwiZGlzcGxheV9uYW1lIjoidXNlcjAwMSB0ZXN0IiwibGFzdF9sb2dpbiI6MTYwODA5NjQ3MH0.JyU-3Y2N6h5ye2m31wf-m7lYStyDwxroEKU3Ko9_4pXwk23rVu_9PdoDXfhFWJKrWlGIjx8byj2ICFdKlLvASjRp6YSlj-VALStZzQawXL8-iXJroMrZjnkK4kNtkYG26TCEmEfbS3L-qTRtq2UYVl9TwJ6hEiTbYe0SCoJB5hQ5NNS4GEyniUU5pvPbTbFaGUQ7_4-9AWXVBYyrR0ng99qR9U2uwu7V1I9ChqK4VtmhdMkQr3UbnD7uz8RTUyOKTEGuKk6_2h7bLHcnC5eC3lFVmaDi07Detj8dClGKLHmuCAKGGsfJo0oeo5TiwtQ4nfg1t-t0miGuFg-kjv_7NGO5F-2UGUWNNa0AyxcTRr6y7F249caFYBsvU2fzGH34lOi9qlxH4qgh1Yg4HH7DAmCe7VRr85cxyquGHIJZHk9WlkWwU8HSHEQ59ZZhGdmqAHgVpElQb80v2_NFLBUH0doQIKfX9lKoxxHgH8yqmJk8DL1pYIX6kWheqHREoOkNWUMsm3HT8zYiDp1x-yOPUwrKwyxanExaEHebFIhusWEvKcyBMJSwgOF9MzNc6KRDu5VHK7Rqs68fSc6_jX6at731R-C9cVrO9jabzRXP4rohYU_FNQSuIgRIY0m0CfNbZ_4aJ1o8ulKu8g1rqPBdLTmT1Sag17ZswqtI7qwkEwI"
form_data = [['cart_data[6ea9ab1baa0efb9e19094440c317e21b]', '10']]
request.set_form form_data, 'multipart/form-data'
response = https.request(request)
puts response.read_body
Success Response
{
"status": true,
"errors": [],
"message": "Ship Your Idea removed from cart.",
"coupon_status": false,
"coupon_errors": [],
"data": {
"cart_item_count": 0
}
}
Response Failed
{
"status": false,
"errors": {
"6ea9ab1baa0efb9e19094440c317e21b": "Invalid item_key, product not exists. Perhaps it was deleted?"
},
"message": "",
"coupon_status": false,
"coupon_errors": []
}
LETS WOO Product Listing API
The "Product Listing" API call is used to shown the list of product with filter and search.
POST: /wp-json/letscms/v1/products?page=5&categories=hoodies, Tshirts&search=vneck&featured=1&instock=1&price_from=18&price_to=25&sort_by=modified&sort_order=desc
Parameter | Type | Position | # | Description |
---|---|---|---|---|
page | string |
params |
Required |
Pagination page Number. |
categories | string |
params |
optinal |
Categoreis slugs comma (,) seprated. |
search | string |
params |
optinal |
Search keywords. |
featured | string |
params |
optinal |
Featured. |
instock | string |
params |
optinal |
Only instock products. |
price_from | string |
params |
optinal |
Price range minimum value. |
price_to | string |
params |
optinal |
Price range maximum value. |
sort_by | string |
params |
optinal |
Sort by key. |
sort_order | string |
params |
optinal |
Sort by direction. |
Parameter | page |
---|---|
Type | string |
Position | params |
# | Required |
Description | Pagination page Number |
Parameter | categories |
Type | string |
Position | params |
# | optinal |
Description | Categoreis slugs comma (,) seprated |
Parameter | search |
Type | string |
Position | params |
# | optinal |
Description | Search keywords |
Parameter | featured |
Type | string |
Position | params |
# | optinal |
Description | Featured |
Parameter | instock |
Type | string |
Position | params |
# | optinal |
Description | Only instock products |
Parameter | price_from |
Type | string |
Position | params |
# | optinal |
Description | price range minimum value |
Parameter | price_to |
Type | string |
Position | params |
# | optinal |
Description | price range maximum value |
Parameter | sort_by |
Type | string |
Position | params |
# | optinal |
Description | Sort by key |
Parameter | sort_order |
Type | string |
Position | params |
# | optinal |
Description | Sort by direction |
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "http://wooapi.vxinfosystem.com/wp-json/letscms/v1/products?page=5&categories=hoodies,%20%20Tshirts&search=vneck&featured=1&instock=1&price_from=18&price_to=25&sort_by=modified&sort_order=desc",
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(
"fmw_token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJ1c2VybmFtZSI6InVzZXIwMDEiLCJJRCI6IjIiLCJlbWFpbCI6InVzZXIwMDFAdGVzdC5jb20iLCJwaG9uZSI6IjAiLCJ1c2VyX2tleSI6IjI1OTQ4NjAzMSIsInBhcmVudF9rZXkiOiIwIiwic3BvbnNvcl9rZXkiOiIwIiwicGF5bWVudF9zdGF0dXMiOiIxIiwibGFzdF9sb2dpbiI6MTU5ODc2MTE5M30.n4pJ0BjmXrz7tWs5iEhSqcDpR4-aUo4dN-OkrCLtBgL-RiTFJGijMGV2Jy2TIQFu6jSGCSWzr9hSchrLgLtojPBuRseWPztpFoQq9fd2ipfrqcgHZMapyZD5zKKQj4jioxzxqWhg1j43r5CnO6dnRFIblmjX0dEOKk0t1B_mqSerTsHqo2WiWs8sqQcycUpJCIlWCBmnIAfuPvf-vxPQsI2kt9epz21YEZ6xfTvH6fzxZzZH6MRXXqTszXFJnI-k2HyChp0fXEu4Qj567yzV8t8Isd6BYgFDf6_ol7tnfhQOJJaswTUUbKabENb_xNVkBhbyza_dpeGiMoE1MR8wDNGVeeWXf3_I-0ownl9cCO06hnKoMLvj_sjTP1bNez8r7VctHVtm-NSwEMz8_F-OqAAzUqA2nhykUVxtmTSuw7OOANIgAk_Z32xzhXccd923EvzmOJhziNIqcHD25hX-9A8JATOfQsVEGyregYWaGWievbc7npUDxdPTCbaYk9-UFEBr3kb4BCNYqmK0xVvfg5_UkFTGC959VSoL8OC6LaSyi_wsIvGzuH5FHGf0WrpJ_1dFzc3ggr2smhOc5wtWidFeIMUwhy9bBGkBwrohCeIN1KYsJVyIZZCbuphrejTiqgeLZEE9GByPluhLVPP1q6sHahHKlh3sgdqwk16rI1E"
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var settings = {
"url": "http://wooapi.vxinfosystem.com/wp-json/letscms/v1/products?page=5&categories=hoodies, Tshirts&search=vneck&featured=1&instock=1&price_from=18&price_to=25&sort_by=modified&sort_order=desc",
"method": "GET",
"timeout": 0,
"headers": {
"fmw_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJ1c2VybmFtZSI6InVzZXIwMDEiLCJJRCI6IjIiLCJlbWFpbCI6InVzZXIwMDFAdGVzdC5jb20iLCJwaG9uZSI6IjAiLCJ1c2VyX2tleSI6IjI1OTQ4NjAzMSIsInBhcmVudF9rZXkiOiIwIiwic3BvbnNvcl9rZXkiOiIwIiwicGF5bWVudF9zdGF0dXMiOiIxIiwibGFzdF9sb2dpbiI6MTU5ODc2MTE5M30.n4pJ0BjmXrz7tWs5iEhSqcDpR4-aUo4dN-OkrCLtBgL-RiTFJGijMGV2Jy2TIQFu6jSGCSWzr9hSchrLgLtojPBuRseWPztpFoQq9fd2ipfrqcgHZMapyZD5zKKQj4jioxzxqWhg1j43r5CnO6dnRFIblmjX0dEOKk0t1B_mqSerTsHqo2WiWs8sqQcycUpJCIlWCBmnIAfuPvf-vxPQsI2kt9epz21YEZ6xfTvH6fzxZzZH6MRXXqTszXFJnI-k2HyChp0fXEu4Qj567yzV8t8Isd6BYgFDf6_ol7tnfhQOJJaswTUUbKabENb_xNVkBhbyza_dpeGiMoE1MR8wDNGVeeWXf3_I-0ownl9cCO06hnKoMLvj_sjTP1bNez8r7VctHVtm-NSwEMz8_F-OqAAzUqA2nhykUVxtmTSuw7OOANIgAk_Z32xzhXccd923EvzmOJhziNIqcHD25hX-9A8JATOfQsVEGyregYWaGWievbc7npUDxdPTCbaYk9-UFEBr3kb4BCNYqmK0xVvfg5_UkFTGC959VSoL8OC6LaSyi_wsIvGzuH5FHGf0WrpJ_1dFzc3ggr2smhOc5wtWidFeIMUwhy9bBGkBwrohCeIN1KYsJVyIZZCbuphrejTiqgeLZEE9GByPluhLVPP1q6sHahHKlh3sgdqwk16rI1E"
},
};
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require('request');
var options = {
'method': 'GET',
'url': 'http://wooapi.vxinfosystem.com/wp-json/letscms/v1/products?page=5&categories=hoodies, Tshirts&search=vneck&featured=1&instock=1&price_from=18&price_to=25&sort_by=modified&sort_order=desc',
'headers': {
'fmw_token': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJ1c2VybmFtZSI6InVzZXIwMDEiLCJJRCI6IjIiLCJlbWFpbCI6InVzZXIwMDFAdGVzdC5jb20iLCJwaG9uZSI6IjAiLCJ1c2VyX2tleSI6IjI1OTQ4NjAzMSIsInBhcmVudF9rZXkiOiIwIiwic3BvbnNvcl9rZXkiOiIwIiwicGF5bWVudF9zdGF0dXMiOiIxIiwibGFzdF9sb2dpbiI6MTU5ODc2MTE5M30.n4pJ0BjmXrz7tWs5iEhSqcDpR4-aUo4dN-OkrCLtBgL-RiTFJGijMGV2Jy2TIQFu6jSGCSWzr9hSchrLgLtojPBuRseWPztpFoQq9fd2ipfrqcgHZMapyZD5zKKQj4jioxzxqWhg1j43r5CnO6dnRFIblmjX0dEOKk0t1B_mqSerTsHqo2WiWs8sqQcycUpJCIlWCBmnIAfuPvf-vxPQsI2kt9epz21YEZ6xfTvH6fzxZzZH6MRXXqTszXFJnI-k2HyChp0fXEu4Qj567yzV8t8Isd6BYgFDf6_ol7tnfhQOJJaswTUUbKabENb_xNVkBhbyza_dpeGiMoE1MR8wDNGVeeWXf3_I-0ownl9cCO06hnKoMLvj_sjTP1bNez8r7VctHVtm-NSwEMz8_F-OqAAzUqA2nhykUVxtmTSuw7OOANIgAk_Z32xzhXccd923EvzmOJhziNIqcHD25hX-9A8JATOfQsVEGyregYWaGWievbc7npUDxdPTCbaYk9-UFEBr3kb4BCNYqmK0xVvfg5_UkFTGC959VSoL8OC6LaSyi_wsIvGzuH5FHGf0WrpJ_1dFzc3ggr2smhOc5wtWidFeIMUwhy9bBGkBwrohCeIN1KYsJVyIZZCbuphrejTiqgeLZEE9GByPluhLVPP1q6sHahHKlh3sgdqwk16rI1E'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
url = "http://wooapi.vxinfosystem.com/wp-json/letscms/v1/products?page=5&categories=hoodies, Tshirts&search=vneck&featured=1&instock=1&price_from=18&price_to=25&sort_by=modified&sort_order=desc"
payload = {}
headers = {
'fmw_token': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJ1c2VybmFtZSI6InVzZXIwMDEiLCJJRCI6IjIiLCJlbWFpbCI6InVzZXIwMDFAdGVzdC5jb20iLCJwaG9uZSI6IjAiLCJ1c2VyX2tleSI6IjI1OTQ4NjAzMSIsInBhcmVudF9rZXkiOiIwIiwic3BvbnNvcl9rZXkiOiIwIiwicGF5bWVudF9zdGF0dXMiOiIxIiwibGFzdF9sb2dpbiI6MTU5ODc2MTE5M30.n4pJ0BjmXrz7tWs5iEhSqcDpR4-aUo4dN-OkrCLtBgL-RiTFJGijMGV2Jy2TIQFu6jSGCSWzr9hSchrLgLtojPBuRseWPztpFoQq9fd2ipfrqcgHZMapyZD5zKKQj4jioxzxqWhg1j43r5CnO6dnRFIblmjX0dEOKk0t1B_mqSerTsHqo2WiWs8sqQcycUpJCIlWCBmnIAfuPvf-vxPQsI2kt9epz21YEZ6xfTvH6fzxZzZH6MRXXqTszXFJnI-k2HyChp0fXEu4Qj567yzV8t8Isd6BYgFDf6_ol7tnfhQOJJaswTUUbKabENb_xNVkBhbyza_dpeGiMoE1MR8wDNGVeeWXf3_I-0ownl9cCO06hnKoMLvj_sjTP1bNez8r7VctHVtm-NSwEMz8_F-OqAAzUqA2nhykUVxtmTSuw7OOANIgAk_Z32xzhXccd923EvzmOJhziNIqcHD25hX-9A8JATOfQsVEGyregYWaGWievbc7npUDxdPTCbaYk9-UFEBr3kb4BCNYqmK0xVvfg5_UkFTGC959VSoL8OC6LaSyi_wsIvGzuH5FHGf0WrpJ_1dFzc3ggr2smhOc5wtWidFeIMUwhy9bBGkBwrohCeIN1KYsJVyIZZCbuphrejTiqgeLZEE9GByPluhLVPP1q6sHahHKlh3sgdqwk16rI1E'
}
response = requests.request("GET", url, headers=headers, data = payload)
print(response.text.encode('utf8'))
var client = new RestClient("http://wooapi.vxinfosystem.com/wp-json/letscms/v1/products?page=5&categories=hoodies, Tshirts&search=vneck&featured=1&instock=1&price_from=18&price_to=25&sort_by=modified&sort_order=desc");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("fmw_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJ1c2VybmFtZSI6InVzZXIwMDEiLCJJRCI6IjIiLCJlbWFpbCI6InVzZXIwMDFAdGVzdC5jb20iLCJwaG9uZSI6IjAiLCJ1c2VyX2tleSI6IjI1OTQ4NjAzMSIsInBhcmVudF9rZXkiOiIwIiwic3BvbnNvcl9rZXkiOiIwIiwicGF5bWVudF9zdGF0dXMiOiIxIiwibGFzdF9sb2dpbiI6MTU5ODc2MTE5M30.n4pJ0BjmXrz7tWs5iEhSqcDpR4-aUo4dN-OkrCLtBgL-RiTFJGijMGV2Jy2TIQFu6jSGCSWzr9hSchrLgLtojPBuRseWPztpFoQq9fd2ipfrqcgHZMapyZD5zKKQj4jioxzxqWhg1j43r5CnO6dnRFIblmjX0dEOKk0t1B_mqSerTsHqo2WiWs8sqQcycUpJCIlWCBmnIAfuPvf-vxPQsI2kt9epz21YEZ6xfTvH6fzxZzZH6MRXXqTszXFJnI-k2HyChp0fXEu4Qj567yzV8t8Isd6BYgFDf6_ol7tnfhQOJJaswTUUbKabENb_xNVkBhbyza_dpeGiMoE1MR8wDNGVeeWXf3_I-0ownl9cCO06hnKoMLvj_sjTP1bNez8r7VctHVtm-NSwEMz8_F-OqAAzUqA2nhykUVxtmTSuw7OOANIgAk_Z32xzhXccd923EvzmOJhziNIqcHD25hX-9A8JATOfQsVEGyregYWaGWievbc7npUDxdPTCbaYk9-UFEBr3kb4BCNYqmK0xVvfg5_UkFTGC959VSoL8OC6LaSyi_wsIvGzuH5FHGf0WrpJ_1dFzc3ggr2smhOc5wtWidFeIMUwhy9bBGkBwrohCeIN1KYsJVyIZZCbuphrejTiqgeLZEE9GByPluhLVPP1q6sHahHKlh3sgdqwk16rI1E");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request GET 'http://wooapi.vxinfosystem.com/wp-json/letscms/v1/products?page=5&categories=hoodies,%20%20Tshirts&search=vneck&featured=1&instock=1&price_from=18&price_to=25&sort_by=modified&sort_order=desc' \
--header 'fmw_token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJ1c2VybmFtZSI6InVzZXIwMDEiLCJJRCI6IjIiLCJlbWFpbCI6InVzZXIwMDFAdGVzdC5jb20iLCJwaG9uZSI6IjAiLCJ1c2VyX2tleSI6IjI1OTQ4NjAzMSIsInBhcmVudF9rZXkiOiIwIiwic3BvbnNvcl9rZXkiOiIwIiwicGF5bWVudF9zdGF0dXMiOiIxIiwibGFzdF9sb2dpbiI6MTU5ODc2MTE5M30.n4pJ0BjmXrz7tWs5iEhSqcDpR4-aUo4dN-OkrCLtBgL-RiTFJGijMGV2Jy2TIQFu6jSGCSWzr9hSchrLgLtojPBuRseWPztpFoQq9fd2ipfrqcgHZMapyZD5zKKQj4jioxzxqWhg1j43r5CnO6dnRFIblmjX0dEOKk0t1B_mqSerTsHqo2WiWs8sqQcycUpJCIlWCBmnIAfuPvf-vxPQsI2kt9epz21YEZ6xfTvH6fzxZzZH6MRXXqTszXFJnI-k2HyChp0fXEu4Qj567yzV8t8Isd6BYgFDf6_ol7tnfhQOJJaswTUUbKabENb_xNVkBhbyza_dpeGiMoE1MR8wDNGVeeWXf3_I-0ownl9cCO06hnKoMLvj_sjTP1bNez8r7VctHVtm-NSwEMz8_F-OqAAzUqA2nhykUVxtmTSuw7OOANIgAk_Z32xzhXccd923EvzmOJhziNIqcHD25hX-9A8JATOfQsVEGyregYWaGWievbc7npUDxdPTCbaYk9-UFEBr3kb4BCNYqmK0xVvfg5_UkFTGC959VSoL8OC6LaSyi_wsIvGzuH5FHGf0WrpJ_1dFzc3ggr2smhOc5wtWidFeIMUwhy9bBGkBwrohCeIN1KYsJVyIZZCbuphrejTiqgeLZEE9GByPluhLVPP1q6sHahHKlh3sgdqwk16rI1E'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("http://wooapi.vxinfosystem.com/wp-json/letscms/v1/products?page=5&categories=hoodies, Tshirts&search=vneck&featured=1&instock=1&price_from=18&price_to=25&sort_by=modified&sort_order=desc")
.method("GET", null)
.addHeader("fmw_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJ1c2VybmFtZSI6InVzZXIwMDEiLCJJRCI6IjIiLCJlbWFpbCI6InVzZXIwMDFAdGVzdC5jb20iLCJwaG9uZSI6IjAiLCJ1c2VyX2tleSI6IjI1OTQ4NjAzMSIsInBhcmVudF9rZXkiOiIwIiwic3BvbnNvcl9rZXkiOiIwIiwicGF5bWVudF9zdGF0dXMiOiIxIiwibGFzdF9sb2dpbiI6MTU5ODc2MTE5M30.n4pJ0BjmXrz7tWs5iEhSqcDpR4-aUo4dN-OkrCLtBgL-RiTFJGijMGV2Jy2TIQFu6jSGCSWzr9hSchrLgLtojPBuRseWPztpFoQq9fd2ipfrqcgHZMapyZD5zKKQj4jioxzxqWhg1j43r5CnO6dnRFIblmjX0dEOKk0t1B_mqSerTsHqo2WiWs8sqQcycUpJCIlWCBmnIAfuPvf-vxPQsI2kt9epz21YEZ6xfTvH6fzxZzZH6MRXXqTszXFJnI-k2HyChp0fXEu4Qj567yzV8t8Isd6BYgFDf6_ol7tnfhQOJJaswTUUbKabENb_xNVkBhbyza_dpeGiMoE1MR8wDNGVeeWXf3_I-0ownl9cCO06hnKoMLvj_sjTP1bNez8r7VctHVtm-NSwEMz8_F-OqAAzUqA2nhykUVxtmTSuw7OOANIgAk_Z32xzhXccd923EvzmOJhziNIqcHD25hX-9A8JATOfQsVEGyregYWaGWievbc7npUDxdPTCbaYk9-UFEBr3kb4BCNYqmK0xVvfg5_UkFTGC959VSoL8OC6LaSyi_wsIvGzuH5FHGf0WrpJ_1dFzc3ggr2smhOc5wtWidFeIMUwhy9bBGkBwrohCeIN1KYsJVyIZZCbuphrejTiqgeLZEE9GByPluhLVPP1q6sHahHKlh3sgdqwk16rI1E")
.build();
Response response = client.newCall(request).execute();
require "uri"
require "net/http"
url = URI("http://wooapi.vxinfosystem.com/wp-json/letscms/v1/products?page=5&categories=hoodies, Tshirts&search=vneck&featured=1&instock=1&price_from=18&price_to=25&sort_by=modified&sort_order=desc")
https = Net::HTTP.new(url.host, url.port);
https.use_ssl = true
request = Net::HTTP::Get.new(url)
request["fmw_token"] = "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJ1c2VybmFtZSI6InVzZXIwMDEiLCJJRCI6IjIiLCJlbWFpbCI6InVzZXIwMDFAdGVzdC5jb20iLCJwaG9uZSI6IjAiLCJ1c2VyX2tleSI6IjI1OTQ4NjAzMSIsInBhcmVudF9rZXkiOiIwIiwic3BvbnNvcl9rZXkiOiIwIiwicGF5bWVudF9zdGF0dXMiOiIxIiwibGFzdF9sb2dpbiI6MTU5ODc2MTE5M30.n4pJ0BjmXrz7tWs5iEhSqcDpR4-aUo4dN-OkrCLtBgL-RiTFJGijMGV2Jy2TIQFu6jSGCSWzr9hSchrLgLtojPBuRseWPztpFoQq9fd2ipfrqcgHZMapyZD5zKKQj4jioxzxqWhg1j43r5CnO6dnRFIblmjX0dEOKk0t1B_mqSerTsHqo2WiWs8sqQcycUpJCIlWCBmnIAfuPvf-vxPQsI2kt9epz21YEZ6xfTvH6fzxZzZH6MRXXqTszXFJnI-k2HyChp0fXEu4Qj567yzV8t8Isd6BYgFDf6_ol7tnfhQOJJaswTUUbKabENb_xNVkBhbyza_dpeGiMoE1MR8wDNGVeeWXf3_I-0ownl9cCO06hnKoMLvj_sjTP1bNez8r7VctHVtm-NSwEMz8_F-OqAAzUqA2nhykUVxtmTSuw7OOANIgAk_Z32xzhXccd923EvzmOJhziNIqcHD25hX-9A8JATOfQsVEGyregYWaGWievbc7npUDxdPTCbaYk9-UFEBr3kb4BCNYqmK0xVvfg5_UkFTGC959VSoL8OC6LaSyi_wsIvGzuH5FHGf0WrpJ_1dFzc3ggr2smhOc5wtWidFeIMUwhy9bBGkBwrohCeIN1KYsJVyIZZCbuphrejTiqgeLZEE9GByPluhLVPP1q6sHahHKlh3sgdqwk16rI1E"
response = https.request(request)
puts response.read_body
Response
{
"status": true,
"errors": [],
"message": "Sorry, No Products found.",
"data": {
"slider": [
{
"title": "Shop Page Slider Title 1",
"subtitle": "Shop Page Slider sitle 1",
"link_type": "product",
"link": "76",
"image": "http://fmw.vxinfosystem.com/wp-content/uploads/lwa_shop_slider/slide_1602763525.jpg"
},
.
.
.
.
],
"currency": "₹",
"total_pages": 0,
"products": [
{
"id": 229,
"type": "variable",
"name": "V-Neck T-Shirt",
"image": "http://wooapi.vxinfosystem.com/wp-content/uploads/2020/09/vneck-tee-2.jpg",
"price": "15",
"regular_price": "",
"sale_price": "",
"sku": "woo-vneck-tee"
},
.
.
.
]
}
}
LETS WOO Single Product API
The "Single Product" API call is used to shown the detail of product by product id.
POST: /wp-json/letscms/v1/product/316
Parameter | Type | Position | # | Description |
---|---|---|---|---|
product_id | Integer |
params |
Required |
Product id of the product. |
Parameter | product_id |
---|---|
Type | Integer |
Position | params |
# | Required |
Description | Product id of the product. |
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "http://wooapi.vxinfosystem.com/wp-json/letscms/v1/product/316",
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",
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var form = new FormData();
var settings = {
"url": "http://wooapi.vxinfosystem.com/wp-json/letscms/v1/product/316",
"method": "GET",
"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': 'GET',
'url': 'http://wooapi.vxinfosystem.com/wp-json/letscms/v1/product/316',
'headers': {
},
formData: {
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
url = "http://wooapi.vxinfosystem.com/wp-json/letscms/v1/product/316"
payload = {}
files = {}
headers= {}
response = requests.request("GET", url, headers=headers, data = payload, files = files)
print(response.text.encode('utf8'))
var client = new RestClient("http://wooapi.vxinfosystem.com/wp-json/letscms/v1/product/316");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AlwaysMultipartFormData = true;
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request GET 'http://wooapi.vxinfosystem.com/wp-json/letscms/v1/product/316'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("http://wooapi.vxinfosystem.com/wp-json/letscms/v1/product/316")
.method("GET", null)
.build();
Response response = client.newCall(request).execute();
require "uri"
require "net/http"
url = URI("http://wooapi.vxinfosystem.com/wp-json/letscms/v1/product/316")
https = Net::HTTP.new(url.host, url.port);
https.use_ssl = true
request = Net::HTTP::Get.new(url)
form_data = []
request.set_form form_data, 'multipart/form-data'
response = https.request(request)
puts response.read_body
Success Response
{
"status": true,
"errors": [],
"message": "",
"data": {
"id": 316,
"type": "simple",
"name": "Ship Your Idea",
"slug": "ship-your-idea",
.
.
.
.
.
}
}
Response Failed
{
"status": false,
"errors": [],
"message": "product not exists. Perhaps it was deleted?"
}
LETS WOO Orders API
The "Orders" API allow you to to manage purchase item information, track order fulfillment, integrate customer data, and link payments.
GET: /wp-json/letscms/v1/orders
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 => "http://wooapi.vxinfosystem.com/wp-json/letscms/v1/orders",
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.eyJJRCI6IjYiLCJ1c2VyX2xvZ2luIjoidXNlcjAwMSIsInVzZXJfbmljZW5hbWUiOiJ1c2VyMDAxIiwidXNlcl9lbWFpbCI6InVzZXIwMDFAdGVzdC5jb20iLCJ1c2VyX3VybCI6IiIsInVzZXJfcmVnaXN0ZXJlZCI6IjIwMjAtMTAtMTUgMTI6MTc6MTciLCJ1c2VyX2FjdGl2YXRpb25fa2V5IjoiMTYwMjc2NDIzODokUCRCVXFCTVRWdFBRNHVRVWE2ZFNTbzEyamJWSFZvVEwxIiwidXNlcl9zdGF0dXMiOiIwIiwiZGlzcGxheV9uYW1lIjoidXNlcjAwMSB0ZXN0IiwibGFzdF9sb2dpbiI6MTYwODA5NjQ3MH0.JyU-3Y2N6h5ye2m31wf-m7lYStyDwxroEKU3Ko9_4pXwk23rVu_9PdoDXfhFWJKrWlGIjx8byj2ICFdKlLvASjRp6YSlj-VALStZzQawXL8-iXJroMrZjnkK4kNtkYG26TCEmEfbS3L-qTRtq2UYVl9TwJ6hEiTbYe0SCoJB5hQ5NNS4GEyniUU5pvPbTbFaGUQ7_4-9AWXVBYyrR0ng99qR9U2uwu7V1I9ChqK4VtmhdMkQr3UbnD7uz8RTUyOKTEGuKk6_2h7bLHcnC5eC3lFVmaDi07Detj8dClGKLHmuCAKGGsfJo0oeo5TiwtQ4nfg1t-t0miGuFg-kjv_7NGO5F-2UGUWNNa0AyxcTRr6y7F249caFYBsvU2fzGH34lOi9qlxH4qgh1Yg4HH7DAmCe7VRr85cxyquGHIJZHk9WlkWwU8HSHEQ59ZZhGdmqAHgVpElQb80v2_NFLBUH0doQIKfX9lKoxxHgH8yqmJk8DL1pYIX6kWheqHREoOkNWUMsm3HT8zYiDp1x-yOPUwrKwyxanExaEHebFIhusWEvKcyBMJSwgOF9MzNc6KRDu5VHK7Rqs68fSc6_jX6at731R-C9cVrO9jabzRXP4rohYU_FNQSuIgRIY0m0CfNbZ_4aJ1o8ulKu8g1rqPBdLTmT1Sag17ZswqtI7qwkEwI"
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var settings = {
"url": "http://wooapi.vxinfosystem.com/wp-json/letscms/v1/orders",
"method": "GET",
"timeout": 0,
"headers": {
"letscms_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJJRCI6IjYiLCJ1c2VyX2xvZ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{
console.log(response);
});
var request = require('request');
var options = {
'method': 'GET',
'url': 'http://wooapi.vxinfosystem.com/wp-json/letscms/v1/orders',
'headers': {
'letscms_token': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJJRCI6IjYiLCJ1c2VyX2xvZ2luIjoidXNlcjAwMSIsInVzZXJfbmljZW5hbWUiOiJ1c2VyMDAxIiwidXNlcl9lbWFpbCI6InVzZXIwMDFAdGVzdC5jb20iLCJ1c2VyX3VybCI6IiIsInVzZXJfcmVnaXN0ZXJlZCI6IjIwMjAtMTAtMTUgMTI6MTc6MTciLCJ1c2VyX2FjdGl2YXRpb25fa2V5IjoiMTYwMjc2NDIzODokUCRCVXFCTVRWdFBRNHVRVWE2ZFNTbzEyamJWSFZvVEwxIiwidXNlcl9zdGF0dXMiOiIwIiwiZGlzcGxheV9uYW1lIjoidXNlcjAwMSB0ZXN0IiwibGFzdF9sb2dpbiI6MTYwODA5NjQ3MH0.JyU-3Y2N6h5ye2m31wf-m7lYStyDwxroEKU3Ko9_4pXwk23rVu_9PdoDXfhFWJKrWlGIjx8byj2ICFdKlLvASjRp6YSlj-VALStZzQawXL8-iXJroMrZjnkK4kNtkYG26TCEmEfbS3L-qTRtq2UYVl9TwJ6hEiTbYe0SCoJB5hQ5NNS4GEyniUU5pvPbTbFaGUQ7_4-9AWXVBYyrR0ng99qR9U2uwu7V1I9ChqK4VtmhdMkQr3UbnD7uz8RTUyOKTEGuKk6_2h7bLHcnC5eC3lFVmaDi07Detj8dClGKLHmuCAKGGsfJo0oeo5TiwtQ4nfg1t-t0miGuFg-kjv_7NGO5F-2UGUWNNa0AyxcTRr6y7F249caFYBsvU2fzGH34lOi9qlxH4qgh1Yg4HH7DAmCe7VRr85cxyquGHIJZHk9WlkWwU8HSHEQ59ZZhGdmqAHgVpElQb80v2_NFLBUH0doQIKfX9lKoxxHgH8yqmJk8DL1pYIX6kWheqHREoOkNWUMsm3HT8zYiDp1x-yOPUwrKwyxanExaEHebFIhusWEvKcyBMJSwgOF9MzNc6KRDu5VHK7Rqs68fSc6_jX6at731R-C9cVrO9jabzRXP4rohYU_FNQSuIgRIY0m0CfNbZ_4aJ1o8ulKu8g1rqPBdLTmT1Sag17ZswqtI7qwkEwI'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
url = "http://wooapi.vxinfosystem.com/wp-json/letscms/v1/orders"
payload = {}
headers = {
'letscms_token': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJJRCI6IjYiLCJ1c2VyX2xvZ2luIjoidXNlcjAwMSIsInVzZXJfbmljZW5hbWUiOiJ1c2VyMDAxIiwidXNlcl9lbWFpbCI6InVzZXIwMDFAdGVzdC5jb20iLCJ1c2VyX3VybCI6IiIsInVzZXJfcmVnaXN0ZXJlZCI6IjIwMjAtMTAtMTUgMTI6MTc6MTciLCJ1c2VyX2FjdGl2YXRpb25fa2V5IjoiMTYwMjc2NDIzODokUCRCVXFCTVRWdFBRNHVRVWE2ZFNTbzEyamJWSFZvVEwxIiwidXNlcl9zdGF0dXMiOiIwIiwiZGlzcGxheV9uYW1lIjoidXNlcjAwMSB0ZXN0IiwibGFzdF9sb2dpbiI6MTYwODA5NjQ3MH0.JyU-3Y2N6h5ye2m31wf-m7lYStyDwxroEKU3Ko9_4pXwk23rVu_9PdoDXfhFWJKrWlGIjx8byj2ICFdKlLvASjRp6YSlj-VALStZzQawXL8-iXJroMrZjnkK4kNtkYG26TCEmEfbS3L-qTRtq2UYVl9TwJ6hEiTbYe0SCoJB5hQ5NNS4GEyniUU5pvPbTbFaGUQ7_4-9AWXVBYyrR0ng99qR9U2uwu7V1I9ChqK4VtmhdMkQr3UbnD7uz8RTUyOKTEGuKk6_2h7bLHcnC5eC3lFVmaDi07Detj8dClGKLHmuCAKGGsfJo0oeo5TiwtQ4nfg1t-t0miGuFg-kjv_7NGO5F-2UGUWNNa0AyxcTRr6y7F249caFYBsvU2fzGH34lOi9qlxH4qgh1Yg4HH7DAmCe7VRr85cxyquGHIJZHk9WlkWwU8HSHEQ59ZZhGdmqAHgVpElQb80v2_NFLBUH0doQIKfX9lKoxxHgH8yqmJk8DL1pYIX6kWheqHREoOkNWUMsm3HT8zYiDp1x-yOPUwrKwyxanExaEHebFIhusWEvKcyBMJSwgOF9MzNc6KRDu5VHK7Rqs68fSc6_jX6at731R-C9cVrO9jabzRXP4rohYU_FNQSuIgRIY0m0CfNbZ_4aJ1o8ulKu8g1rqPBdLTmT1Sag17ZswqtI7qwkEwI'
}
response = requests.request("GET", url, headers=headers, data = payload)
print(response.text.encode('utf8'))
var client = new RestClient("http://wooapi.vxinfosystem.com/wp-json/letscms/v1/orders");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("letscms_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJJRCI6IjYiLCJ1c2VyX2xvZ2luIjoidXNlcjAwMSIsInVzZXJfbmljZW5hbWUiOiJ1c2VyMDAxIiwidXNlcl9lbWFpbCI6InVzZXIwMDFAdGVzdC5jb20iLCJ1c2VyX3VybCI6IiIsInVzZXJfcmVnaXN0ZXJlZCI6IjIwMjAtMTAtMTUgMTI6MTc6MTciLCJ1c2VyX2FjdGl2YXRpb25fa2V5IjoiMTYwMjc2NDIzODokUCRCVXFCTVRWdFBRNHVRVWE2ZFNTbzEyamJWSFZvVEwxIiwidXNlcl9zdGF0dXMiOiIwIiwiZGlzcGxheV9uYW1lIjoidXNlcjAwMSB0ZXN0IiwibGFzdF9sb2dpbiI6MTYwODA5NjQ3MH0.JyU-3Y2N6h5ye2m31wf-m7lYStyDwxroEKU3Ko9_4pXwk23rVu_9PdoDXfhFWJKrWlGIjx8byj2ICFdKlLvASjRp6YSlj-VALStZzQawXL8-iXJroMrZjnkK4kNtkYG26TCEmEfbS3L-qTRtq2UYVl9TwJ6hEiTbYe0SCoJB5hQ5NNS4GEyniUU5pvPbTbFaGUQ7_4-9AWXVBYyrR0ng99qR9U2uwu7V1I9ChqK4VtmhdMkQr3UbnD7uz8RTUyOKTEGuKk6_2h7bLHcnC5eC3lFVmaDi07Detj8dClGKLHmuCAKGGsfJo0oeo5TiwtQ4nfg1t-t0miGuFg-kjv_7NGO5F-2UGUWNNa0AyxcTRr6y7F249caFYBsvU2fzGH34lOi9qlxH4qgh1Yg4HH7DAmCe7VRr85cxyquGHIJZHk9WlkWwU8HSHEQ59ZZhGdmqAHgVpElQb80v2_NFLBUH0doQIKfX9lKoxxHgH8yqmJk8DL1pYIX6kWheqHREoOkNWUMsm3HT8zYiDp1x-yOPUwrKwyxanExaEHebFIhusWEvKcyBMJSwgOF9MzNc6KRDu5VHK7Rqs68fSc6_jX6at731R-C9cVrO9jabzRXP4rohYU_FNQSuIgRIY0m0CfNbZ_4aJ1o8ulKu8g1rqPBdLTmT1Sag17ZswqtI7qwkEwI");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request GET 'http://wooapi.vxinfosystem.com/wp-json/letscms/v1/orders' \
--header 'letscms_token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJJRCI6IjYiLCJ1c2VyX2xvZ2luIjoidXNlcjAwMSIsInVzZXJfbmljZW5hbWUiOiJ1c2VyMDAxIiwidXNlcl9lbWFpbCI6InVzZXIwMDFAdGVzdC5jb20iLCJ1c2VyX3VybCI6IiIsInVzZXJfcmVnaXN0ZXJlZCI6IjIwMjAtMTAtMTUgMTI6MTc6MTciLCJ1c2VyX2FjdGl2YXRpb25fa2V5IjoiMTYwMjc2NDIzODokUCRCVXFCTVRWdFBRNHVRVWE2ZFNTbzEyamJWSFZvVEwxIiwidXNlcl9zdGF0dXMiOiIwIiwiZGlzcGxheV9uYW1lIjoidXNlcjAwMSB0ZXN0IiwibGFzdF9sb2dpbiI6MTYwODA5NjQ3MH0.JyU-3Y2N6h5ye2m31wf-m7lYStyDwxroEKU3Ko9_4pXwk23rVu_9PdoDXfhFWJKrWlGIjx8byj2ICFdKlLvASjRp6YSlj-VALStZzQawXL8-iXJroMrZjnkK4kNtkYG26TCEmEfbS3L-qTRtq2UYVl9TwJ6hEiTbYe0SCoJB5hQ5NNS4GEyniUU5pvPbTbFaGUQ7_4-9AWXVBYyrR0ng99qR9U2uwu7V1I9ChqK4VtmhdMkQr3UbnD7uz8RTUyOKTEGuKk6_2h7bLHcnC5eC3lFVmaDi07Detj8dClGKLHmuCAKGGsfJo0oeo5TiwtQ4nfg1t-t0miGuFg-kjv_7NGO5F-2UGUWNNa0AyxcTRr6y7F249caFYBsvU2fzGH34lOi9qlxH4qgh1Yg4HH7DAmCe7VRr85cxyquGHIJZHk9WlkWwU8HSHEQ59ZZhGdmqAHgVpElQb80v2_NFLBUH0doQIKfX9lKoxxHgH8yqmJk8DL1pYIX6kWheqHREoOkNWUMsm3HT8zYiDp1x-yOPUwrKwyxanExaEHebFIhusWEvKcyBMJSwgOF9MzNc6KRDu5VHK7Rqs68fSc6_jX6at731R-C9cVrO9jabzRXP4rohYU_FNQSuIgRIY0m0CfNbZ_4aJ1o8ulKu8g1rqPBdLTmT1Sag17ZswqtI7qwkEwI'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("http://wooapi.vxinfosystem.com/wp-json/letscms/v1/orders")
.method("GET", null)
.addHeader("letscms_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJJRCI6IjYiLCJ1c2VyX2xvZ2luIjoidXNlcjAwMSIsInVzZXJfbmljZW5hbWUiOiJ1c2VyMDAxIiwidXNlcl9lbWFpbCI6InVzZXIwMDFAdGVzdC5jb20iLCJ1c2VyX3VybCI6IiIsInVzZXJfcmVnaXN0ZXJlZCI6IjIwMjAtMTAtMTUgMTI6MTc6MTciLCJ1c2VyX2FjdGl2YXRpb25fa2V5IjoiMTYwMjc2NDIzODokUCRCVXFCTVRWdFBRNHVRVWE2ZFNTbzEyamJWSFZvVEwxIiwidXNlcl9zdGF0dXMiOiIwIiwiZGlzcGxheV9uYW1lIjoidXNlcjAwMSB0ZXN0IiwibGFzdF9sb2dpbiI6MTYwODA5NjQ3MH0.JyU-3Y2N6h5ye2m31wf-m7lYStyDwxroEKU3Ko9_4pXwk23rVu_9PdoDXfhFWJKrWlGIjx8byj2ICFdKlLvASjRp6YSlj-VALStZzQawXL8-iXJroMrZjnkK4kNtkYG26TCEmEfbS3L-qTRtq2UYVl9TwJ6hEiTbYe0SCoJB5hQ5NNS4GEyniUU5pvPbTbFaGUQ7_4-9AWXVBYyrR0ng99qR9U2uwu7V1I9ChqK4VtmhdMkQr3UbnD7uz8RTUyOKTEGuKk6_2h7bLHcnC5eC3lFVmaDi07Detj8dClGKLHmuCAKGGsfJo0oeo5TiwtQ4nfg1t-t0miGuFg-kjv_7NGO5F-2UGUWNNa0AyxcTRr6y7F249caFYBsvU2fzGH34lOi9qlxH4qgh1Yg4HH7DAmCe7VRr85cxyquGHIJZHk9WlkWwU8HSHEQ59ZZhGdmqAHgVpElQb80v2_NFLBUH0doQIKfX9lKoxxHgH8yqmJk8DL1pYIX6kWheqHREoOkNWUMsm3HT8zYiDp1x-yOPUwrKwyxanExaEHebFIhusWEvKcyBMJSwgOF9MzNc6KRDu5VHK7Rqs68fSc6_jX6at731R-C9cVrO9jabzRXP4rohYU_FNQSuIgRIY0m0CfNbZ_4aJ1o8ulKu8g1rqPBdLTmT1Sag17ZswqtI7qwkEwI")
.build();
Response response = client.newCall(request).execute();
require "uri"
require "net/http"
url = URI("http://wooapi.vxinfosystem.com/wp-json/letscms/v1/orders")
https = Net::HTTP.new(url.host, url.port);
https.use_ssl = true
request = Net::HTTP::Get.new(url)
request["letscms_token"] = "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJJRCI6IjYiLCJ1c2VyX2xvZ2luIjoidXNlcjAwMSIsInVzZXJfbmljZW5hbWUiOiJ1c2VyMDAxIiwidXNlcl9lbWFpbCI6InVzZXIwMDFAdGVzdC5jb20iLCJ1c2VyX3VybCI6IiIsInVzZXJfcmVnaXN0ZXJlZCI6IjIwMjAtMTAtMTUgMTI6MTc6MTciLCJ1c2VyX2FjdGl2YXRpb25fa2V5IjoiMTYwMjc2NDIzODokUCRCVXFCTVRWdFBRNHVRVWE2ZFNTbzEyamJWSFZvVEwxIiwidXNlcl9zdGF0dXMiOiIwIiwiZGlzcGxheV9uYW1lIjoidXNlcjAwMSB0ZXN0IiwibGFzdF9sb2dpbiI6MTYwODA5NjQ3MH0.JyU-3Y2N6h5ye2m31wf-m7lYStyDwxroEKU3Ko9_4pXwk23rVu_9PdoDXfhFWJKrWlGIjx8byj2ICFdKlLvASjRp6YSlj-VALStZzQawXL8-iXJroMrZjnkK4kNtkYG26TCEmEfbS3L-qTRtq2UYVl9TwJ6hEiTbYe0SCoJB5hQ5NNS4GEyniUU5pvPbTbFaGUQ7_4-9AWXVBYyrR0ng99qR9U2uwu7V1I9ChqK4VtmhdMkQr3UbnD7uz8RTUyOKTEGuKk6_2h7bLHcnC5eC3lFVmaDi07Detj8dClGKLHmuCAKGGsfJo0oeo5TiwtQ4nfg1t-t0miGuFg-kjv_7NGO5F-2UGUWNNa0AyxcTRr6y7F249caFYBsvU2fzGH34lOi9qlxH4qgh1Yg4HH7DAmCe7VRr85cxyquGHIJZHk9WlkWwU8HSHEQ59ZZhGdmqAHgVpElQb80v2_NFLBUH0doQIKfX9lKoxxHgH8yqmJk8DL1pYIX6kWheqHREoOkNWUMsm3HT8zYiDp1x-yOPUwrKwyxanExaEHebFIhusWEvKcyBMJSwgOF9MzNc6KRDu5VHK7Rqs68fSc6_jX6at731R-C9cVrO9jabzRXP4rohYU_FNQSuIgRIY0m0CfNbZ_4aJ1o8ulKu8g1rqPBdLTmT1Sag17ZswqtI7qwkEwI"
response = https.request(request)
puts response.read_body
Success Response
{
"status": true,
"errors": [],
"message": "",
"data": {
"orders": [
{
"order_id": 360,
"order_status": "refunded",
"currency": "INR",
"payment_method": "stripe",
"payment_title": "Credit Card (Stripe)",
"date_created": {
"date": "2020-10-26 10:02:22.000000",
"timezone_type": 1,
"timezone": "+00:00"
},
"date_modified": {
"date": "2020-10-29 08:32:50.000000",
"timezone_type": 1,
"timezone": "+00:00"
},
"billing_country": "IN",
"total": "46.00",
"items": [
{
"item_name": "Beanie with Logo",
"quantity": 1
},
{
"item_name": "Cap",
"quantity": 1
},
{
"item_name": "Flying Ninja",
"quantity": 1
}
]
},
{
....
},
{
....
}
],
"currency": "₹"
}
}
Response Failed
{
"status": false,
"errors": [],
"message": "Please provide letscms_token in header"
}
LETS WOO Create Order API
The "Create Order" API allow you to create a new order.
POST: /wp-json/letscms/v1/order/create
Parameter | Type | Position | # | Description |
---|---|---|---|---|
letscms_token | string |
Headers |
Required |
Letscms Token is generate when user attempt login or register API. |
first_name | string |
body |
Required |
First name of user. |
last_name | string |
body |
Required |
Last name of user. |
country | string |
body |
Required |
Select the country. |
city | string |
body |
Required |
City of user. |
state | string |
body |
Required |
Satate of user. |
postcode | Integer |
body |
Required |
Postcode of user . |
phone | Integer |
body |
Required |
Contact number of user. |
string |
body |
Required |
Email of user . | |
payment_method | string |
body |
Required |
Payment method. |
payment_method_title | string |
body |
Required |
Payment method title . |
address_1 | string |
body |
Required |
Address house no. landmark, colony etc. |
address_2 | string |
body |
Optinal |
Address Apartment,unit etc. |
stripe_card_token | string |
body |
Required |
Required if payment_method is stripe . |
coupons | string |
body |
Optinal |
Array of coupon codes. |
Parameter | letscms_token |
---|---|
Type | string |
Position | Headers |
# | Required |
Description | Letscms Token is generate when user attempt login or register API |
Parameter | first_name |
Type | string |
Position | body |
# | Required |
Description | First name of user. |
Parameter | last_name |
Type | string |
Position | body |
# | Required |
Description | Last name of user. |
Parameter | country |
Type | string |
Position | body |
# | Required |
Description | Country of user. |
Parameter | city |
Type | string |
Position | body |
# | Required |
Description | City of user. |
Parameter | state |
Type | string |
Position | body |
# | Required |
Description | State od user. |
Parameter | postcode |
Type | Integer |
Position | body |
# | Required |
Description | Postcode of user. |
Parameter | phone |
Type | Integer |
Position | body |
# | Required |
Description | Contact no. of user. |
Parameter | |
Type | string |
Position | body |
# | Required |
Description | Email of user. |
Parameter | payment_method |
Type | string |
Position | body |
# | Required |
Description | Payment method . |
Parameter | payment_method_title |
Type | string |
Position | body |
# | Required |
Description | Payment method title . |
Parameter | address_1 |
Type | string |
Position | body |
# | Required |
Description | Address house no.,street no. etc. |
Parameter | address_2 |
Type | string |
Position | body |
# | Optinal |
Description | Address Apartment,unit etc. |
Parameter | stripe_card_token |
Type | string |
Position | body |
# | Required |
Description | Required if payment_method is stripe. |
Parameter | coupons |
Type | string |
Position | body |
# | Optinal |
Description | Array of coupon codes. |
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "http://wooapi.vxinfosystem.com/wp-json/letscms/v1/order/create",
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('first_name' => 'pankaj','last_name' => 'soni','country' => 'IN','address_1' => 'test','company' => 'letscms','city' => 'aligarh','state' => 'up','postcode' => '202001','phone' => '1234567890','email' => 'pankajsoni.letscms@gmail.com','payment_method' => 'cod','payment_method_title' => 'Cash on Delivery'),
CURLOPT_HTTPHEADER => array(
"letscms_token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJJRCI6IjYiLCJ1c2VyX2xvZ2luIjoidXNlcjAwMSIsInVzZXJfbmljZW5hbWUiOiJ1c2VyMDAxIiwidXNlcl9lbWFpbCI6InVzZXIwMDFAdGVzdC5jb20iLCJ1c2VyX3VybCI6IiIsInVzZXJfcmVnaXN0ZXJlZCI6IjIwMjAtMTAtMTUgMTI6MTc6MTciLCJ1c2VyX2FjdGl2YXRpb25fa2V5IjoiMTYwMjc2NDIzODokUCRCVXFCTVRWdFBRNHVRVWE2ZFNTbzEyamJWSFZvVEwxIiwidXNlcl9zdGF0dXMiOiIwIiwiZGlzcGxheV9uYW1lIjoidXNlcjAwMSB0ZXN0IiwibGFzdF9sb2dpbiI6MTYwODA5NjQ3MH0.JyU-3Y2N6h5ye2m31wf-m7lYStyDwxroEKU3Ko9_4pXwk23rVu_9PdoDXfhFWJKrWlGIjx8byj2ICFdKlLvASjRp6YSlj-VALStZzQawXL8-iXJroMrZjnkK4kNtkYG26TCEmEfbS3L-qTRtq2UYVl9TwJ6hEiTbYe0SCoJB5hQ5NNS4GEyniUU5pvPbTbFaGUQ7_4-9AWXVBYyrR0ng99qR9U2uwu7V1I9ChqK4VtmhdMkQr3UbnD7uz8RTUyOKTEGuKk6_2h7bLHcnC5eC3lFVmaDi07Detj8dClGKLHmuCAKGGsfJo0oeo5TiwtQ4nfg1t-t0miGuFg-kjv_7NGO5F-2UGUWNNa0AyxcTRr6y7F249caFYBsvU2fzGH34lOi9qlxH4qgh1Yg4HH7DAmCe7VRr85cxyquGHIJZHk9WlkWwU8HSHEQ59ZZhGdmqAHgVpElQb80v2_NFLBUH0doQIKfX9lKoxxHgH8yqmJk8DL1pYIX6kWheqHREoOkNWUMsm3HT8zYiDp1x-yOPUwrKwyxanExaEHebFIhusWEvKcyBMJSwgOF9MzNc6KRDu5VHK7Rqs68fSc6_jX6at731R-C9cVrO9jabzRXP4rohYU_FNQSuIgRIY0m0CfNbZ_4aJ1o8ulKu8g1rqPBdLTmT1Sag17ZswqtI7qwkEwI",
": "
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var form = new FormData();
form.append("first_name", "pankaj");
form.append("last_name", "soni");
form.append("country", "IN");
form.append("address_1", "test");
form.append("company", "letscms");
form.append("city", "aligarh");
form.append("state", "up");
form.append("postcode", "202001");
form.append("phone", "1234567890");
form.append("email", "pankajsoni.letscms@gmail.com");
form.append("payment_method", "cod");
form.append("payment_method_title", "Cash on Delivery");
var settings = {
"url": "http://wooapi.vxin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7Rqs68fSc6_jX6at731R-C9cVrO9jabzRXP4rohYU_FNQSuIgRIY0m0CfNbZ_4aJ1o8ulKu8g1rqPBdLTmT1Sag17ZswqtI7qwkEwI",
"": ""
},
"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': 'http://wooapi.vxinfosystem.com/wp-json/letscms/v1/order/create',
'headers': {
'letscms_token': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJJRCI6IjYiLCJ1c2VyX2xvZ2luIjoidXNlcjAwMSIsInVzZXJfbmljZW5hbWUiOiJ1c2VyMDAxIiwidXNlcl9lbWFpbCI6InVzZXIwMDFAdGVzdC5jb20iLCJ1c2VyX3VybCI6IiIsInVzZXJfcmVnaXN0ZXJlZCI6IjIwMjAtMTAtMTUgMTI6MTc6MTciLCJ1c2VyX2FjdGl2YXRpb25fa2V5IjoiMTYwMjc2NDIzODokUCRCVXFCTVRWdFBRNHVRVWE2ZFNTbzEyamJWSFZvVEwxIiwidXNlcl9zdGF0dXMiOiIwIiwiZGlzcGxheV9uYW1lIjoidXNlcjAwMSB0ZXN0IiwibGFzdF9sb2dpbiI6MTYwODA5NjQ3MH0.JyU-3Y2N6h5ye2m31wf-m7lYStyDwxroEKU3Ko9_4pXwk23rVu_9PdoDXfhFWJKrWlGIjx8byj2ICFdKlLvASjRp6YSlj-VALStZzQawXL8-iXJroMrZjnkK4kNtkYG26TCEmEfbS3L-qTRtq2UYVl9TwJ6hEiTbYe0SCoJB5hQ5NNS4GEyniUU5pvPbTbFaGUQ7_4-9AWXVBYyrR0ng99qR9U2uwu7V1I9ChqK4VtmhdMkQr3UbnD7uz8RTUyOKTEGuKk6_2h7bLHcnC5eC3lFVmaDi07Detj8dClGKLHmuCAKGGsfJo0oeo5TiwtQ4nfg1t-t0miGuFg-kjv_7NGO5F-2UGUWNNa0AyxcTRr6y7F249caFYBsvU2fzGH34lOi9qlxH4qgh1Yg4HH7DAmCe7VRr85cxyquGHIJZHk9WlkWwU8HSHEQ59ZZhGdmqAHgVpElQb80v2_NFLBUH0doQIKfX9lKoxxHgH8yqmJk8DL1pYIX6kWheqHREoOkNWUMsm3HT8zYiDp1x-yOPUwrKwyxanExaEHebFIhusWEvKcyBMJSwgOF9MzNc6KRDu5VHK7Rqs68fSc6_jX6at731R-C9cVrO9jabzRXP4rohYU_FNQSuIgRIY0m0CfNbZ_4aJ1o8ulKu8g1rqPBdLTmT1Sag17ZswqtI7qwkEwI',
'': ''
},
formData: {
'first_name': 'pankaj',
'last_name': 'soni',
'country': 'IN',
'address_1': 'test',
'company': 'letscms',
'city': 'aligarh',
'state': 'up',
'postcode': '202001',
'phone': '1234567890',
'email': 'pankajsoni.letscms@gmail.com',
'payment_method': 'cod',
'payment_method_title': 'Cash on Delivery'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
url = "http://wooapi.vxinfosystem.com/wp-json/letscms/v1/order/create"
payload = {'first_name': 'pankaj',
'last_name': 'soni',
'country': 'IN',
'address_1': 'test',
'company': 'letscms',
'city': 'aligarh',
'state': 'up',
'postcode': '202001',
'phone': '1234567890',
'email': 'pankajsoni.letscms@gmail.com',
'payment_method': 'cod',
'payment_method_title': 'Cash on Delivery'}
files = [
]
headers = {
'letscms_token': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJJRCI6IjYiLCJ1c2VyX2xvZ2luIjoidXNlcjAwMSIsInVzZXJfbmljZW5hbWUiOiJ1c2VyMDAxIiwidXNlcl9lbWFpbCI6InVzZXIwMDFAdGVzdC5jb20iLCJ1c2VyX3VybCI6IiIsInVzZXJfcmVnaXN0ZXJlZCI6IjIwMjAtMTAtMTUgMTI6MTc6MTciLCJ1c2VyX2FjdGl2YXRpb25fa2V5IjoiMTYwMjc2NDIzODokUCRCVXFCTVRWdFBRNHVRVWE2ZFNTbzEyamJWSFZvVEwxIiwidXNlcl9zdGF0dXMiOiIwIiwiZGlzcGxheV9uYW1lIjoidXNlcjAwMSB0ZXN0IiwibGFzdF9sb2dpbiI6MTYwODA5NjQ3MH0.JyU-3Y2N6h5ye2m31wf-m7lYStyDwxroEKU3Ko9_4pXwk23rVu_9PdoDXfhFWJKrWlGIjx8byj2ICFdKlLvASjRp6YSlj-VALStZzQawXL8-iXJroMrZjnkK4kNtkYG26TCEmEfbS3L-qTRtq2UYVl9TwJ6hEiTbYe0SCoJB5hQ5NNS4GEyniUU5pvPbTbFaGUQ7_4-9AWXVBYyrR0ng99qR9U2uwu7V1I9ChqK4VtmhdMkQr3UbnD7uz8RTUyOKTEGuKk6_2h7bLHcnC5eC3lFVmaDi07Detj8dClGKLHmuCAKGGsfJo0oeo5TiwtQ4nfg1t-t0miGuFg-kjv_7NGO5F-2UGUWNNa0AyxcTRr6y7F249caFYBsvU2fzGH34lOi9qlxH4qgh1Yg4HH7DAmCe7VRr85cxyquGHIJZHk9WlkWwU8HSHEQ59ZZhGdmqAHgVpElQb80v2_NFLBUH0doQIKfX9lKoxxHgH8yqmJk8DL1pYIX6kWheqHREoOkNWUMsm3HT8zYiDp1x-yOPUwrKwyxanExaEHebFIhusWEvKcyBMJSwgOF9MzNc6KRDu5VHK7Rqs68fSc6_jX6at731R-C9cVrO9jabzRXP4rohYU_FNQSuIgRIY0m0CfNbZ_4aJ1o8ulKu8g1rqPBdLTmT1Sag17ZswqtI7qwkEwI',
'': ''
}
response = requests.request("POST", url, headers=headers, data = payload, files = files)
print(response.text.encode('utf8'))
var client = new RestClient("http://wooapi.vxinfosystem.com/wp-json/letscms/v1/order/create");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("letscms_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJJRCI6IjYiLCJ1c2VyX2xvZ2luIjoidXNlcjAwMSIsInVzZXJfbmljZW5hbWUiOiJ1c2VyMDAxIiwidXNlcl9lbWFpbCI6InVzZXIwMDFAdGVzdC5jb20iLCJ1c2VyX3VybCI6IiIsInVzZXJfcmVnaXN0ZXJlZCI6IjIwMjAtMTAtMTUgMTI6MTc6MTciLCJ1c2VyX2FjdGl2YXRpb25fa2V5IjoiMTYwMjc2NDIzODokUCRCVXFCTVRWdFBRNHVRVWE2ZFNTbzEyamJWSFZvVEwxIiwidXNlcl9zdGF0dXMiOiIwIiwiZGlzcGxheV9uYW1lIjoidXNlcjAwMSB0ZXN0IiwibGFzdF9sb2dpbiI6MTYwODA5NjQ3MH0.JyU-3Y2N6h5ye2m31wf-m7lYStyDwxroEKU3Ko9_4pXwk23rVu_9PdoDXfhFWJKrWlGIjx8byj2ICFdKlLvASjRp6YSlj-VALStZzQawXL8-iXJroMrZjnkK4kNtkYG26TCEmEfbS3L-qTRtq2UYVl9TwJ6hEiTbYe0SCoJB5hQ5NNS4GEyniUU5pvPbTbFaGUQ7_4-9AWXVBYyrR0ng99qR9U2uwu7V1I9ChqK4VtmhdMkQr3UbnD7uz8RTUyOKTEGuKk6_2h7bLHcnC5eC3lFVmaDi07Detj8dClGKLHmuCAKGGsfJo0oeo5TiwtQ4nfg1t-t0miGuFg-kjv_7NGO5F-2UGUWNNa0AyxcTRr6y7F249caFYBsvU2fzGH34lOi9qlxH4qgh1Yg4HH7DAmCe7VRr85cxyquGHIJZHk9WlkWwU8HSHEQ59ZZhGdmqAHgVpElQb80v2_NFLBUH0doQIKfX9lKoxxHgH8yqmJk8DL1pYIX6kWheqHREoOkNWUMsm3HT8zYiDp1x-yOPUwrKwyxanExaEHebFIhusWEvKcyBMJSwgOF9MzNc6KRDu5VHK7Rqs68fSc6_jX6at731R-C9cVrO9jabzRXP4rohYU_FNQSuIgRIY0m0CfNbZ_4aJ1o8ulKu8g1rqPBdLTmT1Sag17ZswqtI7qwkEwI");
request.AddHeader("", "");
request.AlwaysMultipartFormData = true;
request.AddParameter("first_name", "pankaj");
request.AddParameter("last_name", "soni");
request.AddParameter("country", "IN");
request.AddParameter("address_1", "test");
request.AddParameter("company", "letscms");
request.AddParameter("city", "aligarh");
request.AddParameter("state", "up");
request.AddParameter("postcode", "202001");
request.AddParameter("phone", "1234567890");
request.AddParameter("email", "pankajsoni.letscms@gmail.com");
request.AddParameter("payment_method", "cod");
request.AddParameter("payment_method_title", "Cash on Delivery");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request POST 'http://wooapi.vxinfosystem.com/wp-json/letscms/v1/order/create' \
--header 'letscms_token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJJRCI6IjYiLCJ1c2VyX2xvZ2luIjoidXNlcjAwMSIsInVzZXJfbmljZW5hbWUiOiJ1c2VyMDAxIiwidXNlcl9lbWFpbCI6InVzZXIwMDFAdGVzdC5jb20iLCJ1c2VyX3VybCI6IiIsInVzZXJfcmVnaXN0ZXJlZCI6IjIwMjAtMTAtMTUgMTI6MTc6MTciLCJ1c2VyX2FjdGl2YXRpb25fa2V5IjoiMTYwMjc2NDIzODokUCRCVXFCTVRWdFBRNHVRVWE2ZFNTbzEyamJWSFZvVEwxIiwidXNlcl9zdGF0dXMiOiIwIiwiZGlzcGxheV9uYW1lIjoidXNlcjAwMSB0ZXN0IiwibGFzdF9sb2dpbiI6MTYwODA5NjQ3MH0.JyU-3Y2N6h5ye2m31wf-m7lYStyDwxroEKU3Ko9_4pXwk23rVu_9PdoDXfhFWJKrWlGIjx8byj2ICFdKlLvASjRp6YSlj-VALStZzQawXL8-iXJroMrZjnkK4kNtkYG26TCEmEfbS3L-qTRtq2UYVl9TwJ6hEiTbYe0SCoJB5hQ5NNS4GEyniUU5pvPbTbFaGUQ7_4-9AWXVBYyrR0ng99qR9U2uwu7V1I9ChqK4VtmhdMkQr3UbnD7uz8RTUyOKTEGuKk6_2h7bLHcnC5eC3lFVmaDi07Detj8dClGKLHmuCAKGGsfJo0oeo5TiwtQ4nfg1t-t0miGuFg-kjv_7NGO5F-2UGUWNNa0AyxcTRr6y7F249caFYBsvU2fzGH34lOi9qlxH4qgh1Yg4HH7DAmCe7VRr85cxyquGHIJZHk9WlkWwU8HSHEQ59ZZhGdmqAHgVpElQb80v2_NFLBUH0doQIKfX9lKoxxHgH8yqmJk8DL1pYIX6kWheqHREoOkNWUMsm3HT8zYiDp1x-yOPUwrKwyxanExaEHebFIhusWEvKcyBMJSwgOF9MzNc6KRDu5VHK7Rqs68fSc6_jX6at731R-C9cVrO9jabzRXP4rohYU_FNQSuIgRIY0m0CfNbZ_4aJ1o8ulKu8g1rqPBdLTmT1Sag17ZswqtI7qwkEwI' \
--header ': ' \
--form 'first_name=pankaj' \
--form 'last_name=soni' \
--form 'country=IN' \
--form 'address_1=test' \
--form 'company=letscms' \
--form 'city=aligarh' \
--form 'state=up' \
--form 'postcode=202001' \
--form 'phone=1234567890' \
--form 'email=pankajsoni.letscms@gmail.com' \
--form 'payment_method=cod' \
--form 'payment_method_title=Cash on Delivery'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = new MultipartBody.Builder().setType(MultipartBody.FORM)
.addFormDataPart("first_name", "pankaj")
.addFormDataPart("last_name", "soni")
.addFormDataPart("country", "IN")
.addFormDataPart("address_1", "test")
.addFormDataPart("company", "letscms")
.addFormDataPart("city", "aligarh")
.addFormDataPart("state", "up")
.addFormDataPart("postcode", "202001")
.addFormDataPart("phone", "1234567890")
.addFormDataPart("email", "pankajsoni.letscms@gmail.com")
.addFormDataPart("payment_method", "cod")
.addFormDataPart("payment_method_title", "Cash on Delivery")
.build();
Request request = new Request.Builder()
.url("http://wooapi.vxinfosystem.com/wp-json/letscms/v1/order/create")
.method("POST", body)
.addHeader("letscms_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJJRCI6IjYiLCJ1c2VyX2xvZ2luIjoidXNlcjAwMSIsInVzZXJfbmljZW5hbWUiOiJ1c2VyMDAxIiwidXNlcl9lbWFpbCI6InVzZXIwMDFAdGVzdC5jb20iLCJ1c2VyX3VybCI6IiIsInVzZXJfcmVnaXN0ZXJlZCI6IjIwMjAtMTAtMTUgMTI6MTc6MTciLCJ1c2VyX2FjdGl2YXRpb25fa2V5IjoiMTYwMjc2NDIzODokUCRCVXFCTVRWdFBRNHVRVWE2ZFNTbzEyamJWSFZvVEwxIiwidXNlcl9zdGF0dXMiOiIwIiwiZGlzcGxheV9uYW1lIjoidXNlcjAwMSB0ZXN0IiwibGFzdF9sb2dpbiI6MTYwODA5NjQ3MH0.JyU-3Y2N6h5ye2m31wf-m7lYStyDwxroEKU3Ko9_4pXwk23rVu_9PdoDXfhFWJKrWlGIjx8byj2ICFdKlLvASjRp6YSlj-VALStZzQawXL8-iXJroMrZjnkK4kNtkYG26TCEmEfbS3L-qTRtq2UYVl9TwJ6hEiTbYe0SCoJB5hQ5NNS4GEyniUU5pvPbTbFaGUQ7_4-9AWXVBYyrR0ng99qR9U2uwu7V1I9ChqK4VtmhdMkQr3UbnD7uz8RTUyOKTEGuKk6_2h7bLHcnC5eC3lFVmaDi07Detj8dClGKLHmuCAKGGsfJo0oeo5TiwtQ4nfg1t-t0miGuFg-kjv_7NGO5F-2UGUWNNa0AyxcTRr6y7F249caFYBsvU2fzGH34lOi9qlxH4qgh1Yg4HH7DAmCe7VRr85cxyquGHIJZHk9WlkWwU8HSHEQ59ZZhGdmqAHgVpElQb80v2_NFLBUH0doQIKfX9lKoxxHgH8yqmJk8DL1pYIX6kWheqHREoOkNWUMsm3HT8zYiDp1x-yOPUwrKwyxanExaEHebFIhusWEvKcyBMJSwgOF9MzNc6KRDu5VHK7Rqs68fSc6_jX6at731R-C9cVrO9jabzRXP4rohYU_FNQSuIgRIY0m0CfNbZ_4aJ1o8ulKu8g1rqPBdLTmT1Sag17ZswqtI7qwkEwI")
.addHeader("", "")
.build();
Response response = client.newCall(request).execute();
require "uri"
require "net/http"
url = URI("http://wooapi.vxinfosystem.com/wp-json/letscms/v1/order/create")
https = Net::HTTP.new(url.host, url.port);
https.use_ss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rO9jabzRXP4rohYU_FNQSuIgRIY0m0CfNbZ_4aJ1o8ulKu8g1rqPBdLTmT1Sag17ZswqtI7qwkEwI"
request[""] = ""
form_data = [['first_name', 'pankaj'],['last_name', 'soni'],['country', 'IN'],['address_1', 'test'],['company', 'letscms'],['city', 'aligarh'],['state', 'up'],['postcode', '202001'],['phone', '1234567890'],['email', 'pankajsoni.letscms@gmail.com'],['payment_method', 'cod'],['payment_method_title', 'Cash on Delivery']]
request.set_form form_data, 'multipart/form-data'
response = https.request(request)
puts response.read_body
Success Response
{
"status": true,
"errors": [],
"message": "",
"data": {
"order_id": 363
}
}
Response Failed
{
"status": false,
"errors": {
"first_name": "first name is required",
"last_name": "last name is required",
"country": "country is required",
"city": "city is required",
"state": "state is required",
"postcode": "postcode is required",
"phone": "phone is required",
"email": "email is required",
"payment_method": "payment_method is required",
"payment_method_title": "payment_method_title is required"
},
"message": ""
}
LETS WOO Single Order API
The "Single Order" API allow you to get user order details, this will return you all detail of order that is ordered by customer .
GET: /wp-json/letscms/v1/order/100
Parameter | Type | Position | # | Description |
---|---|---|---|---|
letscms_token | string |
Headers |
Required |
Letscms Token is generate when user attempt login or register API. |
order_id | integer |
params |
Required |
Order id of order that detail you want to cheack. |
Parameter | letscms_token |
---|---|
Type | string |
Position | Headers |
# | Required |
Description | Letscms Token is generate when user attempt login or register API |
Parameter | order_id |
Type | Integer |
Position | Params |
# | Required |
Description | Order id of order that detail you want to cheack. |
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "http://wooapi.vxinfosystem.com/wp-json/letscms/v1/order/100",
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: eyJ0eXAiOiJKV1QiLCJhbGci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T1Sag17ZswqtI7qwkEwI"
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var settings = {
"url": "http://wooapi.vxinfosystem.com/wp-json/letscms/v1/order/100",
"method": "GET",
"timeout": 0,
"headers": {
"letscms_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJJRCI6IjYiLCJ1c2VyX2xvZ2luIjoidXNlcjAwMSIsInVzZXJfbmljZW5hbWUiOiJ1c2VyMDAxIiwidXNlcl9lbWFpbCI6InVzZXIwMDFAdGVzdC5jb20iLCJ1c2VyX3VybCI6IiIsInVzZXJfcmVnaXN0ZXJlZCI6IjIwMjAtMTAtMTUgMTI6MTc6MTciLCJ1c2VyX2FjdGl2YXRpb25fa2V5IjoiMTYwMjc2NDIzODokUCRCVXFCTVRWdFBRNHVRVWE2ZFNTbzEyamJWSFZvVEwxIiwidXNlcl9zdGF0dXMiOiIwIiwiZGlzcGxheV9uYW1lIjoidXNlcjAwMSB0ZXN0IiwibGFzdF9sb2dpbiI6MTYwODA5NjQ3MH0.JyU-3Y2N6h5ye2m31wf-m7lYStyDwxroEKU3Ko9_4pXwk23rVu_9PdoDXfhFWJKrWlGIjx8byj2ICFdKlLvASjRp6YSlj-VALStZzQawXL8-iXJroMrZjnkK4kNtkYG26TCEmEfbS3L-qTRtq2UYVl9TwJ6hEiTbYe0SCoJB5hQ5NNS4GEyniUU5pvPbTbFaGUQ7_4-9AWXVBYyrR0ng99qR9U2uwu7V1I9ChqK4VtmhdMkQr3UbnD7uz8RTUyOKTEGuKk6_2h7bLHcnC5eC3lFVmaDi07Detj8dClGKLHmuCAKGGsfJo0oeo5TiwtQ4nfg1t-t0miGuFg-kjv_7NGO5F-2UGUWNNa0AyxcTRr6y7F249caFYBsvU2fzGH34lOi9qlxH4qgh1Yg4HH7DAmCe7VRr85cxyquGHIJZHk9WlkWwU8HSHEQ59ZZhGdmqAHgVpElQb80v2_NFLBUH0doQIKfX9lKoxxHgH8yqmJk8DL1pYIX6kWheqHREoOkNWUMsm3HT8zYiDp1x-yOPUwrKwyxanExaEHebFIhusWEvKcyBMJSwgOF9MzNc6KRDu5VHK7Rqs68fSc6_jX6at731R-C9cVrO9jabzRXP4rohYU_FNQSuIgRIY0m0CfNbZ_4aJ1o8ulKu8g1rqPBdLTmT1Sag17ZswqtI7qwkEwI"
},
};
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require('request');
var options = {
'method': 'GET',
'url': 'http://wooapi.vxinfosystem.com/wp-json/letscms/v1/order/100',
'headers': {
'letscms_token': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJJRCI6IjYiLCJ1c2VyX2xvZ2luIjoidXNlcjAwMSIsInVzZXJfbmljZW5hbWUiOiJ1c2VyMDAxIiwidXNlcl9lbWFpbCI6InVzZXIwMDFAdGVzdC5jb20iLCJ1c2VyX3VybCI6IiIsInVzZXJfcmVnaXN0ZXJlZCI6IjIwMjAtMTAtMTUgMTI6MTc6MTciLCJ1c2VyX2FjdGl2YXRpb25fa2V5IjoiMTYwMjc2NDIzODokUCRCVXFCTVRWdFBRNHVRVWE2ZFNTbzEyamJWSFZvVEwxIiwidXNlcl9zdGF0dXMiOiIwIiwiZGlzcGxheV9uYW1lIjoidXNlcjAwMSB0ZXN0IiwibGFzdF9sb2dpbiI6MTYwODA5NjQ3MH0.JyU-3Y2N6h5ye2m31wf-m7lYStyDwxroEKU3Ko9_4pXwk23rVu_9PdoDXfhFWJKrWlGIjx8byj2ICFdKlLvASjRp6YSlj-VALStZzQawXL8-iXJroMrZjnkK4kNtkYG26TCEmEfbS3L-qTRtq2UYVl9TwJ6hEiTbYe0SCoJB5hQ5NNS4GEyniUU5pvPbTbFaGUQ7_4-9AWXVBYyrR0ng99qR9U2uwu7V1I9ChqK4VtmhdMkQr3UbnD7uz8RTUyOKTEGuKk6_2h7bLHcnC5eC3lFVmaDi07Detj8dClGKLHmuCAKGGsfJo0oeo5TiwtQ4nfg1t-t0miGuFg-kjv_7NGO5F-2UGUWNNa0AyxcTRr6y7F249caFYBsvU2fzGH34lOi9qlxH4qgh1Yg4HH7DAmCe7VRr85cxyquGHIJZHk9WlkWwU8HSHEQ59ZZhGdmqAHgVpElQb80v2_NFLBUH0doQIKfX9lKoxxHgH8yqmJk8DL1pYIX6kWheqHREoOkNWUMsm3HT8zYiDp1x-yOPUwrKwyxanExaEHebFIhusWEvKcyBMJSwgOF9MzNc6KRDu5VHK7Rqs68fSc6_jX6at731R-C9cVrO9jabzRXP4rohYU_FNQSuIgRIY0m0CfNbZ_4aJ1o8ulKu8g1rqPBdLTmT1Sag17ZswqtI7qwkEwI'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
url = "http://wooapi.vxinfosystem.com/wp-json/letscms/v1/order/100"
payload = {}
headers = {
'letscms_token': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJJRCI6IjYiLCJ1c2VyX2xvZ2luIjoidXNlcjAwMSIsInVzZXJfbmljZW5hbWUiOiJ1c2VyMDAxIiwidXNlcl9lbWFpbCI6InVzZXIwMDFAdGVzdC5jb20iLCJ1c2VyX3VybCI6IiIsInVzZXJfcmVnaXN0ZXJlZCI6IjIwMjAtMTAtMTUgMTI6MTc6MTciLCJ1c2VyX2FjdGl2YXRpb25fa2V5IjoiMTYwMjc2NDIzODokUCRCVXFCTVRWdFBRNHVRVWE2ZFNTbzEyamJWSFZvVEwxIiwidXNlcl9zdGF0dXMiOiIwIiwiZGlzcGxheV9uYW1lIjoidXNlcjAwMSB0ZXN0IiwibGFzdF9sb2dpbiI6MTYwODA5NjQ3MH0.JyU-3Y2N6h5ye2m31wf-m7lYStyDwxroEKU3Ko9_4pXwk23rVu_9PdoDXfhFWJKrWlGIjx8byj2ICFdKlLvASjRp6YSlj-VALStZzQawXL8-iXJroMrZjnkK4kNtkYG26TCEmEfbS3L-qTRtq2UYVl9TwJ6hEiTbYe0SCoJB5hQ5NNS4GEyniUU5pvPbTbFaGUQ7_4-9AWXVBYyrR0ng99qR9U2uwu7V1I9ChqK4VtmhdMkQr3UbnD7uz8RTUyOKTEGuKk6_2h7bLHcnC5eC3lFVmaDi07Detj8dClGKLHmuCAKGGsfJo0oeo5TiwtQ4nfg1t-t0miGuFg-kjv_7NGO5F-2UGUWNNa0AyxcTRr6y7F249caFYBsvU2fzGH34lOi9qlxH4qgh1Yg4HH7DAmCe7VRr85cxyquGHIJZHk9WlkWwU8HSHEQ59ZZhGdmqAHgVpElQb80v2_NFLBUH0doQIKfX9lKoxxHgH8yqmJk8DL1pYIX6kWheqHREoOkNWUMsm3HT8zYiDp1x-yOPUwrKwyxanExaEHebFIhusWEvKcyBMJSwgOF9MzNc6KRDu5VHK7Rqs68fSc6_jX6at731R-C9cVrO9jabzRXP4rohYU_FNQSuIgRIY0m0CfNbZ_4aJ1o8ulKu8g1rqPBdLTmT1Sag17ZswqtI7qwkEwI'
}
response = requests.request("GET", url, headers=headers, data = payload)
print(response.text.encode('utf8'))
var client = new RestClient("http://wooapi.vxinfosystem.com/wp-json/letscms/v1/order/100");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("letscms_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJJRCI6IjYiLCJ1c2VyX2xvZ2luIjoidXNlcjAwMSIsInVzZXJfbmljZW5hbWUiOiJ1c2VyMDAxIiwidXNlcl9lbWFpbCI6InVzZXIwMDFAdGVzdC5jb20iLCJ1c2VyX3VybCI6IiIsInVzZXJfcmVnaXN0ZXJlZCI6IjIwMjAtMTAtMTUgMTI6MTc6MTciLCJ1c2VyX2FjdGl2YXRpb25fa2V5IjoiMTYwMjc2NDIzODokUCRCVXFCTVRWdFBRNHVRVWE2ZFNTbzEyamJWSFZvVEwxIiwidXNlcl9zdGF0dXMiOiIwIiwiZGlzcGxheV9uYW1lIjoidXNlcjAwMSB0ZXN0IiwibGFzdF9sb2dpbiI6MTYwODA5NjQ3MH0.JyU-3Y2N6h5ye2m31wf-m7lYStyDwxroEKU3Ko9_4pXwk23rVu_9PdoDXfhFWJKrWlGIjx8byj2ICFdKlLvASjRp6YSlj-VALStZzQawXL8-iXJroMrZjnkK4kNtkYG26TCEmEfbS3L-qTRtq2UYVl9TwJ6hEiTbYe0SCoJB5hQ5NNS4GEyniUU5pvPbTbFaGUQ7_4-9AWXVBYyrR0ng99qR9U2uwu7V1I9ChqK4VtmhdMkQr3UbnD7uz8RTUyOKTEGuKk6_2h7bLHcnC5eC3lFVmaDi07Detj8dClGKLHmuCAKGGsfJo0oeo5TiwtQ4nfg1t-t0miGuFg-kjv_7NGO5F-2UGUWNNa0AyxcTRr6y7F249caFYBsvU2fzGH34lOi9qlxH4qgh1Yg4HH7DAmCe7VRr85cxyquGHIJZHk9WlkWwU8HSHEQ59ZZhGdmqAHgVpElQb80v2_NFLBUH0doQIKfX9lKoxxHgH8yqmJk8DL1pYIX6kWheqHREoOkNWUMsm3HT8zYiDp1x-yOPUwrKwyxanExaEHebFIhusWEvKcyBMJSwgOF9MzNc6KRDu5VHK7Rqs68fSc6_jX6at731R-C9cVrO9jabzRXP4rohYU_FNQSuIgRIY0m0CfNbZ_4aJ1o8ulKu8g1rqPBdLTmT1Sag17ZswqtI7qwkEwI");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request GET 'http://wooapi.vxinfosystem.com/wp-json/letscms/v1/order/100' \
--header 'letscms_token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJJRCI6IjYiLCJ1c2VyX2xvZ2luIjoidXNlcjAwMSIsInVzZXJfbmljZW5hbWUiOiJ1c2VyMDAxIiwidXNlcl9lbWFpbCI6InVzZXIwMDFAdGVzdC5jb20iLCJ1c2VyX3VybCI6IiIsInVzZXJfcmVnaXN0ZXJlZCI6IjIwMjAtMTAtMTUgMTI6MTc6MTciLCJ1c2VyX2FjdGl2YXRpb25fa2V5IjoiMTYwMjc2NDIzODokUCRCVXFCTVRWdFBRNHVRVWE2ZFNTbzEyamJWSFZvVEwxIiwidXNlcl9zdGF0dXMiOiIwIiwiZGlzcGxheV9uYW1lIjoidXNlcjAwMSB0ZXN0IiwibGFzdF9sb2dpbiI6MTYwODA5NjQ3MH0.JyU-3Y2N6h5ye2m31wf-m7lYStyDwxroEKU3Ko9_4pXwk23rVu_9PdoDXfhFWJKrWlGIjx8byj2ICFdKlLvASjRp6YSlj-VALStZzQawXL8-iXJroMrZjnkK4kNtkYG26TCEmEfbS3L-qTRtq2UYVl9TwJ6hEiTbYe0SCoJB5hQ5NNS4GEyniUU5pvPbTbFaGUQ7_4-9AWXVBYyrR0ng99qR9U2uwu7V1I9ChqK4VtmhdMkQr3UbnD7uz8RTUyOKTEGuKk6_2h7bLHcnC5eC3lFVmaDi07Detj8dClGKLHmuCAKGGsfJo0oeo5TiwtQ4nfg1t-t0miGuFg-kjv_7NGO5F-2UGUWNNa0AyxcTRr6y7F249caFYBsvU2fzGH34lOi9qlxH4qgh1Yg4HH7DAmCe7VRr85cxyquGHIJZHk9WlkWwU8HSHEQ59ZZhGdmqAHgVpElQb80v2_NFLBUH0doQIKfX9lKoxxHgH8yqmJk8DL1pYIX6kWheqHREoOkNWUMsm3HT8zYiDp1x-yOPUwrKwyxanExaEHebFIhusWEvKcyBMJSwgOF9MzNc6KRDu5VHK7Rqs68fSc6_jX6at731R-C9cVrO9jabzRXP4rohYU_FNQSuIgRIY0m0CfNbZ_4aJ1o8ulKu8g1rqPBdLTmT1Sag17ZswqtI7qwkEwI'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("http://wooapi.vxinfosystem.com/wp-json/letscms/v1/order/100")
.method("GET", null)
.addHeader("letscms_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJJRCI6IjYiLCJ1c2VyX2xvZ2luIjoidXNlcjAwMSIsInVzZXJfbmljZW5hbWUiOiJ1c2VyMDAxIiwidXNlcl9lbWFpbCI6InVzZXIwMDFAdGVzdC5jb20iLCJ1c2VyX3VybCI6IiIsInVzZXJfcmVnaXN0ZXJlZCI6IjIwMjAtMTAtMTUgMTI6MTc6MTciLCJ1c2VyX2FjdGl2YXRpb25fa2V5IjoiMTYwMjc2NDIzODokUCRCVXFCTVRWdFBRNHVRVWE2ZFNTbzEyamJWSFZvVEwxIiwidXNlcl9zdGF0dXMiOiIwIiwiZGlzcGxheV9uYW1lIjoidXNlcjAwMSB0ZXN0IiwibGFzdF9sb2dpbiI6MTYwODA5NjQ3MH0.JyU-3Y2N6h5ye2m31wf-m7lYStyDwxroEKU3Ko9_4pXwk23rVu_9PdoDXfhFWJKrWlGIjx8byj2ICFdKlLvASjRp6YSlj-VALStZzQawXL8-iXJroMrZjnkK4kNtkYG26TCEmEfbS3L-qTRtq2UYVl9TwJ6hEiTbYe0SCoJB5hQ5NNS4GEyniUU5pvPbTbFaGUQ7_4-9AWXVBYyrR0ng99qR9U2uwu7V1I9ChqK4VtmhdMkQr3UbnD7uz8RTUyOKTEGuKk6_2h7bLHcnC5eC3lFVmaDi07Detj8dClGKLHmuCAKGGsfJo0oeo5TiwtQ4nfg1t-t0miGuFg-kjv_7NGO5F-2UGUWNNa0AyxcTRr6y7F249caFYBsvU2fzGH34lOi9qlxH4qgh1Yg4HH7DAmCe7VRr85cxyquGHIJZHk9WlkWwU8HSHEQ59ZZhGdmqAHgVpElQb80v2_NFLBUH0doQIKfX9lKoxxHgH8yqmJk8DL1pYIX6kWheqHREoOkNWUMsm3HT8zYiDp1x-yOPUwrKwyxanExaEHebFIhusWEvKcyBMJSwgOF9MzNc6KRDu5VHK7Rqs68fSc6_jX6at731R-C9cVrO9jabzRXP4rohYU_FNQSuIgRIY0m0CfNbZ_4aJ1o8ulKu8g1rqPBdLTmT1Sag17ZswqtI7qwkEwI")
.build();
Response response = client.newCall(request).execute();
require "uri"
require "net/http"
url = URI("http://wooapi.vxinfosystem.com/wp-json/letscms/v1/order/100")
https = Net::HTTP.new(url.host, url.port);
https.use_ssl = true
request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zRXP4rohYU_FNQSuIgRIY0m0CfNbZ_4aJ1o8ulKu8g1rqPBdLTmT1Sag17ZswqtI7qwkEwI"
response = https.request(request)
puts response.read_body
Success Response
{
"status": true,
"errors": [],
"message": "",
"data": {
"id": 100,
"parent_id": 0,
"status": "processing",
"currency": "₹",
"version": "4.5.1",
"prices_include_tax": false,
"date_created": {
"date": "2020-09-15 04:57:02.000000",
"timezone_type": 1,
"timezone": "+00:00"
},
"date_modified": {
"date": "2020-09-15 04:57:02.000000",
"timezone_type": 1,
"timezone": "+00:00"
},
"discount_total": "0",
"discount_tax": "0",
"shipping_total": "0",
"shipping_tax": "0",
"cart_tax": "0",
"total": "725.00",
"total_tax": "0",
"customer_id": 5,
"order_key": "wc_order_g6dnqndFL4pUE",
"billing": {
"first_name": "pankaj",
"last_name": "soni",
"company": "letscms",
"address_1": "test",
"address_2": "",
"city": "aligarh",
"state": "up",
"postcode": "202001",
"country": "IN",
"email": "pankajsoni.letscms@gmail.com",
"phone": "1234567890"
},
"shipping": {
"first_name": "pankaj",
"last_name": "soni",
"company": "letscms",
"address_1": "test",
"address_2": "",
"city": "aligarh",
"state": "up",
"postcode": "202001",
"country": "IN"
},
"payment_method": "cod",
"payment_method_title": "Cash On Delivery",
"transaction_id": "",
"customer_ip_address": "::1",
"customer_user_agent": "PostmanRuntime/7.26.5",
"created_via": "FMW_APP",
"customer_note": "",
"date_completed": null,
"date_paid": null,
"cart_hash": "",
"number": "100",
"meta_data": [
{
"id": 1838,
"key": "_shipping_email",
"value": "pankajsoni.letscms@gmail.com"
},
{
"id": 1839,
"key": "_shipping_phone",
"value": "1234567890"
}
],
"line_items": {
"54": {}
},
"tax_lines": [],
"shipping_lines": [],
"fee_lines": [],
"coupon_lines": [],
"subtotal": 725,
"items": [
{
"id": 54,
"order_id": 100,
"name": "Long Sleeve Tee",
"product_id": 0,
"variation_id": 0,
"quantity": 29,
"tax_class": "",
"subtotal": "725",
"subtotal_tax": "0",
"total": "725",
"total_tax": "0",
"taxes": {
"total": [],
"subtotal": []
},
"meta_data": []
}
],
"order_used_coupons": []
}
}
Response Failed
{
"status": false,
"errors": [],
"message": "order not exists. Perhaps it was deleted?"
}
LETS WOO Get Address API
The "Get Address" API allow you to get user Address details, this will return you user billing Address detail.
GET: /wp-json/letscms/v1/address/billing
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 => "http://wooapi.vxinfosystem.com/wp-json/letscms/v1/address/billing",
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.eyJJRCI6IjYiLCJ1c2VyX2xvZ2luIjoidXNlcjAwMSIsInVzZXJfbmljZW5hbWUiOiJ1c2VyMDAxIiwidXNlcl9lbWFpbCI6InVzZXIwMDFAdGVzdC5jb20iLCJ1c2VyX3VybCI6IiIsInVzZXJfcmVnaXN0ZXJlZCI6IjIwMjAtMTAtMTUgMTI6MTc6MTciLCJ1c2VyX2FjdGl2YXRpb25fa2V5IjoiMTYwMjc2NDIzODokUCRCVXFCTVRWdFBRNHVRVWE2ZFNTbzEyamJWSFZvVEwxIiwidXNlcl9zdGF0dXMiOiIwIiwiZGlzcGxheV9uYW1lIjoidXNlcjAwMSB0ZXN0IiwibGFzdF9sb2dpbiI6MTYwODA5NjQ3MH0.JyU-3Y2N6h5ye2m31wf-m7lYStyDwxroEKU3Ko9_4pXwk23rVu_9PdoDXfhFWJKrWlGIjx8byj2ICFdKlLvASjRp6YSlj-VALStZzQawXL8-iXJroMrZjnkK4kNtkYG26TCEmEfbS3L-qTRtq2UYVl9TwJ6hEiTbYe0SCoJB5hQ5NNS4GEyniUU5pvPbTbFaGUQ7_4-9AWXVBYyrR0ng99qR9U2uwu7V1I9ChqK4VtmhdMkQr3UbnD7uz8RTUyOKTEGuKk6_2h7bLHcnC5eC3lFVmaDi07Detj8dClGKLHmuCAKGGsfJo0oeo5TiwtQ4nfg1t-t0miGuFg-kjv_7NGO5F-2UGUWNNa0AyxcTRr6y7F249caFYBsvU2fzGH34lOi9qlxH4qgh1Yg4HH7DAmCe7VRr85cxyquGHIJZHk9WlkWwU8HSHEQ59ZZhGdmqAHgVpElQb80v2_NFLBUH0doQIKfX9lKoxxHgH8yqmJk8DL1pYIX6kWheqHREoOkNWUMsm3HT8zYiDp1x-yOPUwrKwyxanExaEHebFIhusWEvKcyBMJSwgOF9MzNc6KRDu5VHK7Rqs68fSc6_jX6at731R-C9cVrO9jabzRXP4rohYU_FNQSuIgRIY0m0CfNbZ_4aJ1o8ulKu8g1rqPBdLTmT1Sag17ZswqtI7qwkEwI"
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var settings = {
"url": "http://wooapi.vxinfosystem.com/wp-json/letscms/v1/address/billing",
"method": "GET",
"timeout": 0,
"headers": {
"letscms_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJJRCI6IjYiLCJ1c2VyX2xvZ2luIjoidXNlcjAwMSIsInVzZXJfbmljZW5hbWUiOiJ1c2VyMDAxIiwidXNlcl9lbWFpbCI6InVzZXIwMDFAdGVzdC5jb20iLCJ1c2VyX3VybCI6IiIsInVzZXJfcmVnaXN0ZXJlZCI6IjIwMjAtMTAtMTUgMTI6MTc6MTciLCJ1c2VyX2FjdGl2YXRpb25fa2V5IjoiMTYwMjc2NDIzODokUCRCVXFCTVRWdFBRNHVRVWE2ZFNTbzEyamJWSFZvVEwxIiwidXNlcl9zdGF0dXMiOiIwIiwiZGlzcGxheV9uYW1lIjoidXNlcjAwMSB0ZXN0IiwibGFzdF9sb2dpbiI6MTYwODA5NjQ3MH0.JyU-3Y2N6h5ye2m31wf-m7lYStyDwxroEKU3Ko9_4pXwk23rVu_9PdoDXfhFWJKrWlGIjx8byj2ICFdKlLvASjRp6YSlj-VALStZzQawXL8-iXJroMrZjnkK4kNtkYG26TCEmEfbS3L-qTRtq2UYVl9TwJ6hEiTbYe0SCoJB5hQ5NNS4GEyniUU5pvPbTbFaGUQ7_4-9AWXVBYyrR0ng99qR9U2uwu7V1I9ChqK4VtmhdMkQr3UbnD7uz8RTUyOKTEGuKk6_2h7bLHcnC5eC3lFVmaDi07Detj8dClGKLHmuCAKGGsfJo0oeo5TiwtQ4nfg1t-t0miGuFg-kjv_7NGO5F-2UGUWNNa0AyxcTRr6y7F249caFYBsvU2fzGH34lOi9qlxH4qgh1Yg4HH7DAmCe7VRr85cxyquGHIJZHk9WlkWwU8HSHEQ59ZZhGdmqAHgVpElQb80v2_NFLBUH0doQIKfX9lKoxxHgH8yqmJk8DL1pYIX6kWheqHREoOkNWUMsm3HT8zYiDp1x-yOPUwrKwyxanExaEHebFIhusWEvKcyBMJSwgOF9MzNc6KRDu5VHK7Rqs68fSc6_jX6at731R-C9cVrO9jabzRXP4rohYU_FNQSuIgRIY0m0CfNbZ_4aJ1o8ulKu8g1rqPBdLTmT1Sag17ZswqtI7qwkEwI"
},
};
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require('request');
var options = {
'method': 'GET',
'url': 'http://wooapi.vxinfosystem.com/wp-json/letscms/v1/address/billing',
'headers': {
'letscms_token': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJJRCI6IjYiLCJ1c2VyX2xvZ2luIjoidXNlcjAwMSIsInVzZXJfbmljZW5hbWUiOiJ1c2VyMDAxIiwidXNlcl9lbWFpbCI6InVzZXIwMDFAdGVzdC5jb20iLCJ1c2VyX3VybCI6IiIsInVzZXJfcmVnaXN0ZXJlZCI6IjIwMjAtMTAtMTUgMTI6MTc6MTciLCJ1c2VyX2FjdGl2YXRpb25fa2V5IjoiMTYwMjc2NDIzODokUCRCVXFCTVRWdFBRNHVRVWE2ZFNTbzEyamJWSFZvVEwxIiwidXNlcl9zdGF0dXMiOiIwIiwiZGlzcGxheV9uYW1lIjoidXNlcjAwMSB0ZXN0IiwibGFzdF9sb2dpbiI6MTYwODA5NjQ3MH0.JyU-3Y2N6h5ye2m31wf-m7lYStyDwxroEKU3Ko9_4pXwk23rVu_9PdoDXfhFWJKrWlGIjx8byj2ICFdKlLvASjRp6YSlj-VALStZzQawXL8-iXJroMrZjnkK4kNtkYG26TCEmEfbS3L-qTRtq2UYVl9TwJ6hEiTbYe0SCoJB5hQ5NNS4GEyniUU5pvPbTbFaGUQ7_4-9AWXVBYyrR0ng99qR9U2uwu7V1I9ChqK4VtmhdMkQr3UbnD7uz8RTUyOKTEGuKk6_2h7bLHcnC5eC3lFVmaDi07Detj8dClGKLHmuCAKGGsfJo0oeo5TiwtQ4nfg1t-t0miGuFg-kjv_7NGO5F-2UGUWNNa0AyxcTRr6y7F249caFYBsvU2fzGH34lOi9qlxH4qgh1Yg4HH7DAmCe7VRr85cxyquGHIJZHk9WlkWwU8HSHEQ59ZZhGdmqAHgVpElQb80v2_NFLBUH0doQIKfX9lKoxxHgH8yqmJk8DL1pYIX6kWheqHREoOkNWUMsm3HT8zYiDp1x-yOPUwrKwyxanExaEHebFIhusWEvKcyBMJSwgOF9MzNc6KRDu5VHK7Rqs68fSc6_jX6at731R-C9cVrO9jabzRXP4rohYU_FNQSuIgRIY0m0CfNbZ_4aJ1o8ulKu8g1rqPBdLTmT1Sag17ZswqtI7qwkEwI'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
url = "http://wooapi.vxinfosystem.com/wp-json/letscms/v1/address/billing"
payload = {}
headers = {
'letscms_token': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1N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qtI7qwkEwI'
}
response = requests.request("GET", url, headers=headers, data = payload)
print(response.text.encode('utf8'))
var client = new RestClient("http://wooapi.vxinfosystem.com/wp-json/letscms/v1/address/billing");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("letscms_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJJRCI6IjYiLCJ1c2VyX2xvZ2luIjoidXNlcjAwMSIsInVzZXJfbmljZW5hbWUiOiJ1c2VyMDAxIiwidXNlcl9lbWFpbCI6InVzZXIwMDFAdGVzdC5jb20iLCJ1c2VyX3VybCI6IiIsInVzZXJfcmVnaXN0ZXJlZCI6IjIwMjAtMTAtMTUgMTI6MTc6MTciLCJ1c2VyX2FjdGl2YXRpb25fa2V5IjoiMTYwMjc2NDIzODokUCRCVXFCTVRWdFBRNHVRVWE2ZFNTbzEyamJWSFZvVEwxIiwidXNlcl9zdGF0dXMiOiIwIiwiZGlzcGxheV9uYW1lIjoidXNlcjAwMSB0ZXN0IiwibGFzdF9sb2dpbiI6MTYwODA5NjQ3MH0.JyU-3Y2N6h5ye2m31wf-m7lYStyDwxroEKU3Ko9_4pXwk23rVu_9PdoDXfhFWJKrWlGIjx8byj2ICFdKlLvASjRp6YSlj-VALStZzQawXL8-iXJroMrZjnkK4kNtkYG26TCEmEfbS3L-qTRtq2UYVl9TwJ6hEiTbYe0SCoJB5hQ5NNS4GEyniUU5pvPbTbFaGUQ7_4-9AWXVBYyrR0ng99qR9U2uwu7V1I9ChqK4VtmhdMkQr3UbnD7uz8RTUyOKTEGuKk6_2h7bLHcnC5eC3lFVmaDi07Detj8dClGKLHmuCAKGGsfJo0oeo5TiwtQ4nfg1t-t0miGuFg-kjv_7NGO5F-2UGUWNNa0AyxcTRr6y7F249caFYBsvU2fzGH34lOi9qlxH4qgh1Yg4HH7DAmCe7VRr85cxyquGHIJZHk9WlkWwU8HSHEQ59ZZhGdmqAHgVpElQb80v2_NFLBUH0doQIKfX9lKoxxHgH8yqmJk8DL1pYIX6kWheqHREoOkNWUMsm3HT8zYiDp1x-yOPUwrKwyxanExaEHebFIhusWEvKcyBMJSwgOF9MzNc6KRDu5VHK7Rqs68fSc6_jX6at731R-C9cVrO9jabzRXP4rohYU_FNQSuIgRIY0m0CfNbZ_4aJ1o8ulKu8g1rqPBdLTmT1Sag17ZswqtI7qwkEwI");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request GET 'http://wooapi.vxinfosystem.com/wp-json/letscms/v1/address/billing' \
--header 'letscms_token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJJRCI6IjYiLCJ1c2VyX2xvZ2luIjoidXNlcjAwMSIsInVzZXJfbmljZW5hbWUiOiJ1c2VyMDAxIiwidXNlcl9lbWFpbCI6InVzZXIwMDFAdGVzdC5jb20iLCJ1c2VyX3VybCI6IiIsInVzZXJfcmVnaXN0ZXJlZCI6IjIwMjAtMTAtMTUgMTI6MTc6MTciLCJ1c2VyX2FjdGl2YXRpb25fa2V5IjoiMTYwMjc2NDIzODokUCRCVXFCTVRWdFBRNHVRVWE2ZFNTbzEyamJWSFZvVEwxIiwidXNlcl9zdGF0dXMiOiIwIiwiZGlzcGxheV9uYW1lIjoidXNlcjAwMSB0ZXN0IiwibGFzdF9sb2dpbiI6MTYwODA5NjQ3MH0.JyU-3Y2N6h5ye2m31wf-m7lYStyDwxroEKU3Ko9_4pXwk23rVu_9PdoDXfhFWJKrWlGIjx8byj2ICFdKlLvASjRp6YSlj-VALStZzQawXL8-iXJroMrZjnkK4kNtkYG26TCEmEfbS3L-qTRtq2UYVl9TwJ6hEiTbYe0SCoJB5hQ5NNS4GEyniUU5pvPbTbFaGUQ7_4-9AWXVBYyrR0ng99qR9U2uwu7V1I9ChqK4VtmhdMkQr3UbnD7uz8RTUyOKTEGuKk6_2h7bLHcnC5eC3lFVmaDi07Detj8dClGKLHmuCAKGGsfJo0oeo5TiwtQ4nfg1t-t0miGuFg-kjv_7NGO5F-2UGUWNNa0AyxcTRr6y7F249caFYBsvU2fzGH34lOi9qlxH4qgh1Yg4HH7DAmCe7VRr85cxyquGHIJZHk9WlkWwU8HSHEQ59ZZhGdmqAHgVpElQb80v2_NFLBUH0doQIKfX9lKoxxHgH8yqmJk8DL1pYIX6kWheqHREoOkNWUMsm3HT8zYiDp1x-yOPUwrKwyxanExaEHebFIhusWEvKcyBMJSwgOF9MzNc6KRDu5VHK7Rqs68fSc6_jX6at731R-C9cVrO9jabzRXP4rohYU_FNQSuIgRIY0m0CfNbZ_4aJ1o8ulKu8g1rqPBdLTmT1Sag17ZswqtI7qwkEwI'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("http://wooapi.vxinfosystem.com/wp-json/letscms/v1/address/billing")
.method("GET", null)
.addHeader("letscms_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJJRCI6IjYiLCJ1c2VyX2xvZ2luIjoidXNlcjAwMSIsInVzZXJfbmljZW5hbWUiOiJ1c2VyMDAxIiwidXNlcl9lbWFpbCI6InVzZXIwMDFAdGVzdC5jb20iLCJ1c2VyX3VybCI6IiIsInVzZXJfcmVnaXN0ZXJlZCI6IjIwMjAtMTAtMTUgMTI6MTc6MTciLCJ1c2VyX2FjdGl2YXRpb25fa2V5IjoiMTYwMjc2NDIzODokUCRCVXFCTVRWdFBRNHVRVWE2ZFNTbzEyamJWSFZvVEwxIiwidXNlcl9zdGF0dXMiOiIwIiwiZGlzcGxheV9uYW1lIjoidXNlcjAwMSB0ZXN0IiwibGFzdF9sb2dpbiI6MTYwODA5NjQ3MH0.JyU-3Y2N6h5ye2m31wf-m7lYStyDwxroEKU3Ko9_4pXwk23rVu_9PdoDXfhFWJKrWlGIjx8byj2ICFdKlLvASjRp6YSlj-VALStZzQawXL8-iXJroMrZjnkK4kNtkYG26TCEmEfbS3L-qTRtq2UYVl9TwJ6hEiTbYe0SCoJB5hQ5NNS4GEyniUU5pvPbTbFaGUQ7_4-9AWXVBYyrR0ng99qR9U2uwu7V1I9ChqK4VtmhdMkQr3UbnD7uz8RTUyOKTEGuKk6_2h7bLHcnC5eC3lFVmaDi07Detj8dClGKLHmuCAKGGsfJo0oeo5TiwtQ4nfg1t-t0miGuFg-kjv_7NGO5F-2UGUWNNa0AyxcTRr6y7F249caFYBsvU2fzGH34lOi9qlxH4qgh1Yg4HH7DAmCe7VRr85cxyquGHIJZHk9WlkWwU8HSHEQ59ZZhGdmqAHgVpElQb80v2_NFLBUH0doQIKfX9lKoxxHgH8yqmJk8DL1pYIX6kWheqHREoOkNWUMsm3HT8zYiDp1x-yOPUwrKwyxanExaEHebFIhusWEvKcyBMJSwgOF9MzNc6KRDu5VHK7Rqs68fSc6_jX6at731R-C9cVrO9jabzRXP4rohYU_FNQSuIgRIY0m0CfNbZ_4aJ1o8ulKu8g1rqPBdLTmT1Sag17ZswqtI7qwkEwI")
.build();
Response response = client.newCall(request).execute();
require "uri"
require "net/http"
url = URI("http://wooapi.vxinfosystem.com/wp-json/letscms/v1/address/billing")
https = Net::HTTP.new(url.host, url.port);
https.use_ssl = true
request = Net::HTTP::Get.new(url)
request["letscms_token"] = "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJJRCI6IjYiLCJ1c2VyX2xvZ2luIjoidXNlcjAwMSIsInVzZXJfbmljZW5hbWUiOiJ1c2VyMDAxIiwidXNlcl9lbWFpbCI6InVzZXIwMDFAdGVzdC5jb20iLCJ1c2VyX3VybCI6IiIsInVzZXJfcmVnaXN0ZXJlZCI6IjIwMjAtMTAtMTUgMTI6MTc6MTciLCJ1c2VyX2FjdGl2YXRpb25fa2V5IjoiMTYwMjc2NDIzODokUCRCVXFCTVRWdFBRNHVRVWE2ZFNTbzEyamJWSFZvVEwxIiwidXNlcl9zdGF0dXMiOiIwIiwiZGlzcGxheV9uYW1lIjoidXNlcjAwMSB0ZXN0IiwibGFzdF9sb2dpbiI6MTYwODA5NjQ3MH0.JyU-3Y2N6h5ye2m31wf-m7lYStyDwxroEKU3Ko9_4pXwk23rVu_9PdoDXfhFWJKrWlGIjx8byj2ICFdKlLvASjRp6YSlj-VALStZzQawXL8-iXJroMrZjnkK4kNtkYG26TCEmEfbS3L-qTRtq2UYVl9TwJ6hEiTbYe0SCoJB5hQ5NNS4GEyniUU5pvPbTbFaGUQ7_4-9AWXVBYyrR0ng99qR9U2uwu7V1I9ChqK4VtmhdMkQr3UbnD7uz8RTUyOKTEGuKk6_2h7bLHcnC5eC3lFVmaDi07Detj8dClGKLHmuCAKGGsfJo0oeo5TiwtQ4nfg1t-t0miGuFg-kjv_7NGO5F-2UGUWNNa0AyxcTRr6y7F249caFYBsvU2fzGH34lOi9qlxH4qgh1Yg4HH7DAmCe7VRr85cxyquGHIJZHk9WlkWwU8HSHEQ59ZZhGdmqAHgVpElQb80v2_NFLBUH0doQIKfX9lKoxxHgH8yqmJk8DL1pYIX6kWheqHREoOkNWUMsm3HT8zYiDp1x-yOPUwrKwyxanExaEHebFIhusWEvKcyBMJSwgOF9MzNc6KRDu5VHK7Rqs68fSc6_jX6at731R-C9cVrO9jabzRXP4rohYU_FNQSuIgRIY0m0CfNbZ_4aJ1o8ulKu8g1rqPBdLTmT1Sag17ZswqtI7qwkEwI"
response = https.request(request)
puts response.read_body
Success Response
{
"status": true,
"errors": [],
"message": "",
"data": {
"address": {
"first_name": "pankaj",
"last_name": "soni",
"company": "letscms",
"email": "pankajsoni.letscms@gmail.com",
"phone": "1234567890",
"address_1": "test",
"address_2": "",
"city": "aligarh",
"state": "up",
"postcode": "202001",
"country": "IN"
},
"countries": {
"AF": "Afghanistan",
"AX": "Åland Islands",
.
.
.
"YE": "Yemen",
"ZM": "Zambia",
"ZW": "Zimbabwe"
},
"states": {
"AF": [],
"AO": {
"BGO": "Bengo",
"BLU": "Benguela",
"BIE": "Bié",
"CAB": "Cabinda",
"CNN": "Cunene",
"HUA": "Huambo",
"HUI": "Huíla",
"CCU": "Kuando Kubango",
"CNO": "Kwanza-Norte",
"CUS": "Kwanza-Sul",
"LUA": "Luanda",
"LNO": "Lunda-Norte",
"LSU": "Lunda-Sul",
"MAL": "Malanje",
"MOX": "Moxico",
"NAM": "Namibe",
"UIG": "Uíge",
"ZAI": "Zaire"
},
.
.
.
"ZM": {
"ZM-01": "Western",
"ZM-02": "Central",
"ZM-03": "Eastern",
"ZM-04": "Luapula",
"ZM-05": "Northern",
"ZM-06": "North-Western",
"ZM-07": "Southern",
"ZM-08": "Copperbelt",
"ZM-09": "Lusaka",
"ZM-10": "Muchinga"
}
}
}
}
Response Failed
{
"status": false,
"errors": [],
"message": "Please provide letscms_token in header"
}
LETS WOO Save Address API
The "Save Address" API allow you to save customer billing address details for the new customer .
POST: /wp-json/letscms/v1/address/billing
Parameter | Type | Position | # | Description |
---|---|---|---|---|
letscms_token | string |
Headers |
Required |
Letscms Token is generate when user attempt login or register API. |
first_name | string |
body |
Required |
First name of user. |
last_name | string |
body |
Required |
Last name of user. |
country | string |
body |
Required |
Select the country. |
city | string |
body |
Required |
City of user. |
state | string |
body |
Required |
Satate of user. |
postcode | Integer |
body |
Required |
Postcode of user . |
phone | Integer |
body |
Required |
Contact number of user. |
string |
body |
Required |
Email of user . | |
address_1 | string |
body |
Required |
Address house no. landmark, colony etc. |
address_2 | string |
body |
Optinal |
Address Apartment,unit etc. |
Parameter | letscms_token |
---|---|
Type | string |
Position | Headers |
# | Required |
Description | Letscms Token is generate when user attempt login or register API |
Parameter | first_name |
Type | string |
Position | body |
# | Required |
Description | First name of user. |
Parameter | last_name |
Type | string |
Position | body |
# | Required |
Description | Last name of user. |
Parameter | country |
Type | string |
Position | body |
# | Required |
Description | Country of user. |
Parameter | city |
Type | string |
Position | body |
# | Required |
Description | City of user. |
Parameter | state |
Type | string |
Position | body |
# | Required |
Description | State od user. |
Parameter | postcode |
Type | Integer |
Position | body |
# | Required |
Description | Postcode of user. |
Parameter | phone |
Type | Integer |
Position | body |
# | Required |
Description | Contact no. of user. |
Parameter | |
Type | string |
Position | body |
# | Required |
Description | Email of user. |
Parameter | address_1 |
Type | string |
Position | body |
# | Required |
Description | Address house no.,street no. etc. |
Parameter | address_2 |
Type | string |
Position | body |
# | Optinal |
Description | Address Apartment,unit etc. |
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "http://wooapi.vxinfosystem.com/wp-json/letscms/v1/address/billing",
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('first_name' => '','last_name' => '','company' => 'Letscms','email' => 'pankajsoni.letscms@gmail.com','address_1' => 'home','address_2' => 'test','city' => 'aligarh','state' => 'UP','postcode' => '202001','country' => 'IN'),
CURLOPT_HTTPHEADER => array(
"letscms_token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJJRCI6IjYiLCJ1c2VyX2xvZ2luIjoidXNlcjAwMSIsInVzZXJfbmljZW5hbWUiOiJ1c2VyMDAxIiwidXNlcl9lbWFpbCI6InVzZXIwMDFAdGVzdC5jb20iLCJ1c2VyX3VybCI6IiIsInVzZXJfcmVnaXN0ZXJlZCI6IjIwMjAtMTAtMTUgMTI6MTc6MTciLCJ1c2VyX2FjdGl2YXRpb25fa2V5IjoiMTYwMjc2NDIzODokUCRCVXFCTVRWdFBRNHVRVWE2ZFNTbzEyamJWSFZvVEwxIiwidXNlcl9zdGF0dXMiOiIwIiwiZGlzcGxheV9uYW1lIjoidXNlcjAwMSB0ZXN0IiwibGFzdF9sb2dpbiI6MTYwODA5NjQ3MH0.JyU-3Y2N6h5ye2m31wf-m7lYStyDwxroEKU3Ko9_4pXwk23rVu_9PdoDXfhFWJKrWlGIjx8byj2ICFdKlLvASjRp6YSlj-VALStZzQawXL8-iXJroMrZjnkK4kNtkYG26TCEmEfbS3L-qTRtq2UYVl9TwJ6hEiTbYe0SCoJB5hQ5NNS4GEyniUU5pvPbTbFaGUQ7_4-9AWXVBYyrR0ng99qR9U2uwu7V1I9ChqK4VtmhdMkQr3UbnD7uz8RTUyOKTEGuKk6_2h7bLHcnC5eC3lFVmaDi07Detj8dClGKLHmuCAKGGsfJo0oeo5TiwtQ4nfg1t-t0miGuFg-kjv_7NGO5F-2UGUWNNa0AyxcTRr6y7F249caFYBsvU2fzGH34lOi9qlxH4qgh1Yg4HH7DAmCe7VRr85cxyquGHIJZHk9WlkWwU8HSHEQ59ZZhGdmqAHgVpElQb80v2_NFLBUH0doQIKfX9lKoxxHgH8yqmJk8DL1pYIX6kWheqHREoOkNWUMsm3HT8zYiDp1x-yOPUwrKwyxanExaEHebFIhusWEvKcyBMJSwgOF9MzNc6KRDu5VHK7Rqs68fSc6_jX6at731R-C9cVrO9jabzRXP4rohYU_FNQSuIgRIY0m0CfNbZ_4aJ1o8ulKu8g1rqPBdLTmT1Sag17ZswqtI7qwkEwI"
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var form = new FormData();
form.append("first_name", "");
form.append("last_name", "");
form.append("company", "Letscms");
form.append("email", "pankajsoni.letscms@gmail.com");
form.append("address_1", "home");
form.append("address_2", "test");
form.append("city", "aligarh");
form.append("state", "UP");
form.append("postcode", "202001");
form.append("country", "IN");
var settings = {
"url": "http://wooapi.vxinfosystem.com/wp-json/letscms/v1/address/billing",
"method": "POST",
"timeout": 0,
"headers": {
"letscms_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJJRCI6IjYiLCJ1c2VyX2xvZ2luIjoidXNlcjAwMSIsInVzZXJfbmljZW5hbWUiOiJ1c2VyMDAxIiwidXNlcl9lbWFpbCI6InVzZXIwMDFAdGVzdC5jb20iLCJ1c2VyX3VybCI6IiIsInVzZXJfcmVnaXN0ZXJlZCI6IjIwMjAtMTAtMTUgMTI6MTc6MTciLCJ1c2VyX2FjdGl2YXRpb25fa2V5IjoiMTYwMjc2NDIzODokUCRCVXFCTVRWdFBRNHVRVWE2ZFNTbzEyamJWSFZvVEwxIiwidXNlcl9zdGF0dXMiOiIwIiwiZGlzcGxheV9uYW1lIjoidXNlcjAwMSB0ZXN0IiwibGFzdF9sb2dpbiI6MTYwODA5NjQ3MH0.JyU-3Y2N6h5ye2m31wf-m7lYStyDwxroEKU3Ko9_4pXwk23rVu_9PdoDXfhFWJKrWlGIjx8byj2ICFdKlLvASjRp6YSlj-VALStZzQawXL8-iXJroMrZjnkK4kNtkYG26TCEmEfbS3L-qTRtq2UYVl9TwJ6hEiTbYe0SCoJB5hQ5NNS4GEyniUU5pvPbTbFaGUQ7_4-9AWXVBYyrR0ng99qR9U2uwu7V1I9ChqK4VtmhdMkQr3UbnD7uz8RTUyOKTEGuKk6_2h7bLHcnC5eC3lFVmaDi07Detj8dClGKLHmuCAKGGsfJo0oeo5TiwtQ4nfg1t-t0miGuFg-kjv_7NGO5F-2UGUWNNa0AyxcTRr6y7F249caFYBsvU2fzGH34lOi9qlxH4qgh1Yg4HH7DAmCe7VRr85cxyquGHIJZHk9WlkWwU8HSHEQ59ZZhGdmqAHgVpElQb80v2_NFLBUH0doQIKfX9lKoxxHgH8yqmJk8DL1pYIX6kWheqHREoOkNWUMsm3HT8zYiDp1x-yOPUwrKwyxanExaEHebFIhusWEvKcyBMJSwgOF9MzNc6KRDu5VHK7Rqs68fSc6_jX6at731R-C9cVrO9jabzRXP4rohYU_FNQSuIgRIY0m0CfNbZ_4aJ1o8ulKu8g1rqPBdLTmT1Sag17ZswqtI7qwkEwI"
},
"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': 'http://wooapi.vxinfosystem.com/wp-json/letscms/v1/address/billing',
'headers': {
'letscms_token': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJJRCI6IjYiLCJ1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name': '',
'last_name': '',
'company': 'Letscms',
'email': 'pankajsoni.letscms@gmail.com',
'address_1': 'home',
'address_2': 'test',
'city': 'aligarh',
'state': 'UP',
'postcode': '202001',
'country': 'IN'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
url = "http://wooapi.vxinfosystem.com/wp-json/letscms/v1/address/billing"
payload = {'first_name': '',
'last_name': '',
'company': 'Letscms',
'email': 'pankajsoni.letscms@gmail.com',
'address_1': 'home',
'address_2': 'test',
'city': 'aligarh',
'state': 'UP',
'postcode': '202001',
'country': 'IN'}
files = [
]
headers = {
'letscms_token': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJJRCI6IjYiLCJ1c2VyX2xvZ2luIjoidXNlcjAwMSIsInVzZXJfbmljZW5hbWUiOiJ1c2VyMDAxIiwidXNlcl9lbWFpbCI6InVzZXIwMDFAdGVzdC5jb20iLCJ1c2VyX3VybCI6IiIsInVzZXJfcmVnaXN0ZXJlZCI6IjIwMjAtMTAtMTUgMTI6MTc6MTciLCJ1c2VyX2FjdGl2YXRpb25fa2V5IjoiMTYwMjc2NDIzODokUCRCVXFCTVRWdFBRNHVRVWE2ZFNTbzEyamJWSFZvVEwxIiwidXNlcl9zdGF0dXMiOiIwIiwiZGlzcGxheV9uYW1lIjoidXNlcjAwMSB0ZXN0IiwibGFzdF9sb2dpbiI6MTYwODA5NjQ3MH0.JyU-3Y2N6h5ye2m31wf-m7lYStyDwxroEKU3Ko9_4pXwk23rVu_9PdoDXfhFWJKrWlGIjx8byj2ICFdKlLvASjRp6YSlj-VALStZzQawXL8-iXJroMrZjnkK4kNtkYG26TCEmEfbS3L-qTRtq2UYVl9TwJ6hEiTbYe0SCoJB5hQ5NNS4GEyniUU5pvPbTbFaGUQ7_4-9AWXVBYyrR0ng99qR9U2uwu7V1I9ChqK4VtmhdMkQr3UbnD7uz8RTUyOKTEGuKk6_2h7bLHcnC5eC3lFVmaDi07Detj8dClGKLHmuCAKGGsfJo0oeo5TiwtQ4nfg1t-t0miGuFg-kjv_7NGO5F-2UGUWNNa0AyxcTRr6y7F249caFYBsvU2fzGH34lOi9qlxH4qgh1Yg4HH7DAmCe7VRr85cxyquGHIJZHk9WlkWwU8HSHEQ59ZZhGdmqAHgVpElQb80v2_NFLBUH0doQIKfX9lKoxxHgH8yqmJk8DL1pYIX6kWheqHREoOkNWUMsm3HT8zYiDp1x-yOPUwrKwyxanExaEHebFIhusWEvKcyBMJSwgOF9MzNc6KRDu5VHK7Rqs68fSc6_jX6at731R-C9cVrO9jabzRXP4rohYU_FNQSuIgRIY0m0CfNbZ_4aJ1o8ulKu8g1rqPBdLTmT1Sag17ZswqtI7qwkEwI'
}
response = requests.request("POST", url, headers=headers, data = payload, files = files)
print(response.text.encode('utf8'))
var client = new RestClient("http://wooapi.vxinfosystem.com/wp-json/letscms/v1/address/billing");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("letscms_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJJRCI6IjYiLCJ1c2VyX2xvZ2luIjoidXNlcjAwMSIsInVzZXJfbmljZW5hbWUiOiJ1c2VyMDAxIiwidXNlcl9lbWFpbCI6InVzZXIwMDFAdGVzdC5jb20iLCJ1c2VyX3VybCI6IiIsInVzZXJfcmVnaXN0ZXJlZCI6IjIwMjAtMTAtMTUgMTI6MTc6MTciLCJ1c2VyX2FjdGl2YXRpb25fa2V5IjoiMTYwMjc2NDIzODokUCRCVXFCTVRWdFBRNHVRVWE2ZFNTbzEyamJWSFZvVEwxIiwidXNlcl9zdGF0dXMiOiIwIiwiZGlzcGxheV9uYW1lIjoidXNlcjAwMSB0ZXN0IiwibGFzdF9sb2dpbiI6MTYwODA5NjQ3MH0.JyU-3Y2N6h5ye2m31wf-m7lYStyDwxroEKU3Ko9_4pXwk23rVu_9PdoDXfhFWJKrWlGIjx8byj2ICFdKlLvASjRp6YSlj-VALStZzQawXL8-iXJroMrZjnkK4kNtkYG26TCEmEfbS3L-qTRtq2UYVl9TwJ6hEiTbYe0SCoJB5hQ5NNS4GEyniUU5pvPbTbFaGUQ7_4-9AWXVBYyrR0ng99qR9U2uwu7V1I9ChqK4VtmhdMkQr3UbnD7uz8RTUyOKTEGuKk6_2h7bLHcnC5eC3lFVmaDi07Detj8dClGKLHmuCAKGGsfJo0oeo5TiwtQ4nfg1t-t0miGuFg-kjv_7NGO5F-2UGUWNNa0AyxcTRr6y7F249caFYBsvU2fzGH34lOi9qlxH4qgh1Yg4HH7DAmCe7VRr85cxyquGHIJZHk9WlkWwU8HSHEQ59ZZhGdmqAHgVpElQb80v2_NFLBUH0doQIKfX9lKoxxHgH8yqmJk8DL1pYIX6kWheqHREoOkNWUMsm3HT8zYiDp1x-yOPUwrKwyxanExaEHebFIhusWEvKcyBMJSwgOF9MzNc6KRDu5VHK7Rqs68fSc6_jX6at731R-C9cVrO9jabzRXP4rohYU_FNQSuIgRIY0m0CfNbZ_4aJ1o8ulKu8g1rqPBdLTmT1Sag17ZswqtI7qwkEwI");
request.AlwaysMultipartFormData = true;
request.AddParameter("first_name", "");
request.AddParameter("last_name", "");
request.AddParameter("company", "Letscms");
request.AddParameter("email", "pankajsoni.letscms@gmail.com");
request.AddParameter("address_1", "home");
request.AddParameter("address_2", "test");
request.AddParameter("city", "aligarh");
request.AddParameter("state", "UP");
request.AddParameter("postcode", "202001");
request.AddParameter("country", "IN");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request POST 'http://wooapi.vxinfosystem.com/wp-json/letscms/v1/address/billing' \
--header 'letscms_token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJJRCI6IjYiLCJ1c2VyX2xvZ2luIjoidXNlcjAwMSIsInVzZXJfbmljZW5hbWUiOiJ1c2VyMDAxIiwidXNlcl9lbWFpbCI6InVzZXIwMDFAdGVzdC5jb20iLCJ1c2VyX3VybCI6IiIsInVzZXJfcmVnaXN0ZXJlZCI6IjIwMjAtMTAtMTUgMTI6MTc6MTciLCJ1c2VyX2FjdGl2YXRpb25fa2V5IjoiMTYwMjc2NDIzODokUCRCVXFCTVRWdFBRNHVRVWE2ZFNTbzEyamJWSFZvVEwxIiwidXNlcl9zdGF0dXMiOiIwIiwiZGlzcGxheV9uYW1lIjoidXNlcjAwMSB0ZXN0IiwibGFzdF9sb2dpbiI6MTYwODA5NjQ3MH0.JyU-3Y2N6h5ye2m31wf-m7lYStyDwxroEKU3Ko9_4pXwk23rVu_9PdoDXfhFWJKrWlGIjx8byj2ICFdKlLvASjRp6YSlj-VALStZzQawXL8-iXJroMrZjnkK4kNtkYG26TCEmEfbS3L-qTRtq2UYVl9TwJ6hEiTbYe0SCoJB5hQ5NNS4GEyniUU5pvPbTbFaGUQ7_4-9AWXVBYyrR0ng99qR9U2uwu7V1I9ChqK4VtmhdMkQr3UbnD7uz8RTUyOKTEGuKk6_2h7bLHcnC5eC3lFVmaDi07Detj8dClGKLHmuCAKGGsfJo0oeo5TiwtQ4nfg1t-t0miGuFg-kjv_7NGO5F-2UGUWNNa0AyxcTRr6y7F249caFYBsvU2fzGH34lOi9qlxH4qgh1Yg4HH7DAmCe7VRr85cxyquGHIJZHk9WlkWwU8HSHEQ59ZZhGdmqAHgVpElQb80v2_NFLBUH0doQIKfX9lKoxxHgH8yqmJk8DL1pYIX6kWheqHREoOkNWUMsm3HT8zYiDp1x-yOPUwrKwyxanExaEHebFIhusWEvKcyBMJSwgOF9MzNc6KRDu5VHK7Rqs68fSc6_jX6at731R-C9cVrO9jabzRXP4rohYU_FNQSuIgRIY0m0CfNbZ_4aJ1o8ulKu8g1rqPBdLTmT1Sag17ZswqtI7qwkEwI' \
--form 'first_name=' \
--form 'last_name=' \
--form 'company=Letscms' \
--form 'email=pankajsoni.letscms@gmail.com' \
--form 'address_1=home' \
--form 'address_2=test' \
--form 'city=aligarh' \
--form 'state=UP' \
--form 'postcode=202001' \
--form 'country=IN'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = new MultipartBody.Builder().setType(MultipartBody.FORM)
.addFormDataPart("first_name", "")
.addFormDataPart("last_name", "")
.addFormDataPart("company", "Letscms")
.addFormDataPart("email", "pankajsoni.letscms@gmail.com")
.addFormDataPart("address_1", "home")
.addFormDataPart("address_2", "test")
.addFormDataPart("city", "aligarh")
.addFormDataPart("state", "UP")
.addFormDataPart("postcode", "202001")
.addFormDataPart("country", "IN")
.build();
Request request = new Request.Builder()
.url("http://wooapi.vxinfosystem.com/wp-json/letscms/v1/address/billing")
.method("POST", body)
.addHeader("letscms_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJJRCI6IjYiLCJ1c2VyX2xvZ2luIjoidXNlcjAwMSIsInVzZXJfbmljZW5hbWUiOiJ1c2VyMDAxIiwidXNlcl9lbWFpbCI6InVzZXIwMDFAdGVzdC5jb20iLCJ1c2VyX3VybCI6IiIsInVzZXJfcmVnaXN0ZXJlZCI6IjIwMjAtMTAtMTUgMTI6MTc6MTciLCJ1c2VyX2FjdGl2YXRpb25fa2V5IjoiMTYwMjc2NDIzODokUCRCVXFCTVRWdFBRNHVRVWE2ZFNTbzEyamJWSFZvVEwxIiwidXNlcl9zdGF0dXMiOiIwIiwiZGlzcGxheV9uYW1lIjoidXNlcjAwMSB0ZXN0IiwibGFzdF9sb2dpbiI6MTYwODA5NjQ3MH0.JyU-3Y2N6h5ye2m31wf-m7lYStyDwxroEKU3Ko9_4pXwk23rVu_9PdoDXfhFWJKrWlGIjx8byj2ICFdKlLvASjRp6YSlj-VALStZzQawXL8-iXJroMrZjnkK4kNtkYG26TCEmEfbS3L-qTRtq2UYVl9TwJ6hEiTbYe0SCoJB5hQ5NNS4GEyniUU5pvPbTbFaGUQ7_4-9AWXVBYyrR0ng99qR9U2uwu7V1I9ChqK4VtmhdMkQr3UbnD7uz8RTUyOKTEGuKk6_2h7bLHcnC5eC3lFVmaDi07Detj8dClGKLHmuCAKGGsfJo0oeo5TiwtQ4nfg1t-t0miGuFg-kjv_7NGO5F-2UGUWNNa0AyxcTRr6y7F249caFYBsvU2fzGH34lOi9qlxH4qgh1Yg4HH7DAmCe7VRr85cxyquGHIJZHk9WlkWwU8HSHEQ59ZZhGdmqAHgVpElQb80v2_NFLBUH0doQIKfX9lKoxxHgH8yqmJk8DL1pYIX6kWheqHREoOkNWUMsm3HT8zYiDp1x-yOPUwrKwyxanExaEHebFIhusWEvKcyBMJSwgOF9MzNc6KRDu5VHK7Rqs68fSc6_jX6at731R-C9cVrO9jabzRXP4rohYU_FNQSuIgRIY0m0CfNbZ_4aJ1o8ulKu8g1rqPBdLTmT1Sag17ZswqtI7qwkEwI")
.build();
Response response = client.newCall(request).execute();
require "uri"
require "net/http"
url = URI("http://wooapi.vxinfosystem.com/wp-json/letscms/v1/address/billing")
https = Net::HTTP.new(url.host, url.port);
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["letscms_token"] = "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJJRCI6IjYiLCJ1c2VyX2xvZ2luIjoidXNlcjAwMSIsInVzZXJfbmljZW5hbWUiOiJ1c2VyMDAxIiwidXNlcl9lbWFpbCI6InVzZXIwMDFAdGVzdC5jb20iLCJ1c2VyX3VybCI6IiIsInVzZXJfcmVnaXN0ZXJlZCI6IjIwMjAtMTAtMTUgMTI6MTc6MTciLCJ1c2VyX2FjdGl2YXRpb25fa2V5IjoiMTYwMjc2NDIzODokUCRCVXFCTVRWdFBRNHVRVWE2ZFNTbzEyamJWSFZvVEwxIiwidXNlcl9zdGF0dXMiOiIwIiwiZGlzcGxheV9uYW1lIjoidXNlcjAwMSB0ZXN0IiwibGFzdF9sb2dpbiI6MTYwODA5NjQ3MH0.JyU-3Y2N6h5ye2m31wf-m7lYStyDwxroEKU3Ko9_4pXwk23rVu_9PdoDXfhFWJKrWlGIjx8byj2ICFdKlLvASjRp6YSlj-VALStZzQawXL8-iXJroMrZjnkK4kNtkYG26TCEmEfbS3L-qTRtq2UYVl9TwJ6hEiTbYe0SCoJB5hQ5NNS4GEyniUU5pvPbTbFaGUQ7_4-9AWXVBYyrR0ng99qR9U2uwu7V1I9ChqK4VtmhdMkQr3UbnD7uz8RTUyOKTEGuKk6_2h7bLHcnC5eC3lFVmaDi07Detj8dClGKLHmuCAKGGsfJo0oeo5TiwtQ4nfg1t-t0miGuFg-kjv_7NGO5F-2UGUWNNa0AyxcTRr6y7F249caFYBsvU2fzGH34lOi9qlxH4qgh1Yg4HH7DAmCe7VRr85cxyquGHIJZHk9WlkWwU8HSHEQ59ZZhGdmqAHgVpElQb80v2_NFLBUH0doQIKfX9lKoxxHgH8yqmJk8DL1pYIX6kWheqHREoOkNWUMsm3HT8zYiDp1x-yOPUwrKwyxanExaEHebFIhusWEvKcyBMJSwgOF9MzNc6KRDu5VHK7Rqs68fSc6_jX6at731R-C9cVrO9jabzRXP4rohYU_FNQSuIgRIY0m0CfNbZ_4aJ1o8ulKu8g1rqPBdLTmT1Sag17ZswqtI7qwkEwI"
form_data = [['first_name', ''],['last_name', ''],['company', 'Letscms'],['email', 'pankajsoni.letscms@gmail.com'],['address_1', 'home'],['address_2', 'test'],['city', 'aligarh'],['state', 'UP'],['postcode', '202001'],['country', 'IN']]
request.set_form form_data, 'multipart/form-data'
response = https.request(request)
puts response.read_body
Success Response
{
"status": true,
"errors": [],
"message": "Address updated successfully."
}
Response Failed
{
"status": false,
"errors": [],
"message": "Please provide letscms_token in header"
}
LETS WOO Update Account Details API
The "Update Account Details" API allow you to update your account details of Customer you can change address password and more.
POST: /wp-json/letscms/v1/account-details
Parameter | Type | Position | # | Description |
---|---|---|---|---|
letscms_token | string |
Headers |
Required |
Letscms Token is generate when user attempt login or register API. |
first_name | string |
body |
Required |
First name of user. |
last_name | string |
body |
Required |
Last name of user. |
display_name | string |
body |
Required |
Display name of user. |
string |
body |
Required |
Email of user . | |
password | string |
body |
Required |
Password of user. |
old_password | string |
body |
Required |
Old Password of user. |
Parameter | letscms_token |
---|---|
Type | string |
Position | Headers |
# | Required |
Description | Letscms Token is generate when user attempt login or register API |
Parameter | first_name |
Type | string |
Position | body |
# | Required |
Description | First name of user. |
Parameter | last_name |
Type | string |
Position | body |
# | Required |
Description | Last name of user. |
Parameter | display_name |
Type | string |
Position | body |
# | Required |
Description | Display name of user. |
Parameter | |
Type | string |
Position | body |
# | Required |
Description | Email of user. |
Parameter | password |
Type | string |
Position | body |
# | Required |
Description | password of user. |
Parameter | old_password |
Type | string |
Position | body |
# | Optinal |
Description | Old password of user. |
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "http://wooapi.vxinfosystem.com/wp-json/letscms/v1/account-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 => "POST",
CURLOPT_POSTFIELDS => array('first_name' => 'testing','last_name' => 'user001','display_name' => 'postman','email' => 'user001@test.com','password' => '1234567890','old_password' => '9876543210'),
CURLOPT_HTTPHEADER => array(
"letscms_token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJJRCI6IjYiLCJ1c2VyX2xvZ2luIjoidXNlcjAwMSIsInVzZXJfbmljZW5hbWUiOiJ1c2VyMDAxIiwidXNlcl9lbWFpbCI6InVzZXIwMDFAdGVzdC5jb20iLCJ1c2VyX3VybCI6IiIsInVzZXJfcmVnaXN0ZXJlZCI6IjIwMjAtMTAtMTUgMTI6MTc6MTciLCJ1c2VyX2FjdGl2YXRpb25fa2V5IjoiMTYwMjc2NDIzODokUCRCVXFCTVRWdFBRNHVRVWE2ZFNTbzEyamJWSFZvVEwxIiwidXNlcl9zdGF0dXMiOiIwIiwiZGlzcGxheV9uYW1lIjoidXNlcjAwMSB0ZXN0IiwibGFzdF9sb2dpbiI6MTYwODA5NjQ3MH0.JyU-3Y2N6h5ye2m31wf-m7lYStyDwxroEKU3Ko9_4pXwk23rVu_9PdoDXfhFWJKrWlGIjx8byj2ICFdKlLvASjRp6YSlj-VALStZzQawXL8-iXJroMrZjnkK4kNtkYG26TCEmEfbS3L-qTRtq2UYVl9TwJ6hEiTbYe0SCoJB5hQ5NNS4GEyniUU5pvPbTbFaGUQ7_4-9AWXVBYyrR0ng99qR9U2uwu7V1I9ChqK4VtmhdMkQr3UbnD7uz8RTUyOKTEGuKk6_2h7bLHcnC5eC3lFVmaDi07Detj8dClGKLHmuCAKGGsfJo0oeo5TiwtQ4nfg1t-t0miGuFg-kjv_7NGO5F-2UGUWNNa0AyxcTRr6y7F249caFYBsvU2fzGH34lOi9qlxH4qgh1Yg4HH7DAmCe7VRr85cxyquGHIJZHk9WlkWwU8HSHEQ59ZZhGdmqAHgVpElQb80v2_NFLBUH0doQIKfX9lKoxxHgH8yqmJk8DL1pYIX6kWheqHREoOkNWUMsm3HT8zYiDp1x-yOPUwrKwyxanExaEHebFIhusWEvKcyBMJSwgOF9MzNc6KRDu5VHK7Rqs68fSc6_jX6at731R-C9cVrO9jabzRXP4rohYU_FNQSuIgRIY0m0CfNbZ_4aJ1o8ulKu8g1rqPBdLTmT1Sag17ZswqtI7qwkEwI"
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var form = new FormData();
form.append("first_name", "testing");
form.append("last_name", "user001");
form.append("display_name", "postman");
form.append("email", "user001@test.com");
form.append("password", "1234567890");
form.append("old_password", "9876543210");
var settings = {
"url": "http://wooapi.vxinfosystem.com/wp-json/letscms/v1/account-details",
"method": "POST",
"timeout": 0,
"headers": {
"letscms_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJJRCI6IjYiLCJ1c2VyX2xvZ2luIjoidXNlcjAwMSIsInVzZXJfbmljZW5hbWUiOiJ1c2VyMDAxIiwidXNlcl9lbWFpbCI6InVzZXIwMDFAdGVzdC5jb20iLCJ1c2VyX3VybCI6IiIsInVzZXJfcmVnaXN0ZXJlZCI6IjIwMjAtMTAtMTUgMTI6MTc6MTciLCJ1c2VyX2FjdGl2YXRpb25fa2V5IjoiMTYwMjc2NDIzODokUCRCVXFCTVRWdFBRNHVRVWE2ZFNTbzEyamJWSFZvVEwxIiwidXNlcl9zdGF0dXMiOiIwIiwiZGlzcGxheV9uYW1lIjoidXNlcjAwMSB0ZXN0IiwibGFzdF9sb2dpbiI6MTYwODA5NjQ3MH0.JyU-3Y2N6h5ye2m31wf-m7lYStyDwxroEKU3Ko9_4pXwk23rVu_9PdoDXfhFWJKrWlGIjx8byj2ICFdKlLvASjRp6YSlj-VALStZzQawXL8-iXJroMrZjnkK4kNtkYG26TCEmEfbS3L-qTRtq2UYVl9TwJ6hEiTbYe0SCoJB5hQ5NNS4GEyniUU5pvPbTbFaGUQ7_4-9AWXVBYyrR0ng99qR9U2uwu7V1I9ChqK4VtmhdMkQr3UbnD7uz8RTUyOKTEGuKk6_2h7bLHcnC5eC3lFVmaDi07Detj8dClGKLHmuCAKGGsfJo0oeo5TiwtQ4nfg1t-t0miGuFg-kjv_7NGO5F-2UGUWNNa0AyxcTRr6y7F249caFYBsvU2fzGH34lOi9qlxH4qgh1Yg4HH7DAmCe7VRr85cxyquGHIJZHk9WlkWwU8HSHEQ59ZZhGdmqAHgVpElQb80v2_NFLBUH0doQIKfX9lKoxxHgH8yqmJk8DL1pYIX6kWheqHREoOkNWUMsm3HT8zYiDp1x-yOPUwrKwyxanExaEHebFIhusWEvKcyBMJSwgOF9MzNc6KRDu5VHK7Rqs68fSc6_jX6at731R-C9cVrO9jabzRXP4rohYU_FNQSuIgRIY0m0CfNbZ_4aJ1o8ulKu8g1rqPBdLTmT1Sag17ZswqtI7qwkEwI"
},
"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': 'http://wooapi.vxinfosystem.com/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O9jabzRXP4rohYU_FNQSuIgRIY0m0CfNbZ_4aJ1o8ulKu8g1rqPBdLTmT1Sag17ZswqtI7qwkEwI'
},
formData: {
'first_name': 'testing',
'last_name': 'user001',
'display_name': 'postman',
'email': 'user001@test.com',
'password': '1234567890',
'old_password': '9876543210'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
url = "http://wooapi.vxinfosystem.com/wp-json/letscms/v1/account-details"
payload = {'first_name': 'testing',
'last_name': 'user001',
'display_name': 'postman',
'email': 'user001@test.com',
'password': '1234567890',
'old_password': '9876543210'}
files = [
]
headers = {
'letscms_token': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJJRCI6IjYiLCJ1c2VyX2xvZ2luIjoidXNlcjAwMSIsInVzZXJfbmljZW5hbWUiOiJ1c2VyMDAxIiwidXNlcl9lbWFpbCI6InVzZXIwMDFAdGVzdC5jb20iLCJ1c2VyX3VybCI6IiIsInVzZXJfcmVnaXN0ZXJlZCI6IjIwMjAtMTAtMTUgMTI6MTc6MTciLCJ1c2VyX2FjdGl2YXRpb25fa2V5IjoiMTYwMjc2NDIzODokUCRCVXFCTVRWdFBRNHVRVWE2ZFNTbzEyamJWSFZvVEwxIiwidXNlcl9zdGF0dXMiOiIwIiwiZGlzcGxheV9uYW1lIjoidXNlcjAwMSB0ZXN0IiwibGFzdF9sb2dpbiI6MTYwODA5NjQ3MH0.JyU-3Y2N6h5ye2m31wf-m7lYStyDwxroEKU3Ko9_4pXwk23rVu_9PdoDXfhFWJKrWlGIjx8byj2ICFdKlLvASjRp6YSlj-VALStZzQawXL8-iXJroMrZjnkK4kNtkYG26TCEmEfbS3L-qTRtq2UYVl9TwJ6hEiTbYe0SCoJB5hQ5NNS4GEyniUU5pvPbTbFaGUQ7_4-9AWXVBYyrR0ng99qR9U2uwu7V1I9ChqK4VtmhdMkQr3UbnD7uz8RTUyOKTEGuKk6_2h7bLHcnC5eC3lFVmaDi07Detj8dClGKLHmuCAKGGsfJo0oeo5TiwtQ4nfg1t-t0miGuFg-kjv_7NGO5F-2UGUWNNa0AyxcTRr6y7F249caFYBsvU2fzGH34lOi9qlxH4qgh1Yg4HH7DAmCe7VRr85cxyquGHIJZHk9WlkWwU8HSHEQ59ZZhGdmqAHgVpElQb80v2_NFLBUH0doQIKfX9lKoxxHgH8yqmJk8DL1pYIX6kWheqHREoOkNWUMsm3HT8zYiDp1x-yOPUwrKwyxanExaEHebFIhusWEvKcyBMJSwgOF9MzNc6KRDu5VHK7Rqs68fSc6_jX6at731R-C9cVrO9jabzRXP4rohYU_FNQSuIgRIY0m0CfNbZ_4aJ1o8ulKu8g1rqPBdLTmT1Sag17ZswqtI7qwkEwI'
}
response = requests.request("POST", url, headers=headers, data = payload, files = files)
print(response.text.encode('utf8'))
var client = new RestClient("http://wooapi.vxinfosystem.com/wp-json/letscms/v1/account-details");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("letscms_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJJRCI6IjYiLCJ1c2VyX2xvZ2luIjoidXNlcjAwMSIsInVzZXJfbmljZW5hbWUiOiJ1c2VyMDAxIiwidXNlcl9lbWFpbCI6InVzZXIwMDFAdGVzdC5jb20iLCJ1c2VyX3VybCI6IiIsInVzZXJfcmVnaXN0ZXJlZCI6IjIwMjAtMTAtMTUgMTI6MTc6MTciLCJ1c2VyX2FjdGl2YXRpb25fa2V5IjoiMTYwMjc2NDIzODokUCRCVXFCTVRWdFBRNHVRVWE2ZFNTbzEyamJWSFZvVEwxIiwidXNlcl9zdGF0dXMiOiIwIiwiZGlzcGxheV9uYW1lIjoidXNlcjAwMSB0ZXN0IiwibGFzdF9sb2dpbiI6MTYwODA5NjQ3MH0.JyU-3Y2N6h5ye2m31wf-m7lYStyDwxroEKU3Ko9_4pXwk23rVu_9PdoDXfhFWJKrWlGIjx8byj2ICFdKlLvASjRp6YSlj-VALStZzQawXL8-iXJroMrZjnkK4kNtkYG26TCEmEfbS3L-qTRtq2UYVl9TwJ6hEiTbYe0SCoJB5hQ5NNS4GEyniUU5pvPbTbFaGUQ7_4-9AWXVBYyrR0ng99qR9U2uwu7V1I9ChqK4VtmhdMkQr3UbnD7uz8RTUyOKTEGuKk6_2h7bLHcnC5eC3lFVmaDi07Detj8dClGKLHmuCAKGGsfJo0oeo5TiwtQ4nfg1t-t0miGuFg-kjv_7NGO5F-2UGUWNNa0AyxcTRr6y7F249caFYBsvU2fzGH34lOi9qlxH4qgh1Yg4HH7DAmCe7VRr85cxyquGHIJZHk9WlkWwU8HSHEQ59ZZhGdmqAHgVpElQb80v2_NFLBUH0doQIKfX9lKoxxHgH8yqmJk8DL1pYIX6kWheqHREoOkNWUMsm3HT8zYiDp1x-yOPUwrKwyxanExaEHebFIhusWEvKcyBMJSwgOF9MzNc6KRDu5VHK7Rqs68fSc6_jX6at731R-C9cVrO9jabzRXP4rohYU_FNQSuIgRIY0m0CfNbZ_4aJ1o8ulKu8g1rqPBdLTmT1Sag17ZswqtI7qwkEwI");
request.AlwaysMultipartFormData = true;
request.AddParameter("first_name", "testing");
request.AddParameter("last_name", "user001");
request.AddParameter("display_name", "postman");
request.AddParameter("email", "user001@test.com");
request.AddParameter("password", "1234567890");
request.AddParameter("old_password", "9876543210");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request POST 'http://wooapi.vxinfosystem.com/wp-json/letscms/v1/account-details' \
--header 'letscms_token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJJRCI6IjYiLCJ1c2VyX2xvZ2luIjoidXNlcjAwMSIsInVzZXJfbmljZW5hbWUiOiJ1c2VyMDAxIiwidXNlcl9lbWFpbCI6InVzZXIwMDFAdGVzdC5jb20iLCJ1c2VyX3VybCI6IiIsInVzZXJfcmVnaXN0ZXJlZCI6IjIwMjAtMTAtMTUgMTI6MTc6MTciLCJ1c2VyX2FjdGl2YXRpb25fa2V5IjoiMTYwMjc2NDIzODokUCRCVXFCTVRWdFBRNHVRVWE2ZFNTbzEyamJWSFZvVEwxIiwidXNlcl9zdGF0dXMiOiIwIiwiZGlzcGxheV9uYW1lIjoidXNlcjAwMSB0ZXN0IiwibGFzdF9sb2dpbiI6MTYwODA5NjQ3MH0.JyU-3Y2N6h5ye2m31wf-m7lYStyDwxroEKU3Ko9_4pXwk23rVu_9PdoDXfhFWJKrWlGIjx8byj2ICFdKlLvASjRp6YSlj-VALStZzQawXL8-iXJroMrZjnkK4kNtkYG26TCEmEfbS3L-qTRtq2UYVl9TwJ6hEiTbYe0SCoJB5hQ5NNS4GEyniUU5pvPbTbFaGUQ7_4-9AWXVBYyrR0ng99qR9U2uwu7V1I9ChqK4VtmhdMkQr3UbnD7uz8RTUyOKTEGuKk6_2h7bLHcnC5eC3lFVmaDi07Detj8dClGKLHmuCAKGGsfJo0oeo5TiwtQ4nfg1t-t0miGuFg-kjv_7NGO5F-2UGUWNNa0AyxcTRr6y7F249caFYBsvU2fzGH34lOi9qlxH4qgh1Yg4HH7DAmCe7VRr85cxyquGHIJZHk9WlkWwU8HSHEQ59ZZhGdmqAHgVpElQb80v2_NFLBUH0doQIKfX9lKoxxHgH8yqmJk8DL1pYIX6kWheqHREoOkNWUMsm3HT8zYiDp1x-yOPUwrKwyxanExaEHebFIhusWEvKcyBMJSwgOF9MzNc6KRDu5VHK7Rqs68fSc6_jX6at731R-C9cVrO9jabzRXP4rohYU_FNQSuIgRIY0m0CfNbZ_4aJ1o8ulKu8g1rqPBdLTmT1Sag17ZswqtI7qwkEwI' \
--form 'first_name=testing' \
--form 'last_name=user001' \
--form 'display_name=postman' \
--form 'email=user001@test.com' \
--form 'password=1234567890' \
--form 'old_password=9876543210'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = new MultipartBody.Builder().setType(MultipartBody.FORM)
.addFormDataPart("first_name", "testing")
.addFormDataPart("last_name", "user001")
.addFormDataPart("display_name", "postman")
.addFormDataPart("email", "user001@test.com")
.addFormDataPart("password", "1234567890")
.addFormDataPart("old_password", "9876543210")
.build();
Request request = new Request.Builder()
.url("http://wooapi.vxinfosystem.com/wp-json/letscms/v1/account-details")
.method("POST", body)
.addHeader("letscms_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJJRCI6IjYiLCJ1c2VyX2xvZ2luIjoidXNlcjAwMSIsInVzZXJfbmljZW5hbWUiOiJ1c2VyMDAxIiwidXNlcl9lbWFpbCI6InVzZXIwMDFAdGVzdC5jb20iLCJ1c2VyX3VybCI6IiIsInVzZXJfcmVnaXN0ZXJlZCI6IjIwMjAtMTAtMTUgMTI6MTc6MTciLCJ1c2VyX2FjdGl2YXRpb25fa2V5IjoiMTYwMjc2NDIzODokUCRCVXFCTVRWdFBRNHVRVWE2ZFNTbzEyamJWSFZvVEwxIiwidXNlcl9zdGF0dXMiOiIwIiwiZGlzcGxheV9uYW1lIjoidXNlcjAwMSB0ZXN0IiwibGFzdF9sb2dpbiI6MTYwODA5NjQ3MH0.JyU-3Y2N6h5ye2m31wf-m7lYStyDwxroEKU3Ko9_4pXwk23rVu_9PdoDXfhFWJKrWlGIjx8byj2ICFdKlLvASjRp6YSlj-VALStZzQawXL8-iXJroMrZjnkK4kNtkYG26TCEmEfbS3L-qTRtq2UYVl9TwJ6hEiTbYe0SCoJB5hQ5NNS4GEyniUU5pvPbTbFaGUQ7_4-9AWXVBYyrR0ng99qR9U2uwu7V1I9ChqK4VtmhdMkQr3UbnD7uz8RTUyOKTEGuKk6_2h7bLHcnC5eC3lFVmaDi07Detj8dClGKLHmuCAKGGsfJo0oeo5TiwtQ4nfg1t-t0miGuFg-kjv_7NGO5F-2UGUWNNa0AyxcTRr6y7F249caFYBsvU2fzGH34lOi9qlxH4qgh1Yg4HH7DAmCe7VRr85cxyquGHIJZHk9WlkWwU8HSHEQ59ZZhGdmqAHgVpElQb80v2_NFLBUH0doQIKfX9lKoxxHgH8yqmJk8DL1pYIX6kWheqHREoOkNWUMsm3HT8zYiDp1x-yOPUwrKwyxanExaEHebFIhusWEvKcyBMJSwgOF9MzNc6KRDu5VHK7Rqs68fSc6_jX6at731R-C9cVrO9jabzRXP4rohYU_FNQSuIgRIY0m0CfNbZ_4aJ1o8ulKu8g1rqPBdLTmT1Sag17ZswqtI7qwkEwI")
.build();
Response response = client.newCall(request).execute();
require "uri"
require "net/http"
url = URI("http://wooapi.vxinfosystem.com/wp-json/letscms/v1/account-details")
https = Net::HTTP.new(url.host, url.port);
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["letscms_token"] = "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJJRCI6IjYiLCJ1c2VyX2xvZ2luIjoidXNlcjAwMSIsInVzZXJfbmljZW5hbWUiOiJ1c2VyMDAxIiwidXNlcl9lbWFpbCI6InVzZXIwMDFAdGVzdC5jb20iLCJ1c2VyX3VybCI6IiIsInVzZXJfcmVnaXN0ZXJlZCI6IjIwMjAtMTAtMTUgMTI6MTc6MTciLCJ1c2VyX2FjdGl2YXRpb25fa2V5IjoiMTYwMjc2NDIzODokUCRCVXFCTVRWdFBRNHVRVWE2ZFNTbzEyamJWSFZvVEwxIiwidXNlcl9zdGF0dXMiOiIwIiwiZGlzcGxheV9uYW1lIjoidXNlcjAwMSB0ZXN0IiwibGFzdF9sb2dpbiI6MTYwODA5NjQ3MH0.JyU-3Y2N6h5ye2m31wf-m7lYStyDwxroEKU3Ko9_4pXwk23rVu_9PdoDXfhFWJKrWlGIjx8byj2ICFdKlLvASjRp6YSlj-VALStZzQawXL8-iXJroMrZjnkK4kNtkYG26TCEmEfbS3L-qTRtq2UYVl9TwJ6hEiTbYe0SCoJB5hQ5NNS4GEyniUU5pvPbTbFaGUQ7_4-9AWXVBYyrR0ng99qR9U2uwu7V1I9ChqK4VtmhdMkQr3UbnD7uz8RTUyOKTEGuKk6_2h7bLHcnC5eC3lFVmaDi07Detj8dClGKLHmuCAKGGsfJo0oeo5TiwtQ4nfg1t-t0miGuFg-kjv_7NGO5F-2UGUWNNa0AyxcTRr6y7F249caFYBsvU2fzGH34lOi9qlxH4qgh1Yg4HH7DAmCe7VRr85cxyquGHIJZHk9WlkWwU8HSHEQ59ZZhGdmqAHgVpElQb80v2_NFLBUH0doQIKfX9lKoxxHgH8yqmJk8DL1pYIX6kWheqHREoOkNWUMsm3HT8zYiDp1x-yOPUwrKwyxanExaEHebFIhusWEvKcyBMJSwgOF9MzNc6KRDu5VHK7Rqs68fSc6_jX6at731R-C9cVrO9jabzRXP4rohYU_FNQSuIgRIY0m0CfNbZ_4aJ1o8ulKu8g1rqPBdLTmT1Sag17ZswqtI7qwkEwI"
form_data = [['first_name', 'testing'],['last_name', 'user001'],['display_name', 'postman'],['email', 'user001@test.com'],['password', '1234567890'],['old_password', '9876543210']]
request.set_form form_data, 'multipart/form-data'
response = https.request(request)
puts response.read_body
Success Response
{
"status": true,
"errors": [],
"message": "Address updated successfully."
}
Response Failed
{
"status": false,
"errors": {
"first_name": "first name is required",
"last_name": "last name is required",
"display_name": "display name is required",
"user_email": "email is required"
},
"message": ""
}
LETS WOO Forgot Password API
The "Forgot Password" API allow you to change user password, this will send new password to user email.
POST: /wp-json/letscms/v1/auth/forgot-password
Parameter | Type | Position | # | Description |
---|---|---|---|---|
username | string |
Body |
Required |
User name of User. |
string |
Body |
Required |
User email. |
Parameter | username |
---|---|
Type | string |
Position | Body |
# | Required |
Description | user name of User. |
Parameter | |
Type | string |
Position | Body |
# | Required |
Description | User email. |
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "http://wooapi.vxinfosystem.com/wp-json/letscms/v1/auth/forgot-password",
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' => 'sonicoolboy'),
CURLOPT_HTTPHEADER => array(
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var form = new FormData();
form.append("username", "sonicoolboy");
var settings = {
"url": "http://wooapi.vxinfosystem.com/wp-json/letscms/v1/auth/forgot-password",
"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': 'http://wooapi.vxinfosystem.com/wp-json/letscms/v1/auth/forgot-password',
'headers': {
},
formData: {
'username': 'sonicoolboy'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
url = "http://wooapi.vxinfosystem.com/wp-json/letscms/v1/auth/forgot-password"
payload = {'username': 'sonicoolboy'}
files = [
]
headers = {
}
response = requests.request("POST", url, headers=headers, data = payload, files = files)
print(response.text.encode('utf8'))
var client = new RestClient("http://wooapi.vxinfosystem.com/wp-json/letscms/v1/auth/forgot-password");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AlwaysMultipartFormData = true;
request.AddParameter("username", "sonicoolboy");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request POST 'http://wooapi.vxinfosystem.com/wp-json/letscms/v1/auth/forgot-password' \
--form 'username=sonicoolboy'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = new MultipartBody.Builder().setType(MultipartBody.FORM)
.addFormDataPart("username", "sonicoolboy")
.build();
Request request = new Request.Builder()
.url("http://wooapi.vxinfosystem.com/wp-json/letscms/v1/auth/forgot-password")
.method("POST", body)
.build();
Response response = client.newCall(request).execute();
require "uri"
require "net/http"
url = URI("http://wooapi.vxinfosystem.com/wp-json/letscms/v1/auth/forgot-password")
https = Net::HTTP.new(url.host, url.port);
https.use_ssl = true
request = Net::HTTP::Post.new(url)
form_data = [['username', 'sonicoolboy']]
request.set_form form_data, 'multipart/form-data'
response = https.request(request)
puts response.read_body
Response Success
{
"status": true,
"errors": [],
"message": "New password sent your email."
}
Response Failed
{
"status": false,
"errors": {
"username": "username is required."
"username": "Inavalid Email or username"
},
"message": ""
}
LETS WOO Categories API
The "Categories" API allow you to get Categories list, this will return you Categories list of product.
GET: /wp-json/letscms/v1/categories
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "http://wooapi.vxinfosystem.com/wp-json/letscms/v1/categories",
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",
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var settings = {
"url": "http://wooapi.vxinfosystem.com/wp-json/letscms/v1/categories",
"method": "GET",
"timeout": 0,
};
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require('request');
var options = {
'method': 'GET',
'url': 'http://wooapi.vxinfosystem.com/wp-json/letscms/v1/categories',
'headers': {
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
url = "http://wooapi.vxinfosystem.com/wp-json/letscms/v1/categories"
payload = {}
headers= {}
response = requests.request("GET", url, headers=headers, data = payload)
print(response.text.encode('utf8'))
var client = new RestClient("http://wooapi.vxinfosystem.com/wp-json/letscms/v1/categories");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request GET 'http://wooapi.vxinfosystem.com/wp-json/letscms/v1/categories'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("http://wooapi.vxinfosystem.com/wp-json/letscms/v1/categories")
.method("GET", null)
.build();
Response response = client.newCall(request).execute();
require "uri"
require "net/http"
url = URI("http://wooapi.vxinfosystem.com/wp-json/letscms/v1/categories")
https = Net::HTTP.new(url.host, url.port);
https.use_ssl = true
request = Net::HTTP::Get.new(url)
response = https.request(request)
puts response.read_body
Success Response
{
"status": true,
"errors": [],
"message": "",
"data": {
"categories": [
{
"id": 16,
"name": "Accessories",
"image": "http://local.host/wp/fmw/wp-content/uploads/2020/08/accessories.jpg",
"slug": "asdfsdfsdfsdfsadf",
"children": [
{
"id": 20,
"name": "sub-cat 1",
"image": "http://local.host/wp/fmw/wp-content/uploads/2020/08/tshirts.jpg",
"slug": "bjkghjkhjk",
"children": [
{
"id": 21,
"name": "sub-cat 2",
"image": "http://local.host/wp/fmw/wp-content/uploads/2020/08/hoodies.jpg",
"slug": "hjkjhkjhk",
"children": []
}
]
}
]
},
.
.
.
.
]
}
}
LETS WOO Checkout data API
The "Checkout data" API allow you to Get Cart Products, cart totals, billing address, customers etc, this will return you user Cart Products, cart totals, billing address, customers etc.
POST: /wp-json/letscms/v1/checkout?coupons[]=GET15&coupons[]=GET50
Parameter | Type | Position | # | Description |
---|---|---|---|---|
letscms_token | string |
Headers |
Required |
Letscms Token is generate when user attempt login or register API. |
coupons | string |
Params |
Optional |
Array of coupons like coupons[]=GET15&coupons[]=GET50. |
Parameter | letscms_token |
---|---|
Type | string |
Position | Headers |
# | Required |
Description | Letscms Token is generate when user attempt login or register API |
Parameter | coupons |
Type | string |
Position | Params |
# | Optional |
Description | Array of coupons like coupons[]=GET15&coupons[]=GET50. |
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "http://wooapi.vxinfosystem.com/wp-json/letscms/v1/checkout?coupons%5B%5D=GET15&coupons%5B%5D=GET50",
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: eyJ0eXAiOi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Ku8g1rqPBdLTmT1Sag17ZswqtI7qwkEwI"
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var settings = {
"url": "http://wooapi.vxinfosystem.com/wp-json/letscms/v1/checkout?coupons[]=GET15&coupons[]=GET50",
"method": "GET",
"timeout": 0,
"headers": {
"letscms_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJJRCI6IjYiLCJ1c2VyX2xvZ2luIjoidXNlcjAwMSIsInVzZXJfbmljZW5hbWUiOiJ1c2VyMDAxIiwidXNlcl9lbWFpbCI6InVzZXIwMDFAdGVzdC5jb20iLCJ1c2VyX3VybCI6IiIsInVzZXJfcmVnaXN0ZXJlZCI6IjIwMjAtMTAtMTUgMTI6MTc6MTciLCJ1c2VyX2FjdGl2YXRpb25fa2V5IjoiMTYwMjc2NDIzODokUCRCVXFCTVRWdFBRNHVRVWE2ZFNTbzEyamJWSFZvVEwxIiwidXNlcl9zdGF0dXMiOiIwIiwiZGlzcGxheV9uYW1lIjoidXNlcjAwMSB0ZXN0IiwibGFzdF9sb2dpbiI6MTYwODA5NjQ3MH0.JyU-3Y2N6h5ye2m31wf-m7lYStyDwxroEKU3Ko9_4pXwk23rVu_9PdoDXfhFWJKrWlGIjx8byj2ICFdKlLvASjRp6YSlj-VALStZzQawXL8-iXJroMrZjnkK4kNtkYG26TCEmEfbS3L-qTRtq2UYVl9TwJ6hEiTbYe0SCoJB5hQ5NNS4GEyniUU5pvPbTbFaGUQ7_4-9AWXVBYyrR0ng99qR9U2uwu7V1I9ChqK4VtmhdMkQr3UbnD7uz8RTUyOKTEGuKk6_2h7bLHcnC5eC3lFVmaDi07Detj8dClGKLHmuCAKGGsfJo0oeo5TiwtQ4nfg1t-t0miGuFg-kjv_7NGO5F-2UGUWNNa0AyxcTRr6y7F249caFYBsvU2fzGH34lOi9qlxH4qgh1Yg4HH7DAmCe7VRr85cxyquGHIJZHk9WlkWwU8HSHEQ59ZZhGdmqAHgVpElQb80v2_NFLBUH0doQIKfX9lKoxxHgH8yqmJk8DL1pYIX6kWheqHREoOkNWUMsm3HT8zYiDp1x-yOPUwrKwyxanExaEHebFIhusWEvKcyBMJSwgOF9MzNc6KRDu5VHK7Rqs68fSc6_jX6at731R-C9cVrO9jabzRXP4rohYU_FNQSuIgRIY0m0CfNbZ_4aJ1o8ulKu8g1rqPBdLTmT1Sag17ZswqtI7qwkEwI"
},
};
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require('request');
var options = {
'method': 'GET',
'url': 'http://wooapi.vxinfosystem.com/wp-json/letscms/v1/checkout?coupons[]=GET15&coupons[]=GET50',
'headers': {
'letscms_token': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJJRCI6IjYiLCJ1c2VyX2xvZ2luIjoidXNlcjAwMSIsInVzZXJfbmljZW5hbWUiOiJ1c2VyMDAxIiwidXNlcl9lbWFpbCI6InVzZXIwMDFAdGVzdC5jb20iLCJ1c2VyX3VybCI6IiIsInVzZXJfcmVnaXN0ZXJlZCI6IjIwMjAtMTAtMTUgMTI6MTc6MTciLCJ1c2VyX2FjdGl2YXRpb25fa2V5IjoiMTYwMjc2NDIzODokUCRCVXFCTVRWdFBRNHVRVWE2ZFNTbzEyamJWSFZvVEwxIiwidXNlcl9zdGF0dXMiOiIwIiwiZGlzcGxheV9uYW1lIjoidXNlcjAwMSB0ZXN0IiwibGFzdF9sb2dpbiI6MTYwODA5NjQ3MH0.JyU-3Y2N6h5ye2m31wf-m7lYStyDwxroEKU3Ko9_4pXwk23rVu_9PdoDXfhFWJKrWlGIjx8byj2ICFdKlLvASjRp6YSlj-VALStZzQawXL8-iXJroMrZjnkK4kNtkYG26TCEmEfbS3L-qTRtq2UYVl9TwJ6hEiTbYe0SCoJB5hQ5NNS4GEyniUU5pvPbTbFaGUQ7_4-9AWXVBYyrR0ng99qR9U2uwu7V1I9ChqK4VtmhdMkQr3UbnD7uz8RTUyOKTEGuKk6_2h7bLHcnC5eC3lFVmaDi07Detj8dClGKLHmuCAKGGsfJo0oeo5TiwtQ4nfg1t-t0miGuFg-kjv_7NGO5F-2UGUWNNa0AyxcTRr6y7F249caFYBsvU2fzGH34lOi9qlxH4qgh1Yg4HH7DAmCe7VRr85cxyquGHIJZHk9WlkWwU8HSHEQ59ZZhGdmqAHgVpElQb80v2_NFLBUH0doQIKfX9lKoxxHgH8yqmJk8DL1pYIX6kWheqHREoOkNWUMsm3HT8zYiDp1x-yOPUwrKwyxanExaEHebFIhusWEvKcyBMJSwgOF9MzNc6KRDu5VHK7Rqs68fSc6_jX6at731R-C9cVrO9jabzRXP4rohYU_FNQSuIgRIY0m0CfNbZ_4aJ1o8ulKu8g1rqPBdLTmT1Sag17ZswqtI7qwkEwI'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
url = "http://wooapi.vxinfosystem.com/wp-json/letscms/v1/checkout?coupons[]=GET15&coupons[]=GET50"
payload = {}
headers = {
'letscms_token': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJJRCI6IjYiLCJ1c2VyX2xvZ2luIjoidXNlcjAwMSIsInVzZXJfbmljZW5hbWUiOiJ1c2VyMDAxIiwidXNlcl9lbWFpbCI6InVzZXIwMDFAdGVzdC5jb20iLCJ1c2VyX3VybCI6IiIsInVzZXJfcmVnaXN0ZXJlZCI6IjIwMjAtMTAtMTUgMTI6MTc6MTciLCJ1c2VyX2FjdGl2YXRpb25fa2V5IjoiMTYwMjc2NDIzODokUCRCVXFCTVRWdFBRNHVRVWE2ZFNTbzEyamJWSFZvVEwxIiwidXNlcl9zdGF0dXMiOiIwIiwiZGlzcGxheV9uYW1lIjoidXNlcjAwMSB0ZXN0IiwibGFzdF9sb2dpbiI6MTYwODA5NjQ3MH0.JyU-3Y2N6h5ye2m31wf-m7lYStyDwxroEKU3Ko9_4pXwk23rVu_9PdoDXfhFWJKrWlGIjx8byj2ICFdKlLvASjRp6YSlj-VALStZzQawXL8-iXJroMrZjnkK4kNtkYG26TCEmEfbS3L-qTRtq2UYVl9TwJ6hEiTbYe0SCoJB5hQ5NNS4GEyniUU5pvPbTbFaGUQ7_4-9AWXVBYyrR0ng99qR9U2uwu7V1I9ChqK4VtmhdMkQr3UbnD7uz8RTUyOKTEGuKk6_2h7bLHcnC5eC3lFVmaDi07Detj8dClGKLHmuCAKGGsfJo0oeo5TiwtQ4nfg1t-t0miGuFg-kjv_7NGO5F-2UGUWNNa0AyxcTRr6y7F249caFYBsvU2fzGH34lOi9qlxH4qgh1Yg4HH7DAmCe7VRr85cxyquGHIJZHk9WlkWwU8HSHEQ59ZZhGdmqAHgVpElQb80v2_NFLBUH0doQIKfX9lKoxxHgH8yqmJk8DL1pYIX6kWheqHREoOkNWUMsm3HT8zYiDp1x-yOPUwrKwyxanExaEHebFIhusWEvKcyBMJSwgOF9MzNc6KRDu5VHK7Rqs68fSc6_jX6at731R-C9cVrO9jabzRXP4rohYU_FNQSuIgRIY0m0CfNbZ_4aJ1o8ulKu8g1rqPBdLTmT1Sag17ZswqtI7qwkEwI'
}
response = requests.request("GET", url, headers=headers, data = payload)
print(response.text.encode('utf8'))
var client = new RestClient("http://wooapi.vxinfosystem.com/wp-json/letscms/v1/checkout?coupons[]=GET15&coupons[]=GET50");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("letscms_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJJRCI6IjYiLCJ1c2VyX2xvZ2luIjoidXNlcjAwMSIsInVzZXJfbmljZW5hbWUiOiJ1c2VyMDAxIiwidXNlcl9lbWFpbCI6InVzZXIwMDFAdGVzdC5jb20iLCJ1c2VyX3VybCI6IiIsInVzZXJfcmVnaXN0ZXJlZCI6IjIwMjAtMTAtMTUgMTI6MTc6MTciLCJ1c2VyX2FjdGl2YXRpb25fa2V5IjoiMTYwMjc2NDIzODokUCRCVXFCTVRWdFBRNHVRVWE2ZFNTbzEyamJWSFZvVEwxIiwidXNlcl9zdGF0dXMiOiIwIiwiZGlzcGxheV9uYW1lIjoidXNlcjAwMSB0ZXN0IiwibGFzdF9sb2dpbiI6MTYwODA5NjQ3MH0.JyU-3Y2N6h5ye2m31wf-m7lYStyDwxroEKU3Ko9_4pXwk23rVu_9PdoDXfhFWJKrWlGIjx8byj2ICFdKlLvASjRp6YSlj-VALStZzQawXL8-iXJroMrZjnkK4kNtkYG26TCEmEfbS3L-qTRtq2UYVl9TwJ6hEiTbYe0SCoJB5hQ5NNS4GEyniUU5pvPbTbFaGUQ7_4-9AWXVBYyrR0ng99qR9U2uwu7V1I9ChqK4VtmhdMkQr3UbnD7uz8RTUyOKTEGuKk6_2h7bLHcnC5eC3lFVmaDi07Detj8dClGKLHmuCAKGGsfJo0oeo5TiwtQ4nfg1t-t0miGuFg-kjv_7NGO5F-2UGUWNNa0AyxcTRr6y7F249caFYBsvU2fzGH34lOi9qlxH4qgh1Yg4HH7DAmCe7VRr85cxyquGHIJZHk9WlkWwU8HSHEQ59ZZhGdmqAHgVpElQb80v2_NFLBUH0doQIKfX9lKoxxHgH8yqmJk8DL1pYIX6kWheqHREoOkNWUMsm3HT8zYiDp1x-yOPUwrKwyxanExaEHebFIhusWEvKcyBMJSwgOF9MzNc6KRDu5VHK7Rqs68fSc6_jX6at731R-C9cVrO9jabzRXP4rohYU_FNQSuIgRIY0m0CfNbZ_4aJ1o8ulKu8g1rqPBdLTmT1Sag17ZswqtI7qwkEwI");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request GET 'http://wooapi.vxinfosystem.com/wp-json/letscms/v1/checkout?coupons[]=GET15&coupons[]=GET50' \
--header 'letscms_token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJJRCI6IjYiLCJ1c2VyX2xvZ2luIjoidXNlcjAwMSIsInVzZXJfbmljZW5hbWUiOiJ1c2VyMDAxIiwidXNlcl9lbWFpbCI6InVzZXIwMDFAdGVzdC5jb20iLCJ1c2VyX3VybCI6IiIsInVzZXJfcmVnaXN0ZXJlZCI6IjIwMjAtMTAtMTUgMTI6MTc6MTciLCJ1c2VyX2FjdGl2YXRpb25fa2V5IjoiMTYwMjc2NDIzODokUCRCVXFCTVRWdFBRNHVRVWE2ZFNTbzEyamJWSFZvVEwxIiwidXNlcl9zdGF0dXMiOiIwIiwiZGlzcGxheV9uYW1lIjoidXNlcjAwMSB0ZXN0IiwibGFzdF9sb2dpbiI6MTYwODA5NjQ3MH0.JyU-3Y2N6h5ye2m31wf-m7lYStyDwxroEKU3Ko9_4pXwk23rVu_9PdoDXfhFWJKrWlGIjx8byj2ICFdKlLvASjRp6YSlj-VALStZzQawXL8-iXJroMrZjnkK4kNtkYG26TCEmEfbS3L-qTRtq2UYVl9TwJ6hEiTbYe0SCoJB5hQ5NNS4GEyniUU5pvPbTbFaGUQ7_4-9AWXVBYyrR0ng99qR9U2uwu7V1I9ChqK4VtmhdMkQr3UbnD7uz8RTUyOKTEGuKk6_2h7bLHcnC5eC3lFVmaDi07Detj8dClGKLHmuCAKGGsfJo0oeo5TiwtQ4nfg1t-t0miGuFg-kjv_7NGO5F-2UGUWNNa0AyxcTRr6y7F249caFYBsvU2fzGH34lOi9qlxH4qgh1Yg4HH7DAmCe7VRr85cxyquGHIJZHk9WlkWwU8HSHEQ59ZZhGdmqAHgVpElQb80v2_NFLBUH0doQIKfX9lKoxxHgH8yqmJk8DL1pYIX6kWheqHREoOkNWUMsm3HT8zYiDp1x-yOPUwrKwyxanExaEHebFIhusWEvKcyBMJSwgOF9MzNc6KRDu5VHK7Rqs68fSc6_jX6at731R-C9cVrO9jabzRXP4rohYU_FNQSuIgRIY0m0CfNbZ_4aJ1o8ulKu8g1rqPBdLTmT1Sag17ZswqtI7qwkEwI'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("http://wooapi.vxinfosystem.com/wp-json/letscms/v1/checkout?coupons[]=GET15&coupons[]=GET50")
.method("GET", null)
.addHeader("letscms_token", "eyJ0eXAiOiJKV1Q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rqPBdLTmT1Sag17ZswqtI7qwkEwI")
.build();
Response response = client.newCall(request).execute();
require "uri"
require "net/http"
url = URI("http://wooapi.vxinfosystem.com/wp-json/letscms/v1/checkout?coupons[]=GET15&coupons[]=GET50")
https = Net::HTTP.new(url.host, url.port);
https.use_ssl = true
request = Net::HTTP::Get.new(url)
request["letscms_token"] = "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJJRCI6IjYiLCJ1c2VyX2xvZ2luIjoidXNlcjAwMSIsInVzZXJfbmljZW5hbWUiOiJ1c2VyMDAxIiwidXNlcl9lbWFpbCI6InVzZXIwMDFAdGVzdC5jb20iLCJ1c2VyX3VybCI6IiIsInVzZXJfcmVnaXN0ZXJlZCI6IjIwMjAtMTAtMTUgMTI6MTc6MTciLCJ1c2VyX2FjdGl2YXRpb25fa2V5IjoiMTYwMjc2NDIzODokUCRCVXFCTVRWdFBRNHVRVWE2ZFNTbzEyamJWSFZvVEwxIiwidXNlcl9zdGF0dXMiOiIwIiwiZGlzcGxheV9uYW1lIjoidXNlcjAwMSB0ZXN0IiwibGFzdF9sb2dpbiI6MTYwODA5NjQ3MH0.JyU-3Y2N6h5ye2m31wf-m7lYStyDwxroEKU3Ko9_4pXwk23rVu_9PdoDXfhFWJKrWlGIjx8byj2ICFdKlLvASjRp6YSlj-VALStZzQawXL8-iXJroMrZjnkK4kNtkYG26TCEmEfbS3L-qTRtq2UYVl9TwJ6hEiTbYe0SCoJB5hQ5NNS4GEyniUU5pvPbTbFaGUQ7_4-9AWXVBYyrR0ng99qR9U2uwu7V1I9ChqK4VtmhdMkQr3UbnD7uz8RTUyOKTEGuKk6_2h7bLHcnC5eC3lFVmaDi07Detj8dClGKLHmuCAKGGsfJo0oeo5TiwtQ4nfg1t-t0miGuFg-kjv_7NGO5F-2UGUWNNa0AyxcTRr6y7F249caFYBsvU2fzGH34lOi9qlxH4qgh1Yg4HH7DAmCe7VRr85cxyquGHIJZHk9WlkWwU8HSHEQ59ZZhGdmqAHgVpElQb80v2_NFLBUH0doQIKfX9lKoxxHgH8yqmJk8DL1pYIX6kWheqHREoOkNWUMsm3HT8zYiDp1x-yOPUwrKwyxanExaEHebFIhusWEvKcyBMJSwgOF9MzNc6KRDu5VHK7Rqs68fSc6_jX6at731R-C9cVrO9jabzRXP4rohYU_FNQSuIgRIY0m0CfNbZ_4aJ1o8ulKu8g1rqPBdLTmT1Sag17ZswqtI7qwkEwI"
response = https.request(request)
puts response.read_body
Success Response
{
"status": true,
"errors": [],
"message": "",
"coupon_status": false,
"coupon_errors": {
"GET50": "Coupon \"get50\" is Expired!"
},
"data": {
"cart_items": [
{
"key": "3fe94a002317b5f9259f82690aeea4cd",
"product_id": "316",
"variation_id": 0,
"variation": [],
"quantity": "10",
"data_hash": "b5c1d5ca8bae6d4896cf1807cdf763f0",
"line_tax_data": {
"subtotal": [],
"total": []
},
"line_subtotal": 150,
"line_subtotal_tax": 0,
"line_total": 150,
"line_tax": 0,
"product_name": "Ship Your Idea",
"product_price": "15",
"product_image": "http://local.host/wp/fmw/wp-content/uploads/2020/10/poster_1_up.jpg"
}
],
"cart_totals": {
"subtotal": 150,
"subtotal_tax": 0,
"shipping_total": "0.00",
"shipping_tax": 0,
"shipping_taxes": [],
"discount_total": 75,
"discount_tax": 0,
"cart_contents_total": 150,
"cart_contents_tax": 0,
"cart_contents_taxes": [],
"fee_total": "0.00",
"fee_tax": 0,
"fee_taxes": [],
"total": 75,
"total_tax": 0
},
"coupon_discount_totals": {
"GET15": 75
},
"customer": {
"id": "5",
"postcode": "202001",
"city": "aligarh",
"address_1": "test",
"address": "test",
"address_2": "",
"state": "up",
"country": "IN",
"shipping_postcode": "DS",
"shipping_city": "ds",
"shipping_address_1": "ds",
"shipping_address": "",
"shipping_address_2": "sd",
"shipping_state": "",
"shipping_country": "AF",
"first_name": "pankaj",
"last_name": "soni",
"company": "letscms",
"phone": "1234567890",
"email": "pankajsoni.letscms@gmail.com",
"shipping_first_name": "dsd",
"shipping_last_name": "sds",
"shipping_company": "sd"
},
"payment_gateways": {
"cod": {
"enabled": "yes",
"title": "Cash on delivery",
"description": "Pay with cash upon delivery.",
"instructions": "Pay with cash upon delivery.",
"enable_for_methods": [],
"enable_for_virtual": "yes"
},
"stripe": {
"apple_pay_domain_set": "yes",
"enabled": "yes",
"title": "Credit Card (Stripe)",
"description": "Pay with your credit card via Stripe.",
"testmode": "yes",
"test_publishable_key": "pk_test_WExKaur4gKd8B5LBh8snFLAQ006hjMYBIu",
"test_secret_key": "sk_test_y6sWTsaDUd3xXBm3MpkRcQjI00xYhRPmOK",
"test_webhook_secret": "",
"publishable_key": "",
"secret_key": "",
"webhook_secret": "",
"inline_cc_form": "no",
"statement_descriptor": "",
"capture": "yes",
"payment_request": "yes",
"payment_request_button_type": "buy",
"payment_request_button_theme": "dark",
"payment_request_button_height": "44",
"payment_request_button_label": "Buy now",
"payment_request_button_branded_type": "long",
"saved_cards": "yes",
"logging": "no"
}
},
"shipping_charge": 0,
"countries": {
"AF": "Afghanistan",
"AX": "Åland Islands",
.
.
.
"EH": "Western Sahara",
"YE": "Yemen",
"ZM": "Zambia",
"ZW": "Zimbabwe"
},
"default_country": "IN",
"states": {
"AF": [],
"AO": {
"BGO": "Bengo",
"BLU": "Benguela",
"BIE": "Bié",
"CAB": "Cabinda",
"CNN": "Cunene",
"HUA": "Huambo",
"HUI": "Huíla",
"CCU": "Kuando Kubango",
"CNO": "Kwanza-Norte",
"CUS": "Kwanza-Sul",
"LUA": "Luanda",
"LNO": "Lunda-Norte",
"LSU": "Lunda-Sul",
"MAL": "Malanje",
"MOX": "Moxico",
"NAM": "Namibe",
"UIG": "Uíge",
"ZAI": "Zaire"
},
.
.
.
"ZM": {
"ZM-01": "Western",
"ZM-02": "Central",
"ZM-03": "Eastern",
"ZM-04": "Luapula",
"ZM-05": "Northern",
"ZM-06": "North-Western",
"ZM-07": "Southern",
"ZM-08": "Copperbelt",
"ZM-09": "Lusaka",
"ZM-10": "Muchinga"
}
},
"currency": "₹"
}
}
Response Failed
{
"status": false,
"errors": [],
"message": "Cart is Empty!"
}
LETS WOO Create Review API
The "Create Review" API allow you to Post a Product review, this will return you your review is post or not.
POST: /wp-json/letscms/v1/review/create
Parameter | Type | Position | # | Description |
---|---|---|---|---|
letscms_token | string |
Headers |
Required |
Letscms Token is generate when user attempt login or register API. |
rating | String |
Body |
Required |
Rating of product . |
product_id | Integer |
Body |
Required |
product id. |
review | String |
Body |
Required |
Review of product. |
Parameter | letscms_token |
---|---|
Type | string |
Position | Headers |
# | Required |
Description | Letscms Token is generate when user attempt login or register API |
Parameter | rating |
Type | String |
Position | Body |
# | Required |
Description | Rating of product . |
Parameter | product_id |
Type | Integer |
Position | Body |
# | Required |
Description | product id. |
Parameter | review |
Type | String |
Position | Body |
# | Required |
Description | Review of product. |
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "http://wooapi.vxinfosystem.com/wp-json/letscms/v1/review/create",
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('rating' => '5','review' => 'this is api test','product_id' => '5454'),
CURLOPT_HTTPHEADER => array(
"letscms_token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJJRCI6IjYiLCJ1c2VyX2xvZ2luIjoidXNlcjAwMSIsInVzZXJfbmljZW5hbWUiOiJ1c2VyMDAxIiwidXNlcl9lbWFpbCI6InVzZXIwMDFAdGVzdC5jb20iLCJ1c2VyX3VybCI6IiIsInVzZXJfcmVnaXN0ZXJlZCI6IjIwMjAtMTAtMTUgMTI6MTc6MTciLCJ1c2VyX2FjdGl2YXRpb25fa2V5IjoiMTYwMjc2NDIzODokUCRCVXFCTVRWdFBRNHVRVWE2ZFNTbzEyamJWSFZvVEwxIiwidXNlcl9zdGF0dXMiOiIwIiwiZGlzcGxheV9uYW1lIjoidXNlcjAwMSB0ZXN0IiwibGFzdF9sb2dpbiI6MTYwODA5NjQ3MH0.JyU-3Y2N6h5ye2m31wf-m7lYStyDwxroEKU3Ko9_4pXwk23rVu_9PdoDXfhFWJKrWlGIjx8byj2ICFdKlLvASjRp6YSlj-VALStZzQawXL8-iXJroMrZjnkK4kNtkYG26TCEmEfbS3L-qTRtq2UYVl9TwJ6hEiTbYe0SCoJB5hQ5NNS4GEyniUU5pvPbTbFaGUQ7_4-9AWXVBYyrR0ng99qR9U2uwu7V1I9ChqK4VtmhdMkQr3UbnD7uz8RTUyOKTEGuKk6_2h7bLHcnC5eC3lFVmaDi07Detj8dClGKLHmuCAKGGsfJo0oeo5TiwtQ4nfg1t-t0miGuFg-kjv_7NGO5F-2UGUWNNa0AyxcTRr6y7F249caFYBsvU2fzGH34lOi9qlxH4qgh1Yg4HH7DAmCe7VRr85cxyquGHIJZHk9WlkWwU8HSHEQ59ZZhGdmqAHgVpElQb80v2_NFLBUH0doQIKfX9lKoxxHgH8yqmJk8DL1pYIX6kWheqHREoOkNWUMsm3HT8zYiDp1x-yOPUwrKwyxanExaEHebFIhusWEvKcyBMJSwgOF9MzNc6KRDu5VHK7Rqs68fSc6_jX6at731R-C9cVrO9jabzRXP4rohYU_FNQSuIgRIY0m0CfNbZ_4aJ1o8ulKu8g1rqPBdLTmT1Sag17ZswqtI7qwkEwI"
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var form = new FormData();
form.append("rating", "5");
form.append("review", "this is api test");
form.append("product_id", "5454");
var settings = {
"url": "http://wooapi.vxinfosystem.com/wp-json/letscms/v1/review/create",
"method": "POST",
"timeout": 0,
"headers": {
"letscms_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJJRCI6IjYiLCJ1c2VyX2xvZ2luIjoidXNlcjAwMSIsInVzZXJfbmljZW5hbWUiOiJ1c2VyMDAxIiwidXNlcl9lbWFpbCI6InVzZXIwMDFAdGVzdC5jb20iLCJ1c2VyX3VybCI6IiIsInVzZXJfcmVnaXN0ZXJlZCI6IjIwMjAtMTAtMTUgMTI6MTc6MTciLCJ1c2VyX2FjdGl2YXRpb25fa2V5IjoiMTYwMjc2NDIzODokUCRCVXFCTVRWdFBRNHVRVWE2ZFNTbzEyamJWSFZvVEwxIiwidXNlcl9zdGF0dXMiOiIwIiwiZGlzcGxheV9uYW1lIjoidXNlcjAwMSB0ZXN0IiwibGFzdF9sb2dpbiI6MTYwODA5NjQ3MH0.JyU-3Y2N6h5ye2m31wf-m7lYStyDwxroEKU3Ko9_4pXwk23rVu_9PdoDXfhFWJKrWlGIjx8byj2ICFdKlLvASjRp6YSlj-VALStZzQawXL8-iXJroMrZjnkK4kNtkYG26TCEmEfbS3L-qTRtq2UYVl9TwJ6hEiTbYe0SCoJB5hQ5NNS4GEyniUU5pvPbTbFaGUQ7_4-9AWXVBYyrR0ng99qR9U2uwu7V1I9ChqK4VtmhdMkQr3UbnD7uz8RTUyOKTEGuKk6_2h7bLHcnC5eC3lFVmaDi07Detj8dClGKLHmuCAKGGsfJo0oeo5TiwtQ4nfg1t-t0miGuFg-kjv_7NGO5F-2UGUWNNa0AyxcTRr6y7F249caFYBsvU2fzGH34lOi9qlxH4qgh1Yg4HH7DAmCe7VRr85cxyquGHIJZHk9WlkWwU8HSHEQ59ZZhGdmqAHgVpElQb80v2_NFLBUH0doQIKfX9lKoxxHgH8yqmJk8DL1pYIX6kWheqHREoOkNWUMsm3HT8zYiDp1x-yOPUwrKwyxanExaEHebFIhusWEvKcyBMJSwgOF9MzNc6KRDu5VHK7Rqs68fSc6_jX6at731R-C9cVrO9jabzRXP4rohYU_FNQSuIgRIY0m0CfNbZ_4aJ1o8ulKu8g1rqPBdLTmT1Sag17ZswqtI7qwkEwI"
},
"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': 'http://wooapi.vxinfosystem.com/wp-json/letscms/v1/review/create',
'headers': {
'letscms_token': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJJRCI6IjYiLCJ1c2VyX2xvZ2luIjoidXNlcjAwMSIsInVzZXJfbmljZW5hbWUiOiJ1c2VyMDAxIiwidXNlcl9lbWFpbCI6InVzZXIwMDFAdGVzdC5jb20iLCJ1c2VyX3VybCI6IiIsInVzZXJfcmVnaXN0ZXJlZCI6IjIwMjAtMTAtMTUgMTI6MTc6MTciLCJ1c2VyX2FjdGl2YXRpb25fa2V5IjoiMTYwMjc2NDIzODokUCRCVXFCTVRWdFBRNHVRVWE2ZFNTbzEyamJWSFZvVEwxIiwidXNlcl9zdGF0dXMiOiIwIiwiZGlzcGxheV9uYW1lIjoidXNlcjAwMSB0ZXN0IiwibGFzdF9sb2dpbiI6MTYwODA5NjQ3MH0.JyU-3Y2N6h5ye2m31wf-m7lYStyDwxroEKU3Ko9_4pXwk23rVu_9PdoDXfhFWJKrWlGIjx8byj2ICFdKlLvASjRp6YSlj-VALStZzQawXL8-iXJroMrZjnkK4kNtkYG26TCEmEfbS3L-qTRtq2UYVl9TwJ6hEiTbYe0SCoJB5hQ5NNS4GEyniUU5pvPbTbFaGUQ7_4-9AWXVBYyrR0ng99qR9U2uwu7V1I9ChqK4VtmhdMkQr3UbnD7uz8RTUyOKTEGuKk6_2h7bLHcnC5eC3lFVmaDi07Detj8dClGKLHmuCAKGGsfJo0oeo5TiwtQ4nfg1t-t0miGuFg-kjv_7NGO5F-2UGUWNNa0AyxcTRr6y7F249caFYBsvU2fzGH34lOi9qlxH4qgh1Yg4HH7DAmCe7VRr85cxyquGHIJZHk9WlkWwU8HSHEQ59ZZhGdmqAHgVpElQb80v2_NFLBUH0doQIKfX9lKoxxHgH8yqmJk8DL1pYIX6kWheqHREoOkNWUMsm3HT8zYiDp1x-yOPUwrKwyxanExaEHebFIhusWEvKcyBMJSwgOF9MzNc6KRDu5VHK7Rqs68fSc6_jX6at731R-C9cVrO9jabzRXP4rohYU_FNQSuIgRIY0m0CfNbZ_4aJ1o8ulKu8g1rqPBdLTmT1Sag17ZswqtI7qwkEwI'
},
formData: {
'rating': '5',
'review': 'this is api test',
'product_id': '5454'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
url = "http://wooapi.vxinfosystem.com/wp-json/letscms/v1/review/create"
payload = {'rating': '5',
'review': 'this is api test',
'product_id': '5454'}
files = [
]
headers = {
'letscms_token': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJJRCI6IjYiLCJ1c2VyX2xvZ2luIjoidXNlcjAwMSIsInVzZXJfbmljZW5hbWUiOiJ1c2VyMDAxIiwidXNlcl9lbWFpbCI6InVzZXIwMDFAdGVzdC5jb20iLCJ1c2VyX3VybCI6IiIsInVzZXJfcmVnaXN0ZXJlZCI6IjIwMjAtMTAtMTUgMTI6MTc6MTciLCJ1c2VyX2FjdGl2YXRpb25fa2V5IjoiMTYwMjc2NDIzODokUCRCVXFCTVRWdFBRNHVRVWE2ZFNTbzEyamJWSFZvVEwxIiwidXNlcl9zdGF0dXMiOiIwIiwiZGlzcGxheV9uYW1lIjoidXNlcjAwMSB0ZXN0IiwibGFzdF9sb2dpbiI6MTYwODA5NjQ3MH0.JyU-3Y2N6h5ye2m31wf-m7lYStyDwxroEKU3Ko9_4pXwk23rVu_9PdoDXfhFWJKrWlGIjx8byj2ICFdKlLvASjRp6YSlj-VALStZzQawXL8-iXJroMrZjnkK4kNtkYG26TCEmEfbS3L-qTRtq2UYVl9TwJ6hEiTbYe0SCoJB5hQ5NNS4GEyniUU5pvPbTbFaGUQ7_4-9AWXVBYyrR0ng99qR9U2uwu7V1I9ChqK4VtmhdMkQr3UbnD7uz8RTUyOKTEGuKk6_2h7bLHcnC5eC3lFVmaDi07Detj8dClGKLHmuCAKGGsfJo0oeo5TiwtQ4nfg1t-t0miGuFg-kjv_7NGO5F-2UGUWNNa0AyxcTRr6y7F249caFYBsvU2fzGH34lOi9qlxH4qgh1Yg4HH7DAmCe7VRr85cxyquGHIJZHk9WlkWwU8HSHEQ59ZZhGdmqAHgVpElQb80v2_NFLBUH0doQIKfX9lKoxxHgH8yqmJk8DL1pYIX6kWheqHREoOkNWUMsm3HT8zYiDp1x-yOPUwrKwyxanExaEHebFIhusWEvKcyBMJSwgOF9MzNc6KRDu5VHK7Rqs68fSc6_jX6at731R-C9cVrO9jabzRXP4rohYU_FNQSuIgRIY0m0CfNbZ_4aJ1o8ulKu8g1rqPBdLTmT1Sag17ZswqtI7qwkEwI'
}
response = requests.request("POST", url, headers=headers, data = payload, files = files)
print(response.text.encode('utf8'))
var client = new RestClient("http://wooapi.vxinfosystem.com/wp-json/letscms/v1/review/create");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("letscms_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJJRCI6IjYiLCJ1c2VyX2xvZ2luIjoidXNlcjAwMSIsInVzZXJfbmljZW5hbWUiOiJ1c2VyMDAxIiwidXNlcl9lbWFpbCI6InVzZXIwMDFAdGVzdC5jb20iLCJ1c2VyX3VybCI6IiIsInVzZXJfcmVnaXN0ZXJlZCI6IjIwMjAtMTAtMTUgMTI6MTc6MTciLCJ1c2VyX2FjdGl2YXRpb25fa2V5IjoiMTYwMjc2NDIzODokUCRCVXFCTVRWdFBRNHVRVWE2ZFNTbzEyamJWSFZvVEwxIiwidXNlcl9zdGF0dXMiOiIwIiwiZGlzcGxheV9uYW1lIjoidXNlcjAwMSB0ZXN0IiwibGFzdF9sb2dpbiI6MTYwODA5NjQ3MH0.JyU-3Y2N6h5ye2m31wf-m7lYStyDwxroEKU3Ko9_4pXwk23rVu_9PdoDXfhFWJKrWlGIjx8byj2ICFdKlLvASjRp6YSlj-VALStZzQawXL8-iXJroMrZjnkK4kNtkYG26TCEmEfbS3L-qTRtq2UYVl9TwJ6hEiTbYe0SCoJB5hQ5NNS4GEyniUU5pvPbTbFaGUQ7_4-9AWXVBYyrR0ng99qR9U2uwu7V1I9ChqK4VtmhdMkQr3UbnD7uz8RTUyOKTEGuKk6_2h7bLHcnC5eC3lFVmaDi07Detj8dClGKLHmuCAKGGsfJo0oeo5TiwtQ4nfg1t-t0miGuFg-kjv_7NGO5F-2UGUWNNa0AyxcTRr6y7F249caFYBsvU2fzGH34lOi9qlxH4qgh1Yg4HH7DAmCe7VRr85cxyquGHIJZHk9WlkWwU8HSHEQ59ZZhGdmqAHgVpElQb80v2_NFLBUH0doQIKfX9lKoxxHgH8yqmJk8DL1pYIX6kWheqHREoOkNWUMsm3HT8zYiDp1x-yOPUwrKwyxanExaEHebFIhusWEvKcyBMJSwgOF9MzNc6KRDu5VHK7Rqs68fSc6_jX6at731R-C9cVrO9jabzRXP4rohYU_FNQSuIgRIY0m0CfNbZ_4aJ1o8ulKu8g1rqPBdLTmT1Sag17ZswqtI7qwkEwI");
request.AlwaysMultipartFormData = true;
request.AddParameter("rating", "5");
request.AddParameter("review", "this is api test");
request.AddParameter("product_id", "5454");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request POST 'http://wooapi.vxinfosystem.com/wp-json/letscms/v1/review/create' \
--header 'letscms_token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJJRCI6IjYiLCJ1c2VyX2xvZ2luIjoidXNlcjAwMSIsInVzZXJfbmljZW5hbWUiOiJ1c2VyMDAxIiwidXNlcl9lbWFpbCI6InVzZXIwMDFAdGVzdC5jb20iLCJ1c2VyX3VybCI6IiIsInVzZXJfcmVnaXN0ZXJlZCI6IjIwMjAtMTAtMTUgMTI6MTc6MTciLCJ1c2VyX2FjdGl2YXRpb25fa2V5IjoiMTYwMjc2NDIzODokUCRCVXFCTVRWdFBRNHVRVWE2ZFNTbzEyamJWSFZvVEwxIiwidXNlcl9zdGF0dXMiOiIwIiwiZGlzcGxheV9uYW1lIjoidXNlcjAwMSB0ZXN0IiwibGFzdF9sb2dpbiI6MTYwODA5NjQ3MH0.JyU-3Y2N6h5ye2m31wf-m7lYStyDwxroEKU3Ko9_4pXwk23rVu_9PdoDXfhFWJKrWlGIjx8byj2ICFdKlLvASjRp6YSlj-VALStZzQawXL8-iXJroMrZjnkK4kNtkYG26TCEmEfbS3L-qTRtq2UYVl9TwJ6hEiTbYe0SCoJB5hQ5NNS4GEyniUU5pvPbTbFaGUQ7_4-9AWXVBYyrR0ng99qR9U2uwu7V1I9ChqK4VtmhdMkQr3UbnD7uz8RTUyOKTEGuKk6_2h7bLHcnC5eC3lFVmaDi07Detj8dClGKLHmuCAKGGsfJo0oeo5TiwtQ4nfg1t-t0miGuFg-kjv_7NGO5F-2UGUWNNa0AyxcTRr6y7F249caFYBsvU2fzGH34lOi9qlxH4qgh1Yg4HH7DAmCe7VRr85cxyquGHIJZHk9WlkWwU8HSHEQ59ZZhGdmqAHgVpElQb80v2_NFLBUH0doQIKfX9lKoxxHgH8yqmJk8DL1pYIX6kWheqHREoOkNWUMsm3HT8zYiDp1x-yOPUwrKwyxanExaEHebFIhusWEvKcyBMJSwgOF9MzNc6KRDu5VHK7Rqs68fSc6_jX6at731R-C9cVrO9jabzRXP4rohYU_FNQSuIgRIY0m0CfNbZ_4aJ1o8ulKu8g1rqPBdLTmT1Sag17ZswqtI7qwkEwI' \
--form 'rating=5' \
--form 'review=this is api test' \
--form 'product_id=5454'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = new MultipartBody.Builder().setType(MultipartBody.FORM)
.addFormDataPart("rating", "5")
.addFormDataPart("review", "this is api test")
.addFormDataPart("product_id", "5454")
.build();
Request request = new Request.Builder()
.url("http://wooapi.vxinfosystem.com/wp-json/letscms/v1/review/create")
.method("POST", body)
.addHeader("letscms_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJJRCI6IjYiLCJ1c2VyX2x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ute();
require "uri"
require "net/http"
url = URI("http://wooapi.vxinfosystem.com/wp-json/letscms/v1/review/create")
https = Net::HTTP.new(url.host, url.port);
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["letscms_token"] = "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJJRCI6IjYiLCJ1c2VyX2xvZ2luIjoidXNlcjAwMSIsInVzZXJfbmljZW5hbWUiOiJ1c2VyMDAxIiwidXNlcl9lbWFpbCI6InVzZXIwMDFAdGVzdC5jb20iLCJ1c2VyX3VybCI6IiIsInVzZXJfcmVnaXN0ZXJlZCI6IjIwMjAtMTAtMTUgMTI6MTc6MTciLCJ1c2VyX2FjdGl2YXRpb25fa2V5IjoiMTYwMjc2NDIzODokUCRCVXFCTVRWdFBRNHVRVWE2ZFNTbzEyamJWSFZvVEwxIiwidXNlcl9zdGF0dXMiOiIwIiwiZGlzcGxheV9uYW1lIjoidXNlcjAwMSB0ZXN0IiwibGFzdF9sb2dpbiI6MTYwODA5NjQ3MH0.JyU-3Y2N6h5ye2m31wf-m7lYStyDwxroEKU3Ko9_4pXwk23rVu_9PdoDXfhFWJKrWlGIjx8byj2ICFdKlLvASjRp6YSlj-VALStZzQawXL8-iXJroMrZjnkK4kNtkYG26TCEmEfbS3L-qTRtq2UYVl9TwJ6hEiTbYe0SCoJB5hQ5NNS4GEyniUU5pvPbTbFaGUQ7_4-9AWXVBYyrR0ng99qR9U2uwu7V1I9ChqK4VtmhdMkQr3UbnD7uz8RTUyOKTEGuKk6_2h7bLHcnC5eC3lFVmaDi07Detj8dClGKLHmuCAKGGsfJo0oeo5TiwtQ4nfg1t-t0miGuFg-kjv_7NGO5F-2UGUWNNa0AyxcTRr6y7F249caFYBsvU2fzGH34lOi9qlxH4qgh1Yg4HH7DAmCe7VRr85cxyquGHIJZHk9WlkWwU8HSHEQ59ZZhGdmqAHgVpElQb80v2_NFLBUH0doQIKfX9lKoxxHgH8yqmJk8DL1pYIX6kWheqHREoOkNWUMsm3HT8zYiDp1x-yOPUwrKwyxanExaEHebFIhusWEvKcyBMJSwgOF9MzNc6KRDu5VHK7Rqs68fSc6_jX6at731R-C9cVrO9jabzRXP4rohYU_FNQSuIgRIY0m0CfNbZ_4aJ1o8ulKu8g1rqPBdLTmT1Sag17ZswqtI7qwkEwI"
form_data = [['rating', '5'],['review', 'this is api test'],['product_id', '5454']]
request.set_form form_data, 'multipart/form-data'
response = https.request(request)
puts response.read_body
Response Success
{
"status": true,
"errors": [],
"message": "Review posted successfully."
}
Response Failed
{
"status": false,
"errors": {
"rating": "rating is required.",
"review": "review is required.",
"product_id": "product_id is required."
"product_id": "product not exists. Perhaps it was deleted?"
},
"message": ""
}
LETS WOO Pages API
The "Pages" API helps you to get Pages, this will return you Pages(tnc, about, privacy_policy, return_policy) that you want.
POST: /wp-json/letscms/v1/page/tnc
Parameter | Type | Position | # | Description |
---|---|---|---|---|
page | String |
params |
Required |
page name. |
Parameter | page |
---|---|
Type | string |
Position | param |
# | Required |
Description | page name |
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "http://wooapi.vxinfosystem.com/wp-json/letscms/v1/page/tnc",
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",
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var settings = {
"url": "http://wooapi.vxinfosystem.com/wp-json/letscms/v1/page/tnc",
"method": "GET",
"timeout": 0,
};
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require('request');
var options = {
'method': 'GET',
'url': 'http://wooapi.vxinfosystem.com/wp-json/letscms/v1/page/tnc',
'headers': {
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
url = "http://wooapi.vxinfosystem.com/wp-json/letscms/v1/page/tnc"
payload = {}
headers= {}
response = requests.request("GET", url, headers=headers, data = payload)
print(response.text.encode('utf8'))
var client = new RestClient("http://wooapi.vxinfosystem.com/wp-json/letscms/v1/page/tnc");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request GET 'http://wooapi.vxinfosystem.com/wp-json/letscms/v1/page/tnc'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("http://wooapi.vxinfosystem.com/wp-json/letscms/v1/page/tnc")
.method("GET", null)
.build();
Response response = client.newCall(request).execute();
require "uri"
require "net/http"
url = URI("http://wooapi.vxinfosystem.com/wp-json/letscms/v1/page/tnc")
https = Net::HTTP.new(url.host, url.port);
https.use_ssl = true
request = Net::HTTP::Get.new(url)
response = https.request(request)
puts response.read_body
Success Response
{
"status": true,
"errors": [],
"message": "",
"data": {
"title": "Terms and Conditions",
"description": ""
}
}
Response
{
"status": false,
"errors": [],
"message": "page is not found !"
}