Skip to main content
07399 456 959 [email protected]

Get A Single Product Filtered
Last updated: January 05 2022 11:19 PM

Typical Filtered Product Query

We have created what a typical query may look like. We want:

  • A new Samsung Galaxy S9 Plus Coral Blue 128Gb
  • Just on the EE network
  • All product deals, filtered by cashback deals and FREE handsets
  • We want a large front jpg image
  • We want some product content
GET
https://api.uconvert.co.uk/products/2203/?expand=products(deals,content,page-content)&filter[upfrontCost]=eq{0}&filter[condition]=eq{new}&filter[networks]=eq{ee}&filter[offers]=eq{cashback}&fields=products(front,large,jpg)
{
  "products": [
    {
      "id": "2203",
      "name": "Samsung Galaxy S9 Plus 128GB Coral Blue",
      "slug": "samsung-galaxy-s9-plus-128gb-coral-blue",
      "content": {
        "heading": "Samsung Galaxy S9 Plus 128GB Coral Blue mobile phone deals",
        "introduction": "Get the very best and latest Samsung Galaxy S9 Plus 128GB Coral Blue mobile phone deals Compare the best and cheapest Samsung Galaxy S9 Plus 128GB Coral Blue mobile phone deals from all UK retailers and networks."
      },
      "images": {
        "largeFrontImageJpg": "https://static.uconvert.co.uk/img/products/samsung/samsung-galaxy-s9-plus/coral-blue/front_l.jpg"
      }
    }
  ],
  "deals": [
    {
      "dealType": "Consumer",
      "contractName": "EE 4G Essential Plan",
      "contractLength": "24",
      "contractSupplierId": "3",
      "contractSupplierName": "EE",
      "smallNetworkImage": "https://static.uconvert.co.uk/img/badges/network-small-3.png",
      "mediumNetworkImage": "https://static.uconvert.co.uk/img/badges/network-medium-3.png",
      "largeNetworkImage": "https://static.uconvert.co.uk/img/badges/network-3.png",
      "largeRetailerImage": "https://static.uconvert.co.uk/img/badges/retailer-7.png",
      "friendlyContractLength": "24 Month Contract",
      "dataAllowance": "4000",
      "friendlyDataAllowance": "4Gb",
      "callAllowance": "999999",
      "friendlyCallAllowance": "Unlimited",
      "textAllowance": "999999",
      "friendlyTextAllowance": "Unlimited",
      "dealLink": "https://deals.uconvert.co.uk/deal_redirect/1/210734606/",
      "condition": "New",
      "cashbackType": " Guaranteed Cashback",
      "cashbackValue": "25.00",
      "totalDealCost": "1152.00",
      "supplierId": "7",
      "supplierName": "Affordablemobiles.co.uk",
      "productUpfrontCost": "0.00",
      "supplierContractPrice": "48.00",
      "giftImg": "https://static.uconvert.co.uk/img/gifts/cashback.png",
      "productImg": "https://static.uconvert.co.uk/img/products/samsung/samsung-galaxy-s9-plus/coral-blue/front.png",
      "giftName": "Cashback",
      "productName": "Samsung Galaxy S9 Plus 128GB Coral Blue"
    }
    {},
    {},
  ]
}
$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.uconvert.co.uk/deals/v1/products/2203/?expand=products(deals,content,page-content)&filter[upfrontCost]=eq{0}&filter[condition]=eq{new}&filter[networks]=eq{ee}&filter[offers]=eq{cashback}&fields=products(front,large,jpg)",
  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/2203/?expand=products(deals,content,page-content)&filter[upfrontCost]=eq{0}&filter[condition]=eq{new}&filter[networks]=eq{ee}&filter[offers]=eq{cashback}&fields=products(front,large,jpg)' \
--header 'x-api-key: 123456'
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://api.uconvert.co.uk/deals/v1/products/2203/?expand=products(deals,content,page-content)&filter[upfrontCost]=eq{0}&filter[condition]=eq{new}&filter[networks]=eq{ee}&filter[offers]=eq{cashback}&fields=products(front,large,jpg)",
  "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/2203/?expand=products(deals,content,page-content)&filter[upfrontCost]=eq{0}&filter[condition]=eq{new}&filter[networks]=eq{ee}&filter[offers]=eq{cashback}&fields=products(front,large,jpg)")

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