Get State By ID API
Overview
Retrieves details of a specific State master record by its integer ID.
- Endpoint:
/api/states/get-by-id - Method:
POSTorGET - Auth Required: Public / Optional
Request Schema (POST Body or GET Query)
| Field / Parameter | Type | Required | Description |
|---|---|---|---|
id | Number (Integer) | Yes | Integer ID of the target State |
Request Body Example (POST)
{
"id": 21
}
Response Example (200 OK)
{
"success": true,
"data": {
"id": 21,
"name": "Maharashtra",
"countryId": 101,
"active": true
},
"message": "State fetched successfully"
}