Skip to main content

Companies API

Manage company profiles, search, and verification.

Endpoints

MethodPathDescription
GET/companiesList companies
GET/companies/searchFull-text search
GET/companies/{slug}Get by slug
GET/companies/{id}Get by ID
POST/companiesCreate company
PATCH/companies/{id}Update company
DELETE/companies/{id}Delete company
POST/companies/check-domainCheck domain availability

List Companies

GET /companies

Query Parameters

ParameterTypeDescription
pageintPage number (default: 1)
limitintItems per page (default: 20)
categorystringFilter by category
citystringFilter by city
verifiedboolFilter 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

ParameterTypeDescription
qstringSearch query
pageintPage number
limitintItems per page

Get by Slug

GET /companies/acme-corp

Create Company

POST /companies

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

PATCH /companies/{id}

Request Body

{
  "name": "Acme Corporation",
  "phone": "+91-9876543211"
}

Check Domain Availability

POST /companies/check-domain

Request Body

{
  "domain": "acme.com"
}

Response

{
  "available": false,
  "company": {
    "id": "uuid",
    "name": "Acme Corp"
  }
}