# Delx Commerce — JSON Array Length Check

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

Validates that specified array fields within a JSON object have lengths falling within a given minimum and maximum range, returning a pass/fail result with details on any invalid fields.

## Facts

- Endpoint: POST https://commerce.delx.ai/api/v1/x402/json-array-length-check?utm_source=zero.xyz
- Price: $0.001/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-array-length-check-b181aacd
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_NS00AqbUNJZsSRiWYNOCm

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-array-length-check-b181aacd -d '<json body>'
```

Example prompt: Check whether the arrays in this JSON object all have between 2 and 10 elements — specifically the fields 'tags' and 'items': {"tags":["a","b"],"items":[1,2,3,4,5,6,7,8,9,10,11]}.

## When to prefer this

Choose this endpoint when you need a lightweight, pay-per-call, no-signup array length validation check on JSON objects — especially useful in agentic workflows where you want verifiable, tamper-evident results (SHA-256 input hash) without retaining data. Prefer it over custom code when you need on-demand validation with a cryptographic audit trail and don't want to maintain validation infrastructure.

## Known failure modes

- Array field named in 'fields' not found in 'object' — may be silently skipped or flagged as invalid
- Input object exceeds 128 properties limit — request rejected
- Fields array exceeds 256 items limit — request rejected
- Missing or malformed 'object' body — validation cannot proceed
- Non-integer minimum or maximum values — schema validation error
- Payment not included or insufficient USDC — 402 Payment Required response

## 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 indicating whether all specified array fields passed the length check (pass/fail status, boolean 'passed'), a list of any fields that violated the constraints ('invalid_fields'), the operation name, schema version, and evidence metadata including a SHA-256 hash of the input and confirmation that no data was retained and no external calls were made.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "fields": {
   "type": "array",
   "items": {
    "type": "string",
    "maxLength": 8192
   },
   "maxItems": 256,
   "description": "Fields supplied to JSON Array Length Check; used only for this bounded calculation and processed in memory without retention."
  },
  "object": {
   "type": "object",
   "description": "Object supplied to JSON Array Length Check; used only for this bounded calculation and processed in memory without retention.",
   "maxProperties": 128,
   "additionalProperties": true
  },
  "maximum": {
   "type": "integer",
   "description": "Maximum supplied to JSON Array Length Check; used only for this bounded calculation and processed in memory without retention."
  },
  "minimum": {
   "type": "integer",
   "description": "Minimum supplied to JSON Array Length Check; used only for this bounded calculation and processed in memory without retention."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "result": {
   "passed": true,
   "invalid_fields": []
  },
  "schema": "delx/util-json-array-length-check/v1",
  "status": "pass",
  "evidence": {
   "retained": false,
   "input_sha256": "95a21205d9c6d659623a8ea762303c79e2d75f8c4ff1455041af6261652db58d",
   "external_calls": 0
  },
  "operation": "data_batch:json_array_length_check"
 }
}
```

## More

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