Get States

Returns the list of states/provinces with the global_state_id used when creating or updating a location.

Request Headers

HeaderRequiredDescription
AuthorizationYesBearer YOUR_ACCESS_TOKEN

Request Parameters

This endpoint takes no path, query, or body parameters.

cURL Example

curl --request GET \
  --url https://sandbox-api.softpoint.io/interface/v1/global/states \
  --header "Authorization: Bearer YOUR_ACCESS_TOKEN"

Success Response

The response is an array of state objects (truncated here).

[
  { "id": 1, "name": "Alabama", "code": "AL", "global_country_id": 3 },
  { "id": 4, "name": "California", "code": "CA", "global_country_id": 3 }
]

Response Fields

FieldTypeDescription
idintegerThe global_state_id to reference elsewhere.
namestringState or province name.
codestringState/province code (may be empty for some regions).
global_country_idintegerCountry the state belongs to.

Status Codes

CodeDescription
200State list returned

Workflow Placement

A reference lookup used before Create A Location, to resolve global_state_id.

Notes

  • Pair the chosen state with its parent global_country_id for consistency.

Common Mistakes

  • Selecting a state that does not belong to the chosen country.
Response

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