API Reference (Developer)
Technical reference for integrating with the Bettencourt POS API
This page is for developers integrating external systems with Bettencourt POS. For day-to-day usage, see the relevant feature pages in this manual.
Overview
Bettencourt POS exposes an RPC-based API built on oRPC (OpenAPI-compatible Remote Procedure Call). All API calls go through a single endpoint with structured request/response payloads.
Base URL: https://pos.bettencourtgy.com
Authentication
PIN Login (Staff)
Returns a session cookie. Rate-limited to 5 failed attempts per IP with a 60-second lockout.
Email Login (Managers)
Standard email/password authentication via the login page. Returns a session cookie used for subsequent API calls.
All API requests must include the session cookie (credentials: "include" for fetch, or Cookie header).
API Endpoint
All business logic is accessed via:
Major Router Groups
| Router | Purpose | Key Procedures |
|---|---|---|
| pos | Point of sale operations | getProducts, checkout |
| orders | Order management | list, getById, voidOrder, refund |
| cash | Cash sessions | openSession, closeSession, createDrop, createPayout |
| products | Product catalogue | list, create, update, delete |
| inventory | Stock management | getStockLevels, getLedger, logWaste |
| invoices | Accounts receivable | list, create, recordPayment, getPaymentHistory |
| quotations | Proposals | list, create, convertToInvoice, revise |
| credit-notes | Credit memos | create, applyToInvoice, void |
| vendor-bills | Accounts payable | list, create, recordPayment |
| customers | Customer database | list, search, create, getCustomerStatement |
| loyalty | Loyalty program | earnPoints, redeem, getLeaderboard |
| giftcards | Gift cards | issue, redeem, getBalance |
| reports | Reporting | getReport, getEodReport |
| analytics | Business intelligence | getRevenueTrend, getAbcAnalysis |
| timeclock | Staff time tracking | clockIn, clockOut, getHistory |
| audit | Audit trail | list (with filtering) |
| webhooks | Integration endpoints | listEndpoints, createEndpoint |
| notifications | SMS/WhatsApp alerts | send, listTemplates |
| settings | Configuration | getOrganization, updatePosSettings |
| kitchen | Kitchen display | getActiveTickets, updateItemStatus |
| production | Production logs | logProduction, getProductionVsSalesReport |
| recurring | Recurring templates | createTemplate, generateNext |
| printers | Print management | list, create, testPrint, setRoutes |
| discounts | Discount rules | list, create, validatePromo |
| pricelists | Dynamic pricing | list, create, assignCustomerPricelist |
| agencies | Agency/org management | list, create, update |
| tables | Table/floor management | list, updateTableStatus, clearTable |
| reservations | Booking management | list, create, update |
| waitlist | Walk-in queue | list, create, lookupPosition |
Webhooks
For event-driven integration, use webhooks instead of polling. See Webhooks for setup instructions.
Available events:
order.completed,order.voided,order.refundedinventory.low_stock,inventory.out_of_stockcash_session.opened,cash_session.closedproduction.logged
Each webhook delivery includes an X-Webhook-Signature header (HMAC-SHA256) if a secret is configured.
Health Check
Returns 200 OK when the server is running. Use this for uptime monitoring.
Rate Limiting
- PIN login: 5 attempts per IP, 60-second lockout
- General API: no hard rate limit, but excessive requests may be throttled
Support
For API integration assistance, contact KareTech Solutions. Custom webhook events or API extensions can be arranged as part of your service agreement.