Pokémon Names

    EndpointDescription
    GET /v1/pokemon/namesGets a list of Pokémon name
    GET /v1/pokemon/names/:pokedex_idGets a Pokémon's name
    POST /v1/pokemon/names/:pokedex_idUpdates a Pokémon's name

    GET /v1/pokemon/names

    Gets a list of Pokémon names

    Request Parameters

    None

    Example Request

    Header:

    GET /v1/pokemon/names
    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 "pokemon_names".
    data[].attributes object
    data[].attributes.name string Pokémon name.
    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_names",
                "attributes": {
                    "name": "BULBASAUR"
                },
                "links": {
                    "self": "https://api.pkmnapi.com/v1/pokemon/names/1"
                }
            },
            ...
        ],
        "links": {
            "self": "https://api.pkmnapi.com/v1/pokemon/names"
        }
    }
    

    GET /v1/pokemon/names/:pokedex_id

    Gets a Pokémon's name

    Request Parameters

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

    Example Request

    Header:

    GET /v1/pokemon/names/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 "pokemon_names".
    data.attributes object
    data.attributes.name string Pokémon name.
    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_names",
            "attributes": {
                "name": "BULBASAUR"
            },
            "links": {
                "self": "https://api.pkmnapi.com/v1/pokemon/names/1"
            }
        },
        "links": {
            "self": "https://api.pkmnapi.com/v1/pokemon/names/1"
        }
    }
    

    POST /v1/pokemon/names/:pokedex_id

    Updates a Pokémon's name

    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 "pokemon_names".
    body data.attributes object ✔️
    body data.attributes.name string ✔️ Pokémon name.

    Example Request

    Header:

    POST /v1/pokemon/names/1
    Host: api.pkmnapi.com
    Authorization: Bearer <access_token>
    Content-Type: application/json
    X-Patch-Description: Update BULBASAUR to LEAFY-BOI
    

    Body:

    {
        "data": {
            "type": "pokemon_names",
            "attributes": {
                "name": "LEAFY-BOI"
            }
        }
    }
    

    Response Parameters

    None

    Example Response

    Headers:

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

    Body:

    {}