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.

GET /v1/locations/{code}/inventory 200 OK
$ curl https://api.replicant.space/v1/locations/TARAZEDAR-BELT-1/inventory \
    -H "Authorization: Bearer $API_KEY"
response response
{
  "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.

GET /v1/locations/{code}/inventory 200 OK
$ curl https://api.replicant.space/v1/locations/TARAZEDAR/inventory \
    -H "Authorization: Bearer $API_KEY"
response response
{
  "locations": [
    {
      "location": "TARAZEDAR-BELT-1",
      "items": {
        "carbon": 348,
        "structural": 9234
      }
    },
    {
      "location": "TARAZEDAR-2-3",
      "items": {
        "silicates": 412,
        "rares": 38
      }
    }
  ]
}