VGA Planets

Introduction

How The Website Works

Races

Dashboard

Starmap

Planets

Starships

General Information

Guides

Contributions

Searchable Documentation

API account buyhull


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

Overview of /account/buyhull API call

Purchases the ship hull for a specified officer (by race id)

Data Sent

Data Description
apikey Player's existing API key
raceid Race (ID) to buy the hull for
hullid ID for the hull 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 hull can then be subsequently activated.

Data Description
success True
activehulls Comma seperated list of numbers of advantages owned for the active race
(e.g. 14,15,16,17,18,26,27,28,29,30,31,32,33,47,48,59,104,105,106,1047 )
megacredits Gigacredits available after the purchase
(e.g. 4864 )

Failures

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

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

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

{"success":false,"error":"Parameter hullid 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