# Delx Commerce JSON Contract Check

> Delx Commerce JSON Contract Check is a paid API for AI agents from commerce.delx.ai, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-01).

Validates a JSON value against a bounded JSON Schema-like contract (type, required, properties, enum) and returns validation results with errors

## Facts

- Endpoint: POST https://commerce.delx.ai/api/v1/x402/json-contract-check?utm_source=zero.xyz
- Price: $0.002/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-contract-check-3df842be
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_u2guPDnFwvyJzm4XTcZyh

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-contract-check-3df842be -d '<json body>'
```

Example prompt: Check whether this JSON object is valid against my contract — the contract requires a 'name' string and an 'age' integer, and 'name' must be one of ['Alice','Bob'], and the instance I want to check is {"name":"Alice","age":30}.

## When to prefer this

Use this endpoint when you need a lightweight, pay-per-call, no-signup JSON validation step — especially in agent pipelines that need to confirm structured outputs (e.g. LLM-generated JSON) conform to a bounded contract before acting on them. Prefer it over running a full JSON Schema validator locally when you want verifiable, logged validation with crypto payment receipts, or when the agent environment lacks a schema validation library. Best suited for simple contracts using type, required, properties, and enum — not for complex JSON Schema features like $ref, allOf, or format validators.

## Known failure modes

- Malformed contract (not a valid bounded JSON Schema-like object) — likely returns a 400-style error or validation failure
- Instance is undefined or missing — may return an error or treat as null
- Contract uses unsupported JSON Schema keywords beyond type/required/properties/enum — unsupported keywords silently ignored or rejected
- Payment not included or insufficient USDC — HTTP 402 payment required response
- Network timeout or service unavailability — HTTP 5xx error

## How this service works

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

## Output

Returns a JSON object with a boolean 'valid' field, an 'errors' array listing any violations, an integer 'error_count', and a 'schema' string identifying the validator version (delx/json-contract-check/v1). A valid instance returns valid=true with an empty errors array; an invalid instance returns valid=false with one or more error descriptions.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "contract": {
   "type": "object",
   "description": "Bounded JSON Schema-like contract using type, required, properties, and enum."
  },
  "instance": {
   "description": "JSON value to check."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "scope": "bounded structural subset: type, required, properties, enum",
  "valid": true,
  "errors": [],
  "schema": "delx/json-contract-check/v1",
  "error_count": 0
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/delx-commerce-json-contract-check-3df842be/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)
