Get Product
curl --request GET \
--url https://api.example.com/api/products/{product_id} \
--header 'X-API-Key: <x-api-key>'import requests
url = "https://api.example.com/api/products/{product_id}"
headers = {"X-API-Key": "<x-api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<x-api-key>'}};
fetch('https://api.example.com/api/products/{product_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.example.com/api/products/{product_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-API-Key: <x-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.example.com/api/products/{product_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<x-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.example.com/api/products/{product_id}")
.header("X-API-Key", "<x-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/products/{product_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<x-api-key>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"created_at": "<string>",
"store_id": "<string>",
"name": "<string>",
"origional_price": 123,
"current_price": 123,
"shipping_cost": 123,
"short_description": "<string>",
"long_description": "<string>",
"variations": [
{}
],
"size": [
{}
],
"colors": [
{}
],
"categories": [
{}
],
"is_sale": true,
"custom_questions": [
{}
],
"is_active": true,
"stock": 123,
"internal_note": "<string>"
}Product APIs
Get Product
Retrieve complete product information
GET
/
api
/
products
/
{product_id}
Get Product
curl --request GET \
--url https://api.example.com/api/products/{product_id} \
--header 'X-API-Key: <x-api-key>'import requests
url = "https://api.example.com/api/products/{product_id}"
headers = {"X-API-Key": "<x-api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<x-api-key>'}};
fetch('https://api.example.com/api/products/{product_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.example.com/api/products/{product_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-API-Key: <x-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.example.com/api/products/{product_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<x-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.example.com/api/products/{product_id}")
.header("X-API-Key", "<x-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/products/{product_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<x-api-key>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"created_at": "<string>",
"store_id": "<string>",
"name": "<string>",
"origional_price": 123,
"current_price": 123,
"shipping_cost": 123,
"short_description": "<string>",
"long_description": "<string>",
"variations": [
{}
],
"size": [
{}
],
"colors": [
{}
],
"categories": [
{}
],
"is_sale": true,
"custom_questions": [
{}
],
"is_active": true,
"stock": 123,
"internal_note": "<string>"
}Overview
Retrieve complete product information for a specific product in your store using API key authentication. Only products belonging to your store can be accessed.Rate Limit: 50 requests per minute
Endpoint
GET https://api.tribemade.in/api/products/{product_id}
Authentication
string
required
Your TribeMade API key (format:
tb-xxxx-xxx-xxxx)Path Parameters
string
required
UUID of the product to retrieve
Request Body
No request body required for GET requests.Response
string
UUID of the product
string
ISO 8601 timestamp when the product was created (UTC)
string
UUID of the store this product belongs to
string
Product name (3-30 characters)
number
Original/MRP price in INR
number
Current/sale price in INR
number
Shipping cost in INR
string
Short product description (0-50 characters)
string
Full product description (0-500 characters)
array
Product variations (e.g., [“Regular Fit”, “Slim Fit”])
array
Available sizes (e.g., [“S”, “M”, “L”, “XL”])
array
Available colors (e.g., [“Black”, “White”, “Navy”])
array
Product categories
boolean
Whether the product is marked as on sale
array
Custom questions for customers. Each question contains:
question: Question texttype: Either “text” or “image”
boolean
Whether the product is active and visible to customers
integer
Available quantity
string
Private seller-only notes (not visible to customers)
Examples
Basic Example
Retrieve a product by its ID:curl https://api.tribemade.in/api/products/19d8f8ea-1234-5678-90ab-cdef12345678 \
-H "X-API-Key: tb-a1b2-c3d-e4f5"
import requests
product_id = "19d8f8ea-1234-5678-90ab-cdef12345678"
url = f"https://api.tribemade.in/api/products/{product_id}"
headers = {
"X-API-Key": "tb-a1b2-c3d-e4f5"
}
response = requests.get(url, headers=headers)
print(response.json())
const fetch = require('node-fetch');
const productId = '19d8f8ea-1234-5678-90ab-cdef12345678';
const url = `https://api.tribemade.in/api/products/${productId}`;
const headers = {
'X-API-Key': 'tb-a1b2-c3d-e4f5'
};
fetch(url, {
method: 'GET',
headers: headers
})
.then(response => response.json())
.then(data => console.log(data));
<?php
$product_id = '19d8f8ea-1234-5678-90ab-cdef12345678';
$url = 'https://api.tribemade.in/api/products/' . $product_id;
$headers = array(
'X-API-Key: tb-a1b2-c3d-e4f5'
);
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>
Success Response
{
"id": "19d8f8ea-1234-5678-90ab-cdef12345678",
"created_at": "2024-11-18T10:46:12.123456+00:00",
"store_id": "7b4b3e39-5678-90ab-cdef-123456789012",
"name": "Sample Product",
"origional_price": 1299.99,
"current_price": 999.99,
"shipping_cost": 49.0,
"short_description": "Short summary",
"long_description": "Full description of the product with all the details...",
"variations": ["Default"],
"size": ["M", "L"],
"colors": ["Black"],
"categories": ["apparel"],
"is_sale": true,
"custom_questions": [
{
"question": "Upload inspo",
"type": "image"
}
],
"is_active": true,
"stock": 25,
"internal_note": "VIP drop"
}
Error Responses
401 Unauthorized - Missing API Key
{
"error": "Missing API key"
}
401 Unauthorized - Invalid API Key
{
"error": "Invalid API key"
}
404 Not Found - Product Doesn’t Exist
{
"error": "Product not found or does not belong to this store"
}
You can only access products that belong to your store. Attempting to access products from other stores will return a 404 error.
429 Too Many Requests
{
"error": "Rate limit exceeded",
"retry_after": 60
}
500 Internal Server Error
{
"error": "Internal server error"
}
500 errors are rare and indicate an unexpected server issue. If you encounter persistent 500 errors, check the API status or contact support.
Use Cases
Sync inventory with external systems
Sync inventory with external systems
Retrieve product details to sync with your inventory management system:
import requests
def sync_product_to_inventory(product_id):
url = f"https://api.tribemade.in/api/products/{product_id}"
headers = {"X-API-Key": "tb-a1b2-c3d-e4f5"}
response = requests.get(url, headers=headers)
if response.status_code == 200:
product = response.json()
# Sync to your inventory system
inventory_system.update({
"sku": product["id"],
"name": product["name"],
"stock": product["stock"],
"price": product["current_price"]
})
return True
return False
Verify product details before updates
Verify product details before updates
Check current product state before making updates:
def safe_update_stock(product_id, new_stock):
# First, get current product details
response = requests.get(
f"https://api.tribemade.in/api/products/{product_id}",
headers={"X-API-Key": "tb-a1b2-c3d-e4f5"}
)
if response.status_code == 200:
product = response.json()
current_stock = product["stock"]
# Only update if needed
if current_stock != new_stock:
# Make update call
update_product_stock(product_id, new_stock)
print(f"Updated stock from {current_stock} to {new_stock}")
else:
print("Stock already up to date")
Audit and reporting
Audit and reporting
Retrieve product data for analytics and reporting:
def generate_product_report(product_ids):
report = []
for product_id in product_ids:
response = requests.get(
f"https://api.tribemade.in/api/products/{product_id}",
headers={"X-API-Key": "tb-a1b2-c3d-e4f5"}
)
if response.status_code == 200:
product = response.json()
report.append({
"name": product["name"],
"price": product["current_price"],
"stock": product["stock"],
"status": "Active" if product["is_active"] else "Inactive",
"on_sale": product["is_sale"]
})
return report
Build custom mobile apps
Build custom mobile apps
Fetch product details for custom mobile or web applications:
async function displayProductDetails(productId) {
const response = await fetch(
`https://api.tribemade.in/api/products/${productId}`,
{
headers: {
'X-API-Key': 'tb-a1b2-c3d-e4f5'
}
}
);
if (response.ok) {
const product = await response.json();
// Display in your custom UI
document.getElementById('product-name').textContent = product.name;
document.getElementById('product-price').textContent = `₹${product.current_price}`;
document.getElementById('product-stock').textContent = `${product.stock} available`;
}
}
Best Practices
Cache product data appropriately
Cache product data appropriately
Cache product data to reduce API calls, but refresh periodically:
import time
from functools import lru_cache
@lru_cache(maxsize=100)
def get_product_cached(product_id, cache_timestamp):
response = requests.get(
f"https://api.tribemade.in/api/products/{product_id}",
headers={"X-API-Key": "tb-a1b2-c3d-e4f5"}
)
return response.json() if response.status_code == 200 else None
# Use with 5-minute cache
current_5min = int(time.time() / 300)
product = get_product_cached(product_id, current_5min)
Handle errors gracefully
Handle errors gracefully
Always check response status and handle errors:
def get_product_safe(product_id):
try:
response = requests.get(
f"https://api.tribemade.in/api/products/{product_id}",
headers={"X-API-Key": "tb-a1b2-c3d-e4f5"},
timeout=10
)
if response.status_code == 200:
return response.json()
elif response.status_code == 404:
print(f"Product {product_id} not found")
elif response.status_code == 429:
print("Rate limit exceeded, try again later")
else:
print(f"Error: {response.status_code}")
except requests.exceptions.Timeout:
print("Request timed out")
except Exception as e:
print(f"Error: {str(e)}")
return None
Respect rate limits
Respect rate limits
- Maximum 50 requests per minute
- Implement retry logic with exponential backoff
- See Rate Limits for details
Protect internal notes
Protect internal notes
Remember that
internal_note contains private information:- Never expose internal notes in customer-facing applications
- Be careful when logging or storing product data
- Internal notes may contain sensitive supplier or pricing information
Response Field Notes
Price Fields: Note the spelling
origional_price in the API response (this is the field name used by the API). Both origional_price and current_price are returned as numbers representing INR.Store Association: The API automatically filters products based on your API key’s store. You can only retrieve products that belong to your store.
Internal Notes Security: The
internal_note field contains seller-only information. Ensure this data is never exposed to customers in any client-facing application.Next Steps
Create Product
Add new products to your store
Edit Product
Update existing product details
Delete Product
Remove products from your store
Rate Limits
Understand API rate limits

