WritersLogic Verifiable AI Agent Hub Cross Field Rules API

The Cross Field Rules API from WritersLogic Verifiable AI Agent Hub — 1 operation(s) for cross field rules.

GitHub OpenAPI

Operations 1

POST /api/v1/cross-field-rules Check caller-declared rules across fields of a JSON record: end after start… #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/writerslogic-com:writerslogic-com-cross-field-rules-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

writerslogic-com-cross-field-rules-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: WritersLogic Verifiable AI Agent Hub Cross Field Rules API
  version: 2.0.0
  description: Pay-per-call agents settled in USDC on Base via x402. Every response carries a signed provenance envelope.
  contact:
    name: WritersLogic
    url: https://writerslogic.com/agents
    email: agents@writerslogic.com
servers:
- url: https://agents.writerslogic.com
tags:
- name: Cross Field Rules
paths:
  /api/v1/cross-field-rules:
    post:
      operationId: cross_field_rules
      summary: 'Check caller-declared rules across fields of a JSON record: end after start…'
      description: 'Evaluates up to 100 rules you declare over one JSON document and reports, per rule, pass, fail or unknown with the JSON pointer of every violating field and the actual value class (absent, null, empty string, value). Rule kinds: compare (>, >=, /lines/*/start). Presence is explicit (defined, non-null, non-empty) so absent, null and empty are never conflated. A missing operand yields unknown unless you choose fail or skip. For agents validating tool arguments or records beyond what a per-field schema can say. Rules are data, not code: no expressions are evaluated.


        Price: 0.005 USDC on Base (x402).'
      x-x402-price-usdc: '0.005'
      x-x402-amount: '5000'
      x-payment-info:
        protocols:
        - x402
        price:
          mode: fixed
          currency: USD
          amount: '0.005'
      x-audience: developer
      x-sample-url: https://agents.writerslogic.com/api/v1/samples/cross-field-rules
      security:
      - x402: []
      - apiKey: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              required:
              - data
              - rules
              properties:
                data:
                  description: The JSON document the rules apply to.
                rules:
                  type: array
                  minItems: 1
                  maxItems: 100
                  items:
                    type: object
                    additionalProperties: false
                    required:
                    - id
                    - kind
                    properties:
                      id:
                        type: string
                        maxLength: 80
                      kind:
                        type: string
                        enum:
                        - compare
                        - required-if
                        - forbidden-if
                        - exactly-one
                        - at-most-one
                        - at-least-one
                        - all-or-none
                        - sum-equals
                      left:
                        type: string
                        maxLength: 300
                        description: JSON pointer; * matches every array element.
                      op:
                        type: string
                        enum:
                        - ==
                        - '!='
                        - '>'
                        - '>='
                        - <
                        - <=
                      right:
                        type: string
                        maxLength: 300
                        description: JSON pointer compared with left (use value for a constant).
                      value:
                        description: Constant to compare with, or the expected total.
                      as:
                        type: string
                        enum:
                        - auto
                        - number
                        - decimal
                        - date
                        - datetime
                        - string
                      when:
                        type: object
                        additionalProperties: false
                        required:
                        - path
                        - op
                        properties:
                          path:
                            type: string
                            maxLength: 300
                          op:
                            type: string
                            enum:
                            - equals
                            - not-equals
                            - in
                            - not-in
                            - present
                            - absent
                            - empty
                          value:
                            description: Operand for equals, not-equals, in, not-in.
                      require:
                        type: array
                        maxItems: 20
                        items:
                          type: string
                          maxLength: 300
                      forbid:
                        type: array
                        maxItems: 20
                        items:
                          type: string
                          maxLength: 300
                      fields:
                        type: array
                        maxItems: 50
                        items:
                          type: string
                          maxLength: 300
                      total:
                        type: string
                        maxLength: 300
                      tolerance:
                        type: string
                        maxLength: 40
                        description: Decimal tolerance for sum-equals, default 0.
                      presence:
                        type: string
                        enum:
                        - defined
                        - non-null
                        - non-empty
                        description: 'What counts as present: defined (key exists), non-null (default), non-empty.'
                onMissing:
                  type: string
                  enum:
                  - unknown
                  - fail
                  - skip
                  description: 'Missing or null compare operand: unknown (default), fail or skip.'
            example:
              data:
                start: '2026-03-01'
                end: '2026-02-01'
                kind: card
                card: '4111'
                iban: null
              rules:
              - id: end-after-start
                kind: compare
                left: /end
                op: '>'
                right: /start
                as: date
              - id: card-needs-number
                kind: required-if
                when:
                  path: /kind
                  op: equals
                  value: card
                require:
                - /card
              - id: one-payment-method
                kind: exactly-one
                fields:
                - /card
                - /iban
      responses:
        '200':
          description: Paid result with provenance
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      status:
                        type: string
                        enum:
                        - pass
                        - fail
                        - unknown
                        - unsupported
                        description: 'pass: every rule held. fail: a rule was violated (see witnesses). unknown: the input lacks the evidence to decide. unsupported: outside what this engine covers. Missing evidence is never a pass.'
                      rules:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                            kind:
                              type: string
                            verdict:
                              type: string
                              enum:
                              - pass
                              - fail
                              - unknown
                            evaluations:
                              type: integer
                            violations:
                              type: array
                              items:
                                type: object
                                properties:
                                  path:
                                    type: string
                                  detail:
                                    type: string
                                  actual:
                                    description: Value or value class found.
                      counts:
                        type: object
                        properties:
                          pass:
                            type: integer
                          fail:
                            type: integer
                          unknown:
                            type: integer
                      witnesses:
                        type: array
                        items:
                          type: object
                          properties:
                            ruleId:
                              type: string
                            detail:
                              type: string
                            path:
                              type: string
                              description: JSON pointer or dotted path into the input.
                            offset:
                              type: integer
                            index:
                              type: integer
                            expected:
                              description: What the rule required.
                            actual:
                              description: What the input had.
                      versions:
                        type: object
                        description: Every semantic dependency of this answer (engine, tables and their as-of dates, tokenizer, calendar, rounding profile).
                      limits:
                        type: array
                        items:
                          type: string
                      deterministic:
                        type: boolean
                        description: 'Always true: pure code, no model.'
                  _provenance:
                    type: object
                    description: C2PA-aligned manifest and W3C VC 2.0 (eddsa-jcs-2022) issued by the hub DID; verify at POST /api/v1/verify-provenance
                required:
                - data
                - _provenance
        '400':
          description: Invalid request (no payment consumed)
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
        '401':
          description: Invalid X-API-KEY
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
        '402':
          description: Payment required or invalid
          content:
            application/json:
              schema:
                type: object
                description: x402 v2 PaymentRequired (also base64 in the PAYMENT-REQUIRED header)
                properties:
                  x402Version:
                    type: integer
                  error:
                    type: string
                  code:
                    type: string
                  resource:
                    type: object
                  accepts:
                    type: array
                    items:
                      type: object
                  extensions:
                    type: object
        '502':
          description: Upstream failure; the payment is released or not settled
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
      tags:
      - Cross Field Rules
components:
  securitySchemes:
    x402:
      type: apiKey
      in: header
      name: PAYMENT-SIGNATURE
      description: x402 v2 payment payload (base64) sent after a 402 challenge
    apiKey:
      type: apiKey
      in: header
      name: X-API-KEY