Skip to main content

Quickstart

This guide walks you through registering a tenant, creating a terminal, and seeing live data.

1. Register a Tenant

curl -X POST http://localhost:8080/api/v1/auth/register \
  -H "Content-Type: application/json" \
  -d '{
    "tenant_name": "Acme Corp",
    "slug": "acme-corp",
    "email": "admin@acme.com",
    "password": "securepassword123"
  }'
Save the access_token from the response.

2. Create an Org Node

curl -X POST http://localhost:8080/api/v1/org-nodes \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Lagos Office",
    "node_type": "region"
  }'

3. Register a Terminal

curl -X POST http://localhost:8080/api/v1/terminals \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "org_node_id": "ORG_NODE_ID",
    "serial_number": "SN-001",
    "model": "PT-100",
    "registered_lat": 6.5244,
    "registered_lng": 3.3792
  }'

4. Generate an API Key

curl -X POST http://localhost:8080/api/v1/api-keys \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"scope": "agent"}'

5. Run the Test Agent

watchtower test-agent \
  --server localhost:9090 \
  --api-key YOUR_AGENT_KEY \
  --terminal-id SN-001 \
  --lat 6.5244 --lng 3.3792
The dashboard will light up with live heartbeats and transactions.

Next Steps