API Commander v1

Last Revision: 21/03/2019 11:07:53

To recover most of the private informations, an API Key is needed.

All messages returned by the API are in JSON. Most queries work with GET but they should also be compatible with POST requests.

Get commander ranks

HTTP Request: GET https://www.edsm.net/api-commander-v1/get-ranks

Parameter Default Description
commanderName* NULL

The name of the commander as registered on EDSM.
Your commander name for example is: Guest.

apiKey NULL

The API Key associate the commander name with his account.
API Key can be generated under the settings > My API Key tab.

API Key is used to ensure your private informations stays private.

If not provided, ranks will only be returned if the commander has enabled his public profile.

Output:

{
    msgnum: 100,
    msg: "OK",
    ranks: {
        Combat      : 3,
        Trade       : 3,
        Explore     : 7,
        CQC         : 0,
        Federation  : 0,
        Empire      : 0
    },
    progress: {
        Combat      : 91,
        Trade       : 1,
        Explore     : 7,
        CQC         : 0,
        Federation  : 56,
        Empire      : 0
    },
    ranksVerbose: {
        Combat      : "Competent",
        Trade       : "Dealer",
        Explore     : "Pioneer",
        CQC         : "Helpless",
        Federation  : "None",
        Empire      : "None"
    }
}

Parameter Description
msgnum

The code of the output. See Codes section for more informations.

msg

The verbose message of the output. See Codes section for more informations.

ranks

An array containing the commander ranks.

progress

An array containing the current progress of the commander in the current ranks.

ranksVerbose

An array containing the verbose output of the commander ranks.

Codes

Code Message
100 OK

Everything went fine!

201 Missing commander name

Commander name is a required parameter and must be one of the registered user on EDSM.

203 Commander name/API Key not found

The commander name or the API Key provided does not correspond to any user in our database.

207 No ranks stored

No ranks are stored in our database yet, or the apiKey was not provided on a private profile.

Get commander credits

HTTP Request: GET https://www.edsm.net/api-commander-v1/get-credits

Parameter Default Description
commanderName* NULL

The name of the commander as registered on EDSM.
Your commander name for example is: Guest.

apiKey* NULL

The API Key associate the commander name with his account.
API Key can be generated under the settings > My API Key tab.

API Key is used to ensure your private informations stays private.

period NULL

By default the method return the last entry of the user credits. You can retrieve more values by passing a period.

Applicable period are: 7DAY, 1MONTH, 3MONTH, 6MONTH.

Output:

{
    msgnum  : 100,
    msg     : "OK",
    credits : [
        {
            balance : 48593473,
            loan    : 0,
            date    : "2016-10-26 10:10:55"
        }
    ]
}

Parameter Description
msgnum

The code of the output. See Codes section for more informations.

msg

The verbose message of the output. See Codes section for more informations.

credits

An array containing the commander balance, loan and date of the values.

Codes

Code Message
100 OK

Everything went fine!

201 Missing commander name

Commander name is a required parameter and must be one of the registered user on EDSM.

203 Commander name/API Key not found

The commander name or the API Key provided does not correspond to any user in our database.

208 No credits stored

No credits are stored in our database yet.

Get commander materials/encoded data/cargo

HTTP Request: GET https://www.edsm.net/api-commander-v1/get-materials

Parameter Default Description
commanderName* NULL

The name of the commander as registered on EDSM.
Your commander name for example is: Guest.

apiKey NULL

The API Key associate the commander name with his account.
API Key can be generated under the settings > My API Key tab.

API Key is used to ensure your private informations stays private.

If not provided, data will only be returned if the commander has enabled his public profile and share his inventory.

type materials

The type of data to fetch.
Can be one of:

  • materials: To fetch materials
  • data: To fetch encoded data
  • cargo: To fetch cargo inventory

Output:

{
    msgnum      : 100,
    msg         : "OK",
    materials   : [
        {
            type    : "antimony",
            name    : "Antimony",
            qty     : 3
        },
        {
            type    : "arsenic",
            name    : "Arsenic",
            qty     : 2
        }
    ]
}

Parameter Description
msgnum

The code of the output. See Codes section for more informations.

msg

The verbose message of the output. See Codes section for more informations.

materials

An array containing the commander materials.

data

An array containing the commander encoded data.

cargo

An array containing the commander cargo.

Codes

Code Message
100 OK

Everything went fine!

201 Missing commander name

Commander name is a required parameter and must be one of the registered user on EDSM.

203 Commander name/API Key not found

The commander name or the API Key provided does not correspond to any user in our database.

204 Wrong type

The type is not available.