{"openapi":"3.1.0","info":{"title":"JSON Merge API","version":"1.0.0","description":"Deep-merge JSON objects — the operation every config and settings system needs. The merge endpoint recursively merges two objects (the second overrides the first), or a whole list of objects merged left-to-right, combining nested objects key by key rather than replacing them wholesale, with a choice of array strategy: replace (default), concat, union (concatenate and de-duplicate) or merge_index (merge element by element). A null in the overriding object can either overwrite the existing value or be ignored, so you can patch only the fields you mean to. The defaults endpoint is the inverse and just as useful: it fills in only the keys your data is missing from a defaults object, so your existing values always win — exactly how you layer a user's settings over default configuration. Everything is computed locally and deterministically, with no schema required. Ideal for configuration and feature-flag layering, settings and preference merges, combining API responses or partial updates, environment overrides, and template defaults. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This merges documents; to diff or patch them (RFC 6902) use a JSON-diff API, to flatten them use a flatten API, and to address values use a JSON-Pointer API.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/jsonmerge-api","description":"oanor gateway"}],"tags":[{"name":"Merge"},{"name":"Meta"}],"components":{"securitySchemes":{"oanorKey":{"type":"apiKey","in":"header","name":"x-oanor-key","description":"Get your key at https://www.oanor.com/developer/keys"}}},"security":[{"oanorKey":[]}],"paths":{"/v1/defaults":{"get":{"operationId":"get_v1_defaults","tags":["Merge"],"summary":"Apply defaults","description":"","parameters":[{"name":"data","in":"query","required":true,"description":"Your object (JSON) — its values win","schema":{"type":"string"},"example":"{\"a\":1}"},{"name":"defaults","in":"query","required":true,"description":"Defaults to fill missing keys (JSON)","schema":{"type":"string"},"example":"{\"a\":9,\"b\":2}"},{"name":"array_strategy","in":"query","required":false,"description":"replace (default), concat, union or merge_index","schema":{"type":"string"}}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"result":{"a":1,"b":2},"array_strategy":"replace"},"meta":{"timestamp":"2026-06-03T17:42:22.107Z","request_id":"55af14aa-52f1-4f4c-917d-9693f0a7a4a9"},"status":"ok","message":"Apply defaults","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/merge":{"get":{"operationId":"get_v1_merge","tags":["Merge"],"summary":"Deep-merge objects","description":"","parameters":[{"name":"a","in":"query","required":false,"description":"Base object (JSON)","schema":{"type":"string"},"example":"{\"a\":1,\"b\":{\"c\":2}}"},{"name":"b","in":"query","required":false,"description":"Overriding object (JSON)","schema":{"type":"string"},"example":"{\"b\":{\"d\":3},\"e\":4}"},{"name":"objects","in":"query","required":false,"description":"Alternatively a JSON array of objects","schema":{"type":"string"}},{"name":"array_strategy","in":"query","required":false,"description":"replace (default), concat, union or merge_index","schema":{"type":"string"}},{"name":"null_strategy","in":"query","required":false,"description":"overwrite (default) or ignore","schema":{"type":"string"}}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"result":{"a":1,"b":{"c":2,"d":3},"e":4},"sources":2,"null_strategy":"overwrite","array_strategy":"replace"},"meta":{"timestamp":"2026-06-03T17:42:22.207Z","request_id":"bce488eb-3b87-4948-a4ba-332c1356f048"},"status":"ok","message":"Deep-merge objects","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/meta":{"get":{"operationId":"get_v1_meta","tags":["Meta"],"summary":"Spec","description":"","parameters":[],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"name":"JSON Merge API","notes":"Send objects as JSON (POST body recommended). Nested objects merge recursively; arrays follow the chosen strategy. This merges documents — to diff or patch them (RFC 6902) use a JSON-diff API, and to flatten or address values use flatten / JSON-Pointer APIs. Nothing is stored.","version":"v1","endpoints":[{"path":"/v1/merge","params":{"a":"the base object (JSON)","b":"the overriding object (JSON)","objects":"alternatively, a JSON array of objects merged left-to-right","null_strategy":"overwrite (default) or ignore","array_strategy":"replace (default), concat, union or merge_index"},"returns":"the deep-merged object"},{"path":"/v1/defaults","params":{"data":"your object (JSON) — its values win","defaults":"the defaults to fill missing keys from (JSON)","array_strategy":"as merge"},"returns":"data with missing keys filled from defaults"},{"path":"/v1/meta","params":[],"returns":"this document"}],"description":"Deep-merge JSON objects. The merge endpoint recursively merges two objects (the second overrides the first) — or a whole list of objects left-to-right — combining nested objects key by key, with a choice of array strategy: replace (default), concat, union (concat and de-duplicate) or merge_index (merge element by element). A null in the overriding object can overwrite or be ignored. The defaults endpoint is the inverse: it fills in only the keys your data is missing from a defaults object, so existing values always win — exactly what you want for layering user settings over default configuration. Pure local, no key."},"meta":{"timestamp":"2026-06-03T17:42:22.312Z","request_id":"05360ee3-97d7-4a4c-b401-64d364337657"},"status":"ok","message":"Meta","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}}},"x-oanor-pricing":[{"slug":"free","name":"Free","price_cents_month":0,"monthly_call_quota":4135,"rps_limit":2,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":565,"monthly_call_quota":13650,"rps_limit":8,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":2555,"monthly_call_quota":187500,"rps_limit":20,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":6355,"monthly_call_quota":980000,"rps_limit":50,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/jsonmerge-api"}