Execute a Dynamics 365 Dataverse Web API $batch request with changesets for atomic multi-table writes

domain: dynamics-365 · 5 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Construct a POST to <org>/api/data/v9.2/$batch with Content-Type: multipart/mixed; boundary=<batch-boundary>
  2. Wrap write operations (POST/PATCH/DELETE) in a changeset part: Content-Type: multipart/mixed; boundary=<changeset-boundary>; operations in a changeset are atomic — all succeed or all roll back
  3. Place read-only GET requests as individual batch parts outside any changeset; GETs inside a changeset are rejected
  4. Use Content-ID headers (Content-ID: 1, 2, …) on parts within a changeset to reference the result of a previous part in the same changeset via $<Content-ID>
  5. Check each inner response's HTTP status code in the multipart response body; a 200 on the outer batch response only confirms the batch was received, not that all operations succeeded

Known gotchas

Related routes

Execute a Dynamics 365 Dataverse OData batch request with changesets for atomic multi-table writes
learn.microsoft.com · 6 steps · unrated
Send multiple Dynamics 365 Web API operations in a single OData batch request
learn.microsoft.com · 5 steps · unrated
Execute a Dataverse Web API $batch request to bundle multiple operations in a single HTTP round trip
learn.microsoft.com · 6 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans