Skip to main content
GET
/
api
/
products
/
{product_id}
{
  "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

X-API-Key
string
required
Your TribeMade API key (format: tb-xxxx-xxx-xxxx)

Path Parameters

product_id
string
required
UUID of the product to retrieve

Request Body

No request body required for GET requests.

Response

id
string
UUID of the product
created_at
string
ISO 8601 timestamp when the product was created (UTC)
store_id
string
UUID of the store this product belongs to
name
string
Product name (3-30 characters)
origional_price
number
Original/MRP price in INR
current_price
number
Current/sale price in INR
shipping_cost
number
Shipping cost in INR
short_description
string
Short product description (0-50 characters)
long_description
string
Full product description (0-500 characters)
variations
array
Product variations (e.g., [“Regular Fit”, “Slim Fit”])
size
array
Available sizes (e.g., [“S”, “M”, “L”, “XL”])
colors
array
Available colors (e.g., [“Black”, “White”, “Navy”])
categories
array
Product categories
is_sale
boolean
Whether the product is marked as on sale
custom_questions
array
Custom questions for customers. Each question contains:
  • question: Question text
  • type: Either “text” or “image”
is_active
boolean
Whether the product is active and visible to customers
stock
integer
Available quantity
internal_note
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"

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

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
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 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