| Endpoint | Description |
|---|---|
| GET /v1/trainers/pics/:trainer_id | Gets a trainer's pic |
| GET /v1/trainers/pics/:trainer_id | Updates a trainer's pic |
Gets a trainer's pic
| Location | Name | Type | Required? | Description |
|---|---|---|---|---|
| url |
:trainer_id
|
string | ✔️ | Trainer ID. |
| 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". |
Header:
GET /v1/trainers/pics/34
Host: api.pkmnapi.com
Authorization: Bearer <access_token>
Accept: image/png
Body:
None
Header:
HTTP/1.1 200 OK
Content-Type: image/png
Content-Disposition: attachment; filename="BROCK.png"
Server: pkmnapi/0.1.0
Body:

Updates a trainer's pic
| Location | Name | Type | Required? | Description |
|---|---|---|---|---|
| url |
:trainer_id
|
string | ✔️ | Trainer ID. |
| 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 | ✔️ | Trainer pic. |
Header:
POST /v1/trainers/pics/34
Host: api.pkmnapi.com
Authorization: Bearer <access_token>
Content-Type: image/png
X-Patch-Description: Update BROCK's pic
Body:

⚠️ Images must be 8-bit (or fewer) grayscale and the dimensions must be multiples of 8 pixels
Headers:
HTTP/1.1 202 Accepted
Content-Type: application/json
Server: pkmnapi/0.1.0
Body:
{}