TM Prices

    EndpointDescription
    GET /v1/tms/pricesGets a list of TM prices
    GET /v1/tms/prices/:tm_idGets a TM's price
    POST /v1/tms/prices/:tm_idUpdates a TM's price

    GET /v1/tms/prices

    Gets a list of TM prices

    Request Parameters

    None

    Example Request

    Header:

    GET /v1/tms/prices
    Host: api.pkmnapi.com
    Authorization: Bearer <access_token>
    

    Body:

    None

    Response Parameters

    Name Type Description
    data array
    data[] object
    data[].id string TM ID. (identical to :tm_id)
    data[].type string Type of resource. Must be "tm_prices".
    data[].attributes object
    data[].attributes.price number TM price.
    data[].links object
    data[].links.self string Link to current resource.
    links object
    links.self string Link to list resource.

    Example Response

    Headers:

    HTTP/1.1 200 OK
    Content-Type: application/json
    Server: pkmnapi/0.1.0
    

    Body:

    {
        "data": [
            {
                "id": "1",
                "type": "tm_prices",
                "attributes": {
                    "price": 3000
                },
                "links": {
                    "self": "https://api.pkmnapi.com/v1/tms/prices/1"
                }
            },
            ...
        ],
        "links": {
            "self": "https://api.pkmnapi.com/v1/tms/prices"
        }
    }
    

    GET /v1/tms/prices/:tm_id

    Gets a TM's price

    Request Parameters

    Location Name Type Required? Description
    url :tm_id string ✔️ TM ID.

    Example Request

    Header:

    GET /v1/tms/prices/1
    Host: api.pkmnapi.com
    Authorization: Bearer <access_token>
    

    Body:

    None

    Response Parameters

    Name Type Description
    data object
    data.id string TM ID. (identical to :tm_id)
    data.type string Type of resource. Must be "tm_prices".
    data.attributes object
    data.attributes.price number TM price.
    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": "1",
            "type": "tm_prices",
            "attributes": {
                "price": 3000
            },
            "links": {
                "self": "https://api.pkmnapi.com/v1/tms/prices/1"
            }
        },
        "links": {
            "self": "https://api.pkmnapi.com/v1/tms/prices/1"
        }
    }
    

    POST /v1/tms/prices/:tm_id

    Updates a TM's price

    Request Parameters

    Location Name Type Required? Description
    url :tm_id string ✔️ TM ID.
    header X-Patch-Description string Description of change.
    body data object ✔️
    body data.type string ✔️ Type of data. Must be "tm_prices".
    body data.attributes object ✔️
    body data.attributes.price number ✔️ TM price.

    Example Request

    Header:

    POST /v1/tms/prices/1
    Host: api.pkmnapi.com
    Authorization: Bearer <access_token>
    Content-Type: application/json
    X-Patch-Description: Update TM01 price
    

    Body:

    {
        "data": {
            "type": "tm_prices",
            "attributes": {
                "price": 9000
            }
        }
    }
    

    Response Parameters

    None

    Example Response

    Headers:

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

    Body:

    {}