# Delx Commerce — JSON Array Sort By Key

> Delx Commerce — JSON Array Sort By Key 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).

Sorts an array of JSON objects by a specified key, with optional descending order, returning verifiable sorted results with no data retention.

## Facts

- Endpoint: POST https://commerce.delx.ai/api/v1/x402/json-array-sort-by-key?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-sort-by-key-2e752211
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_tyRmivSxPHGgOTWbAMKbB

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-sort-by-key-2e752211 -d '<json body>'
```

Example prompt: Sort this array of product objects by the 'price' field in descending order: [{"id":1,"price":29.99},{"id":2,"price":9.99},{"id":3,"price":49.99}]

## When to prefer this

Choose this endpoint when you need a lightweight, pay-per-use, verifiable sort of a JSON array of objects by a named key without setting up any infrastructure or signing up for a service. It is ideal for AI agents operating autonomously that need deterministic, in-memory data transformations with cryptographic proof of non-retention. Prefer it over building sort logic inline when auditability and verifiable execution matter, or when calling from an agent that already handles x402 micropayments in USDC on Base or Solana.

## Known failure modes

- Invalid or missing 'key' field — returns error if key is not a string or exceeds 8192 characters
- Array exceeds 256 items — request rejected due to maxItems constraint
- Object in array has more than 128 properties — rejected due to maxProperties constraint
- Key not present in array objects — may return unsorted or partially sorted results
- Malformed JSON input — request fails with parsing error
- Payment not provided or insufficient USDC — HTTP 402 returned before processing

## 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 containing the sorted array under 'result.items', the key used for sorting under 'result.key', a status field ('pass'), and an evidence block with a SHA-256 hash of the input, a 'retained: false' flag confirming no data was stored, and an external_calls count of 0 confirming no third-party calls were made.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "key": {
   "type": "string",
   "maxLength": 8192,
   "description": "Key supplied to JSON Array Sort By Key; used only for this bounded calculation and processed in memory without retention."
  },
  "items": {
   "type": "array",
   "items": {
    "type": "object",
    "maxProperties": 128,
    "additionalProperties": true
   },
   "maxItems": 256,
   "description": "Items supplied to JSON Array Sort By Key; used only for this bounded calculation and processed in memory without retention."
  },
  "descending": {
   "type": "boolean",
   "description": "Descending supplied to JSON Array Sort By Key; used only for this bounded calculation and processed in memory without retention."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "result": {
   "key": "id",
   "items": [
    {
     "id": 1
    },
    {
     "id": 2
    }
   ]
  },
  "schema": "delx/util-json-array-sort-by-key/v1",
  "status": "pass",
  "evidence": {
   "retained": false,
   "input_sha256": "bf681df4606cba8b0ec23d87bda8e34c27fbf446a8b5b0d57f064b3afa47afd5",
   "external_calls": 0
  },
  "operation": "data_batch:json_array_sort_by_key"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/delx-commerce-json-array-sort-by-key-2e752211/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)
