Code Samples
C#
public string GetAllProducts()
{
string returnResponse = string.Empty;
try
{
string url = "https://api-proactiveclothing.azurewebsites.net/api/v1.0/product/getall?searchkeyword=shirt&pageindex=0&pagesize=10";
HttpWebRequest request = WebRequest.Create(url) as HttpWebRequest;
request.Method = "GET";
request.Accept = "application/XML"; // For json replace with 'application/json'
request.Headers.Add("accesskey", "Enter your access key here");
WebResponse response = request.GetResponse();
if (((HttpWebResponse)response).StatusDescription == "OK")
{
// Get the stream containing content returned by the server.
Stream dataStream = response.GetResponseStream();
// Open the stream using a StreamReader for easy access.
StreamReader reader = new StreamReader(dataStream);
// Read the content.
returnResponse = reader.ReadToEnd();
}
return returnResponse;
}
catch (WebException webex)
{
return webex.Message;
}
}
PHP
setUrl('https://api-proactiveclothing.azurewebsites.net/api/v1.0/product/sellable');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders(array(
'apiAccessKey' => 'Enter your access key here',
'content-type' => 'application/json' // For XML replace with "application/xml"
));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
Web API Url's (End points) *Open any api endpoint in swagger to get response sample in xml or json.
Get all products
End Point: https://api-proactiveclothing.azurewebsites.net/api/v{version}/product/getall/{keyword}/{pageNumber}/{pageSize}
Version: 1.0
Operation: getall
Purpose: Get all the products. This method supports search and pagination.
Description: This API will get all the products as per search parameters. Search keyword, Page Number and Page Size is optional and you can use this to get filtered records.
Request Header: (accesskey)
Request Body: (keyword, pageNumber, pageSize)
Try Now
Product by Id
End Point: https://api-proactiveclothing.azurewebsites.net/api/v{version}/product/getbyid/{id}
Version: 1.0
Operation: getbyid
Purpose: Get single product by productId
Description: This API will get the product by productId.You need to pass productId as parameter.
Request Header: (accesskey)
Request Body: (id)
Try Now
Sellable products
End Point: https://api-proactiveclothing.azurewebsites.net/api/v{version}/product/sellable
Version: 1.0
Operation: sellable
Purpose: Get full range of sellable products.
Description: This API will get the list of sellable products which are published and not deleted.
Request Header: (accesskey)
Try Now
Media content
End Point: https://api-proactiveclothing.azurewebsites.net/api/v{version}/product/mediacontent/{id}
Version: 1.0
Operation: mediacontent
Purpose: Get product images.
Description:This API will get all the images of a product. You need to pass productId as parameter.
Request Header: (accesskey)
Request Body: (id)
Try Now
Pricing and Configuration
End Point: https://api-proactiveclothing.azurewebsites.net/api/v{version}/product/configurationandpricing/{id}
Version: 1.0
Operation: configurationandpricing
Purpose: Get product with price.
Description:This API will get all the pricing per product. You need to pass productId as parameter.
Request Header: (accesskey)
Request Body: (id)
Try Now
**All prices provided are standard prices excluding any discounts (to view Partnership Program details and terms, please click here)
**On Sale and End of Range products are not subjected to any discounts
Decoration colors
End Point: https://api-proactiveclothing.azurewebsites.net/api/v{version}/product/decorationcolors/{id}
Version: 1.0
Operation: decorationcolors
Purpose: Get colours per product.
Description:This API will get all the colours per product. You need to pass productId as parameter.
Request Header: (accesskey)
Request Body: (id)
Try Now
Inventory Service
End Point: https://api-proactiveclothing.azurewebsites.net/api/v{version}/product/inventorylevels/{id}
Version: 1.0
Operation: inventorylevels
Purpose: Get stock levels per product.
Description:This API will get all the stock levels per product. You need to pass productId as parameter.
Request Header: (accesskey)
Request Body: (id)
Try Now