Skip to main content

States

EntityDatastoreDatastore.State

States represent provinces or states within a country, used in addresses.

Use the Datastore_State endpoint to query states.

Endpoints

List States

GET/v1/odata/Datastore_State

Single State

GET/v1/odata/Datastore_State({id})

Fields

Datastore Fields (inherited)

FieldTypeDescription
NameStringDisplay name
CodeStringUnique code identifier
LocalizedNameStringLocalized display name
IsDefaultBooleanWhether this is the default value

Relationships

RelationshipTarget EntityCardinalityDescription
AddressAddress1:NAddress
CountryDatastore_CountryN:1Country

Expanding Relationships

GET/v1/odata/Datastore_State({id})?$expand=Address
GET/v1/odata/Datastore_State({id})/Address

Filtering Examples

GET/v1/odata/Datastore_State?$filter=Name eq '{Name}'&$top={top}
GET/v1/odata/Datastore_State?$filter=contains(Name, '{Name}')&$top={top}
GET/v1/odata/Datastore_State?$filter=Code eq '{Code}'&$top={top}
GET/v1/odata/Datastore_State?$filter=IsDefault eq {IsDefault}&$top={top}