{"uid":"cap__VwtAa26IPeeRM8MXir9k","slug":"datagate-x402-json-validation-9012794d","name":"DataGate x402 JSON Validation","description":"Validate JSON data against explicit quality rules without modifying the supplied data.","url":"https://datagate-x402.onrender.com/validate","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Data"},"rules":{"type":"object","title":"ValidationRules","properties":{"types":{"type":"object","title":"Types","additionalProperties":{"enum":["string","integer","number","boolean","date"],"type":"string"}},"ranges":{"type":"object","title":"Ranges","additionalProperties":{"type":"object","title":"RangeRule","properties":{"max":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max","default":null},"min":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Min","default":null}},"description":"Optional inclusive numeric range for a field."}},"nullable":{"type":"object","title":"Nullable","additionalProperties":{"type":"boolean"}},"duplicates":{"anyOf":[{"type":"object","title":"DuplicateRule","properties":{"fields":{"type":"array","items":{"type":"string"},"title":"Fields"},"severity":{"enum":["WARN","FAIL"],"type":"string","title":"Severity","default":"WARN"}},"description":"Duplicate detection configuration.\n\nIf fields is empty, the entire record is used as the duplicate key.\nDuplicate records default to WARN so callers can distinguish quality\nwarnings from hard schema failures."},{"type":"null"}],"default":null},"date_formats":{"type":"object","title":"Date Formats","additionalProperties":{"type":"string"}},"required_fields":{"type":"array","items":{"type":"string"},"title":"Required Fields"}},"description":"Machine-readable validation contract for a batch of JSON records.\n\nThis keeps the proven Artifact Handoff pattern: the caller declares an\nexplicit contract first, and the service returns structured violations\ninstead of guessing what the caller intended.","additionalProperties":false}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.05","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.05/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.05","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.05","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_dcS9jYhRQpPTkcBKF3quM","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.05","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Validates a batch of JSON records against explicit quality rules (type checks, required fields, nullability, ranges, duplicates, date formats) and returns structured violations without modifying the input data.","exampleAgentPrompt":"Can you validate this batch of user records — make sure 'email' and 'user_id' are required, 'age' is an integer between 0 and 120, 'email' can't be null, and flag any duplicate records by 'user_id' as a hard failure?","exampleUseCases":[{"title":"ETL pipeline data quality gate","prompt":"Before we load these product records into the warehouse, validate them: 'sku' and 'price' are required, 'price' must be a number between 0 and 99999, 'in_stock' must be a boolean and cannot be null, and flag any duplicate 'sku' values as a hard failure."},{"title":"API input validation for user registrations","prompt":"I'm receiving user sign-up payloads and need to check that 'username', 'email', and 'birthdate' are all present, 'birthdate' matches the format YYYY-MM-DD, 'age' is an integer between 13 and 120, and 'email' is non-nullable."},{"title":"Nightly data audit for analytics team","prompt":"Run a data quality check on today's event logs — required fields are 'event_id', 'timestamp', and 'user_id'; 'timestamp' should follow ISO 8601 format; 'value' should be a number between 0 and 1000000; and warn me about any duplicate 'event_id' entries."}],"resultDescription":"Returns a structured report of validation violations per record, including field-level errors for type mismatches, missing required fields, out-of-range values, nullability breaches, date format failures, and duplicate record warnings or hard failures — without altering the original input data.","failureModes":["Malformed input (data is not an array of objects) returns a 4xx error","Invalid rule configuration (e.g. unknown type enum value) causes a validation error","Empty data array with no rules may return an empty violations list","Missing required top-level fields in the request body causes a schema error","Payment not included or insufficient USDC triggers a 402 Payment Required response","Records with deeply nested fields may not be inspected beyond the top level"],"whenToPreferThis":"Choose this endpoint when you need to validate batches of JSON records against an explicit, machine-readable contract before processing or storing them — especially when you want structured violation reports rather than silent failures. Prefer it over ad-hoc client-side validation when you need consistent, auditable quality gates in ETL pipelines, API ingestion flows, or data quality monitoring jobs. It is ideal when callers want to declare their contract up front (required fields, types, ranges, nullability, duplicates, date formats) and receive actionable structured errors per record.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T06:37:20.889Z","isFirstParty":false}