Deterministic JSON API ยท Base mainnet
Check whether one structured field contract is safe to hand to another system.
Data Compatibility Checker compares caller-supplied source and target field contracts. It returns a deterministic compatibility decision, ordered issue codes, and machine-actionable remediation.
- Price
- 3000 atomic USDC ($0.003 USDC)
- Endpoint
https://api.zfinia.com/x402/v1/data-compatibility-checker- Payment boundary
- A valid unpaid POST returns HTTP 402 with standard x402 payment requirements.
Supported behavior
Choose backward_compatible or exact comparison. Field names use either exact or ascii_case_insensitive canonicalization. Stable codes include MISSING_REQUIRED_FIELD, TYPE_MISMATCH, NULLABILITY_NARROWING, and UNEXPECTED_SOURCE_FIELD.
Request
{
"contract_version": "1",
"comparison_mode": "backward_compatible",
"canonicalization": "exact",
"source_fields": [
{
"name": "id",
"type": "string",
"required": true,
"nullable": false
},
{
"name": "label",
"type": "string",
"required": false,
"nullable": false
}
],
"target_fields": [
{
"name": "id",
"type": "string",
"required": true,
"nullable": false
}
]
}Compatible response
{
"contract_version": "1",
"comparison_mode": "backward_compatible",
"canonicalization": {
"field_names": "exact",
"changed_names": []
},
"compatible": true,
"issue_count": 0,
"issues": [],
"remediations": [],
"checked_source_fields": 2,
"checked_target_fields": 1,
"assumptions": [
"Source fields represent data offered by the caller; target fields represent the receiving contract."
],
"limitations": [
"Structural field compatibility only; values, nested object shapes, semantic meaning, API behavior, and agent-output quality are not inspected."
]
}Incompatible response
If the source id type is changed to number:
{
"contract_version": "1",
"comparison_mode": "backward_compatible",
"canonicalization": {
"field_names": "exact",
"changed_names": []
},
"compatible": false,
"issue_count": 1,
"issues": [
{
"field": "id",
"code": "TYPE_MISMATCH",
"severity": "error",
"source_type": "number",
"target_type": "string"
}
],
"remediations": [
{
"field": "id",
"code": "TYPE_MISMATCH",
"action": "CHANGE_SOURCE_FIELD_TYPE"
}
],
"checked_source_fields": 2,
"checked_target_fields": 1,
"assumptions": [
"Source fields represent data offered by the caller; target fields represent the receiving contract."
],
"limitations": [
"Structural field compatibility only; values, nested object shapes, semantic meaning, API behavior, and agent-output quality are not inspected."
]
}
Canonicalization
With ascii_case_insensitive, source field CustomerID and target field customerid share the canonical name customerid; changed_names records the normalization. In exact mode they remain distinct.
Repeated-use gates
- Pre-ingestion compatibility
- Migration gates
- CI/CD field-contract checks
- API payload structural handoffs
- Agent-to-agent structured-data handoffs
Deliberate limits
The service does not inspect values or nested shapes, infer business meaning, validate API behavior, or judge agent-output quality.
Try the payment boundary
The optional source tag is aggregate funnel evidence only. It is not identity and does not change price, payment, or revenue classification.
curl -i -X POST 'https://api.zfinia.com/x402/v1/data-compatibility-checker?source=found010_owner_post' \
-H 'content-type: application/json' \
--data '{"contract_version":"1","comparison_mode":"backward_compatible","canonicalization":"exact","source_fields":[{"name":"id","type":"string","required":true,"nullable":false},{"name":"label","type":"string","required":false,"nullable":false}],"target_fields":[{"name":"id","type":"string","required":true,"nullable":false}]}'Expected first response: HTTP 402 Payment Required. Use standard x402-compatible tooling to handle payment; no wallet secret belongs in this example.