Pokédex Entries

    EndpointDescription
    GET /v1/pokedex/entriesGets a list of Pokédex entries
    GET /v1/pokedex/entries/:pokedex_idGets a Pokédex entry
    POST /v1/pokedex/entries/:pokedex_idUpdates a Pokédex entry

    GET /v1/pokedex/entries

    Gets a list of Pokédex entries

    Request Parameters

    None

    Example Request

    Header:

    GET /v1/pokedex/entries
    Host: api.pkmnapi.com
    Authorization: Bearer <access_token>
    

    Body:

    None

    Response Parameters

    Name Type Description
    data array
    data[] object
    data[].id string Pokédex ID. (identical to :pokedex_id)
    data[].type string Type of resource. Must be "pokedex_entries".
    data[].attributes object
    data[].attributes.species string Pokémon species.
    data[].attributes.height number Pokémon height. (inches)
    data[].attributes.weight number Pokémon weight. (pounds)
    data[].links object
    data[].links.self string Link to current resource.
    links object
    links.self string Link to list resource.

    Example Response

    Headers:

    HTTP/1.1 200 OK
    Content-Type: application/json
    Server: pkmnapi/0.1.0
    

    Body:

    {
        "data": [
            {
                "id": "1",
                "type": "pokemon_entries",
                "attributes": {
                    "species": "SEED",
                    "height": 28,
                    "weight": 150
                },
                "links": {
                    "self": "https://api.pkmnapi.com/v1/pokedex/entries/1"
                }
            },
            ...
        ],
        "links": {
            "self": "https://api.pkmnapi.com/v1/pokedex/entries"
        }
    }
    

    GET /v1/pokedex/entries/:pokedex_id

    Gets a Pokédex entry

    Request Parameters

    Location Name Type Required? Description
    url :pokedex_id string ✔️ Pokédex ID.

    Example Request

    Header:

    GET /v1/pokedex/entries/1
    Host: api.pkmnapi.com
    Authorization: Bearer <access_token>
    

    Body:

    None

    Response Parameters

    Name Type Description
    data object
    data.id string Pokédex ID. (identical to :pokedex_id)
    data.type string Type of resource. Must be "pokedex_entries".
    data.attributes object
    data.attributes.species string Pokémon species.
    data.attributes.height number Pokémon height. (inches)
    data.attributes.weight number Pokémon weight. (pounds)
    data.links object
    data.links.self string Link to current resource.
    links object
    links.self string Link to current resource.

    Example Response

    Headers:

    HTTP/1.1 200 OK
    Content-Type: application/json
    Server: pkmnapi/0.1.0
    

    Body:

    {
        "data": {
            "id": "1",
            "type": "pokemon_entries",
            "attributes": {
                "species": "SEED",
                "height": 28,
                "weight": 150
            },
            "links": {
                "self": "https://api.pkmnapi.com/v1/pokedex/entries/1"
            }
        },
        "links": {
            "self": "https://api.pkmnapi.com/v1/pokedex/entries/1"
        }
    }
    

    POST /v1/pokedex/entries/:pokedex_id

    Updates a Pokédex entry

    Request Parameters

    Location Name Type Required? Description
    url :pokedex_id string ✔️ Pokédex ID.
    header X-Patch-Description string Description of change.
    body data object ✔️
    body data.type string ✔️ Type of data. Must be "pokedex_entries".
    body data.attributes object ✔️
    body data.attributes.species string ✔️ Pokémon species.
    body data.attributes.height string ✔️ Pokémon height. (inches)
    body data.attributes.weight string ✔️ Pokémon weight. (pounds)

    Example Request

    Header:

    POST /v1/pokedex/entries/1
    Host: api.pkmnapi.com
    Authorization: Bearer <access_token>
    Content-Type: application/json
    X-Patch-Description: Update BULBASAUR's species to LEAF
    

    Body:

    {
        "data": {
            "type": "pokemon_entries",
            "attributes": {
                "species": "LEAF",
                "height": 28,
                "weight": 150
            }
        }
    }
    

    Response Parameters

    None

    Example Response

    Headers:

    HTTP/1.1 202 Accepted
    Content-Type: application/json
    Server: pkmnapi/0.1.0
    

    Body:

    {}