Skip to main content
07399 456 959 [email protected]

Gift Categories Expand
Last updated: January 05 2022 11:19 PM

Expand Parameter Values Available For Gift Categories

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.

Use a comma-separated list within the brackets to expand by multiple values. E.g, /?expand=giftcategories(content,images)

Parameter Type Description and examples
content
optional
string Returns an object containing content about the gift category (heading, introduction)

/?expand=giftcategories(content)
meta-data
optional
string Returns an object containing meta tags about the HTML document (title, description and keywords)

/?expand=giftcategories(meta-data)
images
optional
string Returns an object containing image src for the gift category

/?expand=giftcategories(images)
gifts
optional
string Returns an object containing gifts for a gift category

/?expand=giftcategories(gifts)
page-content
optional
string Returns an object containing page contents (heading, introduction)

/?expand=page-content

Gift Categories Expand Request Example

GET
https://api.uconvert.co.uk/deals/v1/gifts/categories/?expand=giftcategories(content,images)
{
  "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."
      },
      "images": {
        "largeFrontImageWebp": "http://static.local.co.uk/img/gifts/default/games-consoles-deals.webp",
        "largeFrontImagePng": "http://static.local.co.uk/img/gifts/default/games-consoles-deals.png",
        "largeFrontImageJpg": "http://static.local.co.uk/img/gifts/default/games-consoles-deals.jpg"
      }
    },
    {
      "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."
      },
      "images": {
        "largeFrontImageWebp": "http://static.local.co.uk/img/gifts/default/laptops-deals.webp",
        "largeFrontImagePng": "http://static.local.co.uk/img/gifts/default/laptops-deals.png",
        "largeFrontImageJpg": "http://static.local.co.uk/img/gifts/default/laptops-deals.jpg"
      }
    },
    {
      "id": "8",
      "name": "Music Deals",
      "slug": "music-deals",
      "content": {
        "heading": "FREE music equipment with a mobile phone contract",
        "introduction": "Get Free music equipment such as headphones, earphones, playbars or speakers when you take out a mobile phone contract. We have all the latest and greatest headphones such as Beats, Bose and Wireless Apple iPods. All our headphones and earphones have a fine-tuned acoustic design, offer world class performance and superior comfort."
      },
      "images": {
        "largeFrontImageWebp": "http://static.local.co.uk/img/gifts/default/music-deals.webp",
        "largeFrontImagePng": "http://static.local.co.uk/img/gifts/default/music-deals.png",
        "largeFrontImageJpg": "http://static.local.co.uk/img/gifts/default/music-deals.jpg"
      }
    }
    {},
    {},
    {}
  ]
}
$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.uconvert.co.uk/deals/v1/gifts/categories/?expand=giftcategories(content,images)",
  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,images)' \
--header 'x-api-key: 123456'
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://api.uconvert.co.uk/deals/v1/gifts/categories/?expand=giftcategories(content,images)",
  "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,images)")

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