• Home

Working with Products

In the context of WebCommander, “products” encompass the goods or services offered for sale on a website. This section outlines how you can effectively interact with product data in the WebCommander platform. To streamline product-related tasks, a set of APIs is provided for your use. Below is a list of product-related operations that you can perform using WebCommander’s APIs:

Get Product List

Retrieve the list of all products available. Here is an example:

  • cURL
  • PHP – cURL
  • Python – http.client
  • Java – Unirest
  • C# – RestSharp
curl --location 'http://yourapp.com/external/app/access/products?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/products?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/products?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/products?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/products?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/products
  • Request type: GET

Request Parameter

"max": "-1",
"offset": "0"

Response

{
    "status": "success",
    "total": 106,
    "max": -1,
    "offset": 0,
    "products": [
        {
            "category": null,
            "calculatedRestrictPurchaseFor": "none",
            "codeToProtect": "",
            "isAvailableOnWeekdays": false,
            "restrictPurchaseExceptCustomerGroups": [],
            "relatedProducts": [],
            "soldOutLabel": null,
            "videos": [],
            "isActive": true,
            "lowStockLevel": 0,
            "shippingProfile": null,
            "spec": null,
            "calculatedRestrictPriceExceptCustomers": [],
            "productCondition": "new",
            "availableFromDate": null,
            "restrictPriceFor": "none",
            "metaTags": [],
            "globalTradeItemNumber": null,
            "model": null,
            "productFile": null,
            "id": 239,
            "isFeatured": false,
            "sku": "PRODUCT-9911C0FB075D",
            "multipleOfOrderQuantity": 1,
            "supplierIds": [],
            "basePrice": 500.0,
            "height": 0.0,
            "images": [
                {
                    "thumbnail": "http:\u002f\u002flocalhost:1301\u002fresources\u002f00000000\u002fproduct\u002fdefault\u002f150-default.png",
                    "url": "http:\u002f\u002flocalhost:1301\u002fresources\u002f00000000\u002fproduct\u002fdefault\u002fdefault.png"
                }
            ],
            "created": "2023-05-16T06:33:31",
            "availableStock": 0,
            "weight": 0.0,
            "hidePrice": false,
            "isParentInTrash": false,
            "version": null,
            "calculatedRestrictPriceExceptCustomerGroups": [],
            "availableToCustomers": [],
            "availableToCustomerGroups": [],
            "name": "Bicycle123",
            "isSoldOut": false,
            "availableToDate": null,
            "minOrderQuantity": 1,
            "isMultipleOrderQuantity": false,
            "isVirtual": false,
            "idx": 1,
            "onSaleAmountType": "flat",
            "updated": "2023-05-16T06:33:31",
            "isRestricted": false,
            "maxOrderQuantity": null,
            "categories": [],
            "expectToPayPrice": 0.0,
            "restrictPurchaseExceptCustomers": [],
            "isAvailable": true,
            "isAvailableOnDateRange": false,
            "calculatedRestrictPurchaseExceptCustomers": [],
            "description": "description",
            "isInTrash": false,
            "isInventoryEnabled": false,
            "customSku": null,
            "heading": "Insert&nbsp;an&nbsp;A.",
            "salePrice": 0.0,
            "restrictPriceExceptCustomerGroups": [],
            "length": 0.0,
            "costPrice": 0.0,
            "isNew": false,
            "calculatedRestrictPriceFor": "none",
            "isCombinationPriceFixed": true,
            "url": "bicycle123",
            "customType": null,
            "availabilityDays": [],
            "disableGooglePageTracking": false,
            "createdBy": {
                "isInTrash": false,
                "password": "21232f297a57a5a743894a0e4a801fc3",
                "isFrontEndEditorOnly": false,
                "roles": [
                    1
                ],
                "fullName": "WebCommander&nbsp;Administrator",
                "isMatured": true,
                "id": 1,
                "isActive": true,
                "isAPIAccessOnly": false,
                "uuid": "0EEF3E2B-3A93-4B77-BD80-3459A5950720",
                "email": "testingsalt-03\u0040yopmail.com"
            },
            "availableFor": "everyone",
            "taxProfile": null,
            "restrictPurchaseFor": "none",
            "width": 0.0,
            "isCombined": false,
            "featuredLabel": null,
            "isExpectToPay": false,
            "customTypes": [],
            "calculatedRestrictPurchaseExceptCustomerGroups": [],
            "productExtInfo": {
                "actualBasePrice": 454.55,
                "isOnSale": false,
                "basePrice": 454.55,
                "salePrice": 0.0,
                "previousPriceToDisplay": null,
                "expectToPayPriceWithTax": 500.0045454546,
                "actualPriceToDisplay": 500.0,
                "tax": 45.45,
                "taxMessage": null,
                "minOrderQuantity": 1,
                "maxOrderQuantity": null
            }
        }
    ]
}

