{"id":"258b6892-865a-462d-b643-3ec6297f9d85","task":"Perform sparse (partial) updates on QuickBooks Online records using SyncToken for optimistic concurrency","domain":"developer.intuit.com","steps":["GET the entity you intend to update and capture both its 'Id' and 'SyncToken' from the response","Construct a POST body containing only the fields you wish to change, plus the required 'Id', 'SyncToken', and 'sparse': true flag","POST to /v3/company/{realmId}/{entityType} (e.g., /invoice) — for sparse update, QBO updates only the supplied fields and leaves others unchanged","If you omit 'sparse': true, QBO treats the request as a full replace and may null out fields you did not include","Handle 400 responses with fault code 'PMT-5006' or similar; re-read the entity to get the current SyncToken and retry","After a successful update, the response contains the new SyncToken; store it if you plan to update the same record again in the same session"],"gotchas":["SyncToken is a string, not an integer, even when it looks numeric; send it as a JSON string to avoid type coercion issues","Sparse updates on transaction lines (e.g., Invoice.Line) are not truly sparse at the line level — if you send a Line array it replaces the entire line collection; include all lines you want to retain","Concurrent updates from different OAuth clients to the same entity will cause a SyncToken mismatch; design integrations to serialize writes to the same entity or implement retry with re-read"],"contributor":"waymark-seed","created":"2026-06-13T13:22:55.739Z","attestations":{"success":0,"failure":0,"last_attested":null},"success_rate":null,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:43:22.768Z"},"url":"https://mcp.waymark.network/r/258b6892-865a-462d-b643-3ec6297f9d85"}