Documentation Index
Fetch the complete documentation index at: https://docs.spn.wtf/llms.txt
Use this file to discover all available pages before exploring further.
Catalog API
Manage product catalog with bulk upload and WhatsApp XML feed.
Endpoints
| Method | Path | Description |
|---|
| GET | /catalog | List products |
| GET | /catalog/{id} | Get product |
| POST | /catalog | Create product |
| PATCH | /catalog/{id} | Update product |
| DELETE | /catalog/{id} | Delete product |
| POST | /catalog/bulk | Bulk upload |
| GET | /catalog/feed/{company_id}.xml | WhatsApp XML feed |
List Products
Query Parameters
| Parameter | Type | Description |
|---|
| page | int | Page number |
| limit | int | Items per page |
| category | string | Filter by category |
| company_id | uuid | Filter by company |
| search | string | Search products |
Create Product
Request Body
{
"name": "Gold Ring",
"description": "22K gold ring",
"category": "Jewelry",
"sub_category": "Rings",
"price_amount": 50000,
"price_currency": "INR",
"moq": 1,
"_country": "India",
"images": ["originhttps://..."]
}
Fields
| Field | Type | Description |
|---|
| name | string | Product name |
| description | string | Product description |
| category | string | Category |
| sub_category | string | Sub-category |
| price_amount | integer | Price in paise |
| price_currency | string | Currency code |
| moq | integer | Minimum order quantity |
| origin_country | string | Country of origin |
| importer_name | string | Importer name (for imported goods) |
| importer_address | string | Importer address |
Bulk Upload
Upload multiple products via CSV or Excel.
Request
- Content-Type:
multipart/form-data
- File: CSV or Excel file
Response
{
"success": true,
"created": 50,
"failed": 2,
"errors": [
{"row": 5, "error": "Invalid price format"}
]
}
WhatsApp XML Feed
Generate XML feed for Meta Commerce Manager.
GET /catalog/feed/{company_id}.xml
Example
curl http://localhost:8000/api/v1/catalog/feed/company-uuid.xml
Output
<?xml version="1.0" encoding="UTF-8"?>
<catalog>
<product>
<id>prod-001</id>
<name>Gold Ring</name>
<description>22K gold ring</description>
<price>500.00</price>
<currency>INR</currency>
<image>https://...</image>
<availability>in stock</availability>
</product>
</catalog>
WhatsApp Setup
- Generate XML feed URL
- Go to Meta Commerce Manager
- Add catalog → Connect via feed
- Configure hourly sync
Rate Limits
| Endpoint | Limit |
|---|
| List/Search | 120/min |
| Create/Update | 120/min |
| Bulk Upload | 10/min |