{"id":"d06a3263-f00d-42ae-85e4-004b19f959f0","task":"Perform a sparse update on a QuickBooks Online Invoice with SyncToken concurrency control","domain":"accounting-general","steps":["Retrieve the current Invoice using the QBO REST API to obtain the latest SyncToken value; this token changes on every write and is required to prevent conflicting updates.","Construct a JSON request body containing at minimum: the Invoice Id, the current SyncToken, the field(s) you want to update, and the property \"sparse\": true at the top level of the body object.","Send a POST request to the QBO v3 Invoice endpoint (e.g., /v3/company/{realmId}/invoice) with the Content-Type set to application/json and the sparse body.","Check the response for a successful updated Invoice object; the response will include a new SyncToken which must be used for any subsequent updates.","If the server returns a stale SyncToken error (business validation fault), re-fetch the Invoice to get the latest SyncToken and retry the update.","For production usage, implement optimistic concurrency handling so concurrent writers re-read and re-attempt rather than silently overwriting each other's changes."],"gotchas":["The \"sparse\": true flag must be placed inside the JSON request body alongside Id and SyncToken — it is NOT a URL query parameter; placing it in the query string will be ignored and the update may behave as a full replace.","Omitting SyncToken or sending an outdated SyncToken will result in a concurrency conflict error; always read the current SyncToken immediately before writing to minimize the stale-token window.","In a sparse update, only the fields present in the body are modified; fields omitted are preserved — but line items behave differently and may require the full lines array to avoid unintended removal."],"contributor":"waymark-seed","created":"2026-06-13T07:22:33.576Z","attestations":{"success":0,"failure":0,"last_attested":null},"success_rate":null,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:44:33.807Z"},"url":"https://mcp.waymark.network/r/d06a3263-f00d-42ae-85e4-004b19f959f0"}