api_key. It is sent in the sn-apikey header. The docs also describe HTTP Basic with the key as the username and an empty password, which the plugin does not use, so the key never travels in the URL.
Things to know before you call:
- Every operation is a read. The documented API has 18 GET operations and no write, so nothing here changes state on the provider’s side and every call is safe to retry.
- The account-wide reads and the per-location reads are different operations, not a filter.
customers.listcovers every location the key can see;locations.customerscovers one. Both exist for customers, subscribers, vouchers and each of the four transaction types. - Paging uses
limitandoffset, and the next offset is in a response header. Each list returnsnext_offsetwhen the API’sLinkheader names a next page, and omits it on the last page. Pass it back asoffsetto continue. The API cannot return the header and the body together through the shared client, so the paged reads use their own request that returns both. fieldsandsortname properties of the response object.fieldsnarrows the response to a comma separated list, which the plugin takes as an array.sorttakes one property name, with a leading-for descending. A name the resource does not have is refused by the API rather than ignored.- Dates are
2013-05-21 17:53:39strings. The notes page documents that format, and the transaction records use an ISO timestamp instead. Neither is converted, so both arestringin the output. - A location ID can be a string or a number. The Swagger types it as a string, while every transaction record returns
location_idas a number, so the per-location operations accept either. - Some transaction fields are documented only as
TODO. The Swagger leaves everyMacTransaction,PaidTransaction,SocialTransactionandVoucherTransactionfield undocumented, so nothing on them is required and the values are passed through exactly as sent, includingsmscountry. - No pagination on
locations.options. It returns every location as{ id, name }with nometadataand no paging. - No inbound webhooks yet. HotspotSystem can POST
customer.create,subscriber.createandtransaction.*.createevents to a callback URL set up in the Control Center, signed with an HMAC-SHA256 header. This plugin does not register a webhook route for them, so new records are read with the list operations.
- 18 typed API operations
Setup
1
Install
2
Add the plugin
corsair.ts
multiTenancy: true, scope calls with corsair.withTenant(id). See Quick start for KEK + Hub keys, and Multi-tenancy for account isolation.3
Choose authentication
- API Key (Recommended)
Store the HotspotSystem API key before the first call: More: API Key
pnpm corsair setup --plugin=hotspotsystem --tenant=acme api_key=<your-key> (leave out --tenant without multiTenancy), or pass it as key in the plugin options. With Hub, each tenant enters their own key on the connect page. See API key auth.4
Connect a tenant
Mint a connect link and send the tenant to it. Hub hosts the page and delivers the result to your app — see Connect / OAuth.
Example API calls
List the first ten locations with just their ID and nameWhat’s next
API reference
Every
hotspotsystem.api.* operation with input and output types.Connect / OAuth
createLink, Hub delivery, and tenant connect flows.
Use with agents
Expose this plugin’s operations as MCP tools.