{"uid":"cap_NSrlz1n46ziT_-ct5Ypey","slug":"tabular-contract-audit-97b50474","name":"Tabular Contract Audit","description":"Audit your own delimited data against a contract you declare, and get one pass/fail plus the exact row and clause of every breach. Checks types, required values, enums, numeric bounds, lengths, patterns, uniqueness, composite primary keys, null-rate ceilings, header drift and encoding damage in one pass. A pass means the audit was complete and nothing broke, so a file beyond the bounds reports incomplete rather than passing. Nothing is fetched: you supply the rows.","url":"https://api.zfinia.com/x402/v1/tabular-contract-audit?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"csv":{"type":"string","maxLength":262144},"contract":{"type":"object","required":["columns"],"properties":{"columns":{"type":"array","items":{"type":"object","required":["name"],"properties":{"max":{"type":"number"},"min":{"type":"number"},"enum":{"type":"array","items":{"type":"string"},"maxItems":100},"name":{"type":"string"},"type":{"enum":["string","integer","number","boolean","date","datetime"],"type":"string"},"unique":{"type":"boolean"},"pattern":{"type":"string","maxLength":200},"required":{"type":"boolean"},"max_length":{"type":"integer","minimum":1},"max_null_rate":{"type":"number","maximum":1,"minimum":0}},"additionalProperties":false},"maxItems":64,"minItems":1},"primary_key":{"type":"array","items":{"type":"string"},"minItems":1},"allow_extra_columns":{"type":"boolean"},"require_column_order":{"type":"boolean"}},"additionalProperties":false},"delimiter":{"type":"string","maxLength":1,"minLength":1}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.12","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.12/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.12","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.12","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_br-Xp0Rq3QVYm_-wdxYj1","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.12","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Validates delimited (CSV/TSV) data against a declared column contract in one pass, returning a single pass/fail verdict plus the exact row and clause of every breach.","exampleAgentPrompt":"Audit this CSV against my contract — column 'user_id' must be a unique integer and required, 'email' must match pattern '^[^@]+@[^@]+$' and be required, 'status' must be one of ['active','inactive'], and 'score' must be a number between 0 and 100 with max null rate 0.1. Use comma as delimiter and tell me every row and clause that fails.","exampleUseCases":[{"title":"Pre-ingestion data quality gate","prompt":"Before I load this CSV into the database, audit it against my contract: 'id' must be a unique required integer, 'email' is required and must match '^[^@]+@[^@]+$', 'country' must be one of ['US','CA','GB'], and 'age' must be an integer between 0 and 120. Comma-delimited. Tell me every row that breaches any clause."},{"title":"Supplier data file compliance check","prompt":"I just received a tab-delimited data file from a supplier. Audit it against our agreed contract: 'product_sku' is a required unique string, 'price' is a required number with min 0, 'category' must be one of ['electronics','apparel','home'], and 'description' has a max length of 500. Give me a pass or fail and list every breach by row and clause."},{"title":"Detecting null-rate and encoding issues in an export","prompt":"Can you audit this pipe-delimited export for data quality? The contract is: 'transaction_id' is a required unique string and composite primary key with 'date', 'amount' is a required number between 0 and 1000000, 'currency' is required with enum ['USD','EUR','GBP'], and 'notes' has a max null rate of 0.3. Flag any encoding damage or header drift you find too."}],"resultDescription":"A single pass/fail verdict for the entire audit, plus a structured list of every breach with the exact row number and the specific contract clause that was violated. If the data exceeds processing bounds, the result is marked incomplete rather than passing. The response covers type mismatches, missing required values, enum violations, numeric out-of-bounds, length overflows, pattern failures, uniqueness/primary-key duplicates, null-rate ceiling breaches, unexpected or missing headers, and encoding damage — all in one pass.","failureModes":["CSV string exceeds 262144 character limit — audit reports incomplete rather than passing","Contract references column names not found in the CSV header — header drift clause triggered","Invalid regex pattern in contract causes pattern clause to error","Delimiter mismatch between declared delimiter and actual file format leads to single-column parse","Contract has more than 64 columns — rejected at input validation","Malformed CSV (unescaped quotes, inconsistent column counts) may cause row-level parse errors","Missing required 'columns' array in contract object — request rejected","Primary key array references column names not in the contract — clause error"],"whenToPreferThis":"Choose this endpoint when you need a single-pass, row-level audit of delimited data against a fully declared contract and want pinpoint breach locations (row + clause) rather than a summary report. It is ideal for pre-ingestion gates, supplier data validation, ETL quality checks, and compliance audits where you supply the data inline (no remote fetch) and need deterministic pass/fail semantics. Prefer it over generic schema validators when you need composite primary key checks, null-rate ceilings, encoding damage detection, and header drift detection all in one call.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-19T06:37:09.489Z","isFirstParty":false,"canonicalSlug":"tabular-contract-audit-97b50474"}