Get Product
curl --request GET \
--url https://api-ai.textyess.com/products/{id} \
--header 'x-auth-token: <api-key>'import requests
url = "https://api-ai.textyess.com/products/{id}"
headers = {"x-auth-token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-auth-token': '<api-key>'}};
fetch('https://api-ai.textyess.com/products/{id}', 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-ai.textyess.com/products/{id}",
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-auth-token: <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-ai.textyess.com/products/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-auth-token", "<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-ai.textyess.com/products/{id}")
.header("x-auth-token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-ai.textyess.com/products/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-auth-token"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"product_id": "prod_12345",
"product_url": "https://yourstore.com/products/sample-product",
"product_image": "https://example.com/image.jpg",
"title": "Sample Product",
"description": "A detailed product description",
"handle": "sample-product",
"variants": [
{
"id": "var_12345",
"title": "Default Variant",
"price": "29.99",
"inventory_quantity": 100
}
],
"collections": ["New Arrivals", "Featured"],
"available": true
}
{
"message": "Product not found"
}
Products API
Get Product
Retrieve a specific product from your catalog by its ID
GET
/
products
/
{id}
Get Product
curl --request GET \
--url https://api-ai.textyess.com/products/{id} \
--header 'x-auth-token: <api-key>'import requests
url = "https://api-ai.textyess.com/products/{id}"
headers = {"x-auth-token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-auth-token': '<api-key>'}};
fetch('https://api-ai.textyess.com/products/{id}', 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-ai.textyess.com/products/{id}",
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-auth-token: <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-ai.textyess.com/products/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-auth-token", "<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-ai.textyess.com/products/{id}")
.header("x-auth-token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-ai.textyess.com/products/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-auth-token"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"product_id": "prod_12345",
"product_url": "https://yourstore.com/products/sample-product",
"product_image": "https://example.com/image.jpg",
"title": "Sample Product",
"description": "A detailed product description",
"handle": "sample-product",
"variants": [
{
"id": "var_12345",
"title": "Default Variant",
"price": "29.99",
"inventory_quantity": 100
}
],
"collections": ["New Arrivals", "Featured"],
"available": true
}
{
"message": "Product not found"
}
Overview
The get product endpoint allows you to retrieve detailed information about a specific product in your catalog using its unique identifier.Authentication
This endpoint requires a valid JWT token in thex-auth-token header. You can find your token in the Developers section:
x-auth-token: your_jwt_token
Path Parameters
string
required
The unique identifier of the product you want to retrieve
Response
The response includes the following fields:string
The unique identifier of the product
string
The URL where the product can be viewed
string
The URL of the product’s main image
string
The product’s title
string
The product’s description
string
The product’s handle/slug
array
Array of product variants
array
Array of collections the product belongs to
boolean
Indicates if the product is currently available
{
"product_id": "prod_12345",
"product_url": "https://yourstore.com/products/sample-product",
"product_image": "https://example.com/image.jpg",
"title": "Sample Product",
"description": "A detailed product description",
"handle": "sample-product",
"variants": [
{
"id": "var_12345",
"title": "Default Variant",
"price": "29.99",
"inventory_quantity": 100
}
],
"collections": ["New Arrivals", "Featured"],
"available": true
}
{
"message": "Product not found"
}