Getting Started
Everything you need to start integrating with the VenHub API â from account setup to your first authenticated request.
Authentication
API key authentication & scopes
Hubs API
Hub info, health, layout & door access
Inventory API
Read & update products
Orders API
History & refunds
Analytics API
Revenue, sales & customer metrics
Maintenance API
Service reports & media attachments
Controls API
Hardware control for bins & fridges
Promotions API
Banners & deal management
Error Reference
Error codes & handling
Base URL
All endpoints are served under the versioned /api/v1 prefix:
https://tina-api.venhub.com/api/v1
For example, hub_inventory is reached at https://tina-api.venhub.com/api/v1/owners/hub_inventory/.
Authentication
All endpoints require authentication via one of the following methods:
| Method | Header | Description |
|---|---|---|
| API Key | X-API-Key: vh_... |
Third-party API key authentication |
| Firebase | Authorization: Bearer <token> |
Firebase user authentication |
Permission Scopes
API keys are issued with one or more scopes. Each endpoint requires a specific scope. Requesting an endpoint without the required scope returns a 403 scope_missing error.
| Scope | Access | Endpoints |
|---|---|---|
inventory:read |
Read inventory data | GET /hub_inventory, GET /hubs/product |
inventory:write |
Modify inventory data | update_quantity, update_price, update_purchase_price, update_upc |
orders:read |
View orders | GET /all_orders_paginated |
orders:write |
Process refunds | POST /refund, POST /items/{id}/refund |
analytics:read |
View sales analytics | All GET /analytics endpoints |
hubs:read |
View hub info & status | GET /hubs, /hub_ids, /get_hub_info, /hub_layout, /get_hub_health, /get_door_status, /fridge_door_cabinet_map |
hubs:write |
Control hub access | POST /request_door_open |
controls:read |
Read hardware status | GET /controls/get_bin_status |
controls:write |
Send hardware commands | All POST /controls endpoints |
maintenance:read |
View maintenance reports | GET /maintenance/reports, GET /maintenance/reports/{id} |
maintenance:write |
Create maintenance reports | POST /maintenance/reports |
promotions:read |
View banners & deals | GET /owner/banners, GET /deals/* |
promotions:write |
Manage banners & deals | POST /owner/banners, POST/PUT/DELETE /deals/* |
Your First Request
Once you have an API key with inventory:read scope, fetch your hub's inventory:
curl -X GET \ "https://tina-api.venhub.com/api/v1/owners/hub_inventory/?hub_id=123" \ --header "X-API-Key: vh_your_key_here" \ --header "Content-Type: application/json"
A successful response looks like:
[
{
"id": 1,
"name": "Organic Apple",
"upc": "012345678901",
"quantity": 25,
"original_price": 299,
"discounted_price": 299,
"cabinet": 1,
"shelf": 2,
"row": 3
}
]
API Conventions
| Convention | Details |
|---|---|
| Money | All prices and amounts are integers in cents. 299 = $2.99 |
| Timestamps | All timestamps are ISO 8601 in UTC, e.g. 2026-02-05T14:30:00Z |
| Pagination | Uses cursor-based pagination. Pass the next_cursor value as cursor in subsequent requests. |
| Content-Type | All request bodies must be application/json |
| API Version | Currently v1, versioned explicitly via the /api/v1 URL prefix. |
Payments
VenHub has no payments endpoint. VenHub partners with Stripe, so most integrators
build on that â but whichever processor you use, you build the integration and
verify the charge yourself. Once you've verified payment, you let VenHub know by
calling POST /controls/open_bin â
VenHub treats that call itself as your confirmation and continues the transaction
from there. VenHub never touches card data or checks payment status.
Next Steps
Set up auth
Generate your API key with the right scopes
Hubs endpoints
List hubs, check health, manage door access
Inventory endpoints
Read products, update quantities and prices
Orders endpoints
Page through history, process refunds
Analytics endpoints
Revenue, sales breakdowns, customer metrics
Controls endpoints
Hardware commands for bins and fridges