SAV Player Names

    EndpointDescription
    GET /v1/savs/player_namesGets saved player name
    POST /v1/savs/player_namesUpdates saved player name

    GET /v1/savs/player_names

    Gets saved player name

    Request Parameters

    None

    Example Request

    Header:

    GET /v1/savs/player_names
    Host: api.pkmnapi.com
    Authorization: Bearer <access_token>
    

    Body:

    None

    Response Parameters

    Name Type Description
    data object
    data.id string Player ID.
    data.type string Type of resource. Must be "sav_player_names".
    data.attributes object
    data.attributes.name string Saved player name.
    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": "1337",
            "type": "sav_player_names",
            "attributes": {
                "name": "RED"
            },
            "links": {
                "self": "https://api.pkmnapi.com/v1/savs/player_names"
            }
        },
        "links": {
            "self": "https://api.pkmnapi.com/v1/savs/player_names"
        }
    }
    

    POST /v1/savs/player_names

    Updates saved player name

    Request Parameters

    Location Name Type Required? Description
    header X-Patch-Description string Description of change.
    body data object ✔️
    body data.type string ✔️ Type of data. Must be "sav_player_names".
    body data.attributes object ✔️
    body data.attributes.name string ✔️ Saved player name.

    Example Request

    Header:

    POST /v1/savs/player_names
    Host: api.pkmnapi.com
    Authorization: Bearer <access_token>
    Content-Type: application/json
    X-Patch-Description: Update RED to ASH
    

    Body:

    {
        "data": {
            "type": "sav_player_names",
            "attributes": {
                "name": "ASH"
            }
        }
    }
    

    Response Parameters

    None

    Example Response

    Headers:

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

    Body:

    {}