Working with Orders
In the context of WebCommander, “orders” represent transactions where customers purchase products from a website. This section explains how to effectively work with order data within the WebCommander platform. To streamline order-related tasks, WebCommander provides a set of APIs. Below is a list of order-related operations that you can perform using WebCommander’s APIs:
Get Order List
Returns the list of all orders. An example is given below:
curl --location 'http://yourapp.com/external/app/access/orders?max=-1&offset=0' \
--header 'uuid: F8A3-A88E-C6EF-B1CB' \
--header 'accessToken: 11b4ec017714ef095b8e115545467fcb'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'http://yourapp.com/external/app/access/orders?max=-1&offset=0',
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(
'uuid: F8A3-A88E-C6EF-B1CB',
'accessToken: 11b4ec017714ef095b8e115545467fcb'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import http.client
conn = http.client.HTTPSConnection("yourapp.com")
payload = ''
headers = {
'uuid': 'F8A3-A88E-C6EF-B1CB',
'accessToken': '11b4ec017714ef095b8e115545467fcb'
}
conn.request("GET", "/external/app/access/orders?max=-1&offset=0", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
Unirest.setTimeouts(0, 0);
HttpResponse<String> response = Unirest.get("http://yourapp.com/external/app/access/orders?max=-1&offset=0")
.header("uuid", "F8A3-A88E-C6EF-B1CB")
.header("accessToken", "11b4ec017714ef095b8e115545467fcb")
.asString();
var options = new RestClientOptions("")
{
MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("http://yourapp.com/external/app/access/orders?max=-1&offset=0", Method.Get);
request.AddHeader("uuid", "F8A3-A88E-C6EF-B1CB");
request.AddHeader("accessToken", "11b4ec017714ef095b8e115545467fcb");
RestResponse response = await client.ExecuteAsync(request);
Console.WriteLine(response.Content);
Request Details
- Request URL:
http://yourapp.com/external/app/access/orders
- Request type:
GET
Request Parameter
"max": "-1",
"offset": "0"
Response
{
"status": "success",
"total": 424,
"max": "1",
"offset": "0",
"orders": [
{
"orderComment": [],
"payments": [
{
"surcharge": 0.0,
"amount": 25.0,
"trackInfo": null,
"payerInfo": "Customer# 93",
"gatewayCode": "PIS",
"payingDate": "2023-05-10T10: 02: 15",
"gatewayName": null,
"gatewayResponse": null,
"id": 1808,
"refundId": null,
"order": 1645,
"status": "refunded"
},
{
"surcharge": 0.0,
"amount": 10.0,
"trackInfo": "",
"payerInfo": "",
"gatewayCode": "PIS",
"payingDate": "2023-05-14T09: 58: 15",
"gatewayName": null,
"gatewayResponse": null,
"id": 1809,
"refundId": null,
"order": 1645,
"status": "refunded"
}
],
"lastReminderTime": "2023-05-10T10: 02: 15",
"totalSurcharge": 0.0,
"orderStatus": "pending",
"orderChannel": null,
"billing": {
"lastName": "Tom",
"country": 12,
"city": "Wheelers Hill",
"companyName": null,
"mobile": "123456789",
"firstName": "Jarry",
"phone": "12345",
"addressLine1": "Address Line 1",
"addressLine2": null,
"postCode": "3150",
"id": 4346,
"state": 72,
"fax": "fax",
"email": "3896\u0040noemail.loc"
},
"shippingStatus": "completed",
"shippingTax": 0.0,
"shipping": {
"lastName": "Tom",
"country": 12,
"city": "Wheelers Hill",
"companyName": null,
"mobile": "123456789",
"firstName": "Jarry",
"phone": "12345",
"addressLine1": "Address Line 1",
"addressLine2": null,
"postCode": "3150",
"id": 4347,
"state": 72,
"fax": "fax",
"email": "3896\u0040noemail.loc"
},
"discountOnOrder": 0.0,
"additionalInfo": null,
"customerId": 301,
"handlingCost": 0.0,
"discountOnShippingTax": 0.0,
"id": 1645,
"paymentStatus": "unpaid",
"handlingTax": 0.0,
"orderNo": 635,
"shippingCost": 0.0,
"discountOnOrderTotalTax": 0.0,
"created": "2023-05-10T10: 02: 15",
"ipAddress": "0: 0: 0: 0: 0: 0: 0: 1",
"deliveryType": "shipping",
"version": null,
"shipments": [
{
"shippingDate": "2023-05-14T04: 33: 32",
"method": "Australia Post",
"trackingInfo": "TRX45454",
"id": 47,
"shipmentItem": [
140
],
"order": 1645
}
],
"customerName": "Jarry Tommmmmy",
"reminderCount": 0,
"createdBy": null,
"actualTax": 0.91,
"discountOnShipping": 0.0,
"updated": "2023-05-14T10: 18: 48",
"items": [
{
"actualDiscount": 0.0,
"quantity": 1,
"productId": 180,
"productVariationId": null,
"actualPrice": 9.99,
"shippingClassName": null,
"taxDiscount": 0.0,
"isTaxable": true,
"discount": 0.0,
"tax": 0.91,
"storeId": null,
"version": null,
"shippingClassId": null,
"productName": "Nike Brasilia Football\u002fRugby Boot Bag",
"price": 9.08,
"variations": [],
"id": 2940,
"productType": "product",
"isShippable": true,
"productInfo": {
"images": [
{
"idx": 1,
"name": "nike-brasilia-boot-bag.jpg",
"altText": "Nike Brasilia Football\u002fRugby Boot Bag",
"url": "http:\u002f\u002flocalhost: 1301\u002fresources\u002f00000000\u002fproduct\u002fproduct-180\u002fnike-brasilia-boot-bag.jpg"
}
]
}
}
],
"orderSummary": {
"subTotal": "9.08",
"shippingCost": "0.00",
"shippingTax": "0.00",
"handlingCost": "0.00",
"totalSurcharge": "0.00",
"totalDiscount": "0.00",
"totalTax": "0.91",
"grandTotal": "9.99",
"paid": "0.00",
"due": "9.99"
}
}
]
}
Get Single Order
Responsible to get a single order detail. An example is given below :
curl --location 'http://yourapp.com/external/app/access/order?id=2344666' \
--header 'uuid: F8A3-A88E-C6EF-B1CB' \
--header 'accessToken: 11b4ec017714ef095b8e115545467fcb'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'http://yourapp.com/external/app/access/order?id=2344666',
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(
'uuid: F8A3-A88E-C6EF-B1CB',
'accessToken: 11b4ec017714ef095b8e115545467fcb'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import http.client
conn = http.client.HTTPSConnection("yourapp.com")
payload = ''
headers = {
'uuid': 'F8A3-A88E-C6EF-B1CB',
'accessToken': '11b4ec017714ef095b8e115545467fcb'
}
conn.request("GET", "/external/app/access/order?id=2344666", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
Unirest.setTimeouts(0, 0);
HttpResponse<String> response = Unirest.get("http://yourapp.com/external/app/access/order?id=2344666")
.header("uuid", "F8A3-A88E-C6EF-B1CB")
.header("accessToken", "11b4ec017714ef095b8e115545467fcb")
.asString();
var options = new RestClientOptions("")
{
MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("http://yourapp.com/external/app/access/order?id=2344666", Method.Get);
request.AddHeader("uuid", "F8A3-A88E-C6EF-B1CB");
request.AddHeader("accessToken", "11b4ec017714ef095b8e115545467fcb");
RestResponse response = await client.ExecuteAsync(request);
Console.WriteLine(response.Content);
Request Details
- Request URL:
http://yourapp.com/external/app/access/order
- Request type:
GET
Request parameter
"id": 1220
Response
{
"order": {
"orderComment": [],
"payments": [
{
"surcharge": 0.0,
"amount": 249.7,
"trackInfo": null,
"payerInfo": "Guest Customer",
"gatewayCode": "PIS",
"payingDate": "2021-09-03T06: 00: 43",
"gatewayName": null,
"gatewayResponse": null,
"id": 100,
"refundId": null,
"order": 100,
"status": "pending"
}
],
"lastReminderTime": "2021-09-03T06: 00: 43",
"totalSurcharge": 0.0,
"orderStatus": "cancelled",
"orderChannel": null,
"billing": {
"lastName": "Tom",
"country": {
"isDefault": true,
"code": "AU",
"name": "Australia",
"id": 12,
"state": [
66,
67,
68,
69,
70,
71,
72,
73
],
"isActive": true
},
"city": "South Yarra",
"companyName": null,
"mobile": "123456789",
"version": null,
"firstName": "Jarry",
"phone": "12345",
"addressLine1": "Address Line 1",
"addressLine2": null,
"postCode": "3141",
"id": 220,
"state": {
"country": 12,
"isDefault": false,
"code": "VIC",
"name": "Victoria",
"id": 72,
"isActive": true
},
"fax": "fax",
"email": "220\u0040noemail.loc"
},
"shippingStatus": "awaiting",
"shippingTax": 0.0,
"shipping": {
"lastName": "Tom",
"country": {
"isDefault": true,
"code": "AU",
"name": "Australia",
"id": 12,
"state": [
66,
67,
68,
69,
70,
71,
72,
73
],
"isActive": true
},
"city": "South Yarra",
"companyName": null,
"mobile": "123456789",
"version": null,
"firstName": "Jarry",
"phone": "12345",
"addressLine1": "Address Line 1",
"addressLine2": null,
"postCode": "3141",
"id": 223,
"state": {
"country": 12,
"isDefault": false,
"code": "VIC",
"name": "Victoria",
"id": 72,
"isActive": true
},
"fax": "fax",
"email": "223\u0040noemail.loc"
},
"discountOnOrder": 0.0,
"additionalInfo": null,
"customerId": null,
"handlingCost": 0.0,
"discountOnShippingTax": 0.0,
"id": 100,
"paymentStatus": "unpaid",
"handlingTax": 0.0,
"orderNo": 34,
"shippingCost": 0.0,
"discountOnOrderTotalTax": 0.0,
"created": "2021-09-03T06: 00: 43",
"ipAddress": "114.130.180.169",
"deliveryType": "shipping",
"version": null,
"shipments": [],
"customerName": "Guest Customer",
"reminderCount": 0,
"createdBy": null,
"actualTax": 22.7,
"discountOnShipping": 0.0,
"updated": "2021-12-23T03: 44: 17",
"items": [
{
"actualDiscount": 0.0,
"quantity": 3,
"productId": 1,
"productVariationId": null,
"actualPrice": 71.5,
"shippingClassName": null,
"taxDiscount": 0.0,
"isTaxable": true,
"discount": 0.0,
"tax": 19.5,
"storeId": null,
"version": null,
"shippingClassId": null,
"productName": "Mulgrave 1\u002f4 zip",
"price": 65.0,
"variations": [],
"id": 250,
"productType": "product",
"isShippable": true,
"productInfo": {
"images": [
{
"idx": 1,
"name": "Test.png",
"altText": "Mulgrave 1\u002f4 zip",
"url": "http:\u002f\u002flocalhost: 1301\u002fresources\u002f00000000\u002fproduct\u002fproduct-1\u002fTest.png"
}
]
}
},
{
"actualDiscount": 0.0,
"quantity": 1,
"productId": 13,
"productVariationId": null,
"actualPrice": 35.2,
"shippingClassName": null,
"taxDiscount": 0.0,
"isTaxable": true,
"discount": 0.0,
"tax": 3.2,
"storeId": null,
"version": null,
"shippingClassId": null,
"productName": "Mulgrave Training Tee_37",
"price": 32.0,
"variations": [
"Colour: red",
"Size: XS"
],
"id": 253,
"productType": "product",
"isShippable": true,
"productInfo": {
"images": [
{
"thumbnail": "http:\u002f\u002flocalhost: 1301\u002fresources\u002f00000000\u002fproduct\u002fdefault\u002f150-default.png",
"url": "http:\u002f\u002flocalhost: 1301\u002fresources\u002f00000000\u002fproduct\u002fdefault\u002fdefault.png"
}
]
}
}
],
"orderSummary": {
"subTotal": "227.00",
"shippingCost": "0.00",
"shippingTax": "0.00",
"handlingCost": "0.00",
"totalSurcharge": "0.00",
"totalDiscount": "0.00",
"totalTax": "22.70",
"grandTotal": "249.70",
"paid": "0.00",
"due": "249.70"
}
}
}
Order Create
Responsible for creating an order. An example is given below:
curl --location 'http://yourapp.com/external/app/access/order-create' \
--header 'uuid: F8A3-A88E-C6EF-B1CB' \
--header 'accessToken: 11b4ec017714ef095b8e115545467fcb' \
--header 'Content-Type: application/json' \
--data-raw '{
"billingAddress": {
"firstName": "John",
"addressLine1": "60 Siddeley St, Docklands VIC 3008, Australia",
"city": "Docklands",
"postCode": "3008",
"countryId": "11",
"stateId": "7",
"email": "john@bitmascot.com"
},
"shippingAddress": {
"firstName": "John",
"addressLine1": "60 Siddeley St, Docklands VIC 3008, Australia",
"city": "Docklands",
"postCode": "3008",
"countryId": "11",
"stateId": 7,
"email": "john@bitmascot.com"
},
"customerId": 6,
"handlingCost": 0,
"shippingCost": 0,
"shippingTax": 0,
"totalSurcharge": 0,
"ipAddress": "10.10.10.10",
"items": [
{
"productId": 495,
"productName": "API Product",
"productType": "product",
"quantity": 1,
"price": 666.00,
"tax": 0,
"discount": 0,
"isShippable": true,
"isTaxable": true
}
]
}'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'http://yourapp.com/external/app/access/order-create',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>'{
"billingAddress": {
"firstName": "John",
"addressLine1": "60 Siddeley St, Docklands VIC 3008, Australia",
"city": "Docklands",
"postCode": "3008",
"countryId": "11",
"stateId": "7",
"email": "john@bitmascot.com"
},
"shippingAddress": {
"firstName": "John",
"addressLine1": "60 Siddeley St, Docklands VIC 3008, Australia",
"city": "Docklands",
"postCode": "3008",
"countryId": "11",
"stateId": 7,
"email": "john@bitmascot.com"
},
"customerId": 6,
"handlingCost": 0,
"shippingCost": 0,
"shippingTax": 0,
"totalSurcharge": 0,
"ipAddress": "10.10.10.10",
"items": [
{
"productId": 495,
"productName": "API Product",
"productType": "product",
"quantity": 1,
"price": 666.00,
"tax": 0,
"discount": 0,
"isShippable": true,
"isTaxable": true
}
]
}',
CURLOPT_HTTPHEADER => array(
'uuid: F8A3-A88E-C6EF-B1CB',
'accessToken: 11b4ec017714ef095b8e115545467fcb',
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import http.client
import json
conn = http.client.HTTPSConnection("yourapp.com")
payload = json.dumps({
"billingAddress": {
"firstName": "John",
"addressLine1": "60 Siddeley St, Docklands VIC 3008, Australia",
"city": "Docklands",
"postCode": "3008",
"countryId": "11",
"stateId": "7",
"email": "john@bitmascot.com"
},
"shippingAddress": {
"firstName": "John",
"addressLine1": "60 Siddeley St, Docklands VIC 3008, Australia",
"city": "Docklands",
"postCode": "3008",
"countryId": "11",
"stateId": 7,
"email": "john@bitmascot.com"
},
"customerId": 6,
"handlingCost": 0,
"shippingCost": 0,
"shippingTax": 0,
"totalSurcharge": 0,
"ipAddress": "10.10.10.10",
"items": [
{
"productId": 495,
"productName": "API Product",
"productType": "product",
"quantity": 1,
"price": 666,
"tax": 0,
"discount": 0,
"isShippable": True,
"isTaxable": True
}
]
})
headers = {
'uuid': 'F8A3-A88E-C6EF-B1CB',
'accessToken': '11b4ec017714ef095b8e115545467fcb',
'Content-Type': 'application/json'
}
conn.request("POST", "/external/app/access/order-create", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
Unirest.setTimeouts(0, 0);
HttpResponse<String> response = Unirest.post("http://yourapp.com/external/app/access/order-create")
.header("uuid", "F8A3-A88E-C6EF-B1CB")
.header("accessToken", "11b4ec017714ef095b8e115545467fcb")
.header("Content-Type", "application/json")
.body("{\r\n \"billingAddress\": {\r\n \"firstName\": \"John\",\r\n \"addressLine1\": \"60 Siddeley St, Docklands VIC 3008, Australia\",\r\n \"city\": \"Docklands\",\r\n \"postCode\": \"3008\",\r\n \"countryId\": \"11\",\r\n \"stateId\": \"7\",\r\n \"email\": \"john@bitmascot.com\"\r\n },\r\n \"shippingAddress\": {\r\n \"firstName\": \"John\",\r\n \"addressLine1\": \"60 Siddeley St, Docklands VIC 3008, Australia\",\r\n \"city\": \"Docklands\",\r\n \"postCode\": \"3008\",\r\n \"countryId\": \"11\",\r\n \"stateId\": 7,\r\n \"email\": \"john@bitmascot.com\"\r\n },\r\n \"customerId\": 6,\r\n \"handlingCost\": 0,\r\n \"shippingCost\": 0,\r\n \"shippingTax\": 0,\r\n \"totalSurcharge\": 0,\r\n \"ipAddress\": \"10.10.10.10\",\r\n \"items\": [\r\n {\r\n \"productId\": 495,\r\n \"productName\": \"API Product\",\r\n \"productType\": \"product\",\r\n \"quantity\": 1,\r\n \"price\": 666.00,\r\n \"tax\": 0,\r\n \"discount\": 0,\r\n \"isShippable\": true,\r\n \"isTaxable\": true\r\n }\r\n ]\r\n}")
.asString();
var options = new RestClientOptions("")
{
MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("http://yourapp.com/external/app/access/order-create", Method.Post);
request.AddHeader("uuid", "F8A3-A88E-C6EF-B1CB");
request.AddHeader("accessToken", "11b4ec017714ef095b8e115545467fcb");
request.AddHeader("Content-Type", "application/json");
var body = @"{
" + "\n" +
@" ""billingAddress"": {
" + "\n" +
@" ""firstName"": ""John"",
" + "\n" +
@" ""addressLine1"": ""60 Siddeley St, Docklands VIC 3008, Australia"",
" + "\n" +
@" ""city"": ""Docklands"",
" + "\n" +
@" ""postCode"": ""3008"",
" + "\n" +
@" ""countryId"": ""11"",
" + "\n" +
@" ""stateId"": ""7"",
" + "\n" +
@" ""email"": ""john@bitmascot.com""
" + "\n" +
@" },
" + "\n" +
@" ""shippingAddress"": {
" + "\n" +
@" ""firstName"": ""John"",
" + "\n" +
@" ""addressLine1"": ""60 Siddeley St, Docklands VIC 3008, Australia"",
" + "\n" +
@" ""city"": ""Docklands"",
" + "\n" +
@" ""postCode"": ""3008"",
" + "\n" +
@" ""countryId"": ""11"",
" + "\n" +
@" ""stateId"": 7,
" + "\n" +
@" ""email"": ""john@bitmascot.com""
" + "\n" +
@" },
" + "\n" +
@" ""customerId"": 6,
" + "\n" +
@" ""handlingCost"": 0,
" + "\n" +
@" ""shippingCost"": 0,
" + "\n" +
@" ""shippingTax"": 0,
" + "\n" +
@" ""totalSurcharge"": 0,
" + "\n" +
@" ""ipAddress"": ""10.10.10.10"",
" + "\n" +
@" ""items"": [
" + "\n" +
@" {
" + "\n" +
@" ""productId"": 495,
" + "\n" +
@" ""productName"": ""API Product"",
" + "\n" +
@" ""productType"": ""product"",
" + "\n" +
@" ""quantity"": 1,
" + "\n" +
@" ""price"": 666.00,
" + "\n" +
@" ""tax"": 0,
" + "\n" +
@" ""discount"": 0,
" + "\n" +
@" ""isShippable"": true,
" + "\n" +
@" ""isTaxable"": true
" + "\n" +
@" }
" + "\n" +
@" ]
" + "\n" +
@"}";
request.AddStringBody(body, DataFormat.Json);
RestResponse response = await client.ExecuteAsync(request);
Console.WriteLine(response.Content);
Request Details
- Request URL:
http://yourapp.com/external/app/access/order-create
- Request type:
POST
Request Parameter
{
"billingAddress": {
"firstName": "John",
"addressLine1": "60 Siddeley St, Docklands VIC 3008, Australia",
"city": "Docklands",
"postCode": "3008",
"countryId": "11",
"stateId": "7",
"email": "john@bitmascot.com"
},
"shippingAddress": {
"firstName": "John",
"addressLine1": "60 Siddeley St, Docklands VIC 3008, Australia",
"city": "Docklands",
"postCode": "3008",
"countryId": "11",
"stateId": 7,
"email": "john@bitmascot.com"
},
"customerId": 6,
"handlingCost": 0,
"shippingCost": 0,
"shippingTax": 0,
"totalSurcharge": 0,
"ipAddress": "10.10.10.10",
"items": [
{
"productId": 495,
"productName": "API Product",
"productType": "product",
"quantity": 1,
"price": 666.00,
"tax": 0,
"discount": 0,
"isShippable": true,
"isTaxable": true
}
]
}
Response
{
"status": "success",
"order": {
"orderComment": [],
"payments": [
{
"surcharge": 0.0,
"amount": 666.0,
"trackInfo": null,
"payerInfo": null,
"gatewayCode": "PIS",
"payingDate": "2023-02-01T09:38:18",
"gatewayName": null,
"gatewayResponse": null,
"id": 63,
"refundId": null,
"order": 48,
"status": "awaiting"
}
],
"lastReminderTime": "2023-02-01T09:38:17",
"totalSurcharge": 0.0,
"orderStatus": "pending",
"orderChannel": null,
"billing": {
"lastName": null,
"country": {
"isDefault": false,
"code": "AM",
"name": "Armenia",
"id": 11,
"state": [],
"isActive": true
},
"city": "Docklands",
"companyName": null,
"mobile": null,
"version": null,
"firstName": "John",
"phone": null,
"addressLine1": "60 Siddeley St, Docklands VIC 3008, Australia",
"addressLine2": null,
"postCode": "3008",
"id": 186,
"state": {
"country": 236,
"isDefault": false,
"code": "CT",
"name": "Connecticut",
"id": 7,
"isActive": true
},
"fax": null,
"email": "john@bitmascot.com"
},
"shippingStatus": "awaiting",
"shippingTax": 0.0,
"shipping": {
"lastName": null,
"country": {
"isDefault": false,
"code": "AM",
"name": "Armenia",
"id": 11,
"state": [],
"isActive": true
},
"city": "Docklands",
"companyName": null,
"mobile": null,
"version": null,
"firstName": "Irtiza",
"phone": null,
"addressLine1": "60 Siddeley St, Docklands VIC 3008, Australia",
"addressLine2": null,
"postCode": "3008",
"id": 189,
"state": {
"country": 236,
"isDefault": false,
"code": "CT",
"name": "Connecticut",
"id": 7,
"isActive": true
},
"fax": null,
"email": "john@bitmascot.com"
},
"discountOnOrder": 0.0,
"additionalInfo": null,
"customerId": 6,
"handlingCost": 0.0,
"discountOnShippingTax": 0.0,
"id": 48,
"paymentStatus": "unpaid",
"handlingTax": 0.0,
"orderNo": 16,
"shippingCost": 0.0,
"discountOnOrderTotalTax": 0.0,
"created": "2023-02-01T09:38:17",
"ipAddress": "172.16.15.151",
"deliveryType": "shipping",
"version": null,
"shipments": [],
"customerName": "Irtiza",
"reminderCount": 0,
"createdBy": null,
"actualTax": 60.55,
"discountOnShipping": 0.0,
"updated": "2023-02-01T09:38:18",
"items": [
{
"actualDiscount": 0.0,
"quantity": 1,
"productId": 495,
"productVariationId": null,
"actualPrice": 666.0,
"shippingClassName": null,
"taxDiscount": 0.0,
"isTaxable": true,
"discount": 0.0,
"tax": 60.55,
"storeId": null,
"version": null,
"shippingClassId": null,
"productName": "API Product",
"price": 605.45,
"variations": null,
"id": 48,
"productType": "product",
"isShippable": true
}
],
"orderSummary": {
"subTotal": "605.45",
"shippingCost": "0.00",
"shippingTax": "0.00",
"handlingCost": "0.00",
"totalSurcharge": "0.00",
"totalDiscount": "0.00",
"totalTax": "60.55",
"grandTotal": "666.00",
"paid": "0.00",
"due": "666.00"
}
},
"paymentData": {}
}
Change Order Status
Responsible for changing order status. An example is given below:
curl --location 'http://yourapp.com/external/app/access/change-order-Status' \
--header 'uuid: F8A3-A88E-C6EF-B1CB' \
--header 'accessToken: 11b4ec017714ef095b8e115545467fcb' \
--header 'Content-Type: application/json' \
--data '{
"id": "48",
"status": "completed"
}'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'http://yourapp.com/external/app/access/change-order-Status',
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 =>'{
"id": "48",
"status": "completed"
}',
CURLOPT_HTTPHEADER => array(
'uuid: F8A3-A88E-C6EF-B1CB',
'accessToken: 11b4ec017714ef095b8e115545467fcb',
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import http.client
import json
conn = http.client.HTTPSConnection("yourapp.com")
payload = json.dumps({
"id": "48",
"status": "completed"
})
headers = {
'uuid': 'F8A3-A88E-C6EF-B1CB',
'accessToken': '11b4ec017714ef095b8e115545467fcb',
'Content-Type': 'application/json'
}
conn.request("POST", "/external/app/access/change-order-Status", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
Unirest.setTimeouts(0, 0);
HttpResponse<String> response = Unirest.post("http://yourapp.com/external/app/access/change-order-Status")
.header("uuid", "F8A3-A88E-C6EF-B1CB")
.header("accessToken", "11b4ec017714ef095b8e115545467fcb")
.header("Content-Type", "application/json")
.body("{\r\n \"id\": \"48\",\r\n \"status\": \"completed\"\r\n}")
.asString();
var options = new RestClientOptions("")
{
MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("http://yourapp.com/external/app/access/change-order-Status", Method.Post);
request.AddHeader("uuid", "F8A3-A88E-C6EF-B1CB");
request.AddHeader("accessToken", "11b4ec017714ef095b8e115545467fcb");
request.AddHeader("Content-Type", "application/json");
var body = @"{
" + "\n" +
@" ""id"": ""48"",
" + "\n" +
@" ""status"": ""completed""
" + "\n" +
@"}";
request.AddStringBody(body, DataFormat.Json);
RestResponse response = await client.ExecuteAsync(request);
Console.WriteLine(response.Content);
Request Details
- Request URL:
http://yourapp.com/external/app/access/change-order-Status
- Request type:
POST
Request Parameter
{
"id": "48",
"status": "completed"
}
OR
{
"id": "48",
"status": "cancelled"
}
Response
{ "status": "success" }
Order Comment Add
Responsible for adding comments in order. An example is given below:
curl --location 'http://yourapp.com/external/app/access/order-comment-add' \
--header 'uuid: F8A3-A88E-C6EF-B1CB' \
--header 'accessToken: 11b4ec017714ef095b8e115545467fcb' \
--header 'Content-Type: application/json' \
--data '{
"orderId": "22",
"message": "quick deliver"
}'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'http://yourapp.com/external/app/access/order-comment-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 =>'{
"orderId": "22",
"message": "quick deliver"
}',
CURLOPT_HTTPHEADER => array(
'uuid: F8A3-A88E-C6EF-B1CB',
'accessToken: 11b4ec017714ef095b8e115545467fcb',
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import http.client
import json
conn = http.client.HTTPSConnection("yourapp.com")
payload = json.dumps({
"orderId": "22",
"message": "quick deliver"
})
headers = {
'uuid': 'F8A3-A88E-C6EF-B1CB',
'accessToken': '11b4ec017714ef095b8e115545467fcb',
'Content-Type': 'application/json'
}
conn.request("POST", "/external/app/access/order-comment-add", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
Unirest.setTimeouts(0, 0);
HttpResponse<String> response = Unirest.post("http://yourapp.com/external/app/access/order-comment-add")
.header("uuid", "F8A3-A88E-C6EF-B1CB")
.header("accessToken", "11b4ec017714ef095b8e115545467fcb")
.header("Content-Type", "application/json")
.body("{\r\n \"orderId\": \"22\",\r\n \"message\": \"quick deliver\"\r\n}")
.asString();
var options = new RestClientOptions("")
{
MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("http://yourapp.com/external/app/access/order-comment-add", Method.Post);
request.AddHeader("uuid", "F8A3-A88E-C6EF-B1CB");
request.AddHeader("accessToken", "11b4ec017714ef095b8e115545467fcb");
request.AddHeader("Content-Type", "application/json");
var body = @"{
" + "\n" +
@" ""orderId"": ""22"",
" + "\n" +
@" ""message"": ""quick deliver""
" + "\n" +
@"}";
request.AddStringBody(body, DataFormat.Json);
RestResponse response = await client.ExecuteAsync(request);
Console.WriteLine(response.Content);
Request Details
- Request URL:
http://yourapp.com/external/app/access/order-comment-add
- Request type:
POST
Request Parameter
{
"orderId": "22",
"message": "quick deliver"
}
Response
{ "status": "success", "id": 6 }
Order Payment Refund
Responsible for refunding an order payment. An example is given below:
curl --location 'http://yourapp.com/external/app/access/order-payment-refund' \
--header 'uuid: F8A3-A88E-C6EF-B1CB' \
--header 'accessToken: 11b4ec017714ef095b8e115545467fcb' \
--header 'Content-Type: application/json' \
--data '{
"id": "66",
"amount": "66"
}'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'http://yourapp.com/external/app/access/order-payment-refund',
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 =>'{
"id": "66",
"amount": "66"
}',
CURLOPT_HTTPHEADER => array(
'uuid: F8A3-A88E-C6EF-B1CB',
'accessToken: 11b4ec017714ef095b8e115545467fcb',
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import http.client
import json
conn = http.client.HTTPSConnection("yourapp.com")
payload = json.dumps({
"id": "66",
"amount": "66"
})
headers = {
'uuid': 'F8A3-A88E-C6EF-B1CB',
'accessToken': '11b4ec017714ef095b8e115545467fcb',
'Content-Type': 'application/json'
}
conn.request("POST", "/external/app/access/order-payment-refund", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
Unirest.setTimeouts(0, 0);
HttpResponse<String> response = Unirest.post("http://yourapp.com/external/app/access/order-payment-refund")
.header("uuid", "F8A3-A88E-C6EF-B1CB")
.header("accessToken", "11b4ec017714ef095b8e115545467fcb")
.header("Content-Type", "application/json")
.body("{\r\n \"id\": \"66\",\r\n \"amount\": \"66\"\r\n}")
.asString();
var options = new RestClientOptions("")
{
MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("http://yourapp.com/external/app/access/order-payment-refund", Method.Post);
request.AddHeader("uuid", "F8A3-A88E-C6EF-B1CB");
request.AddHeader("accessToken", "11b4ec017714ef095b8e115545467fcb");
request.AddHeader("Content-Type", "application/json");
var body = @"{
" + "\n" +
@" ""id"": ""66"",
" + "\n" +
@" ""amount"": ""66""
" + "\n" +
@"}";
request.AddStringBody(body, DataFormat.Json);
RestResponse response = await client.ExecuteAsync(request);
Console.WriteLine(response.Content);
Request Details
- Request URL:
http://yourapp.com/external/app/access/order-payment-refund
- Request type:
POST
Request Parameter
{
"id": "66",
"amount": "66"
}
Response
{ "status": "success", "haveToReAdjustInvetory": false, "id": 66 }
Change Order Payment Status
Responsible for changing order payment status. An example is given below:
curl --location 'http://yourapp.com/external/app/access/change-order-payment-status' \
--header 'uuid: F8A3-A88E-C6EF-B1CB' \
--header 'accessToken: 11b4ec017714ef095b8e115545467fcb' \
--header 'Content-Type: application/json' \
--data '{
"id": "48",
"status": "completed"
}'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'http://yourapp.com/external/app/access/change-order-payment-status',
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 =>'{
"id": "48",
"status": "completed"
}',
CURLOPT_HTTPHEADER => array(
'uuid: F8A3-A88E-C6EF-B1CB',
'accessToken: 11b4ec017714ef095b8e115545467fcb',
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import http.client
import json
conn = http.client.HTTPSConnection("yourapp.com")
payload = json.dumps({
"id": "48",
"status": "completed"
})
headers = {
'uuid': 'F8A3-A88E-C6EF-B1CB',
'accessToken': '11b4ec017714ef095b8e115545467fcb',
'Content-Type': 'application/json'
}
conn.request("POST", "/external/app/access/change-order-payment-status", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
Unirest.setTimeouts(0, 0);
HttpResponse<String> response = Unirest.post("http://yourapp.com/external/app/access/change-order-payment-status")
.header("uuid", "F8A3-A88E-C6EF-B1CB")
.header("accessToken", "11b4ec017714ef095b8e115545467fcb")
.header("Content-Type", "application/json")
.body("{\r\n \"id\": \"48\",\r\n \"status\": \"completed\"\r\n}")
.asString();
var options = new RestClientOptions("")
{
MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("http://yourapp.com/external/app/access/change-order-payment-status", Method.Post);
request.AddHeader("uuid", "F8A3-A88E-C6EF-B1CB");
request.AddHeader("accessToken", "11b4ec017714ef095b8e115545467fcb");
request.AddHeader("Content-Type", "application/json");
var body = @"{
" + "\n" +
@" ""id"": ""48"",
" + "\n" +
@" ""status"": ""completed""
" + "\n" +
@"}";
request.AddStringBody(body, DataFormat.Json);
RestResponse response = await client.ExecuteAsync(request);
Console.WriteLine(response.Content);
Request Details
- Request URL:
http://yourapp.com/external/app/access/change-order-payment-status
- Request type:
POST
Request Parameter
{ "id": "48", "status": "completed" } OR { "id": "48", "status": "cancelled" }
Response
{ "status": "success" }
Make Order Payment
Responsible for making payment for an order. An example is given below:
curl --location 'http://yourapp.com/external/app/access/make-order-payment' \
--header 'uuid: F8A3-A88E-C6EF-B1CB' \
--header 'accessToken: 11b4ec017714ef095b8e115545467fcb' \
--header 'Content-Type: application/json' \
--data '{
"orderId": "48",
"paymentGateway": "PIS",
"date": "2023-02-01 20:38:17",
"amount": "666",
"isNotify": "false"
}'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'http://yourapp.com/external/app/access/change-order-payment-status',
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 =>'{
"id": "48",
"status": "completed"
}',
CURLOPT_HTTPHEADER => array(
'uuid: F8A3-A88E-C6EF-B1CB',
'accessToken: 11b4ec017714ef095b8e115545467fcb',
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import http.client
import json
conn = http.client.HTTPSConnection("yourapp.com")
payload = json.dumps({
"id": "48",
"status": "completed"
})
headers = {
'uuid': 'F8A3-A88E-C6EF-B1CB',
'accessToken': '11b4ec017714ef095b8e115545467fcb',
'Content-Type': 'application/json'
}
conn.request("POST", "/external/app/access/change-order-payment-status", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
Unirest.setTimeouts(0, 0);
HttpResponse<String> response = Unirest.post("http://yourapp.com/external/app/access/change-order-payment-status")
.header("uuid", "F8A3-A88E-C6EF-B1CB")
.header("accessToken", "11b4ec017714ef095b8e115545467fcb")
.header("Content-Type", "application/json")
.body("{\r\n \"id\": \"48\",\r\n \"status\": \"completed\"\r\n}")
.asString();
var options = new RestClientOptions("")
{
MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("http://yourapp.com/external/app/access/change-order-payment-status", Method.Post);
request.AddHeader("uuid", "F8A3-A88E-C6EF-B1CB");
request.AddHeader("accessToken", "11b4ec017714ef095b8e115545467fcb");
request.AddHeader("Content-Type", "application/json");
var body = @"{
" + "\n" +
@" ""id"": ""48"",
" + "\n" +
@" ""status"": ""completed""
" + "\n" +
@"}";
request.AddStringBody(body, DataFormat.Json);
RestResponse response = await client.ExecuteAsync(request);
Console.WriteLine(response.Content);
Request Details
- Request URL:
http://yourapp.com/external/app/access/make-order-payment
- Request type:
POST
Request Parameter
{
"orderId": "48",
"paymentGateway": "PIS",
"date": "2023-02-01 20:38:17",
"amount": "666",
"isNotify": "false"
}
Response
{ "status": "success", "id": 66 }
Payment Gateways
Returns the list of available payment gateways. An example is given below:
curl --location 'http://yourapp.com/external/app/access/payment-gateways?max=-1&offset=0' \
--header 'uuid: F8A3-A88E-C6EF-B1CB' \
--header 'accessToken: 11b4ec017714ef095b8e115545467fcb'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'http://yourapp.com/external/app/access/payment-gateways?max=-1&offset=0',
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(
'uuid: F8A3-A88E-C6EF-B1CB',
'accessToken: 11b4ec017714ef095b8e115545467fcb'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import http.client
conn = http.client.HTTPSConnection("yourapp.com")
payload = ''
headers = {
'uuid': 'F8A3-A88E-C6EF-B1CB',
'accessToken': '11b4ec017714ef095b8e115545467fcb'
}
conn.request("GET", "/external/app/access/payment-gateways?max=-1&offset=0", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
Unirest.setTimeouts(0, 0);
HttpResponse<String> response = Unirest.get("http://yourapp.com/external/app/access/payment-gateways?max=-1&offset=0")
.header("uuid", "F8A3-A88E-C6EF-B1CB")
.header("accessToken", "11b4ec017714ef095b8e115545467fcb")
.asString();
var options = new RestClientOptions("")
{
MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("http://yourapp.com/external/app/access/payment-gateways?max=-1&offset=0", Method.Get);
request.AddHeader("uuid", "F8A3-A88E-C6EF-B1CB");
request.AddHeader("accessToken", "11b4ec017714ef095b8e115545467fcb");
RestResponse response = await client.ExecuteAsync(request);
Console.WriteLine(response.Content);
Request Details
- Request URL:
http://yourapp.com/external/app/access/payment-gateways
- Request type:
GET
Request Parameter
"max": "-1",
"offset": "0"
Response
{
"status": "success",
"total": 9,
"max": "1",
"offset": "0",
"paymentGatewayList": [
{
"isPromotional": false,
"code": "PIS",
"flatSurcharge": 0.0,
"successMessage": null,
"version": null,
"isDefault": false,
"availableToCustomers": [],
"isSurChargeApplicable": false,
"surchargeType": "no_surcharge",
"availableToCustomerGroups": [],
"zone": null,
"percentSurcharge": 0.0,
"availableFor": "everyone",
"isEnabled": true,
"name":"Pay In Store",
"pendingMessage": null,
"information": null,
"id": 1,
"updated": "2023-05-10T07:11:01",
"surchargeRange": []
}
]
}
Update Payment Gateway
Responsible for updating payment gateway configurations. An example is given below:
curl --location 'http://yourapp.com/external/app/access/update-payment-gateway' \
--header 'uuid: F8A3-A88E-C6EF-B1CB' \
--header 'accessToken: 11b4ec017714ef095b8e115545467fcb' \
--header 'Content-Type: application/json' \
--data '{
"id": 8,
"isEnabled": "true",
"isDefault": "true",
"isUnionPay": "true",
"metafield.CRD.creditCardProcessor": "SECUREPAY_OAUTH2",
"isUnionPay": "true",
"metafield.SECUREPAY_OAUTH2.type": "merchant",
"metafield.SECUREPAY_OAUTH2.mode": "test",
"metafield.SECUREPAY_OAUTH2.merchantCode": "5AR0055",
"metafield.SECUREPAY_OAUTH2.client_Id": "0oaxb9i8P9vQdXTsn3l5",
"metafield.SECUREPAY_OAUTH2.client_secret": "0aBsGU3x1bc-UIF_vDBA2JzjpCPHjoCP7oI6jisp",
"metafield.CRD.cardType": "creditCard",
"metafield.CRD.creditCards": "visa",
"metafield.CRD.creditCards": "master",
"availableFor": "everyone",
"surchargeType": "no_surcharge",
"flatSurcharge": 0.0,
"percentSurcharge": 0.0,
"pendingMessage": "",
"successMessage": "<p>Charges will appear on your credit card as <strong>*WEBALIVE*</strong></p>"
}'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'http://yourapp.com/external/app/access/payment-gateways',
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 =>'{
"max": "-1",
"offset": "0"
}',
CURLOPT_HTTPHEADER => array(
'uuid: F8A3-A88E-C6EF-B1CB',
'accessToken: 11b4ec017714ef095b8e115545467fcb',
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import http.client
import json
conn = http.client.HTTPSConnection("yourapp.com")
payload = json.dumps({
"max": "-1",
"offset": "0"
})
headers = {
'uuid': 'F8A3-A88E-C6EF-B1CB',
'accessToken': '11b4ec017714ef095b8e115545467fcb',
'Content-Type': 'application/json'
}
conn.request("POST", "/external/app/access/payment-gateways", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
Unirest.setTimeouts(0, 0);
HttpResponse<String> response = Unirest.post("http://yourapp.com/external/app/access/payment-gateways")
.header("uuid", "F8A3-A88E-C6EF-B1CB")
.header("accessToken", "11b4ec017714ef095b8e115545467fcb")
.header("Content-Type", "application/json")
.body("{\r\n \"max\": \"-1\",\r\n \"offset\": \"0\"\r\n}")
.asString();
var options = new RestClientOptions("")
{
MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("http://yourapp.com/external/app/access/payment-gateways", Method.Post);
request.AddHeader("uuid", "F8A3-A88E-C6EF-B1CB");
request.AddHeader("accessToken", "11b4ec017714ef095b8e115545467fcb");
request.AddHeader("Content-Type", "application/json");
var body = @"{
" + "\n" +
@" ""max"": ""-1"",
" + "\n" +
@" ""offset"": ""0""
" + "\n" +
@"}";
request.AddStringBody(body, DataFormat.Json);
RestResponse response = await client.ExecuteAsync(request);
Console.WriteLine(response.Content);
Request Details
- Request URL:
http://yourapp.com/external/app/access/update-payment-gateway
- Request type:
POST
Request Parameter
{
"id": 8,
"isEnabled": "true",
"isDefault": "true",
"isUnionPay": "true",
"metafield.CRD.creditCardProcessor": "SECUREPAY_OAUTH2",
"isUnionPay": "true",
"metafield.SECUREPAY_OAUTH2.type": "merchant",
"metafield.SECUREPAY_OAUTH2.mode": "test",
"metafield.SECUREPAY_OAUTH2.merchantCode": "5AR0055",
"metafield.SECUREPAY_OAUTH2.client_Id": "0oaxb9i8P9vQdXTsn3l5",
"metafield.SECUREPAY_OAUTH2.client_secret": "0aBsGU3x1bc-UIF_vDBA2JzjpCPHjoCP7oI6jisp",
"metafield.CRD.cardType": "creditCard",
"metafield.CRD.creditCards": "visa",
"metafield.CRD.creditCards": "master",
"availableFor": "everyone",
"surchargeType": "no_surcharge",
"flatSurcharge": 0.0,
"percentSurcharge": 0.0,
"pendingMessage": "",
"successMessage": "<p>Charges will appear on your credit card as <strong>*WEBALIVE*</strong></p>"
}
Response
{ "status": "success" , "message": "Successfully Updated"}