Inventory at a location
The resources you currently have stockpiled at a specific location. Pass a star code instead to get a per-location breakdown for the whole system.
Endpoint
GET /v1/locations/{code}/inventory
Single location
When {code} is a specific location like a planet, moon or belt, the response is a single inventory block.
$ curl https://api.replicant.space/v1/locations/TARAZEDAR-BELT-1/inventory \
-H "Authorization: Bearer $API_KEY" {
"location": "TARAZEDAR-BELT-1",
"items": {
"carbon": 348,
"structural": 9234,
"silicates": 1820,
"conductive": 412
}
} By star
Pass a star code and the response groups your stockpiles by location across the whole system.
$ curl https://api.replicant.space/v1/locations/TARAZEDAR/inventory \
-H "Authorization: Bearer $API_KEY" {
"locations": [
{
"location": "TARAZEDAR-BELT-1",
"items": {
"carbon": 348,
"structural": 9234
}
},
{
"location": "TARAZEDAR-2-3",
"items": {
"silicates": 412,
"rares": 38
}
}
]
}