Create Product

Responsible for creating a new product. Here is an example:

  • cURL
  • PHP – cURL
  • Python – http.client
  • Java – Unirest
  • C# – RestSharp
curl --location 'http://yourapp.com/external/app/access/create-product' \
--header 'uuid: F8A3-A88E-C6EF-B1CB' \
--header 'accessToken: 11b4ec017714ef095b8e115545467fcb' \
--header 'Content-Type: application/json' \
--data '{
    "name": "T-Shirt1",
    "sku": "PRODUCT-E607CEF8B5F01",
    "isCombined": "false",
    "heading": "Insert an Additional heading for your product page.",
    "productType": "physical",
    "isAvailable": "true",
    "availableFor": "everyone",
    "isRestricted": "false",
    "isCodeProtected": "false",
    "basePrice": 100,
    "costPrice": 50,
    "active": "true",
    "summary": "Put a short one or two line of your product to briefly explain what it is about.",
    "description": "<p><i>Put a detailed description of your product. You can insert a link, table, image, video or other cool stuff in here.</i></p>"
}'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'http://yourapp.com/external/app/access/create-product',
  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": "T-Shirt1",
    "sku": "PRODUCT-E607CEF8B5F01",
    "isCombined": "false",
    "heading": "Insert an Additional heading for your product page.",
    "productType": "physical",
    "isAvailable": "true",
    "availableFor": "everyone",
    "isRestricted": "false",
    "isCodeProtected": "false",
    "basePrice": 100,
    "costPrice": 50,
    "active": "true",
    "summary": "Put a short one or two line of your product to briefly explain what it is about.",
    "description": "<p><i>Put a detailed description of your product. You can insert a link, table, image, video or other cool stuff in here.</i></p>"
}',
  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({
  "name": "T-Shirt1",
  "sku": "PRODUCT-E607CEF8B5F01",
  "isCombined": "false",
  "heading": "Insert an Additional heading for your product page.",
  "productType": "physical",
  "isAvailable": "true",
  "availableFor": "everyone",
  "isRestricted": "false",
  "isCodeProtected": "false",
  "basePrice": 100,
  "costPrice": 50,
  "active": "true",
  "summary": "Put a short one or two line of your product to briefly explain what it is about.",
  "description": "<p><i>Put a detailed description of your product. You can insert a link, table, image, video or other cool stuff in here.</i></p>"
})
headers = {
  'uuid': 'F8A3-A88E-C6EF-B1CB',
  'accessToken': '11b4ec017714ef095b8e115545467fcb',
  'Content-Type': 'application/json'
}
conn.request("POST", "/external/app/access/create-product", 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/create-product")
  .header("uuid", "F8A3-A88E-C6EF-B1CB")
  .header("accessToken", "11b4ec017714ef095b8e115545467fcb")
  .header("Content-Type", "application/json")
  .body("{\r\n    \"name\": \"T-Shirt1\",\r\n    \"sku\": \"PRODUCT-E607CEF8B5F01\",\r\n    \"isCombined\": \"false\",\r\n    \"heading\": \"Insert an Additional heading for your product page.\",\r\n    \"productType\": \"physical\",\r\n    \"isAvailable\": \"true\",\r\n    \"availableFor\": \"everyone\",\r\n    \"isRestricted\": \"false\",\r\n    \"isCodeProtected\": \"false\",\r\n    \"basePrice\": 100,\r\n    \"costPrice\": 50,\r\n    \"active\": \"true\",\r\n    \"summary\": \"Put a short one or two line of your product to briefly explain what it is about.\",\r\n    \"description\": \"<p><i>Put a detailed description of your product. You can insert a link, table, image, video or other cool stuff in here.</i></p>\"\r\n}")
  .asString();
var options = new RestClientOptions("")
{
  MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("http://yourapp.com/external/app/access/create-product", Method.Post);
request.AddHeader("uuid", "F8A3-A88E-C6EF-B1CB");
request.AddHeader("accessToken", "11b4ec017714ef095b8e115545467fcb");
request.AddHeader("Content-Type", "application/json");
var body = @"{
" + "\n" +
@"    ""name"": ""T-Shirt1"",
" + "\n" +
@"    ""sku"": ""PRODUCT-E607CEF8B5F01"",
" + "\n" +
@"    ""isCombined"": ""false"",
" + "\n" +
@"    ""heading"": ""Insert an Additional heading for your product page."",
" + "\n" +
@"    ""productType"": ""physical"",
" + "\n" +
@"    ""isAvailable"": ""true"",
" + "\n" +
@"    ""availableFor"": ""everyone"",
" + "\n" +
@"    ""isRestricted"": ""false"",
" + "\n" +
@"    ""isCodeProtected"": ""false"",
" + "\n" +
@"    ""basePrice"": 100,
" + "\n" +
@"    ""costPrice"": 50,
" + "\n" +
@"    ""active"": ""true"",
" + "\n" +
@"    ""summary"": ""Put a short one or two line of your product to briefly explain what it is about."",
" + "\n" +
@"    ""description"": ""<p><i>Put a detailed description of your product. You can insert a link, table, image, video or other cool stuff in here.</i></p>""
" + "\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/create-product
  • Request type: POST

Request Parameter

{
    "name": "T-Shirt1",
    "sku": "PRODUCT-E607CEF8B5F01",
    "isCombined": "false",
    "heading": "Insert an Additional heading for your product page.",
    "productType": "physical",
    "isAvailable": "true",
    "availableFor": "everyone",
    "isRestricted": "false",
    "isCodeProtected": "false",
    "basePrice": 100,
    "costPrice": 50,
    "active": "true",
    "summary": "Put a short one or two line of your product to briefly explain what it is about.",
    "description": "<p><i>Put a detailed description of your product. You can insert a link, table, image, video or other cool stuff in here.</i></p>"
}

Response

{
    "status": "success",
    "product": {
        "category": null,
        "calculatedRestrictPurchaseFor": "none",
        "codeToProtect": null,
        "isAvailableOnWeekdays": false,
        "restrictPurchaseExceptCustomerGroups": [],
        "relatedProducts": [],
        "soldOutLabel": null,
        "videos": [],
        "isActive": true,
        "lowStockLevel": 0,
        "shippingProfile": null,
        "spec": null,
        "calculatedRestrictPriceExceptCustomers": [],
        "productCondition": "new",
        "availableFromDate": null,
        "restrictPriceFor": "none",
        "metaTags": [],
        "globalTradeItemNumber": null,
        "model": null,
        "productFile": null,
        "id": 241,
        "isFeatured": false,
        "sku": "PRODUCT-E607CEF8B5F01",
        "multipleOfOrderQuantity": 1,
        "supplierIds": [],
        "basePrice": 100.0,
        "height": 0.0,
        "images": [
            {
                "thumbnail": "http:\u002f\u002flocalhost:1301\u002fresources\u002f00000000\u002fproduct\u002fdefault\u002f150-default.png",
                "url": "http:\u002f\u002flocalhost:1301\u002fresources\u002f00000000\u002fproduct\u002fdefault\u002fdefault.png"
            }
        ],
        "created": "2023-05-18T10:37:49",
        "availableStock": 0,
        "weight": 0.0,
        "hidePrice": false,
        "isParentInTrash": false,
        "version": null,
        "calculatedRestrictPriceExceptCustomerGroups": [],
        "availableToCustomers": [],
        "availableToCustomerGroups": [],
        "name": "T-Shirt1",
        "isSoldOut": false,
        "availableToDate": null,
        "minOrderQuantity": 1,
        "isMultipleOrderQuantity": false,
        "isVirtual": false,
        "idx": 1,
        "onSaleAmountType": "flat",
        "updated": "2023-05-18T10:37:49",
        "isRestricted": false,
        "maxOrderQuantity": null,
        "categories": [],
        "expectToPayPrice": 0.0,
        "restrictPurchaseExceptCustomers": [],
        "isAvailable": true,
        "isAvailableOnDateRange": false,
        "calculatedRestrictPurchaseExceptCustomers": [],
        "description": "description",
        "title": null,
        "isCallForPriceEnabled": false,
        "isCombinationQuantityFlexible": false,
        "isDisposable": false,
        "restrictPriceExceptCustomers": [],
        "isCodeProtected": false,
        "isOnSale": false,
        "seoConfigs": [],
        "availableDays": [],
        "productType": "physical",
        "summary": "Put",
        "isInTrash": false,
        "isInventoryEnabled": false,
        "customSku": null,
        "heading": "Insert an Add.",
        "salePrice": 0.0,
        "restrictPriceExceptCustomerGroups": [],
        "length": 0.0,
        "costPrice": 50.0,
        "isNew": false,
        "calculatedRestrictPriceFor": "none",
        "isCombinationPriceFixed": true,
        "url": "t-shirt1",
        "customType": null,
        "availabilityDays": null,
        "disableGooglePageTracking": false,
        "createdBy": null,
        "availableFor": "everyone",
        "taxProfile": null,
        "restrictPurchaseFor": "none",
        "width": 0.0,
        "isCombined": false,
        "featuredLabel": null,
        "isExpectToPay": false,
        "customTypes": [],
        "calculatedRestrictPurchaseExceptCustomerGroups": [],
        "productExtInfo": {
            "actualBasePrice": 90.91,
            "isOnSale": false,
            "basePrice": 90.91,
            "salePrice": 0.0,
            "previousPriceToDisplay": null,
            "expectToPayPriceWithTax": 100.0009090909,
            "actualPriceToDisplay": 100.0,
            "tax": 9.09,
            "taxMessage": null,
            "minOrderQuantity": 1,
            "maxOrderQuantity": null
        }
    }
}

Get Single Product

Retrieve the details of a specific product. Here is an example:

  • cURL
  • PHP – cURL
  • Python – http.client
  • Java – Unirest
  • C# – RestSharp
curl --location 'http://yourapp.com/external/app/access/product?id=56789345' \
--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/product?id=56789345',
  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/product?id=56789345", 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/product?id=56789345")
  .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/product?id=56789345", 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/product
  • Request type: GET

Request Parameter

"id": 56789345

Response

{
    "status": "success",
    "product": {
        "category": null,
        "calculatedRestrictPurchaseFor": "none",
        "codeToProtect": null,
        "isAvailableOnWeekdays": false,
        "restrictPurchaseExceptCustomerGroups": [],
        "relatedProducts": [],
        "soldOutLabel": null,
        "videos": [],
        "isActive": true,
        "lowStockLevel": 0,
        "shippingProfile": null,
        "spec": null,
        "calculatedRestrictPriceExceptCustomers": [],
        "productCondition": "new",
        "availableFromDate": null,
        "restrictPriceFor": "none",
        "metaTags": [],
        "globalTradeItemNumber": null,
        "model": null,
        "productFile": null,
        "id": 241,
        "isFeatured": false,
        "sku": "PRODUCT-E607CEF8B5F01",
        "multipleOfOrderQuantity": 1,
        "supplierIds": [],
        "basePrice": 100.0,
        "height": 0.0,
        "images": [
            {
                "thumbnail": "http:\u002f\u002flocalhost:1301\u002fresources\u002f00000000\u002fproduct\u002fdefault\u002f150-default.png",
                "url": "http:\u002f\u002flocalhost:1301\u002fresources\u002f00000000\u002fproduct\u002fdefault\u002fdefault.png"
            }
        ],
        "created": "2023-05-18T10:37:49",
        "availableStock": 0,
        "weight": 0.0,
        "hidePrice": false,
        "isParentInTrash": false,
        "version": null,
        "calculatedRestrictPriceExceptCustomerGroups": [],
        "availableToCustomers": [],
        "availableToCustomerGroups": [],
        "name": "T-Shirt1",
        "isSoldOut": false,
        "availableToDate": null,
        "minOrderQuantity": 1,
        "isMultipleOrderQuantity": false,
        "isVirtual": false,
        "idx": 1,
        "onSaleAmountType": "flat",
        "updated": "2023-05-18T10:37:49",
        "isRestricted": false,
        "maxOrderQuantity": null,
        "categories": [],
        "expectToPayPrice": 0.0,
        "restrictPurchaseExceptCustomers": [],
        "isAvailable": true,
        "isAvailableOnDateRange": false,
        "calculatedRestrictPurchaseExceptCustomers": [],
        "description": "description",
        "title": null,
        "isCallForPriceEnabled": false,
        "isCombinationQuantityFlexible": false,
        "isDisposable": false,
        "restrictPriceExceptCustomers": [],
        "isCodeProtected": false,
        "isOnSale": false,
        "seoConfigs": [],
        "availableDays": [],
        "productType": "physical",
        "summary": "Put",
        "isInTrash": false,
        "isInventoryEnabled": false,
        "customSku": null,
        "heading": "Insert&nbsp;an&nbsp;Add.",
        "salePrice": 0.0,
        "restrictPriceExceptCustomerGroups": [],
        "length": 0.0,
        "costPrice": 50.0,
        "isNew": false,
        "calculatedRestrictPriceFor": "none",
        "isCombinationPriceFixed": true,
        "url": "t-shirt1",
        "customType": null,
        "availabilityDays": null,
        "disableGooglePageTracking": false,
        "createdBy": null,
        "availableFor": "everyone",
        "taxProfile": null,
        "restrictPurchaseFor": "none",
        "width": 0.0,
        "isCombined": false,
        "featuredLabel": null,
        "isExpectToPay": false,
        "customTypes": [],
        "calculatedRestrictPurchaseExceptCustomerGroups": [],
        "productExtInfo": {
            "actualBasePrice": 90.91,
            "isOnSale": false,
            "basePrice": 90.91,
            "salePrice": 0.0,
            "previousPriceToDisplay": null,
            "expectToPayPriceWithTax": 100.0009090909,
            "actualPriceToDisplay": 100.0,
            "tax": 9.09,
            "taxMessage": null,
            "minOrderQuantity": 1,
            "maxOrderQuantity": null
        }
    }
}

Update Product

Responsible for updating an existing product. Here is an example:

  • cURL
  • PHP – cURL
  • Python – http.client
  • Java – Unirest
  • C# – RestSharp
curl --location 'http://yourapp.com/external/app/access/update-product' \
--header 'uuid: F8A3-A88E-C6EF-B1CB' \
--header 'accessToken: 11b4ec017714ef095b8e115545467fcb' \
--header 'Content-Type: application/json' \
--data '{
    "id": 241,
    "fields": {
        "name": "Cycle",
        "description": "Amazing cycle"
    }
}'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'http://yourapp.com/external/app/access/update-product',
  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": 241,
    "fields": {
        "name": "Cycle",
        "description": "Amazing cycle"
    }
}',
  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": 241,
  "fields": {
    "name": "Cycle",
    "description": "Amazing cycle"
  }
})
headers = {
  'uuid': 'F8A3-A88E-C6EF-B1CB',
  'accessToken': '11b4ec017714ef095b8e115545467fcb',
  'Content-Type': 'application/json'
}
conn.request("POST", "/external/app/access/update-product", 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/update-product")
  .header("uuid", "F8A3-A88E-C6EF-B1CB")
  .header("accessToken", "11b4ec017714ef095b8e115545467fcb")
  .header("Content-Type", "application/json")
  .body("{\r\n    \"id\": 241,\r\n    \"fields\": {\r\n        \"name\": \"Cycle\",\r\n        \"description\": \"Amazing cycle\"\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/update-product", Method.Post);
request.AddHeader("uuid", "F8A3-A88E-C6EF-B1CB");
request.AddHeader("accessToken", "11b4ec017714ef095b8e115545467fcb");
request.AddHeader("Content-Type", "application/json");
var body = @"{
" + "\n" +
@"    ""id"": 241,
" + "\n" +
@"    ""fields"": {
" + "\n" +
@"        ""name"": ""Cycle"",
" + "\n" +
@"        ""description"": ""Amazing cycle""
" + "\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/update-product
  • Request type: POST

Request Parameter

// You may update any field from product object. Check response for all available fields.
{
    "id": 241,
    "fields": {
        "name": "Cycle",
        "description": "Amazing cycle"
    }
}

Response

{
    "status": "success",
    "product": {
        "category": null,
        "calculatedRestrictPurchaseFor": "none",
        "codeToProtect": null,
        "restrictPurchaseExceptCustomerGroups": [],
        "relatedProducts": [],
        "soldOutLabel": null,
        "videos": [],
        "isActive": true,
        "lowStockLevel": 0,
        "shippingProfile": null,
        "spec": null,
        "calculatedRestrictPriceExceptCustomers": [],
        "productCondition": "new",
        "availableFromDate": null,
        "restrictPriceFor": "none",
        "metaTags": [],
        "globalTradeItemNumber": null,
        "model": null,
        "productFile": null,
        "id": 241,
        "isFeatured": false,
        "sku": "PRODUCT-E607CEF8B5F01",
        "multipleOfOrderQuantity": 1,
        "supplierIds": [],
        "basePrice": 100.0,
        "height": 0.0,
        "images": [
            {
                "thumbnail": "http:\u002f\u002flocalhost:1301\u002fresources\u002f00000000\u002fproduct\u002fdefault\u002f150-default.png",
                "url": "http:\u002f\u002flocalhost:1301\u002fresources\u002f00000000\u002fproduct\u002fdefault\u002fdefault.png"
            }
        ],
        "created": "2023-05-18T10:37:49",
        "availableStock": 0,
        "weight": 0.0,
        "hidePrice": false,
        "isParentInTrash": false,
        "version": null,
        "calculatedRestrictPriceExceptCustomerGroups": [],
        "availableToCustomers": [],
        "availableToCustomerGroups": [],
        "name": "T-Shirt1",
        "isSoldOut": false,
        "availableToDate": null,
        "minOrderQuantity": 1,
        "isMultipleOrderQuantity": false,
        "isVirtual": false,
        "idx": 1,
        "onSaleAmountType": "flat",
        "updated": "2023-05-18T10:37:49",
        "isRestricted": false,
        "maxOrderQuantity": null,
        "categories": [],
        "expectToPayPrice": 0.0,
        "restrictPurchaseExceptCustomers": [],
        "isAvailable": true,
        "isAvailableOnDateRange": false,
        "calculatedRestrictPurchaseExceptCustomers": [],
        "description": "description",
        "title": null,
        "isCallForPriceEnabled": false,
        "isCombinationQuantityFlexible": false,
        "isDisposable": false,
        "restrictPriceExceptCustomers": [],
        "isCodeProtected": false,
        "isOnSale": false,
        "seoConfigs": [],
        "availableDays": [],
        "productType": "physical",
        "summary": "Put",
        "isInTrash": false,
        "isInventoryEnabled": false,
        "customSku": null,
        "heading": "Insert&nbsp;an&nbsp;Add.",
        "salePrice": 0.0,
        "restrictPriceExceptCustomerGroups": [],
        "length": 0.0,
        "costPrice": 50.0,
        "isNew": false,
        "calculatedRestrictPriceFor": "none",
        "isCombinationPriceFixed": true,
        "url": "t-shirt1",
        "customType": null,
        "availabilityDays": null,
        "disableGooglePageTracking": false,
        "createdBy": null,
        "availableFor": "everyone",
        "taxProfile": null,
        "restrictPurchaseFor": "none",
        "width": 0.0,
        "isCombined": false,
        "featuredLabel": null,
        "isExpectToPay": false,
        "customTypes": [],
        "calculatedRestrictPurchaseExceptCustomerGroups": [],
        "productExtInfo": {
            "actualBasePrice": 90.91,
            "isOnSale": false,
            "basePrice": 90.91,
            "salePrice": 0.0,
            "previousPriceToDisplay": null,
            "expectToPayPriceWithTax": 100.0009090909,
            "actualPriceToDisplay": 100.0,
            "tax": 9.09,
            "taxMessage": null,
            "minOrderQuantity": 1,
            "maxOrderQuantity": null
        }
    }
}

Delete Product

Responsible for deleting a product. Here is an example:

  • cURL
  • PHP – cURL
  • Python – http.client
  • Java – Unirest
  • C# – RestSharp
curl --location --request DELETE 'http://yourapp.com/external/app/access/delete-product' \
--header 'uuid: F8A3-A88E-C6EF-B1CB' \
--header 'accessToken: 11b4ec017714ef095b8e115545467fcb' \
--header 'Content-Type: application/json' \
--data '{
    "id": 241
}'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'http://yourapp.com/external/app/access/delete-product',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'DELETE',
  CURLOPT_POSTFIELDS =>'{
    "id": 241
}',
  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": 241
})
headers = {
  'uuid': 'F8A3-A88E-C6EF-B1CB',
  'accessToken': '11b4ec017714ef095b8e115545467fcb',
  'Content-Type': 'application/json'
}
conn.request("DELETE", "/external/app/access/delete-product", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
Unirest.setTimeouts(0, 0);
HttpResponse<String> response = Unirest.delete("http://yourapp.com/external/app/access/delete-product")
  .header("uuid", "F8A3-A88E-C6EF-B1CB")
  .header("accessToken", "11b4ec017714ef095b8e115545467fcb")
  .header("Content-Type", "application/json")
  .body("{\r\n    \"id\": 241\r\n}")
  .asString();
var options = new RestClientOptions("")
{
  MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("http://yourapp.com/external/app/access/delete-product", Method.Delete);
request.AddHeader("uuid", "F8A3-A88E-C6EF-B1CB");
request.AddHeader("accessToken", "11b4ec017714ef095b8e115545467fcb");
request.AddHeader("Content-Type", "application/json");
var body = @"{
" + "\n" +
@"    ""id"": 241
" + "\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/delete-product
  • Request type: DELETE

Request Parameter

{
    "id": 241
}

Product Stock Update

Responsible for updating the quantity of a product. Here is an example:

  • cURL
  • PHP – cURL
  • Python – http.client
  • Java – Unirest
  • C# – RestSharp
curl --location 'http://yourapp.com/external/app/access/product-stock-update' \
--header 'uuid: F8A3-A88E-C6EF-B1CB' \
--header 'accessToken: 11b4ec017714ef095b8e115545467fcb' \
--header 'Content-Type: application/json' \
--data '{
    "status": "success",
    "message": "Inventory has been updated successfully"
}'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'http://yourapp.com/external/app/access/product-stock-update',
  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 =>'{
    "status": "success",
    "message": "Inventory has been updated successfully"
}',
  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({
  "status": "success",
  "message": "Inventory has been updated successfully"
})
headers = {
  'uuid': 'F8A3-A88E-C6EF-B1CB',
  'accessToken': '11b4ec017714ef095b8e115545467fcb',
  'Content-Type': 'application/json'
}
conn.request("POST", "/external/app/access/product-stock-update", 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/product-stock-update")
  .header("uuid", "F8A3-A88E-C6EF-B1CB")
  .header("accessToken", "11b4ec017714ef095b8e115545467fcb")
  .header("Content-Type", "application/json")
  .body("{\r\n    \"status\": \"success\",\r\n    \"message\": \"Inventory has been updated successfully\"\r\n}")
  .asString();
var options = new RestClientOptions("")
{
  MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("http://yourapp.com/external/app/access/product-stock-update", Method.Post);
request.AddHeader("uuid", "F8A3-A88E-C6EF-B1CB");
request.AddHeader("accessToken", "11b4ec017714ef095b8e115545467fcb");
request.AddHeader("Content-Type", "application/json");
var body = @"{
" + "\n" +
@"    ""status"": ""success"",
" + "\n" +
@"    ""message"": ""Inventory has been updated successfully""
" + "\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/product-stock-update
  • Request type: POST

Request Parameter

{
    "productId": 54678784645,
    "changeQuantity": 12,
    "note": "10 extra products added for EID"
}

Response

{
    "status": "success",
    "message": "Inventory has been updated successfully"
}

Product Price Update

Responsible for updating the price-related configuration of a product. Here is an example:

  • cURL
  • PHP – cURL
  • Python – http.client
  • Java – Unirest
  • C# – RestSharp
curl --location 'http://yourapp.com/external/app/access/product-price-update' \
--header 'uuid: F8A3-A88E-C6EF-B1CB' \
--header 'accessToken: 11b4ec017714ef095b8e115545467fcb' \
--header 'Content-Type: application/json' \
--data '{
    "id": 5456423432,
    "isCallForPriceEnabled": "true",
    "isExpectToPay": "true",
    "expectToPayPrice": 50,
    "isSoldOut": "false",
    "soldOutLabel": "sold out",
    "isOnSale": "true",
    "salePrice": 12,
    "isInventoryEnabled": "false",
    "lowStockLevel": 0
}'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'http://yourapp.com/external/app/access/product-price-update',
  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": 123,
    "isCallForPriceEnabled": "true",
    "isExpectToPay": "true",
    "expectToPayPrice": 50,
    "isSoldOut": "false",
    "soldOutLabel": "sold out",
    "isOnSale": "true",
    "salePrice": 12,
    "isInventoryEnabled": "false",
    "lowStockLevel": 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({
  "id": 123,
  "isCallForPriceEnabled": "true",
  "isExpectToPay": "true",
  "expectToPayPrice": 50,
  "isSoldOut": "false",
  "soldOutLabel": "sold out",
  "isOnSale": "true",
  "salePrice": 12,
  "isInventoryEnabled": "false",
  "lowStockLevel": 0
})
headers = {
  'uuid': 'F8A3-A88E-C6EF-B1CB',
  'accessToken': '11b4ec017714ef095b8e115545467fcb',
  'Content-Type': 'application/json'
}
conn.request("POST", "/external/app/access/product-price-update", 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/product-price-update")
  .header("uuid", "F8A3-A88E-C6EF-B1CB")
  .header("accessToken", "11b4ec017714ef095b8e115545467fcb")
  .header("Content-Type", "application/json")
  .body("{\r\n    \"id\": 123,\r\n    \"isCallForPriceEnabled\": \"true\",\r\n    \"isExpectToPay\": \"true\",\r\n    \"expectToPayPrice\": 50,\r\n    \"isSoldOut\": \"false\",\r\n    \"soldOutLabel\": \"sold out\",\r\n    \"isOnSale\": \"true\",\r\n    \"salePrice\": 12,\r\n    \"isInventoryEnabled\": \"false\",\r\n    \"lowStockLevel\": 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/product-price-update", Method.Post);
request.AddHeader("uuid", "F8A3-A88E-C6EF-B1CB");
request.AddHeader("accessToken", "11b4ec017714ef095b8e115545467fcb");
request.AddHeader("Content-Type", "application/json");
var body = @"{
" + "\n" +
@"    ""id"": 123,
" + "\n" +
@"    ""isCallForPriceEnabled"": ""true"",
" + "\n" +
@"    ""isExpectToPay"": ""true"",
" + "\n" +
@"    ""expectToPayPrice"": 50,
" + "\n" +
@"    ""isSoldOut"": ""false"",
" + "\n" +
@"    ""soldOutLabel"": ""sold out"",
" + "\n" +
@"    ""isOnSale"": ""true"",
" + "\n" +
@"    ""salePrice"": 12,
" + "\n" +
@"    ""isInventoryEnabled"": ""false"",
" + "\n" +
@"    ""lowStockLevel"": 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/product-price-update
  • Request type: POST

Request Parameter

{
    "id": 123,
    "isCallForPriceEnabled": "true",
    "isExpectToPay": "true",
    "expectToPayPrice": 50,
    "isSoldOut": "false",
    "soldOutLabel": "sold out",
    "isOnSale": "true",
    "salePrice": 12,
    "isInventoryEnabled": "false",
    "lowStockLevel": 0
}

Response

{"status": "success", "message": "Price has been updated successfully"}

Product Image Add

Responsible for adding an image to a product. Here is an example:

  • cURL
  • PHP – cURL
  • Python – http.client
  • Java – Unirest
  • C# – RestSharp
curl --location 'http://yourapp.com/external/app/access/product-image-add' \
--header 'uuid: F8A3-A88E-C6EF-B1CB' \
--header 'accessToken: 11b4ec017714ef095b8e115545467fcb' \
--header 'Content-Type: application/json' \
--data '{
    "productId": 10,
    "images": [
        "base64data1",
        "base64data2"
    ]
}'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'http://yourapp.com/external/app/access/product-image-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 =>'{
    "productId": 10,
    "images": [
        "base64data1",
        "base64data2"
    ]
}',
  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({
  "productId": 10,
  "images": [
    "base64data1",
    "base64data2"
  ]
})
headers = {
  'uuid': 'F8A3-A88E-C6EF-B1CB',
  'accessToken': '11b4ec017714ef095b8e115545467fcb',
  'Content-Type': 'application/json'
}
conn.request("POST", "/external/app/access/product-image-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/product-image-add")
  .header("uuid", "F8A3-A88E-C6EF-B1CB")
  .header("accessToken", "11b4ec017714ef095b8e115545467fcb")
  .header("Content-Type", "application/json")
  .body("{\r\n    \"productId\": 10,\r\n    \"images\": [\r\n        \"base64data1\",\r\n        \"base64data2\"\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/product-image-add", Method.Post);
