A sample walkthrough: no real API calls, just a preview of connecting your first hub.
This is a simulated walkthrough: no real API key is generated and no real endpoints are called. It's here to show you the shape of the first step: generating a key scoped to your integration, then making one call to confirm the connection works.
You can only generate an API key from TINA, the VenHub dashboard.
Grant it only the scopes this integration needs: here that's hubs:read,
inventory:read, inventory:write, orders:read
and controls:write.
{
"api_key": "vh_test_9f3k7d2a1e0c",
"scopes": ["hubs:read", "inventory:read", "inventory:write", "orders:read", "controls:write"],
"created_at": "2026-07-16T09:12:00Z"
}
Attach the key to a request and call GET /hubs. If it comes back
with your hub, you're connected.
curl -X GET \ "https://tina-api.venhub.com/api/v1/owners/hubs" \ --header "X-API-Key: vh_test_9f3k7d2a1e0c"
[
{
"id": 123,
"name": "Downtown Location",
"street_address_1": "123 Main St",
"street_address_2": null,
"city": "San Francisco",
"state": "CA",
"hub_status": "active"
}
]
Keep VenHub's record of what's on the shelf in sync with reality, then take the customer through checkout. Choose VenHub's Stripe integration and it's provided for you, or bring your own payment processor and build that integration yourself. Either way, once payment is verified, you let VenHub know and the transaction continues from there.
Pull the shelf state for the hub so your app knows what's actually available to sell.
curl -X GET \ "https://tina-api.venhub.com/api/v1/owners/hub_inventory/?hub_id=123" \ --header "X-API-Key: vh_test_9f3k7d2a1e0c"
[
{ "id": 456, "name": "Organic Apple", "quantity": 25, "original_price": 299, "discounted_price": 299, "cabinet": 1, "shelf": 2, "row": 3 }
]
A restock just came in. Push the new count so the hub's record matches the shelf.
curl -X PUT \ "https://tina-api.venhub.com/api/v1/owners/hubs/product/456/update_quantity" \ --header "X-API-Key: vh_test_9f3k7d2a1e0c" \ --header "Content-Type: application/json" \ --data '{"quantity": 40}'
{
"data": { "id": 456, "name": "Organic Apple", "quantity": 40, "original_price": 299, "discounted_price": 299, "cabinet": 1, "shelf": 2, "row": 3 }
}
A customer taps "Organic Apple - $2.99" in your app. Use VenHub's Stripe integration and it's provided for you, or bring your own payment processor and build that integration yourself. VenHub never touches card data or checks payment status itself: once the charge is verified, you let VenHub know so the transaction can continue.
open_bin call does, continuing the transaction.{
"payment_status": "succeeded",
"amount": 299,
"currency": "usd",
"item": "Organic Apple",
"charge_id": "ch_3P9kQ2A1e0c"
}
You've verified payment on your own side; this call is how you let VenHub know and continue the transaction. It sends a live command to the hardware; you'll then confirm VenHub logged the sale and adjusted inventory on its own.
Only call this once you've verified payment yourself. VenHub doesn't check payment status, so this is the "yes, it's paid for" signal that continues the transaction and sends a live command to the hardware.
curl -X POST \ "https://tina-api.venhub.com/api/v1/owners/controls/open_bin?bin=1&hub=123" \ --header "X-API-Key: vh_test_9f3k7d2a1e0c"
{
"success": true,
"status_code": 200,
"response_data": null
}
VenHub records the sale and decrements inventory automatically the moment the bin opens against a completed payment. Check the order history to see it land.
curl -X GET \ "https://tina-api.venhub.com/api/v1/owners/hubs/all_orders_paginated/?hub_id=123&limit=1" \ --header "X-API-Key: vh_test_9f3k7d2a1e0c"
{
"data": [
{
"id": 501,
"total_price_original": 299,
"total_price_discounted": 299,
"payment_status": "completed",
"created_at": "2026-07-16T09:14:22Z",
"order_items": [
{ "productUPC": "012345678901", "name": "Organic Apple", "qty": 1, "dropped": true, "qty_dropped": 1, "refunded_quantity": 0, "price": 299 }
]
}
],
"has_more": false
}
Connect once, keep inventory in sync, take payment through VenHub's Stripe integration or your own build, tell VenHub once it's verified, then dispense and let VenHub log the rest. Six calls, start to finish.
With the VenCart API, your business orders from VenHub hubs for your own customers: build their cart, pay with your saved business card, and open the bins when they arrive. VenHub never sees your customers' details. Here's that flow end to end.
Every call comes from your server with your VenCart API key. Your customer only ever sees your storefront.
Your server confirms the key works and saves your account's user_id. It's the {user_id} in every order path.
curl -X GET \ "https://api.venhub.com/api/v1/integrations/me" \ --header "X-API-Key: vh_abc123..."
{
"success": true,
"data": {
"user_id": 4821,
"key_prefix": "vh_AbCdEfGhI",
"key_name": "Northfield Market",
"scopes": ["integrations:read", "catalog:read", "account-hubs:read",
"account-orders:read", "account-orders:write", "payments:read",
"payments:write", "pickup:write"],
"hub_ids": [12],
"expires_at": "2027-02-08T17:00:00Z"
}
}
List the hubs assigned to your key and pick one whose hub_status is active. Hidden, maintenance and restocking hubs don't accept orders.
curl -X GET \ "https://api.venhub.com/api/v1/integrations/hubs" \ --header "X-API-Key: vh_abc123..."
// 1 assigned hub // 12 Β· Downtown LA Β· hub_status: "active"
Load the hub's products to show in your storefront. Your customer browses there, and you keep the product IDs they pick.
curl -X GET \ "https://api.venhub.com/api/v1/hubs/12/products" \ --header "X-API-Key: vh_abc123..."
// hub 12 products: Trail Mix (9004), Sparkling Water 12oz (9007) // customer picks: Sparkling Water 12oz Β· product 9007
You charge your own customers. Your business pays VenHub with the saved card on your account.
Pass your own order number as external_reference, so each customer order gets its own cart. Repeating the number returns the same order.
curl -X POST \ "https://api.venhub.com/api/v1/users/4821/orders?hub_id=12&external_reference=NF-10042" \ --header "X-API-Key: vh_abc123..."
{
"success": true,
"data": {
"order_id": 9102
}
}
quantity sets the total, not an increment. Use 0 to remove an item.
curl -X PUT \ "https://api.venhub.com/api/v1/users/4821/orders/9102/order_item?hub_id=12" \ --header "X-API-Key: vh_abc123..." \ --header "Content-Type: application/json" \ --data '{"product_id": 9007, "quantity": 2}'
{
"success": true,
"data": {
"product_id": 9007,
"quantity": 2
}
}
Confirm the cart can be paid. Then read the order to confirm items and totals (in cents) before paying.
curl -X GET \ "https://api.venhub.com/api/v1/users/4821/orders/9102/checkout-available?hub_id=12" \ --header "X-API-Key: vh_abc123..."
{
"success": true,
"data": {
"checkout_available": true
}
}
Pay with your business's saved card by its id. This places a hold and sends the order to the hub; nothing is charged until pickup. Never retry pay automatically after an error. Contact VenHub to reconcile first.
curl -X POST \ "https://api.venhub.com/api/v1/users/payments/pay" \ --header "X-API-Key: vh_abc123..." \ --header "Content-Type: application/json" \ --data '{"order_id": 9102, "payment_method_id": 1}'
{
"success": true
}
The hub prepares the order. Your server polls until it's ready or partial with bins to collect, tells your customer, and opens their bins when they arrive.
There are no webhooks, so poll every 30β60 seconds. Track fulfillment and payment separately. Your customer can collect once it's ready (6), or partial (3) with bins in bin_nums that aren't in claimed_bins; a partial order may never become ready. For a ready order, tell your customer the pickup_deadline.
curl -X GET \ "https://api.venhub.com/api/v1/users/4821/orders/9102?hub_id=12" \ --header "X-API-Key: vh_abc123..."
{
"success": true,
"data": {
"processing_status": 6,
"payment_status": "uncaptured",
"bin_nums": [3],
"pickup_deadline": "2026-11-07T00:28:57.762329+00:00"
}
}
Your customer's at the hub. Open the bins in bin_nums that aren't in claimed_bins yet. There's no hub-wide door control.
curl -X POST \ "https://api.venhub.com/api/v1/users/4821/orders/9102/open-delivery?hub_id=12&bin_nums=3" \ --header "X-API-Key: vh_abc123..."
{
"success": true,
"data": {
"order_id": 9102,
"opened_bins": [3],
"claimed_bins": [3],
"processing_status": 4
}
}
Check your key, browse a hub, build a customer cart, pay with your saved card, track the order and open the bins, all from your own storefront.