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.
Companies API
Manage company profiles, search, and verification.
Endpoints
| Method | Path | Description |
|---|
| GET | /companies | List companies |
| GET | /companies/search | Full-text search |
| GET | /companies/{slug} | Get by slug |
| GET | /companies/{id} | Get by ID |
| POST | /companies | Create company |
| PATCH | /companies/{id} | Update company |
| DELETE | /companies/{id} | Delete company |
| POST | /companies/check-domain | Check domain availability |
List Companies
Query Parameters
| Parameter | Type | Description |
|---|
| page | int | Page number (default: 1) |
| limit | int | Items per page (default: 20) |
| category | string | Filter by category |
| city | string | Filter by city |
| verified | bool | Filter verified only |
Response
{
"data": [
{
"id": "uuid",
"name": "Acme Corp",
"slug": "acme-corp",
"category": "Manufacturing",
"city": "Mumbai",
"verified": true
}
],
"total": 100,
"page": 1,
"limit": 20
}
Search Companies
Full-text search using PostgreSQL tsvector.
GET /companies/search?q=jewelry+kolkata
Query Parameters
| Parameter | Type | Description |
|---|
| q | string | Search query |
| page | int | Page number |
| limit | int | Items per page |
Get by Slug
Create Company
Request Body
{
"name": "Acme Corp",
"category": "Manufacturing",
"sub_category": "Textiles",
"address_line1": "123 Main St",
"city": "Mumbai",
"state": "Maharashtra",
"country": "India",
"pincode": "400001",
"gstin": "27ABCDE1234F1Z5",
"phone": "+91-9876543210"
}
Update Company
Request Body
{
"name": "Acme Corporation",
"phone": "+91-9876543211"
}
Check Domain Availability
POST /companies/check-domain
Request Body
Response
{
"available": false,
"company": {
"id": "uuid",
"name": "Acme Corp"
}
}