The default response does not include related entities. Use the expand query parameter when you need additional
information. The expand query parameter increases the set of fields that appear in the response.
{
"products": [
{
"id": "1032",
"name": "Apple iPhone 6 Plus 16GB Gold",
"slug": "apple-iphone-6-plus-16gb-gold",
"content": {
"heading": "Apple iPhone 6 Plus 16GB Gold mobile phone deals",
"introduction": "Get the very best and latest Apple iPhone 6 Plus 16GB Gold mobile phone deals Compare the best and cheapest Apple iPhone 6 Plus 16GB Gold mobile phone deals from all UK retailers and networks."
},
"metaData": {
"title": "Apple iPhone 6 Plus 16GB Gold Contract Mobile Phone Deals",
"description": "Compare the best Apple iPhone 6 Plus 16GB Gold contract mobile phone deals. Buy the Apple iPhone 6 Plus 16GB Gold from all the top networks and leading retailers.",
"keywords": "Apple iPhone 6 Plus 16GB Gold contract mobile phone deals, specifications, product overview, compare mobile phone deals"
}
},
{
"id": "1035",
"name": "Apple iPhone 6 Plus 16GB Space Grey",
"slug": "apple-iphone-6-plus-16gb-space-grey",
"content": {
"heading": "Apple iPhone 6 Plus 16GB Space Grey mobile phone deals",
"introduction": "Get the very best and latest Apple iPhone 6 Plus 16GB Space Grey mobile phone deals Compare the best and cheapest Apple iPhone 6 Plus 16GB Space Grey mobile phone deals from all UK retailers and networks."
},
"metaData": {
"title": "Apple iPhone 6 Plus 16GB Space Grey Contract Mobile Phone Deals",
"description": "Compare the best Apple iPhone 6 Plus 16GB Space Grey contract mobile phone deals. Buy the Apple iPhone 6 Plus 16GB Space Grey from all the top networks and leading retailers.",
"keywords": "Apple iPhone 6 Plus 16GB Space Grey contract mobile phone deals, specifications, product overview, compare mobile phone deals"
}
}
]
}
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://api.uconvert.co.uk/deals/v1/products/?expand=products(content,meta-data)",
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/?expand=products(content,meta-data)' \
--header 'x-api-key: 123456'
var settings = {
"async": true,
"crossDomain": true,
"url": "https://api.uconvert.co.uk/deals/v1/products/?expand=products(content,meta-data)",
"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/?expand=products(content,meta-data)")
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