Bettencourt POS Manual

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)

POST /api/auth/pin-login
Content-Type: application/json

{ "pin": "1234", "organizationId": "..." }

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:

POST /api/trpc/<router>.<procedure>
Content-Type: application/json

Major Router Groups

RouterPurposeKey Procedures
posPoint of sale operationsgetProducts, checkout
ordersOrder managementlist, getById, voidOrder, refund
cashCash sessionsopenSession, closeSession, createDrop, createPayout
productsProduct cataloguelist, create, update, delete
inventoryStock managementgetStockLevels, getLedger, logWaste
invoicesAccounts receivablelist, create, recordPayment, getPaymentHistory
quotationsProposalslist, create, convertToInvoice, revise
credit-notesCredit memoscreate, applyToInvoice, void
vendor-billsAccounts payablelist, create, recordPayment
customersCustomer databaselist, search, create, getCustomerStatement
loyaltyLoyalty programearnPoints, redeem, getLeaderboard
giftcardsGift cardsissue, redeem, getBalance
reportsReportinggetReport, getEodReport
analyticsBusiness intelligencegetRevenueTrend, getAbcAnalysis
timeclockStaff time trackingclockIn, clockOut, getHistory
auditAudit traillist (with filtering)
webhooksIntegration endpointslistEndpoints, createEndpoint
notificationsSMS/WhatsApp alertssend, listTemplates
settingsConfigurationgetOrganization, updatePosSettings
kitchenKitchen displaygetActiveTickets, updateItemStatus
productionProduction logslogProduction, getProductionVsSalesReport
recurringRecurring templatescreateTemplate, generateNext
printersPrint managementlist, create, testPrint, setRoutes
discountsDiscount ruleslist, create, validatePromo
pricelistsDynamic pricinglist, create, assignCustomerPricelist
agenciesAgency/org managementlist, create, update
tablesTable/floor managementlist, updateTableStatus, clearTable
reservationsBooking managementlist, create, update
waitlistWalk-in queuelist, create, lookupPosition

Webhooks

For event-driven integration, use webhooks instead of polling. See Webhooks for setup instructions.

Available events:

  • order.completed, order.voided, order.refunded
  • inventory.low_stock, inventory.out_of_stock
  • cash_session.opened, cash_session.closed
  • production.logged

Each webhook delivery includes an X-Webhook-Signature header (HMAC-SHA256) if a secret is configured.


Health Check

GET /health

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.

On this page