{"uid":"cap_eBT2dNov_e4zgchfcpc1N","slug":"data-toolkit-json-document-merge-0da91384","name":"Data Toolkit – JSON Document Merge","description":"Deep-merge an ordered list of JSON documents, left to right. Objects are merged key-by-key; arrays, scalars and null in a later document replace the earlier value (last-wins, no array concatenation).","url":"https://data.openverbs.com/v1/merge","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","bodyType","body"],"properties":{"body":{"type":"object","required":["documents"],"properties":{"documents":{"type":"array","items":{"description":"Any JSON value (object, array, string, number, boolean or null)."},"minItems":2,"description":"The documents to merge, in precedence order (later wins)."}},"additionalProperties":false},"type":{"type":"string","const":"http"},"method":{"enum":["POST"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.004","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.004/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.004","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.004","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_dCx__Acmawu1m62PtG6IJ","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.004","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Deep-merges two or more JSON documents into one, with later documents overriding earlier ones","exampleAgentPrompt":"Merge these two JSON configs where the second one takes priority over the first: {\"theme\": \"light\", \"fontSize\": 14, \"lang\": \"en\"} and {\"theme\": \"dark\", \"notifications\": true}","exampleUseCases":[{"title":"Override defaults with user settings","prompt":"I have a default app config and a user-specific config — merge them so the user settings win. Defaults: {\"debug\": false, \"timeout\": 30, \"locale\": \"en-US\"}, user config: {\"debug\": true, \"locale\": \"fr-FR\"}."},{"title":"Combine multi-source API responses","prompt":"I got partial profile data from two different API calls and need them merged into one object. First response: {\"id\": 42, \"name\": \"Alice\"}, second response: {\"email\": \"alice@example.com\", \"name\": \"Alice Smith\"} — merge them with the second taking precedence."},{"title":"Layer environment-specific config overrides","prompt":"Merge my three environment configs in order — base, staging, then prod overrides — so prod values win: base is {\"logLevel\": \"info\", \"maxRetries\": 3, \"region\": \"us-east\"}, staging adds {\"logLevel\": \"debug\"}, and prod sets {\"logLevel\": \"warn\", \"maxRetries\": 5}."}],"resultDescription":"A single merged JSON document combining all input documents, where later documents in the array override earlier ones for any conflicting keys (last-write-wins semantics for deep merge)","failureModes":["Fewer than 2 documents provided — API requires minItems: 2 in the documents array","Invalid or non-JSON values passed as documents — items must be valid JSON values","Malformed request body — bodyType must be 'json', 'form-data', or 'text'","Network or payment failure (x402 protocol) — insufficient USDC balance or payment not accepted"],"whenToPreferThis":"Use this endpoint when you need a reliable, hosted deep-merge of JSON documents with clear precedence ordering and don't want to implement custom merge logic yourself. It is especially useful for layered configuration management (defaults → environment → user overrides) or combining partial API responses. Prefer it over custom in-code merge when working in an agent pipeline where an external stateless call is safer than executing arbitrary merge code.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T00:40:01.607Z","isFirstParty":false}