{
"products": [
{
"id": "2203",
"name": "Samsung Galaxy S9 Plus 128GB Coral Blue",
"slug": "samsung-galaxy-s9-plus-128gb-coral-blue",
}
]
"deals": [
{
"contractName": "Vodafone Essentials Plan",
"contractLength": "24",
"contractSupplierId": "4",
"contractSupplierName": "Vodafone",
"smallNetworkImage": "https://static.uconvert.co.uk/img/badges/network-small-4.png",
"mediumNetworkImage": "https://static.uconvert.co.uk/img/badges/network-medium-4.png",
"largeNetworkImage": "https://static.uconvert.co.uk/img/badges/network-4.png",
"largeRetailerImage": "https://static.uconvert.co.uk/img/badges/retailer-5.png",
"friendlyContractLength": "24 Month Contract",
"dataAllowance": "250",
"friendlyDataAllowance": "250Mb",
"callAllowance": "250",
"friendlyCallAllowance": "250",
"textAllowance": "999999",
"friendlyTextAllowance": "Unlimited",
"dealLink": "https://deals.uconvert.co.uk/deal_redirect/5/258071140/",
"dealType": "Consumer",
"condition": "New",
"totalDealCost": "1266.99",
"supplierId": "5",
"supplierName": "Mobile Phones Direct",
"productUpfrontCost": "834.99",
"supplierContractPrice": "18.00",
"giftImg": "https://static.uconvert.co.uk/img/gifts/free-hive-active-heating-with-installation.png",
"productImg": "https://static.uconvert.co.uk/img/products/samsung/samsung-galaxy-s9-plus/coral-blue/front.png",
"giftName": "Free Hive Active Heating With Installation",
"productName": "Samsung Galaxy S9 Plus 128GB Coral Blue"
},
{},
{},
]
}
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://api.uconvert.co.uk/deals/v1/products/2203/?expand=products(deals)&filter[condition]=eq{new}&sort=deals(data-allowance-asc)",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => array(
"x-api-key: 123456"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request GET \
--url 'https://api.uconvert.co.uk/deals/v1/products/2203/?expand=products(deals)s&filter[condition]=eq{new}&sort=deals(data-allowance-asc)' \
--header 'x-api-key: 123456'
var settings = {
"async": true,
"crossDomain": true,
"url": "https://api.uconvert.co.uk/deals/v1/products/2203/?expand=products(deals)&filter[condition]=eq{new}&sort=deals(data-allowance-asc)",
"method": "GET",
"headers": {
"x-api-key": "123456"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
require 'uri'
require 'net/http'
url = URI("https://api.uconvert.co.uk/deals/v1/products/2203/?expand=products(deals)&filter[condition]=eq{new}&sort=deals(data-allowance-asc)")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '123456'
response = http.request(request)
puts response.read_body