Pokémon Pics

    EndpointDescription
    GET /v1/pokemon/pics/:pokedex_idGets a Pokémon's pic
    POST /v1/pokemon/pics/:pokedex_idUpdates a Pokémon's pic

    GET /v1/pokemon/pics/:pokedex_id

    Gets a Pokémon's pic

    Request Parameters

    Location Name Type Required? Description
    url :pokedex_id string ✔️ Pokédex ID.
    query face string Face to return. Must be "front" or "back".
    query mirror bool Enable horizontal mirroring. Must be "true" or "false".
    header Accept string Type of image to return. Must be "image/png" or "image/jpeg".

    Example Request

    Header:

    GET /v1/pokemon/pics/1
    Host: api.pkmnapi.com
    Authorization: Bearer <access_token>
    Accept: image/png
    

    Body:

    None

    Response Parameters

    None

    Example Response

    Header:

    HTTP/1.1 200 OK
    Content-Type: image/png
    Content-Disposition: attachment; filename="BULBASAUR.png"
    Server: pkmnapi/0.1.0
    

    Body:

    BULBASAUR.png


    POST /v1/pokemon/pics/:pokedex_id

    Updates a Pokémon's pic

    Request Parameters

    Location Name Type Required? Description
    url :pokedex_id string ✔️ Pokédex ID.
    query face string Face to upload. Must be "front" or "back".
    query method number Encoding method. Must be 1, 2, or 3.
    query prinary number Primary buffer. Must be 0 or 1.
    header Content-Type string Type of image to upload. Must be "image/png" or "image/jpeg".
    header X-Patch-Description string Description of change.
    body <raw> binary ✔️ Pokémon pic.

    Example Request

    Header:

    POST /v1/pokemon/pics/1
    Host: api.pkmnapi.com
    Authorization: Bearer <access_token>
    Content-Type: image/png
    X-Patch-Description: Update BULBASAUR's pic
    

    Body:

    leaf.png

    ⚠️ Images must be 8-bit (or fewer) grayscale and the dimensions must be multiples of 8 pixels

    Response Parameters

    None

    Example Response

    Headers:

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

    Body:

    {}