Skip to main content

Introduction

TribeMade is a zero-cost e-commerce platform that lets you launch your online store in minutes. Unlike traditional platforms that charge monthly fees (29βˆ’29-299), TribeMade is completely free to start - we only take a flat 10% fee on successful deliveries, which includes hosting, domain, payment gateway, and full API access.

API at No Extra Cost

Every TribeMade store comes with complete API access at no additional charge. Whether you’re on your first sale or your thousandth, you get:
  • Full REST API - Create, update, delete products; manage orders programmatically
  • Real-time Webhooks - Get instant notifications when orders are placed
  • No API Fees - API access is included in our 10% flat fee (no usage limits)
  • Complete Control - Automate everything from inventory to order fulfillment
This is especially powerful compared to Shopify, where API access and webhooks come with their 29βˆ’29-299/month plans.

TribeMade API Capabilities

TribeMade API provides a comprehensive REST API for managing your e-commerce store programmatically. Build powerful integrations, automate workflows, and create custom solutions.

Base URL

https://api.tribemade.in
All API requests must use this base URL.

API Capabilities

πŸ“¦ Product Management

Create, read, update, and delete products programmatically:
  • Get Product - Retrieve complete product information
  • Create Product - Add new products with complete details
  • Edit Product - Update any product field including prices, stock, images
  • Delete Product - Remove products (with safety checks for active orders)
Features:
  • Support for variations, sizes, colors
  • Multiple images (up to 10 per product)
  • Custom questions for customer input
  • Categories and metadata
  • Internal notes (seller-only)
  • Stock management
  • Sale pricing

πŸ›οΈ Order Management

Fetch and update order information:
  • Get Order Details - Retrieve complete order information
  • Update Order Status - Change status and add tracking
Order Status Flow:
started β†’ processing β†’ dispatched β†’ delivered
            β†˜ cancelled (from any status)
Features:
  • Complete customer information
  • Delivery address details
  • Order items with variations
  • Special instructions
  • Custom question responses
  • Customer ratings and reviews
  • Tracking URLs

πŸ”” Real-time Webhooks

Receive instant notifications:
  • order.created - New order placed
  • Push notifications to your server
  • No polling required
  • Up to 5 webhook URLs

Authentication

All API endpoints require authentication using API keys.

API Key Format

tb-xxxx-xxx-xxxx
Example: tb-a1b2-c3d-e4f5

How to Authenticate

Include your API key in the X-API-Key header:
curl https://api.tribemade.in/api/orders/ORDER_ID \
  -H "X-API-Key: tb-a1b2-c3d-e4f5"

Get Your API Key

  1. Log in to TribeMade Dashboard
  2. Navigate to Developer section
  3. Click β€œGenerate API Key”
  4. Copy and store securely
API keys have full access to your store. Never expose them in client-side code or commit to version control.

Rate Limits

EndpointRate Limit
Product APIs
GET /api/products/<id>50 req/min
POST /api/products/create20 req/min
PUT /api/products/<id>/edit20 req/min
DELETE /api/products/<id>10 req/min
Order APIs
GET /api/orders/<id>50 req/min
PUT /api/orders/<id>/status20 req/min
Rate limits are per API key (per store) and reset every minute.

HTTP Status Codes

CodeMeaningDescription
200SuccessRequest completed successfully
201CreatedResource created successfully
400Bad RequestInvalid parameters or validation error
401UnauthorizedMissing or invalid API key
403ForbiddenAccess denied (wrong store)
404Not FoundResource doesn’t exist
429Too Many RequestsRate limit exceeded
500Internal Server ErrorServer error (rare)

Request Format

Content Type

All POST and PUT requests must include:
Content-Type: application/json

Request Body

Send data as JSON:
{
  "name": "Product Name",
  "price": 499,
  "description": "Product description",
  "stock": 50
}

Response Format

Success Response

Successful requests return JSON: Create operations (201):
{
  "product_id": "660e8400-e29b-41d4-a716-446655440123"
}
Update/Delete operations (200):
{
  "message": "Product updated successfully"
}
Get operations (200):
{
  "id": "770e8400-...",
  "status": "processing",
  // ... full object
}

Error Response

All errors return JSON with error message:
{
  "error": "Error message describing what went wrong"
}
Some errors include additional context:
{
  "error": "All categories must be in store categories",
  "invalid": ["InvalidCategory"]
}

