- Failures come back as HTTP 200. CodeREADr reports a failed call in the body as
<status>0</status>with an<error code="…">node, not with an HTTP status. This plugin checks that status and throws aCodereadrAPIErrorcarrying the numericcode, so a wrong key or a rejected variable never looks like a successful call. - The API key travels in the POST body. GET requests are disabled by default and the docs advise against putting a key in a URL, so every call is a form-encoded POST to
https://api.codereadr.com/api/. - Scans are the records you retrieve.
scans.listsearches by date range, service, device, user, validation status, barcode value and stored properties, and pages withlimit/offset. It returnsnext_offsetwhile a page comes back full. - Nothing is mirrored locally. The plugin reads the live API and stores no entities, so a retrieved scan always reflects the account as it is now.
- Deletes cannot be undone.
scans.delete,services.delete,databases.delete,databases.clearandusers.deleteare marked destructive and irreversible.services.deleteandusers.deletealso acceptall, which removes every service or every app user except the account owner. - Rate limits. The API allows a fixed number of calls per minute and per day, and answers error code 111 or 113 when exceeded. The two windows reset differently: the per-minute counter at the start of each minute, the per-day counter at midnight. The plugin retries the per-minute limit, waiting whatever
Retry-Afterthe server sends and one minute when it sends none. The daily limit is not retried, because it cannot clear before midnight: the call fails at once with code 113. Checklimits.retrievebefore a long run. Code 2, CodeREADr’s own transient failure, is retried only for the calls named in the next point; every other error code is a rejected request and is not retried. - Writes are not replayed on server errors. Only reads, and the database upserts, which are idempotent, are repeated after a transient failure.
- No webhooks. CodeREADr can post scan data to your own URL (Postback URL or Direct Scan URL), which is configured on the service rather than received by the plugin.
- 24 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)
No setup required yet. When you make your first request as a tenant, Corsair prompts for the API key.More: API Key
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 valid scans for a service since a fixed dateWhat’s next
API reference
Every
codereadr.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.