cURL
curl --request GET \
--url https://api.treet-test.co/product-feed \
--header 'X-Treet-Authentication-Key: <api-key>' \
--header 'X-Treet-Client-Id: <api-key>'import requests
url = "https://api.treet-test.co/product-feed"
headers = {
"X-Treet-Client-Id": "<api-key>",
"X-Treet-Authentication-Key": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'X-Treet-Client-Id': '<api-key>', 'X-Treet-Authentication-Key': '<api-key>'}
};
fetch('https://api.treet-test.co/product-feed', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.treet-test.co/product-feed",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Treet-Authentication-Key: <api-key>",
"X-Treet-Client-Id: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.treet-test.co/product-feed"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Treet-Client-Id", "<api-key>")
req.Header.Add("X-Treet-Authentication-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.treet-test.co/product-feed")
.header("X-Treet-Client-Id", "<api-key>")
.header("X-Treet-Authentication-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.treet-test.co/product-feed")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Treet-Client-Id"] = '<api-key>'
request["X-Treet-Authentication-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"url": "https://ucarecdn.com/a26b7199-3356-4054-a147-536f548f4059/full-treet-product-feed-generic-1713291107739.json",
"version": 1
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Product Feed API
Get Product Feed
Endpoint that returns the latest Treet product feed as a JSON file link. The product feed is scheduled to be updated every hour and will return a new link when the product feed is updated. A fresh feed should be available at approximately 15 minutes past the hour.
GET
/
product-feed
cURL
curl --request GET \
--url https://api.treet-test.co/product-feed \
--header 'X-Treet-Authentication-Key: <api-key>' \
--header 'X-Treet-Client-Id: <api-key>'import requests
url = "https://api.treet-test.co/product-feed"
headers = {
"X-Treet-Client-Id": "<api-key>",
"X-Treet-Authentication-Key": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'X-Treet-Client-Id': '<api-key>', 'X-Treet-Authentication-Key': '<api-key>'}
};
fetch('https://api.treet-test.co/product-feed', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.treet-test.co/product-feed",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Treet-Authentication-Key: <api-key>",
"X-Treet-Client-Id: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.treet-test.co/product-feed"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Treet-Client-Id", "<api-key>")
req.Header.Add("X-Treet-Authentication-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.treet-test.co/product-feed")
.header("X-Treet-Client-Id", "<api-key>")
.header("X-Treet-Authentication-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.treet-test.co/product-feed")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Treet-Client-Id"] = '<api-key>'
request["X-Treet-Authentication-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"url": "https://ucarecdn.com/a26b7199-3356-4054-a147-536f548f4059/full-treet-product-feed-generic-1713291107739.json",
"version": 1
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Additional Details
Rate Limits
This endpoint is rate-limited to 15 req/minute. Please note that it will not return different data unless the feed has been updated. It is advised to check for a new feed link once an hour, max.Product Feed Data
The JSON file holds an array of Product Data objects, as typed below: {
productID: string;
productURL: string;
productTitle: string;
productDescription: string;
size: string;
image: string;
price: number;
brand: string;
productStock: number;
productAvailable: boolean;
gender?: ('Women' | 'Men' | 'Kids' | 'Unisex' | 'All')[];
condition: string;
isBrandDirect?: string;
updatedAt?: string;
color?: string;
shopifyTags?: string[];
shopifyProductType?: string;
categories?: string[];
styles?: string[];
currency?: Currency;
shipFromCountry?: CountryCode;
shipToCountries?: CountryCode[];
};
Response
listing response
Contains a link to the full product feed from Treet as a JSON file. Please note this file expires after 24 hours.
Example:
"https://ucarecdn.com/a26b7199-3356-4054-a147-536f548f4059/full-treet-product-feed-generic-1713291107739.json"
Denotes the version of the API. Currently, only version 1 is available.
Example:
1

