Endpoint | Description |
---|---|
GET /v1/pokemon/evolutions | Gets a list of Pokémon evolutions |
GET /v1/pokemon/evolutions/:pokedex_id | Gets a Pokémon's evolutions |
POST /v1/pokemon/evolutions/:pokedex_id | Updates a Pokémon's evolutions |
Gets a list of Pokémon evolutions
Header:
GET /v1/pokemon/evolutions
Host: api.pkmnapi.com
Authorization: Bearer <access_token>
Body:
None
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_evolutions". |
data[].attributes
|
object | |
data[].attributes.evolutions
|
array | |
data[].attributes.evolutions[].evolution_type
|
string | Pokémon evolution type. (must be "level", "item", or "trade") |
data[].attributes.evolutions[].level
|
number |
Level at which Pokémon evolves. (only present if evolution_type is "level")
|
data[].attributes.evolutions[].item
|
number |
Item that evolves the Pokémon. (only present if evolution_type is "item")
|
data[].attributes.evolutions[].item.id
|
string | Item ID. |
data[].attributes.evolutions[].item.type
|
string | Type of resource. Must be "item_names". |
data[].attributes.evolutions[].item.attributes
|
object | |
data[].attributes.evolutions[].item.attributes.name
|
string | Item name. |
data[].attributes.evolutions[].item.links
|
object | |
data[].attributes.evolutions[].item.links.self
|
string | Link to item resource. |
data[].attributes.evolutions[].pokemon
|
object | Pokémon. |
data[].attributes.evolutions[].pokemon.id
|
string | Pokédex ID. |
data[].attributes.evolutions[].pokemon.type
|
string | Type of resource. Must be "pokemon_names". |
data[].attributes.evolutions[].pokemon.attributes
|
object | |
data[].attributes.evolutions[].pokemon.attributes.name
|
string | Pokémon name. |
data[].attributes.evolutions[].pokemon.links
|
object | |
data[].attributes.evolutions[].pokemon.links.self
|
string | Link to Pokémon resource. |
data[].links
|
object | |
data[].links.self
|
string | Link to current resource. |
links
|
object | |
links.self
|
string | Link to list resource. |
Headers:
HTTP/1.1 200 OK
Content-Type: application/json
Server: pkmnapi/0.1.0
Body:
{
"data": [
{
"id": "1",
"type": "pokemon_evolutions",
"attributes": {
"evolutions": [
{
"evolution_type": "level",
"level": 16,
"pokemon": {
"id": "2",
"type": "pokemon_names",
"attributes": {
"name": "IVYSAUR"
},
"links": {
"self": "https://api.pkmnapi.com/v1/pokemon/names/1"
}
}
}
]
},
"links": {
"self": "https://api.pkmnapi.com/v1/pokemon/evolutions/1"
}
},
...
],
"links": {
"self": "https://api.pkmnapi.com/v1/pokemon/evolutions"
}
}
Gets a Pokémon's evolutions
Location | Name | Type | Required? | Description |
---|---|---|---|---|
url |
:pokedex_id
|
string | ✔️ | Pokédex ID. |
Header:
GET /v1/pokemon/evolutions/1
Host: api.pkmnapi.com
Authorization: Bearer <access_token>
Body:
None
Name | Type | Description |
---|---|---|
data
|
object | |
data.id
|
string |
Pokédex ID. (identical to :pokedex_id )
|
data.type
|
string | Type of resource. Must be "pokemon_evolutions". |
data.attributes
|
object | |
data.attributes.evolutions
|
array | |
data.attributes.evolutions[].evolution_type
|
string | Pokémon evolution type. (must be "level", "item", or "trade") |
data.attributes.evolutions[].level
|
number |
Level at which Pokémon evolves. (only present if evolution_type is "level")
|
data.attributes.evolutions[].item
|
number |
Item that evolves the Pokémon. (only present if evolution_type is "item")
|
data.attributes.evolutions[].item.id
|
string | Item ID. |
data.attributes.evolutions[].item.type
|
string | Type of resource. Must be "item_names". |
data.attributes.evolutions[].item.attributes
|
object | |
data.attributes.evolutions[].item.attributes.name
|
string | Item name. |
data.attributes.evolutions[].item.links
|
object | |
data.attributes.evolutions[].item.links.self
|
string | Link to item resource. |
data.attributes.evolutions[].pokemon
|
object | Pokémon. |
data.attributes.evolutions[].pokemon.id
|
string | Pokédex ID. |
data.attributes.evolutions[].pokemon.type
|
string | Type of resource. Must be "pokemon_names". |
data.attributes.evolutions[].pokemon.attributes
|
object | |
data.attributes.evolutions[].pokemon.attributes.name
|
string | Pokémon name. |
data.attributes.evolutions[].pokemon.links
|
object | |
data.attributes.evolutions[].pokemon.links.self
|
string | Link to Pokémon resource. |
data.links
|
object | |
data.links.self
|
string | Link to current resource. |
links
|
object | |
links.self
|
string | Link to current resource. |
Headers:
HTTP/1.1 200 OK
Content-Type: application/json
Server: pkmnapi/0.1.0
Body:
{
"data": {
"id": "1",
"type": "pokemon_evolutions",
"attributes": {
"evolutions": [
{
"evolution_type": "level",
"level": 16,
"pokemon": {
"id": "2",
"type": "pokemon_names",
"attributes": {
"name": "IVYSAUR"
},
"links": {
"self": "https://api.pkmnapi.com/v1/pokemon/names/1"
}
}
}
]
},
"links": {
"self": "https://api.pkmnapi.com/v1/pokemon/evolutions/1"
}
},
"links": {
"self": "https://api.pkmnapi.com/v1/pokemon/evolutions/1"
}
}
Updates a Pokémon's evolutions
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_evolutions". |
body |
data.attributes
|
object | ✔️ | |
body |
data.attributes.evolutions
|
array | ✔️ | |
body |
data.attributes.evolutions[].evolution_type
|
string | ✔️ | Pokémon evolution type. (must be "level", "item", or "trade") |
body |
data.attributes.evolutions[].level
|
number |
✔️ (if evolution_type is "level")
|
Level at which Pokémon evolves. |
body |
data.attributes.evolutions[].item
|
number |
✔️ (if evolution_type is "item")
|
Item that evolves the Pokémon. |
body |
data.attributes.evolutions[].item.id
|
string |
✔️ (if evolution_type is "item")
|
Item ID. |
body |
data.attributes.evolutions[].pokemon
|
object | ✔️ | Pokémon. |
body |
data.attributes.evolutions[].pokemon.id
|
string | ✔️ | Pokédex ID. |
Header:
POST /v1/pokemon/evolutions/1
Host: api.pkmnapi.com
Authorization: Bearer <access_token>
Content-Type: application/json
X-Patch-Description: Update BULBASAUR to evolve into PIKACHU
Body:
{
"data": {
"type": "pokemon_evolutions",
"attributes": {
"evolutions": [
{
"evolution_type": "level",
"level": 16,
"pokemon": {
"id": "25"
}
}
]
}
}
}
Headers:
HTTP/1.1 202 Accepted
Content-Type: application/json
Server: pkmnapi/0.1.0
Body:
{}