Data Formats

Dates and Times

All timestamps use ISO 8601 format in UTC:
2024-11-16T10:30:45.123456Z

Currency

All prices and amounts are in Indian Rupees (INR) as numbers:
{
  "price": 1299,
  "current_price": 999,
  "amount": 2048.00
}

UUIDs

All IDs are UUIDs (version 4):
770e8400-e29b-41d4-a716-446655440789

Phone Numbers

Indian phone numbers as strings:
9876543210

Pincodes

Indian pincodes as strings:
400001

Field Constraints

Product Fields

FieldTypeMinMaxNotes
namestring3 chars30 charsRequired
descriptionstring0 chars500 charsRequired
short_descriptionstring0 chars50 charsOptional
pricenumber> 0-Required, INR
current_pricenumber>= 0-Optional, INR
stockinteger>= 0-Required
shipping_costnumber>= 0-Optional, INR
internal_notestring0 chars500 charsOptional
primary_imagestring-5MBOptional, URL or base64
imagesarray0 items10 itemsOptional, each ≀ 5MB
variationsarray0 items20 itemsOptional
sizearray0 items20 itemsOptional
colorsarray0 items20 itemsOptional
categoriesarray0 items20 itemsMust exist in store
custom_questionsarray0 items5 itemsOptional

Custom Question Format

{
  "question": "Question text (1-200 characters)",
  "type": "text"  // or "image"
}
Types:
  • text - Customer provides text answer
  • image - Customer uploads image

Order Status Values

StatusDescriptionCan Change To
startedPayment receivedprocessing, cancelled
processingBeing prepareddispatched, cancelled
dispatchedShippeddelivered, cancelled
deliveredDelivered (final)-
cancelledCancelled (final)-

Best Practices

1. Use Environment Variables

Never hardcode API keys:
import os
api_key = os.environ.get('TRIBEMADE_API_KEY')

2. Use Webhooks, Not Polling

❌ Don’t poll for new orders:
while True:
    check_for_orders()  # Wastes API calls
    time.sleep(60)
βœ… Use webhooks:
@app.route('/webhook', methods=['POST'])
def handle_order():
    process_order(request.json)
    return '', 200

3. Respect Rate Limits

  • Implement exponential backoff
  • Monitor X-RateLimit-Remaining header
  • Space out bulk operations
  • Handle 429 errors gracefully

4. Handle Errors Properly

  • Check HTTP status codes
  • Parse error messages
  • Implement retry logic for 500 errors
  • Don’t retry 400/401/403/404 errors

5. Validate Before Sending

  • Check field lengths
  • Validate data types
  • Ensure categories exist
  • Compress images to ≀ 5MB

Quick Start Checklist

  • Get API key from dashboard
  • Store API key in environment variable
  • Test authentication with a GET request
  • Create a test product
  • Set up webhook endpoint (optional)
  • Configure webhook URL in dashboard
  • Test webhook with real order
  • Implement error handling
  • Add retry logic for failures
  • Monitor API usage and errors

Support and Resources

Documentation

Need Help?

API Versioning

Current version: v1 All endpoints are currently at version 1. Future versions will be documented here.

Security

What TribeMade Does

  • βœ… All API traffic over HTTPS
  • βœ… API keys are hashed in database
  • βœ… Rate limiting to prevent abuse
  • βœ… Input validation on all fields
  • βœ… Authentication on all endpoints

What You Should Do

  • βœ… Store API keys securely
  • βœ… Use HTTPS for webhooks
  • βœ… Validate webhook payloads
  • βœ… Implement proper error handling
  • βœ… Monitor for unusual activity
  • βœ… Rotate API keys if compromised
Security Best Practices:
  • Never commit API keys to Git
  • Never expose API keys in client-side code
  • Always use environment variables
  • Regenerate keys immediately if exposed

API Endpoint Summary

Products

GET    /api/products/<id>            Get product details
POST   /api/products/create          Create new product
PUT    /api/products/<id>/edit       Update product
DELETE /api/products/<id>            Delete product

Orders

GET    /api/orders/<id>              Get order details
PUT    /api/orders/<id>/status       Update order status

Webhooks

POST   https://your-domain.com/webhook  Receive order.created events

Next Steps