Skip to content

GET /species/{id}

Retrieves the specified species complete information. Data is masked if species has not been discovered by current trainer.

URL

https://api.pokedexercice.ch/species/{id}

Parameters

No parameters

Return

200

{
id: number;
name: string;
types: string[];
description: string;
image: string;
genre: string;
weight: number;
height: number;
}

Examples

Requesting a discovered species

fetch('https://api.pokedexercice.ch/species/25', {
method: 'GET',
headers: { 'Authorization': `Bearer MY_PERSONAL_TOKEN` }
});

Response

{
"data": {
"id": 25,
"name": "pikachu",
"image": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/other/official-artwork/25.png",
"genre": "Mouse",
"description": "When several of these POKéMON gather, their electricity could build and cause lightning storms.",
"weight": 6,
"height": 0.4,
"types": [
"electric"
]
}
}

Requesting a non-discovered species

fetch('https://api.pokedexercice.ch/species/143', {
method: 'GET',
headers: { 'Authorization': `Bearer MY_PERSONAL_TOKEN` }
});

Response

{
"data": {
"name": "???",
"types": [],
"description": "???",
"image": "https://placehold.co/475x475?text=?",
"genre": "???",
"weight": "???",
"height": "???",
"id": 143
}
}