API reference
Every partner and POS endpoint of mns-jsserver, generated from its OpenAPI contract.
These pages are generated from openapi/jsserver-pos.yaml. For the flows behind them, start with the POS integrations overview.
Terminals
Square
Lightspeed
QR sessions
Receipts
Base URL
All paths are relative to the jsserver origin you receive during partner onboarding. Requests and responses are JSON unless an endpoint says otherwise.
Authentication
These endpoints take no API key or bearer token today: they identify a business unit and terminal by bu_id and terminal_id. Call them from your server, never from shopper-facing browser code.
Webhook receivers
POST /square/webhook and POST /lightspeed/webhook are called by Square and Lightspeed, not by partners. They are verified with each provider's HMAC signature and are listed so you know what MyNearStores accepts.
Errors
Error bodies differ by area, as jsserver returns them today:
| Area | Error body |
|---|---|
| Terminals, Square OAuth, receipts | { "message": "…" } |
| Square sales, QR sessions | { "success": false, "message": "…" } |
| Lightspeed | { "error": "…", "message": "…" } |
The contract
The OpenAPI 3.1 file lives in the mns-site repository at openapi/jsserver-pos.yaml. It was written from the jsserver source and records current behaviour, quirks included. Contact partners@mynearstores.com for a copy.