Pokémon Icons

    EndpointDescription
    GET /v1/pokemon/iconsGets a list of Pokémon icons
    GET /v1/pokemon/icons/:pokedex_idGets a Pokémon's icon
    POST /v1/pokemon/icons/:pokedex_idUpdates a Pokémon's icon

    GET /v1/pokemon/icons

    Gets a list of Pokémon icons

    Request Parameters

    None

    Example Request

    Header:

    GET /v1/pokemon/icons
    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_icons".
    data[].attributes object
    data[].attributes.icon object
    data[].attributes.icon.id string Icon ID.
    data[].attributes.icon.type string Type of resource. Must be "icons".
    data[].attributes.icon.attributes object
    data[].attributes.icon.links object
    data[].attributes.icon.links.self string Link to icon resource.
    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_icons",
                "attributes": {
                    "icon": {
                        "id": "7",
                        "type": "icons",
                        "attributes": {},
                        "links": {
                            "self": "https://api.pkmnapi.com/v1/icons/7"
                        }
                    }
                },
                "links": {
                    "self": "https://api.pkmnapi.com/v1/pokemon/icons/1"
                }
            },
            ...
        ],
        "links": {
            "self": "https://api.pkmnapi.com/v1/pokemon/icons"
        }
    }
    

    GET /v1/pokemon/icons/:pokedex_id

    Gets a Pokémon's icon

    Request Parameters

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

    Example Request

    Header:

    GET /v1/pokemon/icons/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_icons".
    data.attributes object
    data.attributes.icon object
    data.attributes.icon.id string Icon ID.
    data.attributes.icon.type string Type of resource. Must be "icons".
    data.attributes.icon.attributes object
    data.attributes.icon.links object
    data.attributes.icon.links.self string Link to icon resource.
    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_icons",
            "attributes": {
                "icon": {
                    "id": "7",
                    "type": "icons",
                    "attributes": {},
                    "links": {
                        "self": "https://api.pkmnapi.com/v1/icons/7"
                    }
                }
            },
            "links": {
                "self": "https://api.pkmnapi.com/v1/pokemon/icons/1"
            }
        },
        "links": {
            "self": "https://api.pkmnapi.com/v1/pokemon/icons/1"
        }
    }
    

    POST /v1/pokemon/icons/:pokedex_id

    Updates a Pokémon's icon

    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_icons".
    body data.attributes object ✔️
    body data.attributes.icon object ✔️
    body data.attributes.icon.id string ✔️ Icon ID.

    Example Request

    Header:

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

    Body:

    {
        "data": {
            "type": "pokemon_icons",
            "attributes": {
                "icon": {
                    "id": "8"
                }
            }
        }
    }
    

    Response Parameters

    None

    Example Response

    Headers:

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

    Body:

    {}