Skip to main content
07399 456 959 [email protected]

Product Content Object
Last updated: January 05 2022 11:19 PM

We supply a default set of content for each product in the product content object.

All attributes in the product content object are editable in our Content Management System (CMS).

Product Content Object

Attribute Type Description
content array[object] An array containing content for the product.
content.heading string A heading for the product

E.g. Apple iPhone 8 256GB Silver contract mobile phone deals
content.introduction string An introduction for the product

E.g Get the very best and latest Apple iPhone 8 256GB Silver mobile phone deals Compare the best and cheapest Apple iPhone 8 256GB Silver mobile phone deals from all UK retailers and networks.

Product Expand Content Request Example

GET
https://api.uconvert.co.uk/deals/v1/products/?expand=products(content)
{
  "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  . . ."
      }
    },
  ]
}
$curl = curl_init();

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