Get all locations
GET
https://rickandmorty.zuplo.io
/v1/locations
You can access the list of locations by using the /locations endpoint.
query Parameters
pagenumberPagination index
namestringfilter by the given name
typestringfilter by the type
dimensionstringfilter by the dimension
Headers
Authorizationstring · requiredThe
Authorizationheader is used to authenticate with the API using your API key. Value is of the formatBearer YOUR_KEY_HERE.
Responses
200 OK
infoobject · requiredExample: {"count":126,"pages":7,"next":null,"prev":null}Default: {}resultsobject[] · requiredExample: {"0":{"id":1,"name":"Earth","type":"Planet","dimension":"Dimension C-137","residents":["https://rickandmorty.zuplo.io/v1/characters/1","https://rickandmorty.zuplo.io/v1/characters/2"],"url":"https://rickandmorty.zuplo.io/v1/locations/1","created":"2017-11-10T12:42:04.162Z"}}Default: []
Get locations by ID(s)
GET
https://rickandmorty.zuplo.io
/v1/locations/:locationId
You can get a single location by ID, or multiple by adding an array of ids as parameter: /locations/[1,2,3] or /locations/1,2,3
path Parameters
locationIdstringA single numeric ID or multiple IDs, e.g.
[1,2,3]or1,2
Headers
Authorizationstring · requiredThe
Authorizationheader is used to authenticate with the API using your API key. Value is of the formatBearer YOUR_KEY_HERE.
Responses
200 OK
idinteger · requiredExample: 3Default: 0namestring · requiredExample: Citadel of RicksDefault:typestring · requiredExample: Space stationDefault:dimensionstring · requiredExample: unknownDefault:residentsstring[] · requiredExample: {"0":"https://rickandmorty.zuplo.io/v1/characters/8","1":"https://rickandmorty.zuplo.io/v1/characters/14"}Default: []urlstring · requiredExample: https://rickandmorty.zuplo.io/locations/3Default:createdstring · requiredExample: 2017-11-10T13:08:13.191ZDefault:
