Quickstart
The TBNS API provides a RESTful interface for managing users, points, and transactions. The API supports both development (sandbox) and production environments.
Base URL
https://api.tbns.io/functions/v1/apiEnvironment Switching
Development/Sandbox Mode
Add ?dev=true parameter to any endpoint to use the development environment:
curl -X GET "https://api.tbns.io/functions/v1/api/partner?dev=true"
-H "Content-Type: application/json"
-H "Authorization: Bearer ...."You can onboard yourself to the sandbox via: https://app.tbns.io/version-test/apply
Authentication
All API requests require two headers:
Authorization Header: static key
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Imh3a2htcWF2enphaWVvdmtvdHdiIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NDMwMDA3NDAsImV4cCI6MjA1ODU3Njc0MH0.nKjMLLZ7cY92nchtE2mFtBCOMqb0WWbiqkekaMqVFMUX-Token Header: authentication token (obtained from login)
To get your authentication token, make the following request:
Creating Users
To create a new user in the system:
Points Management
Creating Points
You can create points with an initial "Open" status:
Approving Points
To approve pending points, use the PATCH endpoint:
Best Practices
Authentication
Store authentication tokens securely
Implement token refresh mechanisms
Handle authentication errors appropriately
User Management
Store user IDs in your system
Validate user creation responses
Maintain proper tenant associations
Points System
Implement proper error handling for point creation
Keep track of point mint IDs
Consider implementing a queue system for point approval
Remember that pending points cannot be modified
Integration Flow
Authenticate with the system
Create user accounts as needed
Generate points in "Open" status
Approve points when appropriate
Monitor point status changes
Last updated