List of States
The /api/enums/state endpoint returns a complete list of all U.S. states, each with its name and identifier. This is a reference endpoint intended to support front-end applications that require consistent, standardized state data for forms, registration workflows, and selection interfaces.
Endpoint
GET /api/enums/state
Authentication
Bearer token required. Obtain via:
POST https://api.banking.netevia.dev/api/auth/v2
Include in header: Authorization: Bearer {token}
Token lifetime: 10 minutes. Refresh via POST /api/auth/refresh.
When to Use
Use this endpoint when building any user interface that requires a state selection field, such as address forms during customer onboarding, profile updates, or payment card shipping. It provides a canonical list of U.S. states to ensure consistency across your application and avoid hardcoding state data on the client side.
Response
200 OK
| Field | Type | Description |
|---|---|---|
name | string | The full name of the state (e.g., "California") |
id | integer (int32) | Numeric identifier for the state |
description | string | Additional descriptive text for the state entry, if available |
groupName | string | Group classification for the entry, if applicable |
endpoints | array of strings | List of related API endpoints associated with this enum value, if any |
[
{
"name": "Alabama",
"id": 1,
"description": "AL",
"groupName": null,
"endpoints": []
},
{
"name": "Alaska",
"id": 2,
"description": "AK",
"groupName": null,
"endpoints": []
},
{
"name": "California",
"id": 5,
"description": "CA",
"groupName": null,
"endpoints": []
},
{
"name": "Florida",
"id": 10,
"description": "FL",
"groupName": null,
"endpoints": []
},
{
"name": "Texas",
"id": 44,
"description": "TX",
"groupName": null,
"endpoints": []
}
]Error Codes
| Code | When it happens |
|---|---|
| 401 | Token missing, expired, or invalid |
| 403 | Insufficient permissions |
| 500 | Internal server error |
Common Mistakes
- Forgetting to include the
Authorization: Bearer {token}header — this endpoint still requires a valid Bearer token even though it returns reference data. - Hardcoding state values in your application instead of fetching from this endpoint — use the API to ensure your state list stays current and consistent with the platform.
- Using the
idfield as a state abbreviation — thedescriptionfield typically holds the two-letter state code (e.g., "CA"), whileidis a numeric identifier internal to the platform.
Related Endpoints
GET /api/enums/country— Retrieve a list of countries for use in address and selection fieldsGET /api/enums/currency— Retrieve supported currency types
Example
curl -X GET https://api.banking.netevia.dev/api/enums/state \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Accept: application/json"