Endpoints
Locations
List the cities available to the authenticated organization.
GET
/api/v1/staging/locationsFetch the organization-scoped city list you can use during first-time challan searches. Returned values are already restricted to the authenticated organization.
Base URL
https://cms-staging.challanwala.com
Authentication
Bearer YOUR_API_SECRET
Access gate
Requires the Challan Search service to be enabled for your organization.
Why this matters
When a vehicle is not already known to your organization, challan search requires both rcType and cityId. This endpoint provides the valid cityId values your integration can use.
cURL request
curl --request GET 'https://cms-staging.challanwala.com/api/v1/staging/locations' \ --header 'Authorization: Bearer YOUR_API_SECRET'JavaScript request
const response = await fetch('https://cms-staging.challanwala.com/api/v1/staging/locations', { method: 'GET', headers: { Authorization: 'Bearer YOUR_API_SECRET', },});const data = await response.json();console.log(data);Example response
{"success": true,"data": [ { "cityId": "98bb2b02-6474-4d6d-a45c-0d37efae792d", "cityName": "Delhi", "stateId": "5326706c-df84-40e7-9b33-a7a0c254e3f5", "stateName": "Delhi", "stateCode": "DL", "address": "Connaught Place", "landmark": "Block A", "zipCode": "110001", "buildingName": "Regional Hub" }, { "cityId": "379b5aa9-4230-4db5-ba51-0f4f3fcbca6e", "cityName": "Gurugram", "stateId": "ea91f0c2-d3fc-4d93-8f63-a1b3fa30b9a4", "stateName": "Haryana", "stateCode": "HR", "address": "Udyog Vihar Phase 4", "landmark": null, "zipCode": "122016", "buildingName": null }]}Response fields
| Field | Type | Required | Description |
|---|---|---|---|
| data[].cityId | uuid | Required | City identifier to use in challan search requests for new vehicles. |
| data[].cityName | string | Required | Human-readable city name. |
| data[].stateId | uuid | Required | State identifier associated with the city. |
| data[].stateName | string | Required | Human-readable state name. |
| data[].stateCode | string | Required | State code associated with the location. |
| data[].address | string | null | Optional | Address label configured for the organization location, when available. |
| data[].landmark | string | null | Optional | Landmark text configured for the location, when available. |
| data[].zipCode | string | null | Optional | Postal code configured for the location, when available. |
| data[].buildingName | string | null | Optional | Building or site label configured for the location, when available. |
