Update Company API
Overview
Updates corporate client information, credit limits, or active status.
- Endpoint:
/api/companies/update - Method:
POST - Access: Super Admin / Platform RM
Request Body Schema
| Field | Type | Required | Description |
|---|---|---|---|
id | String (UUID) | Yes | Target company ID |
name | String | No | Updated display name |
legalName | String | No | Registered legal entity name |
gstin | String | No | 15-character GSTIN |
gstType | Enum | No | REGISTERED, UNREGISTERED, COMPOSITION, or SEZ |
panNumber | String | No | 10-character PAN number |
address | String | No | Office street address |
phone | String | No | Contact phone number |
emailId | String | No | Official contact email address |
creditLimit | Number | No | Updated credit limit |
creditDays | Number | No | Updated credit days |
active | Boolean | No | Enable/disable company access |
Request Body Example
{
"id": "c478a846-993d-4c8d-bf8d-d77cb3370e01",
"name": "Abbott Healthcare",
"legalName": "Abbott Healthcare India Private Limited",
"gstin": "27AAACA0000A1Z5",
"gstType": "REGISTERED",
"panNumber": "AAACA0000A",
"address": "123 Business Park, BKC",
"phone": "+912212345678",
"emailId": "info@abbott.com",
"creditLimit": 1500000,
"creditDays": 45,
"active": true
}
Success Response (200 OK)
{
"success": true,
"message": "Company updated successfully",
"data": {
"id": "c478a846-993d-4c8d-bf8d-d77cb3370e01",
"name": "Abbott Healthcare",
"creditLimit": "1500000.00",
"creditDays": 45
}
}
Database Impact
- Table:
companies - Operations:
UPDATErecord by ID.