API Base URL
Authentication
Header:X-API-Key: tb-xxxx-xxx-xxxx
Example:
All Endpoints
Product APIs
| Method | Endpoint | Description | Rate Limit |
|---|---|---|---|
| POST | /api/products/create | Create new product | 20/min |
| PUT | /api/products/<id>/edit | Update product | 20/min |
| DELETE | /api/products/<id> | Delete product | 10/min |
Order APIs
| Method | Endpoint | Description | Rate Limit |
|---|---|---|---|
| GET | /api/orders/<id> | Get order details | 50/min |
| PUT | /api/orders/<id>/status | Update order status | 20/min |
Product Fields
Required Fields
| Field | Type | Constraints |
|---|---|---|
| name | string | 3-30 characters |
| price | number | > 0 (INR) |
| description | string | 0-500 characters |
| stock | integer | >= 0 |
Optional Fields
| Field | Type | Default | Constraints |
|---|---|---|---|
| current_price | number | = price | >= 0 (INR) |
| short_description | string | First 100 chars | 0-50 characters |
| shipping_cost | number | 0 | >= 0 (INR) |
| primary_image | string | null | URL or base64, ≤5MB |
| images | array | [] | Max 10, each ≤5MB |
| variations | array | [] | Max 20 items |
| size | array | [] | Max 20 items |
| colors | array | [] | Max 20 items |
| categories | array | [] | Max 20 (must exist) |
| is_sale | boolean | false | - |
| is_active | boolean | true | - |
| custom_questions | array | [] | Max 5 questions |
| internal_note | string | "" | 0-500 characters |
| metadata | object | Custom key-value pairs |
Order Status Values
| Status | Description | Transition To |
|---|---|---|
| started | Payment received | processing, cancelled |
| processing | Being prepared | dispatched, cancelled |
| dispatched | Shipped | delivered, cancelled |
| delivered | Delivered (final) | - |
| cancelled | Cancelled (final) | - |
HTTP Status Codes
| Code | Meaning | When |
|---|---|---|
| 200 | Success | GET, PUT, DELETE succeeded |
| 201 | Created | POST succeeded |
| 400 | Bad Request | Validation error, invalid data |
| 401 | Unauthorized | Missing/invalid API key |
| 403 | Forbidden | Wrong store |
| 404 | Not Found | Resource doesn’t exist |
| 429 | Rate Limited | Too many requests |
| 500 | Server Error | Internal error (rare) |
Common Error Responses
Authentication Errors (401)
Validation Errors (400)
Resource Errors (403, 404)
Rate Limit Error (429)
Custom Questions Format
text- Customer provides text answerimage- Customer uploads image file
Webhook Payload
Event:order.createdMethod: POST
Content-Type: application/json
Always Present Fields
Nullable Fields
order_details.variation- null if not applicableorder_details.size- null if not applicableorder_details.color- null if not applicableorder_details.special_instructions- null if noneorder_details.custom_questions- empty array if none
Request Examples
Create Product (Minimal)
Create Product (Full)
Edit Product
Delete Product
Get Order Details
Update Order Status
Product Deletion Rules
✅ CAN Delete
- Products with no orders
- Products with only completed orders
- Products with only cancelled orders
- Products with mix of completed/cancelled orders
❌ CANNOT Delete
- Products with started orders
- Products with processing orders
- Products with dispatched orders
is_active: false to hide products instead of deleting.
Tracking URL Examples
Supported Couriers
| Courier | URL Format |
|---|---|
| Delhivery | https://delhivery.com/track/AWBXXXXXXXX |
| BlueDart | https://bluedart.com/tracking/AWBXXXXXXXX |
| India Post | https://indiapost.gov.in/track/REGXXXXXXXX |
| Others | Any valid HTTPS tracking URL |
Webhook Requirements
Your Endpoint Must:
- Accept POST requests with JSON body
- Return 2xx status (200, 201, 202)
- Respond within 5 seconds
- Use HTTPS (HTTP not accepted)
- Have valid SSL certificate
Webhook Response
Rate Limit Headers
Every response includes:Data Formats
| Type | Format | Example |
|---|---|---|
| Timestamps | ISO 8601 (UTC) | 2024-11-16T10:30:45.123456Z |
| Currency | Number (INR) | 1299 or 999.50 |
| UUIDs | UUID v4 | 770e8400-e29b-41d4-a716-446655440789 |
| Phone | String | 9876543210 |
| Pincode | String | 400001 |
Typical Order Timeline
| Day | Status | Action |
|---|---|---|
| Day 0 | started | Order placed, payment received |
| Day 0-1 | processing | Preparation begins |
| Day 1-2 | dispatched | Shipped with tracking |
| Day 4-7 | delivered | Customer receives |
Best Practices Summary
✅ Do’s
- Store API keys in environment variables
- Use webhooks instead of polling
- Implement exponential backoff for retries
- Validate data before sending
- Handle all error codes properly
- Monitor rate limit headers
- Use HTTPS for webhooks
- Return 200 quickly from webhooks
- Log all webhook payloads
- Check for duplicate webhooks
❌ Don’ts
- Hardcode API keys in code
- Commit API keys to Git
- Expose API keys in client-side code
- Poll for new orders repeatedly
- Skip statuses in order flow
- Forget tracking URL for dispatched orders
- Update delivered/cancelled orders
- Delete products with active orders
- Process webhooks synchronously
- Ignore rate limit errors
Security Checklist
- API key stored in environment variable
- API key never committed to version control
- API key never exposed in client-side code
- All API requests use HTTPS
- Webhook endpoint uses HTTPS
- Valid SSL certificate on webhook endpoint
- Webhook payload validation implemented
- Error handling doesn’t expose API key
- Rate limiting respected
- Failed requests have retry logic
Support
Dashboard: https://tribemade.in/dashboardAPI Base:
https://api.tribemade.inDocumentation: This site
Version
API Version: v1Last Updated: November 2024