request.AddHeader("uuid", "F8A3-A88E-C6EF-B1CB");
request.AddHeader("accessToken", "11b4ec017714ef095b8e115545467fcb");
request.AddHeader("Content-Type", "application/json");
var body = @"{
" + "\n" +
@"    ""productId"": 10,
" + "\n" +
@"    ""images"": [
" + "\n" +
@"        ""base64data1"",
" + "\n" +
@"        ""base64data2""
" + "\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/product-image-add
  • Request type: POST

Request Parameter

{
    "productId": 10,
    "images": [
        "base64data1",
        "base64data2"
    ]
}

Response

{"status": "success", "message": "Product image properties has been saved successfully"}

Product Image Delete

Responsible for deleting an image of a product. Here is an example:

  • cURL
  • PHP – cURL
  • Python – http.client
  • Java – Unirest
  • C# – RestSharp
curl --location --request DELETE 'http://yourapp.com/external/app/access/product-image-delete' \
--header 'uuid: F8A3-A88E-C6EF-B1CB' \
--header 'accessToken: 11b4ec017714ef095b8e115545467fcb' \
--header 'Content-Type: application/json' \
--data '{
    "imageId": [
        22,
        23
    ]
}'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'http://yourapp.com/external/app/access/product-image-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 => 'DELETE',
  CURLOPT_POSTFIELDS =>'{
    "imageId": [
        22,
        23
    ]
}',
  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({
  "imageId": [
    22,
    23
  ]
})
headers = {
  'uuid': 'F8A3-A88E-C6EF-B1CB',
  'accessToken': '11b4ec017714ef095b8e115545467fcb',
  'Content-Type': 'application/json'
}
conn.request("DELETE", "/external/app/access/product-image-delete", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
Unirest.setTimeouts(0, 0);
HttpResponse<String> response = Unirest.delete("http://yourapp.com/external/app/access/product-image-delete")
  .header("uuid", "F8A3-A88E-C6EF-B1CB")
  .header("accessToken", "11b4ec017714ef095b8e115545467fcb")
  .header("Content-Type", "application/json")
  .body("{\r\n    \"imageId\": [\r\n        22,\r\n        23\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/product-image-delete", Method.Delete);
request.AddHeader("uuid", "F8A3-A88E-C6EF-B1CB");
request.AddHeader("accessToken", "11b4ec017714ef095b8e115545467fcb");
request.AddHeader("Content-Type", "application/json");
var body = @"{
" + "\n" +
@"    ""imageId"": [
" + "\n" +
@"        22,
" + "\n" +
@"        23
" + "\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/product-image-delete
  • Request type: DELETE

Request Parameter

{
    "imageId": [
        22,
        23
    ]
}

Leave a Reply

Your email address will not be published. Required fields are marked *