States

Add, edit, and delete anything related to states.

State

state_id
integer

The internal ID for this state/territory/province/county.

country_code
string

The 2 character country code for this state/territory/province/county.

state_code
string

The 2 character code for this state/territory/province/county.

state_name
string

The full name of this state

group_name
string

You may group states/territories/provinces/counties by entering the same value for all in the group.

sort_order
integer

The sort order of this item in a list.

enabled
boolean

Determines if this is shown to the customer.

{
  • "state_id": 0,
  • "country_code": "string",
  • "state_code": "string",
  • "state_name": "string",
  • "group_name": "string",
  • "sort_order": 0,
  • "enabled": true
}

Gets a list of states

This allows you to get a list of states

SecuritybearerAuth or basicAuth
Request
query Parameters
page
integer <int64>

Page number starting at 1

perpage
integer <int64>

Number of items per page

sortby
string

Sort results by term

sortdir
string

Sort results ASC or DESC

country_code
string

Filter states by a country code

Responses
200

Successful operation

400

Unauthorized

get/states
Request samples
Response samples
application/json
[
  • {
    }
]

Add a state

This allows you to add a new state

SecuritybearerAuth
Request
Request Body schema: application/json
required

Submit any or all elements to add a new state.

country_code
required
string

The 2 character country code for this state/territory/province/county.

state_code
required
string

The 2 character code for this state/territory/province/county.

state_name
string

The full name of this state

group_name
string

You may group states/territories/provinces/counties by entering the same value for all in the group.

sort_order
integer

The sort order of this item in a list.

enabled
boolean

Determines if this is shown to the customer.

Responses
200

Successful operation

400

Unauthorized

post/states
Request samples
application/json
{
  • "country_code": "string",
  • "state_code": "string",
  • "state_name": "string",
  • "group_name": "string",
  • "sort_order": 0,
  • "enabled": true
}
Response samples
application/json
{
  • "state_id": 0,
  • "country_code": "string",
  • "state_code": "string",
  • "state_name": "string",
  • "group_name": "string",
  • "sort_order": 0,
  • "enabled": true
}

Gets a state by ID

This allows you to get a state from your store by state ID

SecuritybearerAuth or basicAuth
Request
path Parameters
state_id
required
integer <int64>

State ID

Responses
200

Successful operation

400

Unauthorized

get/states/{state_id}
Request samples
Response samples
application/json
{
  • "state_id": 0,
  • "country_code": "string",
  • "state_code": "string",
  • "state_name": "string",
  • "group_name": "string",
  • "sort_order": 0,
  • "enabled": true
}

Updates a state by ID

This allows you to update a state

SecuritybearerAuth
Request
path Parameters
state_id
required
integer <int64>

State ID

Request Body schema: application/json
required

Submit any or all elements to update the state.

country_code
string

The 2 character country code for this state/territory/province/county.

state_code
string

The 2 character code for this state/territory/province/county.

state_name
string

The full name of this state

group_name
string

You may group states/territories/provinces/counties by entering the same value for all in the group.

sort_order
integer

The sort order of this item in a list.

enabled
boolean

Determines if this is shown to the customer.

Responses
200

Successful operation

400

Unauthorized

patch/states/{state_id}
Request samples
application/json
{
  • "country_code": "string",
  • "state_code": "string",
  • "state_name": "string",
  • "group_name": "string",
  • "sort_order": 0,
  • "enabled": true
}
Response samples
application/json
{
  • "state_id": 0,
  • "country_code": "string",
  • "state_code": "string",
  • "state_name": "string",
  • "group_name": "string",
  • "sort_order": 0,
  • "enabled": true
}

Deletes a state by ID

This allows you to delete a state from your store

SecuritybearerAuth
Request
path Parameters
state_id
required
integer <int64>

State ID

Responses
200

Successful operation

400

Unauthorized

delete/states/{state_id}
Request samples
Response samples
application/json
{
  • "state_id": 0,
  • "country_code": "string",
  • "state_code": "string",
  • "state_name": "string",
  • "group_name": "string",
  • "sort_order": 0,
  • "enabled": true
}