WYRE-AI/msp-claude-plugins/msp-claude-plugins/quickbooks/quickbooks-online/skills/api-patterns/SKILL.md
QuickBooks Online API Patterns
QuickBooks Online API fundamentals: OAuth2 authentication and token lifecycle, REST structure and base URLs, the Intuit query language, pagination, minor version headers, SyncToken optimistic locking, rate limits, webhooks, and the Fault error object format.
- Source repository stars
- 42
- Declared platforms
- 0
- Static risk flags
- 2
- Last source update
- 2026-08-28
- Source checked
- 2026-08-28
Decision brief
What it does: where it fits
QuickBooks Online API fundamentals: OAuth2 authentication and token lifecycle, REST structure and base URLs, the Intuit query language, pagination, minor version headers, SyncToken optimistic locking, rate limits, webhooks, and the Fault error object format.
Not for
- Tasks that require unconfirmed production actions or broad system permissions.
- Environments where the pinned source and install steps cannot be inspected.
Compatibility matrix
Platform support, with evidence labels
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Not declared | No explicit evidence | Portability before use |
| Claude Code | Not declared | No explicit evidence | Portability before use |
| Cursor | Not declared | No explicit evidence | Portability before use |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
Inspect first. Install second.
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/WYRE-AI/msp-claude-plugins --skill "msp-claude-plugins/quickbooks/quickbooks-online/skills/api-patterns"Inspect the Agent Skill "QuickBooks Online API Patterns" from https://github.com/WYRE-AI/msp-claude-plugins/blob/5005f73ba2f52cd299f58aa6bb79f4e70ae87103/msp-claude-plugins/quickbooks/quickbooks-online/skills/api-patterns/SKILL.md at commit 5005f73ba2f52cd299f58aa6bb79f4e70ae87103. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.
Workflow
What the source asks the agent to do
- 01
Anti-triggers
Xero's request model — the other accounting platform here also uses
Xero's request model — the other accounting platform here also usesQuickBooks tools missing from the client entirely, or a 401 before anyWhich realm am I writing to — production and sandbox are selected by - 02
Authentication
QuickBooks Online uses OAuth2 for authentication. All API requests require a valid Bearer token in the Authorization header:
QuickBooks Online uses OAuth2 for authentication. All API requests require a valid Bearer token in the Authorization header:All API endpoints follow the pattern:The realmId (Company ID) is a unique numeric identifier for each QuickBooks company. It is required in every API URL. - 03
OAuth2 Flow
QuickBooks Online uses OAuth2 for authentication. All API requests require a valid Bearer token in the Authorization header:
QuickBooks Online uses OAuth2 for authentication. All API requests require a valid Bearer token in the Authorization header: - 04
Base URL Pattern
All API endpoints follow the pattern:
All API endpoints follow the pattern:The realmId (Company ID) is a unique numeric identifier for each QuickBooks company. It is required in every API URL. - 05
Minor Version Header
QuickBooks Online uses a minorversion query parameter to control API behavior. Always specify the latest minor version to access current features:
QuickBooks Online uses a minorversion query parameter to control API behavior. Always specify the latest minor version to access current features:If omitted, the API defaults to the earliest supported minor version, which may lack newer fields or features.
Permission review
Static risk signals and limitations
Network access
The documentation includes network, browsing, or remote request actions.
https://{base}/v3/company/{realmId}/{resource}Network access
The documentation includes network, browsing, or remote request actions.
https://quickbooks.api.intuit.com/v3/company/1234567890/invoiceSends data out
The documentation includes sending, uploading, or posting data to a remote service.
See [references/api.md](references/api.md) for a full webhook payload example.Evidence record
Why each signal appears
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 91/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 42 | Source | Repository attention, not individual Skill quality |
| Compatibility | 0 platforms | Source | Declared in the catalog source record |
| Usage guide | automated source guide | Editorial | Generated or reviewed according to the visible evidence level |
Pinned source
Provenance and original SKILL.md
- Repository
- WYRE-AI/msp-claude-plugins
- Skill path
- msp-claude-plugins/quickbooks/quickbooks-online/skills/api-patterns/SKILL.md
- Commit
- 5005f73ba2f52cd299f58aa6bb79f4e70ae87103
- License
- Apache-2.0
- Collected
- 2026-08-28
- Default branch
- main
View the original SKILL.md
QuickBooks Online API Patterns
Overview
The QuickBooks Online (QBO) API is a RESTful JSON API that provides access to customers, invoices, payments, purchases, bills, vendors, accounts, items, estimates, credit memos, and financial reports. This skill covers OAuth2 authentication, the Intuit query language, pagination, error handling, and performance optimization patterns for MSP accounting workflows.
Anti-triggers
- Xero's request model — the other accounting platform here also uses
OAuth2 and also has a tenant/realm concept, but its query syntax,
pagination, and concurrency control are entirely different. Use
xero-api-patterns. QBO's SyncToken optimistic locking in particular has no Xero equivalent, so a pattern copied across will fail in a way that reads like a permissions error. - QuickBooks tools missing from the client entirely, or a 401 before any
call succeeds — the OAuth grant lives at the gateway, not in client
config; use
shared-skills-wyre-gateway-troubleshooting. - Which realm am I writing to — production and sandbox are selected by the gateway connection, not by a parameter on the call. Verify before any write; the request shapes are identical either way.
Authentication
OAuth2 Flow
QuickBooks Online uses OAuth2 for authentication. All API requests require a valid Bearer token in the Authorization header:
GET /v3/company/1234567890/customer/1
Authorization: Bearer eyJlbmMiOiJBMTI4Q0JDLUhT...
Accept: application/json
Content-Type: application/json
Required Headers:
| Header | Value | Description |
|---|---|---|
Authorization | Bearer {access_token} | OAuth2 access token |
Accept | application/json | Response format |
Content-Type | application/json | Request body format |
Base URL Pattern
All API endpoints follow the pattern:
https://{base}/v3/company/{realmId}/{resource}
Production:
https://quickbooks.api.intuit.com/v3/company/1234567890/invoice
Sandbox:
https://sandbox-quickbooks.api.intuit.com/v3/company/1234567890/invoice
The realmId (Company ID) is a unique numeric identifier for each QuickBooks company. It is required in every API URL.
Minor Version Header
QuickBooks Online uses a minorversion query parameter to control API behavior. Always specify the latest minor version to access current features:
GET /v3/company/1234567890/customer/1?minorversion=73
Authorization: Bearer {access_token}
If omitted, the API defaults to the earliest supported minor version, which may lack newer fields or features.
Token Lifecycle
| Token | Lifetime | Refresh Method |
|---|---|---|
| Access Token | 60 minutes | Use refresh token |
| Refresh Token | 100 days | Re-authorize if expired |
See references/auth.md for environment variables, the token refresh implementation, and node-quickbooks SDK setup.
Intuit Query Language
QuickBooks Online uses a SQL-like query language for searching and filtering entities. Queries are sent via GET request to the /query endpoint, and the query parameter value must be URL-encoded.
Query Syntax
SELECT * FROM EntityName WHERE condition [AND condition] [ORDERBY field [ASC|DESC]] [STARTPOSITION n] [MAXRESULTS n]
GET /v3/company/{realmId}/query?query=SELECT * FROM Invoice WHERE CustomerRef = '123' AND Balance > '0'&minorversion=73
Note that numeric comparison values are quoted as strings (Balance > '0').
Query Operators
| Operator | Description | Example |
|---|---|---|
= | Equals | CustomerRef = '123' |
!= | Not equals | Balance != '0' |
< | Less than | Balance < '1000' |
> | Greater than | Balance > '0' |
<= | Less than or equal | TxnDate <= '2026-01-31' |
>= | Greater than or equal | TxnDate >= '2026-01-01' |
LIKE | Pattern match (% wildcard) | DisplayName LIKE '%Acme%' |
IN | Set membership | Id IN ('1', '2', '3') |
AND | Logical AND | Active = true AND Balance > '0' |
Query Pagination
Use STARTPOSITION and MAXRESULTS for pagination:
SELECT * FROM Customer STARTPOSITION 1 MAXRESULTS 100
SELECT * FROM Customer STARTPOSITION 101 MAXRESULTS 100
SELECT * FROM Customer STARTPOSITION 201 MAXRESULTS 100
| Parameter | Description | Default | Maximum |
|---|---|---|---|
STARTPOSITION | 1-based offset | 1 | - |
MAXRESULTS | Results per page | 100 | 1000 |
See references/api.md for more query examples and a full pagination loop implementation.
CRUD Operations
| Operation | Method | Notes |
|---|---|---|
| Create | POST /{resource} | No Id in body |
| Read | GET /{resource}/{id} | Or use /query for collections |
| Update | POST /{resource} | POST, not PUT; requires Id + SyncToken |
| Sparse update | POST /{resource} | Add "sparse": true to update only supplied fields |
| Delete | POST /{resource}?operation=delete | Not supported by all entities |
Most entities support deactivation (set Active: false) instead of hard delete.
SyncToken (Optimistic Locking)
Every entity has a SyncToken field that must be included in update requests. This prevents concurrent modification conflicts:
{
"Id": "123",
"SyncToken": "2",
"DisplayName": "Acme Corporation - Updated"
}
If the SyncToken does not match the current value on the server, the update returns a 5010 stale object error.
See references/api.md for the full request/response formats and complete CRUD examples.
Rate Limiting
| Metric | Limit |
|---|---|
| Requests per minute | 500 |
| Concurrent requests | 40 |
| Requests per second per user | 10 |
When rate limited, QBO returns HTTP 429 with a THROTTLE fault (code 3001). Honor the Retry-After header and add jitter before retrying. See references/api.md for a retry implementation that also handles 401 token refresh.
Error Handling
QBO returns errors in a structured Fault object with a type (AuthenticationFault, AuthorizationFault, ValidationFault, THROTTLE) and an Error array carrying Message, Detail, and a numeric code. Route on Fault.type first, then the error code.
Most frequently hit codes:
| Code | Type | Resolution |
|---|---|---|
| 610 | ValidationFault | Check entity ID or referenced objects |
| 6240 | ValidationFault | Duplicate name — use a unique DisplayName |
| 5010 | ValidationFault | Stale object — re-fetch SyncToken and retry |
| 3001 | THROTTLE | Implement backoff |
| 3200 | AuthenticationFault | Refresh access token |
See references/errors.md for the complete HTTP status table, Fault object samples, and an error dispatch implementation.
Webhooks
QuickBooks Online supports webhooks for real-time notifications when entities change. The payload carries a realmId plus a dataChangeEvent.entities array of { name, id, operation, lastUpdated }. Configure webhooks in the Intuit Developer Portal under your app's settings.
See references/api.md for a full webhook payload example.
Best Practices
- Always include
minorversion- Specify the latest version (73) in every request; omitting it silently falls back to the oldest supported version - Use the query endpoint - Batch lookups with queries instead of individual GETs
- Include SyncToken on updates - Required for all update operations, or you get a 5010 stale object error
- Use sparse updates - Without
sparse: true, omitted fields are cleared - Encode query strings - URL-encode the query parameter value
- Cache reference data - Items, accounts, and tax codes change infrequently
- Monitor token expiry - Access tokens expire after 60 minutes; refresh proactively
Related Skills
- QBO Customers - Customer management
- QBO Invoices - Invoice management
- QBO Payments - Payment processing
- QBO Expenses - Expense tracking
- QBO Reports - Financial reporting
Frequently asked questions
What to verify before installation and use
What does the QuickBooks Online API Patterns source document cover?
QuickBooks Online API fundamentals: OAuth2 authentication and token lifecycle, REST structure and base URLs, the Intuit query language, pagination, minor version headers, SyncToken optimistic locking, rate limits, webhooks, and the Fault error object format.
How do I install QuickBooks Online API Patterns?
The source record exposes this install command: npx skills add https://github.com/WYRE-AI/msp-claude-plugins --skill "msp-claude-plugins/quickbooks/quickbooks-online/skills/api-patterns". Inspect the command and pinned source before running it.
Which permission-related actions were detected?
Static rules flagged network, send-data in the source; the page lists the matching lines and excerpts.
Alternatives
Compare before choosing
garrytan/gbrain
bulk-ingestion
End-to-end discipline for turning any large data source (audio libraries, email takeouts, document corpora, chat exports, API dumps) into brain pages at scale. The lifecycle spine: SCHEMA → ACCESS → TRIAL → EVALUATE → IMPROVE → CODIFY → TEST → SKILLIFY → BULK → MONITOR. State is tracked in a durable JSON manifest (see MANIFEST-PATTERN.md) so any crash, session boundary, or subagent fan-out resumes from ground truth instead of memory.
alirezarezvani/claude-skills
app-store-optimization
App Store Optimization (ASO) toolkit for researching keywords, analyzing competitor rankings, generating metadata suggestions, and improving app visibility on Apple App Store and Google Play Store. Use when the user asks about ASO, app store rankings, app metadata, app titles and descriptions, app store listings, app visibility, or mobile app marketing on iOS or Android. Supports keyword research and scoring, competitor keyword analysis, metadata optimization, A/B test planning, launch checklist
dotnet/skills
migrate-vstest-to-mtp
Migrates .NET test projects from VSTest to Microsoft.Testing.Platform (MTP). Use when user asks to "migrate to MTP", "switch from VSTest", "enable Microsoft.Testing.Platform", "use MTP runner", set OutputType=Exe only for test projects in Directory.Build.props, or mentions EnableMSTestRunner, EnableNUnitRunner, or UseMicrosoftTestingPlatformRunner. USE FOR: MTP behavioral differences vs VSTest (exit code 8, zero tests discovered, --ignore-exit-code, TESTINGPLATFORM_EXITCODE_IGNORE); centralizing
oaustegard/claude-skills
featuring
Generate hierarchical _FEATURES.md files that describe what a codebase DOES from a user/consumer perspective, anchored to source symbols via tree-sitting. Supports large complex codebases through feature-driven decomposition into sub-feature files. Uses a multi-pass synthesis: orientation → detail → overview rewrite. Use when someone says "what does this do", "document features", "feature inventory", "_FEATURES.md", or needs to understand a codebase's purpose before modifying it. Complements tre