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
Your TribeMade API key (format: tb-xxxx-xxx-xxxx)
Path Parameters
UUID of the product to retrieve
Request Body
No request body required for GET requests.
Response
ISO 8601 timestamp when the product was created (UTC)
UUID of the store this product belongs to
Product name (3-30 characters)
Original/MRP price in INR
Current/sale price in INR
Short product description (0-50 characters)
Full product description (0-500 characters)
Product variations (e.g., [“Regular Fit”, “Slim Fit”])
Available sizes (e.g., [“S”, “M”, “L”, “XL”])
Available colors (e.g., [“Black”, “White”, “Navy”])
Whether the product is marked as on sale
Custom questions for customers. Each question contains:
question: Question text
type: Either “text” or “image”
Whether the product is active and visible to customers
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"
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
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
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" )
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
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 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)
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
Maximum 50 requests per minute
Implement retry logic with exponential backoff
See Rate Limits for details
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