1. Master
VasyOpenAPI
  • Branch
    • Branch List
      GET
  • Department
    • department
      GET
  • Category
    • category
      GET
    • subCategory
      GET
  • Brand
    • Brand
      GET
    • SubBrand
      GET
  • Contact
    • Get Customer List W Branch Id
      GET
    • Get Contact By Id
      GET
    • Get Contact By Mobile No
      GET
    • contactSave
      POST
    • Supplier(Party)
      GET
  • GST
    • Verify GST
      POST
  • Master
    • Get Country List
      GET
    • Get State List
      GET
    • Get City List
      GET
    • Get Tax List
      GET
    • Get Additional Charge List
      GET
  • Product
    • Get Product List
      GET
    • Get Product By ID
      GET
    • products with inventory
      GET
    • product details with Inventory By Product ID
      GET
    • Product Variant List ID & Name
      GET
    • Variant Details By Variant ID
      GET
  • Recipe
    • Get All Recipe
  • User
    • Created By
  • Report
    • Get Sales Item Register Data
    • Purchase Item Register Report
    • Stock Summary Report
    • Stock Transfer Item Register Report
    • Consumption Production Report
  • Sales
    • Get All Sales Data
    • Get Sales Data By Id
    • Order Create
    • Order Status
    • Shipping Details
    • Update Due Date
    • Update Order Status
  1. Master

Get City List

GET
/api/v1/master/location/city

City List#

Purpose#

Retrieve the list of cities available for a specific state in VasyERP.

Why would you use this?#

Use this API when your system needs city master data for customer management, supplier management, address validation, shipping configurations, or location-based operations.

Information Required#

FieldRequiredDescription
api-tokenYesAuthentication token provided by VasyERP
stateCodeYesState code for which cities need to be retrieved

Information Returned#

This API returns city master information including:
City ID
City Code
City Name
Associated State Code
Associated Country Code

Example Use Case#

A customer registration form requires users to select a city after selecting a state.
The application can use this API to retrieve all available cities for the selected state and populate the city dropdown dynamically.

Important Notes#

A valid State Code is required to retrieve city information.
City IDs should be stored and used when referencing cities in other APIs.
City information is state-specific.
It is recommended to fetch the latest city data instead of maintaining static city lists.
The returned cities belong only to the specified state.

Common Mistakes#

āŒ Passing an invalid State Code

Request

Query Params

Header Params

Responses

🟢200
application/json
Bodyapplication/json

🟠403Unauthorized
🟠429Too Many Request
Request Request Example
Shell
JavaScript
Java
Swift
curl --location '/api/v1/master/location/city?stateCode=24' \
--header 'api-token: {{.in-api-token}}'
Response Response Example
200 - Example 1
{
    "status": true,
    "message": "City List",
    "code": "200",
    "response": [
        {
            "cityId": 8885,
            "cityCode": "932",
            "cityName": "Aadityana",
            "stateCode": "24",
            "countryCode": "IN"
        },
        {
            "cityId": 8886,
            "cityCode": "933",
            "cityName": "Aambaliyasan",
            "stateCode": "24",
            "countryCode": "IN"
        }
    ]
}
Previous
Get State List
Next
Get Tax List
Built with