# Delx Commerce — JSON Merge Patch (RFC 7396)

> Delx Commerce — JSON Merge Patch (RFC 7396) is a paid API for AI agents from commerce.delx.ai, paid per call via x402, $0.003/call, status unknown (last checked 2026-10-01).

Applies a JSON Merge Patch (RFC 7396) to a target JSON object, returning the merged result and a list of changed fields.

## Facts

- Endpoint: POST https://commerce.delx.ai/api/v1/x402/json-merge-patch?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-01
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/delx-commerce-json-merge-patch-rfc-7396-9b2aff4b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_5aOuaaL6YCHXKWruHpilG

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability delx-commerce-json-merge-patch-rfc-7396-9b2aff4b -d '<json body>'
```

Example prompt: Merge this patch {"ready": true, "legacy": null} into my target object {"legacy": "old", "ready": false, "name": "app"} using RFC 7396 merge semantics and tell me which fields changed.

## When to prefer this

Choose this endpoint when you need a simple, pay-per-call, no-signup RFC 7396 JSON merge patch operation with verifiable delivery and crypto micropayment (USDC on Base or Solana). Prefer this over building your own merge logic when you want a standardized, auditable result with changed-field tracking included.

## Known failure modes

- Invalid JSON in target or patch fields causes a 400 error
- Missing required 'target' or 'patch' fields returns a validation error
- Payment failure via x402 protocol causes a 402 response before processing
- Non-object values (e.g. arrays at root) may not be supported under strict RFC 7396 top-level semantics

## How this service works

Pay-per-result APIs for agents. No signup. Exact price. Verifiable delivery. USDC on Base + Solana via x402.

## Output

Returns the merged JSON object after applying the patch to the target using RFC 7396 top-level merge semantics, along with a list of field names that were changed or deleted, a schema identifier (delx/util-json-merge-patch/v1), and a scope description.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "patch": {
   "type": "object",
   "description": "Input field: patch."
  },
  "target": {
   "type": "object",
   "description": "Input field: target."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "scope": "RFC 7396 top-level merge semantics",
  "result": {
   "ready": true
  },
  "schema": "delx/util-json-merge-patch/v1",
  "changed_fields": [
   "legacy",
   "ready"
  ]
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/delx-commerce-json-merge-patch-rfc-7396-9b2aff4b/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from commerce.delx.ai](https://www.zero.xyz/host/commerce.delx.ai/llms.txt)
