Pilot

Most of pilot interaction requires the user to have their Discord account linked with vAMSYS - this way we can authoritatively say the user is the pilot and provide relevant data. Discord accounts are linked at vAMSYS User Profile.


Get Pilot Details

POST/api/[...]/discord/pilot

This endpoint allows you to retrieve Pilot Details.

Supported Authentication Types

API TokenClient TokenGrant Token
YesYesNo

Available Body Attributes

  • Name
    discord_member_id
    Type
    ID or comma separted list of IDs
    Description

    Discord User ID

Account not Linked Response

{
    "status": "error",
    "message": "Account not linked with vAMSYS"
    "request": {
        "discord_member_id": "157301897948430336"
        OR
        "discord_member_id": "157301897948430336", "157301897948430337"
    }
}

Pilot Account not Found Response

{
    "status": "error",
    "message": "Pilot Account not Found"
    "request": {
        "discord_member_id": 157301897948430336
        OR
        "discord_member_id": 157301897948430336, 157301897948430337
    }
}

Success Response

{
    "status": "success",
    "request": {
        "discord_member_id": "157301897948430336"
        OR
        "discord_member_id": "157301897948430336", "157301897948430337"
    },
    "data": {
        "157301897948430336": {
            "user_id": 123,
            "pilot_id": 456,
            "username": "HTA100",
            "user_name": "Lukas J.",
            "pilot_created": "2015-08-30 15:45:58",
            "rank": {
                "name": "Second Officer",
                "abbreviation": "2/O",
                "image": "https://cdn.vamsys.xyz/rank_icons/abc.png"
            },
            "statistics": {
                "latestPirep": {...},
                "pireps": {...},
                "flightTime": {...},
                "points": {...},
                ...
            }
        },
        "157301897948430337": {
            "user_id": 987,
            "pilot_id": 654,
            ...
        },
    }
}