Skip to main content
07399 456 959 [email protected]

Gift Categories Meta Data Object
Last updated: January 05 2022 11:19 PM

We supply a default set of meta data for each gift category in the gift categories meta data object.

All attributes in the gift categories meta data object are editable in our Content Management System (CMS).

Gift Categories Meta Data Object

Attribute Type Description
metaData array[object] An array containing meta tags about the HTML document (title, description and keywords).
metaData.title string A meta title for the gift category

E.g. Free Games Console with Phone Contracts - Compare FREE gift mobile phone deals
metaData.description string A meta description for the gift category

E.g. Get a Games Console when you take out a mobile phone contract. Compare the best Free games consoles gifts with Mobile phones.
metaData.keywords string A meta keywords for the gift category

E.g. free, games console, gifts, mobile phone contracts, free console mobile deals

Gift Categories Expand Meta Data Request Example

GET
https://api.uconvert.co.uk/deals/v1/gifts/categories/?expand=giftcategories(meta-data)
{
  "giftCategories" : [
    {
      "id": "2",
      "name": "Games Consoles Deals",
      "slug": "games-consoles-deals",
      "metaData": {
        "title": "Free Games Console with Phone Contracts - Compare FREE gift mobile phone deals",
        "description": "Get a Games Console when you take out a mobile phone contract.  Compare the best Free games consoles gifts with Mobile phones.",
        "keywords": "free, games console, gifts, mobile phone contracts, free console mobile deals"
      }
    },
    {
      "id": "4",
      "name": "Laptops Deals",
      "slug": "laptops-deals",
      "metaData": {
        "title": "Free laptop with mobile phone contracts",
        "description": "Get a Stunning Free Laptop when you take out a mobile phone contract.  Compare the best Free Laptop gifts with Mobile phones.",
        "keywords": "free, laptop, gifts, mobile phone contracts"
      }
    }
    {},
    {},
    {}
  ]
}
$curl = curl_init();

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