Skip to main content

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: POST or GET
  • Auth Required: Public / Optional

Request Schema (POST Body or GET Query)​

Field / ParameterTypeRequiredDescription
idNumber (Integer)YesInteger 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"
}