States

V1

States are used to categorize theatres based on state.


Endpoints

Verb Endpoint Description
GET /v1/states Get All States.
GET /v1/states/{state-slug} Get State By Slug.

States Query Parameters

  • You may optionally supply a page-number query string parameter to specify which page of results to retrieve.
    • If one isn't provided the results will begin with the first page (a value of 1 will be used).
  • You may optionally supply a page-size query string parameter to specify the number of results per page.
    • If one isn't provided a default of 10 will be used.

States Properties

Name Description
pageSize The number of results included for each page, up to a maximum of 100. Defaults to 10.
pageNumber The page number returned.
count The total number of results available across all pages.
_embedded.States A list of State Representations returned.

States Links

Relation Description Verbs Templated
self The current list of states results. GET No
previous The previous page of states results. GET No
next The next page of states results. GET No

State


State Properties

Name Description
name Full name for display.
abbreviation The state abbreviation.
slug The state slug.
_embedded.Cities A list of City Representations returned.


State Links

Relation Description Methods Templated
self The current state representation. GET No
https://api.amctheatres.com/v2/theatres A list of theatres in this state. GET No

City


City Properties

Name Description
name Full name for display.
slug The city slug.


City Links

Relation Description Methods Templated
self The current city representation. GET No
https://api.amctheatres.com/v2/theatres List of theatres in the current city. GET No

Examples

Get All States.
GET  /v1/states

Response

{
  "pageSize": 1,
  "pageNumber": 1,
  "count": 42,
  "_embedded": {
    "states": [
      {
        "name": "ALABAMA",
        "abbreviation": "AL",
        "slug": "alabama",
        "_embedded": {
          "cities": [
            {
              "name": "MONTGOMERY",
              "slug": "montgomery",
              "_links": {
                "self": {
                  "href": "https://api.amctheatres.com/v1/states/alabama/montgomery",
                  "templated": false
                },
                "https://api.amctheatres.com/v2/theatres": {
                  "href": "https://api.amctheatres.com/v2/theatres?state=alabama&city=montgomery",
                  "templated": false
                }
              }
            }
          ]
        },
        "_links": {
          "self": {
            "href": "https://api.amctheatres.com/v1/states/alabama",
            "templated": false
          },
          "https://api.amctheatres.com/v2/theatres": {
            "href": "https://api.amctheatres.com/v2/theatres?state=alabama",
            "templated": false
          }
        }
      }
    ]
  },
  "_links": {
    "self": {
      "href": "https://api.amctheatres.com/v1/states?pageNumber=1&pageSize=1",
      "templated": false
    },
    "previous": {
      "href": "https://api.amctheatres.com/v1/states?pageNumber=1&pageSize=1",
      "templated": false
    },
    "next": {
      "href": "https://api.amctheatres.com/v1/states?pageNumber=2&pagesize=1"
    }
  }
}
Get State By Slug.
GET  /v1/states/wyoming

Response

{
  "name": "WYOMING",
  "abbreviation": "WY",
  "slug": "wyoming",
  "_embedded": {
    "cities": [
      {
        "name": "CHEYENNE",
        "slug": "cheyenne",
        "_links": {
          "self": {
            "href": "https://api.amctheatres.com/v1/states/wyoming/cheyenne",
            "templated": false
          },
          "https://api.amctheatres.com/rels/v2/theatres": {
            "href": "https://api.amctheatres.com/v2/theatres?state=wyoming&city=cheyenne",
            "templated": false
          }
        }
      }
    ]
  },
  "_links": {
    "self": {
      "href": "https://api.amctheatres.com/v1/states/wyoming",
      "templated": false
    },
    "https://api.amctheatres.com/rels/v2/theatres": {
      "href": "https://api.amctheatres.com/v2/theatres?state=wyoming",
      "templated": false
    }
  }
}