OpenCart Rest APIs
OpenCart APIs is fully integrated with the OpenCart REST API. This is interact with your OpenCart site by sending and receiving data as JSON (JavaScript Object Notation) objects. Using the OpenCart REST API you can register the customers and purchasing the products and it provides data access to the content of OpenCart users like which is publicly accessible via the REST API. This APIs also provide the E-commerce Mobile Apps.
Installations
First of all Download Opencart Rest APIs extension but before installation you will download the OC 3.X.X.X Installation Issue Fixed extension from opencart.com or click on download button Download then follow these steps for Installation
Step-1 First install OC 3.X.X.X Installation Issue Fixed extension for installation Goto (Extensions->Installer->click on upload and then select the OC 3.X.X.X Installation Issue Fixed extension zip file then refresh the modification.
Step-2 Installed the Opencart Rest APIs extension for installation Goto (Extensions->Installer->click on upload and then select Opencart Rest APIs extension zip file then refresh modification then gives permision from admin for our extension for this you will follow these steps Goto (System->Users->User Groups) then click and then edit administraion by click on pencil icon then click on (select all) of access permision and modify permision then click on Save then refresh the modification.
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 /URLs?start=5&limit=10
Login GET APIs
This Get APIs used for get the Information Login Page.
GET: {{site_domain}}/index.php?route=ocrestapi/account/login
| Parameter | Type | Position | # | Description |
|---|---|---|---|---|
| token | string |
Headers |
Required |
Token is generate when user attempt login or register API. |
| Parameter | token |
|---|---|
| Type | string |
| Position | Headers |
| # | Required |
| Description | Token is generate when user attempt login or register API. |
'{{site_domain}}/index.php?route=ocrestapi/account/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 => 'GET',
CURLOPT_POSTFIELDS => array('email' => 'example1@test.com','password' => '123456','button_address_add
' => 'Add Address'),
CURLOPT_HTTPHEADER => array(
'Cookie: OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var form = new FormData();
form.append("email", "example1@test.com");
form.append("password", "123456");
form.append("button_address_add", "Add Address");
var settings = {
"url": "{{site_domain}}/index.php?route=ocrestapi/account/login",
"method": "GET",
"timeout": 0,
"headers": {
"Cookie": "OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb"
},
"processData": false,
"mimeType": "multipart/form-data",
"contentType": false,
"data": form
};
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require('request');
var options = {
'method': 'GET',
'url': '{{site_domain}}/index.php?route=ocrestapi/account/login',
'headers': {
'Cookie': 'OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb'
},
formData: {
'email': 'example1@test.com',
'password': '123456',
'button_address_add\n': 'Add Address'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
url = "{{site_domain}}/index.php?route=ocrestapi/account/login"
payload={'email': 'example1@test.com',
'password': '123456',
'button_address_add': 'Add Address'}
files=[
]
headers = {
'Cookie': 'OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb'
}
response = requests.request("GET", url, headers=headers, data=payload, files=files)
print(response.text)
curl --location --request GET '{{site_domain}}/index.php?route=ocrestapi/account/login' \
--header 'Cookie: OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb' \
--form 'email="example1@test.com"' \
--form 'password="123456"' \
--form 'button_address_add
="Add Address"'
curl --location --request GET '{{site_domain}}/index.php?route=ocrestapi/account/register' \
--header 'Authorization: Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334' \
--header 'Cookie: OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb' \
--data-raw ''
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("{{site_domain}}/index.php?route=ocrestapi/account/login")
.method("GET", null)
.addHeader("Cookie", "OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb")
.build();
Response response = client.newCall(request).execute();
require "uri"
require "net/http"
url = URI("{{site_domain}}/index.php?route=ocrestapi/account/login")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["Cookie"] = "OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb"
form_data = [['email', 'example1@test.com'],['password', '123456'],['button_address_add
', 'Add Address']]
request.set_form form_data, 'multipart/form-data'
response = http.request(request)
puts response.read_body
Response
{
"status": true,
"errors": [],
"data": [],
"language": {
"code": "en",
"direction": "ltr",
"date_format_short": "d/m/Y",
"date_format_long": "l dS F Y",
"time_format": "h:i:s A",
"datetime_format": "d/m/Y H:i:s",
"decimal_point": ".",
"thousand_point": ",",
"button_login": "Login",
"heading_title": "Account Login",
"text_account": "Account",
"text_login": "Login",
"text_new_customer": "New Customer",
"text_register": "Register Account",
"text_register_account": "By creating an account you will be able to shop faster, be up to date on an order's status, and keep track of the orders you have previously made.",
"text_returning_customer": "Returning Customer",
"text_i_am_returning_customer": "I am a returning customer",
"text_forgotten": "Forgotten Password",
"entry_email": "E-Mail Address",
"entry_password": "Password",
"text_featured": "Featured",
"text_select_language": "Select Language",
"button_view_all": "View All",
"text_special_off": "Special Offers",
"text_brands": "Brands",
"text_cart_success": " Success: You have added product to your shopping cart",
"text_return_success": "Thank you for submitting your return request. Your request has been sent to the relevant department for processing.",
"text_checkout_success": "Your order has been successfully processed!
You can view your order history by clicking on history from My Orders Menu.
If your purchase has an associated download, you can go to the account downloads page to view them.
Please direct any questions you have to the store owner.
Thanks for shopping with us online!",
"text_coupon_title": "Use Coupon Code",
"text_coupon": "Coupon (%s)",
"text_coupon_success": "Success: Your coupon discount has been applied!",
"entry_coupon_coupon": "Enter your coupon here",
"error_coupon_coupon": "Warning: Coupon is either invalid, expired or reached its usage limit!",
"error_required_telephone": "Telephone is required.",
"error_minimum_quantity": "Minimum quantity for %s is %s",
.
.
.
.
}
}
Customer Login POST API
The login user API allow you to login user and generate the token and that token use for run other apis.
Here {{site_url}}will be your website url ex. {{site_domain}} , and/index.php?route=ocrestapi/account/login is a start url of our APIs, this will be used in all APIs related to OpenCart REST APIs.
POST: {{site_url}}/account/login
| Parameter | Type | Position | # | Description |
|---|---|---|---|---|
| username | string |
Body |
Required |
User Name allows only normal strings and numbers, special charactors not allowed in username. |
| password | string |
Body |
Required |
Password allows Aa-Zz,0-9,Special charactors. |
| Parameter | username |
|---|---|
| Type | string |
| Position | Body |
| # | Required |
| Description | User Name allows only normal strings and numbers, special charactors not allowed in username. |
| Parameter | password |
| Type | string |
| Position | Body |
| # | Required |
| Description | Password allows Aa-Zz,0-9,Special charactors. |
'{{site_domain}}/index.php?route=ocrestapi/account/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 =>'{
"email" :"example@test.com",
"password" :"123456"
}',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'Cookie: OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var settings = {
"url": "{{site_domain}}/index.php?route=ocrestapi/account/login",
"method": "POST",
"timeout": 0,
"headers": {
"Content-Type": "application/json",
"Cookie": "OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb"
},
"data": JSON.stringify({
"email": "example@test.com",
"password": "123456"
}),
};
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require('request');
var options = {
'method': 'POST',
'url': '{{site_domain}}/index.php?route=ocrestapi/account/login',
'headers': {
'Content-Type': 'application/json',
'Cookie': 'OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb'
},
body: JSON.stringify({
"email": "example@test.com",
"password": "123456"
})
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
import json
url = "{{site_domain}}/index.php?route=ocrestapi/account/login"
payload = json.dumps({
"email": "example@test.com",
"password": "123456"
})
headers = {
'Content-Type': 'application/json',
'Cookie': 'OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
var client = new RestClient("{{site_domain}}/index.php?route=ocrestapi/account/login");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Cookie", "OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb");
var body = @"{
" + "\n" +
@" ""email"" :""example@test.com"",
" + "\n" +
@" ""password"" :""123456""
" + "\n" +
@"}";
request.AddParameter("application/json", body, ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request POST '{{site_domain}}/index.php?route=ocrestapi/account/login' \
--header 'Content-Type: application/json' \
--header 'Cookie: OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb' \
--data-raw '{
"email" :"example@test.com",
"password" :"123456"
}'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n \"email\" :\"example@test.com\",\r\n \"password\" :\"123456\"\r\n}");
Request request = new Request.Builder()
.url("{{site_domain}}/index.php?route=ocrestapi/account/login")
.method("POST", body)
.addHeader("Content-Type", "application/json")
.addHeader("Cookie", "OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb")
.build();
Response response = client.newCall(request).execute();
require "uri"
require "json"
require "net/http"
url = URI("{{site_domain}}/index.php?route=ocrestapi/account/login")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)
request["Authorization"] = "Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334"
request["Content-Type"] = "application/json"
request["Cookie"] = "OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb"
request.body = JSON.dump({
"email": "example@test.com",
"password": "123456"
})
response = http.request(request)
puts response.read_body
Request
{
"email" :"example@test.com",
"password" :"123456"
}
Response
{
"status": true,
"errors": [],
"data": {
"customer_id": "81",
"customer_group_id": "1",
"store_id": "0",
"language_id": "1",
"firstname": "user3",
"lastname": "testing",
"email": "example@test.com",
"telephone": "9874567890",
"fax": "",
"cart": "",
"wishlist": "",
"newsletter": "1",
"address_id": "0",
"custom_field": "",
"ip": "49.36.216.77",
"status": "1",
"safe": "0",
"date_added": "2021-12-20 08:32:22"
},
"token": "e216adf2774dbf687b087406efe3eb07ce394ad9"
}
Customer Register GET APIs
This Get APIs used for get Information about registration page.
GET: {{site_domain}}/index.php?route=ocrestapi/account/register
| Parameter | Type | Position | # | Description |
|---|---|---|---|---|
| token | string |
Headers |
Required |
Token is generate when user attempt login or register API. |
| Parameter | token |
|---|---|
| Type | string |
| Position | Headers |
| # | Required |
| Description | Token is generate when user attempt login or register API. |
'{{site_domain}}/index.php?route=ocrestapi/account/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 => 'GET',
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334',
'Cookie: OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var settings = {
"url": "{{site_domain}}/index.php?route=ocrestapi/account/register",
"method": "GET",
"timeout": 0,
"headers": {
"Authorization": "Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334",
"Cookie": "OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb"
},
};
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require('request');
var options = {
'method': 'GET',
'url': '{{site_domain}}/index.php?route=ocrestapi/account/register',
'headers': {
'Authorization': 'Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334',
'Cookie': 'OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
url = "{{site_domain}}/index.php?route=ocrestapi/account/register"
payload = ""
headers = {
'Authorization': 'Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334',
'Cookie': 'OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
var client = new RestClient("{{site_domain}}/index.php?route=ocrestapi/account/register");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334");
request.AddHeader("Cookie", "OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb");
var body = @"";
request.AddParameter("text/plain", body, ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request GET '{{site_domain}}/index.php?route=ocrestapi/account/register' \
--header 'Authorization: Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334' \
--header 'Cookie: OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb' \
--data-raw ''
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("{{site_domain}}/index.php?route=ocrestapi/account/register")
.method("GET", null)
.addHeader("Authorization", "Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334")
.addHeader("Cookie", "OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb")
.build();
Response response = client.newCall(request).execute();
require "uri"
require "net/http"
url = URI("{{site_domain}}/index.php?route=ocrestapi/account/register")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["Authorization"] = "Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334"
request["Cookie"] = "OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb"
response = http.request(request)
puts response.read_body
Response
{
"status": true,
"errors": [],
"data": {
"customer_groups": [
{
"customer_group_id": "1",
"approval": "0",
"sort_order": "1",
"language_id": "1",
"name": "Default",
"description": "test"
},
{
"customer_group_id": "3",
"approval": "0",
"sort_order": "1",
"language_id": "1",
"name": "editor",
"description": "editor"
},
{
"customer_group_id": "2",
"approval": "0",
"sort_order": "1",
"language_id": "1",
"name": "seller",
"description": "seller"
}
],
"text_agree": {
"information_id": "3",
"title": "Privacy Policy"
}
},
"language": {
"code": "en",
"direction": "ltr",
"date_format_short": "d/m/Y",
"date_format_long": "l dS F Y",
"time_format": "h:i:s A",
"datetime_format": "d/m/Y H:i:s",
"decimal_point": ".",
"thousand_point": ",",
"text_home": "",
"button_cart": "Add to Cart",
"button_cancel": "Cancel",
"button_compare": "Compare this Product",
"button_edit": "Edit",
"button_login": "Login",
"button_update": "Update",
"button_remove": "Remove",
"button_grid": "Grid",
"button_map": "View Google Map",
"error_exception": "Error Code(%s): %s in %s on line %s",
"entry_newsletter": "Subscribe",
"entry_password": "Password",
"entry_confirm": "Password Confirm",
"error_exists": "Warning: E-Mail Address is already registered!",
"error_firstname": "First Name must be between 1 and 32 characters!",
"error_lastname": "Last Name must be between 1 and 32 characters!",
"error_email": "E-Mail Address does not appear to be valid!",
"error_telephone": "Telephone must be between 3 and 32 characters!",
"error_custom_field": "%s required!",
.
.
.
.
}
}
Customer Register POST APIs
This APIs is used for register the customer in our website.
POST:{{site_domain}}/index.php?route=ocrestapi/account/register
| Parameter | Type | Position | # | Description |
|---|---|---|---|---|
| customer_group_id | number |
Body |
Optional |
Bydefault seletct default value of customer_group_id |
| Deafult Users | Deafult | Editor | Seller | |
| phone | integer |
Body |
Required |
phone number must be a set of 10 integer values. |
| first_name | string |
Body |
Required |
First name is belongs to user's Name |
| last_name | string |
Body |
Required |
Last name is belongs to user's surname |
| username | string |
Body |
Required |
username is a unique string, this is allows only Aa-Zz and 0-9 charactors. |
| password | string |
Body |
Required |
Password allows Aa-Zz,0-9 and Special charactors. |
string |
Body |
Required |
Each user must have the unique email address same email address not allowed. | address | string |
Body |
Required |
Address is user's residence location. |
| Newsletter | Boolean |
Body |
Required |
newsletter means subscribe the website or not. you will select yes means subscribe if give no mean not subscribe |
| agree | Boolean |
Body |
Required |
This parameter contains the value Policy agree means agres from term and condition 1 means agree |
| Parameter | default |
|---|---|
| Type | boolean |
| Position | Body |
| # | Required |
| Description | Subscriber |
| Parameter | editor |
| Type | boolean |
| Position | Body |
| # | Required |
| Description | Editor |
| Parameter | seller |
| Type | boolean |
| Position | Body |
| # | Required |
| Description | Seller |
| 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 | |
| Type | string |
| Position | Body |
| # | Required |
| Description | |
| Parameter | password |
| Type | string |
| Position | Body |
| # | Required |
| Description | Password allows Aa-Zz,0-9 and Special charactors. |
| Parameter | confirm password |
| Type | string |
| Position | Body |
| # | Required |
| Description | Password allows Aa-Zz,0-9 and Special charactors. |
| Parameter | phone |
| Type | number |
| Position | Body |
| # | Required |
| Description | phone number must be a set of 10 integer values. |
| Parameter | newsletter |
| Type | boolean |
| Position | Body |
| # | Required |
| Description | newsletter means subscribe the website or not. you will select yes means subscribe if give no mean not subscribe |
| Parameter | agree |
| Type | boolean |
| Position | Body |
| # | Required |
| Description | >This parameter contains the value Policy agree means agres from term and condition 1 means agree |
curl --location --request POST '{{site_domain}}/index.php?route=ocrestapi/account/register' \
--header 'Authorization: Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334' \
--header 'Content-Type: application/json' \
--header 'Cookie: OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb' \
--data-raw '{
"firstname":"user3",
"lastname":"testing",
"email":"example1@test.com",
"telephone":"9874567890",
"password":"123456",
"confirm":"123456",
"customer_group_id":"1",
"newsletter":"1",
"agree":"1"
}'
var settings = {
"url": "{{site_domain}}/index.php?route=ocrestapi/account/register",
"method": "POST",
"timeout": 0,
"headers": {
"Authorization": "Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334",
"Content-Type": "application/json",
"Cookie": "OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb"
},
"data": JSON.stringify({
"firstname": "user3",
"lastname": "testing",
"email": "example1@test.com",
"telephone": "9874567890",
"password": "123456",
"confirm": "123456",
"customer_group_id": "1",
"newsletter": "1",
"agree": "1"
}),
};
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require('request');
var options = {
'method': 'POST',
'url': '{{site_domain}}/index.php?route=ocrestapi/account/register',
'headers': {
'Authorization': 'Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334',
'Content-Type': 'application/json',
'Cookie': 'OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb'
},
body: JSON.stringify({
"firstname": "user3",
"lastname": "testing",
"email": "example1@test.com",
"telephone": "9874567890",
"password": "123456",
"confirm": "123456",
"customer_group_id": "1",
"newsletter": "1",
"agree": "1"
})
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
import json
url = "{{site_domain}}/index.php?route=ocrestapi/account/register"
payload = json.dumps({
"firstname": "user3",
"lastname": "testing",
"email": "example1@test.com",
"telephone": "9874567890",
"password": "123456",
"confirm": "123456",
"customer_group_id": "1",
"newsletter": "1",
"agree": "1"
})
headers = {
'Authorization': 'Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334',
'Content-Type': 'application/json',
'Cookie': 'OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
var client = new RestClient("{{site_domain}}/index.php?route=ocrestapi/account/register");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334");
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Cookie", "OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb");
var body = @"{
" + "\n" +
@" ""firstname"":""user3"",
" + "\n" +
@" ""lastname"":""testing"",
" + "\n" +
@" ""email"":""example1@test.com"",
" + "\n" +
@" ""telephone"":""9874567890"",
" + "\n" +
@" ""password"":""123456"",
" + "\n" +
@" ""confirm"":""123456"",
" + "\n" +
@" ""customer_group_id"":""1"",
" + "\n" +
@" ""newsletter"":""1"",
" + "\n" +
@" ""agree"":""1""
" + "\n" +
@"}";
request.AddParameter("application/json", body, ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request POST '{{site_domain}}/index.php?route=ocrestapi/account/register' \
--header 'Authorization: Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334' \
--header 'Content-Type: application/json' \
--header 'Cookie: OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb' \
--data-raw '{
"firstname":"user3",
"lastname":"testing",
"email":"example1@test.com",
"telephone":"9874567890",
"password":"123456",
"confirm":"123456",
"customer_group_id":"1",
"newsletter":"1",
"agree":"1"
}'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n \"firstname\":\"user3\",\r\n \"lastname\":\"testing\",\r\n \"email\":\"example1@test.com\",\r\n \"telephone\":\"9874567890\",\r\n \"password\":\"123456\",\r\n \"confirm\":\"123456\",\r\n \"customer_group_id\":\"1\",\r\n \"newsletter\":\"1\",\r\n \"agree\":\"1\"\r\n}");
Request request = new Request.Builder()
.url("{{site_domain}}/index.php?route=ocrestapi/account/register")
.method("POST", body)
.addHeader("Authorization", "Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334")
.addHeader("Content-Type", "application/json")
.addHeader("Cookie", "OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb")
.build();
Response response = client.newCall(request).execute();
require "uri"
require "json"
require "net/http"
url = URI("{{site_domain}}/index.php?route=ocrestapi/account/register")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)
request["Authorization"] = "Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334"
request["Content-Type"] = "application/json"
request["Cookie"] = "OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb"
request.body = JSON.dump({
"firstname": "user3",
"lastname": "testing",
"email": "example1@test.com",
"telephone": "9874567890",
"password": "123456",
"confirm": "123456",
"customer_group_id": "1",
"newsletter": "1",
"agree": "1"
})
response = http.request(request)
puts response.read_body
Request
{
"firstname":"user3",
"lastname":"testing",
"email":"example1@test.com",
"telephone":"9874567890",
"password":"123456",
"confirm":"123456",
"customer_group_id":"1",
"newsletter":"1",
"agree":"1"
}
Response
{
"status": true,
"errors": [],
"data": {
"customer_id": "82",
"customer_group_id": "1",
"store_id": "0",
"language_id": "1",
"firstname": "user3",
"lastname": "testing",
"email": "example1@test.com",
"telephone": "9874567890",
"fax": "",
"password": "ca10fcce7648e207545e3ba7b115f216631a44c0",
"salt": "TcYFA773l",
"cart": null,
"wishlist": null,
"newsletter": "1",
"address_id": "0",
"custom_field": "",
"ip": "49.36.216.77",
"status": "1",
"safe": "0",
"token": "",
"code": "",
"date_added": "2021-12-20 10:07:34"
},
"token": "95bc2b3da1cdd9d579312fea14934872c2e203c3"
}
GET Customer Address List
This Get APIs use for get Customer Addresses List.
GET: {{site_domain}}/index.php?route=ocrestapi/account/address
| Parameter | Type | Position | # | Description |
|---|---|---|---|---|
| token | string |
Headers |
Required |
Token is generate when user attempt login or register API. |
| Parameter | token |
|---|---|
| Type | string |
| Position | Headers |
| # | Required |
| Description | Token is generate when user attempt login or register API. |
'{{site_domain}}/index.php?route=ocrestapi/account/address',
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(
'Authorization: Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334',
'Cookie: OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var form = new FormData();
var settings = {
"url": "{{site_domain}}/index.php?route=ocrestapi/account/address",
"method": "GET",
"timeout": 0,
"headers": {
"Authorization": "Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334",
"Cookie": "OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb"
},
"processData": false,
"mimeType": "multipart/form-data",
"contentType": false,
"data": form
};
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require('request');
var options = {
'method': 'GET',
'url': '{{site_domain}}/index.php?route=ocrestapi/account/address',
'headers': {
'Authorization': 'Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334',
'Cookie': 'OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb'
},
formData: {
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
url = "{{site_domain}}/index.php?route=ocrestapi/account/address"
payload={}
files={}
headers = {
'Authorization': 'Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334',
'Cookie': 'OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb'
}
response = requests.request("GET", url, headers=headers, data=payload, files=files)
print(response.text)
var client = new RestClient("{{site_domain}}/index.php?route=ocrestapi/account/address");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334");
request.AddHeader("Cookie", "OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb");
request.AlwaysMultipartFormData = true;
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request GET '{{site_domain}}/index.php?route=ocrestapi/account/address' \
--header 'Authorization: Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334' \
--header 'Cookie: OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("{{site_domain}}/index.php?route=ocrestapi/account/address")
.method("GET", null)
.addHeader("Authorization", "Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334")
.addHeader("Cookie", "OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb")
.build();
Response response = client.newCall(request).execute();
require "uri"
require "net/http"
url = URI("{{site_domain}}/index.php?route=ocrestapi/account/address")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["Authorization"] = "Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334"
request["Cookie"] = "OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb"
response = http.request(request)
puts response.read_body
Response
{
"status": true,
"errors": [],
"data": {
"addresses": [
{
"address_id": "190",
"firstname": "user3",
"lastname": "testing",
"company": "letscms",
"address_1": "harni",
"address_2": "nagar",
"city": "aligarh",
"postcode": "202001",
"default": 1,
"zone": "Uttar Pradesh",
"zone_code": "UP",
"country": "India",
"address": "user3 testing
letscms
harni
nagar
aligarh 202001
Uttar Pradesh
India"
}
{
"address_id": "193",
"firstname": "user3",
"lastname": "testing",
"company": "letscmsletscms",
"address_1": "ramghat",
"address_2": "road",
"city": "Aligarh",
"postcode": "202055",
"default": 0,
"zone": "Uttar Pradesh",
"zone_code": "UP",
"country": "India",
"address": "user3 testing
letscmsletscms
ramghat
road
Aligarh 202055
Uttar Pradesh
India"
}
]
},
"language": {
"code": "en",
"direction": "ltr",
"date_format_short": "d/m/Y",
"date_format_long": "l dS F Y",
"time_format": "h:i:s A",
"datetime_format": "d/m/Y H:i:s",
"decimal_point": ".",
"thousand_point": ",",
"text_home": "",
"text_yes": "Yes",
"text_no": "No",
"text_none": " --- None --- ",
"text_select": " --- Please Select --- ",
"text_all_zones": "All Zones",
"text_pagination": "Showing %d to %d of %d (%d Pages)",
.
.
.
"error_wishlist_login": "You must login or create an account to save %s to your wish list!",
"message_success_cart": "Success: You have added %s to your shopping cart!\","
}
}
Customer Address Add GET API
This APIs is used for get the Addresses Details like country_id, zone_id etc.
GET: {{site_domain}}/index.php?route=ocrestapi/account/address/add
| Parameter | Type | Position | # | Description |
|---|---|---|---|---|
| token | string |
Headers |
Required |
Token is generate when user attempt login or register API. |
| Parameter | token |
|---|---|
| Type | string |
| Position | Headers |
| # | Optional |
| Description | Token is generate when user attempt login or register API. |
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => '{{site_domain}}/index.php?route=ocrestapi/account/address/add',
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(
'Authorization: Bearer ce3ed44cc503719e1b99ade0211e36dda7e343ea',
'Cookie: OCSESSID=033e682826e11acf4879dca9eb; currency=USD; language=en-gb'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var settings = {
"url": "{{site_domain}}/index.php?route=ocrestapi/account/address/add",
"method": "GET",
"timeout": 0,
"headers": {
"Authorization": "Bearer ce3ed44cc503719e1b99ade0211e36dda7e343ea",
"Cookie": "OCSESSID=033e682826e11acf4879dca9eb; currency=USD; language=en-gb"
},
};
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require('request');
var options = {
'method': 'GET',
'url': '{{site_domain}}/index.php?route=ocrestapi/account/address/add',
'headers': {
'Authorization': 'Bearer ce3ed44cc503719e1b99ade0211e36dda7e343ea',
'Cookie': 'OCSESSID=033e682826e11acf4879dca9eb; currency=USD; language=en-gb'
},
form: {
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
url = "{{site_domain}}/index.php?route=ocrestapi/account/address/add"
payload={}
headers = {
'Authorization': 'Bearer ce3ed44cc503719e1b99ade0211e36dda7e343ea',
'Cookie': 'OCSESSID=033e682826e11acf4879dca9eb; currency=USD; language=en-gb'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
var client = new RestClient("{{site_domain}}/index.php?route=ocrestapi/account/address/add");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer ce3ed44cc503719e1b99ade0211e36dda7e343ea");
request.AddHeader("Cookie", "OCSESSID=033e682826e11acf4879dca9eb; currency=USD; language=en-gb");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request GET '{{site_domain}}/index.php?route=ocrestapi/account/address/add' \
--header 'Authorization: Bearer ce3ed44cc503719e1b99ade0211e36dda7e343ea' \
--header 'Cookie: OCSESSID=033e682826e11acf4879dca9eb; currency=USD; language=en-gb'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("{{site_url}}/wp-json/letscms/v1/auth/user_info")
.method("GET", null)
.addHeader("letscms_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.....")
.addHeader("Cookie", "PHPSESSID=onp12foas4cn1dsdodjv9ri1qm")
.build();
Response response = client.newCall(request).execute();
require "uri"
require "net/http"
url = URI("{{site_url}}/wp-json/letscms/v1/auth/user_info")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["letscms_token"] = "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...."
request["Cookie"] = "PHPSESSID=onp12foas4cn1dsdodjv9ri1qm"
form_data = [['key', '1']]
request.set_form form_data, 'multipart/form-data'
response = http.request(request)
puts response.read_body
Response
{
"status": true,
"errors": [],
"data": {
"country_id": "99",
"states": {
"244": [],
"1": [
{
"zone_id": "1",
"country_id": "1",
"name": "Badakhshan",
"code": "BDS",
"status": "1"
},
{
"zone_id": "2",
"country_id": "1",
"name": "Badghis",
"code": "BDG",
"status": "1"
},
{
"zone_id": "3",
"country_id": "1",
"name": "Baghlan",
"code": "BGL",
"status": "1"
},
.
.
.....
]
},
"language": {
"code": "en",
"direction": "ltr",
"date_format_short": "d/m/Y",
"date_format_long": "l dS F Y",
"time_format": "h:i:s A",
"datetime_format": "d/m/Y H:i:s",
"text_select": " --- Please Select --- ",
"text_all_zones": "All Zones",
"button_address_add": "Add Address",
"button_back": "Back",
"button_continue": "Continue",
"button_cart": "Add to Cart",
"button_cancel": "Cancel",
"button_delete": "Delete",
"button_download": "Download",
"button_edit": "Edit",
"button_filter": "Refine Search",
"button_reviews": "Reviews",
"button_search": "Search",
"button_shipping": "Apply Shipping",
"button_submit": "Submit",
"button_guest": "Guest Checkout",
"button_view": "View",
"button_list": "List",
"button_grid": "Grid",
"datepicker": "en-gb",
"heading_title": "Address Book",
"text_account": "Account",
"text_address_book": "Address Book Entries",
"text_address_add": "Add Address",
"text_address_edit": "Edit Address",
"entry_firstname": "First Name",
"entry_lastname": "Last Name",
"entry_company": "Company",
"entry_address_1": "Address 1",
"entry_address_2": "Address 2",
"entry_postcode": "Post Code",
"entry_city": "City",
"entry_country": "Country",
"entry_zone": "Region / State",
"entry_default": "Default Address",
"error_delete": "Warning: You must have at least one address!",
"error_default": "Warning: You can not delete your default address!",
"error_firstname": "First Name must be between 1 and 32 characters!",
"error_lastname": "Last Name must be between 1 and 32 characters!",
"error_address_1": "Address must be between 3 and 128 characters!",
"error_postcode": "Postcode must be between 2 and 10 characters!",
"error_city": "City must be between 2 and 128 characters!",
"error_country": "Please select a country!",
"error_zone": "Please select a region / state!",
"error_custom_field": "%s required!"
.
.
.......
}
}
Customer Address Add POST API
This APIs is used for Customer can add the addresses.
POST: '{{site_domain}}/index.php?route=ocrestapi/account/address/add'
| Parameter | Type | Position | # | Description |
|---|---|---|---|---|
| token | string |
Headers |
Required |
Token is generate when user attempt login or register API. |
| firstname | String |
Body |
Required |
firstname is number, character any special symbol. |
| lastname | Integer |
Body |
Required |
lastname is number, character any special symbol. |
| address_1 | String |
Body |
Required |
address_1 is number, character any special symbol. |
| city | String |
Body |
Required |
city is string |
| postcode | Number |
Body |
Required |
postcode should be number. |
| address_2 | Integer |
Body |
Optional |
address_2 is number, character any special symbol. |
| company | Integer |
Body |
Optional |
company is number, character any special symbol. |
| Parameter | token |
|---|---|
| Type | string |
| Position | Headers |
| # | Required |
| Description | Token is generate when user attempt login or register API |
| Parameter | firstname |
| Type | String |
| Position | Body |
| # | Required |
| Description | firstname is number, character any special symbol. |
| Parameter | lastname |
| Type | String |
| Position | Body |
| # | Required |
| Description | lastname is number, character any special symbol. |
| Parameter | address_1 |
| Type | String |
| Position | Body |
| # | Required |
| Description | address_1 is number, character any special symbol. |
| Parameter | city |
| Type | String |
| Position | Body |
| # | Required |
| Description | city is string name |
| Parameter | postcode |
| Type | Number |
| Position | Body |
| # | Required |
| Description | postcode should be number. |
| Parameter | address_2 |
| Type | String |
| Position | Body |
| # | Optional |
| Description | address_1 is number, character any special symbol. |
| Parameter | company |
| Type | String |
| Position | Body |
| # | Optional |
| Description | company is number, character any special symbol. |
'{{site_domain}}/index.php?route=ocrestapi/account/address/add',
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 =>'{
"firstname":"user3",
"lastname":"testing",
"city":"Aligarh",
"country_id":99,
"zone_id":1505,
"postcode":"202055",
"address_1":"ramghat",
"address_2":"road",
"company":"letscmsletscms"
}',
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334',
'Content-Type: application/json',
'Cookie: OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var settings = {
"url": "{{site_domain}}/index.php?route=ocrestapi/account/address/add",
"method": "POST",
"timeout": 0,
"headers": {
"Authorization": "Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334",
"Content-Type": "application/json",
"Cookie": "OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb"
},
"data": JSON.stringify({
"firstname": "user3",
"lastname": "testing",
"city": "Aligarh",
"country_id": 99,
"zone_id": 1505,
"postcode": "202055",
"address_1": "ramghat",
"address_2": "road",
"company": "letscmsletscms"
}),
};
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require('request');
var options = {
'method': 'POST',
'url': '{{site_domain}}/index.php?route=ocrestapi/account/address/add',
'headers': {
'Authorization': 'Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334',
'Content-Type': 'application/json',
'Cookie': 'OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb'
},
body: JSON.stringify({
"firstname": "user3",
"lastname": "testing",
"city": "Aligarh",
"country_id": 99,
"zone_id": 1505,
"postcode": "202055",
"address_1": "ramghat",
"address_2": "road",
"company": "letscmsletscms"
})
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
import json
url = "{{site_domain}}/index.php?route=ocrestapi/account/address/add"
payload = json.dumps({
"firstname": "user3",
"lastname": "testing",
"city": "Aligarh",
"country_id": 99,
"zone_id": 1505,
"postcode": "202055",
"address_1": "ramghat",
"address_2": "road",
"company": "letscmsletscms"
})
headers = {
'Authorization': 'Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334',
'Content-Type': 'application/json',
'Cookie': 'OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
var client = new RestClient("{{site_domain}}/index.php?route=ocrestapi/account/address/add");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334");
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Cookie", "OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb");
var body = @"{
" + "\n" +
@" ""firstname"":""user3"",
" + "\n" +
@" ""lastname"":""testing"",
" + "\n" +
@" ""city"":""Aligarh"",
" + "\n" +
@" ""country_id"":99,
" + "\n" +
@" ""zone_id"":1505,
" + "\n" +
@" ""postcode"":""202055"",
" + "\n" +
@" ""address_1"":""ramghat"",
" + "\n" +
@" ""address_2"":""road"",
" + "\n" +
@" ""company"":""letscmsletscms""
" + "\n" +
@"
" + "\n" +
@"
" + "\n" +
@"
" + "\n" +
@"
" + "\n" +
@"
" + "\n" +
@"}";
request.AddParameter("application/json", body, ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request POST '{{site_domain}}/index.php?route=ocrestapi/account/address/add' \
--header 'Authorization: Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334' \
--header 'Content-Type: application/json' \
--header 'Cookie: OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb' \
--data-raw '{
"firstname":"user3",
"lastname":"testing",
"city":"Aligarh",
"country_id":99,
"zone_id":1505,
"postcode":"202055",
"address_1":"ramghat",
"address_2":"road",
"company":"letscmsletscms"
}'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n \"firstname\":\"user3\",\r\n \"lastname\":\"testing\",\r\n \"city\":\"Aligarh\",\r\n \"country_id\":99,\r\n \"zone_id\":1505,\r\n \"postcode\":\"202055\",\r\n \"address_1\":\"ramghat\",\r\n \"address_2\":\"road\",\r\n \"company\":\"letscmsletscms\"\r\n \r\n \r\n\r\n \r\n \r\n}");
Request request = new Request.Builder()
.url("{{site_domain}}/index.php?route=ocrestapi/account/address/add")
.method("POST", body)
.addHeader("Authorization", "Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334")
.addHeader("Content-Type", "application/json")
.addHeader("Cookie", "OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb")
.build();
Response response = client.newCall(request).execute();
require "uri"
require "json"
require "net/http"
url = URI("{{site_domain}}/index.php?route=ocrestapi/account/address/add")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)
request["Authorization"] = "Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334"
request["Content-Type"] = "application/json"
request["Cookie"] = "OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb"
request.body = JSON.dump({
"firstname": "user3",
"lastname": "testing",
"city": "Aligarh",
"country_id": 99,
"zone_id": 1505,
"postcode": "202055",
"address_1": "ramghat",
"address_2": "road",
"company": "letscmsletscms"
})
response = http.request(request)
puts response.read_body
Request
{
"firstname":"user3",
"lastname":"testing",
"city":"Aligarh",
"country_id":99,
"zone_id":1505,
"postcode":"202055",
"address_1":"ramghat",
"address_2":"road",
"company":"letscmsletscms"
}
Response
{
"status": true,
"errors": [],
"data": {
"address_id": 193,
"success": "Your address has been successfully added"
}
}
Customer Address Edit GET API
This APIs is used for get the information of customer addresses.
GET: {{site_domain}}/index.php?route=ocrestapi/account/address/edit&address_id=193
| Parameter | Type | Position | # | Description |
|---|---|---|---|---|
| token | string |
Headers |
Required |
Token is generate when user attempt login or register API. |
| address_id | Integer |
URL |
Required |
address_id is pass in the url then get the response otherwise the get error. |
| Parameter | token |
|---|---|
| Type | string |
| Position | Headers |
| # | Optional |
| Description | Token is generate when user attempt login or register API. |
| Parameter | address_id |
| Type | Integer |
| Position | URL |
| # | Required |
| Description | address_id is pass in the url then get the response otherwise the get error. |
'{{site_domain}}/index.php?route=ocrestapi/account/address/edit&address_id=186',
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(
'Authorization: Bearer dd3db2a576c38b5d570d28bd3e3574297429e967',
'Cookie: OCSESSID=3d4f9140811abcaf8b9f3df65a; currency=USD; language=en-gb'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var form = new FormData();
var settings = {
"url": "{{site_domain}}/index.php?route=ocrestapi/account/address/edit&address_id=186",
"method": "GET",
"timeout": 0,
"headers": {
"Authorization": "Bearer dd3db2a576c38b5d570d28bd3e3574297429e967",
"Cookie": "OCSESSID=3d4f9140811abcaf8b9f3df65a; currency=USD; language=en-gb"
},
"processData": false,
"mimeType": "multipart/form-data",
"contentType": false,
"data": form
};
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require('request');
var options = {
'method': 'GET',
'url': '{{site_domain}}/index.php?route=ocrestapi/account/address/edit&address_id=186',
'headers': {
'Authorization': 'Bearer dd3db2a576c38b5d570d28bd3e3574297429e967',
'Cookie': 'OCSESSID=3d4f9140811abcaf8b9f3df65a; currency=USD; language=en-gb'
},
formData: {
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
url = "{{site_domain}}/index.php?route=ocrestapi/account/address/edit&address_id=186"
payload={}
files={}
headers = {
'Authorization': 'Bearer dd3db2a576c38b5d570d28bd3e3574297429e967',
'Cookie': 'OCSESSID=3d4f9140811abcaf8b9f3df65a; currency=USD; language=en-gb'
}
response = requests.request("GET", url, headers=headers, data=payload, files=files)
print(response.text)
var client = new RestClient("{{site_domain}}/index.php?route=ocrestapi/account/address/edit&address_id=186");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer dd3db2a576c38b5d570d28bd3e3574297429e967");
request.AddHeader("Cookie", "OCSESSID=3d4f9140811abcaf8b9f3df65a; currency=USD; language=en-gb");
request.AlwaysMultipartFormData = true;
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request GET '{{site_domain}}/index.php?route=ocrestapi/account/address/edit&address_id=186' \
--header 'Authorization: Bearer dd3db2a576c38b5d570d28bd3e3574297429e967' \
--header 'Cookie: OCSESSID=3d4f9140811abcaf8b9f3df65a; currency=USD; language=en-gb'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("{{site_domain}}/index.php?route=ocrestapi/account/address/edit&address_id=186")
.method("GET", null)
.addHeader("Authorization", "Bearer dd3db2a576c38b5d570d28bd3e3574297429e967")
.addHeader("Cookie", "OCSESSID=3d4f9140811abcaf8b9f3df65a; currency=USD; language=en-gb")
.build();
Response response = client.newCall(request).execute();
require "uri"
require "net/http"
url = URI("{{site_domain}}/index.php?route=ocrestapi/account/address/edit&address_id=186")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["Authorization"] = "Bearer dd3db2a576c38b5d570d28bd3e3574297429e967"
request["Cookie"] = "OCSESSID=3d4f9140811abcaf8b9f3df65a; currency=USD; language=en-gb"
form_data = []
request.set_form form_data, 'multipart/form-data'
response = http.request(request)
puts response.read_body
Response
{
"status": true,
"errors": [],
"data": {
"country_id": "99",
"states": {
"244": [],
"1": [
{
"zone_id": "1",
"country_id": "1",
"name": "Badakhshan",
"code": "BDS",
"status": "1"
},
{
"zone_id": "2",
"country_id": "1",
"name": "Badghis",
"code": "BDG",
"status": "1"
},
{
"zone_id": "3",
"country_id": "1",
"name": "Baghlan",
"code": "BGL",
"status": "1"
},
.
.
.....
]
},
"language": {
"code": "en",
"direction": "ltr",
"date_format_short": "d/m/Y",
"date_format_long": "l dS F Y",
"time_format": "h:i:s A",
"datetime_format": "d/m/Y H:i:s",
"text_select": " --- Please Select --- ",
"text_all_zones": "All Zones",
"button_address_add": "Add Address",
"button_back": "Back",
"button_continue": "Continue",
"button_cart": "Add to Cart",
"button_cancel": "Cancel",
"button_delete": "Delete",
"button_download": "Download",
"button_edit": "Edit",
"button_filter": "Refine Search",
"button_reviews": "Reviews",
"button_search": "Search",
"button_shipping": "Apply Shipping",
"button_submit": "Submit",
"button_guest": "Guest Checkout",
"button_view": "View",
"button_list": "List",
"button_grid": "Grid",
"datepicker": "en-gb",
"heading_title": "Address Book",
"text_account": "Account",
"text_address_book": "Address Book Entries",
"text_address_add": "Add Address",
"text_address_edit": "Edit Address",
"entry_firstname": "First Name",
"entry_lastname": "Last Name",
"entry_company": "Company",
"entry_address_1": "Address 1",
"entry_address_2": "Address 2",
"entry_postcode": "Post Code",
"entry_city": "City",
"entry_country": "Country",
"entry_zone": "Region / State",
"entry_default": "Default Address",
"error_delete": "Warning: You must have at least one address!",
"error_default": "Warning: You can not delete your default address!",
"error_firstname": "First Name must be between 1 and 32 characters!",
"error_lastname": "Last Name must be between 1 and 32 characters!",
"error_address_1": "Address must be between 3 and 128 characters!",
"error_postcode": "Postcode must be between 2 and 10 characters!",
"error_city": "City must be between 2 and 128 characters!",
"error_country": "Please select a country!",
"error_zone": "Please select a region / state!",
"error_custom_field": "%s required!"
.
.
.......
}
}
Customer Address Edit POST API
This APIs is used for customer can edit our addresses.
POST: {{site_domain}}/index.php?route=ocrestapi/account/address/edit&address_id=193
| Parameter | Type | Position | # | Description |
|---|---|---|---|---|
| token | string |
Headers |
Required |
Token is generate when user attempt login or register API. |
| firstname | String |
Body |
Required |
firstname is number, character any special symbol. |
| lastname | Integer |
Body |
Required |
lastname is number, character any special symbol. |
| address_1 | String |
Body |
Required |
address_1 is number, character any special symbol. |
| city | String |
Body |
Required |
city is string |
| postcode | Number |
Body |
Required |
postcode should be number. |
| address_2 | Integer |
Body |
Optional |
address_2 is number, character any special symbol. |
| company | Integer |
Body |
Optional |
company is number, character any special symbol. |
| Parameter | token |
|---|---|
| Type | string |
| Position | Headers |
| # | Required |
| Description | Token is generate when user attempt login or register API |
| Parameter | firstname |
| Type | String |
| Position | Body |
| # | Required |
| Description | firstname is number, character any special symbol. |
| Parameter | lastname |
| Type | String |
| Position | Body |
| # | Required |
| Description | lastname is number, character any special symbol. |
| Parameter | address_1 |
| Type | String |
| Position | Body |
| # | Required |
| Description | address_1 is number, character any special symbol. |
| Parameter | city |
| Type | String |
| Position | Body |
| # | Required |
| Description | city is string name |
| Parameter | postcode |
| Type | Number |
| Position | Body |
| # | Required |
| Description | postcode should be number. |
| Parameter | address_2 |
| Type | String |
| Position | Body |
| # | Optional |
| Description | address_1 is number, character any special symbol. |
| Parameter | company |
| Type | String |
| Position | Body |
| # | Optional |
| Description | company is number, character any special symbol. |
'{{site_domain}}/index.php?route=ocrestapi/account/address/edit&address_id=193',
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 =>'{
"firstname":"user3",
"lastname": "testing",
"address_1":"nagala-mehtav-aligarh",
"address_2":"abc2",
"postcode": "404040",
"city": "Delhi",
"country_id":"99",
"zone_id":"1505"
}',
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334',
'Content-Type: application/json',
'Cookie: OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var settings = {
"url": "{{site_domain}}/index.php?route=ocrestapi/account/address/edit&address_id=193",
"method": "POST",
"timeout": 0,
"headers": {
"Authorization": "Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334",
"Content-Type": "application/json",
"Cookie": "OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb"
},
"data": JSON.stringify({
"firstname": "user3",
"lastname": "testing",
"address_1": "nagala-mehtav-aligarh",
"address_2": "abc2",
"postcode": "404040",
"city": "Delhi",
"country_id": "99",
"zone_id": "1505"
}),
};
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require('request');
var options = {
'method': 'POST',
'url': '{{site_domain}}/index.php?route=ocrestapi/account/address/edit&address_id=193',
'headers': {
'Authorization': 'Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334',
'Content-Type': 'application/json',
'Cookie': 'OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb'
},
body: JSON.stringify({
"firstname": "user3",
"lastname": "testing",
"address_1": "nagala-mehtav-aligarh",
"address_2": "abc2",
"postcode": "404040",
"city": "Delhi",
"country_id": "99",
"zone_id": "1505"
})
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
import json
url = "{{site_domain}}/index.php?route=ocrestapi/account/address/edit&address_id=193"
payload = json.dumps({
"firstname": "user3",
"lastname": "testing",
"address_1": "nagala-mehtav-aligarh",
"address_2": "abc2",
"postcode": "404040",
"city": "Delhi",
"country_id": "99",
"zone_id": "1505"
})
headers = {
'Authorization': 'Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334',
'Content-Type': 'application/json',
'Cookie': 'OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
var client = new RestClient("{{site_domain}}/index.php?route=ocrestapi/account/address/edit&address_id=193");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334");
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Cookie", "OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb");
var body = @"{
" + "\n" +
@"""firstname"":""user3"",
" + "\n" +
@"""lastname"": ""testing"",
" + "\n" +
@"""address_1"":""nagala-mehtav-aligarh"",
" + "\n" +
@"""address_2"":""abc2"",
" + "\n" +
@"""postcode"": ""404040"",
" + "\n" +
@" ""city"": ""Delhi"",
" + "\n" +
@"""country_id"":""99"",
" + "\n" +
@"""zone_id"":""1505""
" + "\n" +
@"
" + "\n" +
@"}";
request.AddParameter("application/json", body, ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request POST '{{site_domain}}/index.php?route=ocrestapi/account/address/edit&address_id=193' \
--header 'Authorization: Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334' \
--header 'Content-Type: application/json' \
--header 'Cookie: OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb' \
--data-raw '{
"firstname":"user3",
"lastname": "testing",
"address_1":"nagala-mehtav-aligarh",
"address_2":"abc2",
"postcode": "404040",
"city": "Delhi",
"country_id":"99",
"zone_id":"1505"
}'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n\"firstname\":\"user3\", \r\n\"lastname\": \"testing\",\r\n\"address_1\":\"nagala-mehtav-aligarh\",\r\n\"address_2\":\"abc2\",\r\n\"postcode\": \"404040\",\r\n \"city\": \"Delhi\",\r\n\"country_id\":\"99\",\r\n\"zone_id\":\"1505\"\r\n\r\n}");
Request request = new Request.Builder()
.url("{{site_domain}}/index.php?route=ocrestapi/account/address/edit&address_id=193")
.method("POST", body)
.addHeader("Authorization", "Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334")
.addHeader("Content-Type", "application/json")
.addHeader("Cookie", "OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb")
.build();
Response response = client.newCall(request).execute();
require "uri"
require "json"
require "net/http"
url = URI("{{site_domain}}/index.php?route=ocrestapi/account/address/edit&address_id=193")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)
request["Authorization"] = "Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334"
request["Content-Type"] = "application/json"
request["Cookie"] = "OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb"
request.body = JSON.dump({
"firstname": "user3",
"lastname": "testing",
"address_1": "nagala-mehtav-aligarh",
"address_2": "abc2",
"postcode": "404040",
"city": "Delhi",
"country_id": "99",
"zone_id": "1505"
})
response = http.request(request)
puts response.read_body
Request
{
"firstname":"user3",
"lastname": "testing",
"address_1":"nagala-mehtav-aligarh",
"address_2":"abc2",
"postcode": "404040",
"city": "Delhi",
"country_id":"99",
"zone_id":"1505"
}
Response
{
"status": true,
"errors": [],
"data": {
"address_id": "193",
"success": "Your address has been successfully updated"
}
}
Customer Address Delete POST API
This APIs is used for delate the addresses of the customer on the basis of address_id.
POST: {{site_domain}}/index.php?route=ocrestapi/account/address/delete
| Parameter | Type | Position | # | Description |
|---|---|---|---|---|
| token | string |
Headers |
Required |
Token is generate when user attempt login or register API. |
| address_id | Integer/string |
Body |
Required |
address_id is pass in the variable is address_id in Body ex { "address_id"="185" }. |
| Parameter | token |
|---|---|
| Type | string |
| Position | Headers |
| # | Required |
| Description | Token is generate when user attempt login or register API. |
| Parameter | address_id |
| Type | Integer |
| Position | Body |
| # | Required |
| Description | address_id is pass in the variable is address_id in Body ex { "address_id"="185" }. |
'{{site_domain}}/index.php?route=ocrestapi/account/address/delete',
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 =>'{
"address_id":"193"
}',
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334',
'Content-Type: application/json',
'Cookie: OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var settings = {
"url": "{{site_domain}}/index.php?route=ocrestapi/account/address/delete",
"method": "POST",
"timeout": 0,
"headers": {
"Authorization": "Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334",
"Content-Type": "application/json",
"Cookie": "OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb"
},
"data": JSON.stringify({
"address_id": "193"
}),
};
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require('request');
var options = {
'method': 'POST',
'url': '{{site_domain}}/index.php?route=ocrestapi/account/address/delete',
'headers': {
'Authorization': 'Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334',
'Content-Type': 'application/json',
'Cookie': 'OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb'
},
body: JSON.stringify({
"address_id": "193"
})
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
import json
url = "{{site_domain}}/index.php?route=ocrestapi/account/address/delete"
payload = json.dumps({
"address_id": "193"
})
headers = {
'Authorization': 'Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334',
'Content-Type': 'application/json',
'Cookie': 'OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
var client = new RestClient("{{site_domain}}/index.php?route=ocrestapi/account/address/delete");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334");
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Cookie", "OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb");
var body = @"{
" + "\n" +
@" ""address_id"":""193""
" + "\n" +
@"}";
request.AddParameter("application/json", body, ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request POST '{{site_domain}}/index.php?route=ocrestapi/account/address/delete' \
--header 'Authorization: Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334' \
--header 'Content-Type: application/json' \
--header 'Cookie: OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb' \
--data-raw '{
"address_id":"193"
}'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n \"address_id\":\"193\"\r\n}");
Request request = new Request.Builder()
.url("{{site_domain}}/index.php?route=ocrestapi/account/address/delete")
.method("POST", body)
.addHeader("Authorization", "Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334")
.addHeader("Content-Type", "application/json")
.addHeader("Cookie", "OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb")
.build();
Response response = client.newCall(request).execute();
require "uri"
require "json"
require "net/http"
url = URI("{{site_domain}}/index.php?route=ocrestapi/account/address/delete")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)
request["Authorization"] = "Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334"
request["Content-Type"] = "application/json"
request["Cookie"] = "OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb"
request.body = JSON.dump({
"address_id": "193"
})
response = http.request(request)
puts response.read_body
Request
{
"address_id":"193"
}
Response
{
"status": true,
"errors": [],
"data": {
"success": "Your address has been successfully deleted"
}
}
Customer Account GET API
This APIs is used for get the information of customer account.
GET: {{site_domain}}/index.php?route=ocrestapi/account/account
| Parameter | Type | Position | # | Description |
|---|---|---|---|---|
| token | string |
Headers |
Required |
Token is generate when user attempt login or register API. |
| Parameter | token |
|---|---|
| Type | string |
| Position | Headers |
| # | Required |
| Description | Token is generate when user attempt login or register API. |
'{{site_domain}}/index.php?route=ocrestapi/account/account',
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(
'Authorization: Bearer dd3db2a576c38b5d570d28bd3e3574297429e967',
'Cookie: OCSESSID=1407bb9419c79f18ecb7026d36; currency=USD; language=en-gb'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var form = new FormData();
var settings = {
"url": "{{site_domain}}/index.php?route=ocrestapi/account/account",
"method": "GET",
"timeout": 0,
"headers": {
"Authorization": "Bearer dd3db2a576c38b5d570d28bd3e3574297429e967",
"Cookie": "OCSESSID=1407bb9419c79f18ecb7026d36; currency=USD; language=en-gb"
},
"processData": false,
"mimeType": "multipart/form-data",
"contentType": false,
"data": form
};
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require('request');
var options = {
'method': 'GET',
'url': '{{site_domain}}/index.php?route=ocrestapi/account/account',
'headers': {
'Authorization': 'Bearer dd3db2a576c38b5d570d28bd3e3574297429e967',
'Cookie': 'OCSESSID=1407bb9419c79f18ecb7026d36; currency=USD; language=en-gb'
},
formData: {
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
url = "{{site_domain}}/index.php?route=ocrestapi/account/account"
payload={}
files={}
headers = {
'Authorization': 'Bearer dd3db2a576c38b5d570d28bd3e3574297429e967',
'Cookie': 'OCSESSID=1407bb9419c79f18ecb7026d36; currency=USD; language=en-gb'
}
response = requests.request("GET", url, headers=headers, data=payload, files=files)
print(response.text)
var client = new RestClient("{{site_domain}}/index.php?route=ocrestapi/account/account");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer dd3db2a576c38b5d570d28bd3e3574297429e967");
request.AddHeader("Cookie", "OCSESSID=1407bb9419c79f18ecb7026d36; currency=USD; language=en-gb");
request.AlwaysMultipartFormData = true;
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request GET '{{site_domain}}/index.php?route=ocrestapi/account/account' \
--header 'Authorization: Bearer dd3db2a576c38b5d570d28bd3e3574297429e967' \
--header 'Cookie: OCSESSID=1407bb9419c79f18ecb7026d36; currency=USD; language=en-gb'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("{{site_domain}}/index.php?route=ocrestapi/account/account")
.method("GET", null)
.addHeader("Authorization", "Bearer dd3db2a576c38b5d570d28bd3e3574297429e967")
.addHeader("Cookie", "OCSESSID=1407bb9419c79f18ecb7026d36; currency=USD; language=en-gb")
.build();
Response response = client.newCall(request).execute();
require "uri"
require "net/http"
url = URI("{{site_domain}}/index.php?route=ocrestapi/account/account")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["Authorization"] = "Bearer dd3db2a576c38b5d570d28bd3e3574297429e967"
request["Cookie"] = "OCSESSID=1407bb9419c79f18ecb7026d36; currency=USD; language=en-gb"
form_data = []
request.set_form form_data, 'multipart/form-data'
response = http.request(request)
puts response.read_body
Response
{
"status": true,
"errors": [],
"data": {
"logo": "{{site_domain}}/image/catalog/logo_white.jpg",
"store_name": "Letscms Shop",
"icon": "{{site_domain}}/image/catalog/logo.png",
"telephone": "123456789",
"languages": [
{
"name": "English",
"code": "en-gb"
},
{
"name": "Indonesia",
"code": "id-id"
}
],
"currencies": [
{
"title": "Euro",
"code": "EUR",
"symbol_left": "",
"symbol_right": "€"
},
{
"title": "US Dollar",
"code": "USD",
"symbol_left": "$",
"symbol_right": ""
}
.
.
]
},
"language": {
"code": "en",
"direction": "ltr",
"date_format_short": "d/m/Y",
"date_format_long": "l dS F Y",
"time_format": "h:i:s A",
"datetime_format": "d/m/Y H:i:s",
"decimal_point": ".",
"thousand_point": ",",
"text_home": "",
"text_yes": "Yes",
"text_no": "No",
"text_loading": "Loading...",
"text_no_results": "No results!",
"button_coupon": "Apply Coupon",
"button_delete": "Delete",
"button_download": "Download",
"button_edit": "Edit",
"button_view": "View",
"datepicker": "en-gb",
"heading_title": "Account",
"text_account": "My Account",
"text_my_account": "My Account",
"text_my_orders": "My Orders",
"text_my_affiliate": "My Affiliate Account",
"text_my_newsletter": "Newsletter",
"text_edit": "Edit Account",
"text_password": "Password",
"text_api_tab_home": "Home",
"text_api_tab_cart": "Cart",
"text_api_tab_wishlist": "Wishlist",
"text_api_tab_info": "Info",
"entry_api_old_password": "Old Password",
"entry_api_new_password": "New Password",
"button_view_all": "View All",
"text_cart_success": " Success: You have added product to your shopping cart",
"error_input_text": "Text is required !",
"error_input_name": "Name is required !",
"message_success_cart": "Success: You have added %s to your shopping cart!\","
.
.
.
}
}
Customer Forgotten Password GET API
This APIs is used for get the information of customer account.
GET: {{site_domain}}/index.php?route=ocrestapi/account/forgotten
| Parameter | Type | Position | # | Description |
|---|---|---|---|---|
| token | string |
Headers |
Required |
Token is generate when user attempt login or register API. |
| Parameter | token |
|---|---|
| Type | string |
| Position | Headers |
| # | Required |
| Description | Token is generate when user attempt login or register API. |
'{{site_domain}}/index.php?route=ocrestapi/account/forgotten',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_POSTFIELDS => array('email' => 'example@test.com'),
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334',
'Cookie: OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var form = new FormData();
form.append("email", "example@test.com");
var settings = {
"url": "{{site_domain}}/index.php?route=ocrestapi/account/forgotten",
"method": "GET",
"timeout": 0,
"headers": {
"Authorization": "Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334",
"Cookie": "OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb"
},
"processData": false,
"mimeType": "multipart/form-data",
"contentType": false,
"data": form
};
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require('request');
var options = {
'method': 'GET',
'url': '{{site_domain}}/index.php?route=ocrestapi/account/forgotten',
'headers': {
'Authorization': 'Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334',
'Cookie': 'OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb'
},
formData: {
'email': 'example@test.com'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
url = "{{site_domain}}/index.php?route=ocrestapi/account/forgotten"
payload={'email': 'example@test.com'}
files=[
]
headers = {
'Authorization': 'Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334',
'Cookie': 'OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb'
}
response = requests.request("GET", url, headers=headers, data=payload, files=files)
print(response.text)
var client = new RestClient("{{site_domain}}/index.php?route=ocrestapi/account/forgotten");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334");
request.AddHeader("Cookie", "OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb");
request.AlwaysMultipartFormData = true;
request.AddParameter("email", "example@test.com");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request GET '{{site_domain}}/index.php?route=ocrestapi/account/forgotten' \
--header 'Authorization: Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334' \
--header 'Cookie: OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb' \
--form 'email="example@test.com"'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("{{site_domain}}/index.php?route=ocrestapi/account/forgotten")
.method("GET", null)
.addHeader("Authorization", "Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334")
.addHeader("Cookie", "OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb")
.build();
Response response = client.newCall(request).execute();
require "uri"
require "net/http"
url = URI("{{site_domain}}/index.php?route=ocrestapi/account/forgotten")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["Authorization"] = "Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334"
request["Cookie"] = "OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb"
form_data = [['email', 'example@test.com']]
request.set_form form_data, 'multipart/form-data'
response = http.request(request)
puts response.read_body
Response
{
"status": true,
"errors": [],
"data": [],
"language": {
"code": "en",
"direction": "ltr",
"date_format_short": "d/m/Y",
"date_format_long": "l dS F Y",
"time_format": "h:i:s A",
"datetime_format": "d/m/Y H:i:s",
"decimal_point": ".",
"thousand_point": ",",
"text_home": "",
"text_yes": "Yes",
"text_no": "No",
"text_none": " --- None --- ",
"text_select": " --- Please Select --- ",
"text_all_zones": "All Zones",
"text_checkout_success": "Your order has been successfully processed!
You can view your order history by clicking on history from My Orders Menu.
If your purchase has an associated download, you can go to the account downloads page to view them.
Please direct any questions you have to the store owner.
Thanks for shopping with us online!",
"text_coupon_title": "Use Coupon Code",
"text_coupon": "Coupon (%s)",
"text_coupon_success": "Success: Your coupon discount has been applied!",
"error_shipping_no_shipping": "Warning: No Shipping options are available. Please contact us for assistance!",
"error_required_amount": "Amount is required.",
"error_quantity": "Quantity could not be 0",
"error_wishlist_login": "You must login or create an account to save %s to your wish list!",
"message_success_cart": "Success: You have added %s to your shopping cart!",
"error_chekout_confirm": "You must confirm true to place an order",
.
.
........
}
}
Customer Forgotten Password POST API
This APIs is used for reset the password of customer when the customer is forget the password then run this apis and then fill email id in body of request then submit and then get the opt in the response that means password is reset and make new password run update APIs.
POST: {{site_domain}}/index.php?route=ocrestapi/account/forgotten
| Parameter | Type | Position | # | Description |
|---|---|---|---|---|
| token | string |
Headers |
Required |
Token is generate when user attempt login or register API. |
String |
Body |
Required |
email id fill whatevar you want forget the password. |
| Parameter | token |
|---|---|
| Type | string |
| Position | Headers |
| # | Required |
| Description | Token is generate when user attempt login or register API |
| Parameter | |
| Type | String |
| Position | Body |
| # | Required |
| Description | email id fill whatevar you want forget the password. |
'{{site_domain}}/index.php?route=ocrestapi/account/forgotten',
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 =>'{
"email":"example@test.com"
}',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'Cookie: OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var settings = {
"url": "{{site_domain}}/index.php?route=ocrestapi/account/forgotten",
"method": "POST",
"timeout": 0,
"headers": {
"Content-Type": "application/json",
"Cookie": "OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb"
},
"data": JSON.stringify({
"email": "example@test.com"
}),
};
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require('request');
var options = {
'method': 'POST',
'url': '{{site_domain}}/index.php?route=ocrestapi/account/forgotten',
'headers': {
'Content-Type': 'application/json',
'Cookie': 'OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb'
},
body: JSON.stringify({
"email": "example@test.com"
})
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
import json
url = "{{site_domain}}/index.php?route=ocrestapi/account/forgotten"
payload = json.dumps({
"email": "example@test.com"
})
headers = {
'Content-Type': 'application/json',
'Cookie': 'OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
var client = new RestClient("{{site_domain}}/index.php?route=ocrestapi/account/forgotten");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Cookie", "OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb");
var body = @"{
" + "\n" +
@" ""email"":""example@test.com""
" + "\n" +
@"}";
request.AddParameter("application/json", body, ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request POST '{{site_domain}}/index.php?route=ocrestapi/account/forgotten' \
--header 'Content-Type: application/json' \
--header 'Cookie: OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb' \
--data-raw '{
"email":"example@test.com"
}'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n \"email\":\"example@test.com\"\r\n}");
Request request = new Request.Builder()
.url("{{site_domain}}/index.php?route=ocrestapi/account/forgotten")
.method("POST", body)
.addHeader("Content-Type", "application/json")
.addHeader("Cookie", "OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb")
.build();
Response response = client.newCall(request).execute();
require "uri"
require "json"
require "net/http"
url = URI("{{site_domain}}/index.php?route=ocrestapi/account/forgotten")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)
request["Content-Type"] = "application/json"
request["Cookie"] = "OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb"
request.body = JSON.dump({
"email": "example@test.com"
})
response = http.request(request)
puts response.read_body
Request
{
"email":"example@test.com"
}
Response
{
"status": true,
"errors": [],
"data": {
"otp": 811286,
"email": "example@test.com"
}
}
Customer Forgotten Password Update POST API
This APIs is used for update the password of customer email id. User will fill email and new password in body of request then submit and then update/change the password of that email.
POST: {{site_domain}}/index.php?route=ocrestapi/account/forgotten/updatepassword
| Parameter | Type | Position | # | Description |
|---|---|---|---|---|
| token | string |
Headers |
Required |
Token is generate when user attempt login or register API. |
String |
Body |
Required |
email id fill whatevar you want forget the password then update | |
| password | String |
Body |
Required |
New password will file in password. |
| Parameter | token |
|---|---|
| Type | string |
| Position | Headers |
| # | Required |
| Description | Token is generate when user attempt login or register API |
| Parameter | |
| Type | String |
| Position | Body |
| # | Required |
| Description | email id fill whatevar you want forget the password then update. | Parameter | password |
| Type | String |
| Position | Body |
| # | Required |
| Description | New password will file in password. |
'{{site_domain}}/index.php?route=ocrestapi/account/forgotten/updatepassword',
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 =>'{
"email":"example@test.com",
"password":"111111"
}',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'Cookie: OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var settings = {
"url": "{{site_domain}}/index.php?route=ocrestapi/account/forgotten/updatepassword",
"method": "POST",
"timeout": 0,
"headers": {
"Content-Type": "application/json",
"Cookie": "OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb"
},
"data": JSON.stringify({
"email": "example@test.com",
"password": "111111"
}),
};
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require('request');
var options = {
'method': 'POST',
'url': '{{site_domain}}/index.php?route=ocrestapi/account/forgotten/updatepassword',
'headers': {
'Content-Type': 'application/json',
'Cookie': 'OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb'
},
body: JSON.stringify({
"email": "example@test.com",
"password": "111111"
})
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
import json
url = "{{site_domain}}/index.php?route=ocrestapi/account/forgotten/updatepassword"
payload = json.dumps({
"email": "example@test.com",
"password": "111111"
})
headers = {
'Content-Type': 'application/json',
'Cookie': 'OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
var client = new RestClient("{{site_domain}}/index.php?route=ocrestapi/account/forgotten/updatepassword");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Cookie", "OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb");
var body = @"{
" + "\n" +
@" ""email"":""example@test.com"",
" + "\n" +
@" ""password"":""111111""
" + "\n" +
@"
" + "\n" +
@"}";
request.AddParameter("application/json", body, ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request POST '{{site_domain}}/index.php?route=ocrestapi/account/forgotten/updatepassword' \
--header 'Content-Type: application/json' \
--header 'Cookie: OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb' \
--data-raw '{
"email":"example@test.com",
"password":"111111"
}'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n \"email\":\"example@test.com\",\r\n \"password\":\"111111\"\r\n \r\n}");
Request request = new Request.Builder()
.url("{{site_domain}}/index.php?route=ocrestapi/account/forgotten/updatepassword")
.method("POST", body)
.addHeader("Content-Type", "application/json")
.addHeader("Cookie", "OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb")
.build();
Response response = client.newCall(request).execute();
require "uri"
require "json"
require "net/http"
url = URI("{{site_domain}}/index.php?route=ocrestapi/account/forgotten/updatepassword")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)
request["Content-Type"] = "application/json"
request["Cookie"] = "OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb"
request.body = JSON.dump({
"email": "example@test.com",
"password": "111111"
})
response = http.request(request)
puts response.read_body
Request
{
"email":"example@test.com",
"password":"111111"
}
Response
{
"status": true,
"errors": [],
"data": []
}
Get Categories List GET API
This APIs is used for get the Information of Categories List.
GET: {{site_domain}}/index.php?route=ocrestapi/common/category
| Parameter | Type | Position | # | Description |
|---|---|---|---|---|
| token | string |
Headers |
Required |
Token is generate when user attempt login or register API. |
| Parameter | token |
|---|---|
| Type | string |
| Position | Headers |
| # | Required |
| Description | Token is generate when user attempt login or register API. |
'{{site_domain}}/index.php?route=ocrestapi/common/category',
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(
'Authorization: Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334',
'Cookie: OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var settings = {
"url": "{{site_domain}}/index.php?route=ocrestapi/common/category",
"method": "GET",
"timeout": 0,
"headers": {
"Authorization": "Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334",
"Cookie": "OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb"
},
};
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require('request');
var options = {
'method': 'GET',
'url': '{{site_domain}}/index.php?route=ocrestapi/common/category',
'headers': {
'Authorization': 'Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334',
'Cookie': 'OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
url = "{{site_domain}}/index.php?route=ocrestapi/common/category"
payload={}
headers = {
'Authorization': 'Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334',
'Cookie': 'OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
var client = new RestClient("{{site_domain}}/index.php?route=ocrestapi/common/category");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334");
request.AddHeader("Cookie", "OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request GET '{{site_domain}}/index.php?route=ocrestapi/common/category' \
--header 'Authorization: Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334' \
--header 'Cookie: OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("{{site_domain}}/index.php?route=ocrestapi/common/category")
.method("GET", null)
.addHeader("Authorization", "Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334")
.addHeader("Cookie", "OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb")
.build();
Response response = client.newCall(request).execute();
require "uri"
require "net/http"
url = URI("{{site_domain}}/index.php?route=ocrestapi/common/category")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["Authorization"] = "Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334"
request["Cookie"] = "OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb"
response = http.request(request)
puts response.read_body
Response
{
"status": true,
"errors": [],
"data": {
"categories": [
{
"category_id": "20",
"image": "{{site_domain}}/image/catalog/demo/compaq_presario.jpg",
"parent_id": "0",
"top": "1",
"column": "1",
"sort_order": "1",
"status": "1",
"date_added": "2009-01-05 21:49:43",
"date_modified": "2011-07-16 02:14:42",
"language_id": "1",
"name": "Desktops",
"description": "<p>\r\n\tExample of category description text</p>\r\n",
"meta_title": "Desktops",
"meta_description": "Example of category description",
"meta_keyword": "",
"store_id": "0",
"icon": "{{site_domain}}/image/cache/catalog/logo-50x50.png",
"children": [
{
"category_id": "26",
"image": "",
"parent_id": "20",
"top": "0",
"column": "0",
"sort_order": "1",
"status": "1",
"date_added": "2009-01-31 01:55:14",
"date_modified": "2010-08-22 06:31:45",
"language_id": "1",
"name": "PC",
"description": "",
"meta_title": "PC",
"meta_description": "",
"meta_keyword": "",
"store_id": "0",
"icon": "{{site_domain}}/image/cache/catalog/demo/banners/iPhone6-50x50.jpg",
}
{
"category_id": "27",
"image": "",
"parent_id": "20",
"top": "0",
"column": "0",
"sort_order": "2",
"status": "1",
"date_added": "2009-01-31 01:55:34",
"date_modified": "2010-08-22 06:32:15",
"language_id": "1",
"name": "Mac",
"description": "",
"meta_title": "Mac",
"meta_description": "",
"meta_keyword": "",
"store_id": "0",
"icon": "{{site_domain}}/image/cache/catalog/demo/canon_eos_5d_1-50x50.jpg",
"children": []
}
]
},
.
.
.
.
]
},
"language": {
"code": "en",
"direction": "ltr",
"date_format_short": "d/m/Y",
"date_format_long": "l dS F Y",
"time_format": "h:i:s A",
"datetime_format": "d/m/Y H:i:s",
"decimal_point": ".",
"thousand_point": ",",
"text_home": "",
"text_yes": "Yes",
"button_coupon": "Apply Coupon",
"button_delete": "Delete",
"button_download": "Download",
"text_coupon_success": "Success: Your coupon discount has been applied!",
"entry_coupon_coupon": "Enter your coupon here",
"error_required_from_name": "Your Name is required.",
.
.
.
.
}
}
Products List API
This APIs is used for get the Information of Products List.
GET: {{site_domain}}/index.php?route=ocrestapi/product/listing&category_ids=20
| Parameter | Type | Position | # | Description |
|---|---|---|---|---|
| token | string |
Headers |
Required |
Token is generate when user attempt login or register API. |
| Parameter | token |
|---|---|
| Type | string |
| Position | Headers |
| # | Required |
| Description | Token is generate when user attempt login or register API. |
'{{site_domain}}/index.php?route=ocrestapi/product/listing&search=mac%20book%20pro&category_ids=20',
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(
'Authorization: Bearer 808beb3b75c5b6a5389797cb841a42a76376e5fe',
'Cookie: OCSESSID=af1fefd50ebc18c60a21513aa0; currency=USD; language=en-gb'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var settings = {
"url": "{{site_domain}}/index.php?route=ocrestapi/product/listing&search=mac book pro&category_ids=20",
"method": "GET",
"timeout": 0,
"headers": {
"Authorization": "Bearer 808beb3b75c5b6a5389797cb841a42a76376e5fe",
"Cookie": "OCSESSID=af1fefd50ebc18c60a21513aa0; currency=USD; language=en-gb"
},
};
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require('request');
var options = {
'method': 'GET',
'url': '{{site_domain}}/index.php?route=ocrestapi/product/listing&search=mac book pro&category_ids=20',
'headers': {
'Authorization': 'Bearer 808beb3b75c5b6a5389797cb841a42a76376e5fe',
'Cookie': 'OCSESSID=af1fefd50ebc18c60a21513aa0; currency=USD; language=en-gb'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
url = "{{site_domain}}/index.php?route=ocrestapi/product/listing&search=mac book pro&category_ids=20"
payload={}
headers = {
'Authorization': 'Bearer 808beb3b75c5b6a5389797cb841a42a76376e5fe',
'Cookie': 'OCSESSID=af1fefd50ebc18c60a21513aa0; currency=USD; language=en-gb'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
var client = new RestClient("{{site_domain}}/index.php?route=ocrestapi/product/listing&search=mac book pro&category_ids=20");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer 808beb3b75c5b6a5389797cb841a42a76376e5fe");
request.AddHeader("Cookie", "OCSESSID=af1fefd50ebc18c60a21513aa0; currency=USD; language=en-gb");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request GET '{{site_domain}}/index.php?route=ocrestapi/product/listing&search=mac book pro&category_ids=20' \
--header 'Authorization: Bearer 808beb3b75c5b6a5389797cb841a42a76376e5fe' \
--header 'Cookie: OCSESSID=af1fefd50ebc18c60a21513aa0; currency=USD; language=en-gb'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("{{site_domain}}/index.php?route=ocrestapi/product/listing&search=mac book pro&category_ids=20")
.method("GET", null)
.addHeader("Authorization", "Bearer 808beb3b75c5b6a5389797cb841a42a76376e5fe")
.addHeader("Cookie", "OCSESSID=af1fefd50ebc18c60a21513aa0; currency=USD; language=en-gb")
.build();
Response response = client.newCall(request).execute();
require "uri"
require "net/http"
url = URI("{{site_domain}}/index.php?route=ocrestapi/product/listing&search=mac book pro&category_ids=20")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["Authorization"] = "Bearer 808beb3b75c5b6a5389797cb841a42a76376e5fe"
request["Cookie"] = "OCSESSID=af1fefd50ebc18c60a21513aa0; currency=USD; language=en-gb"
response = http.request(request)
puts response.read_body
Response
{
"status": true,
"errors": [],
"data": {
"products": [
{
"product_id": "42",
"thumb": "{{site_domain}}/image/cache/catalog/demo/apple_cinema_30-228x228.jpg",
"name": "Apple Cinema 30"",
"model": "Product 15",
"description": "The 30-inch Apple Cinema HD Display delivers an amazing 2560 x 1600 pixel resolution. Designed speci..",
"price": "$100.00",
"special": "$90.00",
"tax": "$90.00",
"minimum": "1",
"rating": 3,
"reviews": "4",
"wishlist_status": false,
"is_options": true,
"is_recuring_product": false
},
{
"product_id": "43",
"thumb": "{{site_domain}}/image/cache/catalog/demo/macbook_1-228x228.jpg",
"name": "MacBook",
"model": "Product 16",
"description": "Intel Core 2 Duo processor\r\n\t\r\n\t\tPowered by an Intel Core 2 Duo processor at speeds up to 2.16GHz, t..",
"price": "$500.00",
"special": "$99.00",
"tax": "$99.00",
"minimum": "1",
"rating": 4,
"reviews": "2",
"wishlist_status": false,
"is_options": false,
"is_recuring_product": false
}
],
"sorts": [
{
"text": "Default",
"value": "p.sort_order-ASC",
"sort": "p.sort_order",
"order": "ASC"
},
{
"text": "Name (A - Z)",
"value": "pd.name-ASC",
"sort": "pd.name",
"order": "ASC"
},
{
"text": "Name (Z - A)",
"value": "pd.name-DESC",
"sort": "pd.name",
"order": "DESC"
},
{
"text": "Price (Low > High)",
"value": "p.price-ASC",
"sort": "p.price",
"order": "ASC"
},
{
"text": "Price (High > Low)",
"value": "p.price-DESC",
"sort": "p.price",
"order": "DESC"
},
.
.......
]
},
"language": {
"code": "en",
"direction": "ltr",
"date_format_short": "d/m/Y",
"date_format_long": "l dS F Y",
"time_format": "h:i:s A",
"datetime_format": "d/m/Y H:i:s",
"decimal_point": ".",
"thousand_point": ",",
"text_yes": "Yes",
"button_login": "Login",
"text_name_asc": "Name (A - Z)",
"text_name_desc": "Name (Z - A)",
"text_price_asc": "Price (Low > High)",
"text_limit": "Show:",
"error_required_firstname": "Firstname is required.",
"text_cart_success": " Success: You have added product to your shopping cart",
"text_return_success": "Thank you for submitting your return request. Your request has been sent o
"text_voucher_success": "Success: Your gift certificate discount has been applied!",
"entry_voucher_voucher": "Enter your gift certificate code here",
"error_shipping_postcode": "Postcode must be between 2 and 10 characters!",
.
.
.
}
}
Products Details GET API
This APIs is used for get the Information of Products.
GET: {{site_domain}}/index.php?route=ocrestapi/product/product&product_id=42
| Parameter | Type | Position | # | Description |
|---|---|---|---|---|
| token | string |
Headers |
Required |
Token is generate when user attempt login or register API. |
| product_id | Integer |
URL |
Required |
Customer can get the products Details of that Prodcut by product_id. If The customer Not fill the product_id in url then customer can't get product details. |
| Parameter | token |
|---|---|
| Type | string |
| Position | Headers |
| # | Required |
| Description | Token is generate when user attempt login or register API. |
| Parameter | product_id |
| Type | Integer |
| Position | URL |
| # | Required |
| Description | Customer can get the products Details of that Prodcut by product_id. If The customer Not fill the product_id in url then customer can't get product details. |
'{{site_domain}}/index.php?route=ocrestapi/product/product&product_id=42',
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(
'Authorization: Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334',
'Cookie: OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var form = new FormData();
var settings = {
"url": "{{site_domain}}/index.php?route=ocrestapi/product/product&product_id=42",
"method": "GET",
"timeout": 0,
"headers": {
"Authorization": "Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334",
"Cookie": "OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb"
},
"processData": false,
"mimeType": "multipart/form-data",
"contentType": false,
"data": form
};
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require('request');
var options = {
'method': 'GET',
'url': '{{site_domain}}/index.php?route=ocrestapi/product/product&product_id=42',
'headers': {
'Authorization': 'Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334',
'Cookie': 'OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb'
},
formData: {
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
url = "{{site_domain}}/index.php?route=ocrestapi/product/product&product_id=42"
payload={}
files={}
headers = {
'Authorization': 'Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334',
'Cookie': 'OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb'
}
response = requests.request("GET", url, headers=headers, data=payload, files=files)
print(response.text)
var client = new RestClient("{{site_domain}}/index.php?route=ocrestapi/product/product&product_id=42");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334");
request.AddHeader("Cookie", "OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb");
request.AlwaysMultipartFormData = true;
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request GET '{{site_domain}}/index.php?route=ocrestapi/product/product&product_id=42' \
--header 'Authorization: Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334' \
--header 'Cookie: OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("{{site_domain}}/index.php?route=ocrestapi/product/product&product_id=42")
.method("GET", null)
.addHeader("Authorization", "Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334")
.addHeader("Cookie", "OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb")
.build();
Response response = client.newCall(request).execute();
require "uri"
require "net/http"
url = URI("{{site_domain}}/index.php?route=ocrestapi/product/product&product_id=42")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["Authorization"] = "Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334"
request["Cookie"] = "OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb"
form_data = []
request.set_form form_data, 'multipart/form-data'
response = http.request(request)
puts response.read_body
Response
{
"status": true,
"errors": [],
"data": {
"heading_title": "Apple Cinema 30"",
"text_login": "Pleaselogin or register to review",
"tab_review": "Reviews (4)",
"product_id": 42,
"manufacturer": "Apple",
"manufacturers": "ocrestapi/product/manufacturer/info",
"manufacturer_id": "8",
"model": "Product 15",
"reward": "100",
"points": "400",
"description": "The 30-inch Apple Cinema HD Display delivers an amazing 2560 x 1600 pixel resolution. Designed specifically for the creative professional,
"
.
.
.
,
"stock": "In Stock",
"images": [
{
"popup": "{{site_domain}}/image/cache/catalog/demo/apple_cinema_30-500x500.jpg",
"thumb": "{{site_domain}}/image/cache/catalog/demo/apple_cinema_30-228x228.jpg"
},
.
.
],
"price": "$100.00",
"special": "$90.00",
"tax": "$90.00",
"discounts": [
{
"quantity": "10",
"price": "$88.00"
},
.
.
],
"options": [
{
"product_option_id": "218",
"product_option_value": [
{
"product_option_value_id": "5",
"option_value_id": "32",
"name": "Small",
"image": null,
"price": "$10.00",
"price_prefix": "+"
},
.
.
.
],
"option_id": "1",
"name": "Radio",
"type": "radio",
"value": "",
"required": "1"
},
{
"product_option_id": "208",
"product_option_value": [],
"option_id": "4",
"name": "Text",
"type": "text",
"value": "test",
"required": "1"
},
.
.
.
],
"minimum": "2",
"review_status": "1",
"rating": 3,
"rating_data": {
"average": "2.5",
"total_rating": "4",
"one_star_rating": "1",
},
"wishlist_status": false,
"captcha": "",
"share": "ocrestapi/product/product",
"attribute_groups": [
{
"attribute_group_id": "6",
"name": "Processor",
"attribute": [
{
"attribute_id": "3",
"name": "Clockspeed",
"text": "100mhz"
}
]
}
],
"products": [
{
"product_id": "28",
"thumb": "{{site_domain}}/image/cache/catalog/demo/htc_touch_hd_1-200x200.jpg",
"name": "HTC Touch HD",
"description": "HTC Touch - in High Definition. Watch music videos and streaming content in awe-inspiring high defin..",
"price": "$100.00",
"model": "Product 1",
"special": false,
"tax": "$100.00",
"minimum": "1",
"rating": 0,
"review_count": 0,
"wishlist_status": false,
"is_options": false,
"is_recuring_product": false
},
.
.
],
"tags": [],
"reviews": [
{
"review_id": "50",
"author": "Pankaj Soni",
"text": "It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout).",
"rating": 4,
"date_added": "04/01/2021"
},
.
.
],
"recurrings": []
},
"language": {
"code": "en",
"direction": "ltr",
"date_format_short": "d/m/Y",
"date_format_long": "l dS F Y",
"time_format": "h:i:s A",
"text_login": "Please login or register to review",
"text_no_reviews": "There are no reviews for this product.",
"text_success": "Thank you for your review. It has been submitted to the webmaster for approval.",
"text_related": "Related Products",
"text_tags": "Tags:",
"entry_shipping_zone": "Region / State",
"entry_shipping_postcode": "Post Code",
"error_shipping_postcode": "Postcode must be between 2 and 10 characters!",
.
.
.
}
}
Product Review Details GET API
This APIs is used for get the Information of Products Review. This APIs Display the review only that products status is enabled.This APIs gives bydefault no. of 5 reviews, if you want more then pass the varible limit=value in urls ex. {{site_domain}}/index.php?route=ocrestapi/product/product/review&product_id=40&limit=7
GET: {{site_domain}}/index.php?route=ocrestapi/product/product/review&product_id=40
| Parameter | Type | Position | # | Description |
|---|---|---|---|---|
| token | string |
Headers |
Required |
Token is generate when user attempt login or register API. |
| product_id | Integer |
URL |
Required |
Customer can get the Rewiew Details of that Prodcut by product_id. If The customer Not fill the product_id in url then customer can't get Rewiew Details. |
| Parameter | token |
|---|---|
| Type | string |
| Position | Headers |
| # | Required |
| Description | Token is generate when user attempt login or register API. |
| Parameter | product_id |
| Type | Integer |
| Position | URL |
| # | Required |
| Description | Customer can get the Rewiew Details of that Prodcut by product_id. If The customer Not fill the product_id in url then customer can't get Rewiew Details. |
'{{site_domain}}/index.php?route=ocrestapi/product/product/review&product_id=40',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'Cookie: OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var form = new FormData();
var settings = {
"url": "{{site_domain}}/index.php?route=ocrestapi/product/product/review&product_id=40",
"method": "GET",
"timeout": 0,
"headers": {
"Cookie": "OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb"
},
"processData": false,
"mimeType": "multipart/form-data",
"contentType": false,
"data": form
};
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require('request');
var options = {
'method': 'GET',
'url': '{{site_domain}}/index.php?route=ocrestapi/product/product/review&product_id=40',
'headers': {
'Cookie': 'OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb'
},
formData: {
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
url = "{{site_domain}}/index.php?route=ocrestapi/product/product/review&product_id=40"
payload={}
files={}
headers = {
'Cookie': 'OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb'
}
response = requests.request("GET", url, headers=headers, data=payload, files=files)
print(response.text)
var client = new RestClient("{{site_domain}}/index.php?route=ocrestapi/product/product/review&product_id=40");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Cookie", "OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb");
request.AlwaysMultipartFormData = true;
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request GET '{{site_domain}}/index.php?route=ocrestapi/product/product/review&product_id=40' \
--header 'Cookie: OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("{{site_domain}}/index.php?route=ocrestapi/product/product/review&product_id=40")
.method("GET", null)
.addHeader("Cookie", "OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb")
.build();
Response response = client.newCall(request).execute();
require "uri"
require "net/http"
url = URI("{{site_domain}}/index.php?route=ocrestapi/product/product/review&product_id=40")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["Cookie"] = "OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb"
form_data = []
request.set_form form_data, 'multipart/form-data'
response = http.request(request)
puts response.read_body
Response
{
"status": true,
"errors": [],
"data": {
"reviews": [
{
"review_id": "47",
"author": "user2",
"text": "its rewiews for this product",
"rating": 2,
"date_added": "04/01/2021"
},
{
"review_id": "45",
"author": "user2",
"text": "ssdasdasDdfdfvdsfzsdsffgvdgdgdfgdfgg",
"rating": 2,
"date_added": "04/01/2021"
}
],
"rating_data": {
"average": "2.9",
"total_rating": "46",
"one_star_rating": "0",
"two_star_rating": "24",
"three_star_rating": "5",
"four_star_rating": "1",
"five_star_rating": "14"
}
},
"language": {
"code": "en",
"direction": "ltr",
"date_format_short": "d/m/Y",
"date_format_long": "l dS F Y",
"time_format": "h:i:s A",
"datetime_format": "d/m/Y H:i:s",
"decimal_point": ".",
"thousand_point": ",",
"text_home": "",
"text_yes": "Yes",
"text_no": "No",
"text_none": " --- None --- ",
"text_select": " --- Please Select --- ",
"text_minimum": "This product has a minimum quantity of %s",
"text_reviews": "%s reviews",
"text_write": "Write a review",
"text_login": "Please login or register to review",
"text_no_reviews": "There are no reviews for this product.",
"text_note": "Note: HTML is not translated!",
"text_success": "Thank you for your review. It has been submitted to the webmaster for approval.",
"text_related": "Related Products",
"text_tags": "Tags:",
.
.
.
}
}
Product Write Review POST APIs
This APIs is used for write the reviews on any product.
POST: {{site_domain}}/index.php?route=ocrestapi/product/product/write&product_id=40
| Parameter | Type | Position | # | Description |
|---|---|---|---|---|
| token | string |
Headers |
Required |
Token is generate when user attempt login or register API. |
| name | String |
Body |
Required |
name is cutomer name that will give the reviews on product. |
| text | String |
Body |
Required |
text is a reviews of customer that will give on the product. |
| rating | String |
Body |
Required |
rating means how much like that product. |
| Parameter | token |
|---|---|
| Type | string |
| Position | Headers |
| # | Required |
| Description | Token is generate when user attempt login or register API. |
| Parameter | name |
| Type | String |
| Position | Body |
| # | Required |
| Description | name is cutomer name that will give the reviews on product. |
| Parameter | text |
| Type | String |
| Position | Body |
| # | Required |
| Description | text is a reviews of customer that will give on the product. |
| Parameter | rating |
| Type | text |
| Position | Body |
| # | Required |
| Description | rating means how much like that product. |
'{{site_domain}}/index.php?route=ocrestapi/product/product/write&product_id=40',
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 =>'{
"name":"user4",
"text":"example user 444 product review my custom review jkbdjkbjhjhbsdcsdcsd",
"rating":"5"
}',
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334',
'Content-Type: application/json',
'Cookie: OCSESSID=daa4535295bbfa04fa063be9e5; currency=USD; language=en-gb'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var settings = {
"url": "{{site_domain}}/index.php?route=ocrestapi/product/product/write&product_id=40",
"method": "POST",
"timeout": 0,
"headers": {
"Authorization": "Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334",
"Content-Type": "application/json",
"Cookie": "OCSESSID=daa4535295bbfa04fa063be9e5; currency=USD; language=en-gb"
},
"data": JSON.stringify({
"name": "user4",
"text": "example user 444 product review my custom review jkbdjkbjhjhbsdcsdcsd",
"rating": "5"
}),
};
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require('request');
var options = {
'method': 'POST',
'url': '{{site_domain}}/index.php?route=ocrestapi/product/product/write&product_id=40',
'headers': {
'Authorization': 'Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334',
'Content-Type': 'application/json',
'Cookie': 'OCSESSID=daa4535295bbfa04fa063be9e5; currency=USD; language=en-gb'
},
body: JSON.stringify({
"name": "user4",
"text": "example user 444 product review my custom review jkbdjkbjhjhbsdcsdcsd",
"rating": "5"
})
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
import json
url = "{{site_domain}}/index.php?route=ocrestapi/product/product/write&product_id=40"
payload = json.dumps({
"name": "user4",
"text": "example user 444 product review my custom review jkbdjkbjhjhbsdcsdcsd",
"rating": "5"
})
headers = {
'Authorization': 'Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334',
'Content-Type': 'application/json',
'Cookie': 'OCSESSID=daa4535295bbfa04fa063be9e5; currency=USD; language=en-gb'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
var client = new RestClient("{{site_domain}}/index.php?route=ocrestapi/product/product/write&product_id=40");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334");
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Cookie", "OCSESSID=daa4535295bbfa04fa063be9e5; currency=USD; language=en-gb");
var body = @"{
" + "\n" +
@" ""name"":""user4"",
" + "\n" +
@" ""text"":""example user 444 product review my custom review jkbdjkbjhjhbsdcsdcsd"",
" + "\n" +
@" ""rating"":""5""
" + "\n" +
@"
" + "\n" +
@"}";
request.AddParameter("application/json", body, ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request POST '{{site_domain}}/index.php?route=ocrestapi/product/product/write&product_id=40' \
--header 'Authorization: Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334' \
--header 'Content-Type: application/json' \
--header 'Cookie: OCSESSID=daa4535295bbfa04fa063be9e5; currency=USD; language=en-gb' \
--data-raw '{
"name":"user4",
"text":"example user 444 product review my custom review jkbdjkbjhjhbsdcsdcsd",
"rating":"5"
}'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n \"name\":\"user4\",\r\n \"text\":\"example user 444 product review my custom review jkbdjkbjhjhbsdcsdcsd\",\r\n \"rating\":\"5\"\r\n\r\n}");
Request request = new Request.Builder()
.url("{{site_domain}}/index.php?route=ocrestapi/product/product/write&product_id=40")
.method("POST", body)
.addHeader("Authorization", "Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334")
.addHeader("Content-Type", "application/json")
.addHeader("Cookie", "OCSESSID=daa4535295bbfa04fa063be9e5; currency=USD; language=en-gb")
.build();
Response response = client.newCall(request).execute();
require "uri"
require "json"
require "net/http"
url = URI("{{site_domain}}/index.php?route=ocrestapi/product/product/write&product_id=40")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)
request["Authorization"] = "Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334"
request["Content-Type"] = "application/json"
request["Cookie"] = "OCSESSID=daa4535295bbfa04fa063be9e5; currency=USD; language=en-gb"
request.body = JSON.dump({
"name": "user4",
"text": "example user 444 product review my custom review jkbdjkbjhjhbsdcsdcsd",
"rating": "5"
})
response = http.request(request)
puts response.read_body
Request
{
"name":"user4",
"text":"example user 444 product review my custom review jkbdjkbjhjhbsdcsdcsd",
"rating":"5"
}
Response
{
"status": true,
"errors": [],
"data": {
"success": "Thank you for your review. It has been submitted to the webmaster for approval."
}
}
All Languages GET APIs
This APIs is used for get the Information how many Languages is activate or in use.
GET: {{site_domain}}/index.php?route=ocrestapi/common/language
| Parameter | Type | Position | # | Description |
|---|---|---|---|---|
| token | string |
Headers |
Required |
Token is generate when user attempt login or register API. |
| Parameter | token |
|---|---|
| Type | string |
| Position | Headers |
| # | Required |
| Description | Token is generate when user attempt login or register API. |
'{{site_domain}}/index.php?route=ocrestapi/common/language',
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(
'Authorization: Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334',
'Cookie: OCSESSID=daa4535295bbfa04fa063be9e5; currency=USD; language=en-gb'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var form = new FormData();
var settings = {
"url": "{{site_domain}}/index.php?route=ocrestapi/common/language",
"method": "GET",
"timeout": 0,
"headers": {
"Authorization": "Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334",
"Cookie": "OCSESSID=daa4535295bbfa04fa063be9e5; currency=USD; language=en-gb"
},
"processData": false,
"mimeType": "multipart/form-data",
"contentType": false,
"data": form
};
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require('request');
var options = {
'method': 'GET',
'url': '{{site_domain}}/index.php?route=ocrestapi/common/language',
'headers': {
'Authorization': 'Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334',
'Cookie': 'OCSESSID=daa4535295bbfa04fa063be9e5; currency=USD; language=en-gb'
},
formData: {
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
url = "{{site_domain}}/index.php?route=ocrestapi/common/language"
payload={}
files={}
headers = {
'Authorization': 'Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334',
'Cookie': 'OCSESSID=daa4535295bbfa04fa063be9e5; currency=USD; language=en-gb'
}
response = requests.request("GET", url, headers=headers, data=payload, files=files)
print(response.text)
var client = new RestClient("{{site_domain}}/index.php?route=ocrestapi/common/language");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334");
request.AddHeader("Cookie", "OCSESSID=daa4535295bbfa04fa063be9e5; currency=USD; language=en-gb");
request.AlwaysMultipartFormData = true;
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request GET '{{site_domain}}/index.php?route=ocrestapi/common/language' \
--header 'Authorization: Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334' \
--header 'Cookie: OCSESSID=daa4535295bbfa04fa063be9e5; currency=USD; language=en-gb'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("{{site_domain}}/index.php?route=ocrestapi/common/language")
.method("GET", null)
.addHeader("Authorization", "Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334")
.addHeader("Cookie", "OCSESSID=daa4535295bbfa04fa063be9e5; currency=USD; language=en-gb")
.build();
Response response = client.newCall(request).execute();
require "uri"
require "net/http"
url = URI("{{site_domain}}/index.php?route=ocrestapi/common/language")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["Authorization"] = "Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334"
request["Cookie"] = "OCSESSID=daa4535295bbfa04fa063be9e5; currency=USD; language=en-gb"
form_data = []
request.set_form form_data, 'multipart/form-data'
response = http.request(request)
puts response.read_body
Response
{
"status": true,
"errors": [],
"data": {
"languages": [
{
"name": "English",
"code": "en-gb"
},
{
"name": "Indonesia",
"code": "id-id"
}
]
}
}
All Currencies GET APIs
This APIs is used for get the Information how many Currency is activate or use.
GET: {{site_domain}}/index.php?route=ocrestapi/common/currency
| Parameter | Type | Position | # | Description |
|---|---|---|---|---|
| token | string |
Headers |
Required |
Token is generate when user attempt login or register API. |
| Parameter | token |
|---|---|
| Type | string |
| Position | Headers |
| # | Required |
| Description | Token is generate when user attempt login or register API. |
'{{site_domain}}/index.php?route=ocrestapi/common/currency',
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(
'Authorization: Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334',
'Cookie: OCSESSID=daa4535295bbfa04fa063be9e5; currency=USD; language=en-gb'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var form = new FormData();
var settings = {
"url": "{{site_domain}}/index.php?route=ocrestapi/common/currency",
"method": "GET",
"timeout": 0,
"headers": {
"Authorization": "Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334",
"Cookie": "OCSESSID=daa4535295bbfa04fa063be9e5; currency=USD; language=en-gb"
},
"processData": false,
"mimeType": "multipart/form-data",
"contentType": false,
"data": form
};
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require('request');
var options = {
'method': 'GET',
'url': '{{site_domain}}/index.php?route=ocrestapi/common/currency',
'headers': {
'Authorization': 'Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334',
'Cookie': 'OCSESSID=daa4535295bbfa04fa063be9e5; currency=USD; language=en-gb'
},
formData: {
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
url = "{{site_domain}}/index.php?route=ocrestapi/common/currency"
payload={}
files={}
headers = {
'Authorization': 'Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334',
'Cookie': 'OCSESSID=daa4535295bbfa04fa063be9e5; currency=USD; language=en-gb'
}
response = requests.request("GET", url, headers=headers, data=payload, files=files)
print(response.text)
var client = new RestClient("{{site_domain}}/index.php?route=ocrestapi/common/currency");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334");
request.AddHeader("Cookie", "OCSESSID=daa4535295bbfa04fa063be9e5; currency=USD; language=en-gb");
request.AlwaysMultipartFormData = true;
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request GET '{{site_domain}}/index.php?route=ocrestapi/common/currency' \
--header 'Authorization: Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334' \
--header 'Cookie: OCSESSID=daa4535295bbfa04fa063be9e5; currency=USD; language=en-gb'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("{{site_domain}}/index.php?route=ocrestapi/common/currency")
.method("GET", null)
.addHeader("Authorization", "Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334")
.addHeader("Cookie", "OCSESSID=daa4535295bbfa04fa063be9e5; currency=USD; language=en-gb")
.build();
Response response = client.newCall(request).execute();
require "uri"
require "net/http"
url = URI("{{site_domain}}/index.php?route=ocrestapi/common/currency")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["Authorization"] = "Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334"
request["Cookie"] = "OCSESSID=daa4535295bbfa04fa063be9e5; currency=USD; language=en-gb"
form_data = []
request.set_form form_data, 'multipart/form-data'
response = http.request(request)
puts response.read_body
Response
{
"status": true,
"errors": [],
"data": {
"code": "USD",
"currencies": [
{
"title": "Euro",
"code": "EUR",
"symbol_left": "",
"symbol_right": "€"
},
{
"title": "Pound Sterling",
"code": "GBP",
"symbol_left": "£",
"symbol_right": ""
},
{
"title": "US Dollar",
"code": "USD",
"symbol_left": "$",
"symbol_right": ""
}
]
}
}
Home Page GET APIs
This APIs is used for get the Information of Home Page.
GET: {{site_domain}}/index.php?route=ocrestapi/common/home
| Parameter | Type | Position | # | Description |
|---|---|---|---|---|
| token | string |
Headers |
Required |
Token is generate when user attempt login or register API. |
| Parameter | token |
|---|---|
| Type | string |
| Position | Headers |
| # | Required |
| Description | Token is generate when user attempt login or register API. |
'{{site_domain}}/index.php?route=ocrestapi/common/home',
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(
'Authorization: Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334',
'Cookie: OCSESSID=daa4535295bbfa04fa063be9e5; currency=USD; language=en-gb'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var form = new FormData();
var settings = {
"url": "{{site_domain}}/index.php?route=ocrestapi/common/home",
"method": "GET",
"timeout": 0,
"headers": {
"Authorization": "Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334",
"Cookie": "OCSESSID=daa4535295bbfa04fa063be9e5; currency=USD; language=en-gb"
},
"processData": false,
"mimeType": "multipart/form-data",
"contentType": false,
"data": form
};
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require('request');
var options = {
'method': 'GET',
'url': '{{site_domain}}/index.php?route=ocrestapi/common/home',
'headers': {
'Authorization': 'Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334',
'Cookie': 'OCSESSID=daa4535295bbfa04fa063be9e5; currency=USD; language=en-gb'
},
formData: {
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
url = "{{site_domain}}/index.php?route=ocrestapi/common/home"
payload={}
files={}
headers = {
'Authorization': 'Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334',
'Cookie': 'OCSESSID=daa4535295bbfa04fa063be9e5; currency=USD; language=en-gb'
}
response = requests.request("GET", url, headers=headers, data=payload, files=files)
print(response.text)
var client = new RestClient("{{site_domain}}/index.php?route=ocrestapi/common/home");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334");
request.AddHeader("Cookie", "OCSESSID=daa4535295bbfa04fa063be9e5; currency=USD; language=en-gb");
request.AlwaysMultipartFormData = true;
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request GET '{{site_domain}}/index.php?route=ocrestapi/common/home' \
--header 'Authorization: Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334' \
--header 'Cookie: OCSESSID=daa4535295bbfa04fa063be9e5; currency=USD; language=en-gb'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("{{site_domain}}/index.php?route=ocrestapi/common/home")
.method("GET", null)
.addHeader("Authorization", "Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334")
.addHeader("Cookie", "OCSESSID=daa4535295bbfa04fa063be9e5; currency=USD; language=en-gb")
.build();
Response response = client.newCall(request).execute();
require "uri"
require "net/http"
url = URI("{{site_domain}}/index.php?route=ocrestapi/common/home")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["Authorization"] = "Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334"
request["Cookie"] = "OCSESSID=daa4535295bbfa04fa063be9e5; currency=USD; language=en-gb"
form_data = []
request.set_form form_data, 'multipart/form-data'
response = http.request(request)
puts response.read_body
Response
{
"status": true,
"errors": [],
"data": {
"banner_data": [
{
"image": "{{site_domain}}/image/cache/catalog/demo/apple_cinema_30-300x300.jpg",
"title": "banner",
"subtitle": "banner",
"type": "product",
"name": "Apple Cinema 30"",
"button_label": "product",
"link_id": "42"
},
.....
],
"categories": [
{
"category_id": "20",
"image": "{{site_domain}}/image/catalog/demo/compaq_presario.jpg",
"parent_id": "0",
"top": "1",
"column": "1",
"sort_order": "1",
"status": "1",
"date_added": "2009-01-05 21:49:43",
"date_modified": "2011-07-16 02:14:42",
"language_id": "1",
"name": "Desktops",
"description": "<p>\r\n\tExample of category description text</p>\r\n",
"meta_title": "Desktops",
"meta_description": "Example of category description",
"meta_keyword": "",
"store_id": "0",
"icon": "{{site_domain}}/image/cache/catalog/logo-50x50.png"
},
...........
],
"brands": [
{
"name": "acer",
"thumb": "{{site_domain}}/image/cache/no_image-300x300.png",
"manufacturer_id": "15"
},
{
"name": "gamma",
"thumb": "{{site_domain}}/image/cache/no_image-300x300.png",
"manufacturer_id": "24"
},
......
],
"products": [
{
"product_id": "42",
"thumb": "{{site_domain}}/image/cache/catalog/demo/apple_cinema_30-228x228.jpg",
"name": "Apple Cinema 30"",
"model": "Product 15",
"description": "The 30-inch Apple Cinema HD Display delivers an amazing 2560 x 1600 pixel resolution. Designed speci..",
"price": "$100.00",
"special": "$90.00",
"tax": "$90.00",
"minimum": "2",
"rating": 3,
"reviews": "4",
"wishlist_status": false,
"is_options": true,
"is_recuring_product": false
},
...........
]
},
"language": {
"code": "en",
"direction": "ltr",
"date_format_short": "d/m/Y",
"date_format_long": "l dS F Y",
"time_format": "h:i:s A",
"datetime_format": "d/m/Y H:i:s",
"decimal_point": ".",
"thousand_point": ",",
"text_home": "",
"text_yes": "Yes",
"text_no": "No",
"error_required_password": "Password is required.",
"error_required_city": "City is required.",
"error_match_oldpassword": "old Password is not match",
"text_address_delete_confirm": "Are you sure? Do you want to delete this address!!",
"text_alert_confirm": "Please Confirm!!",
"text_product_category": "Product Category",
"text_featured": "Featured",
"text_select_language": "Select Language",
"button_view_all": "View All",
"text_special_off": "Special Offers",
.
...............
}
Customer Reward GET APIs
This APIs is used for get the how many reward points get from that product purchasing by customer.
GET: {{site_domain}}/index.php?route=ocrestapi/account/reward
| Parameter | Type | Position | # | Description |
|---|---|---|---|---|
| token | string |
Headers |
Required |
Token is generate when user attempt login or register API. |
| Parameter | token |
|---|---|
| Type | string |
| Position | Headers |
| # | Required |
| Description | Token is generate when user attempt login or register API. |
'{{site_domain}}/index.php?route=ocrestapi/account/reward',
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(
'Authorization: Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334',
'Cookie: OCSESSID=daa4535295bbfa04fa063be9e5; currency=USD; language=en-gb'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var form = new FormData();
var settings = {
"url": "{{site_domain}}/index.php?route=ocrestapi/account/reward",
"method": "GET",
"timeout": 0,
"headers": {
"Authorization": "Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334",
"Cookie": "OCSESSID=daa4535295bbfa04fa063be9e5; currency=USD; language=en-gb"
},
"processData": false,
"mimeType": "multipart/form-data",
"contentType": false,
"data": form
};
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require('request');
var options = {
'method': 'GET',
'url': '{{site_domain}}/index.php?route=ocrestapi/account/reward',
'headers': {
'Authorization': 'Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334',
'Cookie': 'OCSESSID=daa4535295bbfa04fa063be9e5; currency=USD; language=en-gb'
},
formData: {
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
url = "{{site_domain}}/index.php?route=ocrestapi/account/reward"
payload={}
files={}
headers = {
'Authorization': 'Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334',
'Cookie': 'OCSESSID=daa4535295bbfa04fa063be9e5; currency=USD; language=en-gb'
}
response = requests.request("GET", url, headers=headers, data=payload, files=files)
print(response.text)
var client = new RestClient("{{site_domain}}/index.php?route=ocrestapi/account/reward");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334");
request.AddHeader("Cookie", "OCSESSID=daa4535295bbfa04fa063be9e5; currency=USD; language=en-gb");
request.AlwaysMultipartFormData = true;
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request GET '{{site_domain}}/index.php?route=ocrestapi/account/reward' \
--header 'Authorization: Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334' \
--header 'Cookie: OCSESSID=daa4535295bbfa04fa063be9e5; currency=USD; language=en-gb'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("{{site_domain}}/index.php?route=ocrestapi/account/reward")
.method("GET", null)
.addHeader("Authorization", "Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334")
.addHeader("Cookie", "OCSESSID=daa4535295bbfa04fa063be9e5; currency=USD; language=en-gb")
.build();
Response response = client.newCall(request).execute();
require "uri"
require "net/http"
url = URI("{{site_domain}}/index.php?route=ocrestapi/account/reward")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["Authorization"] = "Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334"
request["Cookie"] = "OCSESSID=daa4535295bbfa04fa063be9e5; currency=USD; language=en-gb"
form_data = []
request.set_form form_data, 'multipart/form-data'
response = http.request(request)
puts response.read_body
Response
{
"status": true,
"errors": [],
"data": {
"rewards": [],
"total": 200
},
"language": {
"code": "en",
"direction": "ltr",
"date_format_short": "d/m/Y",
"date_format_long": "l dS F Y",
"time_format": "h:i:s A",
"datetime_format": "d/m/Y H:i:s",
"decimal_point": ".",
"thousand_point": ",",
"text_home": "",
"text_yes": "Yes",
"text_no": "No",
"text_none": " --- None --- ",
"error_curl": "CURL: Error Code(%s): %s",
"datepicker": "en-gb",
"heading_title": "Your Reward Points",
"column_date_added": "Date Added",
"column_description": "Description",
"column_points": "Points",
"text_account": "Account",
"text_reward": "Reward Points",
"text_total": "Your total number of reward points is:",
"text_empty": "You do not have any reward points!"
.
............
}
}
Customer Wishlist GET APIs
This APIs is used for get the information of products in wishlist of the customer.
GET: {{site_domain}}/index.php?route=ocrestapi/account/wishlist
| Parameter | Type | Position | # | Description |
|---|---|---|---|---|
| token | string |
Headers |
Required |
Token is generate when user attempt login or register API. |
| Parameter | token |
|---|---|
| Type | string |
| Position | Headers |
| # | Required |
| Description | Token is generate when user attempt login or register API. |
'{{site_domain}}/index.php?route=ocrestapi/account/wishlist',
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(
'Authorization: Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334',
'Cookie: OCSESSID=daa4535295bbfa04fa063be9e5; currency=USD; language=en-gb'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var form = new FormData();
var settings = {
"url": "{{site_domain}}/index.php?route=ocrestapi/account/wishlist",
"method": "GET",
"timeout": 0,
"headers": {
"Authorization": "Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334",
"Cookie": "OCSESSID=daa4535295bbfa04fa063be9e5; currency=USD; language=en-gb"
},
"processData": false,
"mimeType": "multipart/form-data",
"contentType": false,
"data": form
};
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require('request');
var options = {
'method': 'GET',
'url': '{{site_domain}}/index.php?route=ocrestapi/account/wishlist',
'headers': {
'Authorization': 'Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334',
'Cookie': 'OCSESSID=daa4535295bbfa04fa063be9e5; currency=USD; language=en-gb'
},
formData: {
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
url = "{{site_domain}}/index.php?route=ocrestapi/account/wishlist"
payload={}
files={}
headers = {
'Authorization': 'Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334',
'Cookie': 'OCSESSID=daa4535295bbfa04fa063be9e5; currency=USD; language=en-gb'
}
response = requests.request("GET", url, headers=headers, data=payload, files=files)
print(response.text)
var client = new RestClient("{{site_domain}}/index.php?route=ocrestapi/account/wishlist");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334");
request.AddHeader("Cookie", "OCSESSID=daa4535295bbfa04fa063be9e5; currency=USD; language=en-gb");
request.AlwaysMultipartFormData = true;
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request GET '{{site_domain}}/index.php?route=ocrestapi/account/wishlist' \
--header 'Authorization: Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334' \
--header 'Cookie: OCSESSID=daa4535295bbfa04fa063be9e5; currency=USD; language=en-gb'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("{{site_domain}}/index.php?route=ocrestapi/account/wishlist")
.method("GET", null)
.addHeader("Authorization", "Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334")
.addHeader("Cookie", "OCSESSID=daa4535295bbfa04fa063be9e5; currency=USD; language=en-gb")
.build();
Response response = client.newCall(request).execute();
require "uri"
require "net/http"
url = URI("{{site_domain}}/index.php?route=ocrestapi/account/wishlist")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["Authorization"] = "Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334"
request["Cookie"] = "OCSESSID=daa4535295bbfa04fa063be9e5; currency=USD; language=en-gb"
form_data = []
request.set_form form_data, 'multipart/form-data'
response = http.request(request)
puts response.read_body
Response
{
"status": true,
"errors": [],
"data": {
"products": [
{
"product_id": "41",
"thumb": "{{site_domain}}/image/cache/catalog/demo/imac_1-150x150.jpg",
"name": "iMac",
"model": "Product 14",
"minimum": "1",
"stock": "In Stock",
"price": "$100.00",
"special": false,
"rating": 0,
"reviews": 0,
"is_options": false,
"is_recuring_product": false
},
{
"product_id": "47",
"thumb": "{{site_domain}}/image/cache/catalog/demo/hp_1-150x150.jpg",
"name": "HP LP3065",
"model": "Product 21",
"minimum": "1",
"stock": "In Stock",
"price": "$100.00",
"special": false,
"rating": 0,
"reviews": 0,
"is_options": true,
"is_recuring_product": false
},
.
...........
]
},
"language": {
"code": "en",
"direction": "ltr",
"date_format_short": "d/m/Y",
"date_format_long": "l dS F Y",
"button_submit": "Submit",
"button_guest": "Guest Checkout",
"button_view": "View",
"button_voucher": "Apply Gift Certificate",
"button_upload": "Upload File",
"button_reward": "Apply Points",
"button_quote": "Get Quotes",
"button_list": "List",
"button_grid": "Grid",
"button_map": "View Google Map",
"error_exception": "Error Code(%s): %s in %s on line %s",
"error_upload_1": "Warning: The uploaded file exceeds the upload_max_filesize directive in php.ini!",
"error_upload_2": "Warning: The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form!",
"column_name": "Product Name",
"column_model": "Model",
"column_stock": "Stock",
"column_price": "Unit Price",
"column_action": "Action"
.
...............
}
}
Customer Wishlist POST APIs
This APIs is used for add the products in customer wishlist.
POST: {{site_domain}}/index.php?route=ocrestapi/account/wishlist/add
| Parameter | Type | Position | # | Description |
|---|---|---|---|---|
| token | string |
Headers |
Required |
Token is generate when user attempt login or register API. |
| customer_id | string |
Body |
Optional |
customer_id means gives which customer_id assign the product in that customer otherwise assign the product in login customer. |
| product_id | string |
Body |
Required |
product_id means gives which product_id of that product is assign to the login customer. |
| Parameter | token |
|---|---|
| Type | string |
| Position | Headers |
| # | Required |
| Description | Token is generate when user attempt login or register API. |
| Parameter | customer_id |
| Type | string |
| Position | Body |
| # | Optional |
| Description | customer_id means gives which customer_id assign the product in that customer otherwise assign the product in login customer. |
| Parameter | product_id |
| Type | string |
| Position | Body |
| # | Required |
| Description | product_id means gives which product_id of that product is assign to the login customer. |
'{{site_domain}}/index.php?route=ocrestapi/account/wishlist/add',
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 =>'{
"customer_id":82,
"product_id":46
}',
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334',
'Content-Type: application/json',
'Cookie: OCSESSID=daa4535295bbfa04fa063be9e5; currency=USD; language=en-gb'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var settings = {
"url": "{{site_domain}}/index.php?route=ocrestapi/account/wishlist/add",
"method": "POST",
"timeout": 0,
"headers": {
"Authorization": "Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334",
"Content-Type": "application/json",
"Cookie": "OCSESSID=daa4535295bbfa04fa063be9e5; currency=USD; language=en-gb"
},
"data": JSON.stringify({
"customer_id": 82,
"product_id": 46
}),
};
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require('request');
var options = {
'method': 'POST',
'url': '{{site_domain}}/index.php?route=ocrestapi/account/wishlist/add',
'headers': {
'Authorization': 'Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334',
'Content-Type': 'application/json',
'Cookie': 'OCSESSID=daa4535295bbfa04fa063be9e5; currency=USD; language=en-gb'
},
body: JSON.stringify({
"customer_id": 82,
"product_id": 46
})
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
import json
url = "{{site_domain}}/index.php?route=ocrestapi/account/wishlist/add"
payload = json.dumps({
"customer_id": 82,
"product_id": 46
})
headers = {
'Authorization': 'Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334',
'Content-Type': 'application/json',
'Cookie': 'OCSESSID=daa4535295bbfa04fa063be9e5; currency=USD; language=en-gb'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
var client = new RestClient("{{site_domain}}/index.php?route=ocrestapi/account/wishlist/add");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334");
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Cookie", "OCSESSID=daa4535295bbfa04fa063be9e5; currency=USD; language=en-gb");
var body = @"{
" + "\n" +
@" ""customer_id"":82,
" + "\n" +
@" ""product_id"":46
" + "\n" +
@"}";
request.AddParameter("application/json", body, ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request POST '{{site_domain}}/index.php?route=ocrestapi/account/wishlist/add' \
--header 'Authorization: Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334' \
--header 'Content-Type: application/json' \
--header 'Cookie: OCSESSID=daa4535295bbfa04fa063be9e5; currency=USD; language=en-gb' \
--data-raw '{
"customer_id":82,
"product_id":46
}'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n \"customer_id\":82,\r\n \"product_id\":46\r\n}");
Request request = new Request.Builder()
.url("{{site_domain}}/index.php?route=ocrestapi/account/wishlist/add")
.method("POST", body)
.addHeader("Authorization", "Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334")
.addHeader("Content-Type", "application/json")
.addHeader("Cookie", "OCSESSID=daa4535295bbfa04fa063be9e5; currency=USD; language=en-gb")
.build();
Response response = client.newCall(request).execute();
require "uri"
require "json"
require "net/http"
url = URI("{{site_domain}}/index.php?route=ocrestapi/account/wishlist/add")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)
request["Authorization"] = "Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334"
request["Content-Type"] = "application/json"
request["Cookie"] = "OCSESSID=daa4535295bbfa04fa063be9e5; currency=USD; language=en-gb"
request.body = JSON.dump({
"customer_id": 82,
"product_id": 46
})
response = http.request(request)
puts response.read_body
Request
{
"customer_id":82,
"product_id":46
}
Response
{
"status": true,
"errors": [],
"data": {
"success": "Success: You have added Sony VAIO to your wish list!"
}
}
Customer Order GET APIs
This APIs is used for get the information of Orders list and display the orders list and how many orders of loged in customer.
GET: {{site_domain}}/index.php?route=ocrestapi/account/order
| Parameter | Type | Position | # | Description |
|---|---|---|---|---|
| token | string |
Headers |
Required |
Token is generate when user attempt login or register API. |
| Parameter | token |
|---|---|
| Type | string |
| Position | Headers |
| # | Required |
| Description | Token is generate when user attempt login or register API. |
'{{site_domain}}/index.php?route=ocrestapi/account/order',
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(
'Authorization: Bearer 55bd892fe7656ce69c6c60a9877e136d4b36d543',
'Cookie: OCSESSID=391a1607e2c5f08a0a157bf2e3; currency=USD; language=en-gb'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var form = new FormData();
var settings = {
"url": "{{site_domain}}/index.php?route=ocrestapi/account/order",
"method": "GET",
"timeout": 0,
"headers": {
"Authorization": "Bearer 55bd892fe7656ce69c6c60a9877e136d4b36d543",
"Cookie": "OCSESSID=391a1607e2c5f08a0a157bf2e3; currency=USD; language=en-gb"
},
"processData": false,
"mimeType": "multipart/form-data",
"contentType": false,
"data": form
};
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require('request');
var options = {
'method': 'GET',
'url': '{{site_domain}}/index.php?route=ocrestapi/account/order',
'headers': {
'Authorization': 'Bearer 55bd892fe7656ce69c6c60a9877e136d4b36d543',
'Cookie': 'OCSESSID=391a1607e2c5f08a0a157bf2e3; currency=USD; language=en-gb'
},
formData: {
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
url = "{{site_domain}}/index.php?route=ocrestapi/account/order"
payload={}
files={}
headers = {
'Authorization': 'Bearer 55bd892fe7656ce69c6c60a9877e136d4b36d543',
'Cookie': 'OCSESSID=391a1607e2c5f08a0a157bf2e3; currency=USD; language=en-gb'
}
response = requests.request("GET", url, headers=headers, data=payload, files=files)
print(response.text)
var client = new RestClient("{{site_domain}}/index.php?route=ocrestapi/account/order");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer 55bd892fe7656ce69c6c60a9877e136d4b36d543");
request.AddHeader("Cookie", "OCSESSID=391a1607e2c5f08a0a157bf2e3; currency=USD; language=en-gb");
request.AlwaysMultipartFormData = true;
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request GET '{{site_domain}}/index.php?route=ocrestapi/account/order' \
--header 'Authorization: Bearer 55bd892fe7656ce69c6c60a9877e136d4b36d543' \
--header 'Cookie: OCSESSID=391a1607e2c5f08a0a157bf2e3; currency=USD; language=en-gb'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("{{site_domain}}/index.php?route=ocrestapi/account/order")
.method("GET", null)
.addHeader("Authorization", "Bearer 55bd892fe7656ce69c6c60a9877e136d4b36d543")
.addHeader("Cookie", "OCSESSID=391a1607e2c5f08a0a157bf2e3; currency=USD; language=en-gb")
.build();
Response response = client.newCall(request).execute();
require "uri"
require "net/http"
url = URI("{{site_domain}}/index.php?route=ocrestapi/account/order")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["Authorization"] = "Bearer 55bd892fe7656ce69c6c60a9877e136d4b36d543"
request["Cookie"] = "OCSESSID=391a1607e2c5f08a0a157bf2e3; currency=USD; language=en-gb"
form_data = []
request.set_form form_data, 'multipart/form-data'
response = http.request(request)
puts response.read_body
Response
{
"status": true,
"errors": [],
"data": {
"orders": [
{
"order_id": "359",
"order_product": [
{
"name": "HTC Touch HD",
"model": "Product 1",
"quantity": "1"
}
],
"status": "Shipped",
"date_added": "22/12/2021",
"products": 1,
"total": "$100.00"
},
{
"order_id": "358",
"order_product": [
{
"name": "HP LP3065",
"model": "Product 21",
"quantity": "1"
}
],
"status": "Complete",
"date_added": "21/12/2021",
"products": 1,
"total": "$105.00"
}
]
},
"language": {
"code": "en",
"direction": "ltr",
"date_format_short": "d/m/Y",
"date_format_long": "l dS F Y",
"time_format": "h:i:s A",
"datetime_format": "d/m/Y H:i:s",
"decimal_point": ".",
"button_remove": "Remove",
"button_reorder": "Reorder",
"button_return": "Return",
"button_shopping": "Continue Shopping",
"button_search": "Search",
"button_shipping": "Apply Shipping",
"error_upload_2": "Warning: The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form!",
"error_upload_3": "Warning: The uploaded file was only partially uploaded!",
"error_upload_4": "Warning: No file was uploaded!",
"error_upload_6": "Warning: Missing a temporary folder!",
"text_empty": "You have not made any previous orders!",
"text_error": "The order you requested could not be found!",
"column_order_id": "Order ID",
"column_customer": "Customer",
"column_product": "No. of Products",
"column_name": "Product Name",
"column_model": "Model",
"column_quantity": "Quantity",
"column_price": "Price",
.
............
}
}
Customer Order Info GET APIs
This APIs is used for get the Information of particular order information of customer.
GET: {{site_domain}}/index.php?route=ocrestapi/account/order/info&order_id=359
| Parameter | Type | Position | # | Description |
|---|---|---|---|---|
| token | string |
Headers |
Required |
Token is generate when user attempt login or register API. |
| order_id | integer |
URLs |
Required |
order_id means get the information of particular order and pass the order_id in urls whatever order info you want. |
| Parameter | token |
|---|---|
| Type | string |
| Position | Headers |
| # | Required |
| Description | Token is generate when user attempt login or register API. |
| Parameter | order_id |
| Type | integer |
| Position | Urls |
| # | Optional |
| Description | order_id means get the information of particular order and pass the order_id in urls whatever order info you want. |
'{{site_domain}}/index.php?route=ocrestapi/account/order/info&order_id=359',
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(
'Authorization: Bearer 55bd892fe7656ce69c6c60a9877e136d4b36d543',
'Cookie: OCSESSID=391a1607e2c5f08a0a157bf2e3; currency=USD; language=en-gb'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var form = new FormData();
var settings = {
"url": "{{site_domain}}/index.php?route=ocrestapi/account/order/info&order_id=359",
"method": "GET",
"timeout": 0,
"headers": {
"Authorization": "Bearer 55bd892fe7656ce69c6c60a9877e136d4b36d543",
"Cookie": "OCSESSID=391a1607e2c5f08a0a157bf2e3; currency=USD; language=en-gb"
},
"processData": false,
"mimeType": "multipart/form-data",
"contentType": false,
"data": form
};
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require('request');
var options = {
'method': 'GET',
'url': '{{site_domain}}/index.php?route=ocrestapi/account/order/info&order_id=359',
'headers': {
'Authorization': 'Bearer 55bd892fe7656ce69c6c60a9877e136d4b36d543',
'Cookie': 'OCSESSID=391a1607e2c5f08a0a157bf2e3; currency=USD; language=en-gb'
},
formData: {
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
url = "{{site_domain}}/index.php?route=ocrestapi/account/order/info&order_id=359"
payload={}
files={}
headers = {
'Authorization': 'Bearer 55bd892fe7656ce69c6c60a9877e136d4b36d543',
'Cookie': 'OCSESSID=391a1607e2c5f08a0a157bf2e3; currency=USD; language=en-gb'
}
response = requests.request("GET", url, headers=headers, data=payload, files=files)
print(response.text)
var client = new RestClient("{{site_domain}}/index.php?route=ocrestapi/account/order/info&order_id=359");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer 55bd892fe7656ce69c6c60a9877e136d4b36d543");
request.AddHeader("Cookie", "OCSESSID=391a1607e2c5f08a0a157bf2e3; currency=USD; language=en-gb");
request.AlwaysMultipartFormData = true;
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request GET '{{site_domain}}/index.php?route=ocrestapi/account/order/info&order_id=359' \
--header 'Authorization: Bearer 55bd892fe7656ce69c6c60a9877e136d4b36d543' \
--header 'Cookie: OCSESSID=391a1607e2c5f08a0a157bf2e3; currency=USD; language=en-gb'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("{{site_domain}}/index.php?route=ocrestapi/account/order/info&order_id=359")
.method("GET", null)
.addHeader("Authorization", "Bearer 55bd892fe7656ce69c6c60a9877e136d4b36d543")
.addHeader("Cookie", "OCSESSID=391a1607e2c5f08a0a157bf2e3; currency=USD; language=en-gb")
.build();
Response response = client.newCall(request).execute();
require "uri"
require "net/http"
url = URI("{{site_domain}}/index.php?route=ocrestapi/account/order/info&order_id=359")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["Authorization"] = "Bearer 55bd892fe7656ce69c6c60a9877e136d4b36d543"
request["Cookie"] = "OCSESSID=391a1607e2c5f08a0a157bf2e3; currency=USD; language=en-gb"
form_data = []
request.set_form form_data, 'multipart/form-data'
response = http.request(request)
puts response.read_body
Response
{
"status": true,
"errors": [],
"data": {
"order_id": "359",
"date_added": "22/12/2021",
"payment_address": "xcZScsz cSZc
zxczs
zxcSZcsz
cASdcAS
casxcASxc 20201
Gujarat
India",
"payment_method": "Bank Transfer",
"shipping_address": "xcZScsz cSZc
zxczs
zxcSZcsz
cASdcAS
casxcASxc 20201
Gujarat
India",
"shipping_method": "Free Shipping",
"products": [
{
"product_id": "28",
"name": "HTC Touch HD",
"model": "Product 1",
"option": [],
"quantity": "1",
"price": "$100.00",
"total": "$100.00"
}
],
"vouchers": [],
"totals": [
{
"title": "Sub-Total",
"text": "$100.00"
},
{
"title": "Free Shipping",
"text": "$0.00"
},
{
"title": "Total",
"text": "$100.00"
}
],
"comment": "dwsdcasdcsdcasd",
"histories": [
{
"date_added": "22/12/2021",
"status": "Pending",
"comment": "Bank Transfer Instructions
\n
\newrwrtrgjhgjgdjdgjdgjhdghjdguj
\r\nfghfhfgh
\n
\nYour order will not ship until we receive payment."
},
{
"date_added": "22/12/2021",
"status": "Shipped",
"comment": ""
}
]
},
"language": {
"code": "en",
"direction": "ltr",
"date_format_short": "d/m/Y",
"date_format_long": "l dS F Y",
"time_format": "h:i:s A",
"datetime_format": "d/m/Y H:i:s",
"decimal_point": ".",
"thousand_point": ",",
"text_home": "",
"button_download": "Download",
"button_edit": "Edit",
"button_filter": "Refine Search",
"button_new_address": "New Address",
"text_downloads": "Downloads",
"text_empty": "You have not made any previous downloadable orders!",
"column_order_id": "Order ID",
"column_name": "Name",
"column_size": "Size",
"column_date_added": "Date Added"
.
........
}
}
Return List GET APIs
This APIs is used for display information of return orders list.
GET: {{site_domain}}/index.php?route=ocrestapi/account/return&start=1&limit=15
| Parameter | Type | Position | # | Description |
|---|---|---|---|---|
| token | string |
Headers |
Required |
Token is generate when user attempt login or register API. |
| start | integer |
URLs |
Optional |
How many return order list display start form that (starting) value. |
| limit | integer |
URLs |
Optional |
How many return order list display. |
| Parameter | token |
|---|---|
| Type | string |
| Position | Headers |
| # | Required |
| Description | Token is generate when user attempt login or register API. |
| Parameter | start |
| Type | integer |
| Position | Urls |
| # | Optional |
| Description | How many return order list display start form that (starting) value |
| Parameter | limt |
| Type | integer |
| Position | Urls |
| # | Optional |
| Description | How many return order list display. |
'{{site_domain}}/index.php?route=ocrestapi/account/return&start=1&limit=15',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_POSTFIELDS => array('page' => '2'),
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer 55bd892fe7656ce69c6c60a9877e136d4b36d543',
'Cookie: OCSESSID=391a1607e2c5f08a0a157bf2e3; currency=USD; language=en-gb'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var form = new FormData();
form.append("page", "2");
var settings = {
"url": "{{site_domain}}/index.php?route=ocrestapi/account/return&start=1&limit=15",
"method": "GET",
"timeout": 0,
"headers": {
"Authorization": "Bearer 55bd892fe7656ce69c6c60a9877e136d4b36d543",
"Cookie": "OCSESSID=391a1607e2c5f08a0a157bf2e3; currency=USD; language=en-gb"
},
"processData": false,
"mimeType": "multipart/form-data",
"contentType": false,
"data": form
};
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require('request');
var options = {
'method': 'GET',
'url': '{{site_domain}}/index.php?route=ocrestapi/account/return&start=1&limit=15',
'headers': {
'Authorization': 'Bearer 55bd892fe7656ce69c6c60a9877e136d4b36d543',
'Cookie': 'OCSESSID=391a1607e2c5f08a0a157bf2e3; currency=USD; language=en-gb'
},
formData: {
'page': '2'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
url = "{{site_domain}}/index.php?route=ocrestapi/account/return&start=1&limit=15"
payload={'page': '2'}
files=[
]
headers = {
'Authorization': 'Bearer 55bd892fe7656ce69c6c60a9877e136d4b36d543',
'Cookie': 'OCSESSID=391a1607e2c5f08a0a157bf2e3; currency=USD; language=en-gb'
}
response = requests.request("GET", url, headers=headers, data=payload, files=files)
print(response.text)
var client = new RestClient("{{site_domain}}/index.php?route=ocrestapi/account/return&start=1&limit=15");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer 55bd892fe7656ce69c6c60a9877e136d4b36d543");
request.AddHeader("Cookie", "OCSESSID=391a1607e2c5f08a0a157bf2e3; currency=USD; language=en-gb");
request.AlwaysMultipartFormData = true;
request.AddParameter("page", "2");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request GET '{{site_domain}}/index.php?route=ocrestapi/account/return&start=1&limit=15' \
--header 'Authorization: Bearer 55bd892fe7656ce69c6c60a9877e136d4b36d543' \
--header 'Cookie: OCSESSID=391a1607e2c5f08a0a157bf2e3; currency=USD; language=en-gb' \
--form 'page="2"'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("{{site_domain}}/index.php?route=ocrestapi/account/return&start=1&limit=15")
.method("GET", null)
.addHeader("Authorization", "Bearer 55bd892fe7656ce69c6c60a9877e136d4b36d543")
.addHeader("Cookie", "OCSESSID=391a1607e2c5f08a0a157bf2e3; currency=USD; language=en-gb")
.build();
Response response = client.newCall(request).execute();
require "uri"
require "net/http"
url = URI("{{site_domain}}/index.php?route=ocrestapi/account/return&start=1&limit=15")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["Authorization"] = "Bearer 55bd892fe7656ce69c6c60a9877e136d4b36d543"
request["Cookie"] = "OCSESSID=391a1607e2c5f08a0a157bf2e3; currency=USD; language=en-gb"
form_data = [['page', '2']]
request.set_form form_data, 'multipart/form-data'
response = http.request(request)
puts response.read_body
Response
{
"status": true,
"errors": [],
"data": {
"returns": [
{
"return_id": "63",
"order_id": "359",
"product_name": "HTC Touch HD",
"model": "Product 1",
"quantity": "1",
"status": "Awaiting Products",
"date_added": "23/12/2021"
}
]
},
"language": {
"code": "en",
"direction": "ltr",
"date_format_short": "d/m/Y",
"date_format_long": "l dS F Y",
"time_format": "h:i:s A",
"datetime_format": "d/m/Y H:i:s",
"decimal_point": ".",
"thousand_point": ",",
"text_home": "",
"button_download": "Download",
"button_edit": "Edit",
"button_filter": "Refine Search",
"button_new_address": "New Address",
"text_downloads": "Downloads",
"text_empty": "You have not made any previous downloadable orders!",
"column_order_id": "Order ID",
"column_name": "Name",
"column_size": "Size",
"column_date_added": "Date Added"
.
........
}
}
Customer Order Info APIs
This APIs is used for get the Information of particular return order information of customer.
GET: {{site_domain}}/index.php?route=ocrestapi/account/return/info&return_id=63
| Parameter | Type | Position | # | Description |
|---|---|---|---|---|
| token | string |
Headers |
Required |
Token is generate when user attempt login or register API. |
| return_id | integer |
URLs |
Required |
return_id means get the information of particular order and pass the return_id in urls whatever order info you want. |
| Parameter | token |
|---|---|
| Type | string |
| Position | Headers |
| # | Required |
| Description | Token is generate when user attempt login or register API. |
| Parameter | return_id |
| Type | integer |
| Position | Urls |
| # | Optional |
| Description | return_id means get the information of particular order and pass the return_id in urls whatever order info you want. |
'{{site_domain}}/index.php?route=ocrestapi/account/return/info&return_id=63',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_POSTFIELDS => array('order_id' => '1','return_id' => '10'),
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer 55bd892fe7656ce69c6c60a9877e136d4b36d543',
'Cookie: OCSESSID=391a1607e2c5f08a0a157bf2e3; currency=USD; language=en-gb'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var form = new FormData();
form.append("order_id", "1");
form.append("return_id", "10");
var settings = {
"url": "{{site_domain}}/index.php?route=ocrestapi/account/return/info&return_id=63",
"method": "GET",
"timeout": 0,
"headers": {
"Authorization": "Bearer 55bd892fe7656ce69c6c60a9877e136d4b36d543",
"Cookie": "OCSESSID=391a1607e2c5f08a0a157bf2e3; currency=USD; language=en-gb"
},
"processData": false,
"mimeType": "multipart/form-data",
"contentType": false,
"data": form
};
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require('request');
var options = {
'method': 'GET',
'url': '{{site_domain}}/index.php?route=ocrestapi/account/return/info&return_id=63',
'headers': {
'Authorization': 'Bearer 55bd892fe7656ce69c6c60a9877e136d4b36d543',
'Cookie': 'OCSESSID=391a1607e2c5f08a0a157bf2e3; currency=USD; language=en-gb'
},
formData: {
'order_id': '1',
'return_id': '10'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
url = "{{site_domain}}/index.php?route=ocrestapi/account/return/info&return_id=63"
payload={'order_id': '1',
'return_id': '10'}
files=[
]
headers = {
'Authorization': 'Bearer 55bd892fe7656ce69c6c60a9877e136d4b36d543',
'Cookie': 'OCSESSID=391a1607e2c5f08a0a157bf2e3; currency=USD; language=en-gb'
}
response = requests.request("GET", url, headers=headers, data=payload, files=files)
print(response.text)
var client = new RestClient("{{site_domain}}/index.php?route=ocrestapi/account/return/info&return_id=63");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer 55bd892fe7656ce69c6c60a9877e136d4b36d543");
request.AddHeader("Cookie", "OCSESSID=391a1607e2c5f08a0a157bf2e3; currency=USD; language=en-gb");
request.AlwaysMultipartFormData = true;
request.AddParameter("order_id", "1");
request.AddParameter("return_id", "10");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request GET '{{site_domain}}/index.php?route=ocrestapi/account/return/info&return_id=63' \
--header 'Authorization: Bearer 55bd892fe7656ce69c6c60a9877e136d4b36d543' \
--header 'Cookie: OCSESSID=391a1607e2c5f08a0a157bf2e3; currency=USD; language=en-gb' \
--form 'order_id="1"' \
--form 'return_id="10"'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("{{site_domain}}/index.php?route=ocrestapi/account/return/info&return_id=63")
.method("GET", null)
.addHeader("Authorization", "Bearer 55bd892fe7656ce69c6c60a9877e136d4b36d543")
.addHeader("Cookie", "OCSESSID=391a1607e2c5f08a0a157bf2e3; currency=USD; language=en-gb")
.build();
Response response = client.newCall(request).execute();
require "uri"
require "net/http"
url = URI("{{site_domain}}/index.php?route=ocrestapi/account/return/info&return_id=63")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["Authorization"] = "Bearer 55bd892fe7656ce69c6c60a9877e136d4b36d543"
request["Cookie"] = "OCSESSID=391a1607e2c5f08a0a157bf2e3; currency=USD; language=en-gb"
form_data = [['order_id', '1'],['return_id', '10']]
request.set_form form_data, 'multipart/form-data'
response = http.request(request)
puts response.read_body
Response
{
"status": true,
"errors": [],
"data": {
"return_id": "63",
"order_id": "359",
"date_ordered": "22/12/2021",
"date_added": "23/12/2021",
"firstname": "user3",
"lastname": "testing",
"email": "example1@test.com",
"telephone": "9874567890",
"product": "HTC Touch HD",
"model": "Product 1",
"quantity": "1",
"reason": "Received Wrong Item",
"opened": "No",
"comment": "Return order",
"action": null,
"histories": []
},
"language": {
"code": "en",
"direction": "ltr",
"date_format_short": "d/m/Y",
"date_format_long": "l dS F Y",
"time_format": "h:i:s A",
"datetime_format": "d/m/Y H:i:s",
"decimal_point": ".",
"thousand_point": ",",
"text_home": "",
"button_download": "Download",
"button_edit": "Edit",
"button_filter": "Refine Search",
"button_new_address": "New Address",
"text_downloads": "Downloads",
"text_empty": "You have not made any previous downloadable orders!",
"column_order_id": "Order ID",
"column_name": "Name",
"column_size": "Size",
"column_date_added": "Date Added"
.
........
}
}
Customer Return GET APIs
This APIs is used for get the Information of customer return order fields/data.
GET: {{site_domain}}/index.php?route=ocrestapi/account/return/add&order_id=359&product_id=28
| Parameter | Type | Position | # | Description |
|---|---|---|---|---|
| token | string |
Headers |
Required |
Token is generate when user attempt login or register API. |
| order_id | integer |
URLs |
Optional |
order_id of whatever product to be return. |
| product_id | integer |
URLs |
Optional |
product_id whatever product to be return. |
| Parameter | token |
|---|---|
| Type | string |
| Position | Headers |
| # | Required |
| Description | Token is generate when user attempt login or register API. |
| Parameter | order_id |
| Type | integer |
| Position | Urls |
| # | Optional |
| Description | order_id of whatever product to be return. |
| Parameter | product_id |
| Type | integer |
| Position | Urls |
| # | Optional |
| Description | product_id of whatever product to be return. |
'{{site_domain}}/index.php?route=ocrestapi/account/return/add&order_id=359&product_id=28',
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(
'Authorization: Bearer ac2947297505435b8cc556cf09cafa04e2cb661b',
'Cookie: OCSESSID=391a1607e2c5f08a0a157bf2e3; currency=USD; language=en-gb'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var form = new FormData();
var settings = {
"url": "{{site_domain}}/index.php?route=ocrestapi/account/return/add&order_id=359&product_id=28",
"method": "GET",
"timeout": 0,
"headers": {
"Authorization": "Bearer ac2947297505435b8cc556cf09cafa04e2cb661b",
"Cookie": "OCSESSID=391a1607e2c5f08a0a157bf2e3; currency=USD; language=en-gb"
},
"processData": false,
"mimeType": "multipart/form-data",
"contentType": false,
"data": form
};
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require('request');
var options = {
'method': 'GET',
'url': '{{site_domain}}/index.php?route=ocrestapi/account/return/add&order_id=359&product_id=28',
'headers': {
'Authorization': 'Bearer ac2947297505435b8cc556cf09cafa04e2cb661b',
'Cookie': 'OCSESSID=391a1607e2c5f08a0a157bf2e3; currency=USD; language=en-gb'
},
formData: {
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
url = "{{site_domain}}/index.php?route=ocrestapi/account/return/add&order_id=359&product_id=28"
payload={}
files={}
headers = {
'Authorization': 'Bearer ac2947297505435b8cc556cf09cafa04e2cb661b',
'Cookie': 'OCSESSID=391a1607e2c5f08a0a157bf2e3; currency=USD; language=en-gb'
}
response = requests.request("GET", url, headers=headers, data=payload, files=files)
print(response.text)
var client = new RestClient("{{site_domain}}/index.php?route=ocrestapi/account/return/add&order_id=359&product_id=28");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer ac2947297505435b8cc556cf09cafa04e2cb661b");
request.AddHeader("Cookie", "OCSESSID=391a1607e2c5f08a0a157bf2e3; currency=USD; language=en-gb");
request.AlwaysMultipartFormData = true;
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request GET '{{site_domain}}/index.php?route=ocrestapi/account/return/add&order_id=359&product_id=28' \
--header 'Authorization: Bearer ac2947297505435b8cc556cf09cafa04e2cb661b' \
--header 'Cookie: OCSESSID=391a1607e2c5f08a0a157bf2e3; currency=USD; language=en-gb'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("{{site_domain}}/index.php?route=ocrestapi/account/return/add&order_id=359&product_id=28")
.method("GET", null)
.addHeader("Authorization", "Bearer ac2947297505435b8cc556cf09cafa04e2cb661b")
.addHeader("Cookie", "OCSESSID=391a1607e2c5f08a0a157bf2e3; currency=USD; language=en-gb")
.build();
Response response = client.newCall(request).execute();
require "uri"
require "net/http"
url = URI("{{site_domain}}/index.php?route=ocrestapi/account/return/add&order_id=359&product_id=28")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["Authorization"] = "Bearer ac2947297505435b8cc556cf09cafa04e2cb661b"
request["Cookie"] = "OCSESSID=391a1607e2c5f08a0a157bf2e3; currency=USD; language=en-gb"
form_data = []
request.set_form form_data, 'multipart/form-data'
response = http.request(request)
puts response.read_body
Response
{
"status": true,
"errors": [],
"data": {
"error_order_id": "",
"order_id": "359",
"date_ordered": "2021-12-22",
"firstname": "user3",
"lastname": "testing",
"email": "example1@test.com",
"telephone": "9874567890",
"product": "HTC Touch HD",
"model": "Product 1",
"quantity": 1,
"opened": false,
"return_reason_id": "",
"return_reasons": [
{
"return_reason_id": "1",
"name": "Dead On Arrival"
},
{
"return_reason_id": "4",
"name": "Faulty, please supply details"
},
{
"return_reason_id": "3",
"name": "Order Error"
},
{
"return_reason_id": "5",
"name": "Other, please supply details"
},
{
"return_reason_id": "2",
"name": "Received Wrong Item"
}
],
"comment": "",
"captcha": "",
"text_agree": "",
"agree": false
},
"language": {
"code": "en",
"direction": "ltr",
"date_format_short": "d/m/Y",
"date_format_long": "l dS F Y",
"time_format": "h:i:s A",
"datetime_format": "d/m/Y H:i:s",
"decimal_point": ".",
"button_wishlist": "Add to Wish List",
"error_exception": "Error Code(%s): %s in %s on line %s",
"error_upload_2": "Warning: The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form!",
"error_upload_3": "Warning: The uploaded file was only partially uploaded!",
"error_upload_4": "Warning: No file was uploaded!",
"text_voucher_success": "Success: Your gift certificate discount has been applied!",
"entry_voucher_voucher": "Enter your gift certificate code here",
"error_voucher_empty": "Warning: Please enter a gift certificate code!",
"text_shipping_heading": "Estimate Shipping & Taxes",
"text_shipping_success": "Success: Your shipping estimate has been applied!",
"text_shipping_shipping": "Enter your destination to get a shipping estimate.",
"text_shipping_shipping_method": "Please select the preferred shipping method to use on this order.",
.
...........
}
}
Customer Return POST APIs
This APIs is used for returns the order by customer or add the order in return order list.
POST: {{site_domain}}/index.php?route=ocrestapi/account/return/add
| Parameter | Type | Position | # | Description |
|---|---|---|---|---|
| token | string |
Headers |
Required |
Token is generate when user attempt login or register API. |
| order_id | integer |
Body |
Required |
order_id whatever order to be return. |
| firstname | integer |
Body |
Required |
firstname of Customer. |
| lastname | integer |
URLs |
Body |
lastname of Customer. |
integer |
Body |
Required |
email of Customer. | |
| telephone | integer |
Body |
Required |
telephone Number of Customer. |
| product | string |
Body |
Required |
product means product name of returned product to be return. |
| model | string |
Body |
Required |
model name of product to be return. |
| return_reason_id | integer |
Body |
Required |
return_reason_id of product to be return. |
| opened | string |
Body |
Required |
opened means yue have opened the returned product or not. |
| comment | string |
Body |
Required |
comment means why are you returning the product. |
| Parameter | token |
|---|---|
| Type | string |
| Position | Headers |
| # | Required |
| Description | Token is generate when user attempt login or register API. |
| Parameter | order_id |
| Type | integer |
| Position | Body |
| # | Required |
| Description | order_id whatever order to be return. |
| Parameter | firstname |
| Type | integer |
| Position | Body |
| # | Required |
| Description | firstname of Customer. |
| Parameter | lastname |
| Type | integer |
| Position | Body |
| # | Required |
| Description | lastname of Customer. |
| Parameter | |
| Type | integer |
| Position | Body |
| # | Required |
| Description | email of Customer. |
| Parameter | telephone |
| Type | integer |
| Position | Body |
| # | Required |
| Description | telephone number of Customer. |
| Parameter | product |
| Type | integer |
| Position | Body |
| # | Required |
| Description | product means product name of returned product to be return. |
| Parameter | model |
| Type | integer |
| Position | Body |
| # | Required |
| Description | model name of product to be return. |
| Parameter | return_reason_id |
| Type | integer |
| Position | Body |
| # | Required |
| Description | return_reason_id of product to be return. |
| Parameter | opened |
| Type | integer |
| Position | Body |
| # | Required |
| Description | opened means yue have opened the product or not. |
| Parameter | comment |
| Type | integer |
| Position | Body |
| # | Required |
| Description | comment means why are you returning the product. |
'{{site_domain}}/index.php?route=ocrestapi/account/return/add',
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('order_id' => '123','firstname' => 'user3','lastname' => 'kumar','email' => 'exampl1@test.com','telephone' => '9998887744','product' => 'HTC Touch HD','model' => 'product 1','return_reason_id' => '1','opened' => 'false','quantity' => '1','date_ordered' => '2021-12-22','comment' => 'its not good product'),
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer ac2947297505435b8cc556cf09cafa04e2cb661b',
'Cookie: OCSESSID=391a1607e2c5f08a0a157bf2e3; currency=USD; language=en-gb'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
'{{site_domain}}/index.php?route=ocrestapi/account/return/add',
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('order_id' => '123','firstname' => 'user3','lastname' => 'kumar','email' => 'exampl1@test.com','telephone' => '9998887744','product' => 'HTC Touch HD','model' => 'product 1','return_reason_id' => '1','opened' => 'false','quantity' => '1','date_ordered' => '2021-12-22','comment' => 'its not good product'),
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer ac2947297505435b8cc556cf09cafa04e2cb661b',
'Cookie: OCSESSID=391a1607e2c5f08a0a157bf2e3; currency=USD; language=en-gb'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var request = require('request');
var options = {
'method': 'POST',
'url': '{{site_domain}}/index.php?route=ocrestapi/account/return/add',
'headers': {
'Authorization': 'Bearer ac2947297505435b8cc556cf09cafa04e2cb661b',
'Cookie': 'OCSESSID=391a1607e2c5f08a0a157bf2e3; currency=USD; language=en-gb'
},
formData: {
'order_id': '123',
'firstname': 'user3',
'lastname': 'kumar',
'email': 'exampl1@test.com',
'telephone': '9998887744',
'product': 'HTC Touch HD',
'model': 'product 1',
'return_reason_id': '1',
'opened': 'false',
'quantity': '1',
'date_ordered': '2021-12-22',
'comment': 'its not good product'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
url = "{{site_domain}}/index.php?route=ocrestapi/account/return/add"
payload={'order_id': '123',
'firstname': 'user3',
'lastname': 'kumar',
'email': 'exampl1@test.com',
'telephone': '9998887744',
'product': 'HTC Touch HD',
'model': 'product 1',
'return_reason_id': '1',
'opened': 'false',
'quantity': '1',
'date_ordered': '2021-12-22',
'comment': 'its not good product'}
files=[
]
headers = {
'Authorization': 'Bearer ac2947297505435b8cc556cf09cafa04e2cb661b',
'Cookie': 'OCSESSID=391a1607e2c5f08a0a157bf2e3; currency=USD; language=en-gb'
}
response = requests.request("POST", url, headers=headers, data=payload, files=files)
print(response.text)
var client = new RestClient("{{site_domain}}/index.php?route=ocrestapi/account/return/add");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer ac2947297505435b8cc556cf09cafa04e2cb661b");
request.AddHeader("Cookie", "OCSESSID=391a1607e2c5f08a0a157bf2e3; currency=USD; language=en-gb");
request.AlwaysMultipartFormData = true;
request.AddParameter("order_id", "123");
request.AddParameter("firstname", "user3");
request.AddParameter("lastname", "kumar");
request.AddParameter("email", "exampl1@test.com");
request.AddParameter("telephone", "9998887744");
request.AddParameter("product", "HTC Touch HD");
request.AddParameter("model", "product 1");
request.AddParameter("return_reason_id", "1");
request.AddParameter("opened", "false");
request.AddParameter("quantity", "1");
request.AddParameter("date_ordered", "2021-12-22");
request.AddParameter("comment", "its not good product");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request POST '{{site_domain}}/index.php?route=ocrestapi/account/return/add' \
--header 'Authorization: Bearer ac2947297505435b8cc556cf09cafa04e2cb661b' \
--header 'Cookie: OCSESSID=391a1607e2c5f08a0a157bf2e3; currency=USD; language=en-gb' \
--form 'order_id="123"' \
--form 'firstname="user3"' \
--form 'lastname="kumar"' \
--form 'email="exampl1@test.com"' \
--form 'telephone="9998887744"' \
--form 'product="HTC Touch HD"' \
--form 'model="product 1"' \
--form 'return_reason_id="1"' \
--form 'opened="false"' \
--form 'quantity="1"' \
--form 'date_ordered="2021-12-22"' \
--form 'comment="its not good product"'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = new MultipartBody.Builder().setType(MultipartBody.FORM)
.addFormDataPart("order_id","123")
.addFormDataPart("firstname","user3")
.addFormDataPart("lastname","kumar")
.addFormDataPart("email","exampl1@test.com")
.addFormDataPart("telephone","9998887744")
.addFormDataPart("product","HTC Touch HD")
.addFormDataPart("model","product 1")
.addFormDataPart("return_reason_id","1")
.addFormDataPart("opened","false")
.addFormDataPart("quantity","1")
.addFormDataPart("date_ordered","2021-12-22")
.addFormDataPart("comment","its not good product")
.build();
Request request = new Request.Builder()
.url("{{site_domain}}/index.php?route=ocrestapi/account/return/add")
.method("POST", body)
.addHeader("Authorization", "Bearer ac2947297505435b8cc556cf09cafa04e2cb661b")
.addHeader("Cookie", "OCSESSID=391a1607e2c5f08a0a157bf2e3; currency=USD; language=en-gb")
.build();
Response response = client.newCall(request).execute();
require "uri"
require "net/http"
url = URI("{{site_domain}}/index.php?route=ocrestapi/account/return/add")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)
request["Authorization"] = "Bearer ac2947297505435b8cc556cf09cafa04e2cb661b"
request["Cookie"] = "OCSESSID=391a1607e2c5f08a0a157bf2e3; currency=USD; language=en-gb"
form_data = [['order_id', '123'],['firstname', 'user3'],['lastname', 'kumar'],['email', 'exampl1@test.com'],['telephone', '9998887744'],['product', 'HTC Touch HD'],['model', 'product 1'],['return_reason_id', '1'],['opened', 'false'],['quantity', '1'],['date_ordered', '2021-12-22'],['comment', 'its not good product']]
request.set_form form_data, 'multipart/form-data'
response = http.request(request)
puts response.read_body
Response
{
"status": true,
"errors": [],
"data": {
"return_id": 70,
"success": "Thank you for submitting your return request. Your request has been sent to the relevant department for processing."
}
}
Account Password GET APIs
This APIs is used for get the Information of Customer Account fields/data.
GET: {{site_domain}}/index.php?route=ocrestapi/account/password
| Parameter | Type | Position | # | Description |
|---|---|---|---|---|
| token | string |
Headers |
Required |
Token is generate when user attempt login or register API. |
| Parameter | token |
|---|---|
| Type | string |
| Position | Headers |
| # | Required |
| Description | Token is generate when user attempt login or register API. |
'{{site_domain}}/index.php?route=ocrestapi/account/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 => 'GET',
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer a325091e54dc35c00b7fab3e0330cd085559a47b',
'Cookie: OCSESSID=391a1607e2c5f08a0a157bf2e3; currency=USD; language=en-gb'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var settings = {
"url": "{{site_domain}}/index.php?route=ocrestapi/account/password",
"method": "GET",
"timeout": 0,
"headers": {
"Authorization": "Bearer a325091e54dc35c00b7fab3e0330cd085559a47b",
"Cookie": "OCSESSID=391a1607e2c5f08a0a157bf2e3; currency=USD; language=en-gb"
},
};
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require('request');
var options = {
'method': 'GET',
'url': '{{site_domain}}/index.php?route=ocrestapi/account/password',
'headers': {
'Authorization': 'Bearer a325091e54dc35c00b7fab3e0330cd085559a47b',
'Cookie': 'OCSESSID=391a1607e2c5f08a0a157bf2e3; currency=USD; language=en-gb'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
url = "{{site_domain}}/index.php?route=ocrestapi/account/password"
payload={}
headers = {
'Authorization': 'Bearer a325091e54dc35c00b7fab3e0330cd085559a47b',
'Cookie': 'OCSESSID=391a1607e2c5f08a0a157bf2e3; currency=USD; language=en-gb'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
var client = new RestClient("{{site_domain}}/index.php?route=ocrestapi/account/password");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer a325091e54dc35c00b7fab3e0330cd085559a47b");
request.AddHeader("Cookie", "OCSESSID=391a1607e2c5f08a0a157bf2e3; currency=USD; language=en-gb");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request GET '{{site_domain}}/index.php?route=ocrestapi/account/password' \
--header 'Authorization: Bearer a325091e54dc35c00b7fab3e0330cd085559a47b' \
--header 'Cookie: OCSESSID=391a1607e2c5f08a0a157bf2e3; currency=USD; language=en-gb'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("{{site_domain}}/index.php?route=ocrestapi/account/password")
.method("GET", null)
.addHeader("Authorization", "Bearer a325091e54dc35c00b7fab3e0330cd085559a47b")
.addHeader("Cookie", "OCSESSID=391a1607e2c5f08a0a157bf2e3; currency=USD; language=en-gb")
.build();
Response response = client.newCall(request).execute();
require "uri"
require "net/http"
url = URI("{{site_domain}}/index.php?route=ocrestapi/account/password")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["Authorization"] = "Bearer a325091e54dc35c00b7fab3e0330cd085559a47b"
request["Cookie"] = "OCSESSID=391a1607e2c5f08a0a157bf2e3; currency=USD; language=en-gb"
response = http.request(request)
puts response.read_body
Response
{
"status": true,
"errors": [],
"data": [],
"language": {
"code": "en",
"direction": "ltr",
"date_format_short": "d/m/Y",
"date_format_long": "l dS F Y",
"time_format": "h:i:s A",
"datetime_format": "d/m/Y H:i:s",
"decimal_point": ".",
"thousand_point": ",",
"button_search": "Search",
"button_shipping": "Apply Shipping",
"button_submit": "Submit",
"button_guest": "Guest Checkout",
"button_view": "View",
"button_voucher": "Apply Gift Certificate",
"button_upload": "Upload File",
"datepicker": "en-gb",
"heading_title": "Change Password",
"text_account": "Account",
"text_password": "Your Password",
"text_success": "Success: Your password has been successfully updated.",
"error_required_country": "Country is required.",
"error_required_model": "Product model is required.",
"error_required_to_name": "Recipints Name is required.",
"error_required_to_email": "Recipints E-mail is required.",
"error_required_from_name": "Your Name is required.",
"error_required_from_email": "Your Email is required.",
.
...........
}
}
Account Password POST APIs
This APIs is used for change Customer account password.
POST: {{site_domain}}/index.php?route=ocrestapi/account/return/add
| Parameter | Type | Position | # | Description |
|---|---|---|---|---|
| token | string |
Headers |
Required |
Token is generate when user attempt login or register API. |
| old_password | string |
Body |
Required |
old_password of customer. |
| password | string |
Body |
Required |
password means new password for Customer. |
| confirm | string |
Body |
Required |
confirm means confirm password for Customer. |
| Parameter | token |
|---|---|
| Type | string |
| Position | Headers |
| # | Required |
| Description | Token is generate when user attempt login or register API. |
| Parameter | old_password |
| Type | string |
| Position | Body |
| # | Required |
| Description | old_password of customer. |
| Parameter | password |
| Type | string |
| Position | Body |
| # | Required |
| Description | password means new password for Customer. |
| Parameter | confirm |
| Type | integer |
| Position | Body |
| # | Required |
| Description | confirm means confirm password for Customer. |
'{{site_domain}}/index.php?route=ocrestapi/account/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 =>'{
"old_password":"1234",
"password":"123456",
"confirm":"123456"
}',
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer ac2947297505435b8cc556cf09cafa04e2cb661b',
'Content-Type: application/json',
'Cookie: OCSESSID=391a1607e2c5f08a0a157bf2e3; currency=USD; language=en-gb'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var settings = {
"url": "{{site_domain}}/index.php?route=ocrestapi/account/password",
"method": "POST",
"timeout": 0,
"headers": {
"Authorization": "Bearer ac2947297505435b8cc556cf09cafa04e2cb661b",
"Content-Type": "application/json",
"Cookie": "OCSESSID=391a1607e2c5f08a0a157bf2e3; currency=USD; language=en-gb"
},
"data": JSON.stringify({
"old_password": "1234",
"password": "123456",
"confirm": "123456"
}),
};
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require('request');
var options = {
'method': 'POST',
'url': '{{site_domain}}/index.php?route=ocrestapi/account/return/add',
'headers': {
'Authorization': 'Bearer ac2947297505435b8cc556cf09cafa04e2cb661b',
'Cookie': 'OCSESSID=391a1607e2c5f08a0a157bf2e3; currency=USD; language=en-gb'
},
formData: {
'order_id': '123',
'firstname': 'user3',
'lastname': 'kumar',
'email': 'exampl1@test.com',
'telephone': '9998887744',
'product': 'HTC Touch HD',
'model': 'product 1',
'return_reason_id': '1',
'opened': 'false',
'quantity': '1',
'date_ordered': '2021-12-22',
'comment': 'its not good product'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
import json
url = "{{site_domain}}/index.php?route=ocrestapi/account/password"
payload = json.dumps({
"old_password": "1234",
"password": "123456",
"confirm": "123456"
})
headers = {
'Authorization': 'Bearer ac2947297505435b8cc556cf09cafa04e2cb661b',
'Content-Type': 'application/json',
'Cookie': 'OCSESSID=391a1607e2c5f08a0a157bf2e3; currency=USD; language=en-gb'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
var client = new RestClient("{{site_domain}}/index.php?route=ocrestapi/account/password");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer ac2947297505435b8cc556cf09cafa04e2cb661b");
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Cookie", "OCSESSID=391a1607e2c5f08a0a157bf2e3; currency=USD; language=en-gb");
var body = @"{
" + "\n" +
@" ""old_password"":""1234"",
" + "\n" +
@" ""password"":""123456"",
" + "\n" +
@" ""confirm"":""123456""
" + "\n" +
@"}";
request.AddParameter("application/json", body, ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request POST '{{site_domain}}/index.php?route=ocrestapi/account/password' \
--header 'Authorization: Bearer ac2947297505435b8cc556cf09cafa04e2cb661b' \
--header 'Content-Type: application/json' \
--header 'Cookie: OCSESSID=391a1607e2c5f08a0a157bf2e3; currency=USD; language=en-gb' \
--data-raw '{
"old_password":"1234",
"password":"123456",
"confirm":"123456"
}'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n \"old_password\":\"1234\",\r\n \"password\":\"123456\",\r\n \"confirm\":\"123456\"\r\n}");
Request request = new Request.Builder()
.url("{{site_domain}}/index.php?route=ocrestapi/account/password")
.method("POST", body)
.addHeader("Authorization", "Bearer ac2947297505435b8cc556cf09cafa04e2cb661b")
.addHeader("Content-Type", "application/json")
.addHeader("Cookie", "OCSESSID=391a1607e2c5f08a0a157bf2e3; currency=USD; language=en-gb")
.build();
Response response = client.newCall(request).execute();
require "uri"
require "json"
require "net/http"
url = URI("{{site_domain}}/index.php?route=ocrestapi/account/password")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)
request["Authorization"] = "Bearer ac2947297505435b8cc556cf09cafa04e2cb661b"
request["Content-Type"] = "application/json"
request["Cookie"] = "OCSESSID=391a1607e2c5f08a0a157bf2e3; currency=USD; language=en-gb"
request.body = JSON.dump({
"old_password": "1234",
"password": "123456",
"confirm": "123456"
})
response = http.request(request)
puts response.read_body
Request
{
"old_password":"1234",
"password":"123456",
"confirm":"123456"
}
Response
{
"status": true,
"errors": [],
"data": {
"success": "Success: Your password has been successfully updated."
}
}
Customer Account Edit GET APIs
This APIs is used for get the Information of Customer Account details for edit.
GET: {{site_domain}}/index.php?route=ocrestapi/account/edit
| Parameter | Type | Position | # | Description |
|---|---|---|---|---|
| token | string |
Headers |
Required |
Token is generate when user attempt login or register API. |
| Parameter | token |
|---|---|
| Type | string |
| Position | Headers |
| # | Required |
| Description | Token is generate when user attempt login or register API. |
'{{site_domain}}/index.php?route=ocrestapi/account/edit',
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(
'Authorization: Bearer c5b9a68205629c186c30fc0b5e768b788f47b105',
'Cookie: OCSESSID=391a1607e2c5f08a0a157bf2e3; currency=USD; language=en-gb'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var form = new FormData();
var settings = {
"url": "{{site_domain}}/index.php?route=ocrestapi/account/edit",
"method": "GET",
"timeout": 0,
"headers": {
"Authorization": "Bearer c5b9a68205629c186c30fc0b5e768b788f47b105",
"Cookie": "OCSESSID=391a1607e2c5f08a0a157bf2e3; currency=USD; language=en-gb"
},
"processData": false,
"mimeType": "multipart/form-data",
"contentType": false,
"data": form
};
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require('request');
var options = {
'method': 'GET',
'url': '{{site_domain}}/index.php?route=ocrestapi/account/edit',
'headers': {
'Authorization': 'Bearer c5b9a68205629c186c30fc0b5e768b788f47b105',
'Cookie': 'OCSESSID=391a1607e2c5f08a0a157bf2e3; currency=USD; language=en-gb'
},
formData: {
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
url = "{{site_domain}}/index.php?route=ocrestapi/account/edit"
payload={}
files={}
headers = {
'Authorization': 'Bearer c5b9a68205629c186c30fc0b5e768b788f47b105',
'Cookie': 'OCSESSID=391a1607e2c5f08a0a157bf2e3; currency=USD; language=en-gb'
}
response = requests.request("GET", url, headers=headers, data=payload, files=files)
print(response.text)
var client = new RestClient("{{site_domain}}/index.php?route=ocrestapi/account/edit");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer c5b9a68205629c186c30fc0b5e768b788f47b105");
request.AddHeader("Cookie", "OCSESSID=391a1607e2c5f08a0a157bf2e3; currency=USD; language=en-gb");
request.AlwaysMultipartFormData = true;
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request GET '{{site_domain}}/index.php?route=ocrestapi/account/edit' \
--header 'Authorization: Bearer c5b9a68205629c186c30fc0b5e768b788f47b105' \
--header 'Cookie: OCSESSID=391a1607e2c5f08a0a157bf2e3; currency=USD; language=en-gb'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("{{site_domain}}/index.php?route=ocrestapi/account/edit")
.method("GET", null)
.addHeader("Authorization", "Bearer c5b9a68205629c186c30fc0b5e768b788f47b105")
.addHeader("Cookie", "OCSESSID=391a1607e2c5f08a0a157bf2e3; currency=USD; language=en-gb")
.build();
Response response = client.newCall(request).execute();
require "uri"
require "net/http"
url = URI("{{site_domain}}/index.php?route=ocrestapi/account/edit")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["Authorization"] = "Bearer c5b9a68205629c186c30fc0b5e768b788f47b105"
request["Cookie"] = "OCSESSID=391a1607e2c5f08a0a157bf2e3; currency=USD; language=en-gb"
form_data = []
request.set_form form_data, 'multipart/form-data'
response = http.request(request)
puts response.read_body
Response
{
"status": true,
"errors": [],
"data": {
"firstname": "user3",
"lastname": "testing",
"email": "example1@test.com",
"telephone": "9874567890"
},
"language": {
"code": "en",
"direction": "ltr",
"date_format_short": "d/m/Y",
"date_format_long": "l dS F Y",
"time_format": "h:i:s A",
"button_cancel": "Cancel",
"button_compare": "Compare this Product",
"button_wishlist": "Add to Wish List",
"button_reorder": "Reorder",
"error_upload_2": "Warning: The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form!",
"error_upload_3": "Warning: The uploaded file was only partially uploaded!",
"error_upload_4": "Warning: No file was uploaded!",
"error_upload_6": "Warning: Missing a temporary folder!", "
"text_api_tab_wishlist": "Wishlist",
"text_api_tab_info": "Info",
"text_for": "%s Gift Certificate for %s",
"entry_api_old_password": "Old Password",
"entry_api_new_password": "New Password",
"error_match_oldpassword": "old Password is not match",
"error_comment": "Comment must be between 10 and 50 characters!",
"error_not_available": "Quantity is not available",
"error_minimum_quantity": "Minimum quantity for %s is %s",
"error_form_error": "Warning: Please check the form carefully for errors!",
.
..........
}
}
Customer Account Edit POST APIs
This APIs is used for change or edit the Customer account detalis like name, email etc.
POST: {{site_domain}}/index.php?route=ocrestapi/account/edit
| Parameter | Type | Position | # | Description |
|---|---|---|---|---|
| token | string |
Headers |
Required |
Token is generate when user attempt login or register API. |
| firstname | string |
Body |
Required |
firstname of Customer. |
| lastname | string |
Body |
Required |
lastname of Customer. |
| telephone | string |
Body |
Required |
telephone number of Customer. |
string |
Body |
Required |
email of Customer. |
| Parameter | token |
|---|---|
| Type | string |
| Position | Headers |
| # | Required |
| Description | Token is generate when user attempt login or register API. |
| Parameter | firstname |
| Type | string |
| Position | Body |
| # | Required |
| Description | firstname of customer. |
| Parameter | lastname |
| Type | string |
| Position | Body |
| # | Required |
| Description | lastname of Customer. |
| Parameter | telephone |
| Type | string |
| Position | Body |
| # | Required |
| Description | telephone number of Customer. |
| Parameter | |
| Type | integer |
| Position | Body |
| # | Required |
| Description | email of Customer. |
'{{site_domain}}/index.php?route=ocrestapi/account/edit',
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 =>'{
"firstname":"user3",
"lastname":"kumars",
"email":"example1@test.com",
"telephone":"1234567891"
}',
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer 1a740e8db9cce0cf0b1b03f0cfee22fb2ec3d3ad',
'Content-Type: application/json',
'Cookie: OCSESSID=391a1607e2c5f08a0a157bf2e3; currency=USD; language=en-gb'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var settings = {
"url": "{{site_domain}}/index.php?route=ocrestapi/account/edit",
"method": "POST",
"timeout": 0,
"headers": {
"Authorization": "Bearer 1a740e8db9cce0cf0b1b03f0cfee22fb2ec3d3ad",
"Content-Type": "application/json",
"Cookie": "OCSESSID=391a1607e2c5f08a0a157bf2e3; currency=USD; language=en-gb"
},
"data": JSON.stringify({
"firstname": "user3",
"lastname": "kumars",
"email": "example1@test.com",
"telephone": "1234567891"
}),
};
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require('request');
var options = {
'method': 'POST',
'url': '{{site_domain}}/index.php?route=ocrestapi/account/edit',
'headers': {
'Authorization': 'Bearer 1a740e8db9cce0cf0b1b03f0cfee22fb2ec3d3ad',
'Content-Type': 'application/json',
'Cookie': 'OCSESSID=391a1607e2c5f08a0a157bf2e3; currency=USD; language=en-gb'
},
body: JSON.stringify({
"firstname": "user3",
"lastname": "kumars",
"email": "example1@test.com",
"telephone": "1234567891"
})
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
import json
url = "{{site_domain}}/index.php?route=ocrestapi/account/edit"
payload = json.dumps({
"firstname": "user3",
"lastname": "kumars",
"email": "example1@test.com",
"telephone": "1234567891"
})
headers = {
'Authorization': 'Bearer 1a740e8db9cce0cf0b1b03f0cfee22fb2ec3d3ad',
'Content-Type': 'application/json',
'Cookie': 'OCSESSID=391a1607e2c5f08a0a157bf2e3; currency=USD; language=en-gb'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
var client = new RestClient("{{site_domain}}/index.php?route=ocrestapi/account/edit");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer 1a740e8db9cce0cf0b1b03f0cfee22fb2ec3d3ad");
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Cookie", "OCSESSID=391a1607e2c5f08a0a157bf2e3; currency=USD; language=en-gb");
var body = @"{
" + "\n" +
@" ""firstname"":""user3"",
" + "\n" +
@" ""lastname"":""kumars"",
" + "\n" +
@" ""email"":""example1@test.com"",
" + "\n" +
@" ""telephone"":""1234567891""
" + "\n" +
@"}";
request.AddParameter("application/json", body, ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request POST '{{site_domain}}/index.php?route=ocrestapi/account/edit' \
--header 'Authorization: Bearer 1a740e8db9cce0cf0b1b03f0cfee22fb2ec3d3ad' \
--header 'Content-Type: application/json' \
--header 'Cookie: OCSESSID=391a1607e2c5f08a0a157bf2e3; currency=USD; language=en-gb' \
--data-raw '{
"firstname":"user3",
"lastname":"kumars",
"email":"example1@test.com",
"telephone":"1234567891"
}'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n \"firstname\":\"user3\",\r\n \"lastname\":\"kumars\",\r\n \"email\":\"example1@test.com\",\r\n \"telephone\":\"1234567891\"\r\n}");
Request request = new Request.Builder()
.url("{{site_domain}}/index.php?route=ocrestapi/account/edit")
.method("POST", body)
.addHeader("Authorization", "Bearer 1a740e8db9cce0cf0b1b03f0cfee22fb2ec3d3ad")
.addHeader("Content-Type", "application/json")
.addHeader("Cookie", "OCSESSID=391a1607e2c5f08a0a157bf2e3; currency=USD; language=en-gb")
.build();
Response response = client.newCall(request).execute();
require "uri"
require "json"
require "net/http"
url = URI("{{site_domain}}/index.php?route=ocrestapi/account/edit")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)
request["Authorization"] = "Bearer 1a740e8db9cce0cf0b1b03f0cfee22fb2ec3d3ad"
request["Content-Type"] = "application/json"
request["Cookie"] = "OCSESSID=391a1607e2c5f08a0a157bf2e3; currency=USD; language=en-gb"
request.body = JSON.dump({
"firstname": "user3",
"lastname": "kumars",
"email": "example1@test.com",
"telephone": "1234567891"
})
response = http.request(request)
puts response.read_body
Request
{
"firstname":"user3",
"lastname":"kumars",
"email":"example1@test.com",
"telephone":"1234567891"
}
Response
{
"status": true,
"errors": [],
"data": {
"success": "Success: Your account has been successfully updated."
}
}
Customer Cart List GET API
This APIs is used for get the Information of Products in the cart of Customer and how many products are in the cart of Customer.
GET: {{site_domain}}/index.php?route=ocrestapi/checkout/cart
| Parameter | Type | Position | # | Description |
|---|---|---|---|---|
| token | string |
Headers |
Required |
Token is generate when user attempt login or register API. |
| Parameter | token |
|---|---|
| Type | string |
| Position | Headers |
| # | Required |
| Description | Token is generate when user attempt login or register API. |
'{{site_domain}}/index.php?route=ocrestapi/checkout/cart',
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(
'x-oc-session: 83991240edc3a67b4d9c432cd1',
'Authorization: Bearer 808beb3b75c5b6a5389797cb841a42a76376e5fe',
'Cookie: OCSESSID=af1fefd50ebc18c60a21513aa0; currency=USD; language=en-gb'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var settings = {
"url": "{{site_domain}}/index.php?route=ocrestapi/checkout/cart",
"method": "GET",
"timeout": 0,
"headers": {
"x-oc-session": "83991240edc3a67b4d9c432cd1",
"Authorization": "Bearer 808beb3b75c5b6a5389797cb841a42a76376e5fe",
"Cookie": "OCSESSID=af1fefd50ebc18c60a21513aa0; currency=USD; language=en-gb"
},
};
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require('request');
var options = {
'method': 'GET',
'url': '{{site_domain}}/index.php?route=ocrestapi/product/listing&category_ids=20',
'headers': {
'Authorization': 'Bearer 39da1e9f467af951e4f0b3dc9eb565c7e6c8d334',
'Cookie': 'OCSESSID=657f5c3732eed0750289fa16fe; currency=USD; language=en-gb'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
url = "{{site_domain}}/index.php?route=ocrestapi/checkout/cart"
payload = ""
headers = {
'x-oc-session': '83991240edc3a67b4d9c432cd1',
'Authorization': 'Bearer 808beb3b75c5b6a5389797cb841a42a76376e5fe',
'Cookie': 'OCSESSID=af1fefd50ebc18c60a21513aa0; currency=USD; language=en-gb'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
var client = new RestClient("{{site_domain}}/index.php?route=ocrestapi/checkout/cart");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("x-oc-session", "83991240edc3a67b4d9c432cd1");
request.AddHeader("Authorization", "Bearer 808beb3b75c5b6a5389797cb841a42a76376e5fe");
request.AddHeader("Cookie", "OCSESSID=af1fefd50ebc18c60a21513aa0; currency=USD; language=en-gb");
var body = @"";
request.AddParameter("text/plain", body, ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request GET '{{site_domain}}/index.php?route=ocrestapi/checkout/cart' \
--header 'x-oc-session: 83991240edc3a67b4d9c432cd1' \
--header 'Authorization: Bearer 808beb3b75c5b6a5389797cb841a42a76376e5fe' \
--header 'Cookie: OCSESSID=af1fefd50ebc18c60a21513aa0; currency=USD; language=en-gb' \
--data-raw ''
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("{{site_domain}}/index.php?route=ocrestapi/checkout/cart")
.method("GET", null)
.addHeader("x-oc-session", "83991240edc3a67b4d9c432cd1")
.addHeader("Authorization", "Bearer 808beb3b75c5b6a5389797cb841a42a76376e5fe")
.addHeader("Cookie", "OCSESSID=af1fefd50ebc18c60a21513aa0; currency=USD; language=en-gb")
.build();
Response response = client.newCall(request).execute();
require "uri"
require "net/http"
url = URI("{{site_domain}}/index.php?route=ocrestapi/checkout/cart")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["x-oc-session"] = "83991240edc3a67b4d9c432cd1"
request["Authorization"] = "Bearer 808beb3b75c5b6a5389797cb841a42a76376e5fe"
request["Cookie"] = "OCSESSID=af1fefd50ebc18c60a21513aa0; currency=USD; language=en-gb"
response = http.request(request)
puts response.read_body
Response
{
"status": true,
"errors": [],
"data": {
"products": [
{
"cart_id": "416",
"thumb": "{{site_domain}}/image/cache/catalog/demo/htc_touch_hd_1-47x47.jpg",
"product_id": "28",
"name": "HTC Touch HD",
"model": "Product 1",
"option": [],
"recurring": "",
"quantity": "1",
"minimum_quantity": "1",
"stock": true,
"reward": "Reward Points: 400",
"price": "$100.00",
"total": "$100.00"
},
{
"cart_id": "414",
"thumb": "{{site_domain}}/image/cache/catalog/demo/sony_vaio_1-47x47.jpg",
"product_id": "46",
"name": "Sony VAIO",
"model": "Product 19",
"option": [],
"recurring": "",
"quantity": "1",
"minimum_quantity": "1",
"stock": true,
"reward": "",
"price": "$1,000.00",
"total": "$1,000.00"
}
],
"vouchers": [],
"totals": [
{
"title": "Sub-Total",
"text": "$1,100.00"
},
{
"title": "Total",
"text": "$1,100.00"
}
],
"total": "$1,100.00"
},
"language": {
"code": "en",
"direction": "ltr",
"date_format_short": "d/m/Y",
"button_write": "Write Review",
"button_login": "Login",
"button_update": "Update",
"button_remove": "Remove",
"button_map": "View Google Map",
"error_exception": "Error Code(%s): %s in %s on line %s",
"error_upload_1": "Warning: The uploaded file exceeds the upload_max_filesize directive in php.ini!",
"error_upload_2": "Warning: The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form!",
"error_upload_3": "Warning: The uploaded file was only partially uploaded!",
"error_upload_4": "Warning: No file was uploaded!",
"error_upload_6": "Warning: Missing a temporary folder!",
"error_upload_7": "Warning: Failed to write file to disk!",
"error_upload_8": "Warning: File upload stopped by extension!",
"error_upload_999": "Warning: No error code available!",
"error_curl": "CURL: Error Code(%s): %s",
"text_semi_month": "half-month",
"error_minimum": "Minimum order amount for %s is %s!",
"error_required": "%s required!",
"error_product": "Warning: There are no products in your cart!",
"error_recurring_required": "Please select a payment recurring!",
"error_required_firstname": "Firstname is required.",
"error_required_lastname": "Lastname is required.",
"entry_shipping_country": "Country",
"entry_shipping_zone": "Region / State",
"entry_shipping_postcode": "Post Code",
"error_shipping_postcode": "Postcode must be between 2 and 10 characters!",
"error_shipping_country": "Please select a country!",
"error_shipping_zone": "Please select a region / state!",
"error_shipping_shipping": "Warning: Shipping method required!",
.
............
}
}
Customer Cart Add POST APIs
This APIs is used for add the prodcut in customer cart.
POST: {{site_domain}}/index.php?route=ocrestapi/checkout/cart/add
| Parameter | Type | Position | # | Description |
|---|---|---|---|---|
| token | string |
Headers |
Required |
Token is generate when user attempt login or register API. |
| product_id | integer |
Body |
Required |
product_id of the product whatever product customer add in the cart if you will not give product_id then you can't add product in cart. |
| recurring_id | string |
Body |
Optional |
recurring_id for the product. |
| quantity | Integer |
Body |
Required |
quantity means how many customer add in the cart but it must be more than 0 (zero). |
| option | text/json |
Body |
Optional |
option means how many option is required of the products like date, file etc. |
| Parameter | token |
|---|---|
| Type | string |
| Position | Headers |
| # | Required |
| Description | Token is generate when user attempt login or register API. |
| Parameter | product_id |
| Type | integer |
| Position | Body |
| # | Required |
| Description | product_id of the product whatever product customer add in the cart if you will not give product_id then you can't add product in cart. |
| Parameter | recuuring_id |
| Type | integer |
| Position | Body |
| # | Optional |
| Description | recurring_id for the product. |
| Parameter | quantity |
| Type | integer |
| Position | Body |
| # | Required |
| Description | quantity means how many customer add in the cart but it must be more than 0 (zero). |
| Parameter | option |
| Type | text/json |
| Position | Body |
| # | optional |
| Description | option means how many option is required of the products like date, file etc. |
'{{site_domain}}/index.php?route=ocrestapi/checkout/cart/add',
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 =>'{
"product_id":48,
"recurring_id":"",
"quantity":1,
"option":{
}
}',
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer 808beb3b75c5b6a5389797cb841a42a76376e5fe',
'Content-Type: application/json',
'Cookie: OCSESSID=af1fefd50ebc18c60a21513aa0; currency=USD; language=en-gb'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var settings = {
"url": "{{site_domain}}/index.php?route=ocrestapi/checkout/cart/add",
"method": "POST",
"timeout": 0,
"headers": {
"Authorization": "Bearer 808beb3b75c5b6a5389797cb841a42a76376e5fe",
"Content-Type": "application/json",
"Cookie": "OCSESSID=af1fefd50ebc18c60a21513aa0; currency=USD; language=en-gb"
},
"data": JSON.stringify({
"product_id": 48,
"recurring_id": "",
"quantity": 1,
"option": {}
}),
};
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require('request');
var options = {
'method': 'POST',
'url': '{{site_domain}}/index.php?route=ocrestapi/checkout/cart/add',
'headers': {
'Authorization': 'Bearer 808beb3b75c5b6a5389797cb841a42a76376e5fe',
'Content-Type': 'application/json',
'Cookie': 'OCSESSID=af1fefd50ebc18c60a21513aa0; currency=USD; language=en-gb'
},
body: JSON.stringify({
"product_id": 48,
"recurring_id": "",
"quantity": 1,
"option": {}
})
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
import json
url = "{{site_domain}}/index.php?route=ocrestapi/checkout/cart/add"
payload = json.dumps({
"product_id": 48,
"recurring_id": "",
"quantity": 1,
"option": {}
})
headers = {
'Authorization': 'Bearer 808beb3b75c5b6a5389797cb841a42a76376e5fe',
'Content-Type': 'application/json',
'Cookie': 'OCSESSID=af1fefd50ebc18c60a21513aa0; currency=USD; language=en-gb'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
var client = new RestClient("{{site_domain}}/index.php?route=ocrestapi/checkout/cart/add");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer 808beb3b75c5b6a5389797cb841a42a76376e5fe");
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Cookie", "OCSESSID=af1fefd50ebc18c60a21513aa0; currency=USD; language=en-gb");
var body = @"{
" + "\n" +
@" ""product_id"":48,
" + "\n" +
@" ""recurring_id"":"""",
" + "\n" +
@" ""quantity"":1,
" + "\n" +
@" ""option"":{
" + "\n" +
@"}
" + "\n" +
@"}";
request.AddParameter("application/json", body, ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request POST '{{site_domain}}/index.php?route=ocrestapi/checkout/cart/add' \
--header 'Authorization: Bearer 808beb3b75c5b6a5389797cb841a42a76376e5fe' \
--header 'Content-Type: application/json' \
--header 'Cookie: OCSESSID=af1fefd50ebc18c60a21513aa0; currency=USD; language=en-gb' \
--data-raw '{
"product_id":48,
"recurring_id":"",
"quantity":1,
"option":{
}
}'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n \"product_id\":48,\r\n \"recurring_id\":\"\",\r\n \"quantity\":1,\r\n \"option\":{\r\n}\r\n}");
Request request = new Request.Builder()
.url("{{site_domain}}/index.php?route=ocrestapi/checkout/cart/add")
.method("POST", body)
.addHeader("Authorization", "Bearer 808beb3b75c5b6a5389797cb841a42a76376e5fe")
.addHeader("Content-Type", "application/json")
.addHeader("Cookie", "OCSESSID=af1fefd50ebc18c60a21513aa0; currency=USD; language=en-gb")
.build();
Response response = client.newCall(request).execute();
require "uri"
require "json"
require "net/http"
url = URI("{{site_domain}}/index.php?route=ocrestapi/checkout/cart/add")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)
request["Authorization"] = "Bearer 808beb3b75c5b6a5389797cb841a42a76376e5fe"
request["Content-Type"] = "application/json"
request["Cookie"] = "OCSESSID=af1fefd50ebc18c60a21513aa0; currency=USD; language=en-gb"
request.body = JSON.dump({
"product_id": 48,
"recurring_id": "",
"quantity": 1,
"option": {}
})
response = http.request(request)
puts response.read_body
Request
{
"product_id":48,
"recurring_id":"",
"quantity":1,
"option":{
}
}
Response
{
"status": true,
"errors": [],
"data": {
"success": "Success: You have added iPod Classic to your shopping cart!",
"rest_session_id": "e8972fc58ddfcf2a9a3fdef783",
"total": 3
},
"options": []
}
Customer Cart Delete POST APIs
This APIs is used for remove the product from the cart of customer.
POST: {{site_domain}}/index.php?route=ocrestapi/checkout/cart/remove
| Parameter | Type | Position | # | Description |
|---|---|---|---|---|
| token | string |
Headers |
Required |
Token is generate when user attempt login or register API. |
| cart_id | integer |
Body |
Required |
cart_id of the product to be remove and that cart_id get from customer cart list APIs. |
| Parameter | token |
|---|---|
| Type | string |
| Position | Headers |
| # | Required |
| Description | Token is generate when user attempt login or register API. |
| Parameter | cart_id |
| Type | integer |
| Position | Body |
| # | Required |
| Description | cart_id of the product to be remove and that cart_id get from customer cart list APIs. |
'{{site_domain}}/index.php?route=ocrestapi/checkout/cart/remove',
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 =>'{
"cart_id":"424"
}',
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer 808beb3b75c5b6a5389797cb841a42a76376e5fe',
'Content-Type: application/json',
'Cookie: OCSESSID=af1fefd50ebc18c60a21513aa0; currency=USD; language=en-gb'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var settings = {
"url": "{{site_domain}}/index.php?route=ocrestapi/checkout/cart/remove",
"method": "POST",
"timeout": 0,
"headers": {
"Authorization": "Bearer 808beb3b75c5b6a5389797cb841a42a76376e5fe",
"Content-Type": "application/json",
"Cookie": "OCSESSID=af1fefd50ebc18c60a21513aa0; currency=USD; language=en-gb"
},
"data": JSON.stringify({
"cart_id": "424"
}),
};
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require('request');
var options = {
'method': 'POST',
'url': '{{site_domain}}/index.php?route=ocrestapi/checkout/cart/remove',
'headers': {
'Authorization': 'Bearer 808beb3b75c5b6a5389797cb841a42a76376e5fe',
'Content-Type': 'application/json',
'Cookie': 'OCSESSID=af1fefd50ebc18c60a21513aa0; currency=USD; language=en-gb'
},
body: JSON.stringify({
"cart_id": "424"
})
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
import json
url = "{{site_domain}}/index.php?route=ocrestapi/checkout/cart/remove"
payload = json.dumps({
"cart_id": "424"
})
headers = {
'Authorization': 'Bearer 808beb3b75c5b6a5389797cb841a42a76376e5fe',
'Content-Type': 'application/json',
'Cookie': 'OCSESSID=af1fefd50ebc18c60a21513aa0; currency=USD; language=en-gb'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
var client = new RestClient("{{site_domain}}/index.php?route=ocrestapi/checkout/cart/remove");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer 808beb3b75c5b6a5389797cb841a42a76376e5fe");
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Cookie", "OCSESSID=af1fefd50ebc18c60a21513aa0; currency=USD; language=en-gb");
var body = @"{
" + "\n" +
@" ""cart_id"":""424""
" + "\n" +
@"}";
request.AddParameter("application/json", body, ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request POST '{{site_domain}}/index.php?route=ocrestapi/checkout/cart/remove' \
--header 'Authorization: Bearer 808beb3b75c5b6a5389797cb841a42a76376e5fe' \
--header 'Content-Type: application/json' \
--header 'Cookie: OCSESSID=af1fefd50ebc18c60a21513aa0; currency=USD; language=en-gb' \
--data-raw '{
"cart_id":"424"
}'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n \"cart_id\":\"424\"\r\n}");
Request request = new Request.Builder()
.url("{{site_domain}}/index.php?route=ocrestapi/checkout/cart/remove")
.method("POST", body)
.addHeader("Authorization", "Bearer 808beb3b75c5b6a5389797cb841a42a76376e5fe")
.addHeader("Content-Type", "application/json")
.addHeader("Cookie", "OCSESSID=af1fefd50ebc18c60a21513aa0; currency=USD; language=en-gb")
.build();
Response response = client.newCall(request).execute();
require "uri"
require "json"
require "net/http"
url = URI("{{site_domain}}/index.php?route=ocrestapi/checkout/cart/remove")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)
request["Authorization"] = "Bearer 808beb3b75c5b6a5389797cb841a42a76376e5fe"
request["Content-Type"] = "application/json"
request["Cookie"] = "OCSESSID=af1fefd50ebc18c60a21513aa0; currency=USD; language=en-gb"
request.body = JSON.dump({
"cart_id": "424"
})
response = http.request(request)
puts response.read_body
Request
{
"cart_id":"424"
}
Response
{
"status": true,
"errors": [],
"data": {
"success": "Success: You have modified your shopping cart!",
"total": "5 item(s) - $440.00"
}
}
Customer Cart Quantity Update POST APIs
This APIs is used for update the product quantity in the cart of customer.
POST: {{site_domain}}/index.php?route=ocrestapi/checkout/cart/edit
| Parameter | Type | Position | # | Description |
|---|---|---|---|---|
| token | string |
Headers |
Required |
Token is generate when user attempt login or register API. |
| cart_id | integer |
Body |
Required |
cart_id of the product to be update and that cart_id get from customer cart list APIs. |
| quantity | Integer |
Body |
Required |
quantity means how many customer add in the cart but it must be more than 0 (zero). |
| Parameter | token |
|---|---|
| Type | string |
| Position | Headers |
| # | Required |
| Description | Token is generate when user attempt login or register API. |
| Parameter | key |
| Type | integer |
| Position | Body |
| # | Required |
| Description | cart_id of the product to be update and that cart_id get from customer cart list APIs. |
| Parameter | quantity |
| Type | integer |
| Position | Body |
| # | Required |
| Description | quantity means how many customer add in the cart but it must be more than 0 (zero). |
'{{site_domain}}/index.php?route=ocrestapi/checkout/cart/edit',
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 =>'{
"cart_id":"416",
"quantity":2
}',
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer 808beb3b75c5b6a5389797cb841a42a76376e5fe',
'Content-Type: application/json',
'Cookie: OCSESSID=af1fefd50ebc18c60a21513aa0; currency=USD; language=en-gb'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var settings = {
"url": "{{site_domain}}/index.php?route=ocrestapi/checkout/cart/edit",
"method": "POST",
"timeout": 0,
"headers": {
"Authorization": "Bearer 808beb3b75c5b6a5389797cb841a42a76376e5fe",
"Content-Type": "application/json",
"Cookie": "OCSESSID=af1fefd50ebc18c60a21513aa0; currency=USD; language=en-gb"
},
"data": JSON.stringify({
"cart_id": "416",
"quantity": 2
}),
};
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require('request');
var options = {
'method': 'POST',
'url': '{{site_domain}}/index.php?route=ocrestapi/checkout/cart/edit',
'headers': {
'Authorization': 'Bearer 808beb3b75c5b6a5389797cb841a42a76376e5fe',
'Content-Type': 'application/json',
'Cookie': 'OCSESSID=af1fefd50ebc18c60a21513aa0; currency=USD; language=en-gb'
},
body: JSON.stringify({
"cart_id": "416",
"quantity": 2
})
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
import json
url = "{{site_domain}}/index.php?route=ocrestapi/checkout/cart/edit"
payload = json.dumps({
"cart_id": "416",
"quantity": 2
})
headers = {
'Authorization': 'Bearer 808beb3b75c5b6a5389797cb841a42a76376e5fe',
'Content-Type': 'application/json',
'Cookie': 'OCSESSID=af1fefd50ebc18c60a21513aa0; currency=USD; language=en-gb'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
var client = new RestClient("{{site_domain}}/index.php?route=ocrestapi/checkout/cart/edit");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer 808beb3b75c5b6a5389797cb841a42a76376e5fe");
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Cookie", "OCSESSID=af1fefd50ebc18c60a21513aa0; currency=USD; language=en-gb");
var body = @"{
" + "\n" +
@"""cart_id"":""416"",
" + "\n" +
@"""quantity"":2
" + "\n" +
@"}";
request.AddParameter("application/json", body, ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request POST '{{site_domain}}/index.php?route=ocrestapi/checkout/cart/edit' \
--header 'Authorization: Bearer 808beb3b75c5b6a5389797cb841a42a76376e5fe' \
--header 'Content-Type: application/json' \
--header 'Cookie: OCSESSID=af1fefd50ebc18c60a21513aa0; currency=USD; language=en-gb' \
--data-raw '{
"cart_id":"416",
"quantity":2
}'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n\"cart_id\":\"416\",\r\n\"quantity\":2\r\n}");
Request request = new Request.Builder()
.url("{{site_domain}}/index.php?route=ocrestapi/checkout/cart/edit")
.method("POST", body)
.addHeader("Authorization", "Bearer 808beb3b75c5b6a5389797cb841a42a76376e5fe")
.addHeader("Content-Type", "application/json")
.addHeader("Cookie", "OCSESSID=af1fefd50ebc18c60a21513aa0; currency=USD; language=en-gb")
.build();
Response response = client.newCall(request).execute();
require "uri"
require "json"
require "net/http"
url = URI("{{site_domain}}/index.php?route=ocrestapi/checkout/cart/edit")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)
request["Authorization"] = "Bearer 808beb3b75c5b6a5389797cb841a42a76376e5fe"
request["Content-Type"] = "application/json"
request["Cookie"] = "OCSESSID=af1fefd50ebc18c60a21513aa0; currency=USD; language=en-gb"
request.body = JSON.dump({
"cart_id": "416",
"quantity": 2
})
response = http.request(request)
puts response.read_body
Request
{
"cart_id":"416",
"quantity":2
}
Response
{
"status": true,
"errors": [],
"data": {
"success": "Success: You have modified your shopping cart!"
}
}
Apply Coupon POST APIs
This APIs is used for apply the coupon on the product.
POST: {{site_domain}}/index.php?route=ocrestapi/extension/total/coupon/coupon
| Parameter | Type | Position | # | Description |
|---|---|---|---|---|
| token | string |
Headers |
Required |
Token is generate when user attempt login or register API. |
| coupon | string |
Body |
Required |
coupon means coupon code of the coupon. |
| Parameter | token |
|---|---|
| Type | string |
| Position | Headers |
| # | Required |
| Description | Token is generate when user attempt login or register API. |
| Parameter | coupon |
| Type | string |
| Position | Body |
| # | Required |
| Description | coupon means coupon code of the coupon |
'{{site_domain}}/index.php?route=ocrestapi/extension/total/coupon/coupon',
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 =>'{
"coupon":"abc123"
}',
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer c2cf71fb67e3ddf44ac1eb6db6f11f1f5b5fa0c6',
'Content-Type: application/json',
'Cookie: OCSESSID=af1fefd50ebc18c60a21513aa0; currency=USD; language=en-gb'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var settings = {
"url": "{{site_domain}}/index.php?route=ocrestapi/extension/total/coupon/coupon",
"method": "POST",
"timeout": 0,
"headers": {
"Authorization": "Bearer c2cf71fb67e3ddf44ac1eb6db6f11f1f5b5fa0c6",
"Content-Type": "application/json",
"Cookie": "OCSESSID=af1fefd50ebc18c60a21513aa0; currency=USD; language=en-gb"
},
"data": JSON.stringify({
"coupon": "abc123"
}),
};
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require('request');
var options = {
'method': 'POST',
'url': '{{site_domain}}/index.php?route=ocrestapi/extension/total/coupon/coupon',
'headers': {
'Authorization': 'Bearer c2cf71fb67e3ddf44ac1eb6db6f11f1f5b5fa0c6',
'Content-Type': 'application/json',
'Cookie': 'OCSESSID=af1fefd50ebc18c60a21513aa0; currency=USD; language=en-gb'
},
body: JSON.stringify({
"coupon": "abc123"
})
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
import json
url = "{{site_domain}}/index.php?route=ocrestapi/extension/total/coupon/coupon"
payload = json.dumps({
"coupon": "abc123"
})
headers = {
'Authorization': 'Bearer c2cf71fb67e3ddf44ac1eb6db6f11f1f5b5fa0c6',
'Content-Type': 'application/json',
'Cookie': 'OCSESSID=af1fefd50ebc18c60a21513aa0; currency=USD; language=en-gb'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
var client = new RestClient("{{site_domain}}/index.php?route=ocrestapi/extension/total/coupon/coupon");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer c2cf71fb67e3ddf44ac1eb6db6f11f1f5b5fa0c6");
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Cookie", "OCSESSID=af1fefd50ebc18c60a21513aa0; currency=USD; language=en-gb");
var body = @"{
" + "\n" +
@" ""coupon"":""abc123""
" + "\n" +
@"
" + "\n" +
@"}";
request.AddParameter("application/json", body, ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request POST '{{site_domain}}/index.php?route=ocrestapi/extension/total/coupon/coupon' \
--header 'Authorization: Bearer c2cf71fb67e3ddf44ac1eb6db6f11f1f5b5fa0c6' \
--header 'Content-Type: application/json' \
--header 'Cookie: OCSESSID=af1fefd50ebc18c60a21513aa0; currency=USD; language=en-gb' \
--data-raw '{
"coupon":"abc123"
}'
OkHttpClient client = new OkHttpClient().newBuilder().build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n \"coupon\":\"abc123\"\r\n \r\n}");
Request request = new Request.Builder()
.url("{{site_domain}}/index.php?route=ocrestapi/extension/total/coupon/coupon")
.method("POST", body)
.addHeader("Authorization", "Bearer c2cf71fb67e3ddf44ac1eb6db6f11f1f5b5fa0c6")
.addHeader("Content-Type", "application/json")
.addHeader("Cookie", "OCSESSID=af1fefd50ebc18c60a21513aa0; currency=USD; language=en-gb")
.build();
Response response = client.newCall(request).execute();
require "uri"
require "json"
require "net/http"
url = URI("{{site_domain}}/index.php?route=ocrestapi/extension/total/coupon/coupon")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)
request["Authorization"] = "Bearer c2cf71fb67e3ddf44ac1eb6db6f11f1f5b5fa0c6"
request["Content-Type"] = "application/json"
request["Cookie"] = "OCSESSID=af1fefd50ebc18c60a21513aa0; currency=USD; language=en-gb"
request.body = JSON.dump({
"coupon": "abc123"
})
response = http.request(request)
puts response.read_body
Request
{
"coupon":"abc123"
}
Response
{
"status": true,
"errors": [],
"data": {
"success": "Success: Your coupon discount has been applied!"
},
"language": {
"code": "en",
"direction": "ltr",
"date_format_short": "d/m/Y",
"date_format_long": "l dS F Y",
"time_format": "h:i:s A",
"datetime_format": "d/m/Y H:i:s",
"decimal_point": ".",
"button_continue": "Continue",
"button_cart": "Add to Cart",
"button_cancel": "Cancel",
"button_compare": "Compare this Product",
"button_wishlist": "Add to Wish List",
"button_checkout": "Checkout",
"button_confirm": "Confirm Order",
"button_coupon": "Apply Coupon",
"button_grid": "Grid",
"button_map": "View Google Map",
"error_exception": "Error Code(%s): %s in %s on line %s",
"error_upload_1": "Warning: The uploaded file exceeds the upload_max_filesize directive in php.ini!",
"error_upload_2": "Warning: The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form!",
"error_upload_3": "Warning: The uploaded file was only partially uploaded!",
"error_upload_4": "Warning: No file was uploaded!",
"error_upload_6": "Warning: Missing a temporary folder!",
"error_upload_7": "Warning: Failed to write file to disk!",
"error_upload_8": "Warning: File upload stopped by extension!",
"error_upload_999": "Warning: No error code available!",
"error_curl": "CURL: Error Code(%s): %s",
.
.......
}
}
Apply Coupon GET APIs
This APIs is used for get the information of coupon apply on the product.
GET: {{site_domain}}/index.php?route=ocrestapi/extension/total/coupon
| Parameter | Type | Position | # | Description |
|---|---|---|---|---|
| token | string |
Headers |
Required |
Token is generate when user attempt login or register API. |
| Parameter | token |
|---|---|
| Type | string |
| Position | Headers |
| # | Required |
| Description | Token is generate when user attempt login or register API. |
'{{site_domain}}/index.php?route=ocrestapi/extension/total/coupon',
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(
'Authorization: Bearer c2cf71fb67e3ddf44ac1eb6db6f11f1f5b5fa0c6',
'Cookie: OCSESSID=79eb394f7dc5ab821214611876; currency=USD; language=en-gb'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var settings = {
"url": "{{site_domain}}/index.php?route=ocrestapi/extension/total/coupon",
"method": "GET",
"timeout": 0,
"headers": {
"Authorization": "Bearer c2cf71fb67e3ddf44ac1eb6db6f11f1f5b5fa0c6",
"Cookie": "OCSESSID=79eb394f7dc5ab821214611876; currency=USD; language=en-gb"
},
};
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require('request');
var options = {
'method': 'GET',
'url': '{{site_domain}}/index.php?route=ocrestapi/extension/total/coupon',
'headers': {
'Authorization': 'Bearer c2cf71fb67e3ddf44ac1eb6db6f11f1f5b5fa0c6',
'Cookie': 'OCSESSID=79eb394f7dc5ab821214611876; currency=USD; language=en-gb'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
url = "{{site_domain}}/index.php?route=ocrestapi/extension/total/coupon"
payload={}
headers = {
'Authorization': 'Bearer c2cf71fb67e3ddf44ac1eb6db6f11f1f5b5fa0c6',
'Cookie': 'OCSESSID=79eb394f7dc5ab821214611876; currency=USD; language=en-gb'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
var client = new RestClient("{{site_domain}}/index.php?route=ocrestapi/extension/total/coupon");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer c2cf71fb67e3ddf44ac1eb6db6f11f1f5b5fa0c6");
request.AddHeader("Cookie", "OCSESSID=79eb394f7dc5ab821214611876; currency=USD; language=en-gb");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request GET '{{site_domain}}/index.php?route=ocrestapi/extension/total/coupon' \
--header 'Authorization: Bearer c2cf71fb67e3ddf44ac1eb6db6f11f1f5b5fa0c6' \
--header 'Cookie: OCSESSID=79eb394f7dc5ab821214611876; currency=USD; language=en-gb'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("{{site_domain}}/index.php?route=ocrestapi/extension/total/coupon")
.method("GET", null)
.addHeader("Authorization", "Bearer c2cf71fb67e3ddf44ac1eb6db6f11f1f5b5fa0c6")
.addHeader("Cookie", "OCSESSID=79eb394f7dc5ab821214611876; currency=USD; language=en-gb")
.build();
Response response = client.newCall(request).execute();
require "uri"
require "net/http"
url = URI("{{site_domain}}/index.php?route=ocrestapi/extension/total/coupon")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["Authorization"] = "Bearer c2cf71fb67e3ddf44ac1eb6db6f11f1f5b5fa0c6"
request["Cookie"] = "OCSESSID=79eb394f7dc5ab821214611876; currency=USD; language=en-gb"
response = http.request(request)
puts response.read_body
Response
{
"status": true,
"errors": [],
"data": {
"coupon": "abc123"
},
"language": {
"code": "en",
"direction": "ltr",
"date_format_short": "d/m/Y",
"date_format_long": "l dS F Y",
"button_compare": "Compare this Product",
"button_wishlist": "Add to Wish List",
"button_checkout": "Checkout",
"button_map": "View Google Map",
"error_exception": "Error Code(%s): %s in %s on line %s",
"error_upload_1": "Warning: The uploaded file exceeds the upload_max_filesize directive in php.ini!",
"error_upload_2": "Warning: The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form!",
"error_empty": "Warning: Please enter a coupon code!"
.
.
...........
}
}
Estimate Shipping&Texs POST APIs
This APIs is used for add the shipping texs quote in the country.
POST: {{site_domain}}/index.php?route=ocrestapi/extension/total/shipping/quote
| Parameter | Type | Position | # | Description |
|---|---|---|---|---|
| token | string |
Headers |
Required |
Token is generate when user attempt login or register API. |
| country_id | integer |
Body |
Required |
country_id of country. |
| zone_id | string |
Body |
Required |
zone_id of states. |
| postcode | string |
Body |
Required |
postcode of city. |
| Parameter | token |
|---|---|
| Type | string |
| Position | Headers |
| # | Required |
| Description | Token is generate when user attempt login or register API. |
| Parameter | country_id |
| Type | integer |
| Position | Body |
| # | Required |
| Description | country_id of country. |
| Parameter | zone_id |
| Type | string |
| Position | Body |
| # | Required |
| Description | zone_id of states. |
| Parameter | country_id |
| Type | string |
| Position | Body |
| # | Required |
| Description | postcode of city. |
'{{site_domain}}/index.php?route=ocrestapi/extension/total/shipping/quote',
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 =>'{
"country_id":"91",
"zone_id":"1505",
"postcode":"254547"
}',
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer c2cf71fb67e3ddf44ac1eb6db6f11f1f5b5fa0c6',
'Content-Type: application/json',
'Cookie: OCSESSID=fbdffafec26b756fc23b26282b; currency=USD; language=en-gb'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var settings = {
"url": "{{site_domain}}/index.php?route=ocrestapi/extension/total/shipping/quote",
"method": "POST",
"timeout": 0,
"headers": {
"Authorization": "Bearer c2cf71fb67e3ddf44ac1eb6db6f11f1f5b5fa0c6",
"Content-Type": "application/json",
"Cookie": "OCSESSID=fbdffafec26b756fc23b26282b; currency=USD; language=en-gb"
},
"data": JSON.stringify({
"country_id": "91",
"zone_id": "1505",
"postcode": "254547"
}),
};
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require('request');
var options = {
'method': 'POST',
'url': '{{site_domain}}/index.php?route=ocrestapi/extension/total/shipping/quote',
'headers': {
'Authorization': 'Bearer c2cf71fb67e3ddf44ac1eb6db6f11f1f5b5fa0c6',
'Content-Type': 'application/json',
'Cookie': 'OCSESSID=fbdffafec26b756fc23b26282b; currency=USD; language=en-gb'
},
body: JSON.stringify({
"country_id": "91",
"zone_id": "1505",
"postcode": "254547"
})
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
import json
url = "{{site_domain}}/index.php?route=ocrestapi/extension/total/shipping/quote"
payload = json.dumps({
"country_id": "91",
"zone_id": "1505",
"postcode": "254547"
})
headers = {
'Authorization': 'Bearer c2cf71fb67e3ddf44ac1eb6db6f11f1f5b5fa0c6',
'Content-Type': 'application/json',
'Cookie': 'OCSESSID=fbdffafec26b756fc23b26282b; currency=USD; language=en-gb'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
var client = new RestClient("{{site_domain}}/index.php?route=ocrestapi/extension/total/shipping/quote");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer c2cf71fb67e3ddf44ac1eb6db6f11f1f5b5fa0c6");
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Cookie", "OCSESSID=fbdffafec26b756fc23b26282b; currency=USD; language=en-gb");
var body = @"{
" + "\n" +
@" ""country_id"":""91"",
" + "\n" +
@" ""zone_id"":""1505"",
" + "\n" +
@" ""postcode"":""254547""
" + "\n" +
@"
" + "\n" +
@"}";
request.AddParameter("application/json", body, ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request POST '{{site_domain}}/index.php?route=ocrestapi/extension/total/shipping/quote' \
--header 'Authorization: Bearer c2cf71fb67e3ddf44ac1eb6db6f11f1f5b5fa0c6' \
--header 'Content-Type: application/json' \
--header 'Cookie: OCSESSID=fbdffafec26b756fc23b26282b; currency=USD; language=en-gb' \
--data-raw '{
"country_id":"91",
"zone_id":"1505",
"postcode":"254547"
}'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n \"country_id\":\"91\",\r\n \"zone_id\":\"1505\",\r\n \"postcode\":\"254547\"\r\n \r\n}");
Request request = new Request.Builder()
.url("{{site_domain}}/index.php?route=ocrestapi/extension/total/shipping/quote")
.method("POST", body)
.addHeader("Authorization", "Bearer c2cf71fb67e3ddf44ac1eb6db6f11f1f5b5fa0c6")
.addHeader("Content-Type", "application/json")
.addHeader("Cookie", "OCSESSID=fbdffafec26b756fc23b26282b; currency=USD; language=en-gb")
.build();
Response response = client.newCall(request).execute();
require "uri"
require "json"
require "net/http"
url = URI("{{site_domain}}/index.php?route=ocrestapi/extension/total/shipping/quote")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)
request["Authorization"] = "Bearer c2cf71fb67e3ddf44ac1eb6db6f11f1f5b5fa0c6"
request["Content-Type"] = "application/json"
request["Cookie"] = "OCSESSID=fbdffafec26b756fc23b26282b; currency=USD; language=en-gb"
request.body = JSON.dump({
"country_id": "91",
"zone_id": "1505",
"postcode": "254547"
})
response = http.request(request)
puts response.read_body
Request
{
"country_id":"91",
"zone_id":"1505",
"postcode":"254547"
}
Response
{
"status": true,
"errors": [],
"data": {
"shipping_method": [
{
"title": "Flat Rate",
"quote": [
{
"code": "flat.flat",
"title": "Flat Shipping Rate",
"cost": "5.00",
"tax_class_id": "9",
"text": "$5.00"
}
],
"sort_order": "1",
"error": false
},
{
"title": "Free Shipping",
"quote": [
{
"code": "free.free",
"title": "Free Shipping",
"cost": 0,
"tax_class_id": 0,
"text": "$0.00"
}
],
"sort_order": "1",
"error": false
},
{
"title": "Parcelforce 48",
"quote": [
{
"code": "parcelforce_48.parcelforce_48",
"title": "Parcelforce 48",
"cost": "15.99",
"tax_class_id": "9",
"text": "$15.99"
}
],
"sort_order": "1",
"error": false
},
{
"title": "Per Item",
"quote": [
{
"code": "item.item",
"title": "Per Item Shipping Rate",
"cost": 20,
"tax_class_id": "9",
"text": "$20.00"
}
],
"sort_order": "5",
"error": false
}
]
}
}
Estimate Shipping&Texs-Shipping POST APIs
This APIs is used for apply the shipping&texs on the shipping method in the country.
POST: {{site_domain}}/index.php?route=ocrestapi/extension/total/shipping/shipping
| Parameter | Type | Position | # | Description |
|---|---|---|---|---|
| token | string |
Headers |
Required |
Token is generate when user attempt login or register API. |
| shipping_method | Object |
Body |
Required |
shipping_method is like flat, free shipping and othe user defined etc. |
| Parameter | token |
|---|---|
| Type | string |
| Position | Headers |
| # | Required |
| Description | Token is generate when user attempt login or register API. |
| Parameter | shipping_method |
| Type | Object |
| Position | Body |
| # | Required |
| Description | shipping_method is like flat, free shipping and othe user defined etc. |
'{{site_domain}}/index.php?route=ocrestapi/extension/total/shipping/shipping',
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 =>'{
"shipping_method":"flat.flat"
}',
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer c2cf71fb67e3ddf44ac1eb6db6f11f1f5b5fa0c6',
'Content-Type: application/json',
'Cookie: OCSESSID=fbdffafec26b756fc23b26282b; currency=USD; language=en-gb'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var settings = {
"url": "{{site_domain}}/index.php?route=ocrestapi/extension/total/shipping/shipping",
"method": "POST",
"timeout": 0,
"headers": {
"Authorization": "Bearer c2cf71fb67e3ddf44ac1eb6db6f11f1f5b5fa0c6",
"Content-Type": "application/json",
"Cookie": "OCSESSID=fbdffafec26b756fc23b26282b; currency=USD; language=en-gb"
},
"data": JSON.stringify({
"shipping_method": "flat.flat"
}),
};
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require('request');
var options = {
'method': 'POST',
'url': '{{site_domain}}/index.php?route=ocrestapi/extension/total/shipping/shipping',
'headers': {
'Authorization': 'Bearer c2cf71fb67e3ddf44ac1eb6db6f11f1f5b5fa0c6',
'Content-Type': 'application/json',
'Cookie': 'OCSESSID=fbdffafec26b756fc23b26282b; currency=USD; language=en-gb'
},
body: JSON.stringify({
"shipping_method": "flat.flat"
})
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
import json
url = "{{site_domain}}/index.php?route=ocrestapi/extension/total/shipping/shipping"
payload = json.dumps({
"shipping_method": "flat.flat"
})
headers = {
'Authorization': 'Bearer c2cf71fb67e3ddf44ac1eb6db6f11f1f5b5fa0c6',
'Content-Type': 'application/json',
'Cookie': 'OCSESSID=fbdffafec26b756fc23b26282b; currency=USD; language=en-gb'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
var client = new RestClient("{{site_domain}}/index.php?route=ocrestapi/extension/total/shipping/shipping");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer c2cf71fb67e3ddf44ac1eb6db6f11f1f5b5fa0c6");
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Cookie", "OCSESSID=fbdffafec26b756fc23b26282b; currency=USD; language=en-gb");
var body = @"{
" + "\n" +
@" ""shipping_method"":""flat.flat""
" + "\n" +
@"
" + "\n" +
@"
" + "\n" +
@"}";
request.AddParameter("application/json", body, ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request POST '{{site_domain}}/index.php?route=ocrestapi/extension/total/shipping/shipping' \
--header 'Authorization: Bearer c2cf71fb67e3ddf44ac1eb6db6f11f1f5b5fa0c6' \
--header 'Content-Type: application/json' \
--header 'Cookie: OCSESSID=fbdffafec26b756fc23b26282b; currency=USD; language=en-gb' \
--data-raw '{
"shipping_method":"flat.flat"
}'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n \"shipping_method\":\"flat.flat\"\r\n \r\n \r\n}");
Request request = new Request.Builder()
.url("{{site_domain}}/index.php?route=ocrestapi/extension/total/shipping/shipping")
.method("POST", body)
.addHeader("Authorization", "Bearer c2cf71fb67e3ddf44ac1eb6db6f11f1f5b5fa0c6")
.addHeader("Content-Type", "application/json")
.addHeader("Cookie", "OCSESSID=fbdffafec26b756fc23b26282b; currency=USD; language=en-gb")
.build();
Response response = client.newCall(request).execute();
require "uri"
require "json"
require "net/http"
url = URI("{{site_domain}}/index.php?route=ocrestapi/extension/total/shipping/shipping")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)
request["Authorization"] = "Bearer c2cf71fb67e3ddf44ac1eb6db6f11f1f5b5fa0c6"
request["Content-Type"] = "application/json"
request["Cookie"] = "OCSESSID=fbdffafec26b756fc23b26282b; currency=USD; language=en-gb"
request.body = JSON.dump({
"shipping_method": "flat.flat"
})
response = http.request(request)
puts response.read_body
Request
{
"shipping_method":"flat.flat"
}
Response
{
"status": true,
"errors": [],
"data": {
"success": "Success: Your shipping estimate has been applied!"
}
}
Apply Voucher POST APIs
This APIs is used for apply the voucher on the product.
POST: {{site_domain}}/index.php?route=ocrestapi/extension/total/voucher/voucher
| Parameter | Type | Position | # | Description |
|---|---|---|---|---|
| token | string |
Headers |
Required |
Token is generate when user attempt login or register API. |
| voucher | string |
Body |
Required |
voucher means voucher code of the voucher. |
| Parameter | token |
|---|---|
| Type | string |
| Position | Headers |
| # | Required |
| Description | Token is generate when user attempt login or register API. |
| Parameter | voucher |
| Type | string |
| Position | Body |
| # | Required |
| Description | voucher means voucher code of the voucher |
'{{site_domain}}/index.php?route=ocrestapi/extension/total/voucher/voucher',
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 =>'{
"voucher":"vc123"
}',
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer ec141689e3178bfe0eceee6396edb6191a71d936',
'Content-Type: application/json',
'Cookie: OCSESSID=fbdffafec26b756fc23b26282b; currency=USD; language=en-gb'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var settings = {
"url": "{{site_domain}}/index.php?route=ocrestapi/extension/total/voucher/voucher",
"method": "POST",
"timeout": 0,
"headers": {
"Authorization": "Bearer ec141689e3178bfe0eceee6396edb6191a71d936",
"Content-Type": "application/json",
"Cookie": "OCSESSID=fbdffafec26b756fc23b26282b; currency=USD; language=en-gb"
},
"data": JSON.stringify({
"voucher": "vc123"
}),
};
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require('request');
var options = {
'method': 'POST',
'url': '{{site_domain}}/index.php?route=ocrestapi/extension/total/voucher/voucher',
'headers': {
'Authorization': 'Bearer ec141689e3178bfe0eceee6396edb6191a71d936',
'Content-Type': 'application/json',
'Cookie': 'OCSESSID=fbdffafec26b756fc23b26282b; currency=USD; language=en-gb'
},
body: JSON.stringify({
"voucher": "vc123"
})
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
import json
url = "{{site_domain}}/index.php?route=ocrestapi/extension/total/voucher/voucher"
payload = json.dumps({
"voucher": "vc123"
})
headers = {
'Authorization': 'Bearer ec141689e3178bfe0eceee6396edb6191a71d936',
'Content-Type': 'application/json',
'Cookie': 'OCSESSID=fbdffafec26b756fc23b26282b; currency=USD; language=en-gb'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
var client = new RestClient("{{site_domain}}/index.php?route=ocrestapi/extension/total/voucher/voucher");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer ec141689e3178bfe0eceee6396edb6191a71d936");
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Cookie", "OCSESSID=fbdffafec26b756fc23b26282b; currency=USD; language=en-gb");
var body = @"{
" + "\n" +
@" ""voucher"":""vc123""
" + "\n" +
@"}";
request.AddParameter("application/json", body, ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request POST '{{site_domain}}/index.php?route=ocrestapi/extension/total/voucher/voucher' \
--header 'Authorization: Bearer ec141689e3178bfe0eceee6396edb6191a71d936' \
--header 'Content-Type: application/json' \
--header 'Cookie: OCSESSID=fbdffafec26b756fc23b26282b; currency=USD; language=en-gb' \
--data-raw '{
"voucher":"vc123"
}'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n \"voucher\":\"vc123\"\r\n}");
Request request = new Request.Builder()
.url("{{site_domain}}/index.php?route=ocrestapi/extension/total/voucher/voucher")
.method("POST", body)
.addHeader("Authorization", "Bearer ec141689e3178bfe0eceee6396edb6191a71d936")
.addHeader("Content-Type", "application/json")
.addHeader("Cookie", "OCSESSID=fbdffafec26b756fc23b26282b; currency=USD; language=en-gb")
.build();
Response response = client.newCall(request).execute();
require "uri"
require "json"
require "net/http"
url = URI("{{site_domain}}/index.php?route=ocrestapi/extension/total/voucher/voucher")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)
request["Authorization"] = "Bearer ec141689e3178bfe0eceee6396edb6191a71d936"
request["Content-Type"] = "application/json"
request["Cookie"] = "OCSESSID=fbdffafec26b756fc23b26282b; currency=USD; language=en-gb"
request.body = JSON.dump({
"voucher": "vc123"
})
response = http.request(request)
puts response.read_body
Request
{
"voucher":"vc123"
}
Response
{
"status": true,
"errors": [],
"data": {
"success": "Success: Your gift certificate discount has been applied!"
}
}
Apply Voucher GET APIs
This APIs is used for get the information of applied voucher on the product.
POST: {{site_domain}}/index.php?route=ocrestapi/extension/total/voucher
| Parameter | Type | Position | # | Description |
|---|---|---|---|---|
| token | string |
Headers |
Required |
Token is generate when user attempt login or register API. |
| Parameter | token |
|---|---|
| Type | string |
| Position | Headers |
| # | Required |
| Description | Token is generate when user attempt login or register API. |
'{{site_domain}}/index.php?route=ocrestapi/extension/total/voucher',
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(
'Authorization: Bearer ec141689e3178bfe0eceee6396edb6191a71d936',
'Cookie: OCSESSID=fbdffafec26b756fc23b26282b; currency=USD; language=en-gb'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var form = new FormData();
var settings = {
"url": "{{site_domain}}/index.php?route=ocrestapi/extension/total/voucher",
"method": "GET",
"timeout": 0,
"headers": {
"Authorization": "Bearer ec141689e3178bfe0eceee6396edb6191a71d936",
"Cookie": "OCSESSID=fbdffafec26b756fc23b26282b; currency=USD; language=en-gb"
},
"processData": false,
"mimeType": "multipart/form-data",
"contentType": false,
"data": form
};
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require('request');
var options = {
'method': 'GET',
'url': '{{site_domain}}/index.php?route=ocrestapi/extension/total/voucher',
'headers': {
'Authorization': 'Bearer ec141689e3178bfe0eceee6396edb6191a71d936',
'Cookie': 'OCSESSID=fbdffafec26b756fc23b26282b; currency=USD; language=en-gb'
},
formData: {
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
url = "{{site_domain}}/index.php?route=ocrestapi/extension/total/voucher"
payload={}
files={}
headers = {
'Authorization': 'Bearer ec141689e3178bfe0eceee6396edb6191a71d936',
'Cookie': 'OCSESSID=fbdffafec26b756fc23b26282b; currency=USD; language=en-gb'
}
response = requests.request("GET", url, headers=headers, data=payload, files=files)
print(response.text)
var client = new RestClient("{{site_domain}}/index.php?route=ocrestapi/extension/total/voucher");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer ec141689e3178bfe0eceee6396edb6191a71d936");
request.AddHeader("Cookie", "OCSESSID=fbdffafec26b756fc23b26282b; currency=USD; language=en-gb");
request.AlwaysMultipartFormData = true;
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request GET '{{site_domain}}/index.php?route=ocrestapi/extension/total/voucher' \
--header 'Authorization: Bearer ec141689e3178bfe0eceee6396edb6191a71d936' \
--header 'Cookie: OCSESSID=fbdffafec26b756fc23b26282b; currency=USD; language=en-gb'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("{{site_domain}}/index.php?route=ocrestapi/extension/total/voucher")
.method("GET", null)
.addHeader("Authorization", "Bearer ec141689e3178bfe0eceee6396edb6191a71d936")
.addHeader("Cookie", "OCSESSID=fbdffafec26b756fc23b26282b; currency=USD; language=en-gb")
.build();
Response response = client.newCall(request).execute();
require "uri"
require "net/http"
url = URI("{{site_domain}}/index.php?route=ocrestapi/extension/total/voucher")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["Authorization"] = "Bearer ec141689e3178bfe0eceee6396edb6191a71d936"
request["Cookie"] = "OCSESSID=fbdffafec26b756fc23b26282b; currency=USD; language=en-gb"
form_data = []
request.set_form form_data, 'multipart/form-data'
response = http.request(request)
puts response.read_body
Response
{
"status": true,
"errors": [],
"data": {
"voucher": "vc123"
},
"language": {
"code": "en",
"direction": "ltr",
"date_format_short": "d/m/Y",
"date_format_long": "l dS F Y",
"button_compare": "Compare this Product",
"button_wishlist": "Add to Wish List",
"button_checkout": "Checkout",
"button_map": "View Google Map",
"error_exception": "Error Code(%s): %s in %s on line %s",
"error_upload_1": "Warning: The uploaded file exceeds the upload_max_filesize directive in php.ini!",
"error_upload_2": "Warning: The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form!",
.
.
.
...........
}
}
Account Voucher GET APIs
This APIs is used for get the information voucher like voucher_theme_id that's use in account voucher post apis.
GET: {{site_domain}}/index.php?route=ocrestapi/account/voucher
| Parameter | Type | Position | # | Description |
|---|---|---|---|---|
| token | string |
Headers |
Required |
Token is generate when user attempt login or register API. |
| Parameter | token |
|---|---|
| Type | string |
| Position | Headers |
| # | Required |
| Description | Token is generate when user attempt login or register API. |
'{{site_domain}}/index.php?route=ocrestapi/account/voucher',
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(
'Authorization: Bearer 6fcf5760d39f83f91e3d4f77ea9038efd059b253',
'Cookie: OCSESSID=3cef3e28cd1ff6af5cbe17657d; currency=USD; language=en-gb'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var settings = {
"url": "{{site_domain}}/index.php?route=ocrestapi/account/voucher",
"method": "GET",
"timeout": 0,
"headers": {
"Authorization": "Bearer 6fcf5760d39f83f91e3d4f77ea9038efd059b253",
"Cookie": "OCSESSID=3cef3e28cd1ff6af5cbe17657d; currency=USD; language=en-gb"
},
};
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require('request');
var options = {
'method': 'GET',
'url': '{{site_domain}}/index.php?route=ocrestapi/account/voucher',
'headers': {
'Authorization': 'Bearer 6fcf5760d39f83f91e3d4f77ea9038efd059b253',
'Cookie': 'OCSESSID=3cef3e28cd1ff6af5cbe17657d; currency=USD; language=en-gb'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
url = "{{site_domain}}/index.php?route=ocrestapi/account/voucher"
payload = ""
headers = {
'Authorization': 'Bearer 6fcf5760d39f83f91e3d4f77ea9038efd059b253',
'Cookie': 'OCSESSID=3cef3e28cd1ff6af5cbe17657d; currency=USD; language=en-gb'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
var client = new RestClient("{{site_domain}}/index.php?route=ocrestapi/account/voucher");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer 6fcf5760d39f83f91e3d4f77ea9038efd059b253");
request.AddHeader("Cookie", "OCSESSID=3cef3e28cd1ff6af5cbe17657d; currency=USD; language=en-gb");
var body = @"";
request.AddParameter("text/plain", body, ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request GET '{{site_domain}}/index.php?route=ocrestapi/account/voucher' \
--header 'Authorization: Bearer 6fcf5760d39f83f91e3d4f77ea9038efd059b253' \
--header 'Cookie: OCSESSID=3cef3e28cd1ff6af5cbe17657d; currency=USD; language=en-gb' \
--data-raw ''
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("{{site_domain}}/index.php?route=ocrestapi/account/voucher")
.method("GET", null)
.addHeader("Authorization", "Bearer 6fcf5760d39f83f91e3d4f77ea9038efd059b253")
.addHeader("Cookie", "OCSESSID=3cef3e28cd1ff6af5cbe17657d; currency=USD; language=en-gb")
.build();
Response response = client.newCall(request).execute();
require "uri"
require "net/http"
url = URI("{{site_domain}}/index.php?route=ocrestapi/account/voucher")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["Authorization"] = "Bearer 6fcf5760d39f83f91e3d4f77ea9038efd059b253"
request["Cookie"] = "OCSESSID=3cef3e28cd1ff6af5cbe17657d; currency=USD; language=en-gb"
response = http.request(request)
puts response.read_body
Response
{
"status": true,
"errors": [],
"data": {
"help_amount": "Value must be between $1.00 and $1,000.00",
"to_name": "",
"to_email": "",
"from_name": "user3 kumars",
"from_email": "example1@test.com",
"voucher_themes": [
{
"voucher_theme_id": "7",
"image": "catalog/demo/gift-voucher-birthday.jpg",
"language_id": "1",
"name": "Birthday"
},
{
"voucher_theme_id": "6",
"image": "catalog/demo/apple_logo.jpg",
"language_id": "1",
"name": "Christmas"
},
{
"voucher_theme_id": "8",
"image": "catalog/demo/canon_eos_5d_2.jpg",
"language_id": "1",
"name": "General"
}
],
"voucher_theme_id": "",
"message": "",
"amount": 1,
"agree": false
},
"language": {
"code": "en",
"direction": "ltr",
"date_format_short": "d/m/Y",
"button_edit": "Edit",
"button_filter": "Refine Search",
"button_map": "View Google Map",
"error_exception": "Error Code(%s): %s in %s on line %s",
"text_description": "This gift certificate will be emailed to the recipient after your order has been paid for.",
"text_agree": "I understand that gift certificates are non-refundable.",
"text_message": "Thank you for purchasing a gift certificate! Once you have completed your order your gift certificate recipient will be sent an e-mail with details how to redeem their gift certificate.
",
"text_for": "%s Gift Certificate for %s",
"entry_to_name": "Recipient's Name",
"entry_to_email": "Recipient's e-mail",
"error_invalid_address_id": "Address Id not found",
"error_valid_email": "E-Mail Address does not appear to be valid!",
"text_brands": "Brands",
"text_cart_success": " Success: You have added product to your shopping cart",
"text_return_success": "Thank you for submitting your return request. Your request has been sent to the relevant department for processing.",
"text_checkout_success": "Your order has been successfully processed!
You can view your order history by clicking on history from My Orders Menu.
If your purchase has an associated download, you can go to the account downloads page to view them.
Please direct any questions you have to the store owner.
Thanks for shopping with us online!",
"text_coupon_title": "Use Coupon Code",
"text_coupon": "Coupon (%s)",
"text_coupon_success": "Success: Your coupon discount has been applied!",
"entry_coupon_coupon": "Enter your coupon here",
.
.
............
}
}
Account Voucher POST APIs
This APIs is used for create the vouchers.
POST: {{site_domain}}/index.php?route=ocrestapi/account/voucher
| Parameter | Type | Position | # | Description |
|---|---|---|---|---|
| token | string |
Headers |
Required |
Token is generate when user attempt login or register API. |
| to_name | string |
Body |
Required |
to_name of the that customer you want to send this voucher. |
| to_email | string |
Body |
Required |
to_email of the that customer you want to send this voucher. |
| from_name | string |
Body |
Required |
from_name of the that customer is sendind this voucher. |
| from_email | string |
Body |
Required |
from_email of the that customer is sendind this voucher. |
| voucher_id | Integer |
Body |
Required |
voucher_id is get from the account/voucher get APIs. |
| Message | String |
Body |
Required |
Message is you want to send some message to the customer. |
| Amount | Decimal/Integer |
Body |
Required |
Amount of gift voucher. |
| agree | boolean |
Body |
Required |
agree means enabled status example=1. |
| Parameter | token |
|---|---|
| Type | string |
| Position | Headers |
| # | Required |
| Description | Token is generate when user attempt login or register API. |
| Parameter | to_name |
| Type | string |
| Position | Body |
| # | Required |
| Description | to_name of the that customer you want to send this voucher. |
| Parameter | to_email |
| Type | string |
| Position | Body |
| # | Required |
| Description | to_email of the that customer you want to send this voucher. |
| Parameter | from_name |
| Type | string |
| Position | Body |
| # | Required |
| Description | from_name of the that customer is sendind this voucher. |
| Parameter | from_email |
| Type | string |
| Position | Body |
| # | Required |
| Description | from_email of the that customer is sendind this voucher. |
| Parameter | voucher_id |
| Type | integer |
| Position | Body |
| # | Required |
| Description | voucher_id is get from the account/voucher get APIs. |
| Parameter | Message |
| Type | integer |
| Position | Body |
| # | Required |
| Description | Message is you want to send some message to the customer. |
| Parameter | Amount |
| Type | decimal/integer |
| Position | Body |
| # | Required |
| Description | Amount of gift voucher. |
| Parameter | agree |
| Type | boolean |
| Position | Body |
| # | Required |
| Description | agree means enabled status example=1. |
'{{site_domain}}/index.php?route=ocrestapi/account/voucher',
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 =>'{
"to_name":"ravi",
"to_email":"ravi@test.com",
"from_name":"user3",
"from_email":"user3@test.com",
"voucher_theme_id":"7",
"message":"voucher created",
"amount":"150",
"agree":"1"
}',
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer 6fcf5760d39f83f91e3d4f77ea9038efd059b253',
'Content-Type: application/json',
'Cookie: OCSESSID=3cef3e28cd1ff6af5cbe17657d; currency=USD; language=en-gb'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var settings = {
"url": "{{site_domain}}/index.php?route=ocrestapi/account/voucher",
"method": "POST",
"timeout": 0,
"headers": {
"Authorization": "Bearer 6fcf5760d39f83f91e3d4f77ea9038efd059b253",
"Content-Type": "application/json",
"Cookie": "OCSESSID=3cef3e28cd1ff6af5cbe17657d; currency=USD; language=en-gb"
},
"data": JSON.stringify({
"to_name": "ravi",
"to_email": "ravi@test.com",
"from_name": "user3",
"from_email": "user3@test.com",
"voucher_theme_id": "7",
"message": "voucher created",
"amount": "150",
"agree": "1"
}),
};
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require('request');
var options = {
'method': 'POST',
'url': '{{site_domain}}/index.php?route=ocrestapi/account/voucher',
'headers': {
'Authorization': 'Bearer 6fcf5760d39f83f91e3d4f77ea9038efd059b253',
'Content-Type': 'application/json',
'Cookie': 'OCSESSID=3cef3e28cd1ff6af5cbe17657d; currency=USD; language=en-gb'
},
body: JSON.stringify({
"to_name": "ravi",
"to_email": "ravi@test.com",
"from_name": "user3",
"from_email": "user3@test.com",
"voucher_theme_id": "7",
"message": "voucher created",
"amount": "150",
"agree": "1"
})
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
import json
url = "{{site_domain}}/index.php?route=ocrestapi/account/voucher"
payload = json.dumps({
"to_name": "ravi",
"to_email": "ravi@test.com",
"from_name": "user3",
"from_email": "user3@test.com",
"voucher_theme_id": "7",
"message": "voucher created",
"amount": "150",
"agree": "1"
})
headers = {
'Authorization': 'Bearer 6fcf5760d39f83f91e3d4f77ea9038efd059b253',
'Content-Type': 'application/json',
'Cookie': 'OCSESSID=3cef3e28cd1ff6af5cbe17657d; currency=USD; language=en-gb'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
var client = new RestClient("{{site_domain}}/index.php?route=ocrestapi/account/voucher");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer 6fcf5760d39f83f91e3d4f77ea9038efd059b253");
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Cookie", "OCSESSID=3cef3e28cd1ff6af5cbe17657d; currency=USD; language=en-gb");
var body = @"{
" + "\n" +
@" ""to_name"":""ravi"",
" + "\n" +
@" ""to_email"":""ravi@test.com"",
" + "\n" +
@" ""from_name"":""user3"",
" + "\n" +
@" ""from_email"":""user3@test.com"",
" + "\n" +
@" ""voucher_theme_id"":""7"",
" + "\n" +
@" ""message"":""voucher created"",
" + "\n" +
@" ""amount"":""150"",
" + "\n" +
@" ""agree"":""1""
" + "\n" +
@"}";
request.AddParameter("application/json", body, ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request POST '{{site_domain}}/index.php?route=ocrestapi/account/voucher' \
--header 'Authorization: Bearer 6fcf5760d39f83f91e3d4f77ea9038efd059b253' \
--header 'Content-Type: application/json' \
--header 'Cookie: OCSESSID=3cef3e28cd1ff6af5cbe17657d; currency=USD; language=en-gb' \
--data-raw '{
"to_name":"ravi",
"to_email":"ravi@test.com",
"from_name":"user3",
"from_email":"user3@test.com",
"voucher_theme_id":"7",
"message":"voucher created",
"amount":"150",
"agree":"1"
}'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n \"to_name\":\"ravi\",\r\n \"to_email\":\"ravi@test.com\",\r\n \"from_name\":\"user3\",\r\n \"from_email\":\"user3@test.com\",\r\n \"voucher_theme_id\":\"7\",\r\n \"message\":\"voucher created\",\r\n \"amount\":\"150\",\r\n \"agree\":\"1\"\r\n}");
Request request = new Request.Builder()
.url("{{site_domain}}/index.php?route=ocrestapi/account/voucher")
.method("POST", body)
.addHeader("Authorization", "Bearer 6fcf5760d39f83f91e3d4f77ea9038efd059b253")
.addHeader("Content-Type", "application/json")
.addHeader("Cookie", "OCSESSID=3cef3e28cd1ff6af5cbe17657d; currency=USD; language=en-gb")
.build();
Response response = client.newCall(request).execute();
require "uri"
require "json"
require "net/http"
url = URI("{{site_domain}}/index.php?route=ocrestapi/account/voucher")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)
request["Authorization"] = "Bearer 6fcf5760d39f83f91e3d4f77ea9038efd059b253"
request["Content-Type"] = "application/json"
request["Cookie"] = "OCSESSID=3cef3e28cd1ff6af5cbe17657d; currency=USD; language=en-gb"
request.body = JSON.dump({
"to_name": "ravi",
"to_email": "ravi@test.com",
"from_name": "user3",
"from_email": "user3@test.com",
"voucher_theme_id": "7",
"message": "voucher created",
"amount": "150",
"agree": "1"
})
response = http.request(request)
puts response.read_body
Request
{
"to_name":"ravi",
"to_email":"ravi@test.com",
"from_name":"user3",
"from_email":"user3@test.com",
"voucher_theme_id":"7",
"message":"voucher created",
"amount":"150",
"agree":"1"
}
Response
{
"status": true,
"errors": [],
"data": []
}
Checkout Page GET APIs
This APIs is used for get the information of customer checkout page for ex. apply coupon, voucher, addresses etc.
POST: {{site_domain}}/index.php?route=ocrestapi/checkout/checkout
| Parameter | Type | Position | # | Description |
|---|---|---|---|---|
| token | string |
Headers |
Required |
Token is generate when user attempt login or register API. |
| Parameter | token |
|---|---|
| Type | string |
| Position | Headers |
| # | Required |
| Description | Token is generate when user attempt login or register API. |
'{{site_domain}}/index.php?route=ocrestapi/checkout/checkout',
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(
'Authorization: Bearer ec141689e3178bfe0eceee6396edb6191a71d936',
'Cookie: OCSESSID=fbdffafec26b756fc23b26282b; currency=USD; language=en-gb'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var form = new FormData();
var settings = {
"url": "{{site_domain}}/index.php?route=ocrestapi/checkout/checkout",
"method": "GET",
"timeout": 0,
"headers": {
"Authorization": "Bearer ec141689e3178bfe0eceee6396edb6191a71d936",
"Cookie": "OCSESSID=fbdffafec26b756fc23b26282b; currency=USD; language=en-gb"
},
"processData": false,
"mimeType": "multipart/form-data",
"contentType": false,
"data": form
};
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require('request');
var options = {
'method': 'GET',
'url': '{{site_domain}}/index.php?route=ocrestapi/checkout/checkout',
'headers': {
'Authorization': 'Bearer ec141689e3178bfe0eceee6396edb6191a71d936',
'Cookie': 'OCSESSID=fbdffafec26b756fc23b26282b; currency=USD; language=en-gb'
},
formData: {
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
url = "{{site_domain}}/index.php?route=ocrestapi/checkout/checkout"
payload={}
files={}
headers = {
'Authorization': 'Bearer ec141689e3178bfe0eceee6396edb6191a71d936',
'Cookie': 'OCSESSID=fbdffafec26b756fc23b26282b; currency=USD; language=en-gb'
}
response = requests.request("GET", url, headers=headers, data=payload, files=files)
print(response.text)
var client = new RestClient("{{site_domain}}/index.php?route=ocrestapi/checkout/checkout");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer ec141689e3178bfe0eceee6396edb6191a71d936");
request.AddHeader("Cookie", "OCSESSID=fbdffafec26b756fc23b26282b; currency=USD; language=en-gb");
request.AlwaysMultipartFormData = true;
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request GET '{{site_domain}}/index.php?route=ocrestapi/checkout/checkout' \
--header 'Authorization: Bearer ec141689e3178bfe0eceee6396edb6191a71d936' \
--header 'Cookie: OCSESSID=fbdffafec26b756fc23b26282b; currency=USD; language=en-gb'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("{{site_domain}}/index.php?route=ocrestapi/checkout/checkout")
.method("GET", null)
.addHeader("Authorization", "Bearer ec141689e3178bfe0eceee6396edb6191a71d936")
.addHeader("Cookie", "OCSESSID=fbdffafec26b756fc23b26282b; currency=USD; language=en-gb")
.build();
Response response = client.newCall(request).execute();
require "uri"
require "net/http"
url = URI("{{site_domain}}/index.php?route=ocrestapi/checkout/checkout")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["Authorization"] = "Bearer ec141689e3178bfe0eceee6396edb6191a71d936"
request["Cookie"] = "OCSESSID=fbdffafec26b756fc23b26282b; currency=USD; language=en-gb"
form_data = []
request.set_form form_data, 'multipart/form-data'
response = http.request(request)
puts response.read_body
Response
{
"status": true,
"errors": [],
"data": {
"products": [
{
"cart_id": "434",
"product_id": "48",
"name": "iPod Classic",
"model": "product 20",
"option": [],
"recurring": "",
"quantity": "1",
"subtract": "1",
"price": "$100.00",
"total": "$100.00"
}
],
"totals": [
{
"title": "Sub-Total",
"text": "$300.00"
},
{
"title": "Coupon (abc123)",
"text": "$-10.00"
},
{
"title": "Gift Certificate (vc123)",
"text": "$-50.00"
},
{
"title": "Total",
"text": "$240.00"
}
],
"total": "$240.00",
"shipping_required": true,
"addresses": [
{
"address_id": "194",
"firstname": "xcZScsz",
"lastname": "cSZc",
"company": "zxczs",
"address_1": "zxcSZcsz",
"address_2": "cASdcAS",
"city": "casxcASxc",
"postcode": "20201",
"default": 1,
"zone": "Gujarat",
"zone_code": "GU",
"country": "India",
"address": "xcZScsz cSZc, zxczs, zxcSZcsz, cASdcAS, casxcASxc 20201, Gujarat, India"
},
.
.......
],
"default_address": "194",
"payment_methods": [
{
"code": "bank_transfer",
"title": "Bank Transfer",
"terms": "",
"sort_order": "5"
},
{
"code": "cheque",
"title": "Cheque / Money Order",
"terms": "",
"sort_order": "5"
},
{
"code": "cod",
"title": "Cash On Delivery",
"terms": "",
"sort_order": "5"
}
],
"shipping_methods": [
{
"title": "Flat Rate",
"quote": [
{
"code": "flat.flat",
"title": "Flat Shipping Rate",
"cost": "5.00",
"tax_class_id": "9",
"text": "$5.00"
}
],
"sort_order": "1",
"error": false
},
{
"title": "Free Shipping",
"quote": [
{
"code": "free.free",
"title": "Free Shipping",
"cost": 0,
"tax_class_id": 0,
"text": "$0.00"
}
],
"sort_order": "1",
"error": false
},
{
"title": "Parcelforce 48",
"quote": [
{
"code": "parcelforce_48.parcelforce_48",
"title": "Parcelforce 48",
"cost": "15.99",
"tax_class_id": "9",
"text": "$15.99"
}
],
"sort_order": "1",
"error": false
},
{
"title": "Per Item",
"quote": [
{
"code": "item.item",
"title": "Per Item Shipping Rate",
"cost": 20,
"tax_class_id": "9",
"text": "$20.00"
}
],
"sort_order": "5",
"error": false
}
]
},
"language": {
"code": "en",
"direction": "ltr",
"date_format_short": "d/m/Y",
"date_format_long": "l dS F Y",
"button_compare": "Compare this Product",
"button_wishlist": "Add to Wish List",
"button_checkout": "Checkout",
"button_map": "View Google Map",
"error_exception": "Error Code(%s): %s in %s on line %s",
"error_upload_1": "Warning: The uploaded file exceeds the upload_max_filesize directive in php.ini!",
"error_upload_2": "Warning: The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form!",
.
.
.
...........
}
}
Checkout Shipping Addresses GET APIs
This APIs is used for get the information of checkout page addresses or shipping addresses.
GET: {{site_domain}}/index.php?route=ocrestapi/checkout/shipping_address
| Parameter | Type | Position | # | Description |
|---|---|---|---|---|
| token | string |
Headers |
Required |
Token is generate when user attempt login or register API. |
| Parameter | token |
|---|---|
| Type | string |
| Position | Headers |
| # | Required |
| Description | Token is generate when user attempt login or register API. |
'{{site_domain}}/index.php?route=ocrestapi/checkout/shipping_address',
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(
'Authorization: Bearer 2935312e69d2d8dfdc80ccbe7097d7b3b2aa66da',
'Cookie: OCSESSID=af1fefd50ebc18c60a21513aa0; currency=USD; language=en-gb'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var form = new FormData();
var settings = {
"url": "{{site_domain}}/index.php?route=ocrestapi/checkout/shipping_address",
"method": "GET",
"timeout": 0,
"headers": {
"Authorization": "Bearer 2935312e69d2d8dfdc80ccbe7097d7b3b2aa66da",
"Cookie": "OCSESSID=af1fefd50ebc18c60a21513aa0; currency=USD; language=en-gb"
},
"processData": false,
"mimeType": "multipart/form-data",
"contentType": false,
"data": form
};
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require('request');
var options = {
'method': 'GET',
'url': '{{site_domain}}/index.php?route=ocrestapi/checkout/shipping_address',
'headers': {
'Authorization': 'Bearer 2935312e69d2d8dfdc80ccbe7097d7b3b2aa66da',
'Cookie': 'OCSESSID=af1fefd50ebc18c60a21513aa0; currency=USD; language=en-gb'
},
formData: {
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
url = "{{site_domain}}/index.php?route=ocrestapi/checkout/shipping_address"
payload={}
files={}
headers = {
'Authorization': 'Bearer 2935312e69d2d8dfdc80ccbe7097d7b3b2aa66da',
'Cookie': 'OCSESSID=af1fefd50ebc18c60a21513aa0; currency=USD; language=en-gb'
}
response = requests.request("GET", url, headers=headers, data=payload, files=files)
print(response.text)
var client = new RestClient("{{site_domain}}/index.php?route=ocrestapi/checkout/shipping_address");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer 2935312e69d2d8dfdc80ccbe7097d7b3b2aa66da");
request.AddHeader("Cookie", "OCSESSID=af1fefd50ebc18c60a21513aa0; currency=USD; language=en-gb");
request.AlwaysMultipartFormData = true;
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request GET '{{site_domain}}/index.php?route=ocrestapi/checkout/shipping_address' \
--header 'Authorization: Bearer 2935312e69d2d8dfdc80ccbe7097d7b3b2aa66da' \
--header 'Cookie: OCSESSID=af1fefd50ebc18c60a21513aa0; currency=USD; language=en-gb'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("{{site_domain}}/index.php?route=ocrestapi/checkout/shipping_address")
.method("GET", null)
.addHeader("Authorization", "Bearer 2935312e69d2d8dfdc80ccbe7097d7b3b2aa66da")
.addHeader("Cookie", "OCSESSID=af1fefd50ebc18c60a21513aa0; currency=USD; language=en-gb")
.build();
Response response = client.newCall(request).execute();
require "uri"
require "net/http"
url = URI("{{site_domain}}/index.php?route=ocrestapi/checkout/shipping_address")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["Authorization"] = "Bearer 2935312e69d2d8dfdc80ccbe7097d7b3b2aa66da"
request["Cookie"] = "OCSESSID=af1fefd50ebc18c60a21513aa0; currency=USD; language=en-gb"
form_data = []
request.set_form form_data, 'multipart/form-data'
response = http.request(request)
puts response.read_body
Response
{
"status": true,
"errors": [],
"data": {
"default_address": "194",
"addresses": [
{
"address_id": "194",
"firstname": "xcZScsz",
"lastname": "cSZc",
"company": "zxczs",
"address_1": "zxcSZcsz",
"address_2": "cASdcAS",
"city": "casxcASxc",
"postcode": "20201",
"default": 1,
"zone": "Gujarat",
"zone_code": "GU",
"country": "India",
"address": "xcZScsz cSZc, zxczs, zxcSZcsz, cASdcAS, casxcASxc 20201, Gujarat, India"
},
{
"address_id": "196",
"firstname": "user3",
"lastname": "kumar",
"company": "abc",
"address_1": "hari nager ",
"address_2": "hari nagar2",
"city": "aligarh",
"postcode": "202001",
"default": 0,
"zone": "Uttar Pradesh",
"zone_code": "UP",
"country": "India",
"address": "user3 kumar, abc, hari nager, hari nagar2, aligarh 202001, Uttar Pradesh, India"
},
{
"address_id": "197",
"firstname": "user3",
"lastname": "kumar",
"company": "letscms",
"address_1": "hari nagar",
"address_2": "hari nagar2",
"city": "aligarh",
"postcode": "202001",
"default": 0,
"zone": "Uttar Pradesh",
"zone_code": "UP",
"country": "India",
"address": "user3 kumar, letscms, hari nagar, hari nagar2, aligarh 202001, Uttar Pradesh, India"
}
],
"custom_fields": []
},
"language": {
"code": "en",
"direction": "ltr",
"date_format_short": "d/m/Y",
"date_format_long": "l dS F Y",
"time_format": "h:i:s A",
"button_delete": "Delete",
"button_download": "Download",
"button_edit": "Edit",
"button_filter": "Refine Search",
"button_new_address": "New Address",
"button_change_address": "Change Address",
"button_reviews": "Reviews",
"button_write": "Write Review",
"button_list": "List",
"text_checkout_option": "Step %s: Checkout Options",
"text_checkout_account": "Step %s: Account & Billing Details",
"text_checkout_payment_address": "Step %s: Billing Details",
"text_checkout_shipping_address": "Step %s: Delivery Details",
"text_checkout_shipping_method": "Step %s: Delivery Method",
"text_checkout_payment_method": "Step %s: Payment Method",
"entry_newsletter": "I wish to subscribe to the %s newsletter.",
"error_login": "Warning: No match for E-Mail Address and/or Password.",
"error_attempts": "Warning: Your account has exceeded allowed number of login attempts. Please try again in 1 hour.",
.
.............
}
}
Save Checkout Shipping Addrerss POST APIs
This APIs is used for save the shipping address id for get the shipping addrerss.
POST: {{site_domain}}/index.php?route=ocrestapi/checkout/shipping_address/save
| Parameter | Type | Position | # | Description |
|---|---|---|---|---|
| token | string |
Headers |
Required |
Token is generate when user attempt login or register API. |
| address_id | integer |
Body |
Required |
address_id of shiipping address that is used in checkout page shipping addresses. |
| Parameter | token |
|---|---|
| Type | string |
| Position | Headers |
| # | Required |
| Description | Token is generate when user attempt login or register API. |
| Parameter | address_id |
| Type | integer |
| Position | Body |
| # | Required |
| Description | address_id of shiipping address that is used in checkout page shipping addresses. |
'{{site_domain}}/index.php?route=ocrestapi/checkout/shipping_address/save',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>' {
"address_id": "197"
}',
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer 540c41793e574f3591a8cd62771b3456f4c48e06',
'Content-Type: application/json',
'Cookie: OCSESSID=c0364c2f2ab1bfa2119971c026; currency=USD; language=en-gb'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var settings = {
"url": "{{site_domain}}/index.php?route=ocrestapi/checkout/shipping_address/save",
"method": "POST",
"timeout": 0,
"headers": {
"Authorization": "Bearer 540c41793e574f3591a8cd62771b3456f4c48e06",
"Content-Type": "application/json",
"Cookie": "OCSESSID=c0364c2f2ab1bfa2119971c026; currency=USD; language=en-gb"
},
"data": JSON.stringify({
"address_id": "197"
}),
};
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require('request');
var options = {
'method': 'POST',
'url': '{{site_domain}}/index.php?route=ocrestapi/checkout/shipping_address/save',
'headers': {
'Authorization': 'Bearer 540c41793e574f3591a8cd62771b3456f4c48e06',
'Content-Type': 'application/json',
'Cookie': 'OCSESSID=c0364c2f2ab1bfa2119971c026; currency=USD; language=en-gb'
},
body: JSON.stringify({
"address_id": "197"
})
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
import json
url = "{{site_domain}}/index.php?route=ocrestapi/checkout/shipping_address/save"
payload = json.dumps({
"address_id": "197"
})
headers = {
'Authorization': 'Bearer 540c41793e574f3591a8cd62771b3456f4c48e06',
'Content-Type': 'application/json',
'Cookie': 'OCSESSID=c0364c2f2ab1bfa2119971c026; currency=USD; language=en-gb'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
var client = new RestClient("{{site_domain}}/index.php?route=ocrestapi/checkout/shipping_address/save");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer 540c41793e574f3591a8cd62771b3456f4c48e06");
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Cookie", "OCSESSID=c0364c2f2ab1bfa2119971c026; currency=USD; language=en-gb");
var body = @" {
" + "\n" +
@" ""address_id"": ""197""
" + "\n" +
@"
" + "\n" +
@" }";
request.AddParameter("application/json", body, ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request POST '{{site_domain}}/index.php?route=ocrestapi/checkout/shipping_address/save' \
--header 'Authorization: Bearer 540c41793e574f3591a8cd62771b3456f4c48e06' \
--header 'Content-Type: application/json' \
--header 'Cookie: OCSESSID=c0364c2f2ab1bfa2119971c026; currency=USD; language=en-gb' \
--data-raw ' {
"address_id": "197"
}'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, " {\r\n \"address_id\": \"197\"\r\n \r\n }");
Request request = new Request.Builder()
.url("{{site_domain}}/index.php?route=ocrestapi/checkout/shipping_address/save")
.method("POST", body)
.addHeader("Authorization", "Bearer 540c41793e574f3591a8cd62771b3456f4c48e06")
.addHeader("Content-Type", "application/json")
.addHeader("Cookie", "OCSESSID=c0364c2f2ab1bfa2119971c026; currency=USD; language=en-gb")
.build();
Response response = client.newCall(request).execute();
require "uri"
require "json"
require "net/http"
url = URI("{{site_domain}}/index.php?route=ocrestapi/checkout/shipping_address/save")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)
request["Authorization"] = "Bearer 540c41793e574f3591a8cd62771b3456f4c48e06"
request["Content-Type"] = "application/json"
request["Cookie"] = "OCSESSID=c0364c2f2ab1bfa2119971c026; currency=USD; language=en-gb"
request.body = JSON.dump({
"address_id": "197"
})
response = http.request(request)
puts response.read_body
Request
{
"address_id": "197"
}
Response
{
"status": true,
"errors": [],
"data": []
}
Save Checkout Payment Addrerss POST APIs
This APIs is used for save the payment address id for get the payment addrerss.
POST: {{site_domain}}/index.php?route=ocrestapi/checkout/payment_address/save
| Parameter | Type | Position | # | Description |
|---|---|---|---|---|
| token | string |
Headers |
Required |
Token is generate when user attempt login or register API. |
| address_id | integer |
Body |
Required |
address_id of payment address that is used in checkout page payment addresses. |
| Parameter | token |
|---|---|
| Type | string |
| Position | Headers |
| # | Required |
| Description | Token is generate when user attempt login or register API. |
| Parameter | address_id |
| Type | integer |
| Position | Body |
| # | Required |
| Description | address_id of payment address that is used in checkout page payment addresses. |
'{{site_domain}}/index.php?route=ocrestapi/checkout/payment_address/save',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>'{
"address_id":198
}',
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer 540c41793e574f3591a8cd62771b3456f4c48e06',
'Content-Type: application/json',
'Cookie: OCSESSID=c0364c2f2ab1bfa2119971c026; currency=USD; language=en-gb'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var settings = {
"url": "{{site_domain}}/index.php?route=ocrestapi/checkout/payment_address/save",
"method": "POST",
"timeout": 0,
"headers": {
"Authorization": "Bearer 540c41793e574f3591a8cd62771b3456f4c48e06",
"Content-Type": "application/json",
"Cookie": "OCSESSID=c0364c2f2ab1bfa2119971c026; currency=USD; language=en-gb"
},
"data": JSON.stringify({
"address_id": 198
}),
};
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require('request');
var options = {
'method': 'POST',
'url': '{{site_domain}}/index.php?route=ocrestapi/checkout/payment_address/save',
'headers': {
'Authorization': 'Bearer 540c41793e574f3591a8cd62771b3456f4c48e06',
'Content-Type': 'application/json',
'Cookie': 'OCSESSID=c0364c2f2ab1bfa2119971c026; currency=USD; language=en-gb'
},
body: JSON.stringify({
"address_id": 198
})
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
import json
url = "{{site_domain}}/index.php?route=ocrestapi/checkout/payment_address/save"
payload = json.dumps({
"address_id": 198
})
headers = {
'Authorization': 'Bearer 540c41793e574f3591a8cd62771b3456f4c48e06',
'Content-Type': 'application/json',
'Cookie': 'OCSESSID=c0364c2f2ab1bfa2119971c026; currency=USD; language=en-gb'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
var client = new RestClient("{{site_domain}}/index.php?route=ocrestapi/checkout/payment_address/save");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer 540c41793e574f3591a8cd62771b3456f4c48e06");
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Cookie", "OCSESSID=c0364c2f2ab1bfa2119971c026; currency=USD; language=en-gb");
var body = @"{
" + "\n" +
@" ""address_id"":198
" + "\n" +
@"}";
request.AddParameter("application/json", body, ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request POST '{{site_domain}}/index.php?route=ocrestapi/checkout/payment_address/save' \
--header 'Authorization: Bearer 540c41793e574f3591a8cd62771b3456f4c48e06' \
--header 'Content-Type: application/json' \
--header 'Cookie: OCSESSID=c0364c2f2ab1bfa2119971c026; currency=USD; language=en-gb' \
--data-raw '{
"address_id":198
}'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n \"address_id\":198\r\n}");
Request request = new Request.Builder()
.url("{{site_domain}}/index.php?route=ocrestapi/checkout/payment_address/save")
.method("POST", body)
.addHeader("Authorization", "Bearer 540c41793e574f3591a8cd62771b3456f4c48e06")
.addHeader("Content-Type", "application/json")
.addHeader("Cookie", "OCSESSID=c0364c2f2ab1bfa2119971c026; currency=USD; language=en-gb")
.build();
Response response = client.newCall(request).execute();
require "uri"
require "json"
require "net/http"
url = URI("{{site_domain}}/index.php?route=ocrestapi/checkout/payment_address/save")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)
request["Authorization"] = "Bearer 540c41793e574f3591a8cd62771b3456f4c48e06"
request["Content-Type"] = "application/json"
request["Cookie"] = "OCSESSID=c0364c2f2ab1bfa2119971c026; currency=USD; language=en-gb"
request.body = JSON.dump({
"address_id": 198
})
response = http.request(request)
puts response.read_body
Request
{
"address_id":198
}
Response
{
"status": true,
"errors": [],
"data": []
}
Checkout Shipping Methods GET APIs
This APIs is used for get the information of shipping methods on checkout page.
GET: {{site_domain}}/index.php?route=ocrestapi/checkout/shipping_method
| Parameter | Type | Position | # | Description |
|---|---|---|---|---|
| token | string |
Headers |
Required |
Token is generate when user attempt login or register API. |
| Parameter | token |
|---|---|
| Type | string |
| Position | Headers |
| # | Required |
| Description | Token is generate when user attempt login or register API. |
'{{site_domain}}/index.php?route=ocrestapi/checkout/shipping_method',
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(
'Authorization: Bearer 540c41793e574f3591a8cd62771b3456f4c48e06',
'Cookie: OCSESSID=c0364c2f2ab1bfa2119971c026; currency=USD; language=en-gb'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var form = new FormData();
var settings = {
"url": "{{site_domain}}/index.php?route=ocrestapi/checkout/shipping_method",
"method": "GET",
"timeout": 0,
"headers": {
"Authorization": "Bearer 540c41793e574f3591a8cd62771b3456f4c48e06",
"Cookie": "OCSESSID=c0364c2f2ab1bfa2119971c026; currency=USD; language=en-gb"
},
"processData": false,
"mimeType": "multipart/form-data",
"contentType": false,
"data": form
};
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require('request');
var options = {
'method': 'GET',
'url': '{{site_domain}}/index.php?route=ocrestapi/checkout/shipping_method',
'headers': {
'Authorization': 'Bearer 540c41793e574f3591a8cd62771b3456f4c48e06',
'Cookie': 'OCSESSID=c0364c2f2ab1bfa2119971c026; currency=USD; language=en-gb'
},
formData: {
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
url = "{{site_domain}}/index.php?route=ocrestapi/checkout/shipping_method"
payload={}
files={}
headers = {
'Authorization': 'Bearer 540c41793e574f3591a8cd62771b3456f4c48e06',
'Cookie': 'OCSESSID=c0364c2f2ab1bfa2119971c026; currency=USD; language=en-gb'
}
response = requests.request("GET", url, headers=headers, data=payload, files=files)
print(response.text)
var client = new RestClient("{{site_domain}}/index.php?route=ocrestapi/checkout/shipping_method");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer 540c41793e574f3591a8cd62771b3456f4c48e06");
request.AddHeader("Cookie", "OCSESSID=c0364c2f2ab1bfa2119971c026; currency=USD; language=en-gb");
request.AlwaysMultipartFormData = true;
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request GET '{{site_domain}}/index.php?route=ocrestapi/checkout/shipping_method' \
--header 'Authorization: Bearer 540c41793e574f3591a8cd62771b3456f4c48e06' \
--header 'Cookie: OCSESSID=c0364c2f2ab1bfa2119971c026; currency=USD; language=en-gb'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("{{site_domain}}/index.php?route=ocrestapi/checkout/shipping_method")
.method("GET", null)
.addHeader("Authorization", "Bearer 540c41793e574f3591a8cd62771b3456f4c48e06")
.addHeader("Cookie", "OCSESSID=c0364c2f2ab1bfa2119971c026; currency=USD; language=en-gb")
.build();
Response response = client.newCall(request).execute();
require "uri"
require "net/http"
url = URI("{{site_domain}}/index.php?route=ocrestapi/checkout/shipping_method")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["Authorization"] = "Bearer 540c41793e574f3591a8cd62771b3456f4c48e06"
request["Cookie"] = "OCSESSID=c0364c2f2ab1bfa2119971c026; currency=USD; language=en-gb"
form_data = []
request.set_form form_data, 'multipart/form-data'
response = http.request(request)
puts response.read_body
Response
{
"status": true,
"errors": [],
"data": {
"shipping_methods": [
{
"title": "Flat Rate",
"quote": [
{
"code": "flat.flat",
"title": "Flat Shipping Rate",
"cost": "5.00",
"tax_class_id": "9",
"text": "$5.00"
}
],
"sort_order": "1",
"error": false
},
{
"title": "Free Shipping",
"quote": [
{
"code": "free.free",
"title": "Free Shipping",
"cost": 0,
"tax_class_id": 0,
"text": "$0.00"
}
],
"sort_order": "1",
"error": false
},
{
"title": "Parcelforce 48",
"quote": [
{
"code": "parcelforce_48.parcelforce_48",
"title": "Parcelforce 48",
"cost": "15.99",
"tax_class_id": "9",
"text": "$15.99"
}
],
"sort_order": "1",
"error": false
},
{
"title": "Per Item",
"quote": [
{
"code": "item.item",
"title": "Per Item Shipping Rate",
"cost": 20,
"tax_class_id": "9",
"text": "$20.00"
}
],
"sort_order": "5",
"error": false
}
]
},
"language": {
"code": "en",
"direction": "ltr",
"date_format_short": "d/m/Y",
"button_reorder": "Reorder",
"button_return": "Return",
"button_shopping": "Continue Shopping",
"button_search": "Search",
"button_shipping": "Apply Shipping",
"text_yes": "Yes",
"text_no": "No",
"text_none": " --- None --- ",
"text_select": " --- Please Select --- ",
"text_all_zones": "All Zones",
"text_pagination": "Showing %d to %d of %d (%d Pages)",
"text_loading": "Loading...",
"text_no_results": "No results!",
"button_address_add": "Add Address",
"button_back": "Back",
"button_continue": "Continue",
},
"text_your_password": "Your Password",
"text_agree": "I have read and agree to the %s",
"text_address_new": "I want to use a new address",
"text_address_existing": "I want to use an existing address",
"text_shipping_method": "Please select the preferred shipping method to use on this order.",
"text_payment_method": "Please select the preferred payment method to use on this order.",
"text_comments": "Add Comments About Your Order",
.
.
..................
}
}
Save Checkout Shipping Method POST APIs
This APIs is used for apply the shipping methods on the products.
POST: {{site_domain}}/index.php?route=ocrestapi/checkout/shipping_method
| Parameter | Type | Position | # | Description |
|---|---|---|---|---|
| token | string |
Headers |
Required |
Token is generate when user attempt login or register API. |
| shipping_method | object |
Body |
Required |
shipping_method is like flate shipping , free shipping etc. |
| comment | string |
Body |
Optional |
comment means customer gives comments on checkout page. |
| Parameter | token |
|---|---|
| Type | string |
| Position | Headers |
| # | Required |
| Description | Token is generate when user attempt login or register API. |
| Parameter | shipping_method |
| Type | Object |
| Position | Body |
| # | Required |
| Description | shipping_method is like flate shipping , free shipping etc. |
| Parameter | comment |
| Type | String |
| Position | Body |
| # | Optional |
| Description | comment means customer gives comments on checkout page. |
'{{site_domain}}/index.php?route=ocrestapi/checkout/shipping_method',
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 =>'{
"shipping_method":"flat.flat",
"comment":"shipping rate"
}',
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer 540c41793e574f3591a8cd62771b3456f4c48e06',
'Content-Type: application/json',
'Cookie: OCSESSID=c0364c2f2ab1bfa2119971c026; currency=USD; language=en-gb'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var settings = {
"url": "{{site_domain}}/index.php?route=ocrestapi/checkout/shipping_method",
"method": "POST",
"timeout": 0,
"headers": {
"Authorization": "Bearer 540c41793e574f3591a8cd62771b3456f4c48e06",
"Content-Type": "application/json",
"Cookie": "OCSESSID=c0364c2f2ab1bfa2119971c026; currency=USD; language=en-gb"
},
"data": JSON.stringify({
"shipping_method": "flat.flat",
"comment": "shipping rate"
}),
};
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require('request');
var options = {
'method': 'POST',
'url': '{{site_domain}}/index.php?route=ocrestapi/checkout/shipping_method',
'headers': {
'Authorization': 'Bearer 540c41793e574f3591a8cd62771b3456f4c48e06',
'Content-Type': 'application/json',
'Cookie': 'OCSESSID=c0364c2f2ab1bfa2119971c026; currency=USD; language=en-gb'
},
body: JSON.stringify({
"shipping_method": "flat.flat",
"comment": "shipping rate"
})
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
import json
url = "{{site_domain}}/index.php?route=ocrestapi/checkout/shipping_method"
payload = json.dumps({
"shipping_method": "flat.flat",
"comment": "shipping rate"
})
headers = {
'Authorization': 'Bearer 540c41793e574f3591a8cd62771b3456f4c48e06',
'Content-Type': 'application/json',
'Cookie': 'OCSESSID=c0364c2f2ab1bfa2119971c026; currency=USD; language=en-gb'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
var client = new RestClient("{{site_domain}}/index.php?route=ocrestapi/checkout/shipping_method");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer 540c41793e574f3591a8cd62771b3456f4c48e06");
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Cookie", "OCSESSID=c0364c2f2ab1bfa2119971c026; currency=USD; language=en-gb");
var body = @"{
" + "\n" +
@" ""shipping_method"":""flat.flat"",
" + "\n" +
@" ""comment"":""shipping rate""
" + "\n" +
@"}";
request.AddParameter("application/json", body, ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request POST '{{site_domain}}/index.php?route=ocrestapi/checkout/shipping_method' \
--header 'Authorization: Bearer 540c41793e574f3591a8cd62771b3456f4c48e06' \
--header 'Content-Type: application/json' \
--header 'Cookie: OCSESSID=c0364c2f2ab1bfa2119971c026; currency=USD; language=en-gb' \
--data-raw '{
"shipping_method":"flat.flat",
"comment":"shipping rate"
}'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n \"shipping_method\":\"flat.flat\",\r\n \"comment\":\"shipping rate\"\r\n}");
Request request = new Request.Builder()
.url("{{site_domain}}/index.php?route=ocrestapi/checkout/shipping_method")
.method("POST", body)
.addHeader("Authorization", "Bearer 540c41793e574f3591a8cd62771b3456f4c48e06")
.addHeader("Content-Type", "application/json")
.addHeader("Cookie", "OCSESSID=c0364c2f2ab1bfa2119971c026; currency=USD; language=en-gb")
.build();
Response response = client.newCall(request).execute();
require "uri"
require "json"
require "net/http"
url = URI("{{site_domain}}/index.php?route=ocrestapi/checkout/shipping_method")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)
request["Authorization"] = "Bearer 540c41793e574f3591a8cd62771b3456f4c48e06"
request["Content-Type"] = "application/json"
request["Cookie"] = "OCSESSID=c0364c2f2ab1bfa2119971c026; currency=USD; language=en-gb"
request.body = JSON.dump({
"shipping_method": "flat.flat",
"comment": "shipping rate"
})
response = http.request(request)
puts response.read_body
Request
{
"shipping_method":"flat.flat",
"comment":"shipping rate"
}
Response
{
"status": true,
"errors": [],
"data": []
}
Checkout Payment method GET APIs
This APIs is used gives the information of active payment methods on checkout page.
POST: {{site_domain}}/index.php?route=ocrestapi/checkout/payment_method
| Parameter | Type | Position | # | Description |
|---|---|---|---|---|
| token | string |
Headers |
Required |
Token is generate when user attempt login or register API. |
| Parameter | token |
|---|---|
| Type | string |
| Position | Headers |
| # | Required |
| Description | Token is generate when user attempt login or register API. |
'{{site_domain}}/index.php?route=ocrestapi/checkout/payment_method',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_POSTFIELDS => array('payment_method' => 'cod','comment' => 'test comment','agree' => '1'),
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer 99526f7bffc97de26d800dda147a7cd729288b80',
'Cookie: OCSESSID=c0364c2f2ab1bfa2119971c026; currency=USD; language=en-gb'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var form = new FormData();
form.append("payment_method", "cod");
form.append("comment", "test comment");
form.append("agree", "1");
var settings = {
"url": "{{site_domain}}/index.php?route=ocrestapi/checkout/payment_method",
"method": "GET",
"timeout": 0,
"headers": {
"Authorization": "Bearer 99526f7bffc97de26d800dda147a7cd729288b80",
"Cookie": "OCSESSID=c0364c2f2ab1bfa2119971c026; currency=USD; language=en-gb"
},
"processData": false,
"mimeType": "multipart/form-data",
"contentType": false,
"data": form
};
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require('request');
var options = {
'method': 'GET',
'url': '{{site_domain}}/index.php?route=ocrestapi/checkout/payment_method',
'headers': {
'Authorization': 'Bearer 99526f7bffc97de26d800dda147a7cd729288b80',
'Cookie': 'OCSESSID=c0364c2f2ab1bfa2119971c026; currency=USD; language=en-gb'
},
formData: {
'payment_method': 'cod',
'comment': 'test comment',
'agree': '1'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
url = "{{site_domain}}/index.php?route=ocrestapi/checkout/payment_method"
payload={'payment_method': 'cod',
'comment': 'test comment',
'agree': '1'}
files=[
]
headers = {
'Authorization': 'Bearer 99526f7bffc97de26d800dda147a7cd729288b80',
'Cookie': 'OCSESSID=c0364c2f2ab1bfa2119971c026; currency=USD; language=en-gb'
}
response = requests.request("GET", url, headers=headers, data=payload, files=files)
print(response.text)
var client = new RestClient("{{site_domain}}/index.php?route=ocrestapi/checkout/payment_method");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer 99526f7bffc97de26d800dda147a7cd729288b80");
request.AddHeader("Cookie", "OCSESSID=c0364c2f2ab1bfa2119971c026; currency=USD; language=en-gb");
request.AlwaysMultipartFormData = true;
request.AddParameter("payment_method", "cod");
request.AddParameter("comment", "test comment");
request.AddParameter("agree", "1");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request GET '{{site_domain}}/index.php?route=ocrestapi/checkout/payment_method' \
--header 'Authorization: Bearer 99526f7bffc97de26d800dda147a7cd729288b80' \
--header 'Cookie: OCSESSID=c0364c2f2ab1bfa2119971c026; currency=USD; language=en-gb' \
--form 'payment_method="cod"' \
--form 'comment="test comment"' \
--form 'agree="1"'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("{{site_domain}}/index.php?route=ocrestapi/checkout/payment_method")
.method("GET", null)
.addHeader("Authorization", "Bearer 99526f7bffc97de26d800dda147a7cd729288b80")
.addHeader("Cookie", "OCSESSID=c0364c2f2ab1bfa2119971c026; currency=USD; language=en-gb")
.build();
Response response = client.newCall(request).execute();
require "uri"
require "net/http"
url = URI("{{site_domain}}/index.php?route=ocrestapi/checkout/payment_method")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["Authorization"] = "Bearer 99526f7bffc97de26d800dda147a7cd729288b80"
request["Cookie"] = "OCSESSID=c0364c2f2ab1bfa2119971c026; currency=USD; language=en-gb"
form_data = [['payment_method', 'cod'],['comment', 'test comment'],['agree', '1']]
request.set_form form_data, 'multipart/form-data'
response = http.request(request)
puts response.read_body
Response
{
"status": true,
"errors": [],
"data": {
"totals": [
{
"title": "Sub-Total",
"text": "$100.00"
},
{
"title": "Total",
"text": "$100.00"
}
],
"total": "$100.00",
"payment_methods": [
{
"code": "bank_transfer",
"title": "Bank Transfer",
"terms": "",
"sort_order": "5"
},
{
"code": "cheque",
"title": "Cheque / Money Order",
"terms": "",
"sort_order": "5"
},
{
"code": "cod",
"title": "Cash On Delivery",
"terms": "",
"sort_order": "5"
}
]
},
"language": {
"code": "en",
"direction": "ltr",
"date_format_short": "d/m/Y",
"date_format_long": "l dS F Y",
"button_delete": "Delete",
"button_download": "Download",
"button_edit": "Edit",
"button_filter": "Refine Search",
"button_new_address": "New Address",
"button_list": "List",
"button_grid": "Grid",
"button_map": "View Google Map",
"error_exception": "Error Code(%s): %s in %s on line %s",
"text_checkout_account": "Step %s: Account & Billing Details",
"text_checkout_payment_address": "Step %s: Billing Details",
"text_checkout_shipping_address": "Step %s: Delivery Details",
"text_checkout_shipping_method": "Step %s: Delivery Method",
"text_checkout_payment_method": "Step %s: Payment Method",
"text_checkout_confirm": "Step %s: Confirm Order",
"text_modify": "Modify »",
"text_trial_description": "%s every %d %s(s) for %d payment(s) then",
"text_payment_description": "%s every %d %s(s) for %d payment(s)",
"text_payment_cancel": "%s every %d %s(s) until canceled",
"text_day": "day",
"text_week": "week",
"entry_country": "Country",
"entry_zone": "Region / State",
"entry_newsletter": "I wish to subscribe to the %s newsletter.",
"error_login": "Warning: No match for E-Mail Address and/or Password.",
"error_attempts": "Warning: Your account has exceeded allowed number of login attempts. Please try
.
.
.............
}
}
Save Checkout Payment Method POST APIs
This APIs is used for apply the payment methods on checkout page.
POST: {{site_domain}}/index.php?route=ocrestapi/checkout/payment_method
| Parameter | Type | Position | # | Description |
|---|---|---|---|---|
| token | string |
Headers |
Required |
Token is generate when user attempt login or register API. |
| agree | boolean |
Body |
Required |
agree mean customer aggree from term & condition. |
| payment_method | string |
Body |
Required |
payment_method means payment_method code which payment method is applied for product purchasing like cash on delivery code (cod), bank transfer code(bank_transfer) etc. |
| comment | string |
Body |
String |
Customer can write some comment. |
| Parameter | token |
|---|---|
| Type | string |
| Position | Headers |
| # | Required |
| Description | Token is generate when user attempt login or register API. |
| Parameter | agree |
| Type | boolean |
| Position | Body |
| # | Required |
| Description | agree mean customer aggree from term & condition. |
| Parameter | payment_method |
| Type | string |
| Position | Body |
| # | Required |
| Description | payment_method means payment_method code which payment method is applied for product purchasing like cash on delivery code (cod), bank transfer code(bank_transfer) etc. |
| Parameter | comment |
| Type | string |
| Position | Body |
| # | Optional |
| Description | Customer can write some comment. |
'{{site_domain}}/index.php?route=ocrestapi/checkout/payment_method',
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 =>'{
"agree":true,
"payment_method":"cod",
"comment":"hello"
}',
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer 99526f7bffc97de26d800dda147a7cd729288b80',
'Content-Type: application/json',
'Cookie: OCSESSID=c0364c2f2ab1bfa2119971c026; currency=USD; language=en-gb'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var settings = {
"url": "{{site_domain}}/index.php?route=ocrestapi/checkout/payment_method",
"method": "POST",
"timeout": 0,
"headers": {
"Authorization": "Bearer 99526f7bffc97de26d800dda147a7cd729288b80",
"Content-Type": "application/json",
"Cookie": "OCSESSID=c0364c2f2ab1bfa2119971c026; currency=USD; language=en-gb"
},
"data": JSON.stringify({
"agree": true,
"payment_method": "cod",
"comment": "hello"
}),
};
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require('request');
var options = {
'method': 'POST',
'url': '{{site_domain}}/index.php?route=ocrestapi/checkout/payment_method',
'headers': {
'Authorization': 'Bearer 99526f7bffc97de26d800dda147a7cd729288b80',
'Content-Type': 'application/json',
'Cookie': 'OCSESSID=c0364c2f2ab1bfa2119971c026; currency=USD; language=en-gb'
},
body: JSON.stringify({
"agree": true,
"payment_method": "cod",
"comment": "hello"
})
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
import json
url = "{{site_domain}}/index.php?route=ocrestapi/checkout/payment_method"
payload = json.dumps({
"agree": True,
"payment_method": "cod",
"comment": "hello"
})
headers = {
'Authorization': 'Bearer 99526f7bffc97de26d800dda147a7cd729288b80',
'Content-Type': 'application/json',
'Cookie': 'OCSESSID=c0364c2f2ab1bfa2119971c026; currency=USD; language=en-gb'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
var client = new RestClient("{{site_domain}}/index.php?route=ocrestapi/checkout/payment_method");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer 99526f7bffc97de26d800dda147a7cd729288b80");
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Cookie", "OCSESSID=c0364c2f2ab1bfa2119971c026; currency=USD; language=en-gb");
var body = @"{
" + "\n" +
@" ""agree"":true,
" + "\n" +
@" ""payment_method"":""cod"",
" + "\n" +
@" ""comment"":""hello""
" + "\n" +
@"
" + "\n" +
@"}";
request.AddParameter("application/json", body, ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request POST '{{site_domain}}/index.php?route=ocrestapi/checkout/payment_method' \
--header 'Authorization: Bearer 99526f7bffc97de26d800dda147a7cd729288b80' \
--header 'Content-Type: application/json' \
--header 'Cookie: OCSESSID=c0364c2f2ab1bfa2119971c026; currency=USD; language=en-gb' \
--data-raw '{
"agree":true,
"payment_method":"cod",
"comment":"hello"
}'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n \"agree\":true,\r\n \"payment_method\":\"cod\",\r\n \"comment\":\"hello\"\r\n \r\n}");
Request request = new Request.Builder()
.url("{{site_domain}}/index.php?route=ocrestapi/checkout/payment_method")
.method("POST", body)
.addHeader("Authorization", "Bearer 99526f7bffc97de26d800dda147a7cd729288b80")
.addHeader("Content-Type", "application/json")
.addHeader("Cookie", "OCSESSID=c0364c2f2ab1bfa2119971c026; currency=USD; language=en-gb")
.build();
Response response = client.newCall(request).execute();
require "uri"
require "json"
require "net/http"
url = URI("{{site_domain}}/index.php?route=ocrestapi/checkout/payment_method")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)
request["Authorization"] = "Bearer 99526f7bffc97de26d800dda147a7cd729288b80"
request["Content-Type"] = "application/json"
request["Cookie"] = "OCSESSID=c0364c2f2ab1bfa2119971c026; currency=USD; language=en-gb"
request.body = JSON.dump({
"agree": true,
"payment_method": "cod",
"comment": "hello"
})
response = http.request(request)
puts response.read_body
Request
{
"agree":true,
"payment_method":"cod",
"comment":"hello"
}
Response
{
"status": true,
"errors": [],
"data": []
}
Checkout Confirm GET APIs
This APIs is used for get the information of total price after applied voucher and coupon etc.
GET: {{site_domain}}/index.php?route=ocrestapi/checkout/confirm
| Parameter | Type | Position | # | Description |
|---|---|---|---|---|
| token | string |
Headers |
Required |
Token is generate when user attempt login or register API. |
| Parameter | token |
|---|---|
| Type | string |
| Position | Headers |
| # | Required |
| Description | Token is generate when user attempt login or register API. |
'{{site_domain}}/index.php?route=ocrestapi/checkout/confirm',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_POSTFIELDS =>'{
"order_data":"$order_data"
}',
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer a42e6e95a3c2c1a7c3140c5245830dabb8ff9d1f',
'Content-Type: application/json',
'Cookie: OCSESSID=c0364c2f2ab1bfa2119971c026; currency=USD; language=en-gb'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var settings = {
"url": "{{site_domain}}/index.php?route=ocrestapi/checkout/confirm",
"method": "GET",
"timeout": 0,
"headers": {
"Authorization": "Bearer a42e6e95a3c2c1a7c3140c5245830dabb8ff9d1f",
"Content-Type": "application/json",
"Cookie": "OCSESSID=c0364c2f2ab1bfa2119971c026; currency=USD; language=en-gb"
},
"data": JSON.stringify({
"order_data": "$order_data"
}),
};
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require('request');
var options = {
'method': 'GET',
'url': '{{site_domain}}/index.php?route=ocrestapi/checkout/confirm',
'headers': {
'Authorization': 'Bearer a42e6e95a3c2c1a7c3140c5245830dabb8ff9d1f',
'Content-Type': 'application/json',
'Cookie': 'OCSESSID=c0364c2f2ab1bfa2119971c026; currency=USD; language=en-gb'
},
body: JSON.stringify({
"order_data": "$order_data"
})
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
import json
url = "{{site_domain}}/index.php?route=ocrestapi/checkout/confirm"
payload = json.dumps({
"order_data": "$order_data"
})
headers = {
'Authorization': 'Bearer a42e6e95a3c2c1a7c3140c5245830dabb8ff9d1f',
'Content-Type': 'application/json',
'Cookie': 'OCSESSID=c0364c2f2ab1bfa2119971c026; currency=USD; language=en-gb'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
var client = new RestClient("{{site_domain}}/index.php?route=ocrestapi/checkout/confirm");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer a42e6e95a3c2c1a7c3140c5245830dabb8ff9d1f");
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Cookie", "OCSESSID=c0364c2f2ab1bfa2119971c026; currency=USD; language=en-gb");
var body = @"{
" + "\n" +
@" ""order_data"":""$order_data""
" + "\n" +
@"
" + "\n" +
@"}";
request.AddParameter("application/json", body, ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request GET '{{site_domain}}/index.php?route=ocrestapi/checkout/confirm' \
--header 'Authorization: Bearer a42e6e95a3c2c1a7c3140c5245830dabb8ff9d1f' \
--header 'Content-Type: application/json' \
--header 'Cookie: OCSESSID=c0364c2f2ab1bfa2119971c026; currency=USD; language=en-gb' \
--data-raw '{
"order_data":"$order_data"
}'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("{{site_domain}}/index.php?route=ocrestapi/checkout/confirm")
.method("GET", null)
.addHeader("Authorization", "Bearer a42e6e95a3c2c1a7c3140c5245830dabb8ff9d1f")
.addHeader("Content-Type", "application/json")
.addHeader("Cookie", "OCSESSID=c0364c2f2ab1bfa2119971c026; currency=USD; language=en-gb")
.build();
Response response = client.newCall(request).execute();
require "uri"
require "json"
require "net/http"
url = URI("{{site_domain}}/index.php?route=ocrestapi/checkout/confirm")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["Authorization"] = "Bearer a42e6e95a3c2c1a7c3140c5245830dabb8ff9d1f"
request["Content-Type"] = "application/json"
request["Cookie"] = "OCSESSID=c0364c2f2ab1bfa2119971c026; currency=USD; language=en-gb"
request.body = JSON.dump({
"order_data": "$order_data"
})
response = http.request(request)
puts response.read_body
Response
{
"status": true,
"errors": [],
"data": {
"products": [
{
"cart_id": "437",
"product_id": "48",
"name": "iPod Classic",
"model": "product 20",
"option": [],
"recurring": "",
"quantity": "1",
"subtract": "1",
"price": "$100.00",
"total": "$100.00"
}
],
"vouchers": [],
"totals": [
{
"title": "Sub-Total",
"text": "$100.00"
},
{
"title": "Gift Certificate (vc123)",
"text": "$-50.00"
},
{
"title": "Total",
"text": "$50.00"
}
],
"total": "$50.00"
}
}
Checkout Confirm POST APIs
This APIs is used for confirm the orders.
POST: {{site_domain}}/index.php?route=ocrestapi/checkout/confirm
| Parameter | Type | Position | # | Description |
|---|---|---|---|---|
| token | string |
Headers |
Required |
Token is generate when user attempt login or register API. |
| confirm | integer |
Body |
Required |
confirm gives the value 1 for agree from term&condition. |
| Parameter | token |
|---|---|
| Type | string |
| Position | Headers |
| # | Required |
| Description | Token is generate when user attempt login or register API. |
| Parameter | confirm |
| Type | integer |
| Position | Body |
| # | Required |
| Description | confirm gives the value 1 for agree from term&condition. |
'{{site_domain}}/index.php?route=ocrestapi/checkout/confirm',
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 =>'{
"confirm":1
}',
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer dc17adaf0409b581f9645546d96fc39628f4c41f',
'Content-Type: application/json',
'Cookie: OCSESSID=edf5dc74a51bd9db32966a5495; currency=USD; language=en-gb'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var settings = {
"url": "{{site_domain}}/index.php?route=ocrestapi/checkout/confirm",
"method": "POST",
"timeout": 0,
"headers": {
"Authorization": "Bearer dc17adaf0409b581f9645546d96fc39628f4c41f",
"Content-Type": "application/json",
"Cookie": "OCSESSID=edf5dc74a51bd9db32966a5495; currency=USD; language=en-gb"
},
"data": JSON.stringify({
"confirm": 1
}),
};
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require('request');
var options = {
'method': 'POST',
'url': '{{site_domain}}/index.php?route=ocrestapi/checkout/confirm',
'headers': {
'Authorization': 'Bearer dc17adaf0409b581f9645546d96fc39628f4c41f',
'Content-Type': 'application/json',
'Cookie': 'OCSESSID=edf5dc74a51bd9db32966a5495; currency=USD; language=en-gb'
},
body: JSON.stringify({
"confirm": 1
})
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
import json
url = "{{site_domain}}/index.php?route=ocrestapi/checkout/confirm"
payload = json.dumps({
"confirm": 1
})
headers = {
'Authorization': 'Bearer dc17adaf0409b581f9645546d96fc39628f4c41f',
'Content-Type': 'application/json',
'Cookie': 'OCSESSID=edf5dc74a51bd9db32966a5495; currency=USD; language=en-gb'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
var client = new RestClient("{{site_domain}}/index.php?route=ocrestapi/checkout/confirm");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer dc17adaf0409b581f9645546d96fc39628f4c41f");
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Cookie", "OCSESSID=edf5dc74a51bd9db32966a5495; currency=USD; language=en-gb");
var body = @"{
" + "\n" +
@"""confirm"":1
" + "\n" +
@"
" + "\n" +
@"}";
request.AddParameter("application/json", body, ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request POST '{{site_domain}}/index.php?route=ocrestapi/checkout/confirm' \
--header 'Authorization: Bearer dc17adaf0409b581f9645546d96fc39628f4c41f' \
--header 'Content-Type: application/json' \
--header 'Cookie: OCSESSID=edf5dc74a51bd9db32966a5495; currency=USD; language=en-gb' \
--data-raw '{
"confirm":1
}'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n\"confirm\":1\r\n \r\n}");
Request request = new Request.Builder()
.url("{{site_domain}}/index.php?route=ocrestapi/checkout/confirm")
.method("POST", body)
.addHeader("Authorization", "Bearer dc17adaf0409b581f9645546d96fc39628f4c41f")
.addHeader("Content-Type", "application/json")
.addHeader("Cookie", "OCSESSID=edf5dc74a51bd9db32966a5495; currency=USD; language=en-gb")
.build();
Response response = client.newCall(request).execute();
require "uri"
require "json"
require "net/http"
url = URI("{{site_domain}}/index.php?route=ocrestapi/checkout/confirm")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)
request["Authorization"] = "Bearer dc17adaf0409b581f9645546d96fc39628f4c41f"
request["Content-Type"] = "application/json"
request["Cookie"] = "OCSESSID=edf5dc74a51bd9db32966a5495; currency=USD; language=en-gb"
request.body = JSON.dump({
"confirm": 1
})
response = http.request(request)
puts response.read_body
Response
{
"status": false,
"errors": [],
"data": []
}
Information GET APIs
This APIs is used for get the imformation of pages.
GET: {{site_domain}}/index.php?route=ocrestapi/information/information&information_id=4
| Parameter | Type | Position | # | Description |
|---|---|---|---|---|
| token | string |
Headers |
Required |
Token is generate when user attempt login or register API. |
| information_id | string |
URLs |
Required |
information_id means get the information whatever page gives information id of that page. ex-information_id is 4,5,6,7. |
| Parameter | token |
|---|---|
| Type | string |
| Position | Headers |
| # | Required |
| Description | Token is generate when user attempt login or register API. |
| Parameter | information_id |
| Type | string |
| Position | URLs |
| # | Required |
| Description | information_id means get the information whatever page gives information id of that page. ex-information_id is 4,5,6,7. |
'{{site_domain}}/index.php?route=ocrestapi/information/information&information_id=4',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'Cookie: OCSESSID=3cef3e28cd1ff6af5cbe17657d; currency=USD; language=en-gb'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var settings = {
"url": "{{site_domain}}/index.php?route=ocrestapi/information/information&information_id=4",
"method": "GET",
"timeout": 0,
"headers": {
"Cookie": "OCSESSID=3cef3e28cd1ff6af5cbe17657d; currency=USD; language=en-gb"
},
};
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require('request');
var options = {
'method': 'GET',
'url': '{{site_domain}}/index.php?route=ocrestapi/information/information&information_id=4',
'headers': {
'Cookie': 'OCSESSID=3cef3e28cd1ff6af5cbe17657d; currency=USD; language=en-gb'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
url = "{{site_domain}}/index.php?route=ocrestapi/information/information&information_id=4"
payload={}
headers = {
'Cookie': 'OCSESSID=3cef3e28cd1ff6af5cbe17657d; currency=USD; language=en-gb'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
var client = new RestClient("{{site_domain}}/index.php?route=ocrestapi/information/information&information_id=4");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Cookie", "OCSESSID=3cef3e28cd1ff6af5cbe17657d; currency=USD; language=en-gb");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request GET '{{site_domain}}/index.php?route=ocrestapi/information/information&information_id=4' \
--header 'Cookie: OCSESSID=3cef3e28cd1ff6af5cbe17657d; currency=USD; language=en-gb'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("{{site_domain}}/index.php?route=ocrestapi/information/information&information_id=4")
.method("GET", null)
.addHeader("Cookie", "OCSESSID=3cef3e28cd1ff6af5cbe17657d; currency=USD; language=en-gb")
.build();
Response response = client.newCall(request).execute();
require "uri"
require "net/http"
url = URI("{{site_domain}}/index.php?route=ocrestapi/information/information&information_id=4")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["Cookie"] = "OCSESSID=3cef3e28cd1ff6af5cbe17657d; currency=USD; language=en-gb"
response = http.request(request)
puts response.read_body
Response
{
"status": true,
"errors": [],
"data": {
"heading_title": "About Us",
"description": "about us
\r\n"
},
"language": {
"code": "en",
"direction": "ltr",
"date_format_short": "d/m/Y",
"date_format_long": "l dS F Y",
"time_format": "h:i:s A",
"button_cancel": "Cancel",
"button_compare": "Compare this Product",
"button_wishlist": "Add to Wish List",
"button_checkout": "Checkout",
"button_change_address": "Change Address",
"button_grid": "Grid",
"button_map": "View Google Map",
"error_exception": "Error Code(%s): %s in %s on line %s",
"text_affiliate": "Affiliate",
"text_special": "Specials",
"text_account": "My Account",
"text_order": "Order History",
"text_for": "%s Gift Certificate for %s",
"entry_api_old_password": "Old Password",
"text_cart_success": " Success: You have added product to your shopping cart",
"text_return_success": "Thank you for submitting your return request. Your request has been sent to the relevant department for processing.",
"text_checkout_success": "Your order has been successfully processed!
You can view your order history by clicking on history from My Orders Menu.
If your purchase has an associated download, you can go to the account downloads page to view them.
Please direct any questions you have to the store owner.
Thanks for shopping with us online!",
"text_coupon_title": "Use Coupon Code",
"error_voucher_empty": "Warning: Please enter a gift certificate code!",
"text_shipping_heading": "Estimate Shipping & Taxes",
"text_shipping_success": "Success: Your shipping estimate has been applied!",
"text_shipping_shipping": "Enter your destination to get a shipping estimate.",
"text_shipping_shipping_method": "Please select the preferred shipping method to use on this order.",
"error_form_error": "Warning: Please check the form carefully for errors!",
"text_wishlist_remove_product": "Success: You have removed %s from your wish list!",
.
.
............
}
}
Contact Us GET APIs
This APIs is used for get the imformation of contact us pages.
GET: {{site_domain}}/index.php?route=ocrestapi/information/contact
| Parameter | Type | Position | # | Description |
|---|---|---|---|---|
| token | string |
Headers |
Required |
Token is generate when user attempt login or register API. |
| Parameter | token |
|---|---|
| Type | string |
| Position | Headers |
| # | Required |
| Description | Token is generate when user attempt login or register API. |
'{{site_domain}}/index.php?route=ocrestapi/information/contact',
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(
'Authorization: Bearer f9ee7f5d308e243b604daeaaad08f50426c6da25',
'Cookie: OCSESSID=3cef3e28cd1ff6af5cbe17657d; currency=USD; language=en-gb'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var form = new FormData();
var settings = {
"url": "{{site_domain}}/index.php?route=ocrestapi/information/contact",
"method": "GET",
"timeout": 0,
"headers": {
"Authorization": "Bearer f9ee7f5d308e243b604daeaaad08f50426c6da25",
"Cookie": "OCSESSID=3cef3e28cd1ff6af5cbe17657d; currency=USD; language=en-gb"
},
"processData": false,
"mimeType": "multipart/form-data",
"contentType": false,
"data": form
};
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require('request');
var options = {
'method': 'GET',
'url': '{{site_domain}}/index.php?route=ocrestapi/information/contact',
'headers': {
'Authorization': 'Bearer f9ee7f5d308e243b604daeaaad08f50426c6da25',
'Cookie': 'OCSESSID=3cef3e28cd1ff6af5cbe17657d; currency=USD; language=en-gb'
},
formData: {
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
url = "{{site_domain}}/index.php?route=ocrestapi/information/contact"
payload={}
files={}
headers = {
'Authorization': 'Bearer f9ee7f5d308e243b604daeaaad08f50426c6da25',
'Cookie': 'OCSESSID=3cef3e28cd1ff6af5cbe17657d; currency=USD; language=en-gb'
}
response = requests.request("GET", url, headers=headers, data=payload, files=files)
print(response.text)
var client = new RestClient("{{site_domain}}/index.php?route=ocrestapi/information/contact");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer f9ee7f5d308e243b604daeaaad08f50426c6da25");
request.AddHeader("Cookie", "OCSESSID=3cef3e28cd1ff6af5cbe17657d; currency=USD; language=en-gb");
request.AlwaysMultipartFormData = true;
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request GET '{{site_domain}}/index.php?route=ocrestapi/information/contact' \
--header 'Authorization: Bearer f9ee7f5d308e243b604daeaaad08f50426c6da25' \
--header 'Cookie: OCSESSID=3cef3e28cd1ff6af5cbe17657d; currency=USD; language=en-gb'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("{{site_domain}}/index.php?route=ocrestapi/information/contact")
.method("GET", null)
.addHeader("Authorization", "Bearer f9ee7f5d308e243b604daeaaad08f50426c6da25")
.addHeader("Cookie", "OCSESSID=3cef3e28cd1ff6af5cbe17657d; currency=USD; language=en-gb")
.build();
Response response = client.newCall(request).execute();
require "uri"
require "net/http"
url = URI("{{site_domain}}/index.php?route=ocrestapi/information/contact")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["Authorization"] = "Bearer f9ee7f5d308e243b604daeaaad08f50426c6da25"
request["Cookie"] = "OCSESSID=3cef3e28cd1ff6af5cbe17657d; currency=USD; language=en-gb"
form_data = []
request.set_form form_data, 'multipart/form-data'
response = http.request(request)
puts response.read_body
Response
{
"status": true,
"errors": [],
"data": {
"image": "{{site_domain}}/image/cache/catalog/logo_white-268x50.jpg",
"store": "Letscms Shop",
"address": "Address 1",
"geocode": "",
"geocode_hl": "en-gb",
"telephone": "123456789",
"fax": "154545",
"open": "10:00am",
"comment": "asdasffsdfsff",
"locations": [],
"name": "user3",
"email": "example1@test.com",
"enquiry": "",
"captcha": ""
},
"language": {
"code": "en",
"direction": "ltr",
"date_format_short": "d/m/Y",
"date_format_long": "l dS F Y",
"time_format": "h:i:s A",
"button_edit": "Edit",
"button_filter": "Refine Search",
"button_map": "View Google Map",
"error_exception": "Error Code(%s): %s in %s on line %s",
"error_upload_2": "Warning: The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form!",
"error_upload_3": "Warning: The uploaded file was only partially uploaded!",
"text_success": "Your enquiry has been successfully sent to the store owner!
",
"entry_name": "Your Name",
"entry_email": "E-Mail Address",
"entry_enquiry": "Enquiry",
"email_subject": "Enquiry %s",
"error_name": "Name must be between 3 and 32 characters!",
"error_email": "E-Mail Address does not appear to be valid!",
"error_enquiry": "Enquiry must be between 10 and 3000 characters!",
"error_required_firstname": "Firstname is required.",
"error_required_lastname": "Lastname is required.",
"error_required_address1": "Address 1 is required.",
"error_required_email": "Email is required.",
"text_cart_success": " Success: You have added product to your shopping cart",
"text_return_success": "Thank you for submitting your return request. Your request has been sent to the relevant department for processing.",
"text_checkout_success": "Your order has been successfully processed!
You can view your order history by clicking on history from My Orders Menu.
If your purchase has an associated download, you can go to the account downloads page to view them.
Please direct any questions you have to the store owner.
Thanks for shopping with us online!",
"text_coupon_title": "Use Coupon Code",
"text_coupon": "Coupon (%s)",
"text_coupon_success": "Success: Your coupon discount has been applied!",
"entry_coupon_coupon": "Enter your coupon here",
"error_coupon_coupon": "Warning: Coupon is either invalid, expired or reached its usage limit!",
"error_coupon_empty": "Warning: Please enter a coupon code!",
.
.
................
}
}
Contact Us POST APIs
This APIs is used for customer enquiry related any issues.
POST: {{site_domain}}/index.php?route=ocrestapi/information/contact
| Parameter | Type | Position | # | Description |
|---|---|---|---|---|
| token | string |
Headers |
Required |
Token is generate when user attempt login or register API. |
| name | string |
Body |
Required |
name of customer. |
string |
Body |
Required |
email of customer. | |
| enquiry | string |
Body |
Required |
enquiry of customer or message of customer. |
| Parameter | token |
|---|---|
| Type | string |
| Position | Headers |
| # | Required |
| Description | Token is generate when user attempt login or register API. |
| Parameter | name |
| Type | string |
| Position | Body |
| # | Required |
| Description | name of customer. |
| Parameter | |
| Type | string |
| Position | Body |
| # | Required |
| Description | email of customer. |
| Parameter | enquiry |
| Type | string |
| Position | Body |
| # | Required |
| Description | enquiry of customer or message of customer. |
'{{site_domain}}/index.php?route=ocrestapi/information/contact',
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 =>'{
"name":"user3",
"email":"example1@test.com",
"enquiry":"this is enquiry comment "
}',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'Cookie: OCSESSID=3cef3e28cd1ff6af5cbe17657d; currency=USD; language=en-gb'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var settings = {
"url": "{{site_domain}}/index.php?route=ocrestapi/information/contact",
"method": "POST",
"timeout": 0,
"headers": {
"Content-Type": "application/json",
"Cookie": "OCSESSID=3cef3e28cd1ff6af5cbe17657d; currency=USD; language=en-gb"
},
"data": JSON.stringify({
"name": "user3",
"email": "example1@test.com",
"enquiry": "this is enquiry comment "
}),
};
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require('request');
var options = {
'method': 'POST',
'url': '{{site_domain}}/index.php?route=ocrestapi/information/contact',
'headers': {
'Content-Type': 'application/json',
'Cookie': 'OCSESSID=3cef3e28cd1ff6af5cbe17657d; currency=USD; language=en-gb'
},
body: JSON.stringify({
"name": "user3",
"email": "example1@test.com",
"enquiry": "this is enquiry comment "
})
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
import json
url = "{{site_domain}}/index.php?route=ocrestapi/information/contact"
payload = json.dumps({
"name": "user3",
"email": "example1@test.com",
"enquiry": "this is enquiry comment "
})
headers = {
'Content-Type': 'application/json',
'Cookie': 'OCSESSID=3cef3e28cd1ff6af5cbe17657d; currency=USD; language=en-gb'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
var client = new RestClient("{{site_domain}}/index.php?route=ocrestapi/information/contact");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Cookie", "OCSESSID=3cef3e28cd1ff6af5cbe17657d; currency=USD; language=en-gb");
var body = @"{
" + "\n" +
@" ""name"":""user3"",
" + "\n" +
@" ""email"":""example1@test.com"",
" + "\n" +
@" ""enquiry"":""this is enquiry comment ""
" + "\n" +
@"}";
request.AddParameter("application/json", body, ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request POST '{{site_domain}}/index.php?route=ocrestapi/information/contact' \
--header 'Content-Type: application/json' \
--header 'Cookie: OCSESSID=3cef3e28cd1ff6af5cbe17657d; currency=USD; language=en-gb' \
--data-raw '{
"name":"user3",
"email":"example1@test.com",
"enquiry":"this is enquiry comment "
}'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n \"name\":\"user3\",\r\n \"email\":\"example1@test.com\",\r\n \"enquiry\":\"this is enquiry comment \"\r\n}");
Request request = new Request.Builder()
.url("{{site_domain}}/index.php?route=ocrestapi/information/contact")
.method("POST", body)
.addHeader("Content-Type", "application/json")
.addHeader("Cookie", "OCSESSID=3cef3e28cd1ff6af5cbe17657d; currency=USD; language=en-gb")
.build();
Response response = client.newCall(request).execute();
require "uri"
require "json"
require "net/http"
url = URI("{{site_domain}}/index.php?route=ocrestapi/information/contact")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)
request["Content-Type"] = "application/json"
request["Cookie"] = "OCSESSID=3cef3e28cd1ff6af5cbe17657d; currency=USD; language=en-gb"
request.body = JSON.dump({
"name": "user3",
"email": "example1@test.com",
"enquiry": "this is enquiry comment "
})
response = http.request(request)
puts response.read_body
Request
{
"name":"user3",
"email":"example1@test.com",
"enquiry":"this is enquiry comment "
}
Response
{
"status": true,
"errors": [],
"data": {
"success": "Your enquiry has been successfully sent to the store owner!
"
}
}
Brands GET APIs
This APIs is used for get the information of manufecturer products.
GET: {{site_domain}}/index.php?route=ocrestapi/product/manufacturer
| Parameter | Type | Position | # | Description |
|---|---|---|---|---|
| token | string |
Headers |
Required |
Token is generate when user attempt login or register API. |
| Parameter | token |
|---|---|
| Type | string |
| Position | Headers |
| # | Required |
| Description | Token is generate when user attempt login or register API. |
'{{site_domain}}/index.php?route=ocrestapi/product/manufacturer',
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(
'Authorization: Bearer f9ee7f5d308e243b604daeaaad08f50426c6da25',
'Cookie: OCSESSID=3cef3e28cd1ff6af5cbe17657d; currency=USD; language=en-gb'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var settings = {
"url": "{{site_domain}}/index.php?route=ocrestapi/product/manufacturer",
"method": "GET",
"timeout": 0,
"headers": {
"Authorization": "Bearer f9ee7f5d308e243b604daeaaad08f50426c6da25",
"Cookie": "OCSESSID=3cef3e28cd1ff6af5cbe17657d; currency=USD; language=en-gb"
},
};
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require('request');
var options = {
'method': 'GET',
'url': '{{site_domain}}/index.php?route=ocrestapi/product/manufacturer',
'headers': {
'Authorization': 'Bearer f9ee7f5d308e243b604daeaaad08f50426c6da25',
'Cookie': 'OCSESSID=3cef3e28cd1ff6af5cbe17657d; currency=USD; language=en-gb'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
url = "{{site_domain}}/index.php?route=ocrestapi/product/manufacturer"
payload={}
headers = {
'Authorization': 'Bearer f9ee7f5d308e243b604daeaaad08f50426c6da25',
'Cookie': 'OCSESSID=3cef3e28cd1ff6af5cbe17657d; currency=USD; language=en-gb'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
var client = new RestClient("{{site_domain}}/index.php?route=ocrestapi/product/manufacturer");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer f9ee7f5d308e243b604daeaaad08f50426c6da25");
request.AddHeader("Cookie", "OCSESSID=3cef3e28cd1ff6af5cbe17657d; currency=USD; language=en-gb");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request GET '{{site_domain}}/index.php?route=ocrestapi/product/manufacturer' \
--header 'Authorization: Bearer f9ee7f5d308e243b604daeaaad08f50426c6da25' \
--header 'Cookie: OCSESSID=3cef3e28cd1ff6af5cbe17657d; currency=USD; language=en-gb'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("{{site_domain}}/index.php?route=ocrestapi/product/manufacturer")
.method("GET", null)
.addHeader("Authorization", "Bearer f9ee7f5d308e243b604daeaaad08f50426c6da25")
.addHeader("Cookie", "OCSESSID=3cef3e28cd1ff6af5cbe17657d; currency=USD; language=en-gb")
.build();
Response response = client.newCall(request).execute();
require "uri"
require "net/http"
url = URI("{{site_domain}}/index.php?route=ocrestapi/product/manufacturer")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["Authorization"] = "Bearer f9ee7f5d308e243b604daeaaad08f50426c6da25"
request["Cookie"] = "OCSESSID=3cef3e28cd1ff6af5cbe17657d; currency=USD; language=en-gb"
response = http.request(request)
puts response.read_body
Response
{
"status": true,
"errors": [],
"data": {
"brands": [
{
"name": "A",
"manufacturer": [
{
"name": "acer",
"manufacturer_id": "15"
},
{
"name": "adcom",
"manufacturer_id": "19"
},
{
"name": "alco",
"manufacturer_id": "16"
},
{
"name": "alive plus",
"manufacturer_id": "17"
},
{
"name": "Apple",
"manufacturer_id": "8"
},
{
"name": "apple 1",
"manufacturer_id": "11"
},
{
"name": "apple 2",
"manufacturer_id": "12"
},
{
"name": "asus",
"manufacturer_id": "18"
}
]
},
{
"name": "B",
"manufacturer": [
{
"name": "blackbear",
"manufacturer_id": "20"
},
{
"name": "blackberry",
"manufacturer_id": "21"
},
{
"name": "Blue",
"manufacturer_id": "22"
},
{
"name": "boat",
"manufacturer_id": "13"
},
{
"name": "boult",
"manufacturer_id": "14"
},
{
"name": "BSNL",
"manufacturer_id": "23"
}
]
},
]
},
"language": {
"code": "en",
"direction": "ltr",
"date_format_short": "d/m/Y",
"date_format_long": "l dS F Y",
"time_format": "h:i:s A",
"error_upload_2": "Warning: The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form!",
"error_upload_3": "Warning: The uploaded file was only partially uploaded!",
"text_price": "Price:",
"text_tax": "Ex Tax:",
"text_compare": "Product Compare (%s)",
"text_sort": "Sort By:",
"text_default": "Default",
"text_name_asc": "Name (A - Z)",
"text_name_desc": "Name (Z - A)",
"text_price_asc": "Price (Low > High)",
"text_price_desc": "Price (High > Low)",
"text_rating_asc": "Rating (Lowest)",
"text_rating_desc": "Rating (Highest)",
"text_model_asc": "Model (A - Z)",
"text_model_desc": "Model (Z - A)",
"text_limit": "Show:"
.
.
......
}
}
File Upload POST APIs
This APIs is used for upload the files.
POST: {{site_domain}}/index.php?route=ocrestapi/tool/upload
| Parameter | Type | Position | # | Description |
|---|---|---|---|---|
| token | string |
Headers |
Required |
Token is generate when user attempt login or register API. |
| file_name | string |
Body |
Required |
file name of the file whatever upload the file. |
| file | Object |
Headers |
Required |
file whatever upload like images |
| Parameter | token |
|---|---|
| Type | string |
| Position | Headers |
| # | Required |
| Description | Token is generate when user attempt login or register API. |
| Parameter | file_name |
| Type | string |
| Position | Body |
| # | Required |
| Description | file name of the file whatever upload the file. |
| Parameter | file |
| Type | string |
| Position | Body |
| # | Required |
| Description | file whatever upload like images |
'{{site_domain}}/index.php?route=ocrestapi/tool/upload',
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 =>'{
"file_name":"icon.png",
"file":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QAAA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9gHmN64JyqYEAFgKwIL9CasteewvASOmVT9nHGAARyK+Y2jLb3kHD1aJKHYYATAHwAeRXVG3pbR82/m31MnF1RISGjsIKyK+42jrWVqOhg09P66mUGWi4/nsl5Fdkbam1Dxr/dob0SqScIQTgVWhnod1bFA17b7qrrzJiJIBnANRCfmXX1tBqATwN4CTplUO5x9EApgNYC/kNwK3tIwA/AtBbemVQ7nYGgN8BqIb8RuH0VgtgEYBzobv5ymYKAHwHwJtoGDBSemNxSkui4cKdGwD0lP4jK9UWfQHcDiAGwIT8RpRrzUTDhVm3Ni5LpXLW0QAuR8Mlxzshv3HZtVWj4UzLTQD6Sf/R3ECPobKvE4DxAM4HMAHAqXDvRSomGq6xWArgDTQM3FIvHcpNtADIKwBQCKAYDdeon4LGZ805UAING3wJGjb6CBr2iJQQLQD2k4eGvYLRAM5s/PcEAF7pYCky0XCKtLxJW4mGXnxlE1oAcoMfwNcBDEdDMTix8d/j0NC/IOlLABvRcE5+TeO/HwH4GA1jLSgb0wKQ+zqjYUyDAU1aTwC9Gv/d37qh4dCiW+PvdQLQpfH/NfjPJ3M1Go7D96LhgStN21cAPmvS/t34uypH/X+NkuyOdOztHgAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMC0xMS0xN1QwNzozOTo1NCswMDowMGBtjz4AAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjAtMTEtMTdUMDc6Mzk6NTQrMDA6MDARMDeCAAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAAABJRU5ErkJggg=="
}',
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer 33a0567c29710c98ec4be9e46327dcd8214a5925',
'Content-Type: application/json',
'Cookie: OCSESSID=edf5dc74a51bd9db32966a5495; currency=USD; language=en-gb'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var settings = {
"url": "{{site_domain}}/index.php?route=ocrestapi/tool/upload",
"method": "POST",
"timeout": 0,
"headers": {
"Authorization": "Bearer 33a0567c29710c98ec4be9e46327dcd8214a5925",
"Content-Type": "application/json",
"Cookie": "OCSESSID=edf5dc74a51bd9db32966a5495; currency=USD; language=en-gb"
},
"data": JSON.stringify({
"file_name": "icon.png",
"file": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QAAAAAAAD5Q7t/AAAACXBIWXMAAA7EAAAOxAGVKw4bAAAAB3RJTUUH5AsRByc2zkTDpgAAIcxJREFUeNrt3Xt4FOXZP/DvPXsgnEJAgQqIcqogHlARYXcTiIq+VqkHELUeqK1a66kVWjxCsdVfrUKtbfW1b5UWbNUXW6uvFUVbF7IHEo0RRKAa5FAloKAcQw67M/fvjwQaIAnZZHfv2Zn7c13PBUk2s9+ZzNw788zMMwSV05YsWdI1Pz9/YBLoT6bZH4YxEEAfYu7BQD6IeoC5B4AeAHo2M4nuALwAagHUANgFoA5Ee8FczUCNAXyBhlYF4AvLMLaSaW5h5qrCwsId0stAtR9JB1BHtnjx4k4FBQVftyxrBBGNYKITYVnDQXQcGjZsSdsBrCOg0gI+NoB1lmVVJpPJ1cXFxbXSy061TguAzYTD4Ty/33+aRTSGLGsMiEYDGALAI50tRQkAaxioIOYKwzAq9uzZs/L888+vlg6m/kMLgLCSkpLehmGcTURFTHQWmE8B4JPOlSEmASuZaBksaykzR/QQQpYWgCwrLy/vUl9fX2hZ1rkgOhfAKQAM6VxCLAAfELCMmd9MJBJv62FDdmkByILS0tK+Ccu6GMyXETABQCfpTLbEXE1EbzHz371e79/Hjh37uXQkp9MCkCHLly8/3jTNS0F0KYAg3Psp314WgHfA/JLX631+7Nixn0kHciItAGlUWlqan7CsS8iyrgXROdDlmy4WmJezYbyYrKv7c3Fx8XbpQE6hK2gHMbMRLS09myzr2wAuA9BZOpPD1TLwd2KeHwwGlxCRJR0ol2kBaKfG3v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jnm+48GgAAAABJRU5ErkJggg=="
}),
};
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require('request');
var options = {
'method': 'POST',
'url': '{{site_domain}}/index.php?route=ocrestapi/tool/upload',
'headers': {
'Authorization': 'Bearer 33a0567c29710c98ec4be9e46327dcd8214a5925',
'Content-Type': 'application/json',
'Cookie': 'OCSESSID=edf5dc74a51bd9db32966a5495; currency=USD; language=en-gb'
},
body: JSON.stringify({
"file_name": "icon.png",
"file": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QAAAAAAAD5Q7t/AAAACXBIWXMAAA7EAAAOxAGVKw4bAAAAB3RJTUUH5AsRByc2zkTDpgAAIcxJREFUeNrt3Xt4FOXZP/DvPXsgnEJAgQqIcqogHlARYXcTiIq+VqkHELUeqK1a66kVWjxCsdVfrUKtbfW1b5UWbNUXW6uvFUVbF7IHEo0RRKAa5FAloKAcQw67M/fvjwQaIAnZZHfv2Zn7c13PBUk2s9+ZzNw788zMMwSV05YsWdI1Pz9/YBLoT6bZH4YxEEAfYu7BQD6IeoC5B4AeAHo2M4nuALwAagHUANgFoA5Ee8FczUCNAXyBhlYF4AvLMLaSaW5h5qrCwsId0stAtR9JB1BHtnjx4k4FBQVftyxrBBGNYKITYVnDQXQcGjZsSdsBrCOg0gI+NoB1lmVVJpPJ1cXFxbXSy061TguAzYTD4Ty/33+aRTSGLGsMiEYDGALAI50tRQkAaxioIOYKwzAq9uzZs/L888+vlg6m/kMLgLCSkpLehmGcTURFTHQWmE8B4JPOlSEmASuZaBksaykzR/QQQpYWgCwrLy/vUl9fX2hZ1rkgOhfAKQAM6VxCLAAfELCMmd9MJBJv62FDdmkByILS0tK+Ccu6GMyXETABQCfpTLbEXE1EbzHz371e79/Hjh37uXQkp9MCkCHLly8/3jTNS0F0KYAg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N1QwNzozOTo1NCswMDowMGBtjz4AAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjAtMTEtMTdUMDc6Mzk6NTQrMDA6MDARMDeCAAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAAABJRU5ErkJggg=="
})
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
import json
url = "{{site_domain}}/index.php?route=ocrestapi/tool/upload"
payload = json.dumps({
"file_name": "icon.png",
"file": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QAAAAAAAD5Q7t/AAAACXBIWXMAAA7EAAAOxAGVKw4bAAAAB3RJTUUH5AsRByc2zkTDpgAAIcxJREFUeNrt3Xt4FOXZP/DvPXsgnEJAgQqIcqogHlARYXcTiIq+VqkHELUeqK1a66kVWjxCsdVfrUKtbfW1b5UWbNUXW6uvFUVbF7IHEo0RRKAa5FAloKAcQw67M/fvjwQaIAnZZHfv2Zn7c13PBUk2s9+ZzNw788zMMwSV05YsWdI1Pz9/YBLoT6bZH4YxEEAfYu7BQD6IeoC5B4AeAHo2M4nuALwAagHUANgFoA5Ee8FczUCNAXyBhlYF4AvLMLaSaW5h5qrCwsId0stAtR9JB1BHtnjx4k4FBQVftyxrBBGNYKITYVnDQXQcGjZsSdsBrCOg0gI+NoB1lmVVJpPJ1cXFxbXSy061TguAzYTD4Ty/33+aRTSGLGsMiEYDGALAI50tRQkAaxioIOYKwzAq9uzZs/L888+vlg6m/kMLgLCSkpLehmGcTURFTHQWmE8B4JPOlSEmASuZaBksaykzR/QQQpYWgCwrLy/vUl9fX2hZ1rkgOhfAKQAM6VxCLAAfELCMmd9MJBJv62FDdmkByILS0tK+Ccu6GMyXETABQCfpTLbEXE1EbzHz371e79/Hjh37uXQkp9MCkCHL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GUAMjAyMC0xMS0xN1QwNzozOTo1NCswMDowMGBtjz4AAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjAtMTEtMTdUMDc6Mzk6NTQrMDA6MDARMDeCAAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAAABJRU5ErkJggg=="
})
headers = {
'Authorization': 'Bearer 33a0567c29710c98ec4be9e46327dcd8214a5925',
'Content-Type': 'application/json',
'Cookie': 'OCSESSID=edf5dc74a51bd9db32966a5495; currency=USD; language=en-gb'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
var client = new RestClient("{{site_domain}}/index.php?route=ocrestapi/tool/upload");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer 33a0567c29710c98ec4be9e46327dcd8214a5925");
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Cookie", "OCSESSID=edf5dc74a51bd9db32966a5495; currency=USD; language=en-gb");
var body = @"{
" + "\n" +
@" ""file_name"":""icon.png"",
" + "\n" +
@" ""file"":""data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QAAAAAAAD5Q7t/AAAACXBIWXMAAA7EAAAOxAGVKw4bAAAAB3RJTUUH5AsRByc2zkTDpgAAIcxJREFUeNrt3Xt4FOXZP/DvPXsgnEJAgQqIcqogHlARYXcTiIq+VqkHELUeqK1a66kVWjxCsdVfrUKtbfW1b5UWbNUXW6uvFUVbF7IHEo0RRKAa5FAloKAcQw67M/fvjwQaIAnZZHfv2Zn7c13PBUk2s9+ZzNw788zMMwSV05YsWdI1Pz9/YBLoT6bZH4YxEEAfYu7BQD6IeoC5B4AeAHo2M4nuALwAagHUANgFoA5Ee8FczUCNAXyBhlYF4AvLMLaSaW5h5qrCwsId0stAtR9JB1BHtnjx4k4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AM4HMAHAqXDvRSomGq6xWArgDTQM3FIvHcpNtADIKwBQCKAYDdeon4LGZ805UAING3wJGjb6CBr2iJQQLQD2k4eGvYLRAM5s/PcEAF7pYCky0XCKtLxJW4mGXnxlE1oAcoMfwNcBDEdDMTix8d/j0NC/IOlLABvRcE5+TeO/HwH4GA1jLSgb0wKQ+zqjYUyDAU1aTwC9Gv/d37qh4dCiW+PvdQLQpfH/NfjPJ3M1Go7D96LhgStN21cAPmvS/t34uypH/X+NkuyOdOztHgAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMC0xMS0xN1QwNzozOTo1NCswMDowMGBtjz4AAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjAtMTEtMTdUMDc6Mzk6NTQrMDA6MDARMDeCAAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAAABJRU5ErkJggg==""
" + "\n" +
@"}";
request.AddParameter("application/json", body, ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request POST '{{site_domain}}/index.php?route=ocrestapi/tool/upload' \
--header 'Authorization: Bearer 33a0567c29710c98ec4be9e46327dcd8214a5925' \
--header 'Content-Type: application/json' \
--header 'Cookie: OCSESSID=edf5dc74a51bd9db32966a5495; currency=USD; language=en-gb' \
--data-raw '{
"file_name":"icon.png",
"file":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QAAAAAAAD5Q7t/AAAACXBIWXMAAA7EAAAOxAGVKw4bAAAAB3RJTUUH5AsRByc2zkTDpgAAIcxJREFUeNrt3Xt4FOXZP/DvPXsgnEJAgQqIcqogHlARYXcTiIq+VqkHELUeqK1a66kVWjxCsdVfrUKtbfW1b5UWbNUXW6uvFUVbF7IHEo0RRKAa5FAloKAcQw67M/fvjwQaI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A/AtBbemVQ7nYGgN8BqIb8RuH0VgtgEYBzobv5ymYKAHwHwJtoGDBSemNxSkui4cKdGwD0lP4jK9UWfQHcDiAGwIT8RpRrzUTDhVm3Ni5LpXLW0QAuR8Mlxzshv3HZtVWj4UzLTQD6Sf/R3ECPobKvE4DxAM4HMAHAqXDvRSomGq6xWArgDTQM3FIvHcpNtADIKwBQCKAYDdeon4LGZ805UAING3wJGjb6CBr2iJQQLQD2k4eGvYLRAM5s/PcEAF7pYCky0XCKtLxJW4mGXnxlE1oAcoMfwNcBDEdDMTix8d/j0NC/IOlLABvRcE5+TeO/HwH4GA1jLSgb0wKQ+zqjYUyDAU1aTwC9Gv/d37qh4dCiW+PvdQLQpfH/NfjPJ3M1Go7D96LhgStN21cAPmvS/t34uypH/X+NkuyOdOztHgAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMC0xMS0xN1QwNzozOTo1NCswMDowMGBtjz4AAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjAtMTEtMTdUMDc6Mzk6NTQrMDA6MDARMDeCAAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAAABJRU5ErkJggg=="
}'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n \"file_name\":\"icon.png\",\r\n \"file\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QAAAAAAAD5Q7t/AAAACXBIWXMAAA7EAAAOxAGVKw4bAAAAB3RJTUUH5AsRByc2zkTDpgAAIcxJREFUeNrt3Xt4FOXZP/DvPXsgnEJAgQqIcqogHlARYXcTiIq+VqkHELUeqK1a66kVWjxCsdVfrUKtbfW1b5UWbNUXW6uvFUVbF7IHEo0RRKAa5FA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9EApgNYC/kNwK3tIwA/AtBbemVQ7nYGgN8BqIb8RuH0VgtgEYBzobv5ymYKAHwHwJtoGDBSemNxSkui4cKdGwD0lP4jK9UWfQHcDiAGwIT8RpRrzUTDhVm3Ni5LpXLW0QAuR8Mlxzshv3HZtVWj4UzLTQD6Sf/R3ECPobKvE4DxAM4HMAHAqXDvRSomGq6xWArgDTQM3FIvHcpNtADIKwBQCKAYDdeon4LGZ805UAING3wJGjb6CBr2iJQQLQD2k4eGvYLRAM5s/PcEAF7pYCky0XCKtLxJW4mGXnxlE1oAcoMfwNcBDEdDMTix8d/j0NC/IOlLABvRcE5+TeO/HwH4GA1jLSgb0wKQ+zqjYUyDAU1aTwC9Gv/d37qh4dCiW+PvdQLQpfH/NfjPJ3M1Go7D96LhgStN21cAPmvS/t34uypH/X+NkuyOdOztHgAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMC0xMS0xN1QwNzozOTo1NCswMDowMGBtjz4AAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjAtMTEtMTdUMDc6Mzk6NTQrMDA6MDARMDeCAAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAAABJRU5ErkJggg==\"\r\n}");
Request request = new Request.Builder()
.url("{{site_domain}}/index.php?route=ocrestapi/tool/upload")
.method("POST", body)
.addHeader("Authorization", "Bearer 33a0567c29710c98ec4be9e46327dcd8214a5925")
.addHeader("Content-Type", "application/json")
.addHeader("Cookie", "OCSESSID=edf5dc74a51bd9db32966a5495; currency=USD; language=en-gb")
.build();
Response response = client.newCall(request).execute();
require "uri"
require "json"
require "net/http"
url = URI("{{site_domain}}/index.php?route=ocrestapi/tool/upload")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)
request["Authorization"] = "Bearer 33a0567c29710c98ec4be9e46327dcd8214a5925"
request["Content-Type"] = "application/json"
request["Cookie"] = "OCSESSID=edf5dc74a51bd9db32966a5495; currency=USD; language=en-gb"
request.body = JSON.d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w64lgAyyC/0mhzRiuBQ55o5SaEhrMEeyG/AmnLzVYD4C4451DZlQZD9wa0pd5KAYwQWF9VBnjQUMn3QX7F0mbvVgNgJvRT35EGA3gN8iuZNnu2t6Gf+q4wCcAmyK9w2uzRqgBcJ7pGqqzrDmAugDrIr4DaZFo9gHmN64JyqYEAFgKwIL9CasteewvASOmVT9nHGAARyK+Y2jLb3kHD1aJKHYYATAHwAeRXVG3pbR82/m31MnF1RISGjsIKyK+42jrWVqOhg09P66mUGWi4/nsl5Fdkbam1Dxr/dob0SqScIQTgVWhnod1bFA17b7qrrzJiJIBnANRCfmXX1tBqATwN4CTplUO5x9EApgNYC/kNwK3tIwA/AtBbemVQ7nYGgN8BqIb8RuH0VgtgEYBzobv5ymYKAHwHwJtoGDBSemNxSkui4cKdGwD0lP4jK9UWfQHcDiAGwIT8RpRrzUTDhVm3Ni5LpXLW0QAuR8Mlxzshv3HZtVWj4UzLTQD6Sf/R3ECPobKvE4DxAM4HMAHAqXDvRSomGq6xWArgDTQM3FIvHcpNtADIKwBQCKAYDdeon4LGZ805UAING3wJGjb6CBr2iJQQLQD2k4eGvYLRAM5s/PcEAF7pYCky0XCKtLxJW4mGXnxlE1oAcoMfwNcBDEdDMTix8d/j0NC/IOlLABvRcE5+TeO/HwH4GA1jLSgb0wKQ+zqjYUyDAU1aTwC9Gv/d37qh4dCiW+PvdQLQpfH/NfjPJ3M1Go7D96LhgStN21cAPmvS/t34uypH/X+NkuyOdOztHgAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMC0xMS0xN1QwNzozOTo1NCswMDowMGBtjz4AAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjAtMTEtMTdUMDc6Mzk6NTQrMDA6MDARMDeCAAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAAABJRU5ErkJggg=="
})
response = http.request(request)
puts response.read_body
Response
{
"status": true,
"errors": [],
"data": {
"success": "file uploaded successfully.",
"code": "4348962fb864fa87a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