TPVStream API: getting started
Turn on the API on the POS, create a key and make your first call.
On this page
The TPVStream API lets another application (online shop, ERP, accounting, ordering app…) read and change data on your customer's POS: catalogue, stock, sales, clients and orders. It is a JSON REST API over HTTPS.
This page is for two people: the POS owner, who turns on the API and creates the key, and the developer, who uses it.
Requirements
- TPVStream cloud access on the customer's POS: see pricing.
- The main register switched on and connected to the Internet.
How it works
Your application ──HTTPS + key──► api.tpvstream.com ──encrypted tunnel──► customer's main POS
- The POS opens no port on the Internet: it connects to
api.tpvstream.comitself. - The data stays on the POS, not in the cloud. If the main register is off or offline, the API answers
503 POS_OFFLINE. - The API never creates, changes or voids a ticket, an invoice, a payment or a closure. Sales are always made on the POS (VeriFactu, TicketBAI).
1. Turn on the API (POS owner)
- On the main register, sign in as an admin and open Settings › Cloud API.
- Press Turn on. Wait for Connected to the Internet.
- Copy the address shown. It looks like
https://api.tpvstream.com/<identifier>/v1.
To cut everything at once, press Turn off: all calls are refused immediately.
2. Create a key (POS owner)
- Under Keys, press New key.
- Give it a Name that says who uses it (for example "Accounting ERP").
- Tick only the Rights the application needs. See the list of rights.
- Choose how long it is Valid for (90 days by default, 1 year at most) and, if you want, the Allowed IPs.
- Press Create key and copy the key straight away: it will not be shown again.
Send the address and the key to the developer through a safe channel. The key starts with tpv_live_.
A key gives access to the shop's data. Never publish it on a website, in a mobile app or in a repository. If it leaks, press Revoke: it stops working at once.
3. First call (developer)
Send the key in the Authorization header:
curl https://api.tpvstream.com/<identifier>/v1/products?limit=2 \
-H "Authorization: Bearer tpv_live_…"
Answer:
{
"data": [
{ "id": "8f1c…", "name": "Café con leche", "priceCents": 150, "taxRate": 10, "stockQuantity": 0, "isActive": true, "updatedAt": "2026-11-27T08:00:00.000Z" }
],
"nextCursor": "eyJ…"
}
Amounts are always in euro cents, VAT included (150 = €1.50).
What you can do
| Topic | Read | Write | Page |
|---|---|---|---|
| Products, categories, VAT, modifiers | Yes | Yes | Catalogue and stock |
| Stock and movements | Yes | Adjustments | Catalogue and stock |
| Tickets, Z closures, statistics | Yes | No | Sales |
| Clients | Yes | Yes | Clients and orders |
| Remote orders | Yes | Create and cancel | Clients and orders |
| Real-time notices | Webhooks |
OpenAPI file
The full reference (routes, fields, types) is in tpvstream-openapi.json, OpenAPI 3.1. Open it in Postman, Insomnia or your client generator.
Monitoring
In Settings › Cloud API, the owner sees the Last calls of each key (time, route, result) and gets an alert when a key is used from a new IP. Everything the API changes is logged on the POS with the author API:<key name>.
