Home › Docs › Hubs API

Hubs API

Endpoints for listing hubs, retrieving configuration details, checking real-time health status, and managing door access.

GET /hubs

Get list of all hubs owned/managed by the authenticated user.

Version1
URLhttps://tina-api.venhub.com/api/v1/owners/hubs
AuthAPI Key or Firebase
Required Scopehubs:read

Example Request

cURL
curl -X GET \
  "https://tina-api.venhub.com/api/v1/owners/hubs" \
  --header "X-API-Key: vh_abc123..."

Response

JSON — 200 OK
[
  {
    "id": 123,
    "name": "Downtown Location",
    "street_address_1": "123 Main St",
    "street_address_2": null,
    "city": "San Francisco",
    "state": "CA",
    "hub_status": "active"
  },
  {
    "id": 124,
    "name": "Airport Terminal",
    "street_address_1": "SFO Terminal 2",
    "street_address_2": null,
    "city": "San Francisco",
    "state": "CA",
    "hub_status": "active"
  }
]
GET /hub_ids

Get list of hub IDs the authenticated user has access to.

Version1
URLhttps://tina-api.venhub.com/api/v1/owners/hub_ids
AuthAPI Key or Firebase
Required Scopehubs:read

Example Request

cURL
curl -X GET \
  "https://tina-api.venhub.com/api/v1/owners/hub_ids" \
  --header "X-API-Key: vh_abc123..."

Response

JSON — 200 OK
[123, 124, 125]
GET /hubs/get_hub_info

Get detailed configuration and info for a specific hub.

Version1
URLhttps://tina-api.venhub.com/api/v1/owners/hubs/get_hub_info/
AuthAPI Key or Firebase
Required Scopehubs:read

Example Request

cURL
curl -X GET \
  "https://tina-api.venhub.com/api/v1/owners/hubs/get_hub_info/?hub_id=123" \
  --header "X-API-Key: vh_abc123..."

Parameters

ParameterTypeLocationRequiredDescription
hub_idIntegerQueryRequiredHub ID to retrieve info for

Response

JSON — 200 OK
{
  "success": true,
  "id": 123,
  "name": "Downtown Location",
  "street_address_1": "123 Main St",
  "street_address_2": null,
  "city": "San Francisco",
  "state": "CA",
  "postal_code": "94102",
  "geojson_location": {
    "type": "Point",
    "coordinates": [-122.4194, 37.7749]
  },
  "timezone": "America/Los_Angeles",
  "hub_status": "active"
}
GET /hubs/hub_layout

Get physical layout mapping (cabinets, shelves, rows) for a hub.

Version1
URLhttps://tina-api.venhub.com/api/v1/owners/hubs/hub_layout/
AuthAPI Key or Firebase
Required Scopehubs:read

Example Request

cURL
curl -X GET \
  "https://tina-api.venhub.com/api/v1/owners/hubs/hub_layout/?hub_id=123" \
  --header "X-API-Key: vh_abc123..."

Parameters

ParameterTypeLocationRequiredDescription
hub_idIntegerQueryRequiredHub ID to retrieve layout for

Response

JSON — 200 OK
{
  "layout": {
    "1": {
      "shelves": [
        { "shelf_number": 1, "total_rows": 5 }
      ]
    },
    "2": {
      "shelves": [
        { "shelf_number": 1, "total_rows": 3 }
      ]
    }
  }
}
GET /hubs/get_hub_health

Get real-time health status and diagnostics for a hub.

Version1
URLhttps://tina-api.venhub.com/api/v1/owners/hubs/get_hub_health/
AuthAPI Key or Firebase
Required Scopehubs:read

Example Request

cURL
curl -X GET \
  "https://tina-api.venhub.com/api/v1/owners/hubs/get_hub_health/?hub_id=123" \
  --header "X-API-Key: vh_abc123..."

Parameters

ParameterTypeLocationRequiredDescription
hub_idIntegerQueryRequiredHub ID to retrieve health status for

Response

JSON — 200 OK
{
  "hub_id": 123,
  "online": true,
  "last_heartbeat": "2026-02-05T14:30:00Z",
  "bins": [
    { "bin_number": 1, "enabled": true, "status": "healthy" },
    { "bin_number": 2, "enabled": true, "status": "healthy" },
    { "bin_number": 3, "enabled": false, "status": "maintenance" },
    { "bin_number": 4, "enabled": true, "status": "healthy" }
  ],
  "fridges": [
    { "fridge_number": 1, "enabled": true, "temperature": 38.5, "status": "healthy" }
  ],
  "door_status": "closed",
  "network_status": "connected"
}
GET /get_door_status

Get current door lock status and check for pending orders.

Version1
URLhttps://tina-api.venhub.com/api/v1/owners/get_door_status/
AuthAPI Key or Firebase
Required Scopehubs:read

Example Request

cURL
curl -X GET \
  "https://tina-api.venhub.com/api/v1/owners/get_door_status/?hub_id=123" \
  --header "X-API-Key: vh_abc123..."

Parameters

ParameterTypeLocationRequiredDescription
hub_idIntegerQueryRequiredHub ID to retrieve door status for

Response

JSON — 200 OK
{
  "door_status": [
    { "door": "main", "status": "locked" }
  ],
  "order_status": {
    "has_pending_orders": false
  }
}
POST /request_door_open

Request to unlock the hub's main entrance door.

Version1
URLhttps://tina-api.venhub.com/api/v1/owners/request_door_open/
AuthAPI Key or Firebase
Required Scopehubs:write

Example Request

cURL
curl -X POST \
  "https://tina-api.venhub.com/api/v1/owners/request_door_open/?hub_id=123" \
  --header "X-API-Key: vh_abc123..."

Parameters

ParameterTypeLocationRequiredDescription
hub_idIntegerQueryRequiredHub ID whose door to unlock

Response

JSON — 200 OK
{
  "success": true,
  "data": null,
  "message": "Door unlocked"
}

Errors

Error CodeDescription
order_in_progressCannot open door while an order is in progress
GET /fridge_door_cabinet_map

Get mapping of fridge doors to cabinet numbers.

Version1
URLhttps://tina-api.venhub.com/api/v1/owners/fridge_door_cabinet_map/
AuthAPI Key or Firebase
Required Scopehubs:read

Example Request

cURL
curl -X GET \
  "https://tina-api.venhub.com/api/v1/owners/fridge_door_cabinet_map/?hub_id=123" \
  --header "X-API-Key: vh_abc123..."

Parameters

ParameterTypeLocationRequiredDescription
hub_idIntegerQueryRequiredHub ID to retrieve fridge door map for

Response

JSON — 200 OK
{
  "data": {
    "1": { "left": 2, "middle": 3, "right": 4 },
    "2": { "left": 5, "middle": 6, "right": 7 }
  }
}