List of states

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

FieldTypeDescription
namestringThe full name of the state (e.g., "California")
idinteger (int32)Numeric identifier for the state
descriptionstringAdditional descriptive text for the state entry, if available
groupNamestringGroup classification for the entry, if applicable
endpointsarray of stringsList 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

CodeWhen it happens
401Token missing, expired, or invalid
403Insufficient permissions
500Internal 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 id field as a state abbreviation — the description field typically holds the two-letter state code (e.g., "CA"), while id is a numeric identifier internal to the platform.

Related Endpoints

  • GET /api/enums/country — Retrieve a list of countries for use in address and selection fields
  • GET /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"
Headers
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Response

Language
Credentials
Bearer
JWT
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
text/plain
application/json
text/json