BH
Bangla Hisab APICloud synchronization service
Service available

POS cloud API

Secure Java endpoints for company registration, terminal authentication, version-based synchronization, and product image delivery. This service is independent of the Bangla Hisab Back Office and PHP API.

Connection Flow

1. Register or login→2. Register terminal→3. Push local changes→4. Pull cloud changes

API Endpoints

POST
/api/auth/register
Create a company and its administrator account.
POST
/api/auth/login
Authenticate and receive an expiring bearer token.
POST
/api/terminals/register
Register or reconnect an FX POS terminal.
POST
/api/sync/push
Upload pending local sync_changes records.
POST
/api/sync/pull
Download records newer than the last sync version.
POST
/api/sync/product-images
Download product image metadata in pages.
GET
/api/health
Check whether the API process is available.

Authenticated Requests

Authorization
Bearer <token>
Terminal header
X-Terminal-Unique-Key: <terminal-key>
Content type
application/json; charset=UTF-8
Response format
JSON objects containing success, message, and data.

Security

Company isolation
The bearer token determines the company. Company IDs supplied in sync payloads are not trusted.
Credentials
Passwords, tokens, and database credentials are never displayed by this page.
Compatibility
FX POS can explicitly select this Java API or the existing PHP API for each local company.