We supply a default set of content for each gift category in the gift categories content object.
{
"giftCategories" : [
{
"id": "2",
"name": "Games Consoles Deals",
"slug": "games-consoles-deals",
"content": {
"heading": "FREE games console with a mobile phone contract",
"introduction": "Get a FREE Microsoft Xbox One X or Microsoft Xbox One S, Sony PlayStation PS4 Slim or the very latest Sony Playstation PS4 Pro and Nintendo Switch with a mobile phone contract. All the leading manufacturers and the latest consoles, . Why spend hundreds of pounds on a new games console when you can get one for FREE."
}
},
{"id": "4",
"name": "Laptops Deals",
"slug": "laptops-deals",
"content": {
"heading": "FREE laptop with a mobile phone contract",
"introduction": "Compare thousands of mobile phone deals with a free laptops. If you're looking for a versatile laptop for home entertainment to play videos, connect at speed to the internet or something more powerful for business, we got them all. All our laptops and chromebooks are beautifully designed and stylish, making them look far more expensive than they are. Choose from a range of top manufacturers. These Laptop deals are very dependant on stock so if you like a particular phone and laptop deal then grab while stock lasts."
}
},
{},
{},
{}
]
}
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://api.uconvert.co.uk/deals/v1/gifts/categories/?expand=giftcategories(content)",
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/gifts/categories/?expand=giftcategories(content)' \
--header 'x-api-key: 123456'
var settings = {
"async": true,
"crossDomain": true,
"url": "https://api.uconvert.co.uk/deals/v1/gifts/categories/?expand=giftcategories(content)",
"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/gifts/categories/?expand=giftcategories(content)")
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