VGA Planets

Introduction

How The Website Works

Races

Dashboard

Starmap

Planets

Starships

General Information

Guides

Contributions

Searchable Documentation

API account buyadvantage


Introduction —> How The Website Works —> API —> API account buyadvantage

Overview of /account/buyadvantage API call

Purchases the advantage for a specified officer (by race id)

Data Sent

Data Description
apikey Player's existing API key
raceid Race (ID) to buy the advantage for
advantageid ID for the advantage that is being purchased
versioncheck Used to verify the purchase is being made with an updated client. The current clients use 1

Data Returned

If the process is successful, the following response is generated. The advantage can then be subsequently activated.

Data Description
success True
advantages Comma seperated list of numbers of advantages owned for the active race
(e.g. 14,15,16,48,49,32 )
megacredits Gigacredits available after the purchase
(e.g. 9184 )

Failures

{"success":false,"error":"Missing required parameter - apikey"}

{"success":false,"error":"Missing required parameter - raceid"}

{"success":false,"error":"Missing required parameter - advantageid"}

{"success":false,"error":"Parameter raceid is in an incorrect format."}

{"success":false,"error":"Outdated client. Please reload your browser or app to make sure you have the latest methods for purchasing hulls and advantages. This function is also not currently supported on the legacy site play.planet.nu"}

{"success":false,"error":"Not enough Gigacredits."}

Back