Ardaro Purchase Document Review
Server Details
Receipt extraction, invoice-to-PO quantity allocation, and free three-document discrepancy checks.
- Status
- Healthy
- Uptime
- 95.2% over 22 days
- Last Tested
- Transport
- Streamable HTTP · MCP 2025-11-25
- URL
TDQS
Scored across 5 tools
Each tool has a clearly distinct purpose: receipt extraction, example inspection, service status, invoice allocation matching, and general reconciliation. The cross-references in the descriptions strongly reinforce the boundaries, especially between match_invoice and reconcile_purchase_documents.
Tool names follow a consistent lower_snake_case verb_noun pattern, with the two service-inspection tools sharing a clear get_document_ prefix. The naming is predictable and immediately conveys the action being performed.
Five tools is a well-scoped set for a purchase document review server. Each tool covers a distinct operation without redundancy, and the inclusion of status and example tools helps agents safely discover and use the paid features.
The server covers the core document-review lifecycle: receipt analysis, invoice-to-PO allocation, multi-document discrepancy checking, and service readiness/probe support. The explicit boundaries and fallback guidance leave no obvious dead ends for the stated purpose.
Available Tools
5 toolsanalyze_receiptAnalyze a receipt for human reviewARead-onlyIdempotentInspect
Extract and validate structured expense data from receipt text or a provider-neutral receipt extraction. Use when an agent needs merchant, date, tax, total, line items, confidence, duplicate detection, and arithmetic validation before creating or reconciling an expense. The result is advisory and always requires human review. Paid tool: 0.25 USDC per accepted request. Requires an owner-authorized x402-capable client. Use get_document_example with service='receipt' for a fixed free example.
| Name | Required | Description | Default |
|---|---|---|---|
| input | Yes | One receipt supplied as bounded OCR text or a provider-neutral structured extraction. Choose exactly one input kind. | |
| contract_version | Yes | Required request contract identifier; send this exact version string. | |
| existing_fingerprints | Yes | Receipt fingerprints already known to the caller for duplicate comparison. Supply lowercase 64-character SHA-256 hex strings, or an empty array when none are available; at most 10,000 entries. |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnly/idempotent/non-destructive, and the description goes well beyond them: it discloses the commercial model (0.25 USDC per accepted request), an authorization prerequisite (owner-authorized x402-capable client), and that output is advisory and always requires human review. These are material behaviors an agent cannot infer from annotations or schema.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Four sentences, each carrying non-redundant load: capability, usage condition, cost/auth/review caveats, and the free-example alternative. Front-loaded with what it does, with caveats and routing following.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With an output schema present, return values need not be re-explained, and 100% schema coverage handles inputs. The description fills the remaining gaps an agent needs — pricing, required client authorization, mandatory human review, and a free alternative — leaving nothing essential unstated.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the parameters (contract_version, input oneOf kinds, existing_fingerprints) are already fully documented in the schema. The description only alludes to duplicate detection and confidence, adding no syntax or format detail beyond the schema; baseline 3 applies when the schema does the heavy lifting.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Specific verb+resource: 'Extract and validate structured expense data from receipt text or a provider-neutral receipt extraction,' and it enumerates the exact fields produced (merchant, date, tax, total, line items, confidence). It also contrasts itself with a sibling by pointing to get_document_example for a free fixed example, so an agent can distinguish it without opening schemas.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
States the trigger condition clearly — 'Use when an agent needs ... before creating or reconciling an expense' — which situates it relative to siblings like reconcile_purchase_documents and match_invoice. It additionally names the free alternative path (get_document_example with service='receipt'), giving both when-to-use and when-to-use-something-else.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_document_exampleGet document exampleARead-onlyIdempotentInspect
Inspect a fixed synthetic request and expected result before integrating or paying. Select service from the enum; no caller document is accepted, processed or stored. Returns service and details containing that service's example. Free; no wallet authorization. Use get_document_service_status for current readiness, prices and retention instead.
| Name | Required | Description | Default |
|---|---|---|---|
| service | Yes | receipt: extraction checks; invoice: paid invoice-to-PO quantity allocation; reconciliation: free three-document discrepancy checks without allocation. Choose one service; examples do not process caller documents. |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint, idempotentHint, and destructiveHint. The description adds valuable behavioral context beyond annotations: it states that no caller document is accepted, processed, or stored, and that the tool is free. This clarifies side-effect-free operation and cost implications, going beyond the annotation flags.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Four sentences with clear front-loading of purpose and usage. No redundant filler; every sentence adds information. The alternative tool is mentioned at the end without cluttering the core description.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a single-parameter tool with a complete schema, output schema, and comprehensive annotations, the description covers purpose, usage, behavioral constraints, and alternatives. Nothing essential is missing for correct invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, and the schema already describes each enum value in detail. The description's 'Select service from the enum' adds little beyond what the schema provides, but it does reinforce that examples do not process caller documents. This meets the baseline for high schema coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states a specific action ('Inspect a fixed synthetic request and expected result') and resource (document examples for a service). It distinguishes itself from siblings by explicitly naming get_document_service_status as the alternative for status/prices/retention.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly states when to use (before integrating or paying) and provides a direct exclusion ('Use get_document_service_status for current readiness, prices and retention instead'). The when-not condition is unambiguous.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_document_service_statusGet document readiness and termsARead-onlyIdempotentInspect
Check the selected service's current runtime readiness, input limits, pricing and retention before use. Returns service and details; ready=false means the underlying service is unavailable. Free cached runtime read; no external probe, payment, analysis or historical document retrieval. Use get_document_example for a fixed integration sample instead.
| Name | Required | Description | Default |
|---|---|---|---|
| service | Yes | receipt: extraction checks; invoice: paid invoice-to-PO quantity allocation; reconciliation: free three-document discrepancy checks without allocation. Choose one service; examples do not process caller documents. |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnly, idempotent, and non-destructive behavior, but the description adds meaningful context beyond them: 'Free cached runtime read; no external probe...' and the semantic that ready=false means the underlying service is unavailable. This clarifies the tool's actual runtime behavior and limits.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is three tightly written sentences with no filler. It front-loads the primary purpose, then adds the ready=false semantics, behavioral caveats, and an alternative in a logical order.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the presence of an output schema, complete parameter documentation, and informative annotations, the description covers purpose, usage timing, exclusions, behavioral semantics, and an alternative. Nothing critical is missing for an agent to invoke it correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema already documents the single service parameter with full enum coverage and per-value descriptions, so the description adds little parameter-level meaning beyond referring to 'the selected service.' With 100% schema coverage, the baseline of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb ('Check') and a clear resource ('the selected service's current runtime readiness, input limits, pricing and retention'), and defines the meaning of ready=false. It also distinguishes itself from get_document_example by explicitly directing that use case elsewhere.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It states when to use the tool ('before use'), what it is not for ('no external probe, payment, analysis or historical document retrieval'), and names an alternative ('Use get_document_example for a fixed integration sample instead'). This gives the agent explicit routing guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
match_invoiceAllocate invoice quantities to a purchase order (paid)ARead-onlyIdempotentInspect
USE THIS WHEN the question is a quantity-allocation question: how much of this PO has been invoiced, whether an invoice is fully, partially, or over billed against the PO, or how much quantity remains. Aggregates split invoice lines against one PO line and returns a status per line - fully_invoiced, partially_invoiced, uninvoiced, or overbilled - plus remaining quantity. Matches by explicit PO line ID or a unique exact product code only, never by description. Inputs: one invoice plus one PO; it does not accept a receipt. DO NOT USE THIS to compare a receipt against an invoice, or for a general list of differences with no allocation question - call reconcile_purchase_documents instead; it is free and does not require calling this tool first or after. Paid: 0.50 USDC per accepted comparison, explicit buyer-authorized x402 payment. Call get_document_service_status with service='invoice' first to confirm current readiness and price. Advisory output only: human review required; no delivery verification, payment execution, prior-invoice history, or accounting writes.
| Name | Required | Description | Default |
|---|---|---|---|
| invoice | Yes | ||
| purchase_order | Yes | ||
| contract_version | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint, idempotentHint, and destructiveHint, and the description adds valuable behavior: matching only by explicit PO line ID or unique exact product code (never description), no receipt input, paid fee, advisory-only output requiring human review, and no accounting writes. No contradiction with annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is dense but front-loaded with the decision trigger, then exclusions, fee, prerequisite, and limitations. Every sentence earns its place for selection or invocation; there is no filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
It covers return semantics (per-line statuses plus remaining quantity), exclusions, prerequisite service check, cost, and advisory nature. Since an output schema exists, the lack of an explicit return format description is not a gap.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate. It adds meaning by clarifying the two main inputs are one invoice and one purchase order, explicitly excluding receipts, and specifying the only accepted matching keys. It does not discuss contract_version, but that is a const and the detailed schema structure carries the remaining burden.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states the exact scope: quantity-allocation questions about how much of a PO has been invoiced, with concrete output statuses (fully_invoiced, partially_invoiced, uninvoiced, overbilled) and remaining quantity. It clearly differentiates itself from reconcile_purchase_documents by naming what it is not for.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It provides explicit 'USE THIS WHEN' and 'DO NOT USE THIS' conditions, naming the sibling tool reconcile_purchase_documents for receipt-invoice comparisons and general diffs. It also instructs the agent to call get_document_service_status first, which is concrete routing guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
reconcile_purchase_documentsCompare receipt, invoice and PO for discrepancies (free)ARead-onlyIdempotentInspect
USE THIS WHEN you have up to three documents (receipt, invoice, purchase order - any subset) and need a discrepancy list: reference, item, quantity, price, or arithmetic mismatches between them. This is the default choice for 'does this receipt match the invoice' or 'do these documents agree' questions. Links use explicit line references, exact product codes, or conservative normalized descriptions. DO NOT USE THIS if the actual question is a quantity-allocation question - how much of a PO has been invoiced, or resolving partial/split invoice lines against PO quantities. This tool does not allocate billed quantities or calculate remaining PO quantities: partial quantities are reported as plain differences, and any many-to-one (split) link is flagged ambiguous_many_to_one rather than resolved. For that, call match_invoice instead (paid, 0.50 USDC) - but you never need to call it before or after this tool; each works standalone. Free, no wallet authorization, no payment metadata accepted. Missing documents or fields are marked needs_review, never inferred. No OCR, retrieval, saved analyses, paid service calls, delivery verification, payment approval, or accounting writes. Human review required.
| Name | Required | Description | Default |
|---|---|---|---|
| invoice | No | Caller-supplied structured data. Use opaque supplier IDs and decimal strings; omit unknown fields. Receipt kind describes the source document, not verified delivery. Field names align with invoice matching; receipt extraction output must be mapped explicitly. | |
| receipt | No | Caller-supplied structured data. Use opaque supplier IDs and decimal strings; omit unknown fields. Receipt kind describes the source document, not verified delivery. Field names align with invoice matching; receipt extraction output must be mapped explicitly. | |
| purchase_order | No | Caller-supplied structured data. Use opaque supplier IDs and decimal strings; omit unknown fields. Receipt kind describes the source document, not verified delivery. Field names align with invoice matching; receipt extraction output must be mapped explicitly. |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations declare readOnlyHint=true and destructiveHint=false, which the description reinforces with 'no accounting writes' and 'no paid service calls'. The description adds behavioral context beyond annotations: missing documents/fields marked needs_review, never inferred; partial quantities reported as plain differences; many-to-one links flagged ambiguous_many_to_one; no OCR, no retrieval, no saved analyses; human review required. The description slightly exceeds necessary transparency, but it's all relevant. No contradiction. The only minor gap is that it doesn't explicitly state it's free in the description body (title says free), but that's in the schema as well. Solid.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is comprehensive but somewhat long. It front-loads the primary use case and key output, then covers exclusions and alternatives. The paragraph is dense but well-structured: usage, limitations, alternatives, and behavioral disclaimers. It could be trimmed slightly (e.g., repeating 'free' in title and 'no OCR' list), but every sentence adds value. Not excessively verbose. Score 4.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a complex tool with three nested objects, the description completely covers what the tool does, does not do, when to use it, when not to, alternatives, limitations (max lines), data handling, and output behavior (needs_review). The output schema exists, so return values are likely defined. The description also mentions human review required. Given the high complexity, this is a complete description. Nothing essential is missing.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100% at the top level, with detailed descriptions for each object (invoice, receipt, purchase_order) stating they are caller-supplied structured data, using opaque supplier IDs, decimal strings, omitting unknown fields, and field name alignment. The description adds overall context beyond schema: that the tool takes up to three documents any subset, and the structure of discrepancies. The schema's nested objects are well-defined. Given the high coverage and detailed schema, the description adds value by clarifying input semantics (e.g., 'receipt kind describes source document, not verified delivery') which is beyond schema. Score 4.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb and resource: reconcile up to three documents (receipt, invoice, purchase order) and output a discrepancy list. It distinguishes itself from sibling match_invoice by explicitly saying it does not allocate quantities or resolve splits. The title also adds 'free' as a differentiator. The purpose is unambiguous and differentiates from siblings.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives explicit when-to-use conditions: when you have up to three documents and need discrepancy lists regarding reference, item, quantity, price, or arithmetic. It gives explicit when-not-to-use: for quantity-allocation questions, partial/split invoice lines. It names the alternative tool (match_invoice) and clarifies it is paid and standalone. This is thorough usage guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
4 tool updates
- Changed
get_document_example3 fields changed- changed
Input schema / properties / service / descriptionPrevious value: -"receipt: extraction checks. Examples do not process caller documents."New value: +"receipt: extraction checks; invoice: paid invoice-to-PO quantity allocation; reconciliation: free three-document discrepancy checks without allocation. Choose one service; examples do not process caller documents." - changed
Input schema / properties / service / enumPrevious value: -[ - "receipt" -]New value: +[ + "receipt", + "invoice", + "reconciliation" +] - changed
Output schema / oneOfPrevious value: -[ - { - "additionalProperties": false, - "properties": { - "details": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "additionalProperties": false, - "properties": { - "example_version": { - "const": "ardaro.receipt-intelligence.example.v1" - }, - "expected_response": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "additionalProperties": false, - "description": "Receipt Intelligence v1 response. result is authoritative; receipt is a derived compatibility projection that MUST match result.", - "properties": { - "arithmetic_consistency": { - "enum": [ - "verified", - "mismatch", - "unavailable" - ] - }, - "arithmetic_verified": { - "type": [ - "boolean", - "null" - ] - }, - "confidence": { - "type": "object" - }, - "contract_version": { - "const": "ardaro.agent-receipt-intelligence.response.v1" - }, - "duplicate_check": { - "type": "object" - }, - "duplicate_fingerprint": { - "pattern": "^[0-9a-f]{64}$", - "type": [ - "string", - "null" - ] - }, - "engine": { - "type": "object" - }, - "identities": { - "additionalProperties": false, - "properties": { - "analysis_result_identity": { - "pattern": "^res_[0-9a-f]{64}$", - "type": "string" - }, - "document_fingerprint": { - "pattern": "^[0-9a-f]{64}$", - "type": [ - "string", - "null" - ] - }, - "request_identity": { - "pattern": "^req_[0-9a-f]{64}$", - "type": "string" - } - }, - "required": [ - "request_identity", - "document_fingerprint", - "analysis_result_identity" - ], - "type": "object" - }, - "metering": { - "type": "object" - }, - "payment_identity": { - "additionalProperties": false, - "properties": { - "protocol": { - "const": "x402-v2" - }, - "reference": { - "pattern": "^pay_[0-9a-f]{64}$", - "type": "string" - }, - "replayed": { - "type": "boolean" - } - }, - "required": [ - "protocol", - "reference", - "replayed" - ], - "type": "object" - }, - "policy": { - "type": "object" - }, - "receipt": { - "additionalProperties": false, - "description": "Non-authoritative compatibility projection generated from result under ardaro.result-receipt-projection.v1. Consumers MUST use result for structured receipt values and reject a response when this projection diverges.", - "properties": { - "line_items": { - "items": { - "additionalProperties": false, - "properties": { - "amount": { - "oneOf": [ - { - "type": "null" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "additionalProperties": false, - "properties": { - "level": { - "enum": [ - "high", - "medium", - "low" - ] - }, - "score": { - "maximum": 1, - "minimum": 0, - "type": "number" - } - }, - "required": [ - "score", - "level" - ], - "type": "object" - }, - "source": { - "enum": [ - "structured_summary", - "structured_line_item", - "provider_neutral", - "text_fallback", - "inferred" - ] - }, - "value": { - "maxLength": 80, - "minLength": 1, - "type": "string" - } - }, - "required": [ - "value", - "confidence", - "source" - ], - "type": "object" - } - ] - }, - "description": { - "oneOf": [ - { - "type": "null" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "additionalProperties": false, - "properties": { - "level": { - "enum": [ - "high", - "medium", - "low" - ] - }, - "score": { - "maximum": 1, - "minimum": 0, - "type": "number" - } - }, - "required": [ - "score", - "level" - ], - "type": "object" - }, - "source": { - "enum": [ - "structured_summary", - "structured_line_item", - "provider_neutral", - "text_fallback", - "inferred" - ] - }, - "value": { - "maxLength": 240, - "minLength": 1, - "type": "string" - } - }, - "required": [ - "value", - "confidence", - "source" - ], - "type": "object" - } - ] - }, - "product_code": { - "oneOf": [ - { - "type": "null" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "additionalProperties": false, - "properties": { - "level": { - "enum": [ - "high", - "medium", - "low" - ] - }, - "score": { - "maximum": 1, - "minimum": 0, - "type": "number" - } - }, - "required": [ - "score", - "level" - ], - "type": "object" - }, - "source": { - "enum": [ - "structured_summary", - "structured_line_item", - "provider_neutral", - "text_fallback", - "inferred" - ] - }, - "value": { - "maxLength": 80, - "minLength": 1, - "type": "string" - } - }, - "required": [ - "value", - "confidence", - "source" - ], - "type": "object" - } - ] - }, - "quantity": { - "oneOf": [ - { - "type": "null" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "additionalProperties": false, - "properties": { - "level": { - "enum": [ - "high", - "medium", - "low" - ] - }, - "score": { - "maximum": 1, - "minimum": 0, - "type": "number" - } - }, - "required": [ - "score", - "level" - ], - "type": "object" - }, - "source": { - "enum": [ - "structured_summary", - "structured_line_item", - "provider_neutral", - "text_fallback", - "inferred" - ] - }, - "value": { - "maxLength": 80, - "minLength": 1, - "type": "string" - } - }, - "required": [ - "value", - "confidence", - "source" - ], - "type": "object" - } - ] - }, - "unit_price": { - "oneOf": [ - { - "type": "null" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "additionalProperties": false, - "properties": { - "level": { - "enum": [ - "high", - "medium", - "low" - ] - }, - "score": { - "maximum": 1, - "minimum": 0, - "type": "number" - } - }, - "required": [ - "score", - "level" - ], - "type": "object" - }, - "source": { - "enum": [ - "structured_summary", - "structured_line_item", - "provider_neutral", - "text_fallback", - "inferred" - ] - }, - "value": { - "maxLength": 80, - "minLength": 1, - "type": "string" - } - }, - "required": [ - "value", - "confidence", - "source" - ], - "type": "object" - } - ] - } - }, - "required": [ - "description", - "product_code", - "quantity", - "unit_price", - "amount" - ], - "type": "object" - }, - "maxItems": 100, - "type": "array" - }, - "purchase_date": { - "oneOf": [ - { - "type": "null" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "additionalProperties": false, - "properties": { - "level": { - "enum": [ - "high", - "medium", - "low" - ] - }, - "score": { - "maximum": 1, - "minimum": 0, - "type": "number" - } - }, - "required": [ - "score", - "level" - ], - "type": "object" - }, - "source": { - "enum": [ - "structured_summary", - "structured_line_item", - "provider_neutral", - "text_fallback", - "inferred" - ] - }, - "value": { - "maxLength": 10, - "minLength": 1, - "type": "string" - } - }, - "required": [ - "value", - "confidence", - "source" - ], - "type": "object" - } - ] - }, - "purchase_order": { - "additionalProperties": false, - "properties": { - "confidence": { - "additionalProperties": false, - "properties": { - "level": { - "enum": [ - "high", - "medium", - "low" - ] - }, - "score": { - "maximum": 1, - "minimum": 0, - "type": "number" - } - }, - "required": [ - "score", - "level" - ], - "type": "object" - }, - "source": { - "enum": [ - "structured_summary", - "structured_line_item", - "provider_neutral", - "text_fallback", - "inferred" - ] - }, - "value": { - "maxLength": 160, - "minLength": 1, - "type": "string" - } - }, - "required": [ - "value", - "confidence", - "source" - ], - "type": "object" - }, - "receipt_reference": { - "additionalProperties": false, - "properties": { - "confidence": { - "additionalProperties": false, - "properties": { - "level": { - "enum": [ - "high", - "medium", - "low" - ] - }, - "score": { - "maximum": 1, - "minimum": 0, - "type": "number" - } - }, - "required": [ - "score", - "level" - ], - "type": "object" - }, - "source": { - "enum": [ - "structured_summary", - "structured_line_item", - "provider_neutral", - "text_fallback", - "inferred" - ] - }, - "value": { - "maxLength": 160, - "minLength": 1, - "type": "string" - } - }, - "required": [ - "value", - "confidence", - "source" - ], - "type": "object" - }, - "totals": { - "additionalProperties": false, - "properties": { - "currency": { - "oneOf": [ - { - "type": "null" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "additionalProperties": false, - "properties": { - "level": { - "enum": [ - "high", - "medium", - "low" - ] - }, - "score": { - "maximum": 1, - "minimum": 0, - "type": "number" - } - }, - "required": [ - "score", - "level" - ], - "type": "object" - }, - "source": { - "enum": [ - "structured_summary", - "structured_line_item", - "provider_neutral", - "text_fallback", - "inferred" - ] - }, - "value": { - "maxLength": 3, - "minLength": 1, - "type": "string" - } - }, - "required": [ - "value", - "confidence", - "source" - ], - "type": "object" - } - ] - }, - "subtotal": { - "oneOf": [ - { - "type": "null" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "additionalProperties": false, - "properties": { - "level": { - "enum": [ - "high", - "medium", - "low" - ] - }, - "score": { - "maximum": 1, - "minimum": 0, - "type": "number" - } - }, - "required": [ - "score", - "level" - ], - "type": "object" - }, - "source": { - "enum": [ - "structured_summary", - "structured_line_item", - "provider_neutral", - "text_fallback", - "inferred" - ] - }, - "value": { - "maxLength": 32, - "minLength": 1, - "type": "string" - } - }, - "required": [ - "value", - "confidence", - "source" - ], - "type": "object" - } - ] - }, - "tax": { - "oneOf": [ - { - "type": "null" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "additionalProperties": false, - "properties": { - "level": { - "enum": [ - "high", - "medium", - "low" - ] - }, - "score": { - "maximum": 1, - "minimum": 0, - "type": "number" - } - }, - "required": [ - "score", - "level" - ], - "type": "object" - }, - "source": { - "enum": [ - "structured_summary", - "structured_line_item", - "provider_neutral", - "text_fallback", - "inferred" - ] - }, - "value": { - "maxLength": 32, - "minLength": 1, - "type": "string" - } - }, - "required": [ - "value", - "confidence", - "source" - ], - "type": "object" - } - ] - }, - "total": { - "oneOf": [ - { - "type": "null" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "additionalProperties": false, - "properties": { - "level": { - "enum": [ - "high", - "medium", - "low" - ] - }, - "score": { - "maximum": 1, - "minimum": 0, - "type": "number" - } - }, - "required": [ - "score", - "level" - ], - "type": "object" - }, - "source": { - "enum": [ - "structured_summary", - "structured_line_item", - "provider_neutral", - "text_fallback", - "inferred" - ] - }, - "value": { - "maxLength": 32, - "minLength": 1, - "type": "string" - } - }, - "required": [ - "value", - "confidence", - "source" - ], - "type": "object" - } - ] - } - }, - "required": [ - "subtotal", - "tax", - "total", - "currency" - ], - "type": "object" - }, - "vendor": { - "oneOf": [ - { - "type": "null" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "additionalProperties": false, - "properties": { - "level": { - "enum": [ - "high", - "medium", - "low" - ] - }, - "score": { - "maximum": 1, - "minimum": 0, - "type": "number" - } - }, - "required": [ - "score", - "level" - ], - "type": "object" - }, - "source": { - "enum": [ - "structured_summary", - "structured_line_item", - "provider_neutral", - "text_fallback", - "inferred" - ] - }, - "value": { - "maxLength": 160, - "minLength": 1, - "type": "string" - } - }, - "required": [ - "value", - "confidence", - "source" - ], - "type": "object" - } - ] - } - }, - "required": [ - "vendor", - "purchase_date", - "totals", - "line_items" - ], - "type": "object" - }, - "result": { - "additionalProperties": false, - "description": "Sole authoritative structured analysis object. Its recursively key-sorted, compact UTF-8 JSON bytes are SHA-256 hashed under ardaro.recursive-key-sort-compact-json-utf8-sha256.v1 and published as analysis_result_identity.", - "properties": { - "extracted_facts": { - "additionalProperties": false, - "properties": { - "line_items": { - "items": { - "additionalProperties": false, - "properties": { - "amount": { - "oneOf": [ - { - "type": "null" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "additionalProperties": false, - "properties": { - "level": { - "enum": [ - "high", - "medium", - "low" - ] - }, - "score": { - "maximum": 1, - "minimum": 0, - "type": "number" - } - }, - "required": [ - "score", - "level" - ], - "type": "object" - }, - "source": { - "enum": [ - "structured_summary", - "structured_line_item", - "provider_neutral", - "text_fallback", - "inferred" - ] - }, - "value": { - "maxLength": 80, - "minLength": 1, - "type": "string" - } - }, - "required": [ - "value", - "confidence", - "source" - ], - "type": "object" - } - ] - }, - "description": { - "oneOf": [ - { - "type": "null" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "additionalProperties": false, - "properties": { - "level": { - "enum": [ - "high", - "medium", - "low" - ] - }, - "score": { - "maximum": 1, - "minimum": 0, - "type": "number" - } - }, - "required": [ - "score", - "level" - ], - "type": "object" - }, - "source": { - "enum": [ - "structured_summary", - "structured_line_item", - "provider_neutral", - "text_fallback", - "inferred" - ] - }, - "value": { - "maxLength": 240, - "minLength": 1, - "type": "string" - } - }, - "required": [ - "value", - "confidence", - "source" - ], - "type": "object" - } - ] - }, - "product_code": { - "oneOf": [ - { - "type": "null" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "additionalProperties": false, - "properties": { - "level": { - "enum": [ - "high", - "medium", - "low" - ] - }, - "score": { - "maximum": 1, - "minimum": 0, - "type": "number" - } - }, - "required": [ - "score", - "level" - ], - "type": "object" - }, - "source": { - "enum": [ - "structured_summary", - "structured_line_item", - "provider_neutral", - "text_fallback", - "inferred" - ] - }, - "value": { - "maxLength": 80, - "minLength": 1, - "type": "string" - } - }, - "required": [ - "value", - "confidence", - "source" - ], - "type": "object" - } - ] - }, - "quantity": { - "oneOf": [ - { - "type": "null" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "additionalProperties": false, - "properties": { - "level": { - "enum": [ - "high", - "medium", - "low" - ] - }, - "score": { - "maximum": 1, - "minimum": 0, - "type": "number" - } - }, - "required": [ - "score", - "level" - ], - "type": "object" - }, - "source": { - "enum": [ - "structured_summary", - "structured_line_item", - "provider_neutral", - "text_fallback", - "inferred" - ] - }, - "value": { - "maxLength": 80, - "minLength": 1, - "type": "string" - } - }, - "required": [ - "value", - "confidence", - "source" - ], - "type": "object" - } - ] - }, - "unit_price": { - "oneOf": [ - { - "type": "null" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "additionalProperties": false, - "properties": { - "level": { - "enum": [ - "high", - "medium", - "low" - ] - }, - "score": { - "maximum": 1, - "minimum": 0, - "type": "number" - } - }, - "required": [ - "score", - "level" - ], - "type": "object" - }, - "source": { - "enum": [ - "structured_summary", - "structured_line_item", - "provider_neutral", - "text_fallback", - "inferred" - ] - }, - "value": { - "maxLength": 80, - "minLength": 1, - "type": "string" - } - }, - "required": [ - "value", - "confidence", - "source" - ], - "type": "object" - } - ] - } - }, - "required": [ - "description", - "product_code", - "quantity", - "unit_price", - "amount" - ], - "type": "object" - }, - "maxItems": 100, - "type": "array" - }, - "purchase_date": { - "additionalProperties": false, - "properties": { - "confidence": { - "additionalProperties": false, - "properties": { - "level": { - "enum": [ - "high", - "medium", - "low" - ] - }, - "score": { - "maximum": 1, - "minimum": 0, - "type": "number" - } - }, - "required": [ - "score", - "level" - ], - "type": "object" - }, - "source": { - "enum": [ - "structured_summary", - "structured_line_item", - "provider_neutral", - "text_fallback", - "inferred" - ] - }, - "value": { - "maxLength": 10, - "minLength": 1, - "type": "string" - } - }, - "required": [ - "value", - "confidence", - "source" - ], - "type": "object" - }, - "purchase_order": { - "additionalProperties": false, - "properties": { - "confidence": { - "additionalProperties": false, - "properties": { - "level": { - "enum": [ - "high", - "medium", - "low" - ] - }, - "score": { - "maximum": 1, - "minimum": 0, - "type": "number" - } - }, - "required": [ - "score", - "level" - ], - "type": "object" - }, - "source": { - "enum": [ - "structured_summary", - "structured_line_item", - "provider_neutral", - "text_fallback", - "inferred" - ] - }, - "value": { - "maxLength": 160, - "minLength": 1, - "type": "string" - } - }, - "required": [ - "value", - "confidence", - "source" - ], - "type": "object" - }, - "receipt_reference": { - "additionalProperties": false, - "properties": { - "confidence": { - "additionalProperties": false, - "properties": { - "level": { - "enum": [ - "high", - "medium", - "low" - ] - }, - "score": { - "maximum": 1, - "minimum": 0, - "type": "number" - } - }, - "required": [ - "score", - "level" - ], - "type": "object" - }, - "source": { - "enum": [ - "structured_summary", - "structured_line_item", - "provider_neutral", - "text_fallback", - "inferred" - ] - }, - "value": { - "maxLength": 160, - "minLength": 1, - "type": "string" - } - }, - "required": [ - "value", - "confidence", - "source" - ], - "type": "object" - }, - "totals.currency": { - "additionalProperties": false, - "properties": { - "confidence": { - "additionalProperties": false, - "properties": { - "level": { - "enum": [ - "high", - "medium", - "low" - ] - }, - "score": { - "maximum": 1, - "minimum": 0, - "type": "number" - } - }, - "required": [ - "score", - "level" - ], - "type": "object" - }, - "source": { - "enum": [ - "structured_summary", - "structured_line_item", - "provider_neutral", - "text_fallback", - "inferred" - ] - }, - "value": { - "maxLength": 3, - "minLength": 1, - "type": "string" - } - }, - "required": [ - "value", - "confidence", - "source" - ], - "type": "object" - }, - "totals.subtotal": { - "additionalProperties": false, - "properties": { - "confidence": { - "additionalProperties": false, - "properties": { - "level": { - "enum": [ - "high", - "medium", - "low" - ] - }, - "score": { - "maximum": 1, - "minimum": 0, - "type": "number" - } - }, - "required": [ - "score", - "level" - ], - "type": "object" - }, - "source": { - "enum": [ - "structured_summary", - "structured_line_item", - "provider_neutral", - "text_fallback", - "inferred" - ] - }, - "value": { - "maxLength": 32, - "minLength": 1, - "type": "string" - } - }, - "required": [ - "value", - "confidence", - "source" - ], - "type": "object" - }, - "totals.tax": { - "additionalProperties": false, - "properties": { - "confidence": { - "additionalProperties": false, - "properties": { - "level": { - "enum": [ - "high", - "medium", - "low" - ] - }, - "score": { - "maximum": 1, - "minimum": 0, - "type": "number" - } - }, - "required": [ - "score", - "level" - ], - "type": "object" - }, - "source": { - "enum": [ - "structured_summary", - "structured_line_item", - "provider_neutral", - "text_fallback", - "inferred" - ] - }, - "value": { - "maxLength": 32, - "minLength": 1, - "type": "string" - } - }, - "required": [ - "value", - "confidence", - "source" - ], - "type": "object" - }, - "totals.total": { - "additionalProperties": false, - "properties": { - "confidence": { - "additionalProperties": false, - "properties": { - "level": { - "enum": [ - "high", - "medium", - "low" - ] - }, - "score": { - "maximum": 1, - "minimum": 0, - "type": "number" - } - }, - "required": [ - "score", - "level" - ], - "type": "object" - }, - "source": { - "enum": [ - "structured_summary", - "structured_line_item", - "provider_neutral", - "text_fallback", - "inferred" - ] - }, - "value": { - "maxLength": 32, - "minLength": 1, - "type": "string" - } - }, - "required": [ - "value", - "confidence", - "source" - ], - "type": "object" - }, - "vendor": { - "additionalProperties": false, - "properties": { - "confidence": { - "additionalProperties": false, - "properties": { - "level": { - "enum": [ - "high", - "medium", - "low" - ] - }, - "score": { - "maximum": 1, - "minimum": 0, - "type": "number" - } - }, - "required": [ - "score", - "level" - ], - "type": "object" - }, - "source": { - "enum": [ - "structured_summary", - "structured_line_item", - "provider_neutral", - "text_fallback", - "inferred" - ] - }, - "value": { - "maxLength": 160, - "minLength": 1, - "type": "string" - } - }, - "required": [ - "value", - "confidence", - "source" - ], - "type": "object" - } - }, - "required": [ - "line_items" - ], - "type": "object" - }, - "inferred_suggestions": { - "items": { - "additionalProperties": false, - "properties": { - "field": { - "enum": [ - "vendor", - "purchase_date", - "purchase_order", - "receipt_reference", - "totals.subtotal", - "totals.tax", - "totals.total", - "totals.currency" - ] - }, - "value": { - "additionalProperties": false, - "properties": { - "confidence": { - "additionalProperties": false, - "properties": { - "level": { - "enum": [ - "high", - "medium", - "low" - ] - }, - "score": { - "maximum": 1, - "minimum": 0, - "type": "number" - } - }, - "required": [ - "score", - "level" - ], - "type": "object" - }, - "source": { - "enum": [ - "structured_summary", - "structured_line_item", - "provider_neutral", - "text_fallback", - "inferred" - ] - }, - "value": { - "maxLength": 240, - "minLength": 1, - "type": "string" - } - }, - "required": [ - "value", - "confidence", - "source" - ], - "type": "object" - } - }, - "required": [ - "field", - "value" - ], - "type": "object" - }, - "maxItems": 8, - "type": "array" - }, - "provenance": { - "type": "object" - }, - "unavailable_fields": { - "items": { - "enum": [ - "purchase order reference", - "purchase_date", - "receipt or invoice number", - "totals.currency", - "totals.subtotal", - "totals.tax", - "totals.total", - "vendor" - ] - }, - "type": "array", - "uniqueItems": true - }, - "validation": { - "type": "object" - } - }, - "required": [ - "extracted_facts", - "inferred_suggestions", - "unavailable_fields", - "validation", - "provenance" - ], - "type": "object" - }, - "service": { - "const": "ardaro.receipt_intelligence" - }, - "status": { - "const": "review_required" - }, - "version": { - "const": "1.0.0" - }, - "warning_groups": { - "type": "object" - }, - "warnings": { - "items": { - "type": "object" - }, - "maxItems": 64, - "type": "array" - } - }, - "required": [ - "contract_version", - "service", - "version", - "status", - "engine", - "receipt", - "confidence", - "duplicate_check", - "duplicate_fingerprint", - "arithmetic_verified", - "arithmetic_consistency", - "warnings", - "warning_groups", - "identities", - "result", - "metering", - "policy" - ], - "type": "object", - "x-ardaro-analysis-result-identity-profile": "ardaro.recursive-key-sort-compact-json-utf8-sha256.v1", - "x-ardaro-authoritative-analysis-path": "$.result", - "x-ardaro-receipt-compatibility-path": "$.receipt", - "x-ardaro-receipt-projection-profile": "ardaro.result-receipt-projection.v1" - }, - "input_description": { - "type": "string" - }, - "limits": { - "additionalProperties": false, - "properties": { - "max_existing_fingerprints": { - "minimum": 1, - "type": "integer" - }, - "max_line_items": { - "minimum": 1, - "type": "integer" - }, - "max_pages": { - "minimum": 1, - "type": "integer" - }, - "max_request_bytes": { - "minimum": 1, - "type": "integer" - }, - "max_text_characters": { - "minimum": 1, - "type": "integer" - }, - "normal_latency_target_ms": { - "minimum": 1, - "type": "integer" - }, - "request_timeout_ms": { - "minimum": 1, - "type": "integer" - } - }, - "required": [ - "max_existing_fingerprints", - "max_line_items", - "max_pages", - "max_request_bytes", - "max_text_characters", - "normal_latency_target_ms", - "request_timeout_ms" - ], - "type": "object" - }, - "paid_processing_performed": { - "const": false - }, - "request": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "additionalProperties": false, - "properties": { - "contract_version": { - "const": "ardaro.agent-receipt-intelligence.request.v1", - "description": "Required request contract identifier; send this exact version string." - }, - "existing_fingerprints": { - "description": "Receipt fingerprints already known to the caller for duplicate comparison. Supply lowercase 64-character SHA-256 hex strings, or an empty array when none are available; at most 10,000 entries.", - "items": { - "pattern": "^[0-9a-f]{64}$", - "type": "string" - }, - "maxItems": 10000, - "type": "array" - }, - "input": { - "description": "One receipt supplied as bounded OCR text or a provider-neutral structured extraction. Choose exactly one input kind.", - "oneOf": [ - { - "additionalProperties": false, - "properties": { - "kind": { - "const": "text", - "description": "Selects receipt text input; supply the text property." - }, - "text": { - "description": "OCR or receipt text for one document, up to 20,000 characters. Exclude payment-card data, credentials, customer-record payloads, and financial posting instructions.", - "maxLength": 20000, - "minLength": 1, - "type": "string" - } - }, - "required": [ - "kind", - "text" - ], - "type": "object" - }, - { - "additionalProperties": false, - "properties": { - "analysis": { - "additionalProperties": false, - "description": "Provider-neutral receipt extraction using only the listed fields. Omit fields that were not extracted.", - "minProperties": 1, - "properties": { - "currency": { - "description": "Three-letter currency code shown on the receipt, for example USD. Supply the extracted value directly or wrap it with optional extraction confidence.", - "oneOf": [ - { - "maxLength": 3, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", - "maximum": 100, - "minimum": 0, - "type": "number" - }, - "value": { - "description": "The extracted field value, supplied as text or a number before receipt normalization.", - "oneOf": [ - { - "maxLength": 3, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - } - ] - } - }, - "required": [ - "value" - ], - "type": "object" - } - ] - }, - "line_items": { - "description": "Extracted receipt line items, limited to 100 entries; omit unavailable item fields.", - "items": { - "additionalProperties": false, - "minProperties": 1, - "properties": { - "amount": { - "description": "Extended amount printed for this line item, in the receipt currency. Supply the extracted value directly or wrap it with optional extraction confidence.", - "oneOf": [ - { - "maxLength": 80, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", - "maximum": 100, - "minimum": 0, - "type": "number" - }, - "value": { - "description": "The extracted field value, supplied as text or a number before receipt normalization.", - "oneOf": [ - { - "maxLength": 80, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - } - ] - } - }, - "required": [ - "value" - ], - "type": "object" - } - ] - }, - "description": { - "description": "Item description printed on the receipt. Supply the extracted value directly or wrap it with optional extraction confidence.", - "oneOf": [ - { - "maxLength": 240, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", - "maximum": 100, - "minimum": 0, - "type": "number" - }, - "value": { - "description": "The extracted field value, supplied as text or a number before receipt normalization.", - "oneOf": [ - { - "maxLength": 240, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - } - ] - } - }, - "required": [ - "value" - ], - "type": "object" - } - ] - }, - "product_code": { - "description": "Product identifier or SKU printed for this line item. Supply the extracted value directly or wrap it with optional extraction confidence.", - "oneOf": [ - { - "maxLength": 80, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", - "maximum": 100, - "minimum": 0, - "type": "number" - }, - "value": { - "description": "The extracted field value, supplied as text or a number before receipt normalization.", - "oneOf": [ - { - "maxLength": 80, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - } - ] - } - }, - "required": [ - "value" - ], - "type": "object" - } - ] - }, - "quantity": { - "description": "Quantity purchased for this line item. Supply the extracted value directly or wrap it with optional extraction confidence.", - "oneOf": [ - { - "maxLength": 80, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", - "maximum": 100, - "minimum": 0, - "type": "number" - }, - "value": { - "description": "The extracted field value, supplied as text or a number before receipt normalization.", - "oneOf": [ - { - "maxLength": 80, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - } - ] - } - }, - "required": [ - "value" - ], - "type": "object" - } - ] - }, - "unit_price": { - "description": "Price per unit for this line item, in the receipt currency. Supply the extracted value directly or wrap it with optional extraction confidence.", - "oneOf": [ - { - "maxLength": 80, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", - "maximum": 100, - "minimum": 0, - "type": "number" - }, - "value": { - "description": "The extracted field value, supplied as text or a number before receipt normalization.", - "oneOf": [ - { - "maxLength": 80, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - } - ] - } - }, - "required": [ - "value" - ], - "type": "object" - } - ] - } - }, - "type": "object" - }, - "maxItems": 100, - "type": "array" - }, - "purchase_date": { - "description": "Purchase date as extracted; YYYY-MM-DD is recommended. Supply the extracted value directly or wrap it with optional extraction confidence.", - "oneOf": [ - { - "maxLength": 10, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", - "maximum": 100, - "minimum": 0, - "type": "number" - }, - "value": { - "description": "The extracted field value, supplied as text or a number before receipt normalization.", - "oneOf": [ - { - "maxLength": 10, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - } - ] - } - }, - "required": [ - "value" - ], - "type": "object" - } - ] - }, - "purchase_order": { - "description": "Purchase-order reference printed on the receipt; this does not select or link an Ardaro job. Supply the extracted value directly or wrap it with optional extraction confidence.", - "oneOf": [ - { - "maxLength": 160, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", - "maximum": 100, - "minimum": 0, - "type": "number" - }, - "value": { - "description": "The extracted field value, supplied as text or a number before receipt normalization.", - "oneOf": [ - { - "maxLength": 160, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - } - ] - } - }, - "required": [ - "value" - ], - "type": "object" - } - ] - }, - "receipt_reference": { - "description": "Receipt, invoice, or transaction reference printed on the document. Supply the extracted value directly or wrap it with optional extraction confidence.", - "oneOf": [ - { - "maxLength": 160, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", - "maximum": 100, - "minimum": 0, - "type": "number" - }, - "value": { - "description": "The extracted field value, supplied as text or a number before receipt normalization.", - "oneOf": [ - { - "maxLength": 160, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - } - ] - } - }, - "required": [ - "value" - ], - "type": "object" - } - ] - }, - "subtotal": { - "description": "Receipt subtotal before tax, in the receipt currency. Supply the extracted value directly or wrap it with optional extraction confidence.", - "oneOf": [ - { - "maxLength": 32, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", - "maximum": 100, - "minimum": 0, - "type": "number" - }, - "value": { - "description": "The extracted field value, supplied as text or a number before receipt normalization.", - "oneOf": [ - { - "maxLength": 32, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - } - ] - } - }, - "required": [ - "value" - ], - "type": "object" - } - ] - }, - "tax": { - "description": "Total tax amount printed on the receipt, in the receipt currency. Supply the extracted value directly or wrap it with optional extraction confidence.", - "oneOf": [ - { - "maxLength": 32, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", - "maximum": 100, - "minimum": 0, - "type": "number" - }, - "value": { - "description": "The extracted field value, supplied as text or a number before receipt normalization.", - "oneOf": [ - { - "maxLength": 32, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - } - ] - } - }, - "required": [ - "value" - ], - "type": "object" - } - ] - }, - "total": { - "description": "Final receipt total, in the receipt currency. Supply the extracted value directly or wrap it with optional extraction confidence.", - "oneOf": [ - { - "maxLength": 32, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", - "maximum": 100, - "minimum": 0, - "type": "number" - }, - "value": { - "description": "The extracted field value, supplied as text or a number before receipt normalization.", - "oneOf": [ - { - "maxLength": 32, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - } - ] - } - }, - "required": [ - "value" - ], - "type": "object" - } - ] - }, - "vendor": { - "description": "Merchant or supplier name printed on the receipt. Supply the extracted value directly or wrap it with optional extraction confidence.", - "oneOf": [ - { - "maxLength": 160, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", - "maximum": 100, - "minimum": 0, - "type": "number" - }, - "value": { - "description": "The extracted field value, supplied as text or a number before receipt normalization.", - "oneOf": [ - { - "maxLength": 160, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - } - ] - } - }, - "required": [ - "value" - ], - "type": "object" - } - ] - } - }, - "type": "object" - }, - "kind": { - "const": "structured", - "description": "Selects structured receipt input; supply the analysis property." - } - }, - "required": [ - "kind", - "analysis" - ], - "type": "object" - } - ] - } - }, - "required": [ - "contract_version", - "input", - "existing_fingerprints" - ], - "type": "object" - }, - "synthetic_only": { - "const": true - } - }, - "required": [ - "example_version", - "synthetic_only", - "paid_processing_performed", - "input_description", - "request", - "expected_response", - "limits" - ], - "type": "object" - }, - "service": { - "const": "receipt" - } - }, - "required": [ - "service", - "details" - ], - "type": "object" - } -]New value: +[ + { + "additionalProperties": false, + "properties": { + "details": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "properties": { + "example_version": { + "const": "ardaro.receipt-intelligence.example.v1" + }, + "expected_response": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "description": "Receipt Intelligence v1 response. result is authoritative; receipt is a derived compatibility projection that MUST match result.", + "properties": { + "arithmetic_consistency": { + "enum": [ + "verified", + "mismatch", + "unavailable" + ] + }, + "arithmetic_verified": { + "type": [ + "boolean", + "null" + ] + }, + "confidence": { + "type": "object" + }, + "contract_version": { + "const": "ardaro.agent-receipt-intelligence.response.v1" + }, + "duplicate_check": { + "type": "object" + }, + "duplicate_fingerprint": { + "pattern": "^[0-9a-f]{64}$", + "type": [ + "string", + "null" + ] + }, + "engine": { + "type": "object" + }, + "identities": { + "additionalProperties": false, + "properties": { + "analysis_result_identity": { + "pattern": "^res_[0-9a-f]{64}$", + "type": "string" + }, + "document_fingerprint": { + "pattern": "^[0-9a-f]{64}$", + "type": [ + "string", + "null" + ] + }, + "request_identity": { + "pattern": "^req_[0-9a-f]{64}$", + "type": "string" + } + }, + "required": [ + "request_identity", + "document_fingerprint", + "analysis_result_identity" + ], + "type": "object" + }, + "metering": { + "type": "object" + }, + "payment_identity": { + "additionalProperties": false, + "properties": { + "protocol": { + "const": "x402-v2" + }, + "reference": { + "pattern": "^pay_[0-9a-f]{64}$", + "type": "string" + }, + "replayed": { + "type": "boolean" + } + }, + "required": [ + "protocol", + "reference", + "replayed" + ], + "type": "object" + }, + "policy": { + "type": "object" + }, + "receipt": { + "additionalProperties": false, + "description": "Non-authoritative compatibility projection generated from result under ardaro.result-receipt-projection.v1. Consumers MUST use result for structured receipt values and reject a response when this projection diverges.", + "properties": { + "line_items": { + "items": { + "additionalProperties": false, + "properties": { + "amount": { + "oneOf": [ + { + "type": "null" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "additionalProperties": false, + "properties": { + "level": { + "enum": [ + "high", + "medium", + "low" + ] + }, + "score": { + "maximum": 1, + "minimum": 0, + "type": "number" + } + }, + "required": [ + "score", + "level" + ], + "type": "object" + }, + "source": { + "enum": [ + "structured_summary", + "structured_line_item", + "provider_neutral", + "text_fallback", + "inferred" + ] + }, + "value": { + "maxLength": 80, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "value", + "confidence", + "source" + ], + "type": "object" + } + ] + }, + "description": { + "oneOf": [ + { + "type": "null" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "additionalProperties": false, + "properties": { + "level": { + "enum": [ + "high", + "medium", + "low" + ] + }, + "score": { + "maximum": 1, + "minimum": 0, + "type": "number" + } + }, + "required": [ + "score", + "level" + ], + "type": "object" + }, + "source": { + "enum": [ + "structured_summary", + "structured_line_item", + "provider_neutral", + "text_fallback", + "inferred" + ] + }, + "value": { + "maxLength": 240, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "value", + "confidence", + "source" + ], + "type": "object" + } + ] + }, + "product_code": { + "oneOf": [ + { + "type": "null" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "additionalProperties": false, + "properties": { + "level": { + "enum": [ + "high", + "medium", + "low" + ] + }, + "score": { + "maximum": 1, + "minimum": 0, + "type": "number" + } + }, + "required": [ + "score", + "level" + ], + "type": "object" + }, + "source": { + "enum": [ + "structured_summary", + "structured_line_item", + "provider_neutral", + "text_fallback", + "inferred" + ] + }, + "value": { + "maxLength": 80, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "value", + "confidence", + "source" + ], + "type": "object" + } + ] + }, + "quantity": { + "oneOf": [ + { + "type": "null" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "additionalProperties": false, + "properties": { + "level": { + "enum": [ + "high", + "medium", + "low" + ] + }, + "score": { + "maximum": 1, + "minimum": 0, + "type": "number" + } + }, + "required": [ + "score", + "level" + ], + "type": "object" + }, + "source": { + "enum": [ + "structured_summary", + "structured_line_item", + "provider_neutral", + "text_fallback", + "inferred" + ] + }, + "value": { + "maxLength": 80, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "value", + "confidence", + "source" + ], + "type": "object" + } + ] + }, + "unit_price": { + "oneOf": [ + { + "type": "null" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "additionalProperties": false, + "properties": { + "level": { + "enum": [ + "high", + "medium", + "low" + ] + }, + "score": { + "maximum": 1, + "minimum": 0, + "type": "number" + } + }, + "required": [ + "score", + "level" + ], + "type": "object" + }, + "source": { + "enum": [ + "structured_summary", + "structured_line_item", + "provider_neutral", + "text_fallback", + "inferred" + ] + }, + "value": { + "maxLength": 80, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "value", + "confidence", + "source" + ], + "type": "object" + } + ] + } + }, + "required": [ + "description", + "product_code", + "quantity", + "unit_price", + "amount" + ], + "type": "object" + }, + "maxItems": 100, + "type": "array" + }, + "purchase_date": { + "oneOf": [ + { + "type": "null" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "additionalProperties": false, + "properties": { + "level": { + "enum": [ + "high", + "medium", + "low" + ] + }, + "score": { + "maximum": 1, + "minimum": 0, + "type": "number" + } + }, + "required": [ + "score", + "level" + ], + "type": "object" + }, + "source": { + "enum": [ + "structured_summary", + "structured_line_item", + "provider_neutral", + "text_fallback", + "inferred" + ] + }, + "value": { + "maxLength": 10, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "value", + "confidence", + "source" + ], + "type": "object" + } + ] + }, + "purchase_order": { + "additionalProperties": false, + "properties": { + "confidence": { + "additionalProperties": false, + "properties": { + "level": { + "enum": [ + "high", + "medium", + "low" + ] + }, + "score": { + "maximum": 1, + "minimum": 0, + "type": "number" + } + }, + "required": [ + "score", + "level" + ], + "type": "object" + }, + "source": { + "enum": [ + "structured_summary", + "structured_line_item", + "provider_neutral", + "text_fallback", + "inferred" + ] + }, + "value": { + "maxLength": 160, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "value", + "confidence", + "source" + ], + "type": "object" + }, + "receipt_reference": { + "additionalProperties": false, + "properties": { + "confidence": { + "additionalProperties": false, + "properties": { + "level": { + "enum": [ + "high", + "medium", + "low" + ] + }, + "score": { + "maximum": 1, + "minimum": 0, + "type": "number" + } + }, + "required": [ + "score", + "level" + ], + "type": "object" + }, + "source": { + "enum": [ + "structured_summary", + "structured_line_item", + "provider_neutral", + "text_fallback", + "inferred" + ] + }, + "value": { + "maxLength": 160, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "value", + "confidence", + "source" + ], + "type": "object" + }, + "totals": { + "additionalProperties": false, + "properties": { + "currency": { + "oneOf": [ + { + "type": "null" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "additionalProperties": false, + "properties": { + "level": { + "enum": [ + "high", + "medium", + "low" + ] + }, + "score": { + "maximum": 1, + "minimum": 0, + "type": "number" + } + }, + "required": [ + "score", + "level" + ], + "type": "object" + }, + "source": { + "enum": [ + "structured_summary", + "structured_line_item", + "provider_neutral", + "text_fallback", + "inferred" + ] + }, + "value": { + "maxLength": 3, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "value", + "confidence", + "source" + ], + "type": "object" + } + ] + }, + "subtotal": { + "oneOf": [ + { + "type": "null" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "additionalProperties": false, + "properties": { + "level": { + "enum": [ + "high", + "medium", + "low" + ] + }, + "score": { + "maximum": 1, + "minimum": 0, + "type": "number" + } + }, + "required": [ + "score", + "level" + ], + "type": "object" + }, + "source": { + "enum": [ + "structured_summary", + "structured_line_item", + "provider_neutral", + "text_fallback", + "inferred" + ] + }, + "value": { + "maxLength": 32, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "value", + "confidence", + "source" + ], + "type": "object" + } + ] + }, + "tax": { + "oneOf": [ + { + "type": "null" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "additionalProperties": false, + "properties": { + "level": { + "enum": [ + "high", + "medium", + "low" + ] + }, + "score": { + "maximum": 1, + "minimum": 0, + "type": "number" + } + }, + "required": [ + "score", + "level" + ], + "type": "object" + }, + "source": { + "enum": [ + "structured_summary", + "structured_line_item", + "provider_neutral", + "text_fallback", + "inferred" + ] + }, + "value": { + "maxLength": 32, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "value", + "confidence", + "source" + ], + "type": "object" + } + ] + }, + "total": { + "oneOf": [ + { + "type": "null" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "additionalProperties": false, + "properties": { + "level": { + "enum": [ + "high", + "medium", + "low" + ] + }, + "score": { + "maximum": 1, + "minimum": 0, + "type": "number" + } + }, + "required": [ + "score", + "level" + ], + "type": "object" + }, + "source": { + "enum": [ + "structured_summary", + "structured_line_item", + "provider_neutral", + "text_fallback", + "inferred" + ] + }, + "value": { + "maxLength": 32, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "value", + "confidence", + "source" + ], + "type": "object" + } + ] + } + }, + "required": [ + "subtotal", + "tax", + "total", + "currency" + ], + "type": "object" + }, + "vendor": { + "oneOf": [ + { + "type": "null" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "additionalProperties": false, + "properties": { + "level": { + "enum": [ + "high", + "medium", + "low" + ] + }, + "score": { + "maximum": 1, + "minimum": 0, + "type": "number" + } + }, + "required": [ + "score", + "level" + ], + "type": "object" + }, + "source": { + "enum": [ + "structured_summary", + "structured_line_item", + "provider_neutral", + "text_fallback", + "inferred" + ] + }, + "value": { + "maxLength": 160, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "value", + "confidence", + "source" + ], + "type": "object" + } + ] + } + }, + "required": [ + "vendor", + "purchase_date", + "totals", + "line_items" + ], + "type": "object" + }, + "result": { + "additionalProperties": false, + "description": "Sole authoritative structured analysis object. Its recursively key-sorted, compact UTF-8 JSON bytes are SHA-256 hashed under ardaro.recursive-key-sort-compact-json-utf8-sha256.v1 and published as analysis_result_identity.", + "properties": { + "extracted_facts": { + "additionalProperties": false, + "properties": { + "line_items": { + "items": { + "additionalProperties": false, + "properties": { + "amount": { + "oneOf": [ + { + "type": "null" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "additionalProperties": false, + "properties": { + "level": { + "enum": [ + "high", + "medium", + "low" + ] + }, + "score": { + "maximum": 1, + "minimum": 0, + "type": "number" + } + }, + "required": [ + "score", + "level" + ], + "type": "object" + }, + "source": { + "enum": [ + "structured_summary", + "structured_line_item", + "provider_neutral", + "text_fallback", + "inferred" + ] + }, + "value": { + "maxLength": 80, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "value", + "confidence", + "source" + ], + "type": "object" + } + ] + }, + "description": { + "oneOf": [ + { + "type": "null" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "additionalProperties": false, + "properties": { + "level": { + "enum": [ + "high", + "medium", + "low" + ] + }, + "score": { + "maximum": 1, + "minimum": 0, + "type": "number" + } + }, + "required": [ + "score", + "level" + ], + "type": "object" + }, + "source": { + "enum": [ + "structured_summary", + "structured_line_item", + "provider_neutral", + "text_fallback", + "inferred" + ] + }, + "value": { + "maxLength": 240, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "value", + "confidence", + "source" + ], + "type": "object" + } + ] + }, + "product_code": { + "oneOf": [ + { + "type": "null" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "additionalProperties": false, + "properties": { + "level": { + "enum": [ + "high", + "medium", + "low" + ] + }, + "score": { + "maximum": 1, + "minimum": 0, + "type": "number" + } + }, + "required": [ + "score", + "level" + ], + "type": "object" + }, + "source": { + "enum": [ + "structured_summary", + "structured_line_item", + "provider_neutral", + "text_fallback", + "inferred" + ] + }, + "value": { + "maxLength": 80, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "value", + "confidence", + "source" + ], + "type": "object" + } + ] + }, + "quantity": { + "oneOf": [ + { + "type": "null" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "additionalProperties": false, + "properties": { + "level": { + "enum": [ + "high", + "medium", + "low" + ] + }, + "score": { + "maximum": 1, + "minimum": 0, + "type": "number" + } + }, + "required": [ + "score", + "level" + ], + "type": "object" + }, + "source": { + "enum": [ + "structured_summary", + "structured_line_item", + "provider_neutral", + "text_fallback", + "inferred" + ] + }, + "value": { + "maxLength": 80, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "value", + "confidence", + "source" + ], + "type": "object" + } + ] + }, + "unit_price": { + "oneOf": [ + { + "type": "null" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "additionalProperties": false, + "properties": { + "level": { + "enum": [ + "high", + "medium", + "low" + ] + }, + "score": { + "maximum": 1, + "minimum": 0, + "type": "number" + } + }, + "required": [ + "score", + "level" + ], + "type": "object" + }, + "source": { + "enum": [ + "structured_summary", + "structured_line_item", + "provider_neutral", + "text_fallback", + "inferred" + ] + }, + "value": { + "maxLength": 80, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "value", + "confidence", + "source" + ], + "type": "object" + } + ] + } + }, + "required": [ + "description", + "product_code", + "quantity", + "unit_price", + "amount" + ], + "type": "object" + }, + "maxItems": 100, + "type": "array" + }, + "purchase_date": { + "additionalProperties": false, + "properties": { + "confidence": { + "additionalProperties": false, + "properties": { + "level": { + "enum": [ + "high", + "medium", + "low" + ] + }, + "score": { + "maximum": 1, + "minimum": 0, + "type": "number" + } + }, + "required": [ + "score", + "level" + ], + "type": "object" + }, + "source": { + "enum": [ + "structured_summary", + "structured_line_item", + "provider_neutral", + "text_fallback", + "inferred" + ] + }, + "value": { + "maxLength": 10, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "value", + "confidence", + "source" + ], + "type": "object" + }, + "purchase_order": { + "additionalProperties": false, + "properties": { + "confidence": { + "additionalProperties": false, + "properties": { + "level": { + "enum": [ + "high", + "medium", + "low" + ] + }, + "score": { + "maximum": 1, + "minimum": 0, + "type": "number" + } + }, + "required": [ + "score", + "level" + ], + "type": "object" + }, + "source": { + "enum": [ + "structured_summary", + "structured_line_item", + "provider_neutral", + "text_fallback", + "inferred" + ] + }, + "value": { + "maxLength": 160, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "value", + "confidence", + "source" + ], + "type": "object" + }, + "receipt_reference": { + "additionalProperties": false, + "properties": { + "confidence": { + "additionalProperties": false, + "properties": { + "level": { + "enum": [ + "high", + "medium", + "low" + ] + }, + "score": { + "maximum": 1, + "minimum": 0, + "type": "number" + } + }, + "required": [ + "score", + "level" + ], + "type": "object" + }, + "source": { + "enum": [ + "structured_summary", + "structured_line_item", + "provider_neutral", + "text_fallback", + "inferred" + ] + }, + "value": { + "maxLength": 160, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "value", + "confidence", + "source" + ], + "type": "object" + }, + "totals.currency": { + "additionalProperties": false, + "properties": { + "confidence": { + "additionalProperties": false, + "properties": { + "level": { + "enum": [ + "high", + "medium", + "low" + ] + }, + "score": { + "maximum": 1, + "minimum": 0, + "type": "number" + } + }, + "required": [ + "score", + "level" + ], + "type": "object" + }, + "source": { + "enum": [ + "structured_summary", + "structured_line_item", + "provider_neutral", + "text_fallback", + "inferred" + ] + }, + "value": { + "maxLength": 3, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "value", + "confidence", + "source" + ], + "type": "object" + }, + "totals.subtotal": { + "additionalProperties": false, + "properties": { + "confidence": { + "additionalProperties": false, + "properties": { + "level": { + "enum": [ + "high", + "medium", + "low" + ] + }, + "score": { + "maximum": 1, + "minimum": 0, + "type": "number" + } + }, + "required": [ + "score", + "level" + ], + "type": "object" + }, + "source": { + "enum": [ + "structured_summary", + "structured_line_item", + "provider_neutral", + "text_fallback", + "inferred" + ] + }, + "value": { + "maxLength": 32, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "value", + "confidence", + "source" + ], + "type": "object" + }, + "totals.tax": { + "additionalProperties": false, + "properties": { + "confidence": { + "additionalProperties": false, + "properties": { + "level": { + "enum": [ + "high", + "medium", + "low" + ] + }, + "score": { + "maximum": 1, + "minimum": 0, + "type": "number" + } + }, + "required": [ + "score", + "level" + ], + "type": "object" + }, + "source": { + "enum": [ + "structured_summary", + "structured_line_item", + "provider_neutral", + "text_fallback", + "inferred" + ] + }, + "value": { + "maxLength": 32, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "value", + "confidence", + "source" + ], + "type": "object" + }, + "totals.total": { + "additionalProperties": false, + "properties": { + "confidence": { + "additionalProperties": false, + "properties": { + "level": { + "enum": [ + "high", + "medium", + "low" + ] + }, + "score": { + "maximum": 1, + "minimum": 0, + "type": "number" + } + }, + "required": [ + "score", + "level" + ], + "type": "object" + }, + "source": { + "enum": [ + "structured_summary", + "structured_line_item", + "provider_neutral", + "text_fallback", + "inferred" + ] + }, + "value": { + "maxLength": 32, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "value", + "confidence", + "source" + ], + "type": "object" + }, + "vendor": { + "additionalProperties": false, + "properties": { + "confidence": { + "additionalProperties": false, + "properties": { + "level": { + "enum": [ + "high", + "medium", + "low" + ] + }, + "score": { + "maximum": 1, + "minimum": 0, + "type": "number" + } + }, + "required": [ + "score", + "level" + ], + "type": "object" + }, + "source": { + "enum": [ + "structured_summary", + "structured_line_item", + "provider_neutral", + "text_fallback", + "inferred" + ] + }, + "value": { + "maxLength": 160, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "value", + "confidence", + "source" + ], + "type": "object" + } + }, + "required": [ + "line_items" + ], + "type": "object" + }, + "inferred_suggestions": { + "items": { + "additionalProperties": false, + "properties": { + "field": { + "enum": [ + "vendor", + "purchase_date", + "purchase_order", + "receipt_reference", + "totals.subtotal", + "totals.tax", + "totals.total", + "totals.currency" + ] + }, + "value": { + "additionalProperties": false, + "properties": { + "confidence": { + "additionalProperties": false, + "properties": { + "level": { + "enum": [ + "high", + "medium", + "low" + ] + }, + "score": { + "maximum": 1, + "minimum": 0, + "type": "number" + } + }, + "required": [ + "score", + "level" + ], + "type": "object" + }, + "source": { + "enum": [ + "structured_summary", + "structured_line_item", + "provider_neutral", + "text_fallback", + "inferred" + ] + }, + "value": { + "maxLength": 240, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "value", + "confidence", + "source" + ], + "type": "object" + } + }, + "required": [ + "field", + "value" + ], + "type": "object" + }, + "maxItems": 8, + "type": "array" + }, + "provenance": { + "type": "object" + }, + "unavailable_fields": { + "items": { + "enum": [ + "purchase order reference", + "purchase_date", + "receipt or invoice number", + "totals.currency", + "totals.subtotal", + "totals.tax", + "totals.total", + "vendor" + ] + }, + "type": "array", + "uniqueItems": true + }, + "validation": { + "type": "object" + } + }, + "required": [ + "extracted_facts", + "inferred_suggestions", + "unavailable_fields", + "validation", + "provenance" + ], + "type": "object" + }, + "service": { + "const": "ardaro.receipt_intelligence" + }, + "status": { + "const": "review_required" + }, + "version": { + "const": "1.0.0" + }, + "warning_groups": { + "type": "object" + }, + "warnings": { + "items": { + "type": "object" + }, + "maxItems": 64, + "type": "array" + } + }, + "required": [ + "contract_version", + "service", + "version", + "status", + "engine", + "receipt", + "confidence", + "duplicate_check", + "duplicate_fingerprint", + "arithmetic_verified", + "arithmetic_consistency", + "warnings", + "warning_groups", + "identities", + "result", + "metering", + "policy" + ], + "type": "object", + "x-ardaro-analysis-result-identity-profile": "ardaro.recursive-key-sort-compact-json-utf8-sha256.v1", + "x-ardaro-authoritative-analysis-path": "$.result", + "x-ardaro-receipt-compatibility-path": "$.receipt", + "x-ardaro-receipt-projection-profile": "ardaro.result-receipt-projection.v1" + }, + "input_description": { + "type": "string" + }, + "limits": { + "additionalProperties": false, + "properties": { + "max_existing_fingerprints": { + "minimum": 1, + "type": "integer" + }, + "max_line_items": { + "minimum": 1, + "type": "integer" + }, + "max_pages": { + "minimum": 1, + "type": "integer" + }, + "max_request_bytes": { + "minimum": 1, + "type": "integer" + }, + "max_text_characters": { + "minimum": 1, + "type": "integer" + }, + "normal_latency_target_ms": { + "minimum": 1, + "type": "integer" + }, + "request_timeout_ms": { + "minimum": 1, + "type": "integer" + } + }, + "required": [ + "max_existing_fingerprints", + "max_line_items", + "max_pages", + "max_request_bytes", + "max_text_characters", + "normal_latency_target_ms", + "request_timeout_ms" + ], + "type": "object" + }, + "paid_processing_performed": { + "const": false + }, + "request": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "properties": { + "contract_version": { + "const": "ardaro.agent-receipt-intelligence.request.v1", + "description": "Required request contract identifier; send this exact version string." + }, + "existing_fingerprints": { + "description": "Receipt fingerprints already known to the caller for duplicate comparison. Supply lowercase 64-character SHA-256 hex strings, or an empty array when none are available; at most 10,000 entries.", + "items": { + "pattern": "^[0-9a-f]{64}$", + "type": "string" + }, + "maxItems": 10000, + "type": "array" + }, + "input": { + "description": "One receipt supplied as bounded OCR text or a provider-neutral structured extraction. Choose exactly one input kind.", + "oneOf": [ + { + "additionalProperties": false, + "properties": { + "kind": { + "const": "text", + "description": "Selects receipt text input; supply the text property." + }, + "text": { + "description": "OCR or receipt text for one document, up to 20,000 characters. Exclude payment-card data, credentials, customer-record payloads, and financial posting instructions.", + "maxLength": 20000, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "kind", + "text" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "analysis": { + "additionalProperties": false, + "description": "Provider-neutral receipt extraction using only the listed fields. Omit fields that were not extracted.", + "minProperties": 1, + "properties": { + "currency": { + "description": "Three-letter currency code shown on the receipt, for example USD. Supply the extracted value directly or wrap it with optional extraction confidence.", + "oneOf": [ + { + "maxLength": 3, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", + "maximum": 100, + "minimum": 0, + "type": "number" + }, + "value": { + "description": "The extracted field value, supplied as text or a number before receipt normalization.", + "oneOf": [ + { + "maxLength": 3, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "value" + ], + "type": "object" + } + ] + }, + "line_items": { + "description": "Extracted receipt line items, limited to 100 entries; omit unavailable item fields.", + "items": { + "additionalProperties": false, + "minProperties": 1, + "properties": { + "amount": { + "description": "Extended amount printed for this line item, in the receipt currency. Supply the extracted value directly or wrap it with optional extraction confidence.", + "oneOf": [ + { + "maxLength": 80, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", + "maximum": 100, + "minimum": 0, + "type": "number" + }, + "value": { + "description": "The extracted field value, supplied as text or a number before receipt normalization.", + "oneOf": [ + { + "maxLength": 80, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "value" + ], + "type": "object" + } + ] + }, + "description": { + "description": "Item description printed on the receipt. Supply the extracted value directly or wrap it with optional extraction confidence.", + "oneOf": [ + { + "maxLength": 240, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", + "maximum": 100, + "minimum": 0, + "type": "number" + }, + "value": { + "description": "The extracted field value, supplied as text or a number before receipt normalization.", + "oneOf": [ + { + "maxLength": 240, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "value" + ], + "type": "object" + } + ] + }, + "product_code": { + "description": "Product identifier or SKU printed for this line item. Supply the extracted value directly or wrap it with optional extraction confidence.", + "oneOf": [ + { + "maxLength": 80, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", + "maximum": 100, + "minimum": 0, + "type": "number" + }, + "value": { + "description": "The extracted field value, supplied as text or a number before receipt normalization.", + "oneOf": [ + { + "maxLength": 80, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "value" + ], + "type": "object" + } + ] + }, + "quantity": { + "description": "Quantity purchased for this line item. Supply the extracted value directly or wrap it with optional extraction confidence.", + "oneOf": [ + { + "maxLength": 80, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", + "maximum": 100, + "minimum": 0, + "type": "number" + }, + "value": { + "description": "The extracted field value, supplied as text or a number before receipt normalization.", + "oneOf": [ + { + "maxLength": 80, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "value" + ], + "type": "object" + } + ] + }, + "unit_price": { + "description": "Price per unit for this line item, in the receipt currency. Supply the extracted value directly or wrap it with optional extraction confidence.", + "oneOf": [ + { + "maxLength": 80, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", + "maximum": 100, + "minimum": 0, + "type": "number" + }, + "value": { + "description": "The extracted field value, supplied as text or a number before receipt normalization.", + "oneOf": [ + { + "maxLength": 80, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "value" + ], + "type": "object" + } + ] + } + }, + "type": "object" + }, + "maxItems": 100, + "type": "array" + }, + "purchase_date": { + "description": "Purchase date as extracted; YYYY-MM-DD is recommended. Supply the extracted value directly or wrap it with optional extraction confidence.", + "oneOf": [ + { + "maxLength": 10, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", + "maximum": 100, + "minimum": 0, + "type": "number" + }, + "value": { + "description": "The extracted field value, supplied as text or a number before receipt normalization.", + "oneOf": [ + { + "maxLength": 10, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "value" + ], + "type": "object" + } + ] + }, + "purchase_order": { + "description": "Purchase-order reference printed on the receipt; this does not select or link an Ardaro job. Supply the extracted value directly or wrap it with optional extraction confidence.", + "oneOf": [ + { + "maxLength": 160, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", + "maximum": 100, + "minimum": 0, + "type": "number" + }, + "value": { + "description": "The extracted field value, supplied as text or a number before receipt normalization.", + "oneOf": [ + { + "maxLength": 160, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "value" + ], + "type": "object" + } + ] + }, + "receipt_reference": { + "description": "Receipt, invoice, or transaction reference printed on the document. Supply the extracted value directly or wrap it with optional extraction confidence.", + "oneOf": [ + { + "maxLength": 160, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", + "maximum": 100, + "minimum": 0, + "type": "number" + }, + "value": { + "description": "The extracted field value, supplied as text or a number before receipt normalization.", + "oneOf": [ + { + "maxLength": 160, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "value" + ], + "type": "object" + } + ] + }, + "subtotal": { + "description": "Receipt subtotal before tax, in the receipt currency. Supply the extracted value directly or wrap it with optional extraction confidence.", + "oneOf": [ + { + "maxLength": 32, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", + "maximum": 100, + "minimum": 0, + "type": "number" + }, + "value": { + "description": "The extracted field value, supplied as text or a number before receipt normalization.", + "oneOf": [ + { + "maxLength": 32, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "value" + ], + "type": "object" + } + ] + }, + "tax": { + "description": "Total tax amount printed on the receipt, in the receipt currency. Supply the extracted value directly or wrap it with optional extraction confidence.", + "oneOf": [ + { + "maxLength": 32, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", + "maximum": 100, + "minimum": 0, + "type": "number" + }, + "value": { + "description": "The extracted field value, supplied as text or a number before receipt normalization.", + "oneOf": [ + { + "maxLength": 32, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "value" + ], + "type": "object" + } + ] + }, + "total": { + "description": "Final receipt total, in the receipt currency. Supply the extracted value directly or wrap it with optional extraction confidence.", + "oneOf": [ + { + "maxLength": 32, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", + "maximum": 100, + "minimum": 0, + "type": "number" + }, + "value": { + "description": "The extracted field value, supplied as text or a number before receipt normalization.", + "oneOf": [ + { + "maxLength": 32, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "value" + ], + "type": "object" + } + ] + }, + "vendor": { + "description": "Merchant or supplier name printed on the receipt. Supply the extracted value directly or wrap it with optional extraction confidence.", + "oneOf": [ + { + "maxLength": 160, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", + "maximum": 100, + "minimum": 0, + "type": "number" + }, + "value": { + "description": "The extracted field value, supplied as text or a number before receipt normalization.", + "oneOf": [ + { + "maxLength": 160, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "value" + ], + "type": "object" + } + ] + } + }, + "type": "object" + }, + "kind": { + "const": "structured", + "description": "Selects structured receipt input; supply the analysis property." + } + }, + "required": [ + "kind", + "analysis" + ], + "type": "object" + } + ] + } + }, + "required": [ + "contract_version", + "input", + "existing_fingerprints" + ], + "type": "object" + }, + "synthetic_only": { + "const": true + } + }, + "required": [ + "example_version", + "synthetic_only", + "paid_processing_performed", + "input_description", + "request", + "expected_response", + "limits" + ], + "type": "object" + }, + "service": { + "const": "receipt" + } + }, + "required": [ + "service", + "details" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "details": { + "additionalProperties": false, + "properties": { + "example_version": { + "const": "ardaro.invoice-matching.example.v1" + }, + "policy": { + "additionalProperties": false, + "properties": { + "financial_posting_supported": { + "const": false + }, + "human_review_required": { + "const": true + }, + "payment_required": { + "const": false + } + }, + "required": [ + "human_review_required", + "financial_posting_supported", + "payment_required" + ], + "type": "object" + }, + "request": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "description": "One invoice and one purchase order with caller-supplied opaque supplier identifiers. Runtime validation additionally rejects duplicate line IDs, padded/control-bearing strings, sensitive card or credential data, and requests over 262144 UTF-8 JSON bytes. All numeric inputs are decimal strings; missing optional arithmetic evidence requires review.", + "properties": { + "contract_version": { + "const": "ardaro.agent-invoice-matching.request.v1" + }, + "invoice": { + "oneOf": [ + { + "additionalProperties": false, + "properties": { + "currency": { + "enum": [ + "JPY" + ], + "type": "string" + }, + "line_items": { + "items": { + "additionalProperties": false, + "properties": { + "amount": { + "maxLength": 26, + "pattern": "^(?:0|[1-9][0-9]{0,25})$", + "type": "string" + }, + "description": { + "maxLength": 240, + "minLength": 1, + "type": "string" + }, + "line_id": { + "maxLength": 80, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + }, + "po_line_id": { + "maxLength": 80, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + }, + "product_code": { + "maxLength": 80, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + }, + "quantity": { + "allOf": [ + { + "not": { + "pattern": "^0(?:\\.0+)?$" + } + } + ], + "maxLength": 19, + "not": { + "pattern": "\\n" + }, + "pattern": "^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?$", + "type": "string" + }, + "unit": { + "maxLength": 32, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + }, + "unit_price": { + "maxLength": 19, + "not": { + "pattern": "\\n" + }, + "pattern": "^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?$", + "type": "string" + } + }, + "required": [ + "description", + "line_id", + "quantity", + "unit", + "unit_price" + ], + "type": "object" + }, + "maxItems": 100, + "minItems": 1, + "type": "array" + }, + "purchase_order_reference": { + "maxLength": 80, + "minLength": 1, + "type": "string" + }, + "reference": { + "maxLength": 80, + "minLength": 1, + "type": "string" + }, + "subtotal": { + "maxLength": 26, + "pattern": "^(?:0|[1-9][0-9]{0,25})$", + "type": "string" + }, + "supplier_id": { + "maxLength": 80, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + }, + "tax": { + "maxLength": 26, + "pattern": "^(?:0|[1-9][0-9]{0,25})$", + "type": "string" + }, + "total": { + "maxLength": 26, + "pattern": "^(?:0|[1-9][0-9]{0,25})$", + "type": "string" + } + }, + "required": [ + "currency", + "line_items", + "purchase_order_reference", + "reference", + "supplier_id" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "currency": { + "enum": [ + "USD", + "EUR", + "GBP", + "CAD", + "AUD", + "MXN" + ], + "type": "string" + }, + "line_items": { + "items": { + "additionalProperties": false, + "properties": { + "amount": { + "maxLength": 29, + "pattern": "^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,2})?$", + "type": "string" + }, + "description": { + "maxLength": 240, + "minLength": 1, + "type": "string" + }, + "line_id": { + "maxLength": 80, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + }, + "po_line_id": { + "maxLength": 80, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + }, + "product_code": { + "maxLength": 80, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + }, + "quantity": { + "allOf": [ + { + "not": { + "pattern": "^0(?:\\.0+)?$" + } + } + ], + "maxLength": 19, + "not": { + "pattern": "\\n" + }, + "pattern": "^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?$", + "type": "string" + }, + "unit": { + "maxLength": 32, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + }, + "unit_price": { + "maxLength": 19, + "not": { + "pattern": "\\n" + }, + "pattern": "^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?$", + "type": "string" + } + }, + "required": [ + "description", + "line_id", + "quantity", + "unit", + "unit_price" + ], + "type": "object" + }, + "maxItems": 100, + "minItems": 1, + "type": "array" + }, + "purchase_order_reference": { + "maxLength": 80, + "minLength": 1, + "type": "string" + }, + "reference": { + "maxLength": 80, + "minLength": 1, + "type": "string" + }, + "subtotal": { + "maxLength": 29, + "pattern": "^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,2})?$", + "type": "string" + }, + "supplier_id": { + "maxLength": 80, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + }, + "tax": { + "maxLength": 29, + "pattern": "^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,2})?$", + "type": "string" + }, + "total": { + "maxLength": 29, + "pattern": "^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,2})?$", + "type": "string" + } + }, + "required": [ + "currency", + "line_items", + "purchase_order_reference", + "reference", + "supplier_id" + ], + "type": "object" + } + ] + }, + "purchase_order": { + "oneOf": [ + { + "additionalProperties": false, + "properties": { + "currency": { + "enum": [ + "JPY" + ], + "type": "string" + }, + "line_items": { + "items": { + "additionalProperties": false, + "properties": { + "amount": { + "maxLength": 26, + "pattern": "^(?:0|[1-9][0-9]{0,25})$", + "type": "string" + }, + "description": { + "maxLength": 240, + "minLength": 1, + "type": "string" + }, + "line_id": { + "maxLength": 80, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + }, + "product_code": { + "maxLength": 80, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + }, + "quantity": { + "allOf": [ + { + "not": { + "pattern": "^0(?:\\.0+)?$" + } + } + ], + "maxLength": 19, + "not": { + "pattern": "\\n" + }, + "pattern": "^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?$", + "type": "string" + }, + "unit": { + "maxLength": 32, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + }, + "unit_price": { + "maxLength": 19, + "not": { + "pattern": "\\n" + }, + "pattern": "^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?$", + "type": "string" + } + }, + "required": [ + "description", + "line_id", + "quantity", + "unit", + "unit_price" + ], + "type": "object" + }, + "maxItems": 100, + "minItems": 1, + "type": "array" + }, + "reference": { + "maxLength": 80, + "minLength": 1, + "type": "string" + }, + "supplier_id": { + "maxLength": 80, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + } + }, + "required": [ + "currency", + "line_items", + "reference", + "supplier_id" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "currency": { + "enum": [ + "USD", + "EUR", + "GBP", + "CAD", + "AUD", + "MXN" + ], + "type": "string" + }, + "line_items": { + "items": { + "additionalProperties": false, + "properties": { + "amount": { + "maxLength": 29, + "pattern": "^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,2})?$", + "type": "string" + }, + "description": { + "maxLength": 240, + "minLength": 1, + "type": "string" + }, + "line_id": { + "maxLength": 80, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + }, + "product_code": { + "maxLength": 80, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + }, + "quantity": { + "allOf": [ + { + "not": { + "pattern": "^0(?:\\.0+)?$" + } + } + ], + "maxLength": 19, + "not": { + "pattern": "\\n" + }, + "pattern": "^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?$", + "type": "string" + }, + "unit": { + "maxLength": 32, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + }, + "unit_price": { + "maxLength": 19, + "not": { + "pattern": "\\n" + }, + "pattern": "^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?$", + "type": "string" + } + }, + "required": [ + "description", + "line_id", + "quantity", + "unit", + "unit_price" + ], + "type": "object" + }, + "maxItems": 100, + "minItems": 1, + "type": "array" + }, + "reference": { + "maxLength": 80, + "minLength": 1, + "type": "string" + }, + "supplier_id": { + "maxLength": 80, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + } + }, + "required": [ + "currency", + "line_items", + "reference", + "supplier_id" + ], + "type": "object" + } + ] + } + }, + "required": [ + "contract_version", + "invoice", + "purchase_order" + ], + "type": "object" + }, + "response": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "properties": { + "contract_version": { + "const": "ardaro.agent-invoice-matching.response.v1" + }, + "identities": { + "additionalProperties": false, + "properties": { + "analysis_result_identity": { + "pattern": "^res_[0-9a-f]{64}$", + "type": "string" + } + }, + "required": [ + "analysis_result_identity" + ], + "type": "object" + }, + "result": { + "additionalProperties": false, + "properties": { + "arithmetic": { + "additionalProperties": false, + "properties": { + "computed_invoice_total": { + "anyOf": [ + { + "maxLength": 42, + "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$", + "type": "string" + }, + { + "type": "null" + } + ] + }, + "invoice_currency_scale": { + "enum": [ + 0, + 2 + ] + }, + "invoice_line_amount_sum": { + "maxLength": 42, + "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$", + "type": "string" + }, + "invoice_subtotal": { + "anyOf": [ + { + "maxLength": 42, + "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$", + "type": "string" + }, + { + "type": "null" + } + ] + }, + "invoice_subtotal_status": { + "enum": [ + "consistent", + "mismatch", + "unavailable" + ] + }, + "invoice_supplied_line_amount_sum": { + "anyOf": [ + { + "maxLength": 42, + "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$", + "type": "string" + }, + { + "type": "null" + } + ] + }, + "invoice_tax": { + "anyOf": [ + { + "maxLength": 42, + "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$", + "type": "string" + }, + { + "type": "null" + } + ] + }, + "invoice_total": { + "anyOf": [ + { + "maxLength": 42, + "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$", + "type": "string" + }, + { + "type": "null" + } + ] + }, + "invoice_total_status": { + "enum": [ + "consistent", + "mismatch", + "unavailable" + ] + }, + "purchase_order_currency_scale": { + "enum": [ + 0, + 2 + ] + }, + "rounding_mode": { + "const": "ROUND_HALF_UP" + }, + "rounding_scope": { + "const": "each_line_then_sum" + } + }, + "required": [ + "rounding_mode", + "rounding_scope", + "invoice_currency_scale", + "purchase_order_currency_scale", + "invoice_line_amount_sum", + "invoice_supplied_line_amount_sum", + "invoice_subtotal", + "invoice_tax", + "invoice_total", + "computed_invoice_total", + "invoice_subtotal_status", + "invoice_total_status" + ], + "type": "object" + }, + "comparison_rows": { + "items": { + "additionalProperties": false, + "properties": { + "allocation_status": { + "enum": [ + "allocated", + "not_comparable", + "unmatched" + ] + }, + "computed_invoice_amount": { + "maxLength": 42, + "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$", + "type": "string" + }, + "discrepancy_codes": { + "items": { + "enum": [ + "currency_mismatch", + "supplier_mismatch", + "purchase_order_reference_mismatch", + "invoice_line_amount_unavailable", + "purchase_order_line_amount_unavailable", + "invoice_line_arithmetic_mismatch", + "purchase_order_line_arithmetic_mismatch", + "referenced_purchase_order_line_missing", + "ambiguous_product_code", + "unmatchable_invoice_line", + "unit_mismatch", + "product_code_mismatch", + "unit_price_mismatch", + "quantity_exceeds_purchase_order", + "invoice_subtotal_unavailable", + "invoice_tax_unavailable", + "invoice_total_unavailable", + "invoice_subtotal_mismatch", + "invoice_supplied_line_sum_mismatch", + "invoice_total_mismatch" + ], + "type": "string" + }, + "maxItems": 20, + "minItems": 0, + "type": "array", + "uniqueItems": true + }, + "invoice_amount": { + "anyOf": [ + { + "maxLength": 42, + "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$", + "type": "string" + }, + { + "type": "null" + } + ] + }, + "invoice_currency": { + "enum": [ + "USD", + "EUR", + "GBP", + "CAD", + "AUD", + "MXN", + "JPY" + ] + }, + "invoice_line_id": { + "maxLength": 80, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + }, + "invoice_quantity": { + "maxLength": 42, + "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$", + "type": "string" + }, + "invoice_source": { + "maxLength": 100, + "minLength": 1, + "pattern": "^/(?:invoice|purchase_order)(?:/[A-Za-z0-9_]+)*$", + "type": "string" + }, + "invoice_unit": { + "maxLength": 32, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + }, + "invoice_unit_price": { + "maxLength": 42, + "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$", + "type": "string" + }, + "line_arithmetic_status": { + "enum": [ + "consistent", + "mismatch", + "unavailable" + ] + }, + "match_method": { + "enum": [ + "unmatched", + "explicit_po_line_id", + "exact_product_code" + ] + }, + "outcome": { + "enum": [ + "no_discrepancies", + "review_required" + ] + }, + "purchase_order_currency": { + "enum": [ + "USD", + "EUR", + "GBP", + "CAD", + "AUD", + "MXN", + "JPY" + ] + }, + "purchase_order_line_id": { + "anyOf": [ + { + "maxLength": 80, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + }, + { + "type": "null" + } + ] + }, + "purchase_order_quantity": { + "anyOf": [ + { + "maxLength": 42, + "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$", + "type": "string" + }, + { + "type": "null" + } + ] + }, + "purchase_order_source": { + "anyOf": [ + { + "maxLength": 100, + "minLength": 1, + "pattern": "^/(?:invoice|purchase_order)(?:/[A-Za-z0-9_]+)*$", + "type": "string" + }, + { + "type": "null" + } + ] + }, + "purchase_order_unit": { + "anyOf": [ + { + "maxLength": 32, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + }, + { + "type": "null" + } + ] + }, + "purchase_order_unit_price": { + "anyOf": [ + { + "maxLength": 42, + "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$", + "type": "string" + }, + { + "type": "null" + } + ] + }, + "unit_price_difference": { + "anyOf": [ + { + "maxLength": 42, + "pattern": "^-?(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?$", + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "invoice_line_id", + "invoice_source", + "purchase_order_line_id", + "purchase_order_source", + "match_method", + "allocation_status", + "invoice_quantity", + "purchase_order_quantity", + "invoice_unit", + "purchase_order_unit", + "invoice_unit_price", + "purchase_order_unit_price", + "invoice_currency", + "purchase_order_currency", + "unit_price_difference", + "invoice_amount", + "computed_invoice_amount", + "line_arithmetic_status", + "discrepancy_codes", + "outcome" + ], + "type": "object" + }, + "maxItems": 100, + "minItems": 1, + "type": "array" + }, + "discrepancies": { + "items": { + "additionalProperties": false, + "properties": { + "code": { + "enum": [ + "currency_mismatch", + "supplier_mismatch", + "purchase_order_reference_mismatch", + "invoice_line_amount_unavailable", + "purchase_order_line_amount_unavailable", + "invoice_line_arithmetic_mismatch", + "purchase_order_line_arithmetic_mismatch", + "referenced_purchase_order_line_missing", + "ambiguous_product_code", + "unmatchable_invoice_line", + "unit_mismatch", + "product_code_mismatch", + "unit_price_mismatch", + "quantity_exceeds_purchase_order", + "invoice_subtotal_unavailable", + "invoice_tax_unavailable", + "invoice_total_unavailable", + "invoice_subtotal_mismatch", + "invoice_supplied_line_sum_mismatch", + "invoice_total_mismatch" + ], + "type": "string" + }, + "message": { + "maxLength": 240, + "minLength": 1, + "type": "string" + }, + "severity": { + "enum": [ + "error", + "warning" + ] + }, + "sources": { + "items": { + "maxLength": 100, + "minLength": 1, + "pattern": "^/(?:invoice|purchase_order)(?:/[A-Za-z0-9_]+)*$", + "type": "string" + }, + "maxItems": 101, + "minItems": 1, + "type": "array" + } + }, + "required": [ + "code", + "severity", + "message", + "sources" + ], + "type": "object" + }, + "maxItems": 1000, + "minItems": 0, + "type": "array" + }, + "document_checks": { + "additionalProperties": false, + "properties": { + "currency_matches": { + "type": "boolean" + }, + "purchase_order_reference_matches": { + "type": "boolean" + }, + "supplier_matches": { + "type": "boolean" + } + }, + "required": [ + "currency_matches", + "supplier_matches", + "purchase_order_reference_matches" + ], + "type": "object" + }, + "policy": { + "additionalProperties": false, + "properties": { + "arithmetic_scope": { + "maxLength": 300, + "minLength": 1, + "type": "string" + }, + "decision_scope": { + "maxLength": 300, + "minLength": 1, + "type": "string" + }, + "delivery_verification_supported": { + "const": false + }, + "financial_posting_performed": { + "const": false + }, + "financial_posting_supported": { + "const": false + }, + "human_review_required": { + "const": true + }, + "identity_purpose": { + "const": "deterministic_result_comparison_only" + }, + "matching_rule": { + "const": "explicit_po_line_id_else_unique_case_sensitive_product_code" + }, + "model_calls": { + "const": 0 + }, + "payment_approval_supported": { + "const": false + }, + "quantity_scope": { + "maxLength": 300, + "minLength": 1, + "type": "string" + }, + "raw_documents_retained": { + "const": false + }, + "stateless": { + "const": true + }, + "supplier_scope": { + "maxLength": 300, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "human_review_required", + "stateless", + "raw_documents_retained", + "financial_posting_supported", + "financial_posting_performed", + "payment_approval_supported", + "delivery_verification_supported", + "model_calls", + "identity_purpose", + "matching_rule", + "quantity_scope", + "arithmetic_scope", + "supplier_scope", + "decision_scope" + ], + "type": "object" + }, + "purchase_order_line_summary": { + "items": { + "additionalProperties": false, + "properties": { + "allocated_invoice_sources": { + "items": { + "maxLength": 100, + "minLength": 1, + "pattern": "^/(?:invoice|purchase_order)(?:/[A-Za-z0-9_]+)*$", + "type": "string" + }, + "maxItems": 100, + "minItems": 0, + "type": "array" + }, + "allocated_quantity": { + "anyOf": [ + { + "maxLength": 42, + "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$", + "type": "string" + }, + { + "type": "null" + } + ] + }, + "computed_amount": { + "maxLength": 42, + "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$", + "type": "string" + }, + "line_arithmetic_status": { + "enum": [ + "consistent", + "mismatch", + "unavailable" + ] + }, + "ordered_quantity": { + "maxLength": 42, + "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$", + "type": "string" + }, + "overbilled_quantity": { + "anyOf": [ + { + "maxLength": 42, + "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$", + "type": "string" + }, + { + "type": "null" + } + ] + }, + "purchase_order_line_id": { + "maxLength": 80, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + }, + "purchase_order_source": { + "maxLength": 100, + "minLength": 1, + "pattern": "^/(?:invoice|purchase_order)(?:/[A-Za-z0-9_]+)*$", + "type": "string" + }, + "status": { + "enum": [ + "not_comparable", + "not_invoiced", + "overbilled", + "fully_invoiced", + "partially_invoiced" + ] + }, + "supplied_amount": { + "anyOf": [ + { + "maxLength": 42, + "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$", + "type": "string" + }, + { + "type": "null" + } + ] + }, + "uninvoiced_quantity": { + "anyOf": [ + { + "maxLength": 42, + "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$", + "type": "string" + }, + { + "type": "null" + } + ] + }, + "unit": { + "maxLength": 32, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + } + }, + "required": [ + "purchase_order_line_id", + "purchase_order_source", + "allocated_invoice_sources", + "ordered_quantity", + "allocated_quantity", + "uninvoiced_quantity", + "overbilled_quantity", + "unit", + "status", + "supplied_amount", + "computed_amount", + "line_arithmetic_status" + ], + "type": "object" + }, + "maxItems": 100, + "minItems": 1, + "type": "array" + }, + "summary": { + "additionalProperties": false, + "properties": { + "delivery_verified": { + "const": false + }, + "discrepancy_count": { + "maximum": 1000, + "minimum": 0, + "type": "integer" + }, + "human_review_required": { + "const": true + }, + "invoice_line_count": { + "maximum": 100, + "minimum": 0, + "type": "integer" + }, + "matched_invoice_line_count": { + "maximum": 100, + "minimum": 0, + "type": "integer" + }, + "outcome": { + "enum": [ + "no_discrepancies", + "review_required" + ] + }, + "payment_approved": { + "const": false + }, + "purchase_order_line_count": { + "maximum": 100, + "minimum": 0, + "type": "integer" + }, + "unknown_check_count": { + "maximum": 1000, + "minimum": 0, + "type": "integer" + }, + "unmatched_invoice_line_count": { + "maximum": 100, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "outcome", + "invoice_line_count", + "purchase_order_line_count", + "matched_invoice_line_count", + "unmatched_invoice_line_count", + "discrepancy_count", + "unknown_check_count", + "human_review_required", + "delivery_verified", + "payment_approved" + ], + "type": "object" + } + }, + "required": [ + "summary", + "document_checks", + "comparison_rows", + "purchase_order_line_summary", + "discrepancies", + "arithmetic", + "policy" + ], + "type": "object" + }, + "status": { + "const": "review_required" + } + }, + "required": [ + "contract_version", + "status", + "result", + "identities" + ], + "type": "object" + }, + "synthetic_only": { + "const": true + } + }, + "required": [ + "example_version", + "synthetic_only", + "request", + "response", + "policy" + ], + "type": "object" + }, + "service": { + "const": "invoice" + } + }, + "required": [ + "service", + "details" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "details": { + "properties": { + "request": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "description": "Free comparison of one receipt, invoice and purchase order supplied in this request. Missing documents or fields produce needs_review. Maximum 100 lines per document and 196608 UTF-8 JSON bytes. No images, URLs, credentials, account access, or paid tool calls. Money amounts must use the supported currency's minor-unit precision; runtime also rejects sensitive data, padded strings and control characters.", + "properties": { + "invoice": { + "additionalProperties": false, + "description": "Caller-supplied structured data. Use opaque supplier IDs and decimal strings; omit unknown fields. Receipt kind describes the source document, not verified delivery. Field names align with invoice matching; receipt extraction output must be mapped explicitly.", + "properties": { + "currency": { + "pattern": "^[A-Z]{3}$", + "type": "string" + }, + "line_items": { + "items": { + "additionalProperties": false, + "properties": { + "amount": { + "maxLength": 33, + "pattern": "^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,6})?$", + "type": "string" + }, + "description": { + "maxLength": 240, + "minLength": 1, + "type": "string" + }, + "line_id": { + "maxLength": 80, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + }, + "po_line_id": { + "maxLength": 80, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + }, + "product_code": { + "maxLength": 80, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + }, + "quantity": { + "allOf": [ + { + "not": { + "pattern": "^0(?:\\.0+)?$" + } + } + ], + "maxLength": 19, + "not": { + "pattern": "\\n" + }, + "pattern": "^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?$", + "type": "string" + }, + "unit": { + "maxLength": 32, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + }, + "unit_price": { + "maxLength": 19, + "not": { + "pattern": "\\n" + }, + "pattern": "^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?$", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "maxItems": 100, + "type": "array" + }, + "purchase_order_reference": { + "maxLength": 80, + "minLength": 1, + "type": "string" + }, + "reference": { + "maxLength": 80, + "minLength": 1, + "type": "string" + }, + "subtotal": { + "maxLength": 33, + "pattern": "^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,6})?$", + "type": "string" + }, + "supplier_id": { + "maxLength": 80, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + }, + "tax": { + "maxLength": 33, + "pattern": "^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,6})?$", + "type": "string" + }, + "total": { + "maxLength": 33, + "pattern": "^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,6})?$", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "purchase_order": { + "additionalProperties": false, + "description": "Caller-supplied structured data. Use opaque supplier IDs and decimal strings; omit unknown fields. Receipt kind describes the source document, not verified delivery. Field names align with invoice matching; receipt extraction output must be mapped explicitly.", + "properties": { + "currency": { + "pattern": "^[A-Z]{3}$", + "type": "string" + }, + "line_items": { + "items": { + "additionalProperties": false, + "properties": { + "amount": { + "maxLength": 33, + "pattern": "^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,6})?$", + "type": "string" + }, + "description": { + "maxLength": 240, + "minLength": 1, + "type": "string" + }, + "line_id": { + "maxLength": 80, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + }, + "product_code": { + "maxLength": 80, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + }, + "quantity": { + "allOf": [ + { + "not": { + "pattern": "^0(?:\\.0+)?$" + } + } + ], + "maxLength": 19, + "not": { + "pattern": "\\n" + }, + "pattern": "^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?$", + "type": "string" + }, + "unit": { + "maxLength": 32, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + }, + "unit_price": { + "maxLength": 19, + "not": { + "pattern": "\\n" + }, + "pattern": "^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?$", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "maxItems": 100, + "type": "array" + }, + "reference": { + "maxLength": 80, + "minLength": 1, + "type": "string" + }, + "subtotal": { + "maxLength": 33, + "pattern": "^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,6})?$", + "type": "string" + }, + "supplier_id": { + "maxLength": 80, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + }, + "tax": { + "maxLength": 33, + "pattern": "^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,6})?$", + "type": "string" + }, + "total": { + "maxLength": 33, + "pattern": "^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,6})?$", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "receipt": { + "additionalProperties": false, + "description": "Caller-supplied structured data. Use opaque supplier IDs and decimal strings; omit unknown fields. Receipt kind describes the source document, not verified delivery. Field names align with invoice matching; receipt extraction output must be mapped explicitly.", + "properties": { + "currency": { + "pattern": "^[A-Z]{3}$", + "type": "string" + }, + "invoice_reference": { + "maxLength": 80, + "minLength": 1, + "type": "string" + }, + "kind": { + "enum": [ + "expense_receipt", + "delivery_receipt" + ] + }, + "line_items": { + "items": { + "additionalProperties": false, + "properties": { + "amount": { + "maxLength": 33, + "pattern": "^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,6})?$", + "type": "string" + }, + "description": { + "maxLength": 240, + "minLength": 1, + "type": "string" + }, + "invoice_line_id": { + "maxLength": 80, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + }, + "line_id": { + "maxLength": 80, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + }, + "product_code": { + "maxLength": 80, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + }, + "quantity": { + "allOf": [ + { + "not": { + "pattern": "^0(?:\\.0+)?$" + } + } + ], + "maxLength": 19, + "not": { + "pattern": "\\n" + }, + "pattern": "^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?$", + "type": "string" + }, + "unit": { + "maxLength": 32, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + }, + "unit_price": { + "maxLength": 19, + "not": { + "pattern": "\\n" + }, + "pattern": "^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?$", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "maxItems": 100, + "type": "array" + }, + "purchase_order_reference": { + "maxLength": 80, + "minLength": 1, + "type": "string" + }, + "reference": { + "maxLength": 80, + "minLength": 1, + "type": "string" + }, + "subtotal": { + "maxLength": 33, + "pattern": "^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,6})?$", + "type": "string" + }, + "supplier_id": { + "maxLength": 80, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + }, + "tax": { + "maxLength": 33, + "pattern": "^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,6})?$", + "type": "string" + }, + "total": { + "maxLength": 33, + "pattern": "^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,6})?$", + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [], + "type": "object" + }, + "response": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "oneOf": [ + { + "additionalProperties": false, + "properties": { + "comparisons": { + "items": { + "additionalProperties": false, + "properties": { + "document_identity_comparable": { + "type": "boolean" + }, + "pair": { + "enum": [ + "receipt_to_invoice", + "invoice_to_purchase_order" + ] + }, + "rows": { + "items": { + "additionalProperties": false, + "properties": { + "amount_difference": { + "maxLength": 50, + "pattern": "^-?(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$", + "type": [ + "string", + "null" + ] + }, + "candidate_targets": { + "items": { + "maxLength": 100, + "pattern": "^/(?:receipt|invoice|purchase_order)(?:/[A-Za-z0-9_]+)*$", + "type": "string" + }, + "maxItems": 100, + "type": "array" + }, + "comparison_performed": { + "type": "boolean" + }, + "match_method": { + "enum": [ + "unmatched", + "explicit_line_reference", + "exact_product_code", + "normalized_description" + ] + }, + "quantity_difference": { + "maxLength": 50, + "pattern": "^-?(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$", + "type": [ + "string", + "null" + ] + }, + "source": { + "maxLength": 100, + "pattern": "^/(?:receipt|invoice|purchase_order)(?:/[A-Za-z0-9_]+)*$", + "type": "string" + }, + "status": { + "enum": [ + "no_discrepancies", + "needs_review" + ] + }, + "target": { + "anyOf": [ + { + "maxLength": 100, + "pattern": "^/(?:receipt|invoice|purchase_order)(?:/[A-Za-z0-9_]+)*$", + "type": "string" + }, + { + "type": "null" + } + ] + }, + "unit_price_difference": { + "maxLength": 50, + "pattern": "^-?(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$", + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "source", + "target", + "candidate_targets", + "match_method", + "comparison_performed", + "status", + "quantity_difference", + "unit_price_difference", + "amount_difference" + ], + "type": "object" + }, + "maxItems": 100, + "type": "array" + }, + "status": { + "enum": [ + "no_discrepancies", + "needs_review" + ] + } + }, + "required": [ + "pair", + "status", + "document_identity_comparable", + "rows" + ], + "type": "object" + }, + "maxItems": 2, + "minItems": 2, + "type": "array" + }, + "contract_version": { + "const": "ardaro.purchase-document-reconciliation.response.v1" + }, + "delivery_verified": { + "const": false + }, + "discrepancies": { + "items": { + "additionalProperties": false, + "properties": { + "code": { + "maxLength": 80, + "pattern": "^[a-z_]+$", + "type": "string" + }, + "scope": { + "enum": [ + "receipt", + "invoice", + "purchase_order", + "receipt_to_invoice", + "invoice_to_purchase_order" + ] + }, + "severity": { + "enum": [ + "unknown", + "discrepancy" + ] + }, + "sources": { + "items": { + "maxLength": 100, + "pattern": "^/(?:receipt|invoice|purchase_order)(?:/[A-Za-z0-9_]+)*$", + "type": "string" + }, + "maxItems": 101, + "type": "array" + } + }, + "required": [ + "code", + "scope", + "severity", + "sources" + ], + "type": "object" + }, + "maxItems": 6000, + "type": "array" + }, + "document_summary": { + "items": { + "additionalProperties": false, + "properties": { + "currency_minor_units": { + "enum": [ + 0, + 2, + null + ] + }, + "currency_supported": { + "type": "boolean" + }, + "document": { + "enum": [ + "receipt", + "invoice", + "purchase_order" + ] + }, + "line_count": { + "maximum": 100, + "minimum": 0, + "type": "integer" + }, + "present": { + "type": "boolean" + } + }, + "required": [ + "document", + "present", + "line_count", + "currency_supported", + "currency_minor_units" + ], + "type": "object" + }, + "maxItems": 3, + "minItems": 3, + "type": "array" + }, + "financial_posting_performed": { + "const": false + }, + "human_review_required": { + "const": true + }, + "payment_approved": { + "const": false + }, + "policy": { + "const": { + "arithmetic_scope": "Exact decimal comparisons with per-line ROUND_HALF_UP at supported currency precision. No tax applicability, discounts, freight or currency conversion is inferred.", + "decision_scope": "No discrepancies means the supported checks found none in supplied data. It is not payment authorization, accounting approval or supplier verification.", + "document_storage_performed": false, + "matching_rule": "explicit line reference, else unique exact case-sensitive product code, else unique NFKC/casefold/whitespace-normalized description when both product codes are absent; never fuzzy or semantic", + "model_calls": 0, + "paid_tool_calls": 0, + "payment_required": false, + "quantity_scope": "Differences concern only these three supplied documents. Partial receipts, partial invoicing, prior invoices, returns and delivery events are not inferred.", + "receipt_scope": "An expense receipt is not evidence of delivery. A delivery_receipt label is caller-supplied and does not authenticate delivery.", + "retention_scope": "This function retains no documents or results; caller and transport retention are outside this function's guarantees." + } + }, + "provenance": { + "const": { + "document_authenticity_verified": false, + "external_data_fetched": false, + "source": "caller_supplied_documents_only", + "source_pointer_root": "original_arguments" + } + }, + "result_identity": { + "pattern": "^res_[0-9a-f]{64}$", + "type": "string" + }, + "status": { + "enum": [ + "no_discrepancies", + "needs_review" + ] + } + }, + "required": [ + "contract_version", + "human_review_required", + "payment_approved", + "delivery_verified", + "financial_posting_performed", + "provenance", + "policy", + "status", + "result_identity", + "document_summary", + "comparisons", + "discrepancies" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "contract_version": { + "const": "ardaro.purchase-document-reconciliation.response.v1" + }, + "error": { + "additionalProperties": false, + "properties": { + "code": { + "maxLength": 80, + "type": "string" + }, + "message": { + "maxLength": 300, + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + }, + "status": { + "const": "error" + } + }, + "required": [ + "contract_version", + "status", + "error" + ], + "type": "object" + } + ], + "type": "object" + } + }, + "required": [ + "request", + "response" + ], + "type": "object" + }, + "service": { + "const": "reconciliation" + } + }, + "required": [ + "service", + "details" + ], + "type": "object" + } +]
- Changed
get_document_service_status3 fields changed- changed
Input schema / properties / service / descriptionPrevious value: -"receipt: extraction checks. Examples do not process caller documents."New value: +"receipt: extraction checks; invoice: paid invoice-to-PO quantity allocation; reconciliation: free three-document discrepancy checks without allocation. Choose one service; examples do not process caller documents." - changed
Input schema / properties / service / enumPrevious value: -[ - "receipt" -]New value: +[ + "receipt", + "invoice", + "reconciliation" +] - changed
Output schema / oneOfPrevious value: -[ - { - "additionalProperties": false, - "properties": { - "details": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "additionalProperties": false, - "properties": { - "availability": { - "additionalProperties": false, - "description": "Cached runtime readiness, not a fresh external probe or settlement proof.", - "properties": { - "ready": { - "description": "Whether the launch gate and cached dependencies currently allow paid processing.", - "type": "boolean" - }, - "reason": { - "description": "Coarse public readiness reason; contains no internal error details.", - "enum": [ - "ready", - "launch_gate_closed", - "dependency_unavailable", - "not_configured" - ] - }, - "source": { - "const": "cached_runtime_readiness" - } - }, - "required": [ - "ready", - "reason", - "source" - ], - "type": "object" - }, - "limits": { - "additionalProperties": false, - "properties": { - "max_existing_fingerprints": { - "minimum": 1, - "type": "integer" - }, - "max_line_items": { - "minimum": 1, - "type": "integer" - }, - "max_pages": { - "minimum": 1, - "type": "integer" - }, - "max_request_bytes": { - "minimum": 1, - "type": "integer" - }, - "max_text_characters": { - "minimum": 1, - "type": "integer" - }, - "normal_latency_target_ms": { - "minimum": 1, - "type": "integer" - }, - "request_timeout_ms": { - "minimum": 1, - "type": "integer" - } - }, - "required": [ - "max_existing_fingerprints", - "max_line_items", - "max_pages", - "max_request_bytes", - "max_text_characters", - "normal_latency_target_ms", - "request_timeout_ms" - ], - "type": "object" - }, - "paid_processing_performed": { - "const": false - }, - "payment_authorized": { - "const": false - }, - "policy": { - "additionalProperties": false, - "properties": { - "advisory_only": { - "const": true - }, - "ardaro_saas_tenant_access": { - "const": false - }, - "financial_mutation_supported": { - "const": false - }, - "human_review_required": { - "const": true - } - }, - "required": [ - "advisory_only", - "human_review_required", - "financial_mutation_supported", - "ardaro_saas_tenant_access" - ], - "type": "object" - }, - "price": { - "additionalProperties": false, - "properties": { - "amount": { - "pattern": "^[0-9]+\\.[0-9]{2}$", - "type": "string" - }, - "currency": { - "const": "USDC" - }, - "display": { - "pattern": "^\\$[0-9]+\\.[0-9]{2}$", - "type": "string" - }, - "failed_input_validation_charged": { - "const": false - }, - "model": { - "const": "fixed_per_accepted_request" - }, - "network": { - "type": "string" - }, - "same_payment_identifier_replay_requires_new_payment": { - "const": false - }, - "successful_response_loss_retry_policy": { - "type": "string" - } - }, - "required": [ - "model", - "amount", - "currency", - "display", - "network", - "failed_input_validation_charged", - "same_payment_identifier_replay_requires_new_payment", - "successful_response_loss_retry_policy" - ], - "type": "object" - }, - "retention": { - "additionalProperties": false, - "properties": { - "default_retention_seconds": { - "minimum": 1, - "type": "integer" - }, - "deletion_behavior": { - "type": "string" - }, - "durable_recovery_supported": { - "type": "boolean" - }, - "extracted_results_retained": { - "type": "boolean" - }, - "payment_metadata_retention_seconds": { - "minimum": 86400, - "type": "integer" - }, - "raw_documents_retained": { - "const": false - }, - "raw_receipt_images_retained": { - "const": false - }, - "storage_scope": { - "type": "string" - }, - "used_for_model_training": { - "const": false - } - }, - "required": [ - "default_retention_seconds", - "deletion_behavior", - "durable_recovery_supported", - "extracted_results_retained", - "payment_metadata_retention_seconds", - "raw_documents_retained", - "raw_receipt_images_retained", - "storage_scope", - "used_for_model_training" - ], - "type": "object" - }, - "service_id": { - "const": "ardaro.receipt_intelligence" - }, - "status_version": { - "const": "ardaro.receipt-intelligence.service-status.v1" - }, - "supported_input_types": { - "items": { - "additionalProperties": false, - "properties": { - "description": { - "type": "string" - }, - "input_kind": { - "enum": [ - "text", - "structured" - ] - }, - "mime_type": { - "type": "string" - } - }, - "required": [ - "mime_type", - "input_kind", - "description" - ], - "type": "object" - }, - "minItems": 1, - "type": "array" - } - }, - "required": [ - "availability", - "limits", - "paid_processing_performed", - "payment_authorized", - "policy", - "price", - "retention", - "service_id", - "status_version", - "supported_input_types" - ], - "type": "object" - }, - "service": { - "const": "receipt" - } - }, - "required": [ - "service", - "details" - ], - "type": "object" - } -]New value: +[ + { + "additionalProperties": false, + "properties": { + "details": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "properties": { + "availability": { + "additionalProperties": false, + "description": "Cached runtime readiness, not a fresh external probe or settlement proof.", + "properties": { + "ready": { + "description": "Whether the launch gate and cached dependencies currently allow paid processing.", + "type": "boolean" + }, + "reason": { + "description": "Coarse public readiness reason; contains no internal error details.", + "enum": [ + "ready", + "launch_gate_closed", + "dependency_unavailable", + "not_configured" + ] + }, + "source": { + "const": "cached_runtime_readiness" + } + }, + "required": [ + "ready", + "reason", + "source" + ], + "type": "object" + }, + "limits": { + "additionalProperties": false, + "properties": { + "max_existing_fingerprints": { + "minimum": 1, + "type": "integer" + }, + "max_line_items": { + "minimum": 1, + "type": "integer" + }, + "max_pages": { + "minimum": 1, + "type": "integer" + }, + "max_request_bytes": { + "minimum": 1, + "type": "integer" + }, + "max_text_characters": { + "minimum": 1, + "type": "integer" + }, + "normal_latency_target_ms": { + "minimum": 1, + "type": "integer" + }, + "request_timeout_ms": { + "minimum": 1, + "type": "integer" + } + }, + "required": [ + "max_existing_fingerprints", + "max_line_items", + "max_pages", + "max_request_bytes", + "max_text_characters", + "normal_latency_target_ms", + "request_timeout_ms" + ], + "type": "object" + }, + "paid_processing_performed": { + "const": false + }, + "payment_authorized": { + "const": false + }, + "policy": { + "additionalProperties": false, + "properties": { + "advisory_only": { + "const": true + }, + "ardaro_saas_tenant_access": { + "const": false + }, + "financial_mutation_supported": { + "const": false + }, + "human_review_required": { + "const": true + } + }, + "required": [ + "advisory_only", + "human_review_required", + "financial_mutation_supported", + "ardaro_saas_tenant_access" + ], + "type": "object" + }, + "price": { + "additionalProperties": false, + "properties": { + "amount": { + "pattern": "^[0-9]+\\.[0-9]{2}$", + "type": "string" + }, + "currency": { + "const": "USDC" + }, + "display": { + "pattern": "^\\$[0-9]+\\.[0-9]{2}$", + "type": "string" + }, + "failed_input_validation_charged": { + "const": false + }, + "model": { + "const": "fixed_per_accepted_request" + }, + "network": { + "type": "string" + }, + "same_payment_identifier_replay_requires_new_payment": { + "const": false + }, + "successful_response_loss_retry_policy": { + "type": "string" + } + }, + "required": [ + "model", + "amount", + "currency", + "display", + "network", + "failed_input_validation_charged", + "same_payment_identifier_replay_requires_new_payment", + "successful_response_loss_retry_policy" + ], + "type": "object" + }, + "retention": { + "additionalProperties": false, + "properties": { + "default_retention_seconds": { + "minimum": 1, + "type": "integer" + }, + "deletion_behavior": { + "type": "string" + }, + "durable_recovery_supported": { + "type": "boolean" + }, + "extracted_results_retained": { + "type": "boolean" + }, + "payment_metadata_retention_seconds": { + "minimum": 86400, + "type": "integer" + }, + "raw_documents_retained": { + "const": false + }, + "raw_receipt_images_retained": { + "const": false + }, + "storage_scope": { + "type": "string" + }, + "used_for_model_training": { + "const": false + } + }, + "required": [ + "default_retention_seconds", + "deletion_behavior", + "durable_recovery_supported", + "extracted_results_retained", + "payment_metadata_retention_seconds", + "raw_documents_retained", + "raw_receipt_images_retained", + "storage_scope", + "used_for_model_training" + ], + "type": "object" + }, + "service_id": { + "const": "ardaro.receipt_intelligence" + }, + "status_version": { + "const": "ardaro.receipt-intelligence.service-status.v1" + }, + "supported_input_types": { + "items": { + "additionalProperties": false, + "properties": { + "description": { + "type": "string" + }, + "input_kind": { + "enum": [ + "text", + "structured" + ] + }, + "mime_type": { + "type": "string" + } + }, + "required": [ + "mime_type", + "input_kind", + "description" + ], + "type": "object" + }, + "minItems": 1, + "type": "array" + } + }, + "required": [ + "availability", + "limits", + "paid_processing_performed", + "payment_authorized", + "policy", + "price", + "retention", + "service_id", + "status_version", + "supported_input_types" + ], + "type": "object" + }, + "service": { + "const": "receipt" + } + }, + "required": [ + "service", + "details" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "details": { + "additionalProperties": false, + "allOf": [ + { + "else": { + "properties": { + "reason": { + "enum": [ + "launch_gated", + "dependency_unavailable" + ] + } + } + }, + "if": { + "properties": { + "ready": { + "const": true + } + } + }, + "then": { + "properties": { + "reason": { + "const": "ready" + } + } + } + } + ], + "properties": { + "endpoints": { + "additionalProperties": false, + "properties": { + "analyze": { + "format": "uri", + "maxLength": 600, + "minLength": 1, + "not": { + "pattern": "\\n" + }, + "pattern": "^https?://[^/?#]+/v1/invoice-matching/analyze$", + "type": "string" + }, + "example": { + "format": "uri", + "maxLength": 600, + "minLength": 1, + "not": { + "pattern": "\\n" + }, + "pattern": "^https?://[^/?#]+/agent-services/invoice-matching/example$", + "type": "string" + }, + "mcp": { + "format": "uri", + "maxLength": 600, + "minLength": 1, + "not": { + "pattern": "\\n" + }, + "pattern": "^https?://[^/?#]+/mcp$", + "type": "string" + }, + "status": { + "format": "uri", + "maxLength": 600, + "minLength": 1, + "not": { + "pattern": "\\n" + }, + "pattern": "^https?://[^/?#]+/agent-services/invoice-matching/status$", + "type": "string" + } + }, + "required": [ + "analyze", + "mcp", + "example", + "status" + ], + "type": "object" + }, + "limits": { + "additionalProperties": false, + "properties": { + "max_invoice_line_items": { + "const": 100 + }, + "max_mcp_response_bytes": { + "const": 2097152 + }, + "max_purchase_order_line_items": { + "const": 100 + }, + "max_request_bytes": { + "const": 262144 + }, + "max_response_bytes": { + "const": 1048576 + }, + "supported_currencies": { + "const": [ + "AUD", + "CAD", + "EUR", + "GBP", + "JPY", + "MXN", + "USD" + ] + } + }, + "required": [ + "max_request_bytes", + "max_invoice_line_items", + "max_purchase_order_line_items", + "max_response_bytes", + "max_mcp_response_bytes", + "supported_currencies" + ], + "type": "object" + }, + "policy": { + "additionalProperties": false, + "properties": { + "advisory_only": { + "const": true + }, + "ardaro_saas_tenant_access": { + "const": false + }, + "delivery_verification_supported": { + "const": false + }, + "document_authentication_supported": { + "const": false + }, + "financial_mutation_supported": { + "const": false + }, + "human_review_required": { + "const": true + }, + "ocr_supported": { + "const": false + }, + "prior_invoice_reconciliation_supported": { + "const": false + }, + "tax_validation_supported": { + "const": false + } + }, + "required": [ + "advisory_only", + "human_review_required", + "financial_mutation_supported", + "ardaro_saas_tenant_access", + "ocr_supported", + "delivery_verification_supported", + "prior_invoice_reconciliation_supported", + "tax_validation_supported", + "document_authentication_supported" + ], + "type": "object" + }, + "price": { + "additionalProperties": false, + "properties": { + "amount": { + "const": "0.50" + }, + "amount_atomic": { + "const": "500000" + }, + "currency": { + "const": "USDC" + }, + "display": { + "const": "$0.50" + }, + "failed_input_validation_charged": { + "const": false + }, + "model": { + "const": "fixed_per_accepted_request" + }, + "network": { + "enum": [ + "eip155:8453", + "eip155:84532" + ] + }, + "same_payment_identifier_replay_requires_new_payment": { + "const": false + }, + "successful_response_loss_retry_policy": { + "const": "Retry only the identical signed payment, payment identifier and request. Never create a new signature for an unknown outcome." + } + }, + "required": [ + "model", + "amount", + "amount_atomic", + "currency", + "network", + "display", + "failed_input_validation_charged", + "same_payment_identifier_replay_requires_new_payment", + "successful_response_loss_retry_policy" + ], + "type": "object" + }, + "ready": { + "type": "boolean" + }, + "reason": { + "enum": [ + "ready", + "launch_gated", + "dependency_unavailable" + ] + }, + "retention": { + "additionalProperties": false, + "properties": { + "in_process_result_cache_seconds": { + "maximum": 86400, + "minimum": 1, + "type": "integer" + }, + "payment_metadata_retention_seconds": { + "maximum": 315360000, + "minimum": 86400, + "type": "integer" + }, + "raw_documents_persisted": { + "const": false + }, + "sales_accounting": { + "const": "Content-free pseudonymous invoice sales are accounted for separately from receipt sales." + } + }, + "required": [ + "raw_documents_persisted", + "in_process_result_cache_seconds", + "payment_metadata_retention_seconds", + "sales_accounting" + ], + "type": "object" + }, + "service_id": { + "const": "ardaro.invoice_matching" + }, + "settlement_proven": { + "const": false + }, + "status_version": { + "const": "ardaro.invoice-matching.service-status.v1" + } + }, + "required": [ + "status_version", + "service_id", + "ready", + "reason", + "price", + "limits", + "retention", + "policy", + "settlement_proven", + "endpoints" + ], + "type": "object" + }, + "service": { + "const": "invoice" + } + }, + "required": [ + "service", + "details" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "details": { + "additionalProperties": false, + "properties": { + "financial_posting_performed": { + "const": false + }, + "human_review_required": { + "const": true + }, + "input": { + "type": "string" + }, + "price": { + "const": "free" + }, + "ready": { + "const": true + }, + "retention": { + "type": "string" + } + }, + "required": [ + "ready", + "price", + "input", + "retention", + "human_review_required", + "financial_posting_performed" + ], + "type": "object" + }, + "service": { + "const": "reconciliation" + } + }, + "required": [ + "service", + "details" + ], + "type": "object" + } +]
- Added
match_invoice - Added
reconcile_purchase_documents
4 tool updates
- Changed
get_document_example3 fields changed- changed
Input schema / properties / service / descriptionPrevious value: -"receipt: extraction checks; invoice: paid invoice-to-PO quantity allocation; reconciliation: free three-document discrepancy checks without allocation. Choose one service; examples do not process caller documents."New value: +"receipt: extraction checks. Examples do not process caller documents." - changed
Input schema / properties / service / enumPrevious value: -[ - "receipt", - "invoice", - "reconciliation" -]New value: +[ + "receipt" +] - changed
Output schema / oneOfPrevious value: -[ - { - "additionalProperties": false, - "properties": { - "details": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "additionalProperties": false, - "properties": { - "example_version": { - "const": "ardaro.receipt-intelligence.example.v1" - }, - "expected_response": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "additionalProperties": false, - "description": "Receipt Intelligence v1 response. result is authoritative; receipt is a derived compatibility projection that MUST match result.", - "properties": { - "arithmetic_consistency": { - "enum": [ - "verified", - "mismatch", - "unavailable" - ] - }, - "arithmetic_verified": { - "type": [ - "boolean", - "null" - ] - }, - "confidence": { - "type": "object" - }, - "contract_version": { - "const": "ardaro.agent-receipt-intelligence.response.v1" - }, - "duplicate_check": { - "type": "object" - }, - "duplicate_fingerprint": { - "pattern": "^[0-9a-f]{64}$", - "type": [ - "string", - "null" - ] - }, - "engine": { - "type": "object" - }, - "identities": { - "additionalProperties": false, - "properties": { - "analysis_result_identity": { - "pattern": "^res_[0-9a-f]{64}$", - "type": "string" - }, - "document_fingerprint": { - "pattern": "^[0-9a-f]{64}$", - "type": [ - "string", - "null" - ] - }, - "request_identity": { - "pattern": "^req_[0-9a-f]{64}$", - "type": "string" - } - }, - "required": [ - "request_identity", - "document_fingerprint", - "analysis_result_identity" - ], - "type": "object" - }, - "metering": { - "type": "object" - }, - "payment_identity": { - "additionalProperties": false, - "properties": { - "protocol": { - "const": "x402-v2" - }, - "reference": { - "pattern": "^pay_[0-9a-f]{64}$", - "type": "string" - }, - "replayed": { - "type": "boolean" - } - }, - "required": [ - "protocol", - "reference", - "replayed" - ], - "type": "object" - }, - "policy": { - "type": "object" - }, - "receipt": { - "additionalProperties": false, - "description": "Non-authoritative compatibility projection generated from result under ardaro.result-receipt-projection.v1. Consumers MUST use result for structured receipt values and reject a response when this projection diverges.", - "properties": { - "line_items": { - "items": { - "additionalProperties": false, - "properties": { - "amount": { - "oneOf": [ - { - "type": "null" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "additionalProperties": false, - "properties": { - "level": { - "enum": [ - "high", - "medium", - "low" - ] - }, - "score": { - "maximum": 1, - "minimum": 0, - "type": "number" - } - }, - "required": [ - "score", - "level" - ], - "type": "object" - }, - "source": { - "enum": [ - "structured_summary", - "structured_line_item", - "provider_neutral", - "text_fallback", - "inferred" - ] - }, - "value": { - "maxLength": 80, - "minLength": 1, - "type": "string" - } - }, - "required": [ - "value", - "confidence", - "source" - ], - "type": "object" - } - ] - }, - "description": { - "oneOf": [ - { - "type": "null" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "additionalProperties": false, - "properties": { - "level": { - "enum": [ - "high", - "medium", - "low" - ] - }, - "score": { - "maximum": 1, - "minimum": 0, - "type": "number" - } - }, - "required": [ - "score", - "level" - ], - "type": "object" - }, - "source": { - "enum": [ - "structured_summary", - "structured_line_item", - "provider_neutral", - "text_fallback", - "inferred" - ] - }, - "value": { - "maxLength": 240, - "minLength": 1, - "type": "string" - } - }, - "required": [ - "value", - "confidence", - "source" - ], - "type": "object" - } - ] - }, - "product_code": { - "oneOf": [ - { - "type": "null" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "additionalProperties": false, - "properties": { - "level": { - "enum": [ - "high", - "medium", - "low" - ] - }, - "score": { - "maximum": 1, - "minimum": 0, - "type": "number" - } - }, - "required": [ - "score", - "level" - ], - "type": "object" - }, - "source": { - "enum": [ - "structured_summary", - "structured_line_item", - "provider_neutral", - "text_fallback", - "inferred" - ] - }, - "value": { - "maxLength": 80, - "minLength": 1, - "type": "string" - } - }, - "required": [ - "value", - "confidence", - "source" - ], - "type": "object" - } - ] - }, - "quantity": { - "oneOf": [ - { - "type": "null" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "additionalProperties": false, - "properties": { - "level": { - "enum": [ - "high", - "medium", - "low" - ] - }, - "score": { - "maximum": 1, - "minimum": 0, - "type": "number" - } - }, - "required": [ - "score", - "level" - ], - "type": "object" - }, - "source": { - "enum": [ - "structured_summary", - "structured_line_item", - "provider_neutral", - "text_fallback", - "inferred" - ] - }, - "value": { - "maxLength": 80, - "minLength": 1, - "type": "string" - } - }, - "required": [ - "value", - "confidence", - "source" - ], - "type": "object" - } - ] - }, - "unit_price": { - "oneOf": [ - { - "type": "null" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "additionalProperties": false, - "properties": { - "level": { - "enum": [ - "high", - "medium", - "low" - ] - }, - "score": { - "maximum": 1, - "minimum": 0, - "type": "number" - } - }, - "required": [ - "score", - "level" - ], - "type": "object" - }, - "source": { - "enum": [ - "structured_summary", - "structured_line_item", - "provider_neutral", - "text_fallback", - "inferred" - ] - }, - "value": { - "maxLength": 80, - "minLength": 1, - "type": "string" - } - }, - "required": [ - "value", - "confidence", - "source" - ], - "type": "object" - } - ] - } - }, - "required": [ - "description", - "product_code", - "quantity", - "unit_price", - "amount" - ], - "type": "object" - }, - "maxItems": 100, - "type": "array" - }, - "purchase_date": { - "oneOf": [ - { - "type": "null" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "additionalProperties": false, - "properties": { - "level": { - "enum": [ - "high", - "medium", - "low" - ] - }, - "score": { - "maximum": 1, - "minimum": 0, - "type": "number" - } - }, - "required": [ - "score", - "level" - ], - "type": "object" - }, - "source": { - "enum": [ - "structured_summary", - "structured_line_item", - "provider_neutral", - "text_fallback", - "inferred" - ] - }, - "value": { - "maxLength": 10, - "minLength": 1, - "type": "string" - } - }, - "required": [ - "value", - "confidence", - "source" - ], - "type": "object" - } - ] - }, - "purchase_order": { - "additionalProperties": false, - "properties": { - "confidence": { - "additionalProperties": false, - "properties": { - "level": { - "enum": [ - "high", - "medium", - "low" - ] - }, - "score": { - "maximum": 1, - "minimum": 0, - "type": "number" - } - }, - "required": [ - "score", - "level" - ], - "type": "object" - }, - "source": { - "enum": [ - "structured_summary", - "structured_line_item", - "provider_neutral", - "text_fallback", - "inferred" - ] - }, - "value": { - "maxLength": 160, - "minLength": 1, - "type": "string" - } - }, - "required": [ - "value", - "confidence", - "source" - ], - "type": "object" - }, - "receipt_reference": { - "additionalProperties": false, - "properties": { - "confidence": { - "additionalProperties": false, - "properties": { - "level": { - "enum": [ - "high", - "medium", - "low" - ] - }, - "score": { - "maximum": 1, - "minimum": 0, - "type": "number" - } - }, - "required": [ - "score", - "level" - ], - "type": "object" - }, - "source": { - "enum": [ - "structured_summary", - "structured_line_item", - "provider_neutral", - "text_fallback", - "inferred" - ] - }, - "value": { - "maxLength": 160, - "minLength": 1, - "type": "string" - } - }, - "required": [ - "value", - "confidence", - "source" - ], - "type": "object" - }, - "totals": { - "additionalProperties": false, - "properties": { - "currency": { - "oneOf": [ - { - "type": "null" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "additionalProperties": false, - "properties": { - "level": { - "enum": [ - "high", - "medium", - "low" - ] - }, - "score": { - "maximum": 1, - "minimum": 0, - "type": "number" - } - }, - "required": [ - "score", - "level" - ], - "type": "object" - }, - "source": { - "enum": [ - "structured_summary", - "structured_line_item", - "provider_neutral", - "text_fallback", - "inferred" - ] - }, - "value": { - "maxLength": 3, - "minLength": 1, - "type": "string" - } - }, - "required": [ - "value", - "confidence", - "source" - ], - "type": "object" - } - ] - }, - "subtotal": { - "oneOf": [ - { - "type": "null" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "additionalProperties": false, - "properties": { - "level": { - "enum": [ - "high", - "medium", - "low" - ] - }, - "score": { - "maximum": 1, - "minimum": 0, - "type": "number" - } - }, - "required": [ - "score", - "level" - ], - "type": "object" - }, - "source": { - "enum": [ - "structured_summary", - "structured_line_item", - "provider_neutral", - "text_fallback", - "inferred" - ] - }, - "value": { - "maxLength": 32, - "minLength": 1, - "type": "string" - } - }, - "required": [ - "value", - "confidence", - "source" - ], - "type": "object" - } - ] - }, - "tax": { - "oneOf": [ - { - "type": "null" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "additionalProperties": false, - "properties": { - "level": { - "enum": [ - "high", - "medium", - "low" - ] - }, - "score": { - "maximum": 1, - "minimum": 0, - "type": "number" - } - }, - "required": [ - "score", - "level" - ], - "type": "object" - }, - "source": { - "enum": [ - "structured_summary", - "structured_line_item", - "provider_neutral", - "text_fallback", - "inferred" - ] - }, - "value": { - "maxLength": 32, - "minLength": 1, - "type": "string" - } - }, - "required": [ - "value", - "confidence", - "source" - ], - "type": "object" - } - ] - }, - "total": { - "oneOf": [ - { - "type": "null" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "additionalProperties": false, - "properties": { - "level": { - "enum": [ - "high", - "medium", - "low" - ] - }, - "score": { - "maximum": 1, - "minimum": 0, - "type": "number" - } - }, - "required": [ - "score", - "level" - ], - "type": "object" - }, - "source": { - "enum": [ - "structured_summary", - "structured_line_item", - "provider_neutral", - "text_fallback", - "inferred" - ] - }, - "value": { - "maxLength": 32, - "minLength": 1, - "type": "string" - } - }, - "required": [ - "value", - "confidence", - "source" - ], - "type": "object" - } - ] - } - }, - "required": [ - "subtotal", - "tax", - "total", - "currency" - ], - "type": "object" - }, - "vendor": { - "oneOf": [ - { - "type": "null" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "additionalProperties": false, - "properties": { - "level": { - "enum": [ - "high", - "medium", - "low" - ] - }, - "score": { - "maximum": 1, - "minimum": 0, - "type": "number" - } - }, - "required": [ - "score", - "level" - ], - "type": "object" - }, - "source": { - "enum": [ - "structured_summary", - "structured_line_item", - "provider_neutral", - "text_fallback", - "inferred" - ] - }, - "value": { - "maxLength": 160, - "minLength": 1, - "type": "string" - } - }, - "required": [ - "value", - "confidence", - "source" - ], - "type": "object" - } - ] - } - }, - "required": [ - "vendor", - "purchase_date", - "totals", - "line_items" - ], - "type": "object" - }, - "result": { - "additionalProperties": false, - "description": "Sole authoritative structured analysis object. Its recursively key-sorted, compact UTF-8 JSON bytes are SHA-256 hashed under ardaro.recursive-key-sort-compact-json-utf8-sha256.v1 and published as analysis_result_identity.", - "properties": { - "extracted_facts": { - "additionalProperties": false, - "properties": { - "line_items": { - "items": { - "additionalProperties": false, - "properties": { - "amount": { - "oneOf": [ - { - "type": "null" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "additionalProperties": false, - "properties": { - "level": { - "enum": [ - "high", - "medium", - "low" - ] - }, - "score": { - "maximum": 1, - "minimum": 0, - "type": "number" - } - }, - "required": [ - "score", - "level" - ], - "type": "object" - }, - "source": { - "enum": [ - "structured_summary", - "structured_line_item", - "provider_neutral", - "text_fallback", - "inferred" - ] - }, - "value": { - "maxLength": 80, - "minLength": 1, - "type": "string" - } - }, - "required": [ - "value", - "confidence", - "source" - ], - "type": "object" - } - ] - }, - "description": { - "oneOf": [ - { - "type": "null" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "additionalProperties": false, - "properties": { - "level": { - "enum": [ - "high", - "medium", - "low" - ] - }, - "score": { - "maximum": 1, - "minimum": 0, - "type": "number" - } - }, - "required": [ - "score", - "level" - ], - "type": "object" - }, - "source": { - "enum": [ - "structured_summary", - "structured_line_item", - "provider_neutral", - "text_fallback", - "inferred" - ] - }, - "value": { - "maxLength": 240, - "minLength": 1, - "type": "string" - } - }, - "required": [ - "value", - "confidence", - "source" - ], - "type": "object" - } - ] - }, - "product_code": { - "oneOf": [ - { - "type": "null" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "additionalProperties": false, - "properties": { - "level": { - "enum": [ - "high", - "medium", - "low" - ] - }, - "score": { - "maximum": 1, - "minimum": 0, - "type": "number" - } - }, - "required": [ - "score", - "level" - ], - "type": "object" - }, - "source": { - "enum": [ - "structured_summary", - "structured_line_item", - "provider_neutral", - "text_fallback", - "inferred" - ] - }, - "value": { - "maxLength": 80, - "minLength": 1, - "type": "string" - } - }, - "required": [ - "value", - "confidence", - "source" - ], - "type": "object" - } - ] - }, - "quantity": { - "oneOf": [ - { - "type": "null" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "additionalProperties": false, - "properties": { - "level": { - "enum": [ - "high", - "medium", - "low" - ] - }, - "score": { - "maximum": 1, - "minimum": 0, - "type": "number" - } - }, - "required": [ - "score", - "level" - ], - "type": "object" - }, - "source": { - "enum": [ - "structured_summary", - "structured_line_item", - "provider_neutral", - "text_fallback", - "inferred" - ] - }, - "value": { - "maxLength": 80, - "minLength": 1, - "type": "string" - } - }, - "required": [ - "value", - "confidence", - "source" - ], - "type": "object" - } - ] - }, - "unit_price": { - "oneOf": [ - { - "type": "null" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "additionalProperties": false, - "properties": { - "level": { - "enum": [ - "high", - "medium", - "low" - ] - }, - "score": { - "maximum": 1, - "minimum": 0, - "type": "number" - } - }, - "required": [ - "score", - "level" - ], - "type": "object" - }, - "source": { - "enum": [ - "structured_summary", - "structured_line_item", - "provider_neutral", - "text_fallback", - "inferred" - ] - }, - "value": { - "maxLength": 80, - "minLength": 1, - "type": "string" - } - }, - "required": [ - "value", - "confidence", - "source" - ], - "type": "object" - } - ] - } - }, - "required": [ - "description", - "product_code", - "quantity", - "unit_price", - "amount" - ], - "type": "object" - }, - "maxItems": 100, - "type": "array" - }, - "purchase_date": { - "additionalProperties": false, - "properties": { - "confidence": { - "additionalProperties": false, - "properties": { - "level": { - "enum": [ - "high", - "medium", - "low" - ] - }, - "score": { - "maximum": 1, - "minimum": 0, - "type": "number" - } - }, - "required": [ - "score", - "level" - ], - "type": "object" - }, - "source": { - "enum": [ - "structured_summary", - "structured_line_item", - "provider_neutral", - "text_fallback", - "inferred" - ] - }, - "value": { - "maxLength": 10, - "minLength": 1, - "type": "string" - } - }, - "required": [ - "value", - "confidence", - "source" - ], - "type": "object" - }, - "purchase_order": { - "additionalProperties": false, - "properties": { - "confidence": { - "additionalProperties": false, - "properties": { - "level": { - "enum": [ - "high", - "medium", - "low" - ] - }, - "score": { - "maximum": 1, - "minimum": 0, - "type": "number" - } - }, - "required": [ - "score", - "level" - ], - "type": "object" - }, - "source": { - "enum": [ - "structured_summary", - "structured_line_item", - "provider_neutral", - "text_fallback", - "inferred" - ] - }, - "value": { - "maxLength": 160, - "minLength": 1, - "type": "string" - } - }, - "required": [ - "value", - "confidence", - "source" - ], - "type": "object" - }, - "receipt_reference": { - "additionalProperties": false, - "properties": { - "confidence": { - "additionalProperties": false, - "properties": { - "level": { - "enum": [ - "high", - "medium", - "low" - ] - }, - "score": { - "maximum": 1, - "minimum": 0, - "type": "number" - } - }, - "required": [ - "score", - "level" - ], - "type": "object" - }, - "source": { - "enum": [ - "structured_summary", - "structured_line_item", - "provider_neutral", - "text_fallback", - "inferred" - ] - }, - "value": { - "maxLength": 160, - "minLength": 1, - "type": "string" - } - }, - "required": [ - "value", - "confidence", - "source" - ], - "type": "object" - }, - "totals.currency": { - "additionalProperties": false, - "properties": { - "confidence": { - "additionalProperties": false, - "properties": { - "level": { - "enum": [ - "high", - "medium", - "low" - ] - }, - "score": { - "maximum": 1, - "minimum": 0, - "type": "number" - } - }, - "required": [ - "score", - "level" - ], - "type": "object" - }, - "source": { - "enum": [ - "structured_summary", - "structured_line_item", - "provider_neutral", - "text_fallback", - "inferred" - ] - }, - "value": { - "maxLength": 3, - "minLength": 1, - "type": "string" - } - }, - "required": [ - "value", - "confidence", - "source" - ], - "type": "object" - }, - "totals.subtotal": { - "additionalProperties": false, - "properties": { - "confidence": { - "additionalProperties": false, - "properties": { - "level": { - "enum": [ - "high", - "medium", - "low" - ] - }, - "score": { - "maximum": 1, - "minimum": 0, - "type": "number" - } - }, - "required": [ - "score", - "level" - ], - "type": "object" - }, - "source": { - "enum": [ - "structured_summary", - "structured_line_item", - "provider_neutral", - "text_fallback", - "inferred" - ] - }, - "value": { - "maxLength": 32, - "minLength": 1, - "type": "string" - } - }, - "required": [ - "value", - "confidence", - "source" - ], - "type": "object" - }, - "totals.tax": { - "additionalProperties": false, - "properties": { - "confidence": { - "additionalProperties": false, - "properties": { - "level": { - "enum": [ - "high", - "medium", - "low" - ] - }, - "score": { - "maximum": 1, - "minimum": 0, - "type": "number" - } - }, - "required": [ - "score", - "level" - ], - "type": "object" - }, - "source": { - "enum": [ - "structured_summary", - "structured_line_item", - "provider_neutral", - "text_fallback", - "inferred" - ] - }, - "value": { - "maxLength": 32, - "minLength": 1, - "type": "string" - } - }, - "required": [ - "value", - "confidence", - "source" - ], - "type": "object" - }, - "totals.total": { - "additionalProperties": false, - "properties": { - "confidence": { - "additionalProperties": false, - "properties": { - "level": { - "enum": [ - "high", - "medium", - "low" - ] - }, - "score": { - "maximum": 1, - "minimum": 0, - "type": "number" - } - }, - "required": [ - "score", - "level" - ], - "type": "object" - }, - "source": { - "enum": [ - "structured_summary", - "structured_line_item", - "provider_neutral", - "text_fallback", - "inferred" - ] - }, - "value": { - "maxLength": 32, - "minLength": 1, - "type": "string" - } - }, - "required": [ - "value", - "confidence", - "source" - ], - "type": "object" - }, - "vendor": { - "additionalProperties": false, - "properties": { - "confidence": { - "additionalProperties": false, - "properties": { - "level": { - "enum": [ - "high", - "medium", - "low" - ] - }, - "score": { - "maximum": 1, - "minimum": 0, - "type": "number" - } - }, - "required": [ - "score", - "level" - ], - "type": "object" - }, - "source": { - "enum": [ - "structured_summary", - "structured_line_item", - "provider_neutral", - "text_fallback", - "inferred" - ] - }, - "value": { - "maxLength": 160, - "minLength": 1, - "type": "string" - } - }, - "required": [ - "value", - "confidence", - "source" - ], - "type": "object" - } - }, - "required": [ - "line_items" - ], - "type": "object" - }, - "inferred_suggestions": { - "items": { - "additionalProperties": false, - "properties": { - "field": { - "enum": [ - "vendor", - "purchase_date", - "purchase_order", - "receipt_reference", - "totals.subtotal", - "totals.tax", - "totals.total", - "totals.currency" - ] - }, - "value": { - "additionalProperties": false, - "properties": { - "confidence": { - "additionalProperties": false, - "properties": { - "level": { - "enum": [ - "high", - "medium", - "low" - ] - }, - "score": { - "maximum": 1, - "minimum": 0, - "type": "number" - } - }, - "required": [ - "score", - "level" - ], - "type": "object" - }, - "source": { - "enum": [ - "structured_summary", - "structured_line_item", - "provider_neutral", - "text_fallback", - "inferred" - ] - }, - "value": { - "maxLength": 240, - "minLength": 1, - "type": "string" - } - }, - "required": [ - "value", - "confidence", - "source" - ], - "type": "object" - } - }, - "required": [ - "field", - "value" - ], - "type": "object" - }, - "maxItems": 8, - "type": "array" - }, - "provenance": { - "type": "object" - }, - "unavailable_fields": { - "items": { - "enum": [ - "purchase order reference", - "purchase_date", - "receipt or invoice number", - "totals.currency", - "totals.subtotal", - "totals.tax", - "totals.total", - "vendor" - ] - }, - "type": "array", - "uniqueItems": true - }, - "validation": { - "type": "object" - } - }, - "required": [ - "extracted_facts", - "inferred_suggestions", - "unavailable_fields", - "validation", - "provenance" - ], - "type": "object" - }, - "service": { - "const": "ardaro.receipt_intelligence" - }, - "status": { - "const": "review_required" - }, - "version": { - "const": "1.0.0" - }, - "warning_groups": { - "type": "object" - }, - "warnings": { - "items": { - "type": "object" - }, - "maxItems": 64, - "type": "array" - } - }, - "required": [ - "contract_version", - "service", - "version", - "status", - "engine", - "receipt", - "confidence", - "duplicate_check", - "duplicate_fingerprint", - "arithmetic_verified", - "arithmetic_consistency", - "warnings", - "warning_groups", - "identities", - "result", - "metering", - "policy" - ], - "type": "object", - "x-ardaro-analysis-result-identity-profile": "ardaro.recursive-key-sort-compact-json-utf8-sha256.v1", - "x-ardaro-authoritative-analysis-path": "$.result", - "x-ardaro-receipt-compatibility-path": "$.receipt", - "x-ardaro-receipt-projection-profile": "ardaro.result-receipt-projection.v1" - }, - "input_description": { - "type": "string" - }, - "limits": { - "additionalProperties": false, - "properties": { - "max_existing_fingerprints": { - "minimum": 1, - "type": "integer" - }, - "max_line_items": { - "minimum": 1, - "type": "integer" - }, - "max_pages": { - "minimum": 1, - "type": "integer" - }, - "max_request_bytes": { - "minimum": 1, - "type": "integer" - }, - "max_text_characters": { - "minimum": 1, - "type": "integer" - }, - "normal_latency_target_ms": { - "minimum": 1, - "type": "integer" - }, - "request_timeout_ms": { - "minimum": 1, - "type": "integer" - } - }, - "required": [ - "max_existing_fingerprints", - "max_line_items", - "max_pages", - "max_request_bytes", - "max_text_characters", - "normal_latency_target_ms", - "request_timeout_ms" - ], - "type": "object" - }, - "paid_processing_performed": { - "const": false - }, - "request": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "additionalProperties": false, - "properties": { - "contract_version": { - "const": "ardaro.agent-receipt-intelligence.request.v1", - "description": "Required request contract identifier; send this exact version string." - }, - "existing_fingerprints": { - "description": "Receipt fingerprints already known to the caller for duplicate comparison. Supply lowercase 64-character SHA-256 hex strings, or an empty array when none are available; at most 10,000 entries.", - "items": { - "pattern": "^[0-9a-f]{64}$", - "type": "string" - }, - "maxItems": 10000, - "type": "array" - }, - "input": { - "description": "One receipt supplied as bounded OCR text or a provider-neutral structured extraction. Choose exactly one input kind.", - "oneOf": [ - { - "additionalProperties": false, - "properties": { - "kind": { - "const": "text", - "description": "Selects receipt text input; supply the text property." - }, - "text": { - "description": "OCR or receipt text for one document, up to 20,000 characters. Exclude payment-card data, credentials, customer-record payloads, and financial posting instructions.", - "maxLength": 20000, - "minLength": 1, - "type": "string" - } - }, - "required": [ - "kind", - "text" - ], - "type": "object" - }, - { - "additionalProperties": false, - "properties": { - "analysis": { - "additionalProperties": false, - "description": "Provider-neutral receipt extraction using only the listed fields. Omit fields that were not extracted.", - "minProperties": 1, - "properties": { - "currency": { - "description": "Three-letter currency code shown on the receipt, for example USD. Supply the extracted value directly or wrap it with optional extraction confidence.", - "oneOf": [ - { - "maxLength": 3, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", - "maximum": 100, - "minimum": 0, - "type": "number" - }, - "value": { - "description": "The extracted field value, supplied as text or a number before receipt normalization.", - "oneOf": [ - { - "maxLength": 3, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - } - ] - } - }, - "required": [ - "value" - ], - "type": "object" - } - ] - }, - "line_items": { - "description": "Extracted receipt line items, limited to 100 entries; omit unavailable item fields.", - "items": { - "additionalProperties": false, - "minProperties": 1, - "properties": { - "amount": { - "description": "Extended amount printed for this line item, in the receipt currency. Supply the extracted value directly or wrap it with optional extraction confidence.", - "oneOf": [ - { - "maxLength": 80, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", - "maximum": 100, - "minimum": 0, - "type": "number" - }, - "value": { - "description": "The extracted field value, supplied as text or a number before receipt normalization.", - "oneOf": [ - { - "maxLength": 80, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - } - ] - } - }, - "required": [ - "value" - ], - "type": "object" - } - ] - }, - "description": { - "description": "Item description printed on the receipt. Supply the extracted value directly or wrap it with optional extraction confidence.", - "oneOf": [ - { - "maxLength": 240, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", - "maximum": 100, - "minimum": 0, - "type": "number" - }, - "value": { - "description": "The extracted field value, supplied as text or a number before receipt normalization.", - "oneOf": [ - { - "maxLength": 240, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - } - ] - } - }, - "required": [ - "value" - ], - "type": "object" - } - ] - }, - "product_code": { - "description": "Product identifier or SKU printed for this line item. Supply the extracted value directly or wrap it with optional extraction confidence.", - "oneOf": [ - { - "maxLength": 80, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", - "maximum": 100, - "minimum": 0, - "type": "number" - }, - "value": { - "description": "The extracted field value, supplied as text or a number before receipt normalization.", - "oneOf": [ - { - "maxLength": 80, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - } - ] - } - }, - "required": [ - "value" - ], - "type": "object" - } - ] - }, - "quantity": { - "description": "Quantity purchased for this line item. Supply the extracted value directly or wrap it with optional extraction confidence.", - "oneOf": [ - { - "maxLength": 80, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", - "maximum": 100, - "minimum": 0, - "type": "number" - }, - "value": { - "description": "The extracted field value, supplied as text or a number before receipt normalization.", - "oneOf": [ - { - "maxLength": 80, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - } - ] - } - }, - "required": [ - "value" - ], - "type": "object" - } - ] - }, - "unit_price": { - "description": "Price per unit for this line item, in the receipt currency. Supply the extracted value directly or wrap it with optional extraction confidence.", - "oneOf": [ - { - "maxLength": 80, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", - "maximum": 100, - "minimum": 0, - "type": "number" - }, - "value": { - "description": "The extracted field value, supplied as text or a number before receipt normalization.", - "oneOf": [ - { - "maxLength": 80, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - } - ] - } - }, - "required": [ - "value" - ], - "type": "object" - } - ] - } - }, - "type": "object" - }, - "maxItems": 100, - "type": "array" - }, - "purchase_date": { - "description": "Purchase date as extracted; YYYY-MM-DD is recommended. Supply the extracted value directly or wrap it with optional extraction confidence.", - "oneOf": [ - { - "maxLength": 10, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", - "maximum": 100, - "minimum": 0, - "type": "number" - }, - "value": { - "description": "The extracted field value, supplied as text or a number before receipt normalization.", - "oneOf": [ - { - "maxLength": 10, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - } - ] - } - }, - "required": [ - "value" - ], - "type": "object" - } - ] - }, - "purchase_order": { - "description": "Purchase-order reference printed on the receipt; this does not select or link an Ardaro job. Supply the extracted value directly or wrap it with optional extraction confidence.", - "oneOf": [ - { - "maxLength": 160, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", - "maximum": 100, - "minimum": 0, - "type": "number" - }, - "value": { - "description": "The extracted field value, supplied as text or a number before receipt normalization.", - "oneOf": [ - { - "maxLength": 160, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - } - ] - } - }, - "required": [ - "value" - ], - "type": "object" - } - ] - }, - "receipt_reference": { - "description": "Receipt, invoice, or transaction reference printed on the document. Supply the extracted value directly or wrap it with optional extraction confidence.", - "oneOf": [ - { - "maxLength": 160, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", - "maximum": 100, - "minimum": 0, - "type": "number" - }, - "value": { - "description": "The extracted field value, supplied as text or a number before receipt normalization.", - "oneOf": [ - { - "maxLength": 160, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - } - ] - } - }, - "required": [ - "value" - ], - "type": "object" - } - ] - }, - "subtotal": { - "description": "Receipt subtotal before tax, in the receipt currency. Supply the extracted value directly or wrap it with optional extraction confidence.", - "oneOf": [ - { - "maxLength": 32, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", - "maximum": 100, - "minimum": 0, - "type": "number" - }, - "value": { - "description": "The extracted field value, supplied as text or a number before receipt normalization.", - "oneOf": [ - { - "maxLength": 32, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - } - ] - } - }, - "required": [ - "value" - ], - "type": "object" - } - ] - }, - "tax": { - "description": "Total tax amount printed on the receipt, in the receipt currency. Supply the extracted value directly or wrap it with optional extraction confidence.", - "oneOf": [ - { - "maxLength": 32, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", - "maximum": 100, - "minimum": 0, - "type": "number" - }, - "value": { - "description": "The extracted field value, supplied as text or a number before receipt normalization.", - "oneOf": [ - { - "maxLength": 32, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - } - ] - } - }, - "required": [ - "value" - ], - "type": "object" - } - ] - }, - "total": { - "description": "Final receipt total, in the receipt currency. Supply the extracted value directly or wrap it with optional extraction confidence.", - "oneOf": [ - { - "maxLength": 32, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", - "maximum": 100, - "minimum": 0, - "type": "number" - }, - "value": { - "description": "The extracted field value, supplied as text or a number before receipt normalization.", - "oneOf": [ - { - "maxLength": 32, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - } - ] - } - }, - "required": [ - "value" - ], - "type": "object" - } - ] - }, - "vendor": { - "description": "Merchant or supplier name printed on the receipt. Supply the extracted value directly or wrap it with optional extraction confidence.", - "oneOf": [ - { - "maxLength": 160, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", - "maximum": 100, - "minimum": 0, - "type": "number" - }, - "value": { - "description": "The extracted field value, supplied as text or a number before receipt normalization.", - "oneOf": [ - { - "maxLength": 160, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - } - ] - } - }, - "required": [ - "value" - ], - "type": "object" - } - ] - } - }, - "type": "object" - }, - "kind": { - "const": "structured", - "description": "Selects structured receipt input; supply the analysis property." - } - }, - "required": [ - "kind", - "analysis" - ], - "type": "object" - } - ] - } - }, - "required": [ - "contract_version", - "input", - "existing_fingerprints" - ], - "type": "object" - }, - "synthetic_only": { - "const": true - } - }, - "required": [ - "example_version", - "synthetic_only", - "paid_processing_performed", - "input_description", - "request", - "expected_response", - "limits" - ], - "type": "object" - }, - "service": { - "const": "receipt" - } - }, - "required": [ - "service", - "details" - ], - "type": "object" - }, - { - "additionalProperties": false, - "properties": { - "details": { - "additionalProperties": false, - "properties": { - "example_version": { - "const": "ardaro.invoice-matching.example.v1" - }, - "policy": { - "additionalProperties": false, - "properties": { - "financial_posting_supported": { - "const": false - }, - "human_review_required": { - "const": true - }, - "payment_required": { - "const": false - } - }, - "required": [ - "human_review_required", - "financial_posting_supported", - "payment_required" - ], - "type": "object" - }, - "request": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "additionalProperties": false, - "description": "One invoice and one purchase order with caller-supplied opaque supplier identifiers. Runtime validation additionally rejects duplicate line IDs, padded/control-bearing strings, sensitive card or credential data, and requests over 262144 UTF-8 JSON bytes. All numeric inputs are decimal strings; missing optional arithmetic evidence requires review.", - "properties": { - "contract_version": { - "const": "ardaro.agent-invoice-matching.request.v1" - }, - "invoice": { - "oneOf": [ - { - "additionalProperties": false, - "properties": { - "currency": { - "enum": [ - "JPY" - ], - "type": "string" - }, - "line_items": { - "items": { - "additionalProperties": false, - "properties": { - "amount": { - "maxLength": 26, - "pattern": "^(?:0|[1-9][0-9]{0,25})$", - "type": "string" - }, - "description": { - "maxLength": 240, - "minLength": 1, - "type": "string" - }, - "line_id": { - "maxLength": 80, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", - "type": "string" - }, - "po_line_id": { - "maxLength": 80, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", - "type": "string" - }, - "product_code": { - "maxLength": 80, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", - "type": "string" - }, - "quantity": { - "allOf": [ - { - "not": { - "pattern": "^0(?:\\.0+)?$" - } - } - ], - "maxLength": 19, - "not": { - "pattern": "\\n" - }, - "pattern": "^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?$", - "type": "string" - }, - "unit": { - "maxLength": 32, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", - "type": "string" - }, - "unit_price": { - "maxLength": 19, - "not": { - "pattern": "\\n" - }, - "pattern": "^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?$", - "type": "string" - } - }, - "required": [ - "description", - "line_id", - "quantity", - "unit", - "unit_price" - ], - "type": "object" - }, - "maxItems": 100, - "minItems": 1, - "type": "array" - }, - "purchase_order_reference": { - "maxLength": 80, - "minLength": 1, - "type": "string" - }, - "reference": { - "maxLength": 80, - "minLength": 1, - "type": "string" - }, - "subtotal": { - "maxLength": 26, - "pattern": "^(?:0|[1-9][0-9]{0,25})$", - "type": "string" - }, - "supplier_id": { - "maxLength": 80, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", - "type": "string" - }, - "tax": { - "maxLength": 26, - "pattern": "^(?:0|[1-9][0-9]{0,25})$", - "type": "string" - }, - "total": { - "maxLength": 26, - "pattern": "^(?:0|[1-9][0-9]{0,25})$", - "type": "string" - } - }, - "required": [ - "currency", - "line_items", - "purchase_order_reference", - "reference", - "supplier_id" - ], - "type": "object" - }, - { - "additionalProperties": false, - "properties": { - "currency": { - "enum": [ - "USD", - "EUR", - "GBP", - "CAD", - "AUD", - "MXN" - ], - "type": "string" - }, - "line_items": { - "items": { - "additionalProperties": false, - "properties": { - "amount": { - "maxLength": 29, - "pattern": "^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,2})?$", - "type": "string" - }, - "description": { - "maxLength": 240, - "minLength": 1, - "type": "string" - }, - "line_id": { - "maxLength": 80, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", - "type": "string" - }, - "po_line_id": { - "maxLength": 80, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", - "type": "string" - }, - "product_code": { - "maxLength": 80, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", - "type": "string" - }, - "quantity": { - "allOf": [ - { - "not": { - "pattern": "^0(?:\\.0+)?$" - } - } - ], - "maxLength": 19, - "not": { - "pattern": "\\n" - }, - "pattern": "^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?$", - "type": "string" - }, - "unit": { - "maxLength": 32, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", - "type": "string" - }, - "unit_price": { - "maxLength": 19, - "not": { - "pattern": "\\n" - }, - "pattern": "^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?$", - "type": "string" - } - }, - "required": [ - "description", - "line_id", - "quantity", - "unit", - "unit_price" - ], - "type": "object" - }, - "maxItems": 100, - "minItems": 1, - "type": "array" - }, - "purchase_order_reference": { - "maxLength": 80, - "minLength": 1, - "type": "string" - }, - "reference": { - "maxLength": 80, - "minLength": 1, - "type": "string" - }, - "subtotal": { - "maxLength": 29, - "pattern": "^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,2})?$", - "type": "string" - }, - "supplier_id": { - "maxLength": 80, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", - "type": "string" - }, - "tax": { - "maxLength": 29, - "pattern": "^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,2})?$", - "type": "string" - }, - "total": { - "maxLength": 29, - "pattern": "^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,2})?$", - "type": "string" - } - }, - "required": [ - "currency", - "line_items", - "purchase_order_reference", - "reference", - "supplier_id" - ], - "type": "object" - } - ] - }, - "purchase_order": { - "oneOf": [ - { - "additionalProperties": false, - "properties": { - "currency": { - "enum": [ - "JPY" - ], - "type": "string" - }, - "line_items": { - "items": { - "additionalProperties": false, - "properties": { - "amount": { - "maxLength": 26, - "pattern": "^(?:0|[1-9][0-9]{0,25})$", - "type": "string" - }, - "description": { - "maxLength": 240, - "minLength": 1, - "type": "string" - }, - "line_id": { - "maxLength": 80, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", - "type": "string" - }, - "product_code": { - "maxLength": 80, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", - "type": "string" - }, - "quantity": { - "allOf": [ - { - "not": { - "pattern": "^0(?:\\.0+)?$" - } - } - ], - "maxLength": 19, - "not": { - "pattern": "\\n" - }, - "pattern": "^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?$", - "type": "string" - }, - "unit": { - "maxLength": 32, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", - "type": "string" - }, - "unit_price": { - "maxLength": 19, - "not": { - "pattern": "\\n" - }, - "pattern": "^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?$", - "type": "string" - } - }, - "required": [ - "description", - "line_id", - "quantity", - "unit", - "unit_price" - ], - "type": "object" - }, - "maxItems": 100, - "minItems": 1, - "type": "array" - }, - "reference": { - "maxLength": 80, - "minLength": 1, - "type": "string" - }, - "supplier_id": { - "maxLength": 80, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", - "type": "string" - } - }, - "required": [ - "currency", - "line_items", - "reference", - "supplier_id" - ], - "type": "object" - }, - { - "additionalProperties": false, - "properties": { - "currency": { - "enum": [ - "USD", - "EUR", - "GBP", - "CAD", - "AUD", - "MXN" - ], - "type": "string" - }, - "line_items": { - "items": { - "additionalProperties": false, - "properties": { - "amount": { - "maxLength": 29, - "pattern": "^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,2})?$", - "type": "string" - }, - "description": { - "maxLength": 240, - "minLength": 1, - "type": "string" - }, - "line_id": { - "maxLength": 80, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", - "type": "string" - }, - "product_code": { - "maxLength": 80, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", - "type": "string" - }, - "quantity": { - "allOf": [ - { - "not": { - "pattern": "^0(?:\\.0+)?$" - } - } - ], - "maxLength": 19, - "not": { - "pattern": "\\n" - }, - "pattern": "^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?$", - "type": "string" - }, - "unit": { - "maxLength": 32, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", - "type": "string" - }, - "unit_price": { - "maxLength": 19, - "not": { - "pattern": "\\n" - }, - "pattern": "^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?$", - "type": "string" - } - }, - "required": [ - "description", - "line_id", - "quantity", - "unit", - "unit_price" - ], - "type": "object" - }, - "maxItems": 100, - "minItems": 1, - "type": "array" - }, - "reference": { - "maxLength": 80, - "minLength": 1, - "type": "string" - }, - "supplier_id": { - "maxLength": 80, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", - "type": "string" - } - }, - "required": [ - "currency", - "line_items", - "reference", - "supplier_id" - ], - "type": "object" - } - ] - } - }, - "required": [ - "contract_version", - "invoice", - "purchase_order" - ], - "type": "object" - }, - "response": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "additionalProperties": false, - "properties": { - "contract_version": { - "const": "ardaro.agent-invoice-matching.response.v1" - }, - "identities": { - "additionalProperties": false, - "properties": { - "analysis_result_identity": { - "pattern": "^res_[0-9a-f]{64}$", - "type": "string" - } - }, - "required": [ - "analysis_result_identity" - ], - "type": "object" - }, - "result": { - "additionalProperties": false, - "properties": { - "arithmetic": { - "additionalProperties": false, - "properties": { - "computed_invoice_total": { - "anyOf": [ - { - "maxLength": 42, - "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$", - "type": "string" - }, - { - "type": "null" - } - ] - }, - "invoice_currency_scale": { - "enum": [ - 0, - 2 - ] - }, - "invoice_line_amount_sum": { - "maxLength": 42, - "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$", - "type": "string" - }, - "invoice_subtotal": { - "anyOf": [ - { - "maxLength": 42, - "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$", - "type": "string" - }, - { - "type": "null" - } - ] - }, - "invoice_subtotal_status": { - "enum": [ - "consistent", - "mismatch", - "unavailable" - ] - }, - "invoice_supplied_line_amount_sum": { - "anyOf": [ - { - "maxLength": 42, - "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$", - "type": "string" - }, - { - "type": "null" - } - ] - }, - "invoice_tax": { - "anyOf": [ - { - "maxLength": 42, - "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$", - "type": "string" - }, - { - "type": "null" - } - ] - }, - "invoice_total": { - "anyOf": [ - { - "maxLength": 42, - "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$", - "type": "string" - }, - { - "type": "null" - } - ] - }, - "invoice_total_status": { - "enum": [ - "consistent", - "mismatch", - "unavailable" - ] - }, - "purchase_order_currency_scale": { - "enum": [ - 0, - 2 - ] - }, - "rounding_mode": { - "const": "ROUND_HALF_UP" - }, - "rounding_scope": { - "const": "each_line_then_sum" - } - }, - "required": [ - "rounding_mode", - "rounding_scope", - "invoice_currency_scale", - "purchase_order_currency_scale", - "invoice_line_amount_sum", - "invoice_supplied_line_amount_sum", - "invoice_subtotal", - "invoice_tax", - "invoice_total", - "computed_invoice_total", - "invoice_subtotal_status", - "invoice_total_status" - ], - "type": "object" - }, - "comparison_rows": { - "items": { - "additionalProperties": false, - "properties": { - "allocation_status": { - "enum": [ - "allocated", - "not_comparable", - "unmatched" - ] - }, - "computed_invoice_amount": { - "maxLength": 42, - "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$", - "type": "string" - }, - "discrepancy_codes": { - "items": { - "enum": [ - "currency_mismatch", - "supplier_mismatch", - "purchase_order_reference_mismatch", - "invoice_line_amount_unavailable", - "purchase_order_line_amount_unavailable", - "invoice_line_arithmetic_mismatch", - "purchase_order_line_arithmetic_mismatch", - "referenced_purchase_order_line_missing", - "ambiguous_product_code", - "unmatchable_invoice_line", - "unit_mismatch", - "product_code_mismatch", - "unit_price_mismatch", - "quantity_exceeds_purchase_order", - "invoice_subtotal_unavailable", - "invoice_tax_unavailable", - "invoice_total_unavailable", - "invoice_subtotal_mismatch", - "invoice_supplied_line_sum_mismatch", - "invoice_total_mismatch" - ], - "type": "string" - }, - "maxItems": 20, - "minItems": 0, - "type": "array", - "uniqueItems": true - }, - "invoice_amount": { - "anyOf": [ - { - "maxLength": 42, - "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$", - "type": "string" - }, - { - "type": "null" - } - ] - }, - "invoice_currency": { - "enum": [ - "USD", - "EUR", - "GBP", - "CAD", - "AUD", - "MXN", - "JPY" - ] - }, - "invoice_line_id": { - "maxLength": 80, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", - "type": "string" - }, - "invoice_quantity": { - "maxLength": 42, - "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$", - "type": "string" - }, - "invoice_source": { - "maxLength": 100, - "minLength": 1, - "pattern": "^/(?:invoice|purchase_order)(?:/[A-Za-z0-9_]+)*$", - "type": "string" - }, - "invoice_unit": { - "maxLength": 32, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", - "type": "string" - }, - "invoice_unit_price": { - "maxLength": 42, - "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$", - "type": "string" - }, - "line_arithmetic_status": { - "enum": [ - "consistent", - "mismatch", - "unavailable" - ] - }, - "match_method": { - "enum": [ - "unmatched", - "explicit_po_line_id", - "exact_product_code" - ] - }, - "outcome": { - "enum": [ - "no_discrepancies", - "review_required" - ] - }, - "purchase_order_currency": { - "enum": [ - "USD", - "EUR", - "GBP", - "CAD", - "AUD", - "MXN", - "JPY" - ] - }, - "purchase_order_line_id": { - "anyOf": [ - { - "maxLength": 80, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", - "type": "string" - }, - { - "type": "null" - } - ] - }, - "purchase_order_quantity": { - "anyOf": [ - { - "maxLength": 42, - "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$", - "type": "string" - }, - { - "type": "null" - } - ] - }, - "purchase_order_source": { - "anyOf": [ - { - "maxLength": 100, - "minLength": 1, - "pattern": "^/(?:invoice|purchase_order)(?:/[A-Za-z0-9_]+)*$", - "type": "string" - }, - { - "type": "null" - } - ] - }, - "purchase_order_unit": { - "anyOf": [ - { - "maxLength": 32, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", - "type": "string" - }, - { - "type": "null" - } - ] - }, - "purchase_order_unit_price": { - "anyOf": [ - { - "maxLength": 42, - "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$", - "type": "string" - }, - { - "type": "null" - } - ] - }, - "unit_price_difference": { - "anyOf": [ - { - "maxLength": 42, - "pattern": "^-?(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?$", - "type": "string" - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "invoice_line_id", - "invoice_source", - "purchase_order_line_id", - "purchase_order_source", - "match_method", - "allocation_status", - "invoice_quantity", - "purchase_order_quantity", - "invoice_unit", - "purchase_order_unit", - "invoice_unit_price", - "purchase_order_unit_price", - "invoice_currency", - "purchase_order_currency", - "unit_price_difference", - "invoice_amount", - "computed_invoice_amount", - "line_arithmetic_status", - "discrepancy_codes", - "outcome" - ], - "type": "object" - }, - "maxItems": 100, - "minItems": 1, - "type": "array" - }, - "discrepancies": { - "items": { - "additionalProperties": false, - "properties": { - "code": { - "enum": [ - "currency_mismatch", - "supplier_mismatch", - "purchase_order_reference_mismatch", - "invoice_line_amount_unavailable", - "purchase_order_line_amount_unavailable", - "invoice_line_arithmetic_mismatch", - "purchase_order_line_arithmetic_mismatch", - "referenced_purchase_order_line_missing", - "ambiguous_product_code", - "unmatchable_invoice_line", - "unit_mismatch", - "product_code_mismatch", - "unit_price_mismatch", - "quantity_exceeds_purchase_order", - "invoice_subtotal_unavailable", - "invoice_tax_unavailable", - "invoice_total_unavailable", - "invoice_subtotal_mismatch", - "invoice_supplied_line_sum_mismatch", - "invoice_total_mismatch" - ], - "type": "string" - }, - "message": { - "maxLength": 240, - "minLength": 1, - "type": "string" - }, - "severity": { - "enum": [ - "error", - "warning" - ] - }, - "sources": { - "items": { - "maxLength": 100, - "minLength": 1, - "pattern": "^/(?:invoice|purchase_order)(?:/[A-Za-z0-9_]+)*$", - "type": "string" - }, - "maxItems": 101, - "minItems": 1, - "type": "array" - } - }, - "required": [ - "code", - "severity", - "message", - "sources" - ], - "type": "object" - }, - "maxItems": 1000, - "minItems": 0, - "type": "array" - }, - "document_checks": { - "additionalProperties": false, - "properties": { - "currency_matches": { - "type": "boolean" - }, - "purchase_order_reference_matches": { - "type": "boolean" - }, - "supplier_matches": { - "type": "boolean" - } - }, - "required": [ - "currency_matches", - "supplier_matches", - "purchase_order_reference_matches" - ], - "type": "object" - }, - "policy": { - "additionalProperties": false, - "properties": { - "arithmetic_scope": { - "maxLength": 300, - "minLength": 1, - "type": "string" - }, - "decision_scope": { - "maxLength": 300, - "minLength": 1, - "type": "string" - }, - "delivery_verification_supported": { - "const": false - }, - "financial_posting_performed": { - "const": false - }, - "financial_posting_supported": { - "const": false - }, - "human_review_required": { - "const": true - }, - "identity_purpose": { - "const": "deterministic_result_comparison_only" - }, - "matching_rule": { - "const": "explicit_po_line_id_else_unique_case_sensitive_product_code" - }, - "model_calls": { - "const": 0 - }, - "payment_approval_supported": { - "const": false - }, - "quantity_scope": { - "maxLength": 300, - "minLength": 1, - "type": "string" - }, - "raw_documents_retained": { - "const": false - }, - "stateless": { - "const": true - }, - "supplier_scope": { - "maxLength": 300, - "minLength": 1, - "type": "string" - } - }, - "required": [ - "human_review_required", - "stateless", - "raw_documents_retained", - "financial_posting_supported", - "financial_posting_performed", - "payment_approval_supported", - "delivery_verification_supported", - "model_calls", - "identity_purpose", - "matching_rule", - "quantity_scope", - "arithmetic_scope", - "supplier_scope", - "decision_scope" - ], - "type": "object" - }, - "purchase_order_line_summary": { - "items": { - "additionalProperties": false, - "properties": { - "allocated_invoice_sources": { - "items": { - "maxLength": 100, - "minLength": 1, - "pattern": "^/(?:invoice|purchase_order)(?:/[A-Za-z0-9_]+)*$", - "type": "string" - }, - "maxItems": 100, - "minItems": 0, - "type": "array" - }, - "allocated_quantity": { - "anyOf": [ - { - "maxLength": 42, - "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$", - "type": "string" - }, - { - "type": "null" - } - ] - }, - "computed_amount": { - "maxLength": 42, - "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$", - "type": "string" - }, - "line_arithmetic_status": { - "enum": [ - "consistent", - "mismatch", - "unavailable" - ] - }, - "ordered_quantity": { - "maxLength": 42, - "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$", - "type": "string" - }, - "overbilled_quantity": { - "anyOf": [ - { - "maxLength": 42, - "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$", - "type": "string" - }, - { - "type": "null" - } - ] - }, - "purchase_order_line_id": { - "maxLength": 80, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", - "type": "string" - }, - "purchase_order_source": { - "maxLength": 100, - "minLength": 1, - "pattern": "^/(?:invoice|purchase_order)(?:/[A-Za-z0-9_]+)*$", - "type": "string" - }, - "status": { - "enum": [ - "not_comparable", - "not_invoiced", - "overbilled", - "fully_invoiced", - "partially_invoiced" - ] - }, - "supplied_amount": { - "anyOf": [ - { - "maxLength": 42, - "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$", - "type": "string" - }, - { - "type": "null" - } - ] - }, - "uninvoiced_quantity": { - "anyOf": [ - { - "maxLength": 42, - "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$", - "type": "string" - }, - { - "type": "null" - } - ] - }, - "unit": { - "maxLength": 32, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", - "type": "string" - } - }, - "required": [ - "purchase_order_line_id", - "purchase_order_source", - "allocated_invoice_sources", - "ordered_quantity", - "allocated_quantity", - "uninvoiced_quantity", - "overbilled_quantity", - "unit", - "status", - "supplied_amount", - "computed_amount", - "line_arithmetic_status" - ], - "type": "object" - }, - "maxItems": 100, - "minItems": 1, - "type": "array" - }, - "summary": { - "additionalProperties": false, - "properties": { - "delivery_verified": { - "const": false - }, - "discrepancy_count": { - "maximum": 1000, - "minimum": 0, - "type": "integer" - }, - "human_review_required": { - "const": true - }, - "invoice_line_count": { - "maximum": 100, - "minimum": 0, - "type": "integer" - }, - "matched_invoice_line_count": { - "maximum": 100, - "minimum": 0, - "type": "integer" - }, - "outcome": { - "enum": [ - "no_discrepancies", - "review_required" - ] - }, - "payment_approved": { - "const": false - }, - "purchase_order_line_count": { - "maximum": 100, - "minimum": 0, - "type": "integer" - }, - "unknown_check_count": { - "maximum": 1000, - "minimum": 0, - "type": "integer" - }, - "unmatched_invoice_line_count": { - "maximum": 100, - "minimum": 0, - "type": "integer" - } - }, - "required": [ - "outcome", - "invoice_line_count", - "purchase_order_line_count", - "matched_invoice_line_count", - "unmatched_invoice_line_count", - "discrepancy_count", - "unknown_check_count", - "human_review_required", - "delivery_verified", - "payment_approved" - ], - "type": "object" - } - }, - "required": [ - "summary", - "document_checks", - "comparison_rows", - "purchase_order_line_summary", - "discrepancies", - "arithmetic", - "policy" - ], - "type": "object" - }, - "status": { - "const": "review_required" - } - }, - "required": [ - "contract_version", - "status", - "result", - "identities" - ], - "type": "object" - }, - "synthetic_only": { - "const": true - } - }, - "required": [ - "example_version", - "synthetic_only", - "request", - "response", - "policy" - ], - "type": "object" - }, - "service": { - "const": "invoice" - } - }, - "required": [ - "service", - "details" - ], - "type": "object" - }, - { - "additionalProperties": false, - "properties": { - "details": { - "properties": { - "request": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "additionalProperties": false, - "description": "Free comparison of one receipt, invoice and purchase order supplied in this request. Missing documents or fields produce needs_review. Maximum 100 lines per document and 196608 UTF-8 JSON bytes. No images, URLs, credentials, account access, or paid tool calls. Money amounts must use the supported currency's minor-unit precision; runtime also rejects sensitive data, padded strings and control characters.", - "properties": { - "invoice": { - "additionalProperties": false, - "description": "Caller-supplied structured data. Use opaque supplier IDs and decimal strings; omit unknown fields. Receipt kind describes the source document, not verified delivery. Field names align with invoice matching; receipt extraction output must be mapped explicitly.", - "properties": { - "currency": { - "pattern": "^[A-Z]{3}$", - "type": "string" - }, - "line_items": { - "items": { - "additionalProperties": false, - "properties": { - "amount": { - "maxLength": 33, - "pattern": "^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,6})?$", - "type": "string" - }, - "description": { - "maxLength": 240, - "minLength": 1, - "type": "string" - }, - "line_id": { - "maxLength": 80, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", - "type": "string" - }, - "po_line_id": { - "maxLength": 80, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", - "type": "string" - }, - "product_code": { - "maxLength": 80, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", - "type": "string" - }, - "quantity": { - "allOf": [ - { - "not": { - "pattern": "^0(?:\\.0+)?$" - } - } - ], - "maxLength": 19, - "not": { - "pattern": "\\n" - }, - "pattern": "^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?$", - "type": "string" - }, - "unit": { - "maxLength": 32, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", - "type": "string" - }, - "unit_price": { - "maxLength": 19, - "not": { - "pattern": "\\n" - }, - "pattern": "^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?$", - "type": "string" - } - }, - "required": [], - "type": "object" - }, - "maxItems": 100, - "type": "array" - }, - "purchase_order_reference": { - "maxLength": 80, - "minLength": 1, - "type": "string" - }, - "reference": { - "maxLength": 80, - "minLength": 1, - "type": "string" - }, - "subtotal": { - "maxLength": 33, - "pattern": "^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,6})?$", - "type": "string" - }, - "supplier_id": { - "maxLength": 80, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", - "type": "string" - }, - "tax": { - "maxLength": 33, - "pattern": "^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,6})?$", - "type": "string" - }, - "total": { - "maxLength": 33, - "pattern": "^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,6})?$", - "type": "string" - } - }, - "required": [], - "type": "object" - }, - "purchase_order": { - "additionalProperties": false, - "description": "Caller-supplied structured data. Use opaque supplier IDs and decimal strings; omit unknown fields. Receipt kind describes the source document, not verified delivery. Field names align with invoice matching; receipt extraction output must be mapped explicitly.", - "properties": { - "currency": { - "pattern": "^[A-Z]{3}$", - "type": "string" - }, - "line_items": { - "items": { - "additionalProperties": false, - "properties": { - "amount": { - "maxLength": 33, - "pattern": "^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,6})?$", - "type": "string" - }, - "description": { - "maxLength": 240, - "minLength": 1, - "type": "string" - }, - "line_id": { - "maxLength": 80, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", - "type": "string" - }, - "product_code": { - "maxLength": 80, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", - "type": "string" - }, - "quantity": { - "allOf": [ - { - "not": { - "pattern": "^0(?:\\.0+)?$" - } - } - ], - "maxLength": 19, - "not": { - "pattern": "\\n" - }, - "pattern": "^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?$", - "type": "string" - }, - "unit": { - "maxLength": 32, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", - "type": "string" - }, - "unit_price": { - "maxLength": 19, - "not": { - "pattern": "\\n" - }, - "pattern": "^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?$", - "type": "string" - } - }, - "required": [], - "type": "object" - }, - "maxItems": 100, - "type": "array" - }, - "reference": { - "maxLength": 80, - "minLength": 1, - "type": "string" - }, - "subtotal": { - "maxLength": 33, - "pattern": "^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,6})?$", - "type": "string" - }, - "supplier_id": { - "maxLength": 80, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", - "type": "string" - }, - "tax": { - "maxLength": 33, - "pattern": "^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,6})?$", - "type": "string" - }, - "total": { - "maxLength": 33, - "pattern": "^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,6})?$", - "type": "string" - } - }, - "required": [], - "type": "object" - }, - "receipt": { - "additionalProperties": false, - "description": "Caller-supplied structured data. Use opaque supplier IDs and decimal strings; omit unknown fields. Receipt kind describes the source document, not verified delivery. Field names align with invoice matching; receipt extraction output must be mapped explicitly.", - "properties": { - "currency": { - "pattern": "^[A-Z]{3}$", - "type": "string" - }, - "invoice_reference": { - "maxLength": 80, - "minLength": 1, - "type": "string" - }, - "kind": { - "enum": [ - "expense_receipt", - "delivery_receipt" - ] - }, - "line_items": { - "items": { - "additionalProperties": false, - "properties": { - "amount": { - "maxLength": 33, - "pattern": "^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,6})?$", - "type": "string" - }, - "description": { - "maxLength": 240, - "minLength": 1, - "type": "string" - }, - "invoice_line_id": { - "maxLength": 80, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", - "type": "string" - }, - "line_id": { - "maxLength": 80, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", - "type": "string" - }, - "product_code": { - "maxLength": 80, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", - "type": "string" - }, - "quantity": { - "allOf": [ - { - "not": { - "pattern": "^0(?:\\.0+)?$" - } - } - ], - "maxLength": 19, - "not": { - "pattern": "\\n" - }, - "pattern": "^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?$", - "type": "string" - }, - "unit": { - "maxLength": 32, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", - "type": "string" - }, - "unit_price": { - "maxLength": 19, - "not": { - "pattern": "\\n" - }, - "pattern": "^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?$", - "type": "string" - } - }, - "required": [], - "type": "object" - }, - "maxItems": 100, - "type": "array" - }, - "purchase_order_reference": { - "maxLength": 80, - "minLength": 1, - "type": "string" - }, - "reference": { - "maxLength": 80, - "minLength": 1, - "type": "string" - }, - "subtotal": { - "maxLength": 33, - "pattern": "^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,6})?$", - "type": "string" - }, - "supplier_id": { - "maxLength": 80, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", - "type": "string" - }, - "tax": { - "maxLength": 33, - "pattern": "^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,6})?$", - "type": "string" - }, - "total": { - "maxLength": 33, - "pattern": "^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,6})?$", - "type": "string" - } - }, - "required": [], - "type": "object" - } - }, - "required": [], - "type": "object" - }, - "response": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "oneOf": [ - { - "additionalProperties": false, - "properties": { - "comparisons": { - "items": { - "additionalProperties": false, - "properties": { - "document_identity_comparable": { - "type": "boolean" - }, - "pair": { - "enum": [ - "receipt_to_invoice", - "invoice_to_purchase_order" - ] - }, - "rows": { - "items": { - "additionalProperties": false, - "properties": { - "amount_difference": { - "maxLength": 50, - "pattern": "^-?(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$", - "type": [ - "string", - "null" - ] - }, - "candidate_targets": { - "items": { - "maxLength": 100, - "pattern": "^/(?:receipt|invoice|purchase_order)(?:/[A-Za-z0-9_]+)*$", - "type": "string" - }, - "maxItems": 100, - "type": "array" - }, - "comparison_performed": { - "type": "boolean" - }, - "match_method": { - "enum": [ - "unmatched", - "explicit_line_reference", - "exact_product_code", - "normalized_description" - ] - }, - "quantity_difference": { - "maxLength": 50, - "pattern": "^-?(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$", - "type": [ - "string", - "null" - ] - }, - "source": { - "maxLength": 100, - "pattern": "^/(?:receipt|invoice|purchase_order)(?:/[A-Za-z0-9_]+)*$", - "type": "string" - }, - "status": { - "enum": [ - "no_discrepancies", - "needs_review" - ] - }, - "target": { - "anyOf": [ - { - "maxLength": 100, - "pattern": "^/(?:receipt|invoice|purchase_order)(?:/[A-Za-z0-9_]+)*$", - "type": "string" - }, - { - "type": "null" - } - ] - }, - "unit_price_difference": { - "maxLength": 50, - "pattern": "^-?(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$", - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "source", - "target", - "candidate_targets", - "match_method", - "comparison_performed", - "status", - "quantity_difference", - "unit_price_difference", - "amount_difference" - ], - "type": "object" - }, - "maxItems": 100, - "type": "array" - }, - "status": { - "enum": [ - "no_discrepancies", - "needs_review" - ] - } - }, - "required": [ - "pair", - "status", - "document_identity_comparable", - "rows" - ], - "type": "object" - }, - "maxItems": 2, - "minItems": 2, - "type": "array" - }, - "contract_version": { - "const": "ardaro.purchase-document-reconciliation.response.v1" - }, - "delivery_verified": { - "const": false - }, - "discrepancies": { - "items": { - "additionalProperties": false, - "properties": { - "code": { - "maxLength": 80, - "pattern": "^[a-z_]+$", - "type": "string" - }, - "scope": { - "enum": [ - "receipt", - "invoice", - "purchase_order", - "receipt_to_invoice", - "invoice_to_purchase_order" - ] - }, - "severity": { - "enum": [ - "unknown", - "discrepancy" - ] - }, - "sources": { - "items": { - "maxLength": 100, - "pattern": "^/(?:receipt|invoice|purchase_order)(?:/[A-Za-z0-9_]+)*$", - "type": "string" - }, - "maxItems": 101, - "type": "array" - } - }, - "required": [ - "code", - "scope", - "severity", - "sources" - ], - "type": "object" - }, - "maxItems": 6000, - "type": "array" - }, - "document_summary": { - "items": { - "additionalProperties": false, - "properties": { - "currency_minor_units": { - "enum": [ - 0, - 2, - null - ] - }, - "currency_supported": { - "type": "boolean" - }, - "document": { - "enum": [ - "receipt", - "invoice", - "purchase_order" - ] - }, - "line_count": { - "maximum": 100, - "minimum": 0, - "type": "integer" - }, - "present": { - "type": "boolean" - } - }, - "required": [ - "document", - "present", - "line_count", - "currency_supported", - "currency_minor_units" - ], - "type": "object" - }, - "maxItems": 3, - "minItems": 3, - "type": "array" - }, - "financial_posting_performed": { - "const": false - }, - "human_review_required": { - "const": true - }, - "payment_approved": { - "const": false - }, - "policy": { - "const": { - "arithmetic_scope": "Exact decimal comparisons with per-line ROUND_HALF_UP at supported currency precision. No tax applicability, discounts, freight or currency conversion is inferred.", - "decision_scope": "No discrepancies means the supported checks found none in supplied data. It is not payment authorization, accounting approval or supplier verification.", - "document_storage_performed": false, - "matching_rule": "explicit line reference, else unique exact case-sensitive product code, else unique NFKC/casefold/whitespace-normalized description when both product codes are absent; never fuzzy or semantic", - "model_calls": 0, - "paid_tool_calls": 0, - "payment_required": false, - "quantity_scope": "Differences concern only these three supplied documents. Partial receipts, partial invoicing, prior invoices, returns and delivery events are not inferred.", - "receipt_scope": "An expense receipt is not evidence of delivery. A delivery_receipt label is caller-supplied and does not authenticate delivery.", - "retention_scope": "This function retains no documents or results; caller and transport retention are outside this function's guarantees." - } - }, - "provenance": { - "const": { - "document_authenticity_verified": false, - "external_data_fetched": false, - "source": "caller_supplied_documents_only", - "source_pointer_root": "original_arguments" - } - }, - "result_identity": { - "pattern": "^res_[0-9a-f]{64}$", - "type": "string" - }, - "status": { - "enum": [ - "no_discrepancies", - "needs_review" - ] - } - }, - "required": [ - "contract_version", - "human_review_required", - "payment_approved", - "delivery_verified", - "financial_posting_performed", - "provenance", - "policy", - "status", - "result_identity", - "document_summary", - "comparisons", - "discrepancies" - ], - "type": "object" - }, - { - "additionalProperties": false, - "properties": { - "contract_version": { - "const": "ardaro.purchase-document-reconciliation.response.v1" - }, - "error": { - "additionalProperties": false, - "properties": { - "code": { - "maxLength": 80, - "type": "string" - }, - "message": { - "maxLength": 300, - "type": "string" - } - }, - "required": [ - "code", - "message" - ], - "type": "object" - }, - "status": { - "const": "error" - } - }, - "required": [ - "contract_version", - "status", - "error" - ], - "type": "object" - } - ], - "type": "object" - } - }, - "required": [ - "request", - "response" - ], - "type": "object" - }, - "service": { - "const": "reconciliation" - } - }, - "required": [ - "service", - "details" - ], - "type": "object" - } -]New value: +[ + { + "additionalProperties": false, + "properties": { + "details": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "properties": { + "example_version": { + "const": "ardaro.receipt-intelligence.example.v1" + }, + "expected_response": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "description": "Receipt Intelligence v1 response. result is authoritative; receipt is a derived compatibility projection that MUST match result.", + "properties": { + "arithmetic_consistency": { + "enum": [ + "verified", + "mismatch", + "unavailable" + ] + }, + "arithmetic_verified": { + "type": [ + "boolean", + "null" + ] + }, + "confidence": { + "type": "object" + }, + "contract_version": { + "const": "ardaro.agent-receipt-intelligence.response.v1" + }, + "duplicate_check": { + "type": "object" + }, + "duplicate_fingerprint": { + "pattern": "^[0-9a-f]{64}$", + "type": [ + "string", + "null" + ] + }, + "engine": { + "type": "object" + }, + "identities": { + "additionalProperties": false, + "properties": { + "analysis_result_identity": { + "pattern": "^res_[0-9a-f]{64}$", + "type": "string" + }, + "document_fingerprint": { + "pattern": "^[0-9a-f]{64}$", + "type": [ + "string", + "null" + ] + }, + "request_identity": { + "pattern": "^req_[0-9a-f]{64}$", + "type": "string" + } + }, + "required": [ + "request_identity", + "document_fingerprint", + "analysis_result_identity" + ], + "type": "object" + }, + "metering": { + "type": "object" + }, + "payment_identity": { + "additionalProperties": false, + "properties": { + "protocol": { + "const": "x402-v2" + }, + "reference": { + "pattern": "^pay_[0-9a-f]{64}$", + "type": "string" + }, + "replayed": { + "type": "boolean" + } + }, + "required": [ + "protocol", + "reference", + "replayed" + ], + "type": "object" + }, + "policy": { + "type": "object" + }, + "receipt": { + "additionalProperties": false, + "description": "Non-authoritative compatibility projection generated from result under ardaro.result-receipt-projection.v1. Consumers MUST use result for structured receipt values and reject a response when this projection diverges.", + "properties": { + "line_items": { + "items": { + "additionalProperties": false, + "properties": { + "amount": { + "oneOf": [ + { + "type": "null" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "additionalProperties": false, + "properties": { + "level": { + "enum": [ + "high", + "medium", + "low" + ] + }, + "score": { + "maximum": 1, + "minimum": 0, + "type": "number" + } + }, + "required": [ + "score", + "level" + ], + "type": "object" + }, + "source": { + "enum": [ + "structured_summary", + "structured_line_item", + "provider_neutral", + "text_fallback", + "inferred" + ] + }, + "value": { + "maxLength": 80, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "value", + "confidence", + "source" + ], + "type": "object" + } + ] + }, + "description": { + "oneOf": [ + { + "type": "null" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "additionalProperties": false, + "properties": { + "level": { + "enum": [ + "high", + "medium", + "low" + ] + }, + "score": { + "maximum": 1, + "minimum": 0, + "type": "number" + } + }, + "required": [ + "score", + "level" + ], + "type": "object" + }, + "source": { + "enum": [ + "structured_summary", + "structured_line_item", + "provider_neutral", + "text_fallback", + "inferred" + ] + }, + "value": { + "maxLength": 240, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "value", + "confidence", + "source" + ], + "type": "object" + } + ] + }, + "product_code": { + "oneOf": [ + { + "type": "null" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "additionalProperties": false, + "properties": { + "level": { + "enum": [ + "high", + "medium", + "low" + ] + }, + "score": { + "maximum": 1, + "minimum": 0, + "type": "number" + } + }, + "required": [ + "score", + "level" + ], + "type": "object" + }, + "source": { + "enum": [ + "structured_summary", + "structured_line_item", + "provider_neutral", + "text_fallback", + "inferred" + ] + }, + "value": { + "maxLength": 80, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "value", + "confidence", + "source" + ], + "type": "object" + } + ] + }, + "quantity": { + "oneOf": [ + { + "type": "null" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "additionalProperties": false, + "properties": { + "level": { + "enum": [ + "high", + "medium", + "low" + ] + }, + "score": { + "maximum": 1, + "minimum": 0, + "type": "number" + } + }, + "required": [ + "score", + "level" + ], + "type": "object" + }, + "source": { + "enum": [ + "structured_summary", + "structured_line_item", + "provider_neutral", + "text_fallback", + "inferred" + ] + }, + "value": { + "maxLength": 80, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "value", + "confidence", + "source" + ], + "type": "object" + } + ] + }, + "unit_price": { + "oneOf": [ + { + "type": "null" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "additionalProperties": false, + "properties": { + "level": { + "enum": [ + "high", + "medium", + "low" + ] + }, + "score": { + "maximum": 1, + "minimum": 0, + "type": "number" + } + }, + "required": [ + "score", + "level" + ], + "type": "object" + }, + "source": { + "enum": [ + "structured_summary", + "structured_line_item", + "provider_neutral", + "text_fallback", + "inferred" + ] + }, + "value": { + "maxLength": 80, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "value", + "confidence", + "source" + ], + "type": "object" + } + ] + } + }, + "required": [ + "description", + "product_code", + "quantity", + "unit_price", + "amount" + ], + "type": "object" + }, + "maxItems": 100, + "type": "array" + }, + "purchase_date": { + "oneOf": [ + { + "type": "null" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "additionalProperties": false, + "properties": { + "level": { + "enum": [ + "high", + "medium", + "low" + ] + }, + "score": { + "maximum": 1, + "minimum": 0, + "type": "number" + } + }, + "required": [ + "score", + "level" + ], + "type": "object" + }, + "source": { + "enum": [ + "structured_summary", + "structured_line_item", + "provider_neutral", + "text_fallback", + "inferred" + ] + }, + "value": { + "maxLength": 10, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "value", + "confidence", + "source" + ], + "type": "object" + } + ] + }, + "purchase_order": { + "additionalProperties": false, + "properties": { + "confidence": { + "additionalProperties": false, + "properties": { + "level": { + "enum": [ + "high", + "medium", + "low" + ] + }, + "score": { + "maximum": 1, + "minimum": 0, + "type": "number" + } + }, + "required": [ + "score", + "level" + ], + "type": "object" + }, + "source": { + "enum": [ + "structured_summary", + "structured_line_item", + "provider_neutral", + "text_fallback", + "inferred" + ] + }, + "value": { + "maxLength": 160, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "value", + "confidence", + "source" + ], + "type": "object" + }, + "receipt_reference": { + "additionalProperties": false, + "properties": { + "confidence": { + "additionalProperties": false, + "properties": { + "level": { + "enum": [ + "high", + "medium", + "low" + ] + }, + "score": { + "maximum": 1, + "minimum": 0, + "type": "number" + } + }, + "required": [ + "score", + "level" + ], + "type": "object" + }, + "source": { + "enum": [ + "structured_summary", + "structured_line_item", + "provider_neutral", + "text_fallback", + "inferred" + ] + }, + "value": { + "maxLength": 160, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "value", + "confidence", + "source" + ], + "type": "object" + }, + "totals": { + "additionalProperties": false, + "properties": { + "currency": { + "oneOf": [ + { + "type": "null" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "additionalProperties": false, + "properties": { + "level": { + "enum": [ + "high", + "medium", + "low" + ] + }, + "score": { + "maximum": 1, + "minimum": 0, + "type": "number" + } + }, + "required": [ + "score", + "level" + ], + "type": "object" + }, + "source": { + "enum": [ + "structured_summary", + "structured_line_item", + "provider_neutral", + "text_fallback", + "inferred" + ] + }, + "value": { + "maxLength": 3, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "value", + "confidence", + "source" + ], + "type": "object" + } + ] + }, + "subtotal": { + "oneOf": [ + { + "type": "null" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "additionalProperties": false, + "properties": { + "level": { + "enum": [ + "high", + "medium", + "low" + ] + }, + "score": { + "maximum": 1, + "minimum": 0, + "type": "number" + } + }, + "required": [ + "score", + "level" + ], + "type": "object" + }, + "source": { + "enum": [ + "structured_summary", + "structured_line_item", + "provider_neutral", + "text_fallback", + "inferred" + ] + }, + "value": { + "maxLength": 32, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "value", + "confidence", + "source" + ], + "type": "object" + } + ] + }, + "tax": { + "oneOf": [ + { + "type": "null" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "additionalProperties": false, + "properties": { + "level": { + "enum": [ + "high", + "medium", + "low" + ] + }, + "score": { + "maximum": 1, + "minimum": 0, + "type": "number" + } + }, + "required": [ + "score", + "level" + ], + "type": "object" + }, + "source": { + "enum": [ + "structured_summary", + "structured_line_item", + "provider_neutral", + "text_fallback", + "inferred" + ] + }, + "value": { + "maxLength": 32, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "value", + "confidence", + "source" + ], + "type": "object" + } + ] + }, + "total": { + "oneOf": [ + { + "type": "null" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "additionalProperties": false, + "properties": { + "level": { + "enum": [ + "high", + "medium", + "low" + ] + }, + "score": { + "maximum": 1, + "minimum": 0, + "type": "number" + } + }, + "required": [ + "score", + "level" + ], + "type": "object" + }, + "source": { + "enum": [ + "structured_summary", + "structured_line_item", + "provider_neutral", + "text_fallback", + "inferred" + ] + }, + "value": { + "maxLength": 32, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "value", + "confidence", + "source" + ], + "type": "object" + } + ] + } + }, + "required": [ + "subtotal", + "tax", + "total", + "currency" + ], + "type": "object" + }, + "vendor": { + "oneOf": [ + { + "type": "null" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "additionalProperties": false, + "properties": { + "level": { + "enum": [ + "high", + "medium", + "low" + ] + }, + "score": { + "maximum": 1, + "minimum": 0, + "type": "number" + } + }, + "required": [ + "score", + "level" + ], + "type": "object" + }, + "source": { + "enum": [ + "structured_summary", + "structured_line_item", + "provider_neutral", + "text_fallback", + "inferred" + ] + }, + "value": { + "maxLength": 160, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "value", + "confidence", + "source" + ], + "type": "object" + } + ] + } + }, + "required": [ + "vendor", + "purchase_date", + "totals", + "line_items" + ], + "type": "object" + }, + "result": { + "additionalProperties": false, + "description": "Sole authoritative structured analysis object. Its recursively key-sorted, compact UTF-8 JSON bytes are SHA-256 hashed under ardaro.recursive-key-sort-compact-json-utf8-sha256.v1 and published as analysis_result_identity.", + "properties": { + "extracted_facts": { + "additionalProperties": false, + "properties": { + "line_items": { + "items": { + "additionalProperties": false, + "properties": { + "amount": { + "oneOf": [ + { + "type": "null" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "additionalProperties": false, + "properties": { + "level": { + "enum": [ + "high", + "medium", + "low" + ] + }, + "score": { + "maximum": 1, + "minimum": 0, + "type": "number" + } + }, + "required": [ + "score", + "level" + ], + "type": "object" + }, + "source": { + "enum": [ + "structured_summary", + "structured_line_item", + "provider_neutral", + "text_fallback", + "inferred" + ] + }, + "value": { + "maxLength": 80, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "value", + "confidence", + "source" + ], + "type": "object" + } + ] + }, + "description": { + "oneOf": [ + { + "type": "null" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "additionalProperties": false, + "properties": { + "level": { + "enum": [ + "high", + "medium", + "low" + ] + }, + "score": { + "maximum": 1, + "minimum": 0, + "type": "number" + } + }, + "required": [ + "score", + "level" + ], + "type": "object" + }, + "source": { + "enum": [ + "structured_summary", + "structured_line_item", + "provider_neutral", + "text_fallback", + "inferred" + ] + }, + "value": { + "maxLength": 240, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "value", + "confidence", + "source" + ], + "type": "object" + } + ] + }, + "product_code": { + "oneOf": [ + { + "type": "null" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "additionalProperties": false, + "properties": { + "level": { + "enum": [ + "high", + "medium", + "low" + ] + }, + "score": { + "maximum": 1, + "minimum": 0, + "type": "number" + } + }, + "required": [ + "score", + "level" + ], + "type": "object" + }, + "source": { + "enum": [ + "structured_summary", + "structured_line_item", + "provider_neutral", + "text_fallback", + "inferred" + ] + }, + "value": { + "maxLength": 80, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "value", + "confidence", + "source" + ], + "type": "object" + } + ] + }, + "quantity": { + "oneOf": [ + { + "type": "null" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "additionalProperties": false, + "properties": { + "level": { + "enum": [ + "high", + "medium", + "low" + ] + }, + "score": { + "maximum": 1, + "minimum": 0, + "type": "number" + } + }, + "required": [ + "score", + "level" + ], + "type": "object" + }, + "source": { + "enum": [ + "structured_summary", + "structured_line_item", + "provider_neutral", + "text_fallback", + "inferred" + ] + }, + "value": { + "maxLength": 80, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "value", + "confidence", + "source" + ], + "type": "object" + } + ] + }, + "unit_price": { + "oneOf": [ + { + "type": "null" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "additionalProperties": false, + "properties": { + "level": { + "enum": [ + "high", + "medium", + "low" + ] + }, + "score": { + "maximum": 1, + "minimum": 0, + "type": "number" + } + }, + "required": [ + "score", + "level" + ], + "type": "object" + }, + "source": { + "enum": [ + "structured_summary", + "structured_line_item", + "provider_neutral", + "text_fallback", + "inferred" + ] + }, + "value": { + "maxLength": 80, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "value", + "confidence", + "source" + ], + "type": "object" + } + ] + } + }, + "required": [ + "description", + "product_code", + "quantity", + "unit_price", + "amount" + ], + "type": "object" + }, + "maxItems": 100, + "type": "array" + }, + "purchase_date": { + "additionalProperties": false, + "properties": { + "confidence": { + "additionalProperties": false, + "properties": { + "level": { + "enum": [ + "high", + "medium", + "low" + ] + }, + "score": { + "maximum": 1, + "minimum": 0, + "type": "number" + } + }, + "required": [ + "score", + "level" + ], + "type": "object" + }, + "source": { + "enum": [ + "structured_summary", + "structured_line_item", + "provider_neutral", + "text_fallback", + "inferred" + ] + }, + "value": { + "maxLength": 10, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "value", + "confidence", + "source" + ], + "type": "object" + }, + "purchase_order": { + "additionalProperties": false, + "properties": { + "confidence": { + "additionalProperties": false, + "properties": { + "level": { + "enum": [ + "high", + "medium", + "low" + ] + }, + "score": { + "maximum": 1, + "minimum": 0, + "type": "number" + } + }, + "required": [ + "score", + "level" + ], + "type": "object" + }, + "source": { + "enum": [ + "structured_summary", + "structured_line_item", + "provider_neutral", + "text_fallback", + "inferred" + ] + }, + "value": { + "maxLength": 160, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "value", + "confidence", + "source" + ], + "type": "object" + }, + "receipt_reference": { + "additionalProperties": false, + "properties": { + "confidence": { + "additionalProperties": false, + "properties": { + "level": { + "enum": [ + "high", + "medium", + "low" + ] + }, + "score": { + "maximum": 1, + "minimum": 0, + "type": "number" + } + }, + "required": [ + "score", + "level" + ], + "type": "object" + }, + "source": { + "enum": [ + "structured_summary", + "structured_line_item", + "provider_neutral", + "text_fallback", + "inferred" + ] + }, + "value": { + "maxLength": 160, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "value", + "confidence", + "source" + ], + "type": "object" + }, + "totals.currency": { + "additionalProperties": false, + "properties": { + "confidence": { + "additionalProperties": false, + "properties": { + "level": { + "enum": [ + "high", + "medium", + "low" + ] + }, + "score": { + "maximum": 1, + "minimum": 0, + "type": "number" + } + }, + "required": [ + "score", + "level" + ], + "type": "object" + }, + "source": { + "enum": [ + "structured_summary", + "structured_line_item", + "provider_neutral", + "text_fallback", + "inferred" + ] + }, + "value": { + "maxLength": 3, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "value", + "confidence", + "source" + ], + "type": "object" + }, + "totals.subtotal": { + "additionalProperties": false, + "properties": { + "confidence": { + "additionalProperties": false, + "properties": { + "level": { + "enum": [ + "high", + "medium", + "low" + ] + }, + "score": { + "maximum": 1, + "minimum": 0, + "type": "number" + } + }, + "required": [ + "score", + "level" + ], + "type": "object" + }, + "source": { + "enum": [ + "structured_summary", + "structured_line_item", + "provider_neutral", + "text_fallback", + "inferred" + ] + }, + "value": { + "maxLength": 32, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "value", + "confidence", + "source" + ], + "type": "object" + }, + "totals.tax": { + "additionalProperties": false, + "properties": { + "confidence": { + "additionalProperties": false, + "properties": { + "level": { + "enum": [ + "high", + "medium", + "low" + ] + }, + "score": { + "maximum": 1, + "minimum": 0, + "type": "number" + } + }, + "required": [ + "score", + "level" + ], + "type": "object" + }, + "source": { + "enum": [ + "structured_summary", + "structured_line_item", + "provider_neutral", + "text_fallback", + "inferred" + ] + }, + "value": { + "maxLength": 32, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "value", + "confidence", + "source" + ], + "type": "object" + }, + "totals.total": { + "additionalProperties": false, + "properties": { + "confidence": { + "additionalProperties": false, + "properties": { + "level": { + "enum": [ + "high", + "medium", + "low" + ] + }, + "score": { + "maximum": 1, + "minimum": 0, + "type": "number" + } + }, + "required": [ + "score", + "level" + ], + "type": "object" + }, + "source": { + "enum": [ + "structured_summary", + "structured_line_item", + "provider_neutral", + "text_fallback", + "inferred" + ] + }, + "value": { + "maxLength": 32, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "value", + "confidence", + "source" + ], + "type": "object" + }, + "vendor": { + "additionalProperties": false, + "properties": { + "confidence": { + "additionalProperties": false, + "properties": { + "level": { + "enum": [ + "high", + "medium", + "low" + ] + }, + "score": { + "maximum": 1, + "minimum": 0, + "type": "number" + } + }, + "required": [ + "score", + "level" + ], + "type": "object" + }, + "source": { + "enum": [ + "structured_summary", + "structured_line_item", + "provider_neutral", + "text_fallback", + "inferred" + ] + }, + "value": { + "maxLength": 160, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "value", + "confidence", + "source" + ], + "type": "object" + } + }, + "required": [ + "line_items" + ], + "type": "object" + }, + "inferred_suggestions": { + "items": { + "additionalProperties": false, + "properties": { + "field": { + "enum": [ + "vendor", + "purchase_date", + "purchase_order", + "receipt_reference", + "totals.subtotal", + "totals.tax", + "totals.total", + "totals.currency" + ] + }, + "value": { + "additionalProperties": false, + "properties": { + "confidence": { + "additionalProperties": false, + "properties": { + "level": { + "enum": [ + "high", + "medium", + "low" + ] + }, + "score": { + "maximum": 1, + "minimum": 0, + "type": "number" + } + }, + "required": [ + "score", + "level" + ], + "type": "object" + }, + "source": { + "enum": [ + "structured_summary", + "structured_line_item", + "provider_neutral", + "text_fallback", + "inferred" + ] + }, + "value": { + "maxLength": 240, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "value", + "confidence", + "source" + ], + "type": "object" + } + }, + "required": [ + "field", + "value" + ], + "type": "object" + }, + "maxItems": 8, + "type": "array" + }, + "provenance": { + "type": "object" + }, + "unavailable_fields": { + "items": { + "enum": [ + "purchase order reference", + "purchase_date", + "receipt or invoice number", + "totals.currency", + "totals.subtotal", + "totals.tax", + "totals.total", + "vendor" + ] + }, + "type": "array", + "uniqueItems": true + }, + "validation": { + "type": "object" + } + }, + "required": [ + "extracted_facts", + "inferred_suggestions", + "unavailable_fields", + "validation", + "provenance" + ], + "type": "object" + }, + "service": { + "const": "ardaro.receipt_intelligence" + }, + "status": { + "const": "review_required" + }, + "version": { + "const": "1.0.0" + }, + "warning_groups": { + "type": "object" + }, + "warnings": { + "items": { + "type": "object" + }, + "maxItems": 64, + "type": "array" + } + }, + "required": [ + "contract_version", + "service", + "version", + "status", + "engine", + "receipt", + "confidence", + "duplicate_check", + "duplicate_fingerprint", + "arithmetic_verified", + "arithmetic_consistency", + "warnings", + "warning_groups", + "identities", + "result", + "metering", + "policy" + ], + "type": "object", + "x-ardaro-analysis-result-identity-profile": "ardaro.recursive-key-sort-compact-json-utf8-sha256.v1", + "x-ardaro-authoritative-analysis-path": "$.result", + "x-ardaro-receipt-compatibility-path": "$.receipt", + "x-ardaro-receipt-projection-profile": "ardaro.result-receipt-projection.v1" + }, + "input_description": { + "type": "string" + }, + "limits": { + "additionalProperties": false, + "properties": { + "max_existing_fingerprints": { + "minimum": 1, + "type": "integer" + }, + "max_line_items": { + "minimum": 1, + "type": "integer" + }, + "max_pages": { + "minimum": 1, + "type": "integer" + }, + "max_request_bytes": { + "minimum": 1, + "type": "integer" + }, + "max_text_characters": { + "minimum": 1, + "type": "integer" + }, + "normal_latency_target_ms": { + "minimum": 1, + "type": "integer" + }, + "request_timeout_ms": { + "minimum": 1, + "type": "integer" + } + }, + "required": [ + "max_existing_fingerprints", + "max_line_items", + "max_pages", + "max_request_bytes", + "max_text_characters", + "normal_latency_target_ms", + "request_timeout_ms" + ], + "type": "object" + }, + "paid_processing_performed": { + "const": false + }, + "request": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "properties": { + "contract_version": { + "const": "ardaro.agent-receipt-intelligence.request.v1", + "description": "Required request contract identifier; send this exact version string." + }, + "existing_fingerprints": { + "description": "Receipt fingerprints already known to the caller for duplicate comparison. Supply lowercase 64-character SHA-256 hex strings, or an empty array when none are available; at most 10,000 entries.", + "items": { + "pattern": "^[0-9a-f]{64}$", + "type": "string" + }, + "maxItems": 10000, + "type": "array" + }, + "input": { + "description": "One receipt supplied as bounded OCR text or a provider-neutral structured extraction. Choose exactly one input kind.", + "oneOf": [ + { + "additionalProperties": false, + "properties": { + "kind": { + "const": "text", + "description": "Selects receipt text input; supply the text property." + }, + "text": { + "description": "OCR or receipt text for one document, up to 20,000 characters. Exclude payment-card data, credentials, customer-record payloads, and financial posting instructions.", + "maxLength": 20000, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "kind", + "text" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "analysis": { + "additionalProperties": false, + "description": "Provider-neutral receipt extraction using only the listed fields. Omit fields that were not extracted.", + "minProperties": 1, + "properties": { + "currency": { + "description": "Three-letter currency code shown on the receipt, for example USD. Supply the extracted value directly or wrap it with optional extraction confidence.", + "oneOf": [ + { + "maxLength": 3, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", + "maximum": 100, + "minimum": 0, + "type": "number" + }, + "value": { + "description": "The extracted field value, supplied as text or a number before receipt normalization.", + "oneOf": [ + { + "maxLength": 3, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "value" + ], + "type": "object" + } + ] + }, + "line_items": { + "description": "Extracted receipt line items, limited to 100 entries; omit unavailable item fields.", + "items": { + "additionalProperties": false, + "minProperties": 1, + "properties": { + "amount": { + "description": "Extended amount printed for this line item, in the receipt currency. Supply the extracted value directly or wrap it with optional extraction confidence.", + "oneOf": [ + { + "maxLength": 80, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", + "maximum": 100, + "minimum": 0, + "type": "number" + }, + "value": { + "description": "The extracted field value, supplied as text or a number before receipt normalization.", + "oneOf": [ + { + "maxLength": 80, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "value" + ], + "type": "object" + } + ] + }, + "description": { + "description": "Item description printed on the receipt. Supply the extracted value directly or wrap it with optional extraction confidence.", + "oneOf": [ + { + "maxLength": 240, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", + "maximum": 100, + "minimum": 0, + "type": "number" + }, + "value": { + "description": "The extracted field value, supplied as text or a number before receipt normalization.", + "oneOf": [ + { + "maxLength": 240, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "value" + ], + "type": "object" + } + ] + }, + "product_code": { + "description": "Product identifier or SKU printed for this line item. Supply the extracted value directly or wrap it with optional extraction confidence.", + "oneOf": [ + { + "maxLength": 80, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", + "maximum": 100, + "minimum": 0, + "type": "number" + }, + "value": { + "description": "The extracted field value, supplied as text or a number before receipt normalization.", + "oneOf": [ + { + "maxLength": 80, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "value" + ], + "type": "object" + } + ] + }, + "quantity": { + "description": "Quantity purchased for this line item. Supply the extracted value directly or wrap it with optional extraction confidence.", + "oneOf": [ + { + "maxLength": 80, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", + "maximum": 100, + "minimum": 0, + "type": "number" + }, + "value": { + "description": "The extracted field value, supplied as text or a number before receipt normalization.", + "oneOf": [ + { + "maxLength": 80, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "value" + ], + "type": "object" + } + ] + }, + "unit_price": { + "description": "Price per unit for this line item, in the receipt currency. Supply the extracted value directly or wrap it with optional extraction confidence.", + "oneOf": [ + { + "maxLength": 80, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", + "maximum": 100, + "minimum": 0, + "type": "number" + }, + "value": { + "description": "The extracted field value, supplied as text or a number before receipt normalization.", + "oneOf": [ + { + "maxLength": 80, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "value" + ], + "type": "object" + } + ] + } + }, + "type": "object" + }, + "maxItems": 100, + "type": "array" + }, + "purchase_date": { + "description": "Purchase date as extracted; YYYY-MM-DD is recommended. Supply the extracted value directly or wrap it with optional extraction confidence.", + "oneOf": [ + { + "maxLength": 10, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", + "maximum": 100, + "minimum": 0, + "type": "number" + }, + "value": { + "description": "The extracted field value, supplied as text or a number before receipt normalization.", + "oneOf": [ + { + "maxLength": 10, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "value" + ], + "type": "object" + } + ] + }, + "purchase_order": { + "description": "Purchase-order reference printed on the receipt; this does not select or link an Ardaro job. Supply the extracted value directly or wrap it with optional extraction confidence.", + "oneOf": [ + { + "maxLength": 160, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", + "maximum": 100, + "minimum": 0, + "type": "number" + }, + "value": { + "description": "The extracted field value, supplied as text or a number before receipt normalization.", + "oneOf": [ + { + "maxLength": 160, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "value" + ], + "type": "object" + } + ] + }, + "receipt_reference": { + "description": "Receipt, invoice, or transaction reference printed on the document. Supply the extracted value directly or wrap it with optional extraction confidence.", + "oneOf": [ + { + "maxLength": 160, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", + "maximum": 100, + "minimum": 0, + "type": "number" + }, + "value": { + "description": "The extracted field value, supplied as text or a number before receipt normalization.", + "oneOf": [ + { + "maxLength": 160, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "value" + ], + "type": "object" + } + ] + }, + "subtotal": { + "description": "Receipt subtotal before tax, in the receipt currency. Supply the extracted value directly or wrap it with optional extraction confidence.", + "oneOf": [ + { + "maxLength": 32, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", + "maximum": 100, + "minimum": 0, + "type": "number" + }, + "value": { + "description": "The extracted field value, supplied as text or a number before receipt normalization.", + "oneOf": [ + { + "maxLength": 32, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "value" + ], + "type": "object" + } + ] + }, + "tax": { + "description": "Total tax amount printed on the receipt, in the receipt currency. Supply the extracted value directly or wrap it with optional extraction confidence.", + "oneOf": [ + { + "maxLength": 32, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", + "maximum": 100, + "minimum": 0, + "type": "number" + }, + "value": { + "description": "The extracted field value, supplied as text or a number before receipt normalization.", + "oneOf": [ + { + "maxLength": 32, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "value" + ], + "type": "object" + } + ] + }, + "total": { + "description": "Final receipt total, in the receipt currency. Supply the extracted value directly or wrap it with optional extraction confidence.", + "oneOf": [ + { + "maxLength": 32, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", + "maximum": 100, + "minimum": 0, + "type": "number" + }, + "value": { + "description": "The extracted field value, supplied as text or a number before receipt normalization.", + "oneOf": [ + { + "maxLength": 32, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "value" + ], + "type": "object" + } + ] + }, + "vendor": { + "description": "Merchant or supplier name printed on the receipt. Supply the extracted value directly or wrap it with optional extraction confidence.", + "oneOf": [ + { + "maxLength": 160, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", + "maximum": 100, + "minimum": 0, + "type": "number" + }, + "value": { + "description": "The extracted field value, supplied as text or a number before receipt normalization.", + "oneOf": [ + { + "maxLength": 160, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "value" + ], + "type": "object" + } + ] + } + }, + "type": "object" + }, + "kind": { + "const": "structured", + "description": "Selects structured receipt input; supply the analysis property." + } + }, + "required": [ + "kind", + "analysis" + ], + "type": "object" + } + ] + } + }, + "required": [ + "contract_version", + "input", + "existing_fingerprints" + ], + "type": "object" + }, + "synthetic_only": { + "const": true + } + }, + "required": [ + "example_version", + "synthetic_only", + "paid_processing_performed", + "input_description", + "request", + "expected_response", + "limits" + ], + "type": "object" + }, + "service": { + "const": "receipt" + } + }, + "required": [ + "service", + "details" + ], + "type": "object" + } +]
- Changed
get_document_service_status3 fields changed- changed
Input schema / properties / service / descriptionPrevious value: -"receipt: extraction checks; invoice: paid invoice-to-PO quantity allocation; reconciliation: free three-document discrepancy checks without allocation. Choose one service; examples do not process caller documents."New value: +"receipt: extraction checks. Examples do not process caller documents." - changed
Input schema / properties / service / enumPrevious value: -[ - "receipt", - "invoice", - "reconciliation" -]New value: +[ + "receipt" +] - changed
Output schema / oneOfPrevious value: -[ - { - "additionalProperties": false, - "properties": { - "details": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "additionalProperties": false, - "properties": { - "availability": { - "additionalProperties": false, - "description": "Cached runtime readiness, not a fresh external probe or settlement proof.", - "properties": { - "ready": { - "description": "Whether the launch gate and cached dependencies currently allow paid processing.", - "type": "boolean" - }, - "reason": { - "description": "Coarse public readiness reason; contains no internal error details.", - "enum": [ - "ready", - "launch_gate_closed", - "dependency_unavailable", - "not_configured" - ] - }, - "source": { - "const": "cached_runtime_readiness" - } - }, - "required": [ - "ready", - "reason", - "source" - ], - "type": "object" - }, - "limits": { - "additionalProperties": false, - "properties": { - "max_existing_fingerprints": { - "minimum": 1, - "type": "integer" - }, - "max_line_items": { - "minimum": 1, - "type": "integer" - }, - "max_pages": { - "minimum": 1, - "type": "integer" - }, - "max_request_bytes": { - "minimum": 1, - "type": "integer" - }, - "max_text_characters": { - "minimum": 1, - "type": "integer" - }, - "normal_latency_target_ms": { - "minimum": 1, - "type": "integer" - }, - "request_timeout_ms": { - "minimum": 1, - "type": "integer" - } - }, - "required": [ - "max_existing_fingerprints", - "max_line_items", - "max_pages", - "max_request_bytes", - "max_text_characters", - "normal_latency_target_ms", - "request_timeout_ms" - ], - "type": "object" - }, - "paid_processing_performed": { - "const": false - }, - "payment_authorized": { - "const": false - }, - "policy": { - "additionalProperties": false, - "properties": { - "advisory_only": { - "const": true - }, - "ardaro_saas_tenant_access": { - "const": false - }, - "financial_mutation_supported": { - "const": false - }, - "human_review_required": { - "const": true - } - }, - "required": [ - "advisory_only", - "human_review_required", - "financial_mutation_supported", - "ardaro_saas_tenant_access" - ], - "type": "object" - }, - "price": { - "additionalProperties": false, - "properties": { - "amount": { - "pattern": "^[0-9]+\\.[0-9]{2}$", - "type": "string" - }, - "currency": { - "const": "USDC" - }, - "display": { - "pattern": "^\\$[0-9]+\\.[0-9]{2}$", - "type": "string" - }, - "failed_input_validation_charged": { - "const": false - }, - "model": { - "const": "fixed_per_accepted_request" - }, - "network": { - "type": "string" - }, - "same_payment_identifier_replay_requires_new_payment": { - "const": false - }, - "successful_response_loss_retry_policy": { - "type": "string" - } - }, - "required": [ - "model", - "amount", - "currency", - "display", - "network", - "failed_input_validation_charged", - "same_payment_identifier_replay_requires_new_payment", - "successful_response_loss_retry_policy" - ], - "type": "object" - }, - "retention": { - "additionalProperties": false, - "properties": { - "default_retention_seconds": { - "minimum": 1, - "type": "integer" - }, - "deletion_behavior": { - "type": "string" - }, - "durable_recovery_supported": { - "type": "boolean" - }, - "extracted_results_retained": { - "type": "boolean" - }, - "payment_metadata_retention_seconds": { - "minimum": 86400, - "type": "integer" - }, - "raw_documents_retained": { - "const": false - }, - "raw_receipt_images_retained": { - "const": false - }, - "storage_scope": { - "type": "string" - }, - "used_for_model_training": { - "const": false - } - }, - "required": [ - "default_retention_seconds", - "deletion_behavior", - "durable_recovery_supported", - "extracted_results_retained", - "payment_metadata_retention_seconds", - "raw_documents_retained", - "raw_receipt_images_retained", - "storage_scope", - "used_for_model_training" - ], - "type": "object" - }, - "service_id": { - "const": "ardaro.receipt_intelligence" - }, - "status_version": { - "const": "ardaro.receipt-intelligence.service-status.v1" - }, - "supported_input_types": { - "items": { - "additionalProperties": false, - "properties": { - "description": { - "type": "string" - }, - "input_kind": { - "enum": [ - "text", - "structured" - ] - }, - "mime_type": { - "type": "string" - } - }, - "required": [ - "mime_type", - "input_kind", - "description" - ], - "type": "object" - }, - "minItems": 1, - "type": "array" - } - }, - "required": [ - "availability", - "limits", - "paid_processing_performed", - "payment_authorized", - "policy", - "price", - "retention", - "service_id", - "status_version", - "supported_input_types" - ], - "type": "object" - }, - "service": { - "const": "receipt" - } - }, - "required": [ - "service", - "details" - ], - "type": "object" - }, - { - "additionalProperties": false, - "properties": { - "details": { - "additionalProperties": false, - "allOf": [ - { - "else": { - "properties": { - "reason": { - "enum": [ - "launch_gated", - "dependency_unavailable" - ] - } - } - }, - "if": { - "properties": { - "ready": { - "const": true - } - } - }, - "then": { - "properties": { - "reason": { - "const": "ready" - } - } - } - } - ], - "properties": { - "endpoints": { - "additionalProperties": false, - "properties": { - "analyze": { - "format": "uri", - "maxLength": 600, - "minLength": 1, - "not": { - "pattern": "\\n" - }, - "pattern": "^https?://[^/?#]+/v1/invoice-matching/analyze$", - "type": "string" - }, - "example": { - "format": "uri", - "maxLength": 600, - "minLength": 1, - "not": { - "pattern": "\\n" - }, - "pattern": "^https?://[^/?#]+/agent-services/invoice-matching/example$", - "type": "string" - }, - "mcp": { - "format": "uri", - "maxLength": 600, - "minLength": 1, - "not": { - "pattern": "\\n" - }, - "pattern": "^https?://[^/?#]+/mcp$", - "type": "string" - }, - "status": { - "format": "uri", - "maxLength": 600, - "minLength": 1, - "not": { - "pattern": "\\n" - }, - "pattern": "^https?://[^/?#]+/agent-services/invoice-matching/status$", - "type": "string" - } - }, - "required": [ - "analyze", - "mcp", - "example", - "status" - ], - "type": "object" - }, - "limits": { - "additionalProperties": false, - "properties": { - "max_invoice_line_items": { - "const": 100 - }, - "max_mcp_response_bytes": { - "const": 2097152 - }, - "max_purchase_order_line_items": { - "const": 100 - }, - "max_request_bytes": { - "const": 262144 - }, - "max_response_bytes": { - "const": 1048576 - }, - "supported_currencies": { - "const": [ - "AUD", - "CAD", - "EUR", - "GBP", - "JPY", - "MXN", - "USD" - ] - } - }, - "required": [ - "max_request_bytes", - "max_invoice_line_items", - "max_purchase_order_line_items", - "max_response_bytes", - "max_mcp_response_bytes", - "supported_currencies" - ], - "type": "object" - }, - "policy": { - "additionalProperties": false, - "properties": { - "advisory_only": { - "const": true - }, - "ardaro_saas_tenant_access": { - "const": false - }, - "delivery_verification_supported": { - "const": false - }, - "document_authentication_supported": { - "const": false - }, - "financial_mutation_supported": { - "const": false - }, - "human_review_required": { - "const": true - }, - "ocr_supported": { - "const": false - }, - "prior_invoice_reconciliation_supported": { - "const": false - }, - "tax_validation_supported": { - "const": false - } - }, - "required": [ - "advisory_only", - "human_review_required", - "financial_mutation_supported", - "ardaro_saas_tenant_access", - "ocr_supported", - "delivery_verification_supported", - "prior_invoice_reconciliation_supported", - "tax_validation_supported", - "document_authentication_supported" - ], - "type": "object" - }, - "price": { - "additionalProperties": false, - "properties": { - "amount": { - "const": "0.50" - }, - "amount_atomic": { - "const": "500000" - }, - "currency": { - "const": "USDC" - }, - "display": { - "const": "$0.50" - }, - "failed_input_validation_charged": { - "const": false - }, - "model": { - "const": "fixed_per_accepted_request" - }, - "network": { - "enum": [ - "eip155:8453", - "eip155:84532" - ] - }, - "same_payment_identifier_replay_requires_new_payment": { - "const": false - }, - "successful_response_loss_retry_policy": { - "const": "Retry only the identical signed payment, payment identifier and request. Never create a new signature for an unknown outcome." - } - }, - "required": [ - "model", - "amount", - "amount_atomic", - "currency", - "network", - "display", - "failed_input_validation_charged", - "same_payment_identifier_replay_requires_new_payment", - "successful_response_loss_retry_policy" - ], - "type": "object" - }, - "ready": { - "type": "boolean" - }, - "reason": { - "enum": [ - "ready", - "launch_gated", - "dependency_unavailable" - ] - }, - "retention": { - "additionalProperties": false, - "properties": { - "in_process_result_cache_seconds": { - "maximum": 86400, - "minimum": 1, - "type": "integer" - }, - "payment_metadata_retention_seconds": { - "maximum": 315360000, - "minimum": 86400, - "type": "integer" - }, - "raw_documents_persisted": { - "const": false - }, - "sales_accounting": { - "const": "Content-free pseudonymous invoice sales are accounted for separately from receipt sales." - } - }, - "required": [ - "raw_documents_persisted", - "in_process_result_cache_seconds", - "payment_metadata_retention_seconds", - "sales_accounting" - ], - "type": "object" - }, - "service_id": { - "const": "ardaro.invoice_matching" - }, - "settlement_proven": { - "const": false - }, - "status_version": { - "const": "ardaro.invoice-matching.service-status.v1" - } - }, - "required": [ - "status_version", - "service_id", - "ready", - "reason", - "price", - "limits", - "retention", - "policy", - "settlement_proven", - "endpoints" - ], - "type": "object" - }, - "service": { - "const": "invoice" - } - }, - "required": [ - "service", - "details" - ], - "type": "object" - }, - { - "additionalProperties": false, - "properties": { - "details": { - "additionalProperties": false, - "properties": { - "financial_posting_performed": { - "const": false - }, - "human_review_required": { - "const": true - }, - "input": { - "type": "string" - }, - "price": { - "const": "free" - }, - "ready": { - "const": true - }, - "retention": { - "type": "string" - } - }, - "required": [ - "ready", - "price", - "input", - "retention", - "human_review_required", - "financial_posting_performed" - ], - "type": "object" - }, - "service": { - "const": "reconciliation" - } - }, - "required": [ - "service", - "details" - ], - "type": "object" - } -]New value: +[ + { + "additionalProperties": false, + "properties": { + "details": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "properties": { + "availability": { + "additionalProperties": false, + "description": "Cached runtime readiness, not a fresh external probe or settlement proof.", + "properties": { + "ready": { + "description": "Whether the launch gate and cached dependencies currently allow paid processing.", + "type": "boolean" + }, + "reason": { + "description": "Coarse public readiness reason; contains no internal error details.", + "enum": [ + "ready", + "launch_gate_closed", + "dependency_unavailable", + "not_configured" + ] + }, + "source": { + "const": "cached_runtime_readiness" + } + }, + "required": [ + "ready", + "reason", + "source" + ], + "type": "object" + }, + "limits": { + "additionalProperties": false, + "properties": { + "max_existing_fingerprints": { + "minimum": 1, + "type": "integer" + }, + "max_line_items": { + "minimum": 1, + "type": "integer" + }, + "max_pages": { + "minimum": 1, + "type": "integer" + }, + "max_request_bytes": { + "minimum": 1, + "type": "integer" + }, + "max_text_characters": { + "minimum": 1, + "type": "integer" + }, + "normal_latency_target_ms": { + "minimum": 1, + "type": "integer" + }, + "request_timeout_ms": { + "minimum": 1, + "type": "integer" + } + }, + "required": [ + "max_existing_fingerprints", + "max_line_items", + "max_pages", + "max_request_bytes", + "max_text_characters", + "normal_latency_target_ms", + "request_timeout_ms" + ], + "type": "object" + }, + "paid_processing_performed": { + "const": false + }, + "payment_authorized": { + "const": false + }, + "policy": { + "additionalProperties": false, + "properties": { + "advisory_only": { + "const": true + }, + "ardaro_saas_tenant_access": { + "const": false + }, + "financial_mutation_supported": { + "const": false + }, + "human_review_required": { + "const": true + } + }, + "required": [ + "advisory_only", + "human_review_required", + "financial_mutation_supported", + "ardaro_saas_tenant_access" + ], + "type": "object" + }, + "price": { + "additionalProperties": false, + "properties": { + "amount": { + "pattern": "^[0-9]+\\.[0-9]{2}$", + "type": "string" + }, + "currency": { + "const": "USDC" + }, + "display": { + "pattern": "^\\$[0-9]+\\.[0-9]{2}$", + "type": "string" + }, + "failed_input_validation_charged": { + "const": false + }, + "model": { + "const": "fixed_per_accepted_request" + }, + "network": { + "type": "string" + }, + "same_payment_identifier_replay_requires_new_payment": { + "const": false + }, + "successful_response_loss_retry_policy": { + "type": "string" + } + }, + "required": [ + "model", + "amount", + "currency", + "display", + "network", + "failed_input_validation_charged", + "same_payment_identifier_replay_requires_new_payment", + "successful_response_loss_retry_policy" + ], + "type": "object" + }, + "retention": { + "additionalProperties": false, + "properties": { + "default_retention_seconds": { + "minimum": 1, + "type": "integer" + }, + "deletion_behavior": { + "type": "string" + }, + "durable_recovery_supported": { + "type": "boolean" + }, + "extracted_results_retained": { + "type": "boolean" + }, + "payment_metadata_retention_seconds": { + "minimum": 86400, + "type": "integer" + }, + "raw_documents_retained": { + "const": false + }, + "raw_receipt_images_retained": { + "const": false + }, + "storage_scope": { + "type": "string" + }, + "used_for_model_training": { + "const": false + } + }, + "required": [ + "default_retention_seconds", + "deletion_behavior", + "durable_recovery_supported", + "extracted_results_retained", + "payment_metadata_retention_seconds", + "raw_documents_retained", + "raw_receipt_images_retained", + "storage_scope", + "used_for_model_training" + ], + "type": "object" + }, + "service_id": { + "const": "ardaro.receipt_intelligence" + }, + "status_version": { + "const": "ardaro.receipt-intelligence.service-status.v1" + }, + "supported_input_types": { + "items": { + "additionalProperties": false, + "properties": { + "description": { + "type": "string" + }, + "input_kind": { + "enum": [ + "text", + "structured" + ] + }, + "mime_type": { + "type": "string" + } + }, + "required": [ + "mime_type", + "input_kind", + "description" + ], + "type": "object" + }, + "minItems": 1, + "type": "array" + } + }, + "required": [ + "availability", + "limits", + "paid_processing_performed", + "payment_authorized", + "policy", + "price", + "retention", + "service_id", + "status_version", + "supported_input_types" + ], + "type": "object" + }, + "service": { + "const": "receipt" + } + }, + "required": [ + "service", + "details" + ], + "type": "object" + } +]
- Removed
match_invoice - Removed
reconcile_purchase_documents
4 tool updates
- Changed
get_document_example1 field changed- changed
Output schema / oneOfPrevious value: -[ - { - "additionalProperties": false, - "properties": { - "details": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "additionalProperties": false, - "properties": { - "example_version": { - "const": "ardaro.receipt-intelligence.example.v1" - }, - "expected_response": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "additionalProperties": false, - "description": "Receipt Intelligence v1 response. result is authoritative; receipt is a derived compatibility projection that MUST match result.", - "properties": { - "arithmetic_consistency": { - "enum": [ - "verified", - "mismatch", - "unavailable" - ] - }, - "arithmetic_verified": { - "type": [ - "boolean", - "null" - ] - }, - "confidence": { - "type": "object" - }, - "contract_version": { - "const": "ardaro.agent-receipt-intelligence.response.v1" - }, - "duplicate_check": { - "type": "object" - }, - "duplicate_fingerprint": { - "pattern": "^[0-9a-f]{64}$", - "type": [ - "string", - "null" - ] - }, - "engine": { - "type": "object" - }, - "identities": { - "additionalProperties": false, - "properties": { - "analysis_result_identity": { - "pattern": "^res_[0-9a-f]{64}$", - "type": "string" - }, - "document_fingerprint": { - "pattern": "^[0-9a-f]{64}$", - "type": [ - "string", - "null" - ] - }, - "request_identity": { - "pattern": "^req_[0-9a-f]{64}$", - "type": "string" - } - }, - "required": [ - "request_identity", - "document_fingerprint", - "analysis_result_identity" - ], - "type": "object" - }, - "metering": { - "type": "object" - }, - "payment_identity": { - "additionalProperties": false, - "properties": { - "protocol": { - "const": "x402-v2" - }, - "reference": { - "pattern": "^pay_[0-9a-f]{64}$", - "type": "string" - }, - "replayed": { - "type": "boolean" - } - }, - "required": [ - "protocol", - "reference", - "replayed" - ], - "type": "object" - }, - "policy": { - "type": "object" - }, - "receipt": { - "additionalProperties": false, - "description": "Non-authoritative compatibility projection generated from result under ardaro.result-receipt-projection.v1. Consumers MUST use result for structured receipt values and reject a response when this projection diverges.", - "properties": { - "line_items": { - "items": { - "additionalProperties": false, - "properties": { - "amount": { - "oneOf": [ - { - "type": "null" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "additionalProperties": false, - "properties": { - "level": { - "enum": [ - "high", - "medium", - "low" - ] - }, - "score": { - "maximum": 1, - "minimum": 0, - "type": "number" - } - }, - "required": [ - "score", - "level" - ], - "type": "object" - }, - "source": { - "enum": [ - "structured_summary", - "structured_line_item", - "provider_neutral", - "text_fallback", - "inferred" - ] - }, - "value": { - "maxLength": 80, - "minLength": 1, - "type": "string" - } - }, - "required": [ - "value", - "confidence", - "source" - ], - "type": "object" - } - ] - }, - "description": { - "oneOf": [ - { - "type": "null" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "additionalProperties": false, - "properties": { - "level": { - "enum": [ - "high", - "medium", - "low" - ] - }, - "score": { - "maximum": 1, - "minimum": 0, - "type": "number" - } - }, - "required": [ - "score", - "level" - ], - "type": "object" - }, - "source": { - "enum": [ - "structured_summary", - "structured_line_item", - "provider_neutral", - "text_fallback", - "inferred" - ] - }, - "value": { - "maxLength": 240, - "minLength": 1, - "type": "string" - } - }, - "required": [ - "value", - "confidence", - "source" - ], - "type": "object" - } - ] - }, - "product_code": { - "oneOf": [ - { - "type": "null" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "additionalProperties": false, - "properties": { - "level": { - "enum": [ - "high", - "medium", - "low" - ] - }, - "score": { - "maximum": 1, - "minimum": 0, - "type": "number" - } - }, - "required": [ - "score", - "level" - ], - "type": "object" - }, - "source": { - "enum": [ - "structured_summary", - "structured_line_item", - "provider_neutral", - "text_fallback", - "inferred" - ] - }, - "value": { - "maxLength": 80, - "minLength": 1, - "type": "string" - } - }, - "required": [ - "value", - "confidence", - "source" - ], - "type": "object" - } - ] - }, - "quantity": { - "oneOf": [ - { - "type": "null" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "additionalProperties": false, - "properties": { - "level": { - "enum": [ - "high", - "medium", - "low" - ] - }, - "score": { - "maximum": 1, - "minimum": 0, - "type": "number" - } - }, - "required": [ - "score", - "level" - ], - "type": "object" - }, - "source": { - "enum": [ - "structured_summary", - "structured_line_item", - "provider_neutral", - "text_fallback", - "inferred" - ] - }, - "value": { - "maxLength": 80, - "minLength": 1, - "type": "string" - } - }, - "required": [ - "value", - "confidence", - "source" - ], - "type": "object" - } - ] - }, - "unit_price": { - "oneOf": [ - { - "type": "null" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "additionalProperties": false, - "properties": { - "level": { - "enum": [ - "high", - "medium", - "low" - ] - }, - "score": { - "maximum": 1, - "minimum": 0, - "type": "number" - } - }, - "required": [ - "score", - "level" - ], - "type": "object" - }, - "source": { - "enum": [ - "structured_summary", - "structured_line_item", - "provider_neutral", - "text_fallback", - "inferred" - ] - }, - "value": { - "maxLength": 80, - "minLength": 1, - "type": "string" - } - }, - "required": [ - "value", - "confidence", - "source" - ], - "type": "object" - } - ] - } - }, - "required": [ - "description", - "product_code", - "quantity", - "unit_price", - "amount" - ], - "type": "object" - }, - "maxItems": 100, - "type": "array" - }, - "purchase_date": { - "oneOf": [ - { - "type": "null" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "additionalProperties": false, - "properties": { - "level": { - "enum": [ - "high", - "medium", - "low" - ] - }, - "score": { - "maximum": 1, - "minimum": 0, - "type": "number" - } - }, - "required": [ - "score", - "level" - ], - "type": "object" - }, - "source": { - "enum": [ - "structured_summary", - "structured_line_item", - "provider_neutral", - "text_fallback", - "inferred" - ] - }, - "value": { - "maxLength": 10, - "minLength": 1, - "type": "string" - } - }, - "required": [ - "value", - "confidence", - "source" - ], - "type": "object" - } - ] - }, - "purchase_order": { - "additionalProperties": false, - "properties": { - "confidence": { - "additionalProperties": false, - "properties": { - "level": { - "enum": [ - "high", - "medium", - "low" - ] - }, - "score": { - "maximum": 1, - "minimum": 0, - "type": "number" - } - }, - "required": [ - "score", - "level" - ], - "type": "object" - }, - "source": { - "enum": [ - "structured_summary", - "structured_line_item", - "provider_neutral", - "text_fallback", - "inferred" - ] - }, - "value": { - "maxLength": 160, - "minLength": 1, - "type": "string" - } - }, - "required": [ - "value", - "confidence", - "source" - ], - "type": "object" - }, - "receipt_reference": { - "additionalProperties": false, - "properties": { - "confidence": { - "additionalProperties": false, - "properties": { - "level": { - "enum": [ - "high", - "medium", - "low" - ] - }, - "score": { - "maximum": 1, - "minimum": 0, - "type": "number" - } - }, - "required": [ - "score", - "level" - ], - "type": "object" - }, - "source": { - "enum": [ - "structured_summary", - "structured_line_item", - "provider_neutral", - "text_fallback", - "inferred" - ] - }, - "value": { - "maxLength": 160, - "minLength": 1, - "type": "string" - } - }, - "required": [ - "value", - "confidence", - "source" - ], - "type": "object" - }, - "totals": { - "additionalProperties": false, - "properties": { - "currency": { - "oneOf": [ - { - "type": "null" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "additionalProperties": false, - "properties": { - "level": { - "enum": [ - "high", - "medium", - "low" - ] - }, - "score": { - "maximum": 1, - "minimum": 0, - "type": "number" - } - }, - "required": [ - "score", - "level" - ], - "type": "object" - }, - "source": { - "enum": [ - "structured_summary", - "structured_line_item", - "provider_neutral", - "text_fallback", - "inferred" - ] - }, - "value": { - "maxLength": 3, - "minLength": 1, - "type": "string" - } - }, - "required": [ - "value", - "confidence", - "source" - ], - "type": "object" - } - ] - }, - "subtotal": { - "oneOf": [ - { - "type": "null" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "additionalProperties": false, - "properties": { - "level": { - "enum": [ - "high", - "medium", - "low" - ] - }, - "score": { - "maximum": 1, - "minimum": 0, - "type": "number" - } - }, - "required": [ - "score", - "level" - ], - "type": "object" - }, - "source": { - "enum": [ - "structured_summary", - "structured_line_item", - "provider_neutral", - "text_fallback", - "inferred" - ] - }, - "value": { - "maxLength": 32, - "minLength": 1, - "type": "string" - } - }, - "required": [ - "value", - "confidence", - "source" - ], - "type": "object" - } - ] - }, - "tax": { - "oneOf": [ - { - "type": "null" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "additionalProperties": false, - "properties": { - "level": { - "enum": [ - "high", - "medium", - "low" - ] - }, - "score": { - "maximum": 1, - "minimum": 0, - "type": "number" - } - }, - "required": [ - "score", - "level" - ], - "type": "object" - }, - "source": { - "enum": [ - "structured_summary", - "structured_line_item", - "provider_neutral", - "text_fallback", - "inferred" - ] - }, - "value": { - "maxLength": 32, - "minLength": 1, - "type": "string" - } - }, - "required": [ - "value", - "confidence", - "source" - ], - "type": "object" - } - ] - }, - "total": { - "oneOf": [ - { - "type": "null" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "additionalProperties": false, - "properties": { - "level": { - "enum": [ - "high", - "medium", - "low" - ] - }, - "score": { - "maximum": 1, - "minimum": 0, - "type": "number" - } - }, - "required": [ - "score", - "level" - ], - "type": "object" - }, - "source": { - "enum": [ - "structured_summary", - "structured_line_item", - "provider_neutral", - "text_fallback", - "inferred" - ] - }, - "value": { - "maxLength": 32, - "minLength": 1, - "type": "string" - } - }, - "required": [ - "value", - "confidence", - "source" - ], - "type": "object" - } - ] - } - }, - "required": [ - "subtotal", - "tax", - "total", - "currency" - ], - "type": "object" - }, - "vendor": { - "oneOf": [ - { - "type": "null" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "additionalProperties": false, - "properties": { - "level": { - "enum": [ - "high", - "medium", - "low" - ] - }, - "score": { - "maximum": 1, - "minimum": 0, - "type": "number" - } - }, - "required": [ - "score", - "level" - ], - "type": "object" - }, - "source": { - "enum": [ - "structured_summary", - "structured_line_item", - "provider_neutral", - "text_fallback", - "inferred" - ] - }, - "value": { - "maxLength": 160, - "minLength": 1, - "type": "string" - } - }, - "required": [ - "value", - "confidence", - "source" - ], - "type": "object" - } - ] - } - }, - "required": [ - "vendor", - "purchase_date", - "totals", - "line_items" - ], - "type": "object" - }, - "result": { - "additionalProperties": false, - "description": "Sole authoritative structured analysis object. Its recursively key-sorted, compact UTF-8 JSON bytes are SHA-256 hashed under ardaro.recursive-key-sort-compact-json-utf8-sha256.v1 and published as analysis_result_identity.", - "properties": { - "extracted_facts": { - "additionalProperties": false, - "properties": { - "line_items": { - "items": { - "additionalProperties": false, - "properties": { - "amount": { - "oneOf": [ - { - "type": "null" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "additionalProperties": false, - "properties": { - "level": { - "enum": [ - "high", - "medium", - "low" - ] - }, - "score": { - "maximum": 1, - "minimum": 0, - "type": "number" - } - }, - "required": [ - "score", - "level" - ], - "type": "object" - }, - "source": { - "enum": [ - "structured_summary", - "structured_line_item", - "provider_neutral", - "text_fallback", - "inferred" - ] - }, - "value": { - "maxLength": 80, - "minLength": 1, - "type": "string" - } - }, - "required": [ - "value", - "confidence", - "source" - ], - "type": "object" - } - ] - }, - "description": { - "oneOf": [ - { - "type": "null" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "additionalProperties": false, - "properties": { - "level": { - "enum": [ - "high", - "medium", - "low" - ] - }, - "score": { - "maximum": 1, - "minimum": 0, - "type": "number" - } - }, - "required": [ - "score", - "level" - ], - "type": "object" - }, - "source": { - "enum": [ - "structured_summary", - "structured_line_item", - "provider_neutral", - "text_fallback", - "inferred" - ] - }, - "value": { - "maxLength": 240, - "minLength": 1, - "type": "string" - } - }, - "required": [ - "value", - "confidence", - "source" - ], - "type": "object" - } - ] - }, - "product_code": { - "oneOf": [ - { - "type": "null" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "additionalProperties": false, - "properties": { - "level": { - "enum": [ - "high", - "medium", - "low" - ] - }, - "score": { - "maximum": 1, - "minimum": 0, - "type": "number" - } - }, - "required": [ - "score", - "level" - ], - "type": "object" - }, - "source": { - "enum": [ - "structured_summary", - "structured_line_item", - "provider_neutral", - "text_fallback", - "inferred" - ] - }, - "value": { - "maxLength": 80, - "minLength": 1, - "type": "string" - } - }, - "required": [ - "value", - "confidence", - "source" - ], - "type": "object" - } - ] - }, - "quantity": { - "oneOf": [ - { - "type": "null" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "additionalProperties": false, - "properties": { - "level": { - "enum": [ - "high", - "medium", - "low" - ] - }, - "score": { - "maximum": 1, - "minimum": 0, - "type": "number" - } - }, - "required": [ - "score", - "level" - ], - "type": "object" - }, - "source": { - "enum": [ - "structured_summary", - "structured_line_item", - "provider_neutral", - "text_fallback", - "inferred" - ] - }, - "value": { - "maxLength": 80, - "minLength": 1, - "type": "string" - } - }, - "required": [ - "value", - "confidence", - "source" - ], - "type": "object" - } - ] - }, - "unit_price": { - "oneOf": [ - { - "type": "null" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "additionalProperties": false, - "properties": { - "level": { - "enum": [ - "high", - "medium", - "low" - ] - }, - "score": { - "maximum": 1, - "minimum": 0, - "type": "number" - } - }, - "required": [ - "score", - "level" - ], - "type": "object" - }, - "source": { - "enum": [ - "structured_summary", - "structured_line_item", - "provider_neutral", - "text_fallback", - "inferred" - ] - }, - "value": { - "maxLength": 80, - "minLength": 1, - "type": "string" - } - }, - "required": [ - "value", - "confidence", - "source" - ], - "type": "object" - } - ] - } - }, - "required": [ - "description", - "product_code", - "quantity", - "unit_price", - "amount" - ], - "type": "object" - }, - "maxItems": 100, - "type": "array" - }, - "purchase_date": { - "additionalProperties": false, - "properties": { - "confidence": { - "additionalProperties": false, - "properties": { - "level": { - "enum": [ - "high", - "medium", - "low" - ] - }, - "score": { - "maximum": 1, - "minimum": 0, - "type": "number" - } - }, - "required": [ - "score", - "level" - ], - "type": "object" - }, - "source": { - "enum": [ - "structured_summary", - "structured_line_item", - "provider_neutral", - "text_fallback", - "inferred" - ] - }, - "value": { - "maxLength": 10, - "minLength": 1, - "type": "string" - } - }, - "required": [ - "value", - "confidence", - "source" - ], - "type": "object" - }, - "purchase_order": { - "additionalProperties": false, - "properties": { - "confidence": { - "additionalProperties": false, - "properties": { - "level": { - "enum": [ - "high", - "medium", - "low" - ] - }, - "score": { - "maximum": 1, - "minimum": 0, - "type": "number" - } - }, - "required": [ - "score", - "level" - ], - "type": "object" - }, - "source": { - "enum": [ - "structured_summary", - "structured_line_item", - "provider_neutral", - "text_fallback", - "inferred" - ] - }, - "value": { - "maxLength": 160, - "minLength": 1, - "type": "string" - } - }, - "required": [ - "value", - "confidence", - "source" - ], - "type": "object" - }, - "receipt_reference": { - "additionalProperties": false, - "properties": { - "confidence": { - "additionalProperties": false, - "properties": { - "level": { - "enum": [ - "high", - "medium", - "low" - ] - }, - "score": { - "maximum": 1, - "minimum": 0, - "type": "number" - } - }, - "required": [ - "score", - "level" - ], - "type": "object" - }, - "source": { - "enum": [ - "structured_summary", - "structured_line_item", - "provider_neutral", - "text_fallback", - "inferred" - ] - }, - "value": { - "maxLength": 160, - "minLength": 1, - "type": "string" - } - }, - "required": [ - "value", - "confidence", - "source" - ], - "type": "object" - }, - "totals.currency": { - "additionalProperties": false, - "properties": { - "confidence": { - "additionalProperties": false, - "properties": { - "level": { - "enum": [ - "high", - "medium", - "low" - ] - }, - "score": { - "maximum": 1, - "minimum": 0, - "type": "number" - } - }, - "required": [ - "score", - "level" - ], - "type": "object" - }, - "source": { - "enum": [ - "structured_summary", - "structured_line_item", - "provider_neutral", - "text_fallback", - "inferred" - ] - }, - "value": { - "maxLength": 3, - "minLength": 1, - "type": "string" - } - }, - "required": [ - "value", - "confidence", - "source" - ], - "type": "object" - }, - "totals.subtotal": { - "additionalProperties": false, - "properties": { - "confidence": { - "additionalProperties": false, - "properties": { - "level": { - "enum": [ - "high", - "medium", - "low" - ] - }, - "score": { - "maximum": 1, - "minimum": 0, - "type": "number" - } - }, - "required": [ - "score", - "level" - ], - "type": "object" - }, - "source": { - "enum": [ - "structured_summary", - "structured_line_item", - "provider_neutral", - "text_fallback", - "inferred" - ] - }, - "value": { - "maxLength": 32, - "minLength": 1, - "type": "string" - } - }, - "required": [ - "value", - "confidence", - "source" - ], - "type": "object" - }, - "totals.tax": { - "additionalProperties": false, - "properties": { - "confidence": { - "additionalProperties": false, - "properties": { - "level": { - "enum": [ - "high", - "medium", - "low" - ] - }, - "score": { - "maximum": 1, - "minimum": 0, - "type": "number" - } - }, - "required": [ - "score", - "level" - ], - "type": "object" - }, - "source": { - "enum": [ - "structured_summary", - "structured_line_item", - "provider_neutral", - "text_fallback", - "inferred" - ] - }, - "value": { - "maxLength": 32, - "minLength": 1, - "type": "string" - } - }, - "required": [ - "value", - "confidence", - "source" - ], - "type": "object" - }, - "totals.total": { - "additionalProperties": false, - "properties": { - "confidence": { - "additionalProperties": false, - "properties": { - "level": { - "enum": [ - "high", - "medium", - "low" - ] - }, - "score": { - "maximum": 1, - "minimum": 0, - "type": "number" - } - }, - "required": [ - "score", - "level" - ], - "type": "object" - }, - "source": { - "enum": [ - "structured_summary", - "structured_line_item", - "provider_neutral", - "text_fallback", - "inferred" - ] - }, - "value": { - "maxLength": 32, - "minLength": 1, - "type": "string" - } - }, - "required": [ - "value", - "confidence", - "source" - ], - "type": "object" - }, - "vendor": { - "additionalProperties": false, - "properties": { - "confidence": { - "additionalProperties": false, - "properties": { - "level": { - "enum": [ - "high", - "medium", - "low" - ] - }, - "score": { - "maximum": 1, - "minimum": 0, - "type": "number" - } - }, - "required": [ - "score", - "level" - ], - "type": "object" - }, - "source": { - "enum": [ - "structured_summary", - "structured_line_item", - "provider_neutral", - "text_fallback", - "inferred" - ] - }, - "value": { - "maxLength": 160, - "minLength": 1, - "type": "string" - } - }, - "required": [ - "value", - "confidence", - "source" - ], - "type": "object" - } - }, - "required": [ - "line_items" - ], - "type": "object" - }, - "inferred_suggestions": { - "items": { - "additionalProperties": false, - "properties": { - "field": { - "enum": [ - "vendor", - "purchase_date", - "purchase_order", - "receipt_reference", - "totals.subtotal", - "totals.tax", - "totals.total", - "totals.currency" - ] - }, - "value": { - "additionalProperties": false, - "properties": { - "confidence": { - "additionalProperties": false, - "properties": { - "level": { - "enum": [ - "high", - "medium", - "low" - ] - }, - "score": { - "maximum": 1, - "minimum": 0, - "type": "number" - } - }, - "required": [ - "score", - "level" - ], - "type": "object" - }, - "source": { - "enum": [ - "structured_summary", - "structured_line_item", - "provider_neutral", - "text_fallback", - "inferred" - ] - }, - "value": { - "maxLength": 240, - "minLength": 1, - "type": "string" - } - }, - "required": [ - "value", - "confidence", - "source" - ], - "type": "object" - } - }, - "required": [ - "field", - "value" - ], - "type": "object" - }, - "maxItems": 8, - "type": "array" - }, - "provenance": { - "type": "object" - }, - "unavailable_fields": { - "items": { - "enum": [ - "purchase order reference", - "purchase_date", - "receipt or invoice number", - "totals.currency", - "totals.subtotal", - "totals.tax", - "totals.total", - "vendor" - ] - }, - "type": "array", - "uniqueItems": true - }, - "validation": { - "type": "object" - } - }, - "required": [ - "extracted_facts", - "inferred_suggestions", - "unavailable_fields", - "validation", - "provenance" - ], - "type": "object" - }, - "service": { - "const": "ardaro.receipt_intelligence" - }, - "status": { - "const": "review_required" - }, - "version": { - "const": "1.0.0" - }, - "warning_groups": { - "type": "object" - }, - "warnings": { - "items": { - "type": "object" - }, - "maxItems": 64, - "type": "array" - } - }, - "required": [ - "contract_version", - "service", - "version", - "status", - "engine", - "receipt", - "confidence", - "duplicate_check", - "duplicate_fingerprint", - "arithmetic_verified", - "arithmetic_consistency", - "warnings", - "warning_groups", - "identities", - "result", - "metering", - "policy" - ], - "type": "object", - "x-ardaro-analysis-result-identity-profile": "ardaro.recursive-key-sort-compact-json-utf8-sha256.v1", - "x-ardaro-authoritative-analysis-path": "$.result", - "x-ardaro-receipt-compatibility-path": "$.receipt", - "x-ardaro-receipt-projection-profile": "ardaro.result-receipt-projection.v1" - }, - "input_description": { - "type": "string" - }, - "limits": { - "additionalProperties": false, - "properties": { - "max_existing_fingerprints": { - "minimum": 1, - "type": "integer" - }, - "max_line_items": { - "minimum": 1, - "type": "integer" - }, - "max_pages": { - "minimum": 1, - "type": "integer" - }, - "max_request_bytes": { - "minimum": 1, - "type": "integer" - }, - "max_text_characters": { - "minimum": 1, - "type": "integer" - }, - "normal_latency_target_ms": { - "minimum": 1, - "type": "integer" - }, - "request_timeout_ms": { - "minimum": 1, - "type": "integer" - } - }, - "required": [ - "max_existing_fingerprints", - "max_line_items", - "max_pages", - "max_request_bytes", - "max_text_characters", - "normal_latency_target_ms", - "request_timeout_ms" - ], - "type": "object" - }, - "paid_processing_performed": { - "const": false - }, - "request": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "additionalProperties": false, - "properties": { - "contract_version": { - "const": "ardaro.agent-receipt-intelligence.request.v1", - "description": "Required request contract identifier; send this exact version string." - }, - "existing_fingerprints": { - "description": "Receipt fingerprints already known to the caller for duplicate comparison. Supply lowercase 64-character SHA-256 hex strings, or an empty array when none are available; at most 10,000 entries.", - "items": { - "pattern": "^[0-9a-f]{64}$", - "type": "string" - }, - "maxItems": 10000, - "type": "array" - }, - "input": { - "description": "One receipt supplied as bounded OCR text or a provider-neutral structured extraction. Choose exactly one input kind.", - "oneOf": [ - { - "additionalProperties": false, - "properties": { - "kind": { - "const": "text", - "description": "Selects receipt text input; supply the text property." - }, - "text": { - "description": "OCR or receipt text for one document, up to 20,000 characters. Exclude payment-card data, credentials, customer-record payloads, and financial posting instructions.", - "maxLength": 20000, - "minLength": 1, - "type": "string" - } - }, - "required": [ - "kind", - "text" - ], - "type": "object" - }, - { - "additionalProperties": false, - "properties": { - "analysis": { - "additionalProperties": false, - "description": "Provider-neutral receipt extraction using only the listed fields. Omit fields that were not extracted.", - "minProperties": 1, - "properties": { - "currency": { - "description": "Three-letter currency code shown on the receipt, for example USD. Supply the extracted value directly or wrap it with optional extraction confidence.", - "oneOf": [ - { - "maxLength": 3, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", - "maximum": 100, - "minimum": 0, - "type": "number" - }, - "value": { - "description": "The extracted field value, supplied as text or a number before receipt normalization.", - "oneOf": [ - { - "maxLength": 3, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - } - ] - } - }, - "required": [ - "value" - ], - "type": "object" - } - ] - }, - "line_items": { - "description": "Extracted receipt line items, limited to 100 entries; omit unavailable item fields.", - "items": { - "additionalProperties": false, - "minProperties": 1, - "properties": { - "amount": { - "description": "Extended amount printed for this line item, in the receipt currency. Supply the extracted value directly or wrap it with optional extraction confidence.", - "oneOf": [ - { - "maxLength": 80, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", - "maximum": 100, - "minimum": 0, - "type": "number" - }, - "value": { - "description": "The extracted field value, supplied as text or a number before receipt normalization.", - "oneOf": [ - { - "maxLength": 80, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - } - ] - } - }, - "required": [ - "value" - ], - "type": "object" - } - ] - }, - "description": { - "description": "Item description printed on the receipt. Supply the extracted value directly or wrap it with optional extraction confidence.", - "oneOf": [ - { - "maxLength": 240, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", - "maximum": 100, - "minimum": 0, - "type": "number" - }, - "value": { - "description": "The extracted field value, supplied as text or a number before receipt normalization.", - "oneOf": [ - { - "maxLength": 240, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - } - ] - } - }, - "required": [ - "value" - ], - "type": "object" - } - ] - }, - "product_code": { - "description": "Product identifier or SKU printed for this line item. Supply the extracted value directly or wrap it with optional extraction confidence.", - "oneOf": [ - { - "maxLength": 80, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", - "maximum": 100, - "minimum": 0, - "type": "number" - }, - "value": { - "description": "The extracted field value, supplied as text or a number before receipt normalization.", - "oneOf": [ - { - "maxLength": 80, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - } - ] - } - }, - "required": [ - "value" - ], - "type": "object" - } - ] - }, - "quantity": { - "description": "Quantity purchased for this line item. Supply the extracted value directly or wrap it with optional extraction confidence.", - "oneOf": [ - { - "maxLength": 80, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", - "maximum": 100, - "minimum": 0, - "type": "number" - }, - "value": { - "description": "The extracted field value, supplied as text or a number before receipt normalization.", - "oneOf": [ - { - "maxLength": 80, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - } - ] - } - }, - "required": [ - "value" - ], - "type": "object" - } - ] - }, - "unit_price": { - "description": "Price per unit for this line item, in the receipt currency. Supply the extracted value directly or wrap it with optional extraction confidence.", - "oneOf": [ - { - "maxLength": 80, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", - "maximum": 100, - "minimum": 0, - "type": "number" - }, - "value": { - "description": "The extracted field value, supplied as text or a number before receipt normalization.", - "oneOf": [ - { - "maxLength": 80, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - } - ] - } - }, - "required": [ - "value" - ], - "type": "object" - } - ] - } - }, - "type": "object" - }, - "maxItems": 100, - "type": "array" - }, - "purchase_date": { - "description": "Purchase date as extracted; YYYY-MM-DD is recommended. Supply the extracted value directly or wrap it with optional extraction confidence.", - "oneOf": [ - { - "maxLength": 10, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", - "maximum": 100, - "minimum": 0, - "type": "number" - }, - "value": { - "description": "The extracted field value, supplied as text or a number before receipt normalization.", - "oneOf": [ - { - "maxLength": 10, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - } - ] - } - }, - "required": [ - "value" - ], - "type": "object" - } - ] - }, - "purchase_order": { - "description": "Purchase-order reference printed on the receipt; this does not select or link an Ardaro job. Supply the extracted value directly or wrap it with optional extraction confidence.", - "oneOf": [ - { - "maxLength": 160, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", - "maximum": 100, - "minimum": 0, - "type": "number" - }, - "value": { - "description": "The extracted field value, supplied as text or a number before receipt normalization.", - "oneOf": [ - { - "maxLength": 160, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - } - ] - } - }, - "required": [ - "value" - ], - "type": "object" - } - ] - }, - "receipt_reference": { - "description": "Receipt, invoice, or transaction reference printed on the document. Supply the extracted value directly or wrap it with optional extraction confidence.", - "oneOf": [ - { - "maxLength": 160, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", - "maximum": 100, - "minimum": 0, - "type": "number" - }, - "value": { - "description": "The extracted field value, supplied as text or a number before receipt normalization.", - "oneOf": [ - { - "maxLength": 160, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - } - ] - } - }, - "required": [ - "value" - ], - "type": "object" - } - ] - }, - "subtotal": { - "description": "Receipt subtotal before tax, in the receipt currency. Supply the extracted value directly or wrap it with optional extraction confidence.", - "oneOf": [ - { - "maxLength": 32, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", - "maximum": 100, - "minimum": 0, - "type": "number" - }, - "value": { - "description": "The extracted field value, supplied as text or a number before receipt normalization.", - "oneOf": [ - { - "maxLength": 32, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - } - ] - } - }, - "required": [ - "value" - ], - "type": "object" - } - ] - }, - "tax": { - "description": "Total tax amount printed on the receipt, in the receipt currency. Supply the extracted value directly or wrap it with optional extraction confidence.", - "oneOf": [ - { - "maxLength": 32, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", - "maximum": 100, - "minimum": 0, - "type": "number" - }, - "value": { - "description": "The extracted field value, supplied as text or a number before receipt normalization.", - "oneOf": [ - { - "maxLength": 32, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - } - ] - } - }, - "required": [ - "value" - ], - "type": "object" - } - ] - }, - "total": { - "description": "Final receipt total, in the receipt currency. Supply the extracted value directly or wrap it with optional extraction confidence.", - "oneOf": [ - { - "maxLength": 32, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", - "maximum": 100, - "minimum": 0, - "type": "number" - }, - "value": { - "description": "The extracted field value, supplied as text or a number before receipt normalization.", - "oneOf": [ - { - "maxLength": 32, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - } - ] - } - }, - "required": [ - "value" - ], - "type": "object" - } - ] - }, - "vendor": { - "description": "Merchant or supplier name printed on the receipt. Supply the extracted value directly or wrap it with optional extraction confidence.", - "oneOf": [ - { - "maxLength": 160, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", - "maximum": 100, - "minimum": 0, - "type": "number" - }, - "value": { - "description": "The extracted field value, supplied as text or a number before receipt normalization.", - "oneOf": [ - { - "maxLength": 160, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - } - ] - } - }, - "required": [ - "value" - ], - "type": "object" - } - ] - } - }, - "type": "object" - }, - "kind": { - "const": "structured", - "description": "Selects structured receipt input; supply the analysis property." - } - }, - "required": [ - "kind", - "analysis" - ], - "type": "object" - } - ] - } - }, - "required": [ - "contract_version", - "input", - "existing_fingerprints" - ], - "type": "object" - }, - "synthetic_only": { - "const": true - } - }, - "required": [ - "example_version", - "synthetic_only", - "paid_processing_performed", - "input_description", - "request", - "expected_response", - "limits" - ], - "type": "object" - }, - "service": { - "const": "receipt" - } - }, - "required": [ - "service", - "details" - ], - "type": "object" - }, - { - "additionalProperties": false, - "properties": { - "details": { - "additionalProperties": false, - "properties": { - "example_version": { - "const": "ardaro.invoice-matching.example.v1" - }, - "policy": { - "additionalProperties": false, - "properties": { - "financial_posting_supported": { - "const": false - }, - "human_review_required": { - "const": true - }, - "payment_required": { - "const": false - } - }, - "required": [ - "human_review_required", - "financial_posting_supported", - "payment_required" - ], - "type": "object" - }, - "request": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "additionalProperties": false, - "description": "One invoice and one purchase order with caller-supplied opaque supplier identifiers. Runtime validation additionally rejects duplicate line IDs, padded/control-bearing strings, sensitive card or credential data, and requests over 262144 UTF-8 JSON bytes. All numeric inputs are decimal strings; missing optional arithmetic evidence requires review.", - "properties": { - "contract_version": { - "const": "ardaro.agent-invoice-matching.request.v1" - }, - "invoice": { - "oneOf": [ - { - "additionalProperties": false, - "properties": { - "currency": { - "enum": [ - "JPY" - ], - "type": "string" - }, - "line_items": { - "items": { - "additionalProperties": false, - "properties": { - "amount": { - "maxLength": 26, - "pattern": "^(?:0|[1-9][0-9]{0,25})(?![\\s\\S])", - "type": "string" - }, - "description": { - "maxLength": 240, - "minLength": 1, - "type": "string" - }, - "line_id": { - "maxLength": 80, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])", - "type": "string" - }, - "po_line_id": { - "maxLength": 80, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])", - "type": "string" - }, - "product_code": { - "maxLength": 80, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])", - "type": "string" - }, - "quantity": { - "maxLength": 19, - "not": { - "pattern": "^0(?:\\.0+)?(?![\\s\\S])" - }, - "pattern": "^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?(?![\\s\\S])", - "type": "string" - }, - "unit": { - "maxLength": 32, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])", - "type": "string" - }, - "unit_price": { - "maxLength": 19, - "pattern": "^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?(?![\\s\\S])", - "type": "string" - } - }, - "required": [ - "description", - "line_id", - "quantity", - "unit", - "unit_price" - ], - "type": "object" - }, - "maxItems": 100, - "minItems": 1, - "type": "array" - }, - "purchase_order_reference": { - "maxLength": 80, - "minLength": 1, - "type": "string" - }, - "reference": { - "maxLength": 80, - "minLength": 1, - "type": "string" - }, - "subtotal": { - "maxLength": 26, - "pattern": "^(?:0|[1-9][0-9]{0,25})(?![\\s\\S])", - "type": "string" - }, - "supplier_id": { - "maxLength": 80, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])", - "type": "string" - }, - "tax": { - "maxLength": 26, - "pattern": "^(?:0|[1-9][0-9]{0,25})(?![\\s\\S])", - "type": "string" - }, - "total": { - "maxLength": 26, - "pattern": "^(?:0|[1-9][0-9]{0,25})(?![\\s\\S])", - "type": "string" - } - }, - "required": [ - "currency", - "line_items", - "purchase_order_reference", - "reference", - "supplier_id" - ], - "type": "object" - }, - { - "additionalProperties": false, - "properties": { - "currency": { - "enum": [ - "USD", - "EUR", - "GBP", - "CAD", - "AUD", - "MXN" - ], - "type": "string" - }, - "line_items": { - "items": { - "additionalProperties": false, - "properties": { - "amount": { - "maxLength": 29, - "pattern": "^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,2})?(?![\\s\\S])", - "type": "string" - }, - "description": { - "maxLength": 240, - "minLength": 1, - "type": "string" - }, - "line_id": { - "maxLength": 80, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])", - "type": "string" - }, - "po_line_id": { - "maxLength": 80, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])", - "type": "string" - }, - "product_code": { - "maxLength": 80, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])", - "type": "string" - }, - "quantity": { - "maxLength": 19, - "not": { - "pattern": "^0(?:\\.0+)?(?![\\s\\S])" - }, - "pattern": "^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?(?![\\s\\S])", - "type": "string" - }, - "unit": { - "maxLength": 32, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])", - "type": "string" - }, - "unit_price": { - "maxLength": 19, - "pattern": "^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?(?![\\s\\S])", - "type": "string" - } - }, - "required": [ - "description", - "line_id", - "quantity", - "unit", - "unit_price" - ], - "type": "object" - }, - "maxItems": 100, - "minItems": 1, - "type": "array" - }, - "purchase_order_reference": { - "maxLength": 80, - "minLength": 1, - "type": "string" - }, - "reference": { - "maxLength": 80, - "minLength": 1, - "type": "string" - }, - "subtotal": { - "maxLength": 29, - "pattern": "^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,2})?(?![\\s\\S])", - "type": "string" - }, - "supplier_id": { - "maxLength": 80, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])", - "type": "string" - }, - "tax": { - "maxLength": 29, - "pattern": "^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,2})?(?![\\s\\S])", - "type": "string" - }, - "total": { - "maxLength": 29, - "pattern": "^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,2})?(?![\\s\\S])", - "type": "string" - } - }, - "required": [ - "currency", - "line_items", - "purchase_order_reference", - "reference", - "supplier_id" - ], - "type": "object" - } - ] - }, - "purchase_order": { - "oneOf": [ - { - "additionalProperties": false, - "properties": { - "currency": { - "enum": [ - "JPY" - ], - "type": "string" - }, - "line_items": { - "items": { - "additionalProperties": false, - "properties": { - "amount": { - "maxLength": 26, - "pattern": "^(?:0|[1-9][0-9]{0,25})(?![\\s\\S])", - "type": "string" - }, - "description": { - "maxLength": 240, - "minLength": 1, - "type": "string" - }, - "line_id": { - "maxLength": 80, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])", - "type": "string" - }, - "product_code": { - "maxLength": 80, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])", - "type": "string" - }, - "quantity": { - "maxLength": 19, - "not": { - "pattern": "^0(?:\\.0+)?(?![\\s\\S])" - }, - "pattern": "^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?(?![\\s\\S])", - "type": "string" - }, - "unit": { - "maxLength": 32, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])", - "type": "string" - }, - "unit_price": { - "maxLength": 19, - "pattern": "^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?(?![\\s\\S])", - "type": "string" - } - }, - "required": [ - "description", - "line_id", - "quantity", - "unit", - "unit_price" - ], - "type": "object" - }, - "maxItems": 100, - "minItems": 1, - "type": "array" - }, - "reference": { - "maxLength": 80, - "minLength": 1, - "type": "string" - }, - "supplier_id": { - "maxLength": 80, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])", - "type": "string" - } - }, - "required": [ - "currency", - "line_items", - "reference", - "supplier_id" - ], - "type": "object" - }, - { - "additionalProperties": false, - "properties": { - "currency": { - "enum": [ - "USD", - "EUR", - "GBP", - "CAD", - "AUD", - "MXN" - ], - "type": "string" - }, - "line_items": { - "items": { - "additionalProperties": false, - "properties": { - "amount": { - "maxLength": 29, - "pattern": "^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,2})?(?![\\s\\S])", - "type": "string" - }, - "description": { - "maxLength": 240, - "minLength": 1, - "type": "string" - }, - "line_id": { - "maxLength": 80, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])", - "type": "string" - }, - "product_code": { - "maxLength": 80, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])", - "type": "string" - }, - "quantity": { - "maxLength": 19, - "not": { - "pattern": "^0(?:\\.0+)?(?![\\s\\S])" - }, - "pattern": "^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?(?![\\s\\S])", - "type": "string" - }, - "unit": { - "maxLength": 32, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])", - "type": "string" - }, - "unit_price": { - "maxLength": 19, - "pattern": "^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?(?![\\s\\S])", - "type": "string" - } - }, - "required": [ - "description", - "line_id", - "quantity", - "unit", - "unit_price" - ], - "type": "object" - }, - "maxItems": 100, - "minItems": 1, - "type": "array" - }, - "reference": { - "maxLength": 80, - "minLength": 1, - "type": "string" - }, - "supplier_id": { - "maxLength": 80, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])", - "type": "string" - } - }, - "required": [ - "currency", - "line_items", - "reference", - "supplier_id" - ], - "type": "object" - } - ] - } - }, - "required": [ - "contract_version", - "invoice", - "purchase_order" - ], - "type": "object" - }, - "response": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "additionalProperties": false, - "properties": { - "contract_version": { - "const": "ardaro.agent-invoice-matching.response.v1" - }, - "identities": { - "additionalProperties": false, - "properties": { - "analysis_result_identity": { - "pattern": "^res_[0-9a-f]{64}(?![\\s\\S])", - "type": "string" - } - }, - "required": [ - "analysis_result_identity" - ], - "type": "object" - }, - "result": { - "additionalProperties": false, - "properties": { - "arithmetic": { - "additionalProperties": false, - "properties": { - "computed_invoice_total": { - "anyOf": [ - { - "maxLength": 42, - "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?(?![\\s\\S])", - "type": "string" - }, - { - "type": "null" - } - ] - }, - "invoice_currency_scale": { - "enum": [ - 0, - 2 - ] - }, - "invoice_line_amount_sum": { - "maxLength": 42, - "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?(?![\\s\\S])", - "type": "string" - }, - "invoice_subtotal": { - "anyOf": [ - { - "maxLength": 42, - "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?(?![\\s\\S])", - "type": "string" - }, - { - "type": "null" - } - ] - }, - "invoice_subtotal_status": { - "enum": [ - "consistent", - "mismatch", - "unavailable" - ] - }, - "invoice_supplied_line_amount_sum": { - "anyOf": [ - { - "maxLength": 42, - "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?(?![\\s\\S])", - "type": "string" - }, - { - "type": "null" - } - ] - }, - "invoice_tax": { - "anyOf": [ - { - "maxLength": 42, - "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?(?![\\s\\S])", - "type": "string" - }, - { - "type": "null" - } - ] - }, - "invoice_total": { - "anyOf": [ - { - "maxLength": 42, - "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?(?![\\s\\S])", - "type": "string" - }, - { - "type": "null" - } - ] - }, - "invoice_total_status": { - "enum": [ - "consistent", - "mismatch", - "unavailable" - ] - }, - "purchase_order_currency_scale": { - "enum": [ - 0, - 2 - ] - }, - "rounding_mode": { - "const": "ROUND_HALF_UP" - }, - "rounding_scope": { - "const": "each_line_then_sum" - } - }, - "required": [ - "rounding_mode", - "rounding_scope", - "invoice_currency_scale", - "purchase_order_currency_scale", - "invoice_line_amount_sum", - "invoice_supplied_line_amount_sum", - "invoice_subtotal", - "invoice_tax", - "invoice_total", - "computed_invoice_total", - "invoice_subtotal_status", - "invoice_total_status" - ], - "type": "object" - }, - "comparison_rows": { - "items": { - "additionalProperties": false, - "properties": { - "allocation_status": { - "enum": [ - "allocated", - "not_comparable", - "unmatched" - ] - }, - "computed_invoice_amount": { - "maxLength": 42, - "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?(?![\\s\\S])", - "type": "string" - }, - "discrepancy_codes": { - "items": { - "enum": [ - "currency_mismatch", - "supplier_mismatch", - "purchase_order_reference_mismatch", - "invoice_line_amount_unavailable", - "purchase_order_line_amount_unavailable", - "invoice_line_arithmetic_mismatch", - "purchase_order_line_arithmetic_mismatch", - "referenced_purchase_order_line_missing", - "ambiguous_product_code", - "unmatchable_invoice_line", - "unit_mismatch", - "product_code_mismatch", - "unit_price_mismatch", - "quantity_exceeds_purchase_order", - "invoice_subtotal_unavailable", - "invoice_tax_unavailable", - "invoice_total_unavailable", - "invoice_subtotal_mismatch", - "invoice_supplied_line_sum_mismatch", - "invoice_total_mismatch" - ], - "type": "string" - }, - "maxItems": 20, - "minItems": 0, - "type": "array", - "uniqueItems": true - }, - "invoice_amount": { - "anyOf": [ - { - "maxLength": 42, - "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?(?![\\s\\S])", - "type": "string" - }, - { - "type": "null" - } - ] - }, - "invoice_currency": { - "enum": [ - "USD", - "EUR", - "GBP", - "CAD", - "AUD", - "MXN", - "JPY" - ] - }, - "invoice_line_id": { - "maxLength": 80, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])", - "type": "string" - }, - "invoice_quantity": { - "maxLength": 42, - "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?(?![\\s\\S])", - "type": "string" - }, - "invoice_source": { - "maxLength": 100, - "minLength": 1, - "pattern": "^/(?:invoice|purchase_order)(?:/[A-Za-z0-9_]+)*(?![\\s\\S])", - "type": "string" - }, - "invoice_unit": { - "maxLength": 32, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])", - "type": "string" - }, - "invoice_unit_price": { - "maxLength": 42, - "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?(?![\\s\\S])", - "type": "string" - }, - "line_arithmetic_status": { - "enum": [ - "consistent", - "mismatch", - "unavailable" - ] - }, - "match_method": { - "enum": [ - "unmatched", - "explicit_po_line_id", - "exact_product_code" - ] - }, - "outcome": { - "enum": [ - "no_discrepancies", - "review_required" - ] - }, - "purchase_order_currency": { - "enum": [ - "USD", - "EUR", - "GBP", - "CAD", - "AUD", - "MXN", - "JPY" - ] - }, - "purchase_order_line_id": { - "anyOf": [ - { - "maxLength": 80, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])", - "type": "string" - }, - { - "type": "null" - } - ] - }, - "purchase_order_quantity": { - "anyOf": [ - { - "maxLength": 42, - "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?(?![\\s\\S])", - "type": "string" - }, - { - "type": "null" - } - ] - }, - "purchase_order_source": { - "anyOf": [ - { - "maxLength": 100, - "minLength": 1, - "pattern": "^/(?:invoice|purchase_order)(?:/[A-Za-z0-9_]+)*(?![\\s\\S])", - "type": "string" - }, - { - "type": "null" - } - ] - }, - "purchase_order_unit": { - "anyOf": [ - { - "maxLength": 32, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])", - "type": "string" - }, - { - "type": "null" - } - ] - }, - "purchase_order_unit_price": { - "anyOf": [ - { - "maxLength": 42, - "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?(?![\\s\\S])", - "type": "string" - }, - { - "type": "null" - } - ] - }, - "unit_price_difference": { - "anyOf": [ - { - "maxLength": 42, - "pattern": "^-?(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?(?![\\s\\S])", - "type": "string" - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "invoice_line_id", - "invoice_source", - "purchase_order_line_id", - "purchase_order_source", - "match_method", - "allocation_status", - "invoice_quantity", - "purchase_order_quantity", - "invoice_unit", - "purchase_order_unit", - "invoice_unit_price", - "purchase_order_unit_price", - "invoice_currency", - "purchase_order_currency", - "unit_price_difference", - "invoice_amount", - "computed_invoice_amount", - "line_arithmetic_status", - "discrepancy_codes", - "outcome" - ], - "type": "object" - }, - "maxItems": 100, - "minItems": 1, - "type": "array" - }, - "discrepancies": { - "items": { - "additionalProperties": false, - "properties": { - "code": { - "enum": [ - "currency_mismatch", - "supplier_mismatch", - "purchase_order_reference_mismatch", - "invoice_line_amount_unavailable", - "purchase_order_line_amount_unavailable", - "invoice_line_arithmetic_mismatch", - "purchase_order_line_arithmetic_mismatch", - "referenced_purchase_order_line_missing", - "ambiguous_product_code", - "unmatchable_invoice_line", - "unit_mismatch", - "product_code_mismatch", - "unit_price_mismatch", - "quantity_exceeds_purchase_order", - "invoice_subtotal_unavailable", - "invoice_tax_unavailable", - "invoice_total_unavailable", - "invoice_subtotal_mismatch", - "invoice_supplied_line_sum_mismatch", - "invoice_total_mismatch" - ], - "type": "string" - }, - "message": { - "maxLength": 240, - "minLength": 1, - "type": "string" - }, - "severity": { - "enum": [ - "error", - "warning" - ] - }, - "sources": { - "items": { - "maxLength": 100, - "minLength": 1, - "pattern": "^/(?:invoice|purchase_order)(?:/[A-Za-z0-9_]+)*(?![\\s\\S])", - "type": "string" - }, - "maxItems": 101, - "minItems": 1, - "type": "array" - } - }, - "required": [ - "code", - "severity", - "message", - "sources" - ], - "type": "object" - }, - "maxItems": 1000, - "minItems": 0, - "type": "array" - }, - "document_checks": { - "additionalProperties": false, - "properties": { - "currency_matches": { - "type": "boolean" - }, - "purchase_order_reference_matches": { - "type": "boolean" - }, - "supplier_matches": { - "type": "boolean" - } - }, - "required": [ - "currency_matches", - "supplier_matches", - "purchase_order_reference_matches" - ], - "type": "object" - }, - "policy": { - "additionalProperties": false, - "properties": { - "arithmetic_scope": { - "maxLength": 300, - "minLength": 1, - "type": "string" - }, - "decision_scope": { - "maxLength": 300, - "minLength": 1, - "type": "string" - }, - "delivery_verification_supported": { - "const": false - }, - "financial_posting_performed": { - "const": false - }, - "financial_posting_supported": { - "const": false - }, - "human_review_required": { - "const": true - }, - "identity_purpose": { - "const": "deterministic_result_comparison_only" - }, - "matching_rule": { - "const": "explicit_po_line_id_else_unique_case_sensitive_product_code" - }, - "model_calls": { - "const": 0 - }, - "payment_approval_supported": { - "const": false - }, - "quantity_scope": { - "maxLength": 300, - "minLength": 1, - "type": "string" - }, - "raw_documents_retained": { - "const": false - }, - "stateless": { - "const": true - }, - "supplier_scope": { - "maxLength": 300, - "minLength": 1, - "type": "string" - } - }, - "required": [ - "human_review_required", - "stateless", - "raw_documents_retained", - "financial_posting_supported", - "financial_posting_performed", - "payment_approval_supported", - "delivery_verification_supported", - "model_calls", - "identity_purpose", - "matching_rule", - "quantity_scope", - "arithmetic_scope", - "supplier_scope", - "decision_scope" - ], - "type": "object" - }, - "purchase_order_line_summary": { - "items": { - "additionalProperties": false, - "properties": { - "allocated_invoice_sources": { - "items": { - "maxLength": 100, - "minLength": 1, - "pattern": "^/(?:invoice|purchase_order)(?:/[A-Za-z0-9_]+)*(?![\\s\\S])", - "type": "string" - }, - "maxItems": 100, - "minItems": 0, - "type": "array" - }, - "allocated_quantity": { - "anyOf": [ - { - "maxLength": 42, - "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?(?![\\s\\S])", - "type": "string" - }, - { - "type": "null" - } - ] - }, - "computed_amount": { - "maxLength": 42, - "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?(?![\\s\\S])", - "type": "string" - }, - "line_arithmetic_status": { - "enum": [ - "consistent", - "mismatch", - "unavailable" - ] - }, - "ordered_quantity": { - "maxLength": 42, - "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?(?![\\s\\S])", - "type": "string" - }, - "overbilled_quantity": { - "anyOf": [ - { - "maxLength": 42, - "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?(?![\\s\\S])", - "type": "string" - }, - { - "type": "null" - } - ] - }, - "purchase_order_line_id": { - "maxLength": 80, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])", - "type": "string" - }, - "purchase_order_source": { - "maxLength": 100, - "minLength": 1, - "pattern": "^/(?:invoice|purchase_order)(?:/[A-Za-z0-9_]+)*(?![\\s\\S])", - "type": "string" - }, - "status": { - "enum": [ - "not_comparable", - "not_invoiced", - "overbilled", - "fully_invoiced", - "partially_invoiced" - ] - }, - "supplied_amount": { - "anyOf": [ - { - "maxLength": 42, - "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?(?![\\s\\S])", - "type": "string" - }, - { - "type": "null" - } - ] - }, - "uninvoiced_quantity": { - "anyOf": [ - { - "maxLength": 42, - "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?(?![\\s\\S])", - "type": "string" - }, - { - "type": "null" - } - ] - }, - "unit": { - "maxLength": 32, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])", - "type": "string" - } - }, - "required": [ - "purchase_order_line_id", - "purchase_order_source", - "allocated_invoice_sources", - "ordered_quantity", - "allocated_quantity", - "uninvoiced_quantity", - "overbilled_quantity", - "unit", - "status", - "supplied_amount", - "computed_amount", - "line_arithmetic_status" - ], - "type": "object" - }, - "maxItems": 100, - "minItems": 1, - "type": "array" - }, - "summary": { - "additionalProperties": false, - "properties": { - "delivery_verified": { - "const": false - }, - "discrepancy_count": { - "maximum": 1000, - "minimum": 0, - "type": "integer" - }, - "human_review_required": { - "const": true - }, - "invoice_line_count": { - "maximum": 100, - "minimum": 0, - "type": "integer" - }, - "matched_invoice_line_count": { - "maximum": 100, - "minimum": 0, - "type": "integer" - }, - "outcome": { - "enum": [ - "no_discrepancies", - "review_required" - ] - }, - "payment_approved": { - "const": false - }, - "purchase_order_line_count": { - "maximum": 100, - "minimum": 0, - "type": "integer" - }, - "unknown_check_count": { - "maximum": 1000, - "minimum": 0, - "type": "integer" - }, - "unmatched_invoice_line_count": { - "maximum": 100, - "minimum": 0, - "type": "integer" - } - }, - "required": [ - "outcome", - "invoice_line_count", - "purchase_order_line_count", - "matched_invoice_line_count", - "unmatched_invoice_line_count", - "discrepancy_count", - "unknown_check_count", - "human_review_required", - "delivery_verified", - "payment_approved" - ], - "type": "object" - } - }, - "required": [ - "summary", - "document_checks", - "comparison_rows", - "purchase_order_line_summary", - "discrepancies", - "arithmetic", - "policy" - ], - "type": "object" - }, - "status": { - "const": "review_required" - } - }, - "required": [ - "contract_version", - "status", - "result", - "identities" - ], - "type": "object" - }, - "synthetic_only": { - "const": true - } - }, - "required": [ - "example_version", - "synthetic_only", - "request", - "response", - "policy" - ], - "type": "object" - }, - "service": { - "const": "invoice" - } - }, - "required": [ - "service", - "details" - ], - "type": "object" - }, - { - "additionalProperties": false, - "properties": { - "details": { - "properties": { - "request": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "additionalProperties": false, - "description": "Free comparison of one receipt, invoice and purchase order supplied in this request. Missing documents or fields produce needs_review. Maximum 100 lines per document and 196608 UTF-8 JSON bytes. No images, URLs, credentials, account access, or paid tool calls. Money amounts must use the supported currency's minor-unit precision; runtime also rejects sensitive data, padded strings and control characters.", - "properties": { - "invoice": { - "additionalProperties": false, - "description": "Caller-supplied structured data. Use opaque supplier IDs and decimal strings; omit unknown fields. Receipt kind describes the source document, not verified delivery. Field names align with invoice matching; receipt extraction output must be mapped explicitly.", - "properties": { - "currency": { - "pattern": "^[A-Z]{3}(?![\\s\\S])", - "type": "string" - }, - "line_items": { - "items": { - "additionalProperties": false, - "properties": { - "amount": { - "maxLength": 33, - "pattern": "^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,6})?(?![\\s\\S])", - "type": "string" - }, - "description": { - "maxLength": 240, - "minLength": 1, - "type": "string" - }, - "line_id": { - "maxLength": 80, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])", - "type": "string" - }, - "po_line_id": { - "maxLength": 80, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])", - "type": "string" - }, - "product_code": { - "maxLength": 80, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])", - "type": "string" - }, - "quantity": { - "maxLength": 19, - "not": { - "pattern": "^0(?:\\.0+)?(?![\\s\\S])" - }, - "pattern": "^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?(?![\\s\\S])", - "type": "string" - }, - "unit": { - "maxLength": 32, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])", - "type": "string" - }, - "unit_price": { - "maxLength": 19, - "pattern": "^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?(?![\\s\\S])", - "type": "string" - } - }, - "required": [], - "type": "object" - }, - "maxItems": 100, - "type": "array" - }, - "purchase_order_reference": { - "maxLength": 80, - "minLength": 1, - "type": "string" - }, - "reference": { - "maxLength": 80, - "minLength": 1, - "type": "string" - }, - "subtotal": { - "maxLength": 33, - "pattern": "^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,6})?(?![\\s\\S])", - "type": "string" - }, - "supplier_id": { - "maxLength": 80, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])", - "type": "string" - }, - "tax": { - "maxLength": 33, - "pattern": "^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,6})?(?![\\s\\S])", - "type": "string" - }, - "total": { - "maxLength": 33, - "pattern": "^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,6})?(?![\\s\\S])", - "type": "string" - } - }, - "required": [], - "type": "object" - }, - "purchase_order": { - "additionalProperties": false, - "description": "Caller-supplied structured data. Use opaque supplier IDs and decimal strings; omit unknown fields. Receipt kind describes the source document, not verified delivery. Field names align with invoice matching; receipt extraction output must be mapped explicitly.", - "properties": { - "currency": { - "pattern": "^[A-Z]{3}(?![\\s\\S])", - "type": "string" - }, - "line_items": { - "items": { - "additionalProperties": false, - "properties": { - "amount": { - "maxLength": 33, - "pattern": "^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,6})?(?![\\s\\S])", - "type": "string" - }, - "description": { - "maxLength": 240, - "minLength": 1, - "type": "string" - }, - "line_id": { - "maxLength": 80, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])", - "type": "string" - }, - "product_code": { - "maxLength": 80, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])", - "type": "string" - }, - "quantity": { - "maxLength": 19, - "not": { - "pattern": "^0(?:\\.0+)?(?![\\s\\S])" - }, - "pattern": "^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?(?![\\s\\S])", - "type": "string" - }, - "unit": { - "maxLength": 32, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])", - "type": "string" - }, - "unit_price": { - "maxLength": 19, - "pattern": "^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?(?![\\s\\S])", - "type": "string" - } - }, - "required": [], - "type": "object" - }, - "maxItems": 100, - "type": "array" - }, - "reference": { - "maxLength": 80, - "minLength": 1, - "type": "string" - }, - "subtotal": { - "maxLength": 33, - "pattern": "^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,6})?(?![\\s\\S])", - "type": "string" - }, - "supplier_id": { - "maxLength": 80, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])", - "type": "string" - }, - "tax": { - "maxLength": 33, - "pattern": "^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,6})?(?![\\s\\S])", - "type": "string" - }, - "total": { - "maxLength": 33, - "pattern": "^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,6})?(?![\\s\\S])", - "type": "string" - } - }, - "required": [], - "type": "object" - }, - "receipt": { - "additionalProperties": false, - "description": "Caller-supplied structured data. Use opaque supplier IDs and decimal strings; omit unknown fields. Receipt kind describes the source document, not verified delivery. Field names align with invoice matching; receipt extraction output must be mapped explicitly.", - "properties": { - "currency": { - "pattern": "^[A-Z]{3}(?![\\s\\S])", - "type": "string" - }, - "invoice_reference": { - "maxLength": 80, - "minLength": 1, - "type": "string" - }, - "kind": { - "enum": [ - "expense_receipt", - "delivery_receipt" - ] - }, - "line_items": { - "items": { - "additionalProperties": false, - "properties": { - "amount": { - "maxLength": 33, - "pattern": "^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,6})?(?![\\s\\S])", - "type": "string" - }, - "description": { - "maxLength": 240, - "minLength": 1, - "type": "string" - }, - "invoice_line_id": { - "maxLength": 80, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])", - "type": "string" - }, - "line_id": { - "maxLength": 80, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])", - "type": "string" - }, - "product_code": { - "maxLength": 80, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])", - "type": "string" - }, - "quantity": { - "maxLength": 19, - "not": { - "pattern": "^0(?:\\.0+)?(?![\\s\\S])" - }, - "pattern": "^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?(?![\\s\\S])", - "type": "string" - }, - "unit": { - "maxLength": 32, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])", - "type": "string" - }, - "unit_price": { - "maxLength": 19, - "pattern": "^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?(?![\\s\\S])", - "type": "string" - } - }, - "required": [], - "type": "object" - }, - "maxItems": 100, - "type": "array" - }, - "purchase_order_reference": { - "maxLength": 80, - "minLength": 1, - "type": "string" - }, - "reference": { - "maxLength": 80, - "minLength": 1, - "type": "string" - }, - "subtotal": { - "maxLength": 33, - "pattern": "^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,6})?(?![\\s\\S])", - "type": "string" - }, - "supplier_id": { - "maxLength": 80, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])", - "type": "string" - }, - "tax": { - "maxLength": 33, - "pattern": "^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,6})?(?![\\s\\S])", - "type": "string" - }, - "total": { - "maxLength": 33, - "pattern": "^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,6})?(?![\\s\\S])", - "type": "string" - } - }, - "required": [], - "type": "object" - } - }, - "required": [], - "type": "object" - }, - "response": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "oneOf": [ - { - "additionalProperties": false, - "properties": { - "comparisons": { - "items": { - "additionalProperties": false, - "properties": { - "document_identity_comparable": { - "type": "boolean" - }, - "pair": { - "enum": [ - "receipt_to_invoice", - "invoice_to_purchase_order" - ] - }, - "rows": { - "items": { - "additionalProperties": false, - "properties": { - "amount_difference": { - "maxLength": 50, - "pattern": "^-?(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?(?![\\s\\S])", - "type": [ - "string", - "null" - ] - }, - "candidate_targets": { - "items": { - "maxLength": 100, - "pattern": "^/(?:receipt|invoice|purchase_order)(?:/[A-Za-z0-9_]+)*(?![\\s\\S])", - "type": "string" - }, - "maxItems": 100, - "type": "array" - }, - "comparison_performed": { - "type": "boolean" - }, - "match_method": { - "enum": [ - "unmatched", - "explicit_line_reference", - "exact_product_code", - "normalized_description" - ] - }, - "quantity_difference": { - "maxLength": 50, - "pattern": "^-?(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?(?![\\s\\S])", - "type": [ - "string", - "null" - ] - }, - "source": { - "maxLength": 100, - "pattern": "^/(?:receipt|invoice|purchase_order)(?:/[A-Za-z0-9_]+)*(?![\\s\\S])", - "type": "string" - }, - "status": { - "enum": [ - "no_discrepancies", - "needs_review" - ] - }, - "target": { - "anyOf": [ - { - "maxLength": 100, - "pattern": "^/(?:receipt|invoice|purchase_order)(?:/[A-Za-z0-9_]+)*(?![\\s\\S])", - "type": "string" - }, - { - "type": "null" - } - ] - }, - "unit_price_difference": { - "maxLength": 50, - "pattern": "^-?(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?(?![\\s\\S])", - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "source", - "target", - "candidate_targets", - "match_method", - "comparison_performed", - "status", - "quantity_difference", - "unit_price_difference", - "amount_difference" - ], - "type": "object" - }, - "maxItems": 100, - "type": "array" - }, - "status": { - "enum": [ - "no_discrepancies", - "needs_review" - ] - } - }, - "required": [ - "pair", - "status", - "document_identity_comparable", - "rows" - ], - "type": "object" - }, - "maxItems": 2, - "minItems": 2, - "type": "array" - }, - "contract_version": { - "const": "ardaro.purchase-document-reconciliation.response.v1" - }, - "delivery_verified": { - "const": false - }, - "discrepancies": { - "items": { - "additionalProperties": false, - "properties": { - "code": { - "maxLength": 80, - "pattern": "^[a-z_]+(?![\\s\\S])", - "type": "string" - }, - "scope": { - "enum": [ - "receipt", - "invoice", - "purchase_order", - "receipt_to_invoice", - "invoice_to_purchase_order" - ] - }, - "severity": { - "enum": [ - "unknown", - "discrepancy" - ] - }, - "sources": { - "items": { - "maxLength": 100, - "pattern": "^/(?:receipt|invoice|purchase_order)(?:/[A-Za-z0-9_]+)*(?![\\s\\S])", - "type": "string" - }, - "maxItems": 101, - "type": "array" - } - }, - "required": [ - "code", - "scope", - "severity", - "sources" - ], - "type": "object" - }, - "maxItems": 6000, - "type": "array" - }, - "document_summary": { - "items": { - "additionalProperties": false, - "properties": { - "currency_minor_units": { - "enum": [ - 0, - 2, - null - ] - }, - "currency_supported": { - "type": "boolean" - }, - "document": { - "enum": [ - "receipt", - "invoice", - "purchase_order" - ] - }, - "line_count": { - "maximum": 100, - "minimum": 0, - "type": "integer" - }, - "present": { - "type": "boolean" - } - }, - "required": [ - "document", - "present", - "line_count", - "currency_supported", - "currency_minor_units" - ], - "type": "object" - }, - "maxItems": 3, - "minItems": 3, - "type": "array" - }, - "financial_posting_performed": { - "const": false - }, - "human_review_required": { - "const": true - }, - "payment_approved": { - "const": false - }, - "policy": { - "const": { - "arithmetic_scope": "Exact decimal comparisons with per-line ROUND_HALF_UP at supported currency precision. No tax applicability, discounts, freight or currency conversion is inferred.", - "decision_scope": "No discrepancies means the supported checks found none in supplied data. It is not payment authorization, accounting approval or supplier verification.", - "document_storage_performed": false, - "matching_rule": "explicit line reference, else unique exact case-sensitive product code, else unique NFKC/casefold/whitespace-normalized description when both product codes are absent; never fuzzy or semantic", - "model_calls": 0, - "paid_tool_calls": 0, - "payment_required": false, - "quantity_scope": "Differences concern only these three supplied documents. Partial receipts, partial invoicing, prior invoices, returns and delivery events are not inferred.", - "receipt_scope": "An expense receipt is not evidence of delivery. A delivery_receipt label is caller-supplied and does not authenticate delivery.", - "retention_scope": "This function retains no documents or results; caller and transport retention are outside this function's guarantees." - } - }, - "provenance": { - "const": { - "document_authenticity_verified": false, - "external_data_fetched": false, - "source": "caller_supplied_documents_only", - "source_pointer_root": "original_arguments" - } - }, - "result_identity": { - "pattern": "^res_[0-9a-f]{64}(?![\\s\\S])", - "type": "string" - }, - "status": { - "enum": [ - "no_discrepancies", - "needs_review" - ] - } - }, - "required": [ - "contract_version", - "human_review_required", - "payment_approved", - "delivery_verified", - "financial_posting_performed", - "provenance", - "policy", - "status", - "result_identity", - "document_summary", - "comparisons", - "discrepancies" - ], - "type": "object" - }, - { - "additionalProperties": false, - "properties": { - "contract_version": { - "const": "ardaro.purchase-document-reconciliation.response.v1" - }, - "error": { - "additionalProperties": false, - "properties": { - "code": { - "maxLength": 80, - "type": "string" - }, - "message": { - "maxLength": 300, - "type": "string" - } - }, - "required": [ - "code", - "message" - ], - "type": "object" - }, - "status": { - "const": "error" - } - }, - "required": [ - "contract_version", - "status", - "error" - ], - "type": "object" - } - ], - "type": "object" - } - }, - "required": [ - "request", - "response" - ], - "type": "object" - }, - "service": { - "const": "reconciliation" - } - }, - "required": [ - "service", - "details" - ], - "type": "object" - } -]New value: +[ + { + "additionalProperties": false, + "properties": { + "details": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "properties": { + "example_version": { + "const": "ardaro.receipt-intelligence.example.v1" + }, + "expected_response": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "description": "Receipt Intelligence v1 response. result is authoritative; receipt is a derived compatibility projection that MUST match result.", + "properties": { + "arithmetic_consistency": { + "enum": [ + "verified", + "mismatch", + "unavailable" + ] + }, + "arithmetic_verified": { + "type": [ + "boolean", + "null" + ] + }, + "confidence": { + "type": "object" + }, + "contract_version": { + "const": "ardaro.agent-receipt-intelligence.response.v1" + }, + "duplicate_check": { + "type": "object" + }, + "duplicate_fingerprint": { + "pattern": "^[0-9a-f]{64}$", + "type": [ + "string", + "null" + ] + }, + "engine": { + "type": "object" + }, + "identities": { + "additionalProperties": false, + "properties": { + "analysis_result_identity": { + "pattern": "^res_[0-9a-f]{64}$", + "type": "string" + }, + "document_fingerprint": { + "pattern": "^[0-9a-f]{64}$", + "type": [ + "string", + "null" + ] + }, + "request_identity": { + "pattern": "^req_[0-9a-f]{64}$", + "type": "string" + } + }, + "required": [ + "request_identity", + "document_fingerprint", + "analysis_result_identity" + ], + "type": "object" + }, + "metering": { + "type": "object" + }, + "payment_identity": { + "additionalProperties": false, + "properties": { + "protocol": { + "const": "x402-v2" + }, + "reference": { + "pattern": "^pay_[0-9a-f]{64}$", + "type": "string" + }, + "replayed": { + "type": "boolean" + } + }, + "required": [ + "protocol", + "reference", + "replayed" + ], + "type": "object" + }, + "policy": { + "type": "object" + }, + "receipt": { + "additionalProperties": false, + "description": "Non-authoritative compatibility projection generated from result under ardaro.result-receipt-projection.v1. Consumers MUST use result for structured receipt values and reject a response when this projection diverges.", + "properties": { + "line_items": { + "items": { + "additionalProperties": false, + "properties": { + "amount": { + "oneOf": [ + { + "type": "null" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "additionalProperties": false, + "properties": { + "level": { + "enum": [ + "high", + "medium", + "low" + ] + }, + "score": { + "maximum": 1, + "minimum": 0, + "type": "number" + } + }, + "required": [ + "score", + "level" + ], + "type": "object" + }, + "source": { + "enum": [ + "structured_summary", + "structured_line_item", + "provider_neutral", + "text_fallback", + "inferred" + ] + }, + "value": { + "maxLength": 80, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "value", + "confidence", + "source" + ], + "type": "object" + } + ] + }, + "description": { + "oneOf": [ + { + "type": "null" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "additionalProperties": false, + "properties": { + "level": { + "enum": [ + "high", + "medium", + "low" + ] + }, + "score": { + "maximum": 1, + "minimum": 0, + "type": "number" + } + }, + "required": [ + "score", + "level" + ], + "type": "object" + }, + "source": { + "enum": [ + "structured_summary", + "structured_line_item", + "provider_neutral", + "text_fallback", + "inferred" + ] + }, + "value": { + "maxLength": 240, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "value", + "confidence", + "source" + ], + "type": "object" + } + ] + }, + "product_code": { + "oneOf": [ + { + "type": "null" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "additionalProperties": false, + "properties": { + "level": { + "enum": [ + "high", + "medium", + "low" + ] + }, + "score": { + "maximum": 1, + "minimum": 0, + "type": "number" + } + }, + "required": [ + "score", + "level" + ], + "type": "object" + }, + "source": { + "enum": [ + "structured_summary", + "structured_line_item", + "provider_neutral", + "text_fallback", + "inferred" + ] + }, + "value": { + "maxLength": 80, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "value", + "confidence", + "source" + ], + "type": "object" + } + ] + }, + "quantity": { + "oneOf": [ + { + "type": "null" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "additionalProperties": false, + "properties": { + "level": { + "enum": [ + "high", + "medium", + "low" + ] + }, + "score": { + "maximum": 1, + "minimum": 0, + "type": "number" + } + }, + "required": [ + "score", + "level" + ], + "type": "object" + }, + "source": { + "enum": [ + "structured_summary", + "structured_line_item", + "provider_neutral", + "text_fallback", + "inferred" + ] + }, + "value": { + "maxLength": 80, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "value", + "confidence", + "source" + ], + "type": "object" + } + ] + }, + "unit_price": { + "oneOf": [ + { + "type": "null" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "additionalProperties": false, + "properties": { + "level": { + "enum": [ + "high", + "medium", + "low" + ] + }, + "score": { + "maximum": 1, + "minimum": 0, + "type": "number" + } + }, + "required": [ + "score", + "level" + ], + "type": "object" + }, + "source": { + "enum": [ + "structured_summary", + "structured_line_item", + "provider_neutral", + "text_fallback", + "inferred" + ] + }, + "value": { + "maxLength": 80, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "value", + "confidence", + "source" + ], + "type": "object" + } + ] + } + }, + "required": [ + "description", + "product_code", + "quantity", + "unit_price", + "amount" + ], + "type": "object" + }, + "maxItems": 100, + "type": "array" + }, + "purchase_date": { + "oneOf": [ + { + "type": "null" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "additionalProperties": false, + "properties": { + "level": { + "enum": [ + "high", + "medium", + "low" + ] + }, + "score": { + "maximum": 1, + "minimum": 0, + "type": "number" + } + }, + "required": [ + "score", + "level" + ], + "type": "object" + }, + "source": { + "enum": [ + "structured_summary", + "structured_line_item", + "provider_neutral", + "text_fallback", + "inferred" + ] + }, + "value": { + "maxLength": 10, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "value", + "confidence", + "source" + ], + "type": "object" + } + ] + }, + "purchase_order": { + "additionalProperties": false, + "properties": { + "confidence": { + "additionalProperties": false, + "properties": { + "level": { + "enum": [ + "high", + "medium", + "low" + ] + }, + "score": { + "maximum": 1, + "minimum": 0, + "type": "number" + } + }, + "required": [ + "score", + "level" + ], + "type": "object" + }, + "source": { + "enum": [ + "structured_summary", + "structured_line_item", + "provider_neutral", + "text_fallback", + "inferred" + ] + }, + "value": { + "maxLength": 160, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "value", + "confidence", + "source" + ], + "type": "object" + }, + "receipt_reference": { + "additionalProperties": false, + "properties": { + "confidence": { + "additionalProperties": false, + "properties": { + "level": { + "enum": [ + "high", + "medium", + "low" + ] + }, + "score": { + "maximum": 1, + "minimum": 0, + "type": "number" + } + }, + "required": [ + "score", + "level" + ], + "type": "object" + }, + "source": { + "enum": [ + "structured_summary", + "structured_line_item", + "provider_neutral", + "text_fallback", + "inferred" + ] + }, + "value": { + "maxLength": 160, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "value", + "confidence", + "source" + ], + "type": "object" + }, + "totals": { + "additionalProperties": false, + "properties": { + "currency": { + "oneOf": [ + { + "type": "null" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "additionalProperties": false, + "properties": { + "level": { + "enum": [ + "high", + "medium", + "low" + ] + }, + "score": { + "maximum": 1, + "minimum": 0, + "type": "number" + } + }, + "required": [ + "score", + "level" + ], + "type": "object" + }, + "source": { + "enum": [ + "structured_summary", + "structured_line_item", + "provider_neutral", + "text_fallback", + "inferred" + ] + }, + "value": { + "maxLength": 3, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "value", + "confidence", + "source" + ], + "type": "object" + } + ] + }, + "subtotal": { + "oneOf": [ + { + "type": "null" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "additionalProperties": false, + "properties": { + "level": { + "enum": [ + "high", + "medium", + "low" + ] + }, + "score": { + "maximum": 1, + "minimum": 0, + "type": "number" + } + }, + "required": [ + "score", + "level" + ], + "type": "object" + }, + "source": { + "enum": [ + "structured_summary", + "structured_line_item", + "provider_neutral", + "text_fallback", + "inferred" + ] + }, + "value": { + "maxLength": 32, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "value", + "confidence", + "source" + ], + "type": "object" + } + ] + }, + "tax": { + "oneOf": [ + { + "type": "null" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "additionalProperties": false, + "properties": { + "level": { + "enum": [ + "high", + "medium", + "low" + ] + }, + "score": { + "maximum": 1, + "minimum": 0, + "type": "number" + } + }, + "required": [ + "score", + "level" + ], + "type": "object" + }, + "source": { + "enum": [ + "structured_summary", + "structured_line_item", + "provider_neutral", + "text_fallback", + "inferred" + ] + }, + "value": { + "maxLength": 32, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "value", + "confidence", + "source" + ], + "type": "object" + } + ] + }, + "total": { + "oneOf": [ + { + "type": "null" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "additionalProperties": false, + "properties": { + "level": { + "enum": [ + "high", + "medium", + "low" + ] + }, + "score": { + "maximum": 1, + "minimum": 0, + "type": "number" + } + }, + "required": [ + "score", + "level" + ], + "type": "object" + }, + "source": { + "enum": [ + "structured_summary", + "structured_line_item", + "provider_neutral", + "text_fallback", + "inferred" + ] + }, + "value": { + "maxLength": 32, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "value", + "confidence", + "source" + ], + "type": "object" + } + ] + } + }, + "required": [ + "subtotal", + "tax", + "total", + "currency" + ], + "type": "object" + }, + "vendor": { + "oneOf": [ + { + "type": "null" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "additionalProperties": false, + "properties": { + "level": { + "enum": [ + "high", + "medium", + "low" + ] + }, + "score": { + "maximum": 1, + "minimum": 0, + "type": "number" + } + }, + "required": [ + "score", + "level" + ], + "type": "object" + }, + "source": { + "enum": [ + "structured_summary", + "structured_line_item", + "provider_neutral", + "text_fallback", + "inferred" + ] + }, + "value": { + "maxLength": 160, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "value", + "confidence", + "source" + ], + "type": "object" + } + ] + } + }, + "required": [ + "vendor", + "purchase_date", + "totals", + "line_items" + ], + "type": "object" + }, + "result": { + "additionalProperties": false, + "description": "Sole authoritative structured analysis object. Its recursively key-sorted, compact UTF-8 JSON bytes are SHA-256 hashed under ardaro.recursive-key-sort-compact-json-utf8-sha256.v1 and published as analysis_result_identity.", + "properties": { + "extracted_facts": { + "additionalProperties": false, + "properties": { + "line_items": { + "items": { + "additionalProperties": false, + "properties": { + "amount": { + "oneOf": [ + { + "type": "null" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "additionalProperties": false, + "properties": { + "level": { + "enum": [ + "high", + "medium", + "low" + ] + }, + "score": { + "maximum": 1, + "minimum": 0, + "type": "number" + } + }, + "required": [ + "score", + "level" + ], + "type": "object" + }, + "source": { + "enum": [ + "structured_summary", + "structured_line_item", + "provider_neutral", + "text_fallback", + "inferred" + ] + }, + "value": { + "maxLength": 80, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "value", + "confidence", + "source" + ], + "type": "object" + } + ] + }, + "description": { + "oneOf": [ + { + "type": "null" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "additionalProperties": false, + "properties": { + "level": { + "enum": [ + "high", + "medium", + "low" + ] + }, + "score": { + "maximum": 1, + "minimum": 0, + "type": "number" + } + }, + "required": [ + "score", + "level" + ], + "type": "object" + }, + "source": { + "enum": [ + "structured_summary", + "structured_line_item", + "provider_neutral", + "text_fallback", + "inferred" + ] + }, + "value": { + "maxLength": 240, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "value", + "confidence", + "source" + ], + "type": "object" + } + ] + }, + "product_code": { + "oneOf": [ + { + "type": "null" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "additionalProperties": false, + "properties": { + "level": { + "enum": [ + "high", + "medium", + "low" + ] + }, + "score": { + "maximum": 1, + "minimum": 0, + "type": "number" + } + }, + "required": [ + "score", + "level" + ], + "type": "object" + }, + "source": { + "enum": [ + "structured_summary", + "structured_line_item", + "provider_neutral", + "text_fallback", + "inferred" + ] + }, + "value": { + "maxLength": 80, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "value", + "confidence", + "source" + ], + "type": "object" + } + ] + }, + "quantity": { + "oneOf": [ + { + "type": "null" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "additionalProperties": false, + "properties": { + "level": { + "enum": [ + "high", + "medium", + "low" + ] + }, + "score": { + "maximum": 1, + "minimum": 0, + "type": "number" + } + }, + "required": [ + "score", + "level" + ], + "type": "object" + }, + "source": { + "enum": [ + "structured_summary", + "structured_line_item", + "provider_neutral", + "text_fallback", + "inferred" + ] + }, + "value": { + "maxLength": 80, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "value", + "confidence", + "source" + ], + "type": "object" + } + ] + }, + "unit_price": { + "oneOf": [ + { + "type": "null" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "additionalProperties": false, + "properties": { + "level": { + "enum": [ + "high", + "medium", + "low" + ] + }, + "score": { + "maximum": 1, + "minimum": 0, + "type": "number" + } + }, + "required": [ + "score", + "level" + ], + "type": "object" + }, + "source": { + "enum": [ + "structured_summary", + "structured_line_item", + "provider_neutral", + "text_fallback", + "inferred" + ] + }, + "value": { + "maxLength": 80, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "value", + "confidence", + "source" + ], + "type": "object" + } + ] + } + }, + "required": [ + "description", + "product_code", + "quantity", + "unit_price", + "amount" + ], + "type": "object" + }, + "maxItems": 100, + "type": "array" + }, + "purchase_date": { + "additionalProperties": false, + "properties": { + "confidence": { + "additionalProperties": false, + "properties": { + "level": { + "enum": [ + "high", + "medium", + "low" + ] + }, + "score": { + "maximum": 1, + "minimum": 0, + "type": "number" + } + }, + "required": [ + "score", + "level" + ], + "type": "object" + }, + "source": { + "enum": [ + "structured_summary", + "structured_line_item", + "provider_neutral", + "text_fallback", + "inferred" + ] + }, + "value": { + "maxLength": 10, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "value", + "confidence", + "source" + ], + "type": "object" + }, + "purchase_order": { + "additionalProperties": false, + "properties": { + "confidence": { + "additionalProperties": false, + "properties": { + "level": { + "enum": [ + "high", + "medium", + "low" + ] + }, + "score": { + "maximum": 1, + "minimum": 0, + "type": "number" + } + }, + "required": [ + "score", + "level" + ], + "type": "object" + }, + "source": { + "enum": [ + "structured_summary", + "structured_line_item", + "provider_neutral", + "text_fallback", + "inferred" + ] + }, + "value": { + "maxLength": 160, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "value", + "confidence", + "source" + ], + "type": "object" + }, + "receipt_reference": { + "additionalProperties": false, + "properties": { + "confidence": { + "additionalProperties": false, + "properties": { + "level": { + "enum": [ + "high", + "medium", + "low" + ] + }, + "score": { + "maximum": 1, + "minimum": 0, + "type": "number" + } + }, + "required": [ + "score", + "level" + ], + "type": "object" + }, + "source": { + "enum": [ + "structured_summary", + "structured_line_item", + "provider_neutral", + "text_fallback", + "inferred" + ] + }, + "value": { + "maxLength": 160, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "value", + "confidence", + "source" + ], + "type": "object" + }, + "totals.currency": { + "additionalProperties": false, + "properties": { + "confidence": { + "additionalProperties": false, + "properties": { + "level": { + "enum": [ + "high", + "medium", + "low" + ] + }, + "score": { + "maximum": 1, + "minimum": 0, + "type": "number" + } + }, + "required": [ + "score", + "level" + ], + "type": "object" + }, + "source": { + "enum": [ + "structured_summary", + "structured_line_item", + "provider_neutral", + "text_fallback", + "inferred" + ] + }, + "value": { + "maxLength": 3, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "value", + "confidence", + "source" + ], + "type": "object" + }, + "totals.subtotal": { + "additionalProperties": false, + "properties": { + "confidence": { + "additionalProperties": false, + "properties": { + "level": { + "enum": [ + "high", + "medium", + "low" + ] + }, + "score": { + "maximum": 1, + "minimum": 0, + "type": "number" + } + }, + "required": [ + "score", + "level" + ], + "type": "object" + }, + "source": { + "enum": [ + "structured_summary", + "structured_line_item", + "provider_neutral", + "text_fallback", + "inferred" + ] + }, + "value": { + "maxLength": 32, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "value", + "confidence", + "source" + ], + "type": "object" + }, + "totals.tax": { + "additionalProperties": false, + "properties": { + "confidence": { + "additionalProperties": false, + "properties": { + "level": { + "enum": [ + "high", + "medium", + "low" + ] + }, + "score": { + "maximum": 1, + "minimum": 0, + "type": "number" + } + }, + "required": [ + "score", + "level" + ], + "type": "object" + }, + "source": { + "enum": [ + "structured_summary", + "structured_line_item", + "provider_neutral", + "text_fallback", + "inferred" + ] + }, + "value": { + "maxLength": 32, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "value", + "confidence", + "source" + ], + "type": "object" + }, + "totals.total": { + "additionalProperties": false, + "properties": { + "confidence": { + "additionalProperties": false, + "properties": { + "level": { + "enum": [ + "high", + "medium", + "low" + ] + }, + "score": { + "maximum": 1, + "minimum": 0, + "type": "number" + } + }, + "required": [ + "score", + "level" + ], + "type": "object" + }, + "source": { + "enum": [ + "structured_summary", + "structured_line_item", + "provider_neutral", + "text_fallback", + "inferred" + ] + }, + "value": { + "maxLength": 32, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "value", + "confidence", + "source" + ], + "type": "object" + }, + "vendor": { + "additionalProperties": false, + "properties": { + "confidence": { + "additionalProperties": false, + "properties": { + "level": { + "enum": [ + "high", + "medium", + "low" + ] + }, + "score": { + "maximum": 1, + "minimum": 0, + "type": "number" + } + }, + "required": [ + "score", + "level" + ], + "type": "object" + }, + "source": { + "enum": [ + "structured_summary", + "structured_line_item", + "provider_neutral", + "text_fallback", + "inferred" + ] + }, + "value": { + "maxLength": 160, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "value", + "confidence", + "source" + ], + "type": "object" + } + }, + "required": [ + "line_items" + ], + "type": "object" + }, + "inferred_suggestions": { + "items": { + "additionalProperties": false, + "properties": { + "field": { + "enum": [ + "vendor", + "purchase_date", + "purchase_order", + "receipt_reference", + "totals.subtotal", + "totals.tax", + "totals.total", + "totals.currency" + ] + }, + "value": { + "additionalProperties": false, + "properties": { + "confidence": { + "additionalProperties": false, + "properties": { + "level": { + "enum": [ + "high", + "medium", + "low" + ] + }, + "score": { + "maximum": 1, + "minimum": 0, + "type": "number" + } + }, + "required": [ + "score", + "level" + ], + "type": "object" + }, + "source": { + "enum": [ + "structured_summary", + "structured_line_item", + "provider_neutral", + "text_fallback", + "inferred" + ] + }, + "value": { + "maxLength": 240, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "value", + "confidence", + "source" + ], + "type": "object" + } + }, + "required": [ + "field", + "value" + ], + "type": "object" + }, + "maxItems": 8, + "type": "array" + }, + "provenance": { + "type": "object" + }, + "unavailable_fields": { + "items": { + "enum": [ + "purchase order reference", + "purchase_date", + "receipt or invoice number", + "totals.currency", + "totals.subtotal", + "totals.tax", + "totals.total", + "vendor" + ] + }, + "type": "array", + "uniqueItems": true + }, + "validation": { + "type": "object" + } + }, + "required": [ + "extracted_facts", + "inferred_suggestions", + "unavailable_fields", + "validation", + "provenance" + ], + "type": "object" + }, + "service": { + "const": "ardaro.receipt_intelligence" + }, + "status": { + "const": "review_required" + }, + "version": { + "const": "1.0.0" + }, + "warning_groups": { + "type": "object" + }, + "warnings": { + "items": { + "type": "object" + }, + "maxItems": 64, + "type": "array" + } + }, + "required": [ + "contract_version", + "service", + "version", + "status", + "engine", + "receipt", + "confidence", + "duplicate_check", + "duplicate_fingerprint", + "arithmetic_verified", + "arithmetic_consistency", + "warnings", + "warning_groups", + "identities", + "result", + "metering", + "policy" + ], + "type": "object", + "x-ardaro-analysis-result-identity-profile": "ardaro.recursive-key-sort-compact-json-utf8-sha256.v1", + "x-ardaro-authoritative-analysis-path": "$.result", + "x-ardaro-receipt-compatibility-path": "$.receipt", + "x-ardaro-receipt-projection-profile": "ardaro.result-receipt-projection.v1" + }, + "input_description": { + "type": "string" + }, + "limits": { + "additionalProperties": false, + "properties": { + "max_existing_fingerprints": { + "minimum": 1, + "type": "integer" + }, + "max_line_items": { + "minimum": 1, + "type": "integer" + }, + "max_pages": { + "minimum": 1, + "type": "integer" + }, + "max_request_bytes": { + "minimum": 1, + "type": "integer" + }, + "max_text_characters": { + "minimum": 1, + "type": "integer" + }, + "normal_latency_target_ms": { + "minimum": 1, + "type": "integer" + }, + "request_timeout_ms": { + "minimum": 1, + "type": "integer" + } + }, + "required": [ + "max_existing_fingerprints", + "max_line_items", + "max_pages", + "max_request_bytes", + "max_text_characters", + "normal_latency_target_ms", + "request_timeout_ms" + ], + "type": "object" + }, + "paid_processing_performed": { + "const": false + }, + "request": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "properties": { + "contract_version": { + "const": "ardaro.agent-receipt-intelligence.request.v1", + "description": "Required request contract identifier; send this exact version string." + }, + "existing_fingerprints": { + "description": "Receipt fingerprints already known to the caller for duplicate comparison. Supply lowercase 64-character SHA-256 hex strings, or an empty array when none are available; at most 10,000 entries.", + "items": { + "pattern": "^[0-9a-f]{64}$", + "type": "string" + }, + "maxItems": 10000, + "type": "array" + }, + "input": { + "description": "One receipt supplied as bounded OCR text or a provider-neutral structured extraction. Choose exactly one input kind.", + "oneOf": [ + { + "additionalProperties": false, + "properties": { + "kind": { + "const": "text", + "description": "Selects receipt text input; supply the text property." + }, + "text": { + "description": "OCR or receipt text for one document, up to 20,000 characters. Exclude payment-card data, credentials, customer-record payloads, and financial posting instructions.", + "maxLength": 20000, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "kind", + "text" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "analysis": { + "additionalProperties": false, + "description": "Provider-neutral receipt extraction using only the listed fields. Omit fields that were not extracted.", + "minProperties": 1, + "properties": { + "currency": { + "description": "Three-letter currency code shown on the receipt, for example USD. Supply the extracted value directly or wrap it with optional extraction confidence.", + "oneOf": [ + { + "maxLength": 3, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", + "maximum": 100, + "minimum": 0, + "type": "number" + }, + "value": { + "description": "The extracted field value, supplied as text or a number before receipt normalization.", + "oneOf": [ + { + "maxLength": 3, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "value" + ], + "type": "object" + } + ] + }, + "line_items": { + "description": "Extracted receipt line items, limited to 100 entries; omit unavailable item fields.", + "items": { + "additionalProperties": false, + "minProperties": 1, + "properties": { + "amount": { + "description": "Extended amount printed for this line item, in the receipt currency. Supply the extracted value directly or wrap it with optional extraction confidence.", + "oneOf": [ + { + "maxLength": 80, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", + "maximum": 100, + "minimum": 0, + "type": "number" + }, + "value": { + "description": "The extracted field value, supplied as text or a number before receipt normalization.", + "oneOf": [ + { + "maxLength": 80, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "value" + ], + "type": "object" + } + ] + }, + "description": { + "description": "Item description printed on the receipt. Supply the extracted value directly or wrap it with optional extraction confidence.", + "oneOf": [ + { + "maxLength": 240, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", + "maximum": 100, + "minimum": 0, + "type": "number" + }, + "value": { + "description": "The extracted field value, supplied as text or a number before receipt normalization.", + "oneOf": [ + { + "maxLength": 240, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "value" + ], + "type": "object" + } + ] + }, + "product_code": { + "description": "Product identifier or SKU printed for this line item. Supply the extracted value directly or wrap it with optional extraction confidence.", + "oneOf": [ + { + "maxLength": 80, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", + "maximum": 100, + "minimum": 0, + "type": "number" + }, + "value": { + "description": "The extracted field value, supplied as text or a number before receipt normalization.", + "oneOf": [ + { + "maxLength": 80, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "value" + ], + "type": "object" + } + ] + }, + "quantity": { + "description": "Quantity purchased for this line item. Supply the extracted value directly or wrap it with optional extraction confidence.", + "oneOf": [ + { + "maxLength": 80, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", + "maximum": 100, + "minimum": 0, + "type": "number" + }, + "value": { + "description": "The extracted field value, supplied as text or a number before receipt normalization.", + "oneOf": [ + { + "maxLength": 80, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "value" + ], + "type": "object" + } + ] + }, + "unit_price": { + "description": "Price per unit for this line item, in the receipt currency. Supply the extracted value directly or wrap it with optional extraction confidence.", + "oneOf": [ + { + "maxLength": 80, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", + "maximum": 100, + "minimum": 0, + "type": "number" + }, + "value": { + "description": "The extracted field value, supplied as text or a number before receipt normalization.", + "oneOf": [ + { + "maxLength": 80, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "value" + ], + "type": "object" + } + ] + } + }, + "type": "object" + }, + "maxItems": 100, + "type": "array" + }, + "purchase_date": { + "description": "Purchase date as extracted; YYYY-MM-DD is recommended. Supply the extracted value directly or wrap it with optional extraction confidence.", + "oneOf": [ + { + "maxLength": 10, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", + "maximum": 100, + "minimum": 0, + "type": "number" + }, + "value": { + "description": "The extracted field value, supplied as text or a number before receipt normalization.", + "oneOf": [ + { + "maxLength": 10, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "value" + ], + "type": "object" + } + ] + }, + "purchase_order": { + "description": "Purchase-order reference printed on the receipt; this does not select or link an Ardaro job. Supply the extracted value directly or wrap it with optional extraction confidence.", + "oneOf": [ + { + "maxLength": 160, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", + "maximum": 100, + "minimum": 0, + "type": "number" + }, + "value": { + "description": "The extracted field value, supplied as text or a number before receipt normalization.", + "oneOf": [ + { + "maxLength": 160, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "value" + ], + "type": "object" + } + ] + }, + "receipt_reference": { + "description": "Receipt, invoice, or transaction reference printed on the document. Supply the extracted value directly or wrap it with optional extraction confidence.", + "oneOf": [ + { + "maxLength": 160, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", + "maximum": 100, + "minimum": 0, + "type": "number" + }, + "value": { + "description": "The extracted field value, supplied as text or a number before receipt normalization.", + "oneOf": [ + { + "maxLength": 160, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "value" + ], + "type": "object" + } + ] + }, + "subtotal": { + "description": "Receipt subtotal before tax, in the receipt currency. Supply the extracted value directly or wrap it with optional extraction confidence.", + "oneOf": [ + { + "maxLength": 32, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", + "maximum": 100, + "minimum": 0, + "type": "number" + }, + "value": { + "description": "The extracted field value, supplied as text or a number before receipt normalization.", + "oneOf": [ + { + "maxLength": 32, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "value" + ], + "type": "object" + } + ] + }, + "tax": { + "description": "Total tax amount printed on the receipt, in the receipt currency. Supply the extracted value directly or wrap it with optional extraction confidence.", + "oneOf": [ + { + "maxLength": 32, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", + "maximum": 100, + "minimum": 0, + "type": "number" + }, + "value": { + "description": "The extracted field value, supplied as text or a number before receipt normalization.", + "oneOf": [ + { + "maxLength": 32, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "value" + ], + "type": "object" + } + ] + }, + "total": { + "description": "Final receipt total, in the receipt currency. Supply the extracted value directly or wrap it with optional extraction confidence.", + "oneOf": [ + { + "maxLength": 32, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", + "maximum": 100, + "minimum": 0, + "type": "number" + }, + "value": { + "description": "The extracted field value, supplied as text or a number before receipt normalization.", + "oneOf": [ + { + "maxLength": 32, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "value" + ], + "type": "object" + } + ] + }, + "vendor": { + "description": "Merchant or supplier name printed on the receipt. Supply the extracted value directly or wrap it with optional extraction confidence.", + "oneOf": [ + { + "maxLength": 160, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", + "maximum": 100, + "minimum": 0, + "type": "number" + }, + "value": { + "description": "The extracted field value, supplied as text or a number before receipt normalization.", + "oneOf": [ + { + "maxLength": 160, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "value" + ], + "type": "object" + } + ] + } + }, + "type": "object" + }, + "kind": { + "const": "structured", + "description": "Selects structured receipt input; supply the analysis property." + } + }, + "required": [ + "kind", + "analysis" + ], + "type": "object" + } + ] + } + }, + "required": [ + "contract_version", + "input", + "existing_fingerprints" + ], + "type": "object" + }, + "synthetic_only": { + "const": true + } + }, + "required": [ + "example_version", + "synthetic_only", + "paid_processing_performed", + "input_description", + "request", + "expected_response", + "limits" + ], + "type": "object" + }, + "service": { + "const": "receipt" + } + }, + "required": [ + "service", + "details" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "details": { + "additionalProperties": false, + "properties": { + "example_version": { + "const": "ardaro.invoice-matching.example.v1" + }, + "policy": { + "additionalProperties": false, + "properties": { + "financial_posting_supported": { + "const": false + }, + "human_review_required": { + "const": true + }, + "payment_required": { + "const": false + } + }, + "required": [ + "human_review_required", + "financial_posting_supported", + "payment_required" + ], + "type": "object" + }, + "request": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "description": "One invoice and one purchase order with caller-supplied opaque supplier identifiers. Runtime validation additionally rejects duplicate line IDs, padded/control-bearing strings, sensitive card or credential data, and requests over 262144 UTF-8 JSON bytes. All numeric inputs are decimal strings; missing optional arithmetic evidence requires review.", + "properties": { + "contract_version": { + "const": "ardaro.agent-invoice-matching.request.v1" + }, + "invoice": { + "oneOf": [ + { + "additionalProperties": false, + "properties": { + "currency": { + "enum": [ + "JPY" + ], + "type": "string" + }, + "line_items": { + "items": { + "additionalProperties": false, + "properties": { + "amount": { + "maxLength": 26, + "pattern": "^(?:0|[1-9][0-9]{0,25})$", + "type": "string" + }, + "description": { + "maxLength": 240, + "minLength": 1, + "type": "string" + }, + "line_id": { + "maxLength": 80, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + }, + "po_line_id": { + "maxLength": 80, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + }, + "product_code": { + "maxLength": 80, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + }, + "quantity": { + "allOf": [ + { + "not": { + "pattern": "^0(?:\\.0+)?$" + } + } + ], + "maxLength": 19, + "not": { + "pattern": "\\n" + }, + "pattern": "^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?$", + "type": "string" + }, + "unit": { + "maxLength": 32, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + }, + "unit_price": { + "maxLength": 19, + "not": { + "pattern": "\\n" + }, + "pattern": "^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?$", + "type": "string" + } + }, + "required": [ + "description", + "line_id", + "quantity", + "unit", + "unit_price" + ], + "type": "object" + }, + "maxItems": 100, + "minItems": 1, + "type": "array" + }, + "purchase_order_reference": { + "maxLength": 80, + "minLength": 1, + "type": "string" + }, + "reference": { + "maxLength": 80, + "minLength": 1, + "type": "string" + }, + "subtotal": { + "maxLength": 26, + "pattern": "^(?:0|[1-9][0-9]{0,25})$", + "type": "string" + }, + "supplier_id": { + "maxLength": 80, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + }, + "tax": { + "maxLength": 26, + "pattern": "^(?:0|[1-9][0-9]{0,25})$", + "type": "string" + }, + "total": { + "maxLength": 26, + "pattern": "^(?:0|[1-9][0-9]{0,25})$", + "type": "string" + } + }, + "required": [ + "currency", + "line_items", + "purchase_order_reference", + "reference", + "supplier_id" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "currency": { + "enum": [ + "USD", + "EUR", + "GBP", + "CAD", + "AUD", + "MXN" + ], + "type": "string" + }, + "line_items": { + "items": { + "additionalProperties": false, + "properties": { + "amount": { + "maxLength": 29, + "pattern": "^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,2})?$", + "type": "string" + }, + "description": { + "maxLength": 240, + "minLength": 1, + "type": "string" + }, + "line_id": { + "maxLength": 80, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + }, + "po_line_id": { + "maxLength": 80, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + }, + "product_code": { + "maxLength": 80, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + }, + "quantity": { + "allOf": [ + { + "not": { + "pattern": "^0(?:\\.0+)?$" + } + } + ], + "maxLength": 19, + "not": { + "pattern": "\\n" + }, + "pattern": "^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?$", + "type": "string" + }, + "unit": { + "maxLength": 32, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + }, + "unit_price": { + "maxLength": 19, + "not": { + "pattern": "\\n" + }, + "pattern": "^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?$", + "type": "string" + } + }, + "required": [ + "description", + "line_id", + "quantity", + "unit", + "unit_price" + ], + "type": "object" + }, + "maxItems": 100, + "minItems": 1, + "type": "array" + }, + "purchase_order_reference": { + "maxLength": 80, + "minLength": 1, + "type": "string" + }, + "reference": { + "maxLength": 80, + "minLength": 1, + "type": "string" + }, + "subtotal": { + "maxLength": 29, + "pattern": "^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,2})?$", + "type": "string" + }, + "supplier_id": { + "maxLength": 80, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + }, + "tax": { + "maxLength": 29, + "pattern": "^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,2})?$", + "type": "string" + }, + "total": { + "maxLength": 29, + "pattern": "^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,2})?$", + "type": "string" + } + }, + "required": [ + "currency", + "line_items", + "purchase_order_reference", + "reference", + "supplier_id" + ], + "type": "object" + } + ] + }, + "purchase_order": { + "oneOf": [ + { + "additionalProperties": false, + "properties": { + "currency": { + "enum": [ + "JPY" + ], + "type": "string" + }, + "line_items": { + "items": { + "additionalProperties": false, + "properties": { + "amount": { + "maxLength": 26, + "pattern": "^(?:0|[1-9][0-9]{0,25})$", + "type": "string" + }, + "description": { + "maxLength": 240, + "minLength": 1, + "type": "string" + }, + "line_id": { + "maxLength": 80, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + }, + "product_code": { + "maxLength": 80, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + }, + "quantity": { + "allOf": [ + { + "not": { + "pattern": "^0(?:\\.0+)?$" + } + } + ], + "maxLength": 19, + "not": { + "pattern": "\\n" + }, + "pattern": "^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?$", + "type": "string" + }, + "unit": { + "maxLength": 32, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + }, + "unit_price": { + "maxLength": 19, + "not": { + "pattern": "\\n" + }, + "pattern": "^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?$", + "type": "string" + } + }, + "required": [ + "description", + "line_id", + "quantity", + "unit", + "unit_price" + ], + "type": "object" + }, + "maxItems": 100, + "minItems": 1, + "type": "array" + }, + "reference": { + "maxLength": 80, + "minLength": 1, + "type": "string" + }, + "supplier_id": { + "maxLength": 80, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + } + }, + "required": [ + "currency", + "line_items", + "reference", + "supplier_id" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "currency": { + "enum": [ + "USD", + "EUR", + "GBP", + "CAD", + "AUD", + "MXN" + ], + "type": "string" + }, + "line_items": { + "items": { + "additionalProperties": false, + "properties": { + "amount": { + "maxLength": 29, + "pattern": "^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,2})?$", + "type": "string" + }, + "description": { + "maxLength": 240, + "minLength": 1, + "type": "string" + }, + "line_id": { + "maxLength": 80, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + }, + "product_code": { + "maxLength": 80, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + }, + "quantity": { + "allOf": [ + { + "not": { + "pattern": "^0(?:\\.0+)?$" + } + } + ], + "maxLength": 19, + "not": { + "pattern": "\\n" + }, + "pattern": "^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?$", + "type": "string" + }, + "unit": { + "maxLength": 32, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + }, + "unit_price": { + "maxLength": 19, + "not": { + "pattern": "\\n" + }, + "pattern": "^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?$", + "type": "string" + } + }, + "required": [ + "description", + "line_id", + "quantity", + "unit", + "unit_price" + ], + "type": "object" + }, + "maxItems": 100, + "minItems": 1, + "type": "array" + }, + "reference": { + "maxLength": 80, + "minLength": 1, + "type": "string" + }, + "supplier_id": { + "maxLength": 80, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + } + }, + "required": [ + "currency", + "line_items", + "reference", + "supplier_id" + ], + "type": "object" + } + ] + } + }, + "required": [ + "contract_version", + "invoice", + "purchase_order" + ], + "type": "object" + }, + "response": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "properties": { + "contract_version": { + "const": "ardaro.agent-invoice-matching.response.v1" + }, + "identities": { + "additionalProperties": false, + "properties": { + "analysis_result_identity": { + "pattern": "^res_[0-9a-f]{64}$", + "type": "string" + } + }, + "required": [ + "analysis_result_identity" + ], + "type": "object" + }, + "result": { + "additionalProperties": false, + "properties": { + "arithmetic": { + "additionalProperties": false, + "properties": { + "computed_invoice_total": { + "anyOf": [ + { + "maxLength": 42, + "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$", + "type": "string" + }, + { + "type": "null" + } + ] + }, + "invoice_currency_scale": { + "enum": [ + 0, + 2 + ] + }, + "invoice_line_amount_sum": { + "maxLength": 42, + "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$", + "type": "string" + }, + "invoice_subtotal": { + "anyOf": [ + { + "maxLength": 42, + "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$", + "type": "string" + }, + { + "type": "null" + } + ] + }, + "invoice_subtotal_status": { + "enum": [ + "consistent", + "mismatch", + "unavailable" + ] + }, + "invoice_supplied_line_amount_sum": { + "anyOf": [ + { + "maxLength": 42, + "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$", + "type": "string" + }, + { + "type": "null" + } + ] + }, + "invoice_tax": { + "anyOf": [ + { + "maxLength": 42, + "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$", + "type": "string" + }, + { + "type": "null" + } + ] + }, + "invoice_total": { + "anyOf": [ + { + "maxLength": 42, + "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$", + "type": "string" + }, + { + "type": "null" + } + ] + }, + "invoice_total_status": { + "enum": [ + "consistent", + "mismatch", + "unavailable" + ] + }, + "purchase_order_currency_scale": { + "enum": [ + 0, + 2 + ] + }, + "rounding_mode": { + "const": "ROUND_HALF_UP" + }, + "rounding_scope": { + "const": "each_line_then_sum" + } + }, + "required": [ + "rounding_mode", + "rounding_scope", + "invoice_currency_scale", + "purchase_order_currency_scale", + "invoice_line_amount_sum", + "invoice_supplied_line_amount_sum", + "invoice_subtotal", + "invoice_tax", + "invoice_total", + "computed_invoice_total", + "invoice_subtotal_status", + "invoice_total_status" + ], + "type": "object" + }, + "comparison_rows": { + "items": { + "additionalProperties": false, + "properties": { + "allocation_status": { + "enum": [ + "allocated", + "not_comparable", + "unmatched" + ] + }, + "computed_invoice_amount": { + "maxLength": 42, + "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$", + "type": "string" + }, + "discrepancy_codes": { + "items": { + "enum": [ + "currency_mismatch", + "supplier_mismatch", + "purchase_order_reference_mismatch", + "invoice_line_amount_unavailable", + "purchase_order_line_amount_unavailable", + "invoice_line_arithmetic_mismatch", + "purchase_order_line_arithmetic_mismatch", + "referenced_purchase_order_line_missing", + "ambiguous_product_code", + "unmatchable_invoice_line", + "unit_mismatch", + "product_code_mismatch", + "unit_price_mismatch", + "quantity_exceeds_purchase_order", + "invoice_subtotal_unavailable", + "invoice_tax_unavailable", + "invoice_total_unavailable", + "invoice_subtotal_mismatch", + "invoice_supplied_line_sum_mismatch", + "invoice_total_mismatch" + ], + "type": "string" + }, + "maxItems": 20, + "minItems": 0, + "type": "array", + "uniqueItems": true + }, + "invoice_amount": { + "anyOf": [ + { + "maxLength": 42, + "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$", + "type": "string" + }, + { + "type": "null" + } + ] + }, + "invoice_currency": { + "enum": [ + "USD", + "EUR", + "GBP", + "CAD", + "AUD", + "MXN", + "JPY" + ] + }, + "invoice_line_id": { + "maxLength": 80, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + }, + "invoice_quantity": { + "maxLength": 42, + "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$", + "type": "string" + }, + "invoice_source": { + "maxLength": 100, + "minLength": 1, + "pattern": "^/(?:invoice|purchase_order)(?:/[A-Za-z0-9_]+)*$", + "type": "string" + }, + "invoice_unit": { + "maxLength": 32, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + }, + "invoice_unit_price": { + "maxLength": 42, + "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$", + "type": "string" + }, + "line_arithmetic_status": { + "enum": [ + "consistent", + "mismatch", + "unavailable" + ] + }, + "match_method": { + "enum": [ + "unmatched", + "explicit_po_line_id", + "exact_product_code" + ] + }, + "outcome": { + "enum": [ + "no_discrepancies", + "review_required" + ] + }, + "purchase_order_currency": { + "enum": [ + "USD", + "EUR", + "GBP", + "CAD", + "AUD", + "MXN", + "JPY" + ] + }, + "purchase_order_line_id": { + "anyOf": [ + { + "maxLength": 80, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + }, + { + "type": "null" + } + ] + }, + "purchase_order_quantity": { + "anyOf": [ + { + "maxLength": 42, + "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$", + "type": "string" + }, + { + "type": "null" + } + ] + }, + "purchase_order_source": { + "anyOf": [ + { + "maxLength": 100, + "minLength": 1, + "pattern": "^/(?:invoice|purchase_order)(?:/[A-Za-z0-9_]+)*$", + "type": "string" + }, + { + "type": "null" + } + ] + }, + "purchase_order_unit": { + "anyOf": [ + { + "maxLength": 32, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + }, + { + "type": "null" + } + ] + }, + "purchase_order_unit_price": { + "anyOf": [ + { + "maxLength": 42, + "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$", + "type": "string" + }, + { + "type": "null" + } + ] + }, + "unit_price_difference": { + "anyOf": [ + { + "maxLength": 42, + "pattern": "^-?(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?$", + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "invoice_line_id", + "invoice_source", + "purchase_order_line_id", + "purchase_order_source", + "match_method", + "allocation_status", + "invoice_quantity", + "purchase_order_quantity", + "invoice_unit", + "purchase_order_unit", + "invoice_unit_price", + "purchase_order_unit_price", + "invoice_currency", + "purchase_order_currency", + "unit_price_difference", + "invoice_amount", + "computed_invoice_amount", + "line_arithmetic_status", + "discrepancy_codes", + "outcome" + ], + "type": "object" + }, + "maxItems": 100, + "minItems": 1, + "type": "array" + }, + "discrepancies": { + "items": { + "additionalProperties": false, + "properties": { + "code": { + "enum": [ + "currency_mismatch", + "supplier_mismatch", + "purchase_order_reference_mismatch", + "invoice_line_amount_unavailable", + "purchase_order_line_amount_unavailable", + "invoice_line_arithmetic_mismatch", + "purchase_order_line_arithmetic_mismatch", + "referenced_purchase_order_line_missing", + "ambiguous_product_code", + "unmatchable_invoice_line", + "unit_mismatch", + "product_code_mismatch", + "unit_price_mismatch", + "quantity_exceeds_purchase_order", + "invoice_subtotal_unavailable", + "invoice_tax_unavailable", + "invoice_total_unavailable", + "invoice_subtotal_mismatch", + "invoice_supplied_line_sum_mismatch", + "invoice_total_mismatch" + ], + "type": "string" + }, + "message": { + "maxLength": 240, + "minLength": 1, + "type": "string" + }, + "severity": { + "enum": [ + "error", + "warning" + ] + }, + "sources": { + "items": { + "maxLength": 100, + "minLength": 1, + "pattern": "^/(?:invoice|purchase_order)(?:/[A-Za-z0-9_]+)*$", + "type": "string" + }, + "maxItems": 101, + "minItems": 1, + "type": "array" + } + }, + "required": [ + "code", + "severity", + "message", + "sources" + ], + "type": "object" + }, + "maxItems": 1000, + "minItems": 0, + "type": "array" + }, + "document_checks": { + "additionalProperties": false, + "properties": { + "currency_matches": { + "type": "boolean" + }, + "purchase_order_reference_matches": { + "type": "boolean" + }, + "supplier_matches": { + "type": "boolean" + } + }, + "required": [ + "currency_matches", + "supplier_matches", + "purchase_order_reference_matches" + ], + "type": "object" + }, + "policy": { + "additionalProperties": false, + "properties": { + "arithmetic_scope": { + "maxLength": 300, + "minLength": 1, + "type": "string" + }, + "decision_scope": { + "maxLength": 300, + "minLength": 1, + "type": "string" + }, + "delivery_verification_supported": { + "const": false + }, + "financial_posting_performed": { + "const": false + }, + "financial_posting_supported": { + "const": false + }, + "human_review_required": { + "const": true + }, + "identity_purpose": { + "const": "deterministic_result_comparison_only" + }, + "matching_rule": { + "const": "explicit_po_line_id_else_unique_case_sensitive_product_code" + }, + "model_calls": { + "const": 0 + }, + "payment_approval_supported": { + "const": false + }, + "quantity_scope": { + "maxLength": 300, + "minLength": 1, + "type": "string" + }, + "raw_documents_retained": { + "const": false + }, + "stateless": { + "const": true + }, + "supplier_scope": { + "maxLength": 300, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "human_review_required", + "stateless", + "raw_documents_retained", + "financial_posting_supported", + "financial_posting_performed", + "payment_approval_supported", + "delivery_verification_supported", + "model_calls", + "identity_purpose", + "matching_rule", + "quantity_scope", + "arithmetic_scope", + "supplier_scope", + "decision_scope" + ], + "type": "object" + }, + "purchase_order_line_summary": { + "items": { + "additionalProperties": false, + "properties": { + "allocated_invoice_sources": { + "items": { + "maxLength": 100, + "minLength": 1, + "pattern": "^/(?:invoice|purchase_order)(?:/[A-Za-z0-9_]+)*$", + "type": "string" + }, + "maxItems": 100, + "minItems": 0, + "type": "array" + }, + "allocated_quantity": { + "anyOf": [ + { + "maxLength": 42, + "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$", + "type": "string" + }, + { + "type": "null" + } + ] + }, + "computed_amount": { + "maxLength": 42, + "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$", + "type": "string" + }, + "line_arithmetic_status": { + "enum": [ + "consistent", + "mismatch", + "unavailable" + ] + }, + "ordered_quantity": { + "maxLength": 42, + "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$", + "type": "string" + }, + "overbilled_quantity": { + "anyOf": [ + { + "maxLength": 42, + "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$", + "type": "string" + }, + { + "type": "null" + } + ] + }, + "purchase_order_line_id": { + "maxLength": 80, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + }, + "purchase_order_source": { + "maxLength": 100, + "minLength": 1, + "pattern": "^/(?:invoice|purchase_order)(?:/[A-Za-z0-9_]+)*$", + "type": "string" + }, + "status": { + "enum": [ + "not_comparable", + "not_invoiced", + "overbilled", + "fully_invoiced", + "partially_invoiced" + ] + }, + "supplied_amount": { + "anyOf": [ + { + "maxLength": 42, + "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$", + "type": "string" + }, + { + "type": "null" + } + ] + }, + "uninvoiced_quantity": { + "anyOf": [ + { + "maxLength": 42, + "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$", + "type": "string" + }, + { + "type": "null" + } + ] + }, + "unit": { + "maxLength": 32, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + } + }, + "required": [ + "purchase_order_line_id", + "purchase_order_source", + "allocated_invoice_sources", + "ordered_quantity", + "allocated_quantity", + "uninvoiced_quantity", + "overbilled_quantity", + "unit", + "status", + "supplied_amount", + "computed_amount", + "line_arithmetic_status" + ], + "type": "object" + }, + "maxItems": 100, + "minItems": 1, + "type": "array" + }, + "summary": { + "additionalProperties": false, + "properties": { + "delivery_verified": { + "const": false + }, + "discrepancy_count": { + "maximum": 1000, + "minimum": 0, + "type": "integer" + }, + "human_review_required": { + "const": true + }, + "invoice_line_count": { + "maximum": 100, + "minimum": 0, + "type": "integer" + }, + "matched_invoice_line_count": { + "maximum": 100, + "minimum": 0, + "type": "integer" + }, + "outcome": { + "enum": [ + "no_discrepancies", + "review_required" + ] + }, + "payment_approved": { + "const": false + }, + "purchase_order_line_count": { + "maximum": 100, + "minimum": 0, + "type": "integer" + }, + "unknown_check_count": { + "maximum": 1000, + "minimum": 0, + "type": "integer" + }, + "unmatched_invoice_line_count": { + "maximum": 100, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "outcome", + "invoice_line_count", + "purchase_order_line_count", + "matched_invoice_line_count", + "unmatched_invoice_line_count", + "discrepancy_count", + "unknown_check_count", + "human_review_required", + "delivery_verified", + "payment_approved" + ], + "type": "object" + } + }, + "required": [ + "summary", + "document_checks", + "comparison_rows", + "purchase_order_line_summary", + "discrepancies", + "arithmetic", + "policy" + ], + "type": "object" + }, + "status": { + "const": "review_required" + } + }, + "required": [ + "contract_version", + "status", + "result", + "identities" + ], + "type": "object" + }, + "synthetic_only": { + "const": true + } + }, + "required": [ + "example_version", + "synthetic_only", + "request", + "response", + "policy" + ], + "type": "object" + }, + "service": { + "const": "invoice" + } + }, + "required": [ + "service", + "details" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "details": { + "properties": { + "request": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "description": "Free comparison of one receipt, invoice and purchase order supplied in this request. Missing documents or fields produce needs_review. Maximum 100 lines per document and 196608 UTF-8 JSON bytes. No images, URLs, credentials, account access, or paid tool calls. Money amounts must use the supported currency's minor-unit precision; runtime also rejects sensitive data, padded strings and control characters.", + "properties": { + "invoice": { + "additionalProperties": false, + "description": "Caller-supplied structured data. Use opaque supplier IDs and decimal strings; omit unknown fields. Receipt kind describes the source document, not verified delivery. Field names align with invoice matching; receipt extraction output must be mapped explicitly.", + "properties": { + "currency": { + "pattern": "^[A-Z]{3}$", + "type": "string" + }, + "line_items": { + "items": { + "additionalProperties": false, + "properties": { + "amount": { + "maxLength": 33, + "pattern": "^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,6})?$", + "type": "string" + }, + "description": { + "maxLength": 240, + "minLength": 1, + "type": "string" + }, + "line_id": { + "maxLength": 80, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + }, + "po_line_id": { + "maxLength": 80, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + }, + "product_code": { + "maxLength": 80, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + }, + "quantity": { + "allOf": [ + { + "not": { + "pattern": "^0(?:\\.0+)?$" + } + } + ], + "maxLength": 19, + "not": { + "pattern": "\\n" + }, + "pattern": "^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?$", + "type": "string" + }, + "unit": { + "maxLength": 32, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + }, + "unit_price": { + "maxLength": 19, + "not": { + "pattern": "\\n" + }, + "pattern": "^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?$", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "maxItems": 100, + "type": "array" + }, + "purchase_order_reference": { + "maxLength": 80, + "minLength": 1, + "type": "string" + }, + "reference": { + "maxLength": 80, + "minLength": 1, + "type": "string" + }, + "subtotal": { + "maxLength": 33, + "pattern": "^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,6})?$", + "type": "string" + }, + "supplier_id": { + "maxLength": 80, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + }, + "tax": { + "maxLength": 33, + "pattern": "^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,6})?$", + "type": "string" + }, + "total": { + "maxLength": 33, + "pattern": "^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,6})?$", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "purchase_order": { + "additionalProperties": false, + "description": "Caller-supplied structured data. Use opaque supplier IDs and decimal strings; omit unknown fields. Receipt kind describes the source document, not verified delivery. Field names align with invoice matching; receipt extraction output must be mapped explicitly.", + "properties": { + "currency": { + "pattern": "^[A-Z]{3}$", + "type": "string" + }, + "line_items": { + "items": { + "additionalProperties": false, + "properties": { + "amount": { + "maxLength": 33, + "pattern": "^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,6})?$", + "type": "string" + }, + "description": { + "maxLength": 240, + "minLength": 1, + "type": "string" + }, + "line_id": { + "maxLength": 80, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + }, + "product_code": { + "maxLength": 80, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + }, + "quantity": { + "allOf": [ + { + "not": { + "pattern": "^0(?:\\.0+)?$" + } + } + ], + "maxLength": 19, + "not": { + "pattern": "\\n" + }, + "pattern": "^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?$", + "type": "string" + }, + "unit": { + "maxLength": 32, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + }, + "unit_price": { + "maxLength": 19, + "not": { + "pattern": "\\n" + }, + "pattern": "^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?$", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "maxItems": 100, + "type": "array" + }, + "reference": { + "maxLength": 80, + "minLength": 1, + "type": "string" + }, + "subtotal": { + "maxLength": 33, + "pattern": "^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,6})?$", + "type": "string" + }, + "supplier_id": { + "maxLength": 80, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + }, + "tax": { + "maxLength": 33, + "pattern": "^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,6})?$", + "type": "string" + }, + "total": { + "maxLength": 33, + "pattern": "^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,6})?$", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "receipt": { + "additionalProperties": false, + "description": "Caller-supplied structured data. Use opaque supplier IDs and decimal strings; omit unknown fields. Receipt kind describes the source document, not verified delivery. Field names align with invoice matching; receipt extraction output must be mapped explicitly.", + "properties": { + "currency": { + "pattern": "^[A-Z]{3}$", + "type": "string" + }, + "invoice_reference": { + "maxLength": 80, + "minLength": 1, + "type": "string" + }, + "kind": { + "enum": [ + "expense_receipt", + "delivery_receipt" + ] + }, + "line_items": { + "items": { + "additionalProperties": false, + "properties": { + "amount": { + "maxLength": 33, + "pattern": "^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,6})?$", + "type": "string" + }, + "description": { + "maxLength": 240, + "minLength": 1, + "type": "string" + }, + "invoice_line_id": { + "maxLength": 80, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + }, + "line_id": { + "maxLength": 80, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + }, + "product_code": { + "maxLength": 80, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + }, + "quantity": { + "allOf": [ + { + "not": { + "pattern": "^0(?:\\.0+)?$" + } + } + ], + "maxLength": 19, + "not": { + "pattern": "\\n" + }, + "pattern": "^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?$", + "type": "string" + }, + "unit": { + "maxLength": 32, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + }, + "unit_price": { + "maxLength": 19, + "not": { + "pattern": "\\n" + }, + "pattern": "^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?$", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "maxItems": 100, + "type": "array" + }, + "purchase_order_reference": { + "maxLength": 80, + "minLength": 1, + "type": "string" + }, + "reference": { + "maxLength": 80, + "minLength": 1, + "type": "string" + }, + "subtotal": { + "maxLength": 33, + "pattern": "^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,6})?$", + "type": "string" + }, + "supplier_id": { + "maxLength": 80, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + }, + "tax": { + "maxLength": 33, + "pattern": "^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,6})?$", + "type": "string" + }, + "total": { + "maxLength": 33, + "pattern": "^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,6})?$", + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [], + "type": "object" + }, + "response": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "oneOf": [ + { + "additionalProperties": false, + "properties": { + "comparisons": { + "items": { + "additionalProperties": false, + "properties": { + "document_identity_comparable": { + "type": "boolean" + }, + "pair": { + "enum": [ + "receipt_to_invoice", + "invoice_to_purchase_order" + ] + }, + "rows": { + "items": { + "additionalProperties": false, + "properties": { + "amount_difference": { + "maxLength": 50, + "pattern": "^-?(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$", + "type": [ + "string", + "null" + ] + }, + "candidate_targets": { + "items": { + "maxLength": 100, + "pattern": "^/(?:receipt|invoice|purchase_order)(?:/[A-Za-z0-9_]+)*$", + "type": "string" + }, + "maxItems": 100, + "type": "array" + }, + "comparison_performed": { + "type": "boolean" + }, + "match_method": { + "enum": [ + "unmatched", + "explicit_line_reference", + "exact_product_code", + "normalized_description" + ] + }, + "quantity_difference": { + "maxLength": 50, + "pattern": "^-?(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$", + "type": [ + "string", + "null" + ] + }, + "source": { + "maxLength": 100, + "pattern": "^/(?:receipt|invoice|purchase_order)(?:/[A-Za-z0-9_]+)*$", + "type": "string" + }, + "status": { + "enum": [ + "no_discrepancies", + "needs_review" + ] + }, + "target": { + "anyOf": [ + { + "maxLength": 100, + "pattern": "^/(?:receipt|invoice|purchase_order)(?:/[A-Za-z0-9_]+)*$", + "type": "string" + }, + { + "type": "null" + } + ] + }, + "unit_price_difference": { + "maxLength": 50, + "pattern": "^-?(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$", + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "source", + "target", + "candidate_targets", + "match_method", + "comparison_performed", + "status", + "quantity_difference", + "unit_price_difference", + "amount_difference" + ], + "type": "object" + }, + "maxItems": 100, + "type": "array" + }, + "status": { + "enum": [ + "no_discrepancies", + "needs_review" + ] + } + }, + "required": [ + "pair", + "status", + "document_identity_comparable", + "rows" + ], + "type": "object" + }, + "maxItems": 2, + "minItems": 2, + "type": "array" + }, + "contract_version": { + "const": "ardaro.purchase-document-reconciliation.response.v1" + }, + "delivery_verified": { + "const": false + }, + "discrepancies": { + "items": { + "additionalProperties": false, + "properties": { + "code": { + "maxLength": 80, + "pattern": "^[a-z_]+$", + "type": "string" + }, + "scope": { + "enum": [ + "receipt", + "invoice", + "purchase_order", + "receipt_to_invoice", + "invoice_to_purchase_order" + ] + }, + "severity": { + "enum": [ + "unknown", + "discrepancy" + ] + }, + "sources": { + "items": { + "maxLength": 100, + "pattern": "^/(?:receipt|invoice|purchase_order)(?:/[A-Za-z0-9_]+)*$", + "type": "string" + }, + "maxItems": 101, + "type": "array" + } + }, + "required": [ + "code", + "scope", + "severity", + "sources" + ], + "type": "object" + }, + "maxItems": 6000, + "type": "array" + }, + "document_summary": { + "items": { + "additionalProperties": false, + "properties": { + "currency_minor_units": { + "enum": [ + 0, + 2, + null + ] + }, + "currency_supported": { + "type": "boolean" + }, + "document": { + "enum": [ + "receipt", + "invoice", + "purchase_order" + ] + }, + "line_count": { + "maximum": 100, + "minimum": 0, + "type": "integer" + }, + "present": { + "type": "boolean" + } + }, + "required": [ + "document", + "present", + "line_count", + "currency_supported", + "currency_minor_units" + ], + "type": "object" + }, + "maxItems": 3, + "minItems": 3, + "type": "array" + }, + "financial_posting_performed": { + "const": false + }, + "human_review_required": { + "const": true + }, + "payment_approved": { + "const": false + }, + "policy": { + "const": { + "arithmetic_scope": "Exact decimal comparisons with per-line ROUND_HALF_UP at supported currency precision. No tax applicability, discounts, freight or currency conversion is inferred.", + "decision_scope": "No discrepancies means the supported checks found none in supplied data. It is not payment authorization, accounting approval or supplier verification.", + "document_storage_performed": false, + "matching_rule": "explicit line reference, else unique exact case-sensitive product code, else unique NFKC/casefold/whitespace-normalized description when both product codes are absent; never fuzzy or semantic", + "model_calls": 0, + "paid_tool_calls": 0, + "payment_required": false, + "quantity_scope": "Differences concern only these three supplied documents. Partial receipts, partial invoicing, prior invoices, returns and delivery events are not inferred.", + "receipt_scope": "An expense receipt is not evidence of delivery. A delivery_receipt label is caller-supplied and does not authenticate delivery.", + "retention_scope": "This function retains no documents or results; caller and transport retention are outside this function's guarantees." + } + }, + "provenance": { + "const": { + "document_authenticity_verified": false, + "external_data_fetched": false, + "source": "caller_supplied_documents_only", + "source_pointer_root": "original_arguments" + } + }, + "result_identity": { + "pattern": "^res_[0-9a-f]{64}$", + "type": "string" + }, + "status": { + "enum": [ + "no_discrepancies", + "needs_review" + ] + } + }, + "required": [ + "contract_version", + "human_review_required", + "payment_approved", + "delivery_verified", + "financial_posting_performed", + "provenance", + "policy", + "status", + "result_identity", + "document_summary", + "comparisons", + "discrepancies" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "contract_version": { + "const": "ardaro.purchase-document-reconciliation.response.v1" + }, + "error": { + "additionalProperties": false, + "properties": { + "code": { + "maxLength": 80, + "type": "string" + }, + "message": { + "maxLength": 300, + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + }, + "status": { + "const": "error" + } + }, + "required": [ + "contract_version", + "status", + "error" + ], + "type": "object" + } + ], + "type": "object" + } + }, + "required": [ + "request", + "response" + ], + "type": "object" + }, + "service": { + "const": "reconciliation" + } + }, + "required": [ + "service", + "details" + ], + "type": "object" + } +]
- Changed
get_document_service_status1 field changed- changed
Output schema / oneOfPrevious value: -[ - { - "additionalProperties": false, - "properties": { - "details": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "additionalProperties": false, - "properties": { - "availability": { - "additionalProperties": false, - "description": "Cached runtime readiness, not a fresh external probe or settlement proof.", - "properties": { - "ready": { - "description": "Whether the launch gate and cached dependencies currently allow paid processing.", - "type": "boolean" - }, - "reason": { - "description": "Coarse public readiness reason; contains no internal error details.", - "enum": [ - "ready", - "launch_gate_closed", - "dependency_unavailable", - "not_configured" - ] - }, - "source": { - "const": "cached_runtime_readiness" - } - }, - "required": [ - "ready", - "reason", - "source" - ], - "type": "object" - }, - "limits": { - "additionalProperties": false, - "properties": { - "max_existing_fingerprints": { - "minimum": 1, - "type": "integer" - }, - "max_line_items": { - "minimum": 1, - "type": "integer" - }, - "max_pages": { - "minimum": 1, - "type": "integer" - }, - "max_request_bytes": { - "minimum": 1, - "type": "integer" - }, - "max_text_characters": { - "minimum": 1, - "type": "integer" - }, - "normal_latency_target_ms": { - "minimum": 1, - "type": "integer" - }, - "request_timeout_ms": { - "minimum": 1, - "type": "integer" - } - }, - "required": [ - "max_existing_fingerprints", - "max_line_items", - "max_pages", - "max_request_bytes", - "max_text_characters", - "normal_latency_target_ms", - "request_timeout_ms" - ], - "type": "object" - }, - "paid_processing_performed": { - "const": false - }, - "payment_authorized": { - "const": false - }, - "policy": { - "additionalProperties": false, - "properties": { - "advisory_only": { - "const": true - }, - "ardaro_saas_tenant_access": { - "const": false - }, - "financial_mutation_supported": { - "const": false - }, - "human_review_required": { - "const": true - } - }, - "required": [ - "advisory_only", - "human_review_required", - "financial_mutation_supported", - "ardaro_saas_tenant_access" - ], - "type": "object" - }, - "price": { - "additionalProperties": false, - "properties": { - "amount": { - "pattern": "^[0-9]+\\.[0-9]{2}$", - "type": "string" - }, - "currency": { - "const": "USDC" - }, - "display": { - "pattern": "^\\$[0-9]+\\.[0-9]{2}$", - "type": "string" - }, - "failed_input_validation_charged": { - "const": false - }, - "model": { - "const": "fixed_per_accepted_request" - }, - "network": { - "type": "string" - }, - "same_payment_identifier_replay_requires_new_payment": { - "const": false - }, - "successful_response_loss_retry_policy": { - "type": "string" - } - }, - "required": [ - "model", - "amount", - "currency", - "display", - "network", - "failed_input_validation_charged", - "same_payment_identifier_replay_requires_new_payment", - "successful_response_loss_retry_policy" - ], - "type": "object" - }, - "retention": { - "additionalProperties": false, - "properties": { - "default_retention_seconds": { - "minimum": 1, - "type": "integer" - }, - "deletion_behavior": { - "type": "string" - }, - "durable_recovery_supported": { - "type": "boolean" - }, - "extracted_results_retained": { - "type": "boolean" - }, - "payment_metadata_retention_seconds": { - "minimum": 86400, - "type": "integer" - }, - "raw_documents_retained": { - "const": false - }, - "raw_receipt_images_retained": { - "const": false - }, - "storage_scope": { - "type": "string" - }, - "used_for_model_training": { - "const": false - } - }, - "required": [ - "default_retention_seconds", - "deletion_behavior", - "durable_recovery_supported", - "extracted_results_retained", - "payment_metadata_retention_seconds", - "raw_documents_retained", - "raw_receipt_images_retained", - "storage_scope", - "used_for_model_training" - ], - "type": "object" - }, - "service_id": { - "const": "ardaro.receipt_intelligence" - }, - "status_version": { - "const": "ardaro.receipt-intelligence.service-status.v1" - }, - "supported_input_types": { - "items": { - "additionalProperties": false, - "properties": { - "description": { - "type": "string" - }, - "input_kind": { - "enum": [ - "text", - "structured" - ] - }, - "mime_type": { - "type": "string" - } - }, - "required": [ - "mime_type", - "input_kind", - "description" - ], - "type": "object" - }, - "minItems": 1, - "type": "array" - } - }, - "required": [ - "availability", - "limits", - "paid_processing_performed", - "payment_authorized", - "policy", - "price", - "retention", - "service_id", - "status_version", - "supported_input_types" - ], - "type": "object" - }, - "service": { - "const": "receipt" - } - }, - "required": [ - "service", - "details" - ], - "type": "object" - }, - { - "additionalProperties": false, - "properties": { - "details": { - "additionalProperties": false, - "allOf": [ - { - "else": { - "properties": { - "reason": { - "enum": [ - "launch_gated", - "dependency_unavailable" - ] - } - } - }, - "if": { - "properties": { - "ready": { - "const": true - } - } - }, - "then": { - "properties": { - "reason": { - "const": "ready" - } - } - } - } - ], - "properties": { - "endpoints": { - "additionalProperties": false, - "properties": { - "analyze": { - "format": "uri", - "maxLength": 600, - "minLength": 1, - "pattern": "^https?://[^/?#]+/v1/invoice-matching/analyze(?![\\s\\S])", - "type": "string" - }, - "example": { - "format": "uri", - "maxLength": 600, - "minLength": 1, - "pattern": "^https?://[^/?#]+/agent-services/invoice-matching/example(?![\\s\\S])", - "type": "string" - }, - "mcp": { - "format": "uri", - "maxLength": 600, - "minLength": 1, - "pattern": "^https?://[^/?#]+/mcp(?![\\s\\S])", - "type": "string" - }, - "status": { - "format": "uri", - "maxLength": 600, - "minLength": 1, - "pattern": "^https?://[^/?#]+/agent-services/invoice-matching/status(?![\\s\\S])", - "type": "string" - } - }, - "required": [ - "analyze", - "mcp", - "example", - "status" - ], - "type": "object" - }, - "limits": { - "additionalProperties": false, - "properties": { - "max_invoice_line_items": { - "const": 100 - }, - "max_mcp_response_bytes": { - "const": 2097152 - }, - "max_purchase_order_line_items": { - "const": 100 - }, - "max_request_bytes": { - "const": 262144 - }, - "max_response_bytes": { - "const": 1048576 - }, - "supported_currencies": { - "const": [ - "AUD", - "CAD", - "EUR", - "GBP", - "JPY", - "MXN", - "USD" - ] - } - }, - "required": [ - "max_request_bytes", - "max_invoice_line_items", - "max_purchase_order_line_items", - "max_response_bytes", - "max_mcp_response_bytes", - "supported_currencies" - ], - "type": "object" - }, - "policy": { - "additionalProperties": false, - "properties": { - "advisory_only": { - "const": true - }, - "ardaro_saas_tenant_access": { - "const": false - }, - "delivery_verification_supported": { - "const": false - }, - "document_authentication_supported": { - "const": false - }, - "financial_mutation_supported": { - "const": false - }, - "human_review_required": { - "const": true - }, - "ocr_supported": { - "const": false - }, - "prior_invoice_reconciliation_supported": { - "const": false - }, - "tax_validation_supported": { - "const": false - } - }, - "required": [ - "advisory_only", - "human_review_required", - "financial_mutation_supported", - "ardaro_saas_tenant_access", - "ocr_supported", - "delivery_verification_supported", - "prior_invoice_reconciliation_supported", - "tax_validation_supported", - "document_authentication_supported" - ], - "type": "object" - }, - "price": { - "additionalProperties": false, - "properties": { - "amount": { - "const": "0.50" - }, - "amount_atomic": { - "const": "500000" - }, - "currency": { - "const": "USDC" - }, - "display": { - "const": "$0.50" - }, - "failed_input_validation_charged": { - "const": false - }, - "model": { - "const": "fixed_per_accepted_request" - }, - "network": { - "enum": [ - "eip155:8453", - "eip155:84532" - ] - }, - "same_payment_identifier_replay_requires_new_payment": { - "const": false - }, - "successful_response_loss_retry_policy": { - "const": "Retry only the identical signed payment, payment identifier and request. Never create a new signature for an unknown outcome." - } - }, - "required": [ - "model", - "amount", - "amount_atomic", - "currency", - "network", - "display", - "failed_input_validation_charged", - "same_payment_identifier_replay_requires_new_payment", - "successful_response_loss_retry_policy" - ], - "type": "object" - }, - "ready": { - "type": "boolean" - }, - "reason": { - "enum": [ - "ready", - "launch_gated", - "dependency_unavailable" - ] - }, - "retention": { - "additionalProperties": false, - "properties": { - "in_process_result_cache_seconds": { - "maximum": 86400, - "minimum": 1, - "type": "integer" - }, - "payment_metadata_retention_seconds": { - "maximum": 315360000, - "minimum": 86400, - "type": "integer" - }, - "raw_documents_persisted": { - "const": false - }, - "sales_accounting": { - "const": "Content-free pseudonymous invoice sales are accounted for separately from receipt sales." - } - }, - "required": [ - "raw_documents_persisted", - "in_process_result_cache_seconds", - "payment_metadata_retention_seconds", - "sales_accounting" - ], - "type": "object" - }, - "service_id": { - "const": "ardaro.invoice_matching" - }, - "settlement_proven": { - "const": false - }, - "status_version": { - "const": "ardaro.invoice-matching.service-status.v1" - } - }, - "required": [ - "status_version", - "service_id", - "ready", - "reason", - "price", - "limits", - "retention", - "policy", - "settlement_proven", - "endpoints" - ], - "type": "object" - }, - "service": { - "const": "invoice" - } - }, - "required": [ - "service", - "details" - ], - "type": "object" - }, - { - "additionalProperties": false, - "properties": { - "details": { - "additionalProperties": false, - "properties": { - "financial_posting_performed": { - "const": false - }, - "human_review_required": { - "const": true - }, - "input": { - "type": "string" - }, - "price": { - "const": "free" - }, - "ready": { - "const": true - }, - "retention": { - "type": "string" - } - }, - "required": [ - "ready", - "price", - "input", - "retention", - "human_review_required", - "financial_posting_performed" - ], - "type": "object" - }, - "service": { - "const": "reconciliation" - } - }, - "required": [ - "service", - "details" - ], - "type": "object" - } -]New value: +[ + { + "additionalProperties": false, + "properties": { + "details": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "properties": { + "availability": { + "additionalProperties": false, + "description": "Cached runtime readiness, not a fresh external probe or settlement proof.", + "properties": { + "ready": { + "description": "Whether the launch gate and cached dependencies currently allow paid processing.", + "type": "boolean" + }, + "reason": { + "description": "Coarse public readiness reason; contains no internal error details.", + "enum": [ + "ready", + "launch_gate_closed", + "dependency_unavailable", + "not_configured" + ] + }, + "source": { + "const": "cached_runtime_readiness" + } + }, + "required": [ + "ready", + "reason", + "source" + ], + "type": "object" + }, + "limits": { + "additionalProperties": false, + "properties": { + "max_existing_fingerprints": { + "minimum": 1, + "type": "integer" + }, + "max_line_items": { + "minimum": 1, + "type": "integer" + }, + "max_pages": { + "minimum": 1, + "type": "integer" + }, + "max_request_bytes": { + "minimum": 1, + "type": "integer" + }, + "max_text_characters": { + "minimum": 1, + "type": "integer" + }, + "normal_latency_target_ms": { + "minimum": 1, + "type": "integer" + }, + "request_timeout_ms": { + "minimum": 1, + "type": "integer" + } + }, + "required": [ + "max_existing_fingerprints", + "max_line_items", + "max_pages", + "max_request_bytes", + "max_text_characters", + "normal_latency_target_ms", + "request_timeout_ms" + ], + "type": "object" + }, + "paid_processing_performed": { + "const": false + }, + "payment_authorized": { + "const": false + }, + "policy": { + "additionalProperties": false, + "properties": { + "advisory_only": { + "const": true + }, + "ardaro_saas_tenant_access": { + "const": false + }, + "financial_mutation_supported": { + "const": false + }, + "human_review_required": { + "const": true + } + }, + "required": [ + "advisory_only", + "human_review_required", + "financial_mutation_supported", + "ardaro_saas_tenant_access" + ], + "type": "object" + }, + "price": { + "additionalProperties": false, + "properties": { + "amount": { + "pattern": "^[0-9]+\\.[0-9]{2}$", + "type": "string" + }, + "currency": { + "const": "USDC" + }, + "display": { + "pattern": "^\\$[0-9]+\\.[0-9]{2}$", + "type": "string" + }, + "failed_input_validation_charged": { + "const": false + }, + "model": { + "const": "fixed_per_accepted_request" + }, + "network": { + "type": "string" + }, + "same_payment_identifier_replay_requires_new_payment": { + "const": false + }, + "successful_response_loss_retry_policy": { + "type": "string" + } + }, + "required": [ + "model", + "amount", + "currency", + "display", + "network", + "failed_input_validation_charged", + "same_payment_identifier_replay_requires_new_payment", + "successful_response_loss_retry_policy" + ], + "type": "object" + }, + "retention": { + "additionalProperties": false, + "properties": { + "default_retention_seconds": { + "minimum": 1, + "type": "integer" + }, + "deletion_behavior": { + "type": "string" + }, + "durable_recovery_supported": { + "type": "boolean" + }, + "extracted_results_retained": { + "type": "boolean" + }, + "payment_metadata_retention_seconds": { + "minimum": 86400, + "type": "integer" + }, + "raw_documents_retained": { + "const": false + }, + "raw_receipt_images_retained": { + "const": false + }, + "storage_scope": { + "type": "string" + }, + "used_for_model_training": { + "const": false + } + }, + "required": [ + "default_retention_seconds", + "deletion_behavior", + "durable_recovery_supported", + "extracted_results_retained", + "payment_metadata_retention_seconds", + "raw_documents_retained", + "raw_receipt_images_retained", + "storage_scope", + "used_for_model_training" + ], + "type": "object" + }, + "service_id": { + "const": "ardaro.receipt_intelligence" + }, + "status_version": { + "const": "ardaro.receipt-intelligence.service-status.v1" + }, + "supported_input_types": { + "items": { + "additionalProperties": false, + "properties": { + "description": { + "type": "string" + }, + "input_kind": { + "enum": [ + "text", + "structured" + ] + }, + "mime_type": { + "type": "string" + } + }, + "required": [ + "mime_type", + "input_kind", + "description" + ], + "type": "object" + }, + "minItems": 1, + "type": "array" + } + }, + "required": [ + "availability", + "limits", + "paid_processing_performed", + "payment_authorized", + "policy", + "price", + "retention", + "service_id", + "status_version", + "supported_input_types" + ], + "type": "object" + }, + "service": { + "const": "receipt" + } + }, + "required": [ + "service", + "details" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "details": { + "additionalProperties": false, + "allOf": [ + { + "else": { + "properties": { + "reason": { + "enum": [ + "launch_gated", + "dependency_unavailable" + ] + } + } + }, + "if": { + "properties": { + "ready": { + "const": true + } + } + }, + "then": { + "properties": { + "reason": { + "const": "ready" + } + } + } + } + ], + "properties": { + "endpoints": { + "additionalProperties": false, + "properties": { + "analyze": { + "format": "uri", + "maxLength": 600, + "minLength": 1, + "not": { + "pattern": "\\n" + }, + "pattern": "^https?://[^/?#]+/v1/invoice-matching/analyze$", + "type": "string" + }, + "example": { + "format": "uri", + "maxLength": 600, + "minLength": 1, + "not": { + "pattern": "\\n" + }, + "pattern": "^https?://[^/?#]+/agent-services/invoice-matching/example$", + "type": "string" + }, + "mcp": { + "format": "uri", + "maxLength": 600, + "minLength": 1, + "not": { + "pattern": "\\n" + }, + "pattern": "^https?://[^/?#]+/mcp$", + "type": "string" + }, + "status": { + "format": "uri", + "maxLength": 600, + "minLength": 1, + "not": { + "pattern": "\\n" + }, + "pattern": "^https?://[^/?#]+/agent-services/invoice-matching/status$", + "type": "string" + } + }, + "required": [ + "analyze", + "mcp", + "example", + "status" + ], + "type": "object" + }, + "limits": { + "additionalProperties": false, + "properties": { + "max_invoice_line_items": { + "const": 100 + }, + "max_mcp_response_bytes": { + "const": 2097152 + }, + "max_purchase_order_line_items": { + "const": 100 + }, + "max_request_bytes": { + "const": 262144 + }, + "max_response_bytes": { + "const": 1048576 + }, + "supported_currencies": { + "const": [ + "AUD", + "CAD", + "EUR", + "GBP", + "JPY", + "MXN", + "USD" + ] + } + }, + "required": [ + "max_request_bytes", + "max_invoice_line_items", + "max_purchase_order_line_items", + "max_response_bytes", + "max_mcp_response_bytes", + "supported_currencies" + ], + "type": "object" + }, + "policy": { + "additionalProperties": false, + "properties": { + "advisory_only": { + "const": true + }, + "ardaro_saas_tenant_access": { + "const": false + }, + "delivery_verification_supported": { + "const": false + }, + "document_authentication_supported": { + "const": false + }, + "financial_mutation_supported": { + "const": false + }, + "human_review_required": { + "const": true + }, + "ocr_supported": { + "const": false + }, + "prior_invoice_reconciliation_supported": { + "const": false + }, + "tax_validation_supported": { + "const": false + } + }, + "required": [ + "advisory_only", + "human_review_required", + "financial_mutation_supported", + "ardaro_saas_tenant_access", + "ocr_supported", + "delivery_verification_supported", + "prior_invoice_reconciliation_supported", + "tax_validation_supported", + "document_authentication_supported" + ], + "type": "object" + }, + "price": { + "additionalProperties": false, + "properties": { + "amount": { + "const": "0.50" + }, + "amount_atomic": { + "const": "500000" + }, + "currency": { + "const": "USDC" + }, + "display": { + "const": "$0.50" + }, + "failed_input_validation_charged": { + "const": false + }, + "model": { + "const": "fixed_per_accepted_request" + }, + "network": { + "enum": [ + "eip155:8453", + "eip155:84532" + ] + }, + "same_payment_identifier_replay_requires_new_payment": { + "const": false + }, + "successful_response_loss_retry_policy": { + "const": "Retry only the identical signed payment, payment identifier and request. Never create a new signature for an unknown outcome." + } + }, + "required": [ + "model", + "amount", + "amount_atomic", + "currency", + "network", + "display", + "failed_input_validation_charged", + "same_payment_identifier_replay_requires_new_payment", + "successful_response_loss_retry_policy" + ], + "type": "object" + }, + "ready": { + "type": "boolean" + }, + "reason": { + "enum": [ + "ready", + "launch_gated", + "dependency_unavailable" + ] + }, + "retention": { + "additionalProperties": false, + "properties": { + "in_process_result_cache_seconds": { + "maximum": 86400, + "minimum": 1, + "type": "integer" + }, + "payment_metadata_retention_seconds": { + "maximum": 315360000, + "minimum": 86400, + "type": "integer" + }, + "raw_documents_persisted": { + "const": false + }, + "sales_accounting": { + "const": "Content-free pseudonymous invoice sales are accounted for separately from receipt sales." + } + }, + "required": [ + "raw_documents_persisted", + "in_process_result_cache_seconds", + "payment_metadata_retention_seconds", + "sales_accounting" + ], + "type": "object" + }, + "service_id": { + "const": "ardaro.invoice_matching" + }, + "settlement_proven": { + "const": false + }, + "status_version": { + "const": "ardaro.invoice-matching.service-status.v1" + } + }, + "required": [ + "status_version", + "service_id", + "ready", + "reason", + "price", + "limits", + "retention", + "policy", + "settlement_proven", + "endpoints" + ], + "type": "object" + }, + "service": { + "const": "invoice" + } + }, + "required": [ + "service", + "details" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "details": { + "additionalProperties": false, + "properties": { + "financial_posting_performed": { + "const": false + }, + "human_review_required": { + "const": true + }, + "input": { + "type": "string" + }, + "price": { + "const": "free" + }, + "ready": { + "const": true + }, + "retention": { + "type": "string" + } + }, + "required": [ + "ready", + "price", + "input", + "retention", + "human_review_required", + "financial_posting_performed" + ], + "type": "object" + }, + "service": { + "const": "reconciliation" + } + }, + "required": [ + "service", + "details" + ], + "type": "object" + } +]
- Changed
match_invoice3 fields changed- changed
Input schema / properties / invoice / oneOfPrevious value: -[ - { - "additionalProperties": false, - "properties": { - "currency": { - "enum": [ - "JPY" - ], - "type": "string" - }, - "line_items": { - "items": { - "additionalProperties": false, - "properties": { - "amount": { - "maxLength": 26, - "pattern": "^(?:0|[1-9][0-9]{0,25})(?![\\s\\S])", - "type": "string" - }, - "description": { - "maxLength": 240, - "minLength": 1, - "type": "string" - }, - "line_id": { - "maxLength": 80, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])", - "type": "string" - }, - "po_line_id": { - "maxLength": 80, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])", - "type": "string" - }, - "product_code": { - "maxLength": 80, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])", - "type": "string" - }, - "quantity": { - "maxLength": 19, - "not": { - "pattern": "^0(?:\\.0+)?(?![\\s\\S])" - }, - "pattern": "^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?(?![\\s\\S])", - "type": "string" - }, - "unit": { - "maxLength": 32, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])", - "type": "string" - }, - "unit_price": { - "maxLength": 19, - "pattern": "^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?(?![\\s\\S])", - "type": "string" - } - }, - "required": [ - "description", - "line_id", - "quantity", - "unit", - "unit_price" - ], - "type": "object" - }, - "maxItems": 100, - "minItems": 1, - "type": "array" - }, - "purchase_order_reference": { - "maxLength": 80, - "minLength": 1, - "type": "string" - }, - "reference": { - "maxLength": 80, - "minLength": 1, - "type": "string" - }, - "subtotal": { - "maxLength": 26, - "pattern": "^(?:0|[1-9][0-9]{0,25})(?![\\s\\S])", - "type": "string" - }, - "supplier_id": { - "maxLength": 80, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])", - "type": "string" - }, - "tax": { - "maxLength": 26, - "pattern": "^(?:0|[1-9][0-9]{0,25})(?![\\s\\S])", - "type": "string" - }, - "total": { - "maxLength": 26, - "pattern": "^(?:0|[1-9][0-9]{0,25})(?![\\s\\S])", - "type": "string" - } - }, - "required": [ - "currency", - "line_items", - "purchase_order_reference", - "reference", - "supplier_id" - ], - "type": "object" - }, - { - "additionalProperties": false, - "properties": { - "currency": { - "enum": [ - "USD", - "EUR", - "GBP", - "CAD", - "AUD", - "MXN" - ], - "type": "string" - }, - "line_items": { - "items": { - "additionalProperties": false, - "properties": { - "amount": { - "maxLength": 29, - "pattern": "^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,2})?(?![\\s\\S])", - "type": "string" - }, - "description": { - "maxLength": 240, - "minLength": 1, - "type": "string" - }, - "line_id": { - "maxLength": 80, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])", - "type": "string" - }, - "po_line_id": { - "maxLength": 80, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])", - "type": "string" - }, - "product_code": { - "maxLength": 80, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])", - "type": "string" - }, - "quantity": { - "maxLength": 19, - "not": { - "pattern": "^0(?:\\.0+)?(?![\\s\\S])" - }, - "pattern": "^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?(?![\\s\\S])", - "type": "string" - }, - "unit": { - "maxLength": 32, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])", - "type": "string" - }, - "unit_price": { - "maxLength": 19, - "pattern": "^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?(?![\\s\\S])", - "type": "string" - } - }, - "required": [ - "description", - "line_id", - "quantity", - "unit", - "unit_price" - ], - "type": "object" - }, - "maxItems": 100, - "minItems": 1, - "type": "array" - }, - "purchase_order_reference": { - "maxLength": 80, - "minLength": 1, - "type": "string" - }, - "reference": { - "maxLength": 80, - "minLength": 1, - "type": "string" - }, - "subtotal": { - "maxLength": 29, - "pattern": "^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,2})?(?![\\s\\S])", - "type": "string" - }, - "supplier_id": { - "maxLength": 80, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])", - "type": "string" - }, - "tax": { - "maxLength": 29, - "pattern": "^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,2})?(?![\\s\\S])", - "type": "string" - }, - "total": { - "maxLength": 29, - "pattern": "^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,2})?(?![\\s\\S])", - "type": "string" - } - }, - "required": [ - "currency", - "line_items", - "purchase_order_reference", - "reference", - "supplier_id" - ], - "type": "object" - } -]New value: +[ + { + "additionalProperties": false, + "properties": { + "currency": { + "enum": [ + "JPY" + ], + "type": "string" + }, + "line_items": { + "items": { + "additionalProperties": false, + "properties": { + "amount": { + "maxLength": 26, + "pattern": "^(?:0|[1-9][0-9]{0,25})$", + "type": "string" + }, + "description": { + "maxLength": 240, + "minLength": 1, + "type": "string" + }, + "line_id": { + "maxLength": 80, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + }, + "po_line_id": { + "maxLength": 80, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + }, + "product_code": { + "maxLength": 80, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + }, + "quantity": { + "allOf": [ + { + "not": { + "pattern": "^0(?:\\.0+)?$" + } + } + ], + "maxLength": 19, + "not": { + "pattern": "\\n" + }, + "pattern": "^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?$", + "type": "string" + }, + "unit": { + "maxLength": 32, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + }, + "unit_price": { + "maxLength": 19, + "not": { + "pattern": "\\n" + }, + "pattern": "^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?$", + "type": "string" + } + }, + "required": [ + "description", + "line_id", + "quantity", + "unit", + "unit_price" + ], + "type": "object" + }, + "maxItems": 100, + "minItems": 1, + "type": "array" + }, + "purchase_order_reference": { + "maxLength": 80, + "minLength": 1, + "type": "string" + }, + "reference": { + "maxLength": 80, + "minLength": 1, + "type": "string" + }, + "subtotal": { + "maxLength": 26, + "pattern": "^(?:0|[1-9][0-9]{0,25})$", + "type": "string" + }, + "supplier_id": { + "maxLength": 80, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + }, + "tax": { + "maxLength": 26, + "pattern": "^(?:0|[1-9][0-9]{0,25})$", + "type": "string" + }, + "total": { + "maxLength": 26, + "pattern": "^(?:0|[1-9][0-9]{0,25})$", + "type": "string" + } + }, + "required": [ + "currency", + "line_items", + "purchase_order_reference", + "reference", + "supplier_id" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "currency": { + "enum": [ + "USD", + "EUR", + "GBP", + "CAD", + "AUD", + "MXN" + ], + "type": "string" + }, + "line_items": { + "items": { + "additionalProperties": false, + "properties": { + "amount": { + "maxLength": 29, + "pattern": "^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,2})?$", + "type": "string" + }, + "description": { + "maxLength": 240, + "minLength": 1, + "type": "string" + }, + "line_id": { + "maxLength": 80, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + }, + "po_line_id": { + "maxLength": 80, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + }, + "product_code": { + "maxLength": 80, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + }, + "quantity": { + "allOf": [ + { + "not": { + "pattern": "^0(?:\\.0+)?$" + } + } + ], + "maxLength": 19, + "not": { + "pattern": "\\n" + }, + "pattern": "^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?$", + "type": "string" + }, + "unit": { + "maxLength": 32, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + }, + "unit_price": { + "maxLength": 19, + "not": { + "pattern": "\\n" + }, + "pattern": "^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?$", + "type": "string" + } + }, + "required": [ + "description", + "line_id", + "quantity", + "unit", + "unit_price" + ], + "type": "object" + }, + "maxItems": 100, + "minItems": 1, + "type": "array" + }, + "purchase_order_reference": { + "maxLength": 80, + "minLength": 1, + "type": "string" + }, + "reference": { + "maxLength": 80, + "minLength": 1, + "type": "string" + }, + "subtotal": { + "maxLength": 29, + "pattern": "^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,2})?$", + "type": "string" + }, + "supplier_id": { + "maxLength": 80, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + }, + "tax": { + "maxLength": 29, + "pattern": "^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,2})?$", + "type": "string" + }, + "total": { + "maxLength": 29, + "pattern": "^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,2})?$", + "type": "string" + } + }, + "required": [ + "currency", + "line_items", + "purchase_order_reference", + "reference", + "supplier_id" + ], + "type": "object" + } +] - changed
Input schema / properties / purchase_order / oneOfPrevious value: -[ - { - "additionalProperties": false, - "properties": { - "currency": { - "enum": [ - "JPY" - ], - "type": "string" - }, - "line_items": { - "items": { - "additionalProperties": false, - "properties": { - "amount": { - "maxLength": 26, - "pattern": "^(?:0|[1-9][0-9]{0,25})(?![\\s\\S])", - "type": "string" - }, - "description": { - "maxLength": 240, - "minLength": 1, - "type": "string" - }, - "line_id": { - "maxLength": 80, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])", - "type": "string" - }, - "product_code": { - "maxLength": 80, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])", - "type": "string" - }, - "quantity": { - "maxLength": 19, - "not": { - "pattern": "^0(?:\\.0+)?(?![\\s\\S])" - }, - "pattern": "^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?(?![\\s\\S])", - "type": "string" - }, - "unit": { - "maxLength": 32, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])", - "type": "string" - }, - "unit_price": { - "maxLength": 19, - "pattern": "^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?(?![\\s\\S])", - "type": "string" - } - }, - "required": [ - "description", - "line_id", - "quantity", - "unit", - "unit_price" - ], - "type": "object" - }, - "maxItems": 100, - "minItems": 1, - "type": "array" - }, - "reference": { - "maxLength": 80, - "minLength": 1, - "type": "string" - }, - "supplier_id": { - "maxLength": 80, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])", - "type": "string" - } - }, - "required": [ - "currency", - "line_items", - "reference", - "supplier_id" - ], - "type": "object" - }, - { - "additionalProperties": false, - "properties": { - "currency": { - "enum": [ - "USD", - "EUR", - "GBP", - "CAD", - "AUD", - "MXN" - ], - "type": "string" - }, - "line_items": { - "items": { - "additionalProperties": false, - "properties": { - "amount": { - "maxLength": 29, - "pattern": "^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,2})?(?![\\s\\S])", - "type": "string" - }, - "description": { - "maxLength": 240, - "minLength": 1, - "type": "string" - }, - "line_id": { - "maxLength": 80, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])", - "type": "string" - }, - "product_code": { - "maxLength": 80, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])", - "type": "string" - }, - "quantity": { - "maxLength": 19, - "not": { - "pattern": "^0(?:\\.0+)?(?![\\s\\S])" - }, - "pattern": "^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?(?![\\s\\S])", - "type": "string" - }, - "unit": { - "maxLength": 32, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])", - "type": "string" - }, - "unit_price": { - "maxLength": 19, - "pattern": "^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?(?![\\s\\S])", - "type": "string" - } - }, - "required": [ - "description", - "line_id", - "quantity", - "unit", - "unit_price" - ], - "type": "object" - }, - "maxItems": 100, - "minItems": 1, - "type": "array" - }, - "reference": { - "maxLength": 80, - "minLength": 1, - "type": "string" - }, - "supplier_id": { - "maxLength": 80, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])", - "type": "string" - } - }, - "required": [ - "currency", - "line_items", - "reference", - "supplier_id" - ], - "type": "object" - } -]New value: +[ + { + "additionalProperties": false, + "properties": { + "currency": { + "enum": [ + "JPY" + ], + "type": "string" + }, + "line_items": { + "items": { + "additionalProperties": false, + "properties": { + "amount": { + "maxLength": 26, + "pattern": "^(?:0|[1-9][0-9]{0,25})$", + "type": "string" + }, + "description": { + "maxLength": 240, + "minLength": 1, + "type": "string" + }, + "line_id": { + "maxLength": 80, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + }, + "product_code": { + "maxLength": 80, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + }, + "quantity": { + "allOf": [ + { + "not": { + "pattern": "^0(?:\\.0+)?$" + } + } + ], + "maxLength": 19, + "not": { + "pattern": "\\n" + }, + "pattern": "^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?$", + "type": "string" + }, + "unit": { + "maxLength": 32, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + }, + "unit_price": { + "maxLength": 19, + "not": { + "pattern": "\\n" + }, + "pattern": "^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?$", + "type": "string" + } + }, + "required": [ + "description", + "line_id", + "quantity", + "unit", + "unit_price" + ], + "type": "object" + }, + "maxItems": 100, + "minItems": 1, + "type": "array" + }, + "reference": { + "maxLength": 80, + "minLength": 1, + "type": "string" + }, + "supplier_id": { + "maxLength": 80, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + } + }, + "required": [ + "currency", + "line_items", + "reference", + "supplier_id" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "currency": { + "enum": [ + "USD", + "EUR", + "GBP", + "CAD", + "AUD", + "MXN" + ], + "type": "string" + }, + "line_items": { + "items": { + "additionalProperties": false, + "properties": { + "amount": { + "maxLength": 29, + "pattern": "^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,2})?$", + "type": "string" + }, + "description": { + "maxLength": 240, + "minLength": 1, + "type": "string" + }, + "line_id": { + "maxLength": 80, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + }, + "product_code": { + "maxLength": 80, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + }, + "quantity": { + "allOf": [ + { + "not": { + "pattern": "^0(?:\\.0+)?$" + } + } + ], + "maxLength": 19, + "not": { + "pattern": "\\n" + }, + "pattern": "^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?$", + "type": "string" + }, + "unit": { + "maxLength": 32, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + }, + "unit_price": { + "maxLength": 19, + "not": { + "pattern": "\\n" + }, + "pattern": "^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?$", + "type": "string" + } + }, + "required": [ + "description", + "line_id", + "quantity", + "unit", + "unit_price" + ], + "type": "object" + }, + "maxItems": 100, + "minItems": 1, + "type": "array" + }, + "reference": { + "maxLength": 80, + "minLength": 1, + "type": "string" + }, + "supplier_id": { + "maxLength": 80, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + } + }, + "required": [ + "currency", + "line_items", + "reference", + "supplier_id" + ], + "type": "object" + } +] - changed
Output schema / anyOfPrevious value: -[ - { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "additionalProperties": false, - "properties": { - "contract_version": { - "const": "ardaro.agent-invoice-matching.response.v1" - }, - "identities": { - "additionalProperties": false, - "properties": { - "analysis_result_identity": { - "pattern": "^res_[0-9a-f]{64}(?![\\s\\S])", - "type": "string" - }, - "payment_identity": { - "additionalProperties": false, - "properties": { - "protocol": { - "const": "x402-v2" - }, - "reference": { - "pattern": "^pay_[0-9a-f]{64}(?![\\s\\S])", - "type": "string" - }, - "replayed": { - "type": "boolean" - } - }, - "required": [ - "protocol", - "reference", - "replayed" - ], - "type": "object" - } - }, - "required": [ - "analysis_result_identity" - ], - "type": "object" - }, - "result": { - "additionalProperties": false, - "properties": { - "arithmetic": { - "additionalProperties": false, - "properties": { - "computed_invoice_total": { - "anyOf": [ - { - "maxLength": 42, - "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?(?![\\s\\S])", - "type": "string" - }, - { - "type": "null" - } - ] - }, - "invoice_currency_scale": { - "enum": [ - 0, - 2 - ] - }, - "invoice_line_amount_sum": { - "maxLength": 42, - "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?(?![\\s\\S])", - "type": "string" - }, - "invoice_subtotal": { - "anyOf": [ - { - "maxLength": 42, - "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?(?![\\s\\S])", - "type": "string" - }, - { - "type": "null" - } - ] - }, - "invoice_subtotal_status": { - "enum": [ - "consistent", - "mismatch", - "unavailable" - ] - }, - "invoice_supplied_line_amount_sum": { - "anyOf": [ - { - "maxLength": 42, - "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?(?![\\s\\S])", - "type": "string" - }, - { - "type": "null" - } - ] - }, - "invoice_tax": { - "anyOf": [ - { - "maxLength": 42, - "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?(?![\\s\\S])", - "type": "string" - }, - { - "type": "null" - } - ] - }, - "invoice_total": { - "anyOf": [ - { - "maxLength": 42, - "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?(?![\\s\\S])", - "type": "string" - }, - { - "type": "null" - } - ] - }, - "invoice_total_status": { - "enum": [ - "consistent", - "mismatch", - "unavailable" - ] - }, - "purchase_order_currency_scale": { - "enum": [ - 0, - 2 - ] - }, - "rounding_mode": { - "const": "ROUND_HALF_UP" - }, - "rounding_scope": { - "const": "each_line_then_sum" - } - }, - "required": [ - "rounding_mode", - "rounding_scope", - "invoice_currency_scale", - "purchase_order_currency_scale", - "invoice_line_amount_sum", - "invoice_supplied_line_amount_sum", - "invoice_subtotal", - "invoice_tax", - "invoice_total", - "computed_invoice_total", - "invoice_subtotal_status", - "invoice_total_status" - ], - "type": "object" - }, - "comparison_rows": { - "items": { - "additionalProperties": false, - "properties": { - "allocation_status": { - "enum": [ - "allocated", - "not_comparable", - "unmatched" - ] - }, - "computed_invoice_amount": { - "maxLength": 42, - "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?(?![\\s\\S])", - "type": "string" - }, - "discrepancy_codes": { - "items": { - "enum": [ - "currency_mismatch", - "supplier_mismatch", - "purchase_order_reference_mismatch", - "invoice_line_amount_unavailable", - "purchase_order_line_amount_unavailable", - "invoice_line_arithmetic_mismatch", - "purchase_order_line_arithmetic_mismatch", - "referenced_purchase_order_line_missing", - "ambiguous_product_code", - "unmatchable_invoice_line", - "unit_mismatch", - "product_code_mismatch", - "unit_price_mismatch", - "quantity_exceeds_purchase_order", - "invoice_subtotal_unavailable", - "invoice_tax_unavailable", - "invoice_total_unavailable", - "invoice_subtotal_mismatch", - "invoice_supplied_line_sum_mismatch", - "invoice_total_mismatch" - ], - "type": "string" - }, - "maxItems": 20, - "minItems": 0, - "type": "array", - "uniqueItems": true - }, - "invoice_amount": { - "anyOf": [ - { - "maxLength": 42, - "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?(?![\\s\\S])", - "type": "string" - }, - { - "type": "null" - } - ] - }, - "invoice_currency": { - "enum": [ - "USD", - "EUR", - "GBP", - "CAD", - "AUD", - "MXN", - "JPY" - ] - }, - "invoice_line_id": { - "maxLength": 80, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])", - "type": "string" - }, - "invoice_quantity": { - "maxLength": 42, - "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?(?![\\s\\S])", - "type": "string" - }, - "invoice_source": { - "maxLength": 100, - "minLength": 1, - "pattern": "^/(?:invoice|purchase_order)(?:/[A-Za-z0-9_]+)*(?![\\s\\S])", - "type": "string" - }, - "invoice_unit": { - "maxLength": 32, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])", - "type": "string" - }, - "invoice_unit_price": { - "maxLength": 42, - "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?(?![\\s\\S])", - "type": "string" - }, - "line_arithmetic_status": { - "enum": [ - "consistent", - "mismatch", - "unavailable" - ] - }, - "match_method": { - "enum": [ - "unmatched", - "explicit_po_line_id", - "exact_product_code" - ] - }, - "outcome": { - "enum": [ - "no_discrepancies", - "review_required" - ] - }, - "purchase_order_currency": { - "enum": [ - "USD", - "EUR", - "GBP", - "CAD", - "AUD", - "MXN", - "JPY" - ] - }, - "purchase_order_line_id": { - "anyOf": [ - { - "maxLength": 80, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])", - "type": "string" - }, - { - "type": "null" - } - ] - }, - "purchase_order_quantity": { - "anyOf": [ - { - "maxLength": 42, - "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?(?![\\s\\S])", - "type": "string" - }, - { - "type": "null" - } - ] - }, - "purchase_order_source": { - "anyOf": [ - { - "maxLength": 100, - "minLength": 1, - "pattern": "^/(?:invoice|purchase_order)(?:/[A-Za-z0-9_]+)*(?![\\s\\S])", - "type": "string" - }, - { - "type": "null" - } - ] - }, - "purchase_order_unit": { - "anyOf": [ - { - "maxLength": 32, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])", - "type": "string" - }, - { - "type": "null" - } - ] - }, - "purchase_order_unit_price": { - "anyOf": [ - { - "maxLength": 42, - "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?(?![\\s\\S])", - "type": "string" - }, - { - "type": "null" - } - ] - }, - "unit_price_difference": { - "anyOf": [ - { - "maxLength": 42, - "pattern": "^-?(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?(?![\\s\\S])", - "type": "string" - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "invoice_line_id", - "invoice_source", - "purchase_order_line_id", - "purchase_order_source", - "match_method", - "allocation_status", - "invoice_quantity", - "purchase_order_quantity", - "invoice_unit", - "purchase_order_unit", - "invoice_unit_price", - "purchase_order_unit_price", - "invoice_currency", - "purchase_order_currency", - "unit_price_difference", - "invoice_amount", - "computed_invoice_amount", - "line_arithmetic_status", - "discrepancy_codes", - "outcome" - ], - "type": "object" - }, - "maxItems": 100, - "minItems": 1, - "type": "array" - }, - "discrepancies": { - "items": { - "additionalProperties": false, - "properties": { - "code": { - "enum": [ - "currency_mismatch", - "supplier_mismatch", - "purchase_order_reference_mismatch", - "invoice_line_amount_unavailable", - "purchase_order_line_amount_unavailable", - "invoice_line_arithmetic_mismatch", - "purchase_order_line_arithmetic_mismatch", - "referenced_purchase_order_line_missing", - "ambiguous_product_code", - "unmatchable_invoice_line", - "unit_mismatch", - "product_code_mismatch", - "unit_price_mismatch", - "quantity_exceeds_purchase_order", - "invoice_subtotal_unavailable", - "invoice_tax_unavailable", - "invoice_total_unavailable", - "invoice_subtotal_mismatch", - "invoice_supplied_line_sum_mismatch", - "invoice_total_mismatch" - ], - "type": "string" - }, - "message": { - "maxLength": 240, - "minLength": 1, - "type": "string" - }, - "severity": { - "enum": [ - "error", - "warning" - ] - }, - "sources": { - "items": { - "maxLength": 100, - "minLength": 1, - "pattern": "^/(?:invoice|purchase_order)(?:/[A-Za-z0-9_]+)*(?![\\s\\S])", - "type": "string" - }, - "maxItems": 101, - "minItems": 1, - "type": "array" - } - }, - "required": [ - "code", - "severity", - "message", - "sources" - ], - "type": "object" - }, - "maxItems": 1000, - "minItems": 0, - "type": "array" - }, - "document_checks": { - "additionalProperties": false, - "properties": { - "currency_matches": { - "type": "boolean" - }, - "purchase_order_reference_matches": { - "type": "boolean" - }, - "supplier_matches": { - "type": "boolean" - } - }, - "required": [ - "currency_matches", - "supplier_matches", - "purchase_order_reference_matches" - ], - "type": "object" - }, - "policy": { - "additionalProperties": false, - "properties": { - "arithmetic_scope": { - "maxLength": 300, - "minLength": 1, - "type": "string" - }, - "decision_scope": { - "maxLength": 300, - "minLength": 1, - "type": "string" - }, - "delivery_verification_supported": { - "const": false - }, - "financial_posting_performed": { - "const": false - }, - "financial_posting_supported": { - "const": false - }, - "human_review_required": { - "const": true - }, - "identity_purpose": { - "const": "deterministic_result_comparison_only" - }, - "matching_rule": { - "const": "explicit_po_line_id_else_unique_case_sensitive_product_code" - }, - "model_calls": { - "const": 0 - }, - "payment_approval_supported": { - "const": false - }, - "quantity_scope": { - "maxLength": 300, - "minLength": 1, - "type": "string" - }, - "raw_documents_retained": { - "const": false - }, - "stateless": { - "const": true - }, - "supplier_scope": { - "maxLength": 300, - "minLength": 1, - "type": "string" - } - }, - "required": [ - "human_review_required", - "stateless", - "raw_documents_retained", - "financial_posting_supported", - "financial_posting_performed", - "payment_approval_supported", - "delivery_verification_supported", - "model_calls", - "identity_purpose", - "matching_rule", - "quantity_scope", - "arithmetic_scope", - "supplier_scope", - "decision_scope" - ], - "type": "object" - }, - "purchase_order_line_summary": { - "items": { - "additionalProperties": false, - "properties": { - "allocated_invoice_sources": { - "items": { - "maxLength": 100, - "minLength": 1, - "pattern": "^/(?:invoice|purchase_order)(?:/[A-Za-z0-9_]+)*(?![\\s\\S])", - "type": "string" - }, - "maxItems": 100, - "minItems": 0, - "type": "array" - }, - "allocated_quantity": { - "anyOf": [ - { - "maxLength": 42, - "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?(?![\\s\\S])", - "type": "string" - }, - { - "type": "null" - } - ] - }, - "computed_amount": { - "maxLength": 42, - "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?(?![\\s\\S])", - "type": "string" - }, - "line_arithmetic_status": { - "enum": [ - "consistent", - "mismatch", - "unavailable" - ] - }, - "ordered_quantity": { - "maxLength": 42, - "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?(?![\\s\\S])", - "type": "string" - }, - "overbilled_quantity": { - "anyOf": [ - { - "maxLength": 42, - "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?(?![\\s\\S])", - "type": "string" - }, - { - "type": "null" - } - ] - }, - "purchase_order_line_id": { - "maxLength": 80, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])", - "type": "string" - }, - "purchase_order_source": { - "maxLength": 100, - "minLength": 1, - "pattern": "^/(?:invoice|purchase_order)(?:/[A-Za-z0-9_]+)*(?![\\s\\S])", - "type": "string" - }, - "status": { - "enum": [ - "not_comparable", - "not_invoiced", - "overbilled", - "fully_invoiced", - "partially_invoiced" - ] - }, - "supplied_amount": { - "anyOf": [ - { - "maxLength": 42, - "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?(?![\\s\\S])", - "type": "string" - }, - { - "type": "null" - } - ] - }, - "uninvoiced_quantity": { - "anyOf": [ - { - "maxLength": 42, - "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?(?![\\s\\S])", - "type": "string" - }, - { - "type": "null" - } - ] - }, - "unit": { - "maxLength": 32, - "minLength": 1, - "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])", - "type": "string" - } - }, - "required": [ - "purchase_order_line_id", - "purchase_order_source", - "allocated_invoice_sources", - "ordered_quantity", - "allocated_quantity", - "uninvoiced_quantity", - "overbilled_quantity", - "unit", - "status", - "supplied_amount", - "computed_amount", - "line_arithmetic_status" - ], - "type": "object" - }, - "maxItems": 100, - "minItems": 1, - "type": "array" - }, - "summary": { - "additionalProperties": false, - "properties": { - "delivery_verified": { - "const": false - }, - "discrepancy_count": { - "maximum": 1000, - "minimum": 0, - "type": "integer" - }, - "human_review_required": { - "const": true - }, - "invoice_line_count": { - "maximum": 100, - "minimum": 0, - "type": "integer" - }, - "matched_invoice_line_count": { - "maximum": 100, - "minimum": 0, - "type": "integer" - }, - "outcome": { - "enum": [ - "no_discrepancies", - "review_required" - ] - }, - "payment_approved": { - "const": false - }, - "purchase_order_line_count": { - "maximum": 100, - "minimum": 0, - "type": "integer" - }, - "unknown_check_count": { - "maximum": 1000, - "minimum": 0, - "type": "integer" - }, - "unmatched_invoice_line_count": { - "maximum": 100, - "minimum": 0, - "type": "integer" - } - }, - "required": [ - "outcome", - "invoice_line_count", - "purchase_order_line_count", - "matched_invoice_line_count", - "unmatched_invoice_line_count", - "discrepancy_count", - "unknown_check_count", - "human_review_required", - "delivery_verified", - "payment_approved" - ], - "type": "object" - } - }, - "required": [ - "summary", - "document_checks", - "comparison_rows", - "purchase_order_line_summary", - "discrepancies", - "arithmetic", - "policy" - ], - "type": "object" - }, - "status": { - "const": "review_required" - } - }, - "required": [ - "contract_version", - "status", - "result", - "identities" - ], - "type": "object" - }, - { - "additionalProperties": false, - "properties": { - "contract_version": { - "const": "ardaro.agent-invoice-matching.response.v1" - }, - "error": { - "additionalProperties": false, - "properties": { - "code": { - "maxLength": 100, - "type": "string" - }, - "message": { - "maxLength": 300, - "type": "string" - } - }, - "required": [ - "code", - "message" - ], - "type": "object" - }, - "status": { - "const": "error" - } - }, - "required": [ - "contract_version", - "status", - "error" - ], - "type": "object" - }, - { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "additionalProperties": false, - "properties": { - "contract_version": { - "const": "ardaro.agent-receipt-intelligence.response.v1" - }, - "error": { - "additionalProperties": false, - "properties": { - "code": { - "maxLength": 80, - "type": "string" - }, - "message": { - "maxLength": 280, - "type": "string" - }, - "remediation": { - "maxLength": 280, - "type": "string" - }, - "retryable": { - "type": "boolean" - }, - "service_code": { - "enum": [ - "ARDARO_ARITHMETIC_MISMATCH", - "ARDARO_DOCUMENT_TOO_LARGE", - "ARDARO_DUPLICATE_SUSPECTED", - "ARDARO_EXTRACTION_LOW_CONFIDENCE", - "ARDARO_IDEMPOTENCY_CONFLICT", - "ARDARO_INPUT_UNSUPPORTED", - "ARDARO_PAYMENT_INVALID", - "ARDARO_PAYMENT_RECONCILIATION_REQUIRED", - "ARDARO_PAYMENT_REQUIRED", - "ARDARO_RATE_LIMITED", - "ARDARO_SERVICE_UNAVAILABLE" - ] - } - }, - "required": [ - "code", - "service_code", - "message", - "retryable", - "remediation" - ], - "type": "object" - }, - "status": { - "const": "error" - } - }, - "required": [ - "contract_version", - "status", - "error" - ], - "type": "object" - }, - { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "additionalProperties": false, - "properties": { - "contract_version": { - "const": "ardaro.agent-receipt-intelligence.response.v1" - }, - "error": { - "additionalProperties": false, - "properties": { - "code": { - "maxLength": 80, - "minLength": 1, - "type": "string" - }, - "message": { - "const": "Service is not ready." - } - }, - "required": [ - "code", - "message" - ], - "type": "object" - }, - "service": { - "const": "ardaro-receipt-intelligence" - }, - "status": { - "const": "not_ready" - } - }, - "required": [ - "contract_version", - "status", - "service", - "error" - ], - "type": "object" - }, - { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "properties": { - "accepts": { - "items": { - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "type": "string" - }, - "extra": { - "additionalProperties": true, - "type": "object" - }, - "maxTimeoutSeconds": { - "type": "integer" - }, - "network": { - "type": "string" - }, - "payTo": { - "type": "string" - }, - "scheme": { - "type": "string" - } - }, - "required": [ - "scheme", - "network", - "asset", - "amount", - "payTo", - "maxTimeoutSeconds" - ], - "type": "object" - }, - "type": "array" - }, - "error": { - "type": [ - "string", - "null" - ] - }, - "extensions": { - "oneOf": [ - { - "additionalProperties": true, - "type": "object" - }, - { - "type": "null" - } - ] - }, - "resource": { - "oneOf": [ - { - "properties": { - "description": { - "type": [ - "string", - "null" - ] - }, - "iconUrl": { - "type": [ - "string", - "null" - ] - }, - "mimeType": { - "type": [ - "string", - "null" - ] - }, - "serviceName": { - "type": [ - "string", - "null" - ] - }, - "tags": { - "oneOf": [ - { - "items": { - "type": "string" - }, - "type": "array" - }, - { - "type": "null" - } - ] - }, - "url": { - "type": "string" - } - }, - "required": [ - "url" - ], - "type": "object" - }, - { - "type": "null" - } - ] - }, - "x402Version": { - "const": 2, - "default": 2, - "type": "integer" - } - }, - "required": [ - "accepts" - ], - "type": "object" - }, - { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "additionalProperties": false, - "properties": { - "error": { - "type": "string" - } - }, - "required": [ - "error" - ], - "type": "object" - }, - { - "additionalProperties": false, - "properties": { - "message": { - "type": "string" - }, - "status": { - "const": "error" - } - }, - "required": [ - "status", - "message" - ], - "type": "object" - } -]New value: +[ + { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "properties": { + "contract_version": { + "const": "ardaro.agent-invoice-matching.response.v1" + }, + "identities": { + "additionalProperties": false, + "properties": { + "analysis_result_identity": { + "pattern": "^res_[0-9a-f]{64}$", + "type": "string" + }, + "payment_identity": { + "additionalProperties": false, + "properties": { + "protocol": { + "const": "x402-v2" + }, + "reference": { + "pattern": "^pay_[0-9a-f]{64}$", + "type": "string" + }, + "replayed": { + "type": "boolean" + } + }, + "required": [ + "protocol", + "reference", + "replayed" + ], + "type": "object" + } + }, + "required": [ + "analysis_result_identity" + ], + "type": "object" + }, + "result": { + "additionalProperties": false, + "properties": { + "arithmetic": { + "additionalProperties": false, + "properties": { + "computed_invoice_total": { + "anyOf": [ + { + "maxLength": 42, + "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$", + "type": "string" + }, + { + "type": "null" + } + ] + }, + "invoice_currency_scale": { + "enum": [ + 0, + 2 + ] + }, + "invoice_line_amount_sum": { + "maxLength": 42, + "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$", + "type": "string" + }, + "invoice_subtotal": { + "anyOf": [ + { + "maxLength": 42, + "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$", + "type": "string" + }, + { + "type": "null" + } + ] + }, + "invoice_subtotal_status": { + "enum": [ + "consistent", + "mismatch", + "unavailable" + ] + }, + "invoice_supplied_line_amount_sum": { + "anyOf": [ + { + "maxLength": 42, + "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$", + "type": "string" + }, + { + "type": "null" + } + ] + }, + "invoice_tax": { + "anyOf": [ + { + "maxLength": 42, + "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$", + "type": "string" + }, + { + "type": "null" + } + ] + }, + "invoice_total": { + "anyOf": [ + { + "maxLength": 42, + "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$", + "type": "string" + }, + { + "type": "null" + } + ] + }, + "invoice_total_status": { + "enum": [ + "consistent", + "mismatch", + "unavailable" + ] + }, + "purchase_order_currency_scale": { + "enum": [ + 0, + 2 + ] + }, + "rounding_mode": { + "const": "ROUND_HALF_UP" + }, + "rounding_scope": { + "const": "each_line_then_sum" + } + }, + "required": [ + "rounding_mode", + "rounding_scope", + "invoice_currency_scale", + "purchase_order_currency_scale", + "invoice_line_amount_sum", + "invoice_supplied_line_amount_sum", + "invoice_subtotal", + "invoice_tax", + "invoice_total", + "computed_invoice_total", + "invoice_subtotal_status", + "invoice_total_status" + ], + "type": "object" + }, + "comparison_rows": { + "items": { + "additionalProperties": false, + "properties": { + "allocation_status": { + "enum": [ + "allocated", + "not_comparable", + "unmatched" + ] + }, + "computed_invoice_amount": { + "maxLength": 42, + "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$", + "type": "string" + }, + "discrepancy_codes": { + "items": { + "enum": [ + "currency_mismatch", + "supplier_mismatch", + "purchase_order_reference_mismatch", + "invoice_line_amount_unavailable", + "purchase_order_line_amount_unavailable", + "invoice_line_arithmetic_mismatch", + "purchase_order_line_arithmetic_mismatch", + "referenced_purchase_order_line_missing", + "ambiguous_product_code", + "unmatchable_invoice_line", + "unit_mismatch", + "product_code_mismatch", + "unit_price_mismatch", + "quantity_exceeds_purchase_order", + "invoice_subtotal_unavailable", + "invoice_tax_unavailable", + "invoice_total_unavailable", + "invoice_subtotal_mismatch", + "invoice_supplied_line_sum_mismatch", + "invoice_total_mismatch" + ], + "type": "string" + }, + "maxItems": 20, + "minItems": 0, + "type": "array", + "uniqueItems": true + }, + "invoice_amount": { + "anyOf": [ + { + "maxLength": 42, + "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$", + "type": "string" + }, + { + "type": "null" + } + ] + }, + "invoice_currency": { + "enum": [ + "USD", + "EUR", + "GBP", + "CAD", + "AUD", + "MXN", + "JPY" + ] + }, + "invoice_line_id": { + "maxLength": 80, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + }, + "invoice_quantity": { + "maxLength": 42, + "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$", + "type": "string" + }, + "invoice_source": { + "maxLength": 100, + "minLength": 1, + "pattern": "^/(?:invoice|purchase_order)(?:/[A-Za-z0-9_]+)*$", + "type": "string" + }, + "invoice_unit": { + "maxLength": 32, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + }, + "invoice_unit_price": { + "maxLength": 42, + "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$", + "type": "string" + }, + "line_arithmetic_status": { + "enum": [ + "consistent", + "mismatch", + "unavailable" + ] + }, + "match_method": { + "enum": [ + "unmatched", + "explicit_po_line_id", + "exact_product_code" + ] + }, + "outcome": { + "enum": [ + "no_discrepancies", + "review_required" + ] + }, + "purchase_order_currency": { + "enum": [ + "USD", + "EUR", + "GBP", + "CAD", + "AUD", + "MXN", + "JPY" + ] + }, + "purchase_order_line_id": { + "anyOf": [ + { + "maxLength": 80, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + }, + { + "type": "null" + } + ] + }, + "purchase_order_quantity": { + "anyOf": [ + { + "maxLength": 42, + "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$", + "type": "string" + }, + { + "type": "null" + } + ] + }, + "purchase_order_source": { + "anyOf": [ + { + "maxLength": 100, + "minLength": 1, + "pattern": "^/(?:invoice|purchase_order)(?:/[A-Za-z0-9_]+)*$", + "type": "string" + }, + { + "type": "null" + } + ] + }, + "purchase_order_unit": { + "anyOf": [ + { + "maxLength": 32, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + }, + { + "type": "null" + } + ] + }, + "purchase_order_unit_price": { + "anyOf": [ + { + "maxLength": 42, + "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$", + "type": "string" + }, + { + "type": "null" + } + ] + }, + "unit_price_difference": { + "anyOf": [ + { + "maxLength": 42, + "pattern": "^-?(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?$", + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "invoice_line_id", + "invoice_source", + "purchase_order_line_id", + "purchase_order_source", + "match_method", + "allocation_status", + "invoice_quantity", + "purchase_order_quantity", + "invoice_unit", + "purchase_order_unit", + "invoice_unit_price", + "purchase_order_unit_price", + "invoice_currency", + "purchase_order_currency", + "unit_price_difference", + "invoice_amount", + "computed_invoice_amount", + "line_arithmetic_status", + "discrepancy_codes", + "outcome" + ], + "type": "object" + }, + "maxItems": 100, + "minItems": 1, + "type": "array" + }, + "discrepancies": { + "items": { + "additionalProperties": false, + "properties": { + "code": { + "enum": [ + "currency_mismatch", + "supplier_mismatch", + "purchase_order_reference_mismatch", + "invoice_line_amount_unavailable", + "purchase_order_line_amount_unavailable", + "invoice_line_arithmetic_mismatch", + "purchase_order_line_arithmetic_mismatch", + "referenced_purchase_order_line_missing", + "ambiguous_product_code", + "unmatchable_invoice_line", + "unit_mismatch", + "product_code_mismatch", + "unit_price_mismatch", + "quantity_exceeds_purchase_order", + "invoice_subtotal_unavailable", + "invoice_tax_unavailable", + "invoice_total_unavailable", + "invoice_subtotal_mismatch", + "invoice_supplied_line_sum_mismatch", + "invoice_total_mismatch" + ], + "type": "string" + }, + "message": { + "maxLength": 240, + "minLength": 1, + "type": "string" + }, + "severity": { + "enum": [ + "error", + "warning" + ] + }, + "sources": { + "items": { + "maxLength": 100, + "minLength": 1, + "pattern": "^/(?:invoice|purchase_order)(?:/[A-Za-z0-9_]+)*$", + "type": "string" + }, + "maxItems": 101, + "minItems": 1, + "type": "array" + } + }, + "required": [ + "code", + "severity", + "message", + "sources" + ], + "type": "object" + }, + "maxItems": 1000, + "minItems": 0, + "type": "array" + }, + "document_checks": { + "additionalProperties": false, + "properties": { + "currency_matches": { + "type": "boolean" + }, + "purchase_order_reference_matches": { + "type": "boolean" + }, + "supplier_matches": { + "type": "boolean" + } + }, + "required": [ + "currency_matches", + "supplier_matches", + "purchase_order_reference_matches" + ], + "type": "object" + }, + "policy": { + "additionalProperties": false, + "properties": { + "arithmetic_scope": { + "maxLength": 300, + "minLength": 1, + "type": "string" + }, + "decision_scope": { + "maxLength": 300, + "minLength": 1, + "type": "string" + }, + "delivery_verification_supported": { + "const": false + }, + "financial_posting_performed": { + "const": false + }, + "financial_posting_supported": { + "const": false + }, + "human_review_required": { + "const": true + }, + "identity_purpose": { + "const": "deterministic_result_comparison_only" + }, + "matching_rule": { + "const": "explicit_po_line_id_else_unique_case_sensitive_product_code" + }, + "model_calls": { + "const": 0 + }, + "payment_approval_supported": { + "const": false + }, + "quantity_scope": { + "maxLength": 300, + "minLength": 1, + "type": "string" + }, + "raw_documents_retained": { + "const": false + }, + "stateless": { + "const": true + }, + "supplier_scope": { + "maxLength": 300, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "human_review_required", + "stateless", + "raw_documents_retained", + "financial_posting_supported", + "financial_posting_performed", + "payment_approval_supported", + "delivery_verification_supported", + "model_calls", + "identity_purpose", + "matching_rule", + "quantity_scope", + "arithmetic_scope", + "supplier_scope", + "decision_scope" + ], + "type": "object" + }, + "purchase_order_line_summary": { + "items": { + "additionalProperties": false, + "properties": { + "allocated_invoice_sources": { + "items": { + "maxLength": 100, + "minLength": 1, + "pattern": "^/(?:invoice|purchase_order)(?:/[A-Za-z0-9_]+)*$", + "type": "string" + }, + "maxItems": 100, + "minItems": 0, + "type": "array" + }, + "allocated_quantity": { + "anyOf": [ + { + "maxLength": 42, + "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$", + "type": "string" + }, + { + "type": "null" + } + ] + }, + "computed_amount": { + "maxLength": 42, + "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$", + "type": "string" + }, + "line_arithmetic_status": { + "enum": [ + "consistent", + "mismatch", + "unavailable" + ] + }, + "ordered_quantity": { + "maxLength": 42, + "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$", + "type": "string" + }, + "overbilled_quantity": { + "anyOf": [ + { + "maxLength": 42, + "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$", + "type": "string" + }, + { + "type": "null" + } + ] + }, + "purchase_order_line_id": { + "maxLength": 80, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + }, + "purchase_order_source": { + "maxLength": 100, + "minLength": 1, + "pattern": "^/(?:invoice|purchase_order)(?:/[A-Za-z0-9_]+)*$", + "type": "string" + }, + "status": { + "enum": [ + "not_comparable", + "not_invoiced", + "overbilled", + "fully_invoiced", + "partially_invoiced" + ] + }, + "supplied_amount": { + "anyOf": [ + { + "maxLength": 42, + "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$", + "type": "string" + }, + { + "type": "null" + } + ] + }, + "uninvoiced_quantity": { + "anyOf": [ + { + "maxLength": 42, + "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$", + "type": "string" + }, + { + "type": "null" + } + ] + }, + "unit": { + "maxLength": 32, + "minLength": 1, + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$", + "type": "string" + } + }, + "required": [ + "purchase_order_line_id", + "purchase_order_source", + "allocated_invoice_sources", + "ordered_quantity", + "allocated_quantity", + "uninvoiced_quantity", + "overbilled_quantity", + "unit", + "status", + "supplied_amount", + "computed_amount", + "line_arithmetic_status" + ], + "type": "object" + }, + "maxItems": 100, + "minItems": 1, + "type": "array" + }, + "summary": { + "additionalProperties": false, + "properties": { + "delivery_verified": { + "const": false + }, + "discrepancy_count": { + "maximum": 1000, + "minimum": 0, + "type": "integer" + }, + "human_review_required": { + "const": true + }, + "invoice_line_count": { + "maximum": 100, + "minimum": 0, + "type": "integer" + }, + "matched_invoice_line_count": { + "maximum": 100, + "minimum": 0, + "type": "integer" + }, + "outcome": { + "enum": [ + "no_discrepancies", + "review_required" + ] + }, + "payment_approved": { + "const": false + }, + "purchase_order_line_count": { + "maximum": 100, + "minimum": 0, + "type": "integer" + }, + "unknown_check_count": { + "maximum": 1000, + "minimum": 0, + "type": "integer" + }, + "unmatched_invoice_line_count": { + "maximum": 100, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "outcome", + "invoice_line_count", + "purchase_order_line_count", + "matched_invoice_line_count", + "unmatched_invoice_line_count", + "discrepancy_count", + "unknown_check_count", + "human_review_required", + "delivery_verified", + "payment_approved" + ], + "type": "object" + } + }, + "required": [ + "summary", + "document_checks", + "comparison_rows", + "purchase_order_line_summary", + "discrepancies", + "arithmetic", + "policy" + ], + "type": "object" + }, + "status": { + "const": "review_required" + } + }, + "required": [ + "contract_version", + "status", + "result", + "identities" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "contract_version": { + "const": "ardaro.agent-invoice-matching.response.v1" + }, + "error": { + "additionalProperties": false, + "properties": { + "code": { + "maxLength": 100, + "type": "string" + }, + "message": { + "maxLength": 300, + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + }, + "status": { + "const": "error" + } + }, + "required": [ + "contract_version", + "status", + "error" + ], + "type": "object" + }, + { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "properties": { + "contract_version": { + "const": "ardaro.agent-receipt-intelligence.response.v1" + }, + "error": { + "additionalProperties": false, + "properties": { + "code": { + "maxLength": 80, + "type": "string" + }, + "message": { + "maxLength": 280, + "type": "string" + }, + "remediation": { + "maxLength": 280, + "type": "string" + }, + "retryable": { + "type": "boolean" + }, + "service_code": { + "enum": [ + "ARDARO_ARITHMETIC_MISMATCH", + "ARDARO_DOCUMENT_TOO_LARGE", + "ARDARO_DUPLICATE_SUSPECTED", + "ARDARO_EXTRACTION_LOW_CONFIDENCE", + "ARDARO_IDEMPOTENCY_CONFLICT", + "ARDARO_INPUT_UNSUPPORTED", + "ARDARO_PAYMENT_INVALID", + "ARDARO_PAYMENT_RECONCILIATION_REQUIRED", + "ARDARO_PAYMENT_REQUIRED", + "ARDARO_RATE_LIMITED", + "ARDARO_SERVICE_UNAVAILABLE" + ] + } + }, + "required": [ + "code", + "service_code", + "message", + "retryable", + "remediation" + ], + "type": "object" + }, + "status": { + "const": "error" + } + }, + "required": [ + "contract_version", + "status", + "error" + ], + "type": "object" + }, + { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "properties": { + "contract_version": { + "const": "ardaro.agent-receipt-intelligence.response.v1" + }, + "error": { + "additionalProperties": false, + "properties": { + "code": { + "maxLength": 80, + "minLength": 1, + "type": "string" + }, + "message": { + "const": "Service is not ready." + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + }, + "service": { + "const": "ardaro-receipt-intelligence" + }, + "status": { + "const": "not_ready" + } + }, + "required": [ + "contract_version", + "status", + "service", + "error" + ], + "type": "object" + }, + { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "properties": { + "accepts": { + "items": { + "properties": { + "amount": { + "type": "string" + }, + "asset": { + "type": "string" + }, + "extra": { + "additionalProperties": true, + "type": "object" + }, + "maxTimeoutSeconds": { + "type": "integer" + }, + "network": { + "type": "string" + }, + "payTo": { + "type": "string" + }, + "scheme": { + "type": "string" + } + }, + "required": [ + "scheme", + "network", + "asset", + "amount", + "payTo", + "maxTimeoutSeconds" + ], + "type": "object" + }, + "type": "array" + }, + "error": { + "type": [ + "string", + "null" + ] + }, + "extensions": { + "oneOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ] + }, + "resource": { + "oneOf": [ + { + "properties": { + "description": { + "type": [ + "string", + "null" + ] + }, + "iconUrl": { + "type": [ + "string", + "null" + ] + }, + "mimeType": { + "type": [ + "string", + "null" + ] + }, + "serviceName": { + "type": [ + "string", + "null" + ] + }, + "tags": { + "oneOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "url" + ], + "type": "object" + }, + { + "type": "null" + } + ] + }, + "x402Version": { + "const": 2, + "default": 2, + "type": "integer" + } + }, + "required": [ + "accepts" + ], + "type": "object" + }, + { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "properties": { + "error": { + "type": "string" + } + }, + "required": [ + "error" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "message": { + "type": "string" + }, + "status": { + "const": "error" + } + }, + "required": [ + "status", + "message" + ], + "type": "object" + } +]
- Changed
reconcile_purchase_documents45 fields changed- changed
Input schema / properties / invoice / properties / currency / patternPrevious value: -"^[A-Z]{3}(?![\\s\\S])"New value: +"^[A-Z]{3}$" - changed
Input schema / properties / invoice / properties / line_items / items / properties / amount / patternPrevious value: -"^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,6})?(?![\\s\\S])"New value: +"^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,6})?$" - changed
Input schema / properties / invoice / properties / line_items / items / properties / line_id / patternPrevious value: -"^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])"New value: +"^[A-Za-z0-9][A-Za-z0-9._:/-]*$" - changed
Input schema / properties / invoice / properties / line_items / items / properties / po_line_id / patternPrevious value: -"^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])"New value: +"^[A-Za-z0-9][A-Za-z0-9._:/-]*$" - changed
Input schema / properties / invoice / properties / line_items / items / properties / product_code / patternPrevious value: -"^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])"New value: +"^[A-Za-z0-9][A-Za-z0-9._:/-]*$" - added
Input schema / properties / invoice / properties / line_items / items / properties / quantity / allOfAdded value: +[ + { + "not": { + "pattern": "^0(?:\\.0+)?$" + } + } +] - changed
Input schema / properties / invoice / properties / line_items / items / properties / quantity / not / patternPrevious value: -"^0(?:\\.0+)?(?![\\s\\S])"New value: +"\\n" - changed
Input schema / properties / invoice / properties / line_items / items / properties / quantity / patternPrevious value: -"^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?(?![\\s\\S])"New value: +"^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?$" - changed
Input schema / properties / invoice / properties / line_items / items / properties / unit / patternPrevious value: -"^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])"New value: +"^[A-Za-z0-9][A-Za-z0-9._:/-]*$" - added
Input schema / properties / invoice / properties / line_items / items / properties / unit_price / notAdded value: +{ + "pattern": "\\n" +} - changed
Input schema / properties / invoice / properties / line_items / items / properties / unit_price / patternPrevious value: -"^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?(?![\\s\\S])"New value: +"^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?$" - changed
Input schema / properties / invoice / properties / subtotal / patternPrevious value: -"^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,6})?(?![\\s\\S])"New value: +"^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,6})?$" - changed
Input schema / properties / invoice / properties / supplier_id / patternPrevious value: -"^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])"New value: +"^[A-Za-z0-9][A-Za-z0-9._:/-]*$" - changed
Input schema / properties / invoice / properties / tax / patternPrevious value: -"^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,6})?(?![\\s\\S])"New value: +"^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,6})?$" - changed
Input schema / properties / invoice / properties / total / patternPrevious value: -"^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,6})?(?![\\s\\S])"New value: +"^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,6})?$" - changed
Input schema / properties / purchase_order / properties / currency / patternPrevious value: -"^[A-Z]{3}(?![\\s\\S])"New value: +"^[A-Z]{3}$" - changed
Input schema / properties / purchase_order / properties / line_items / items / properties / amount / patternPrevious value: -"^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,6})?(?![\\s\\S])"New value: +"^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,6})?$" - changed
Input schema / properties / purchase_order / properties / line_items / items / properties / line_id / patternPrevious value: -"^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])"New value: +"^[A-Za-z0-9][A-Za-z0-9._:/-]*$" - changed
Input schema / properties / purchase_order / properties / line_items / items / properties / product_code / patternPrevious value: -"^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])"New value: +"^[A-Za-z0-9][A-Za-z0-9._:/-]*$" - added
Input schema / properties / purchase_order / properties / line_items / items / properties / quantity / allOfAdded value: +[ + { + "not": { + "pattern": "^0(?:\\.0+)?$" + } + } +] - changed
Input schema / properties / purchase_order / properties / line_items / items / properties / quantity / not / patternPrevious value: -"^0(?:\\.0+)?(?![\\s\\S])"New value: +"\\n" - changed
Input schema / properties / purchase_order / properties / line_items / items / properties / quantity / patternPrevious value: -"^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?(?![\\s\\S])"New value: +"^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?$" - changed
Input schema / properties / purchase_order / properties / line_items / items / properties / unit / patternPrevious value: -"^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])"New value: +"^[A-Za-z0-9][A-Za-z0-9._:/-]*$" - added
Input schema / properties / purchase_order / properties / line_items / items / properties / unit_price / notAdded value: +{ + "pattern": "\\n" +} - changed
Input schema / properties / purchase_order / properties / line_items / items / properties / unit_price / patternPrevious value: -"^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?(?![\\s\\S])"New value: +"^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?$" - changed
Input schema / properties / purchase_order / properties / subtotal / patternPrevious value: -"^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,6})?(?![\\s\\S])"New value: +"^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,6})?$" - changed
Input schema / properties / purchase_order / properties / supplier_id / patternPrevious value: -"^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])"New value: +"^[A-Za-z0-9][A-Za-z0-9._:/-]*$" - changed
Input schema / properties / purchase_order / properties / tax / patternPrevious value: -"^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,6})?(?![\\s\\S])"New value: +"^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,6})?$" - changed
Input schema / properties / purchase_order / properties / total / patternPrevious value: -"^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,6})?(?![\\s\\S])"New value: +"^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,6})?$" - changed
Input schema / properties / receipt / properties / currency / patternPrevious value: -"^[A-Z]{3}(?![\\s\\S])"New value: +"^[A-Z]{3}$" - changed
Input schema / properties / receipt / properties / line_items / items / properties / amount / patternPrevious value: -"^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,6})?(?![\\s\\S])"New value: +"^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,6})?$" - changed
Input schema / properties / receipt / properties / line_items / items / properties / invoice_line_id / patternPrevious value: -"^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])"New value: +"^[A-Za-z0-9][A-Za-z0-9._:/-]*$" - changed
Input schema / properties / receipt / properties / line_items / items / properties / line_id / patternPrevious value: -"^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])"New value: +"^[A-Za-z0-9][A-Za-z0-9._:/-]*$" - changed
Input schema / properties / receipt / properties / line_items / items / properties / product_code / patternPrevious value: -"^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])"New value: +"^[A-Za-z0-9][A-Za-z0-9._:/-]*$" - added
Input schema / properties / receipt / properties / line_items / items / properties / quantity / allOfAdded value: +[ + { + "not": { + "pattern": "^0(?:\\.0+)?$" + } + } +] - changed
Input schema / properties / receipt / properties / line_items / items / properties / quantity / not / patternPrevious value: -"^0(?:\\.0+)?(?![\\s\\S])"New value: +"\\n" - changed
Input schema / properties / receipt / properties / line_items / items / properties / quantity / patternPrevious value: -"^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?(?![\\s\\S])"New value: +"^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?$" - changed
Input schema / properties / receipt / properties / line_items / items / properties / unit / patternPrevious value: -"^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])"New value: +"^[A-Za-z0-9][A-Za-z0-9._:/-]*$" - added
Input schema / properties / receipt / properties / line_items / items / properties / unit_price / notAdded value: +{ + "pattern": "\\n" +} - changed
Input schema / properties / receipt / properties / line_items / items / properties / unit_price / patternPrevious value: -"^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?(?![\\s\\S])"New value: +"^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?$" - changed
Input schema / properties / receipt / properties / subtotal / patternPrevious value: -"^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,6})?(?![\\s\\S])"New value: +"^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,6})?$" - changed
Input schema / properties / receipt / properties / supplier_id / patternPrevious value: -"^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])"New value: +"^[A-Za-z0-9][A-Za-z0-9._:/-]*$" - changed
Input schema / properties / receipt / properties / tax / patternPrevious value: -"^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,6})?(?![\\s\\S])"New value: +"^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,6})?$" - changed
Input schema / properties / receipt / properties / total / patternPrevious value: -"^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,6})?(?![\\s\\S])"New value: +"^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,6})?$" - changed
Output schema / oneOfPrevious value: -[ - { - "additionalProperties": false, - "properties": { - "comparisons": { - "items": { - "additionalProperties": false, - "properties": { - "document_identity_comparable": { - "type": "boolean" - }, - "pair": { - "enum": [ - "receipt_to_invoice", - "invoice_to_purchase_order" - ] - }, - "rows": { - "items": { - "additionalProperties": false, - "properties": { - "amount_difference": { - "maxLength": 50, - "pattern": "^-?(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?(?![\\s\\S])", - "type": [ - "string", - "null" - ] - }, - "candidate_targets": { - "items": { - "maxLength": 100, - "pattern": "^/(?:receipt|invoice|purchase_order)(?:/[A-Za-z0-9_]+)*(?![\\s\\S])", - "type": "string" - }, - "maxItems": 100, - "type": "array" - }, - "comparison_performed": { - "type": "boolean" - }, - "match_method": { - "enum": [ - "unmatched", - "explicit_line_reference", - "exact_product_code", - "normalized_description" - ] - }, - "quantity_difference": { - "maxLength": 50, - "pattern": "^-?(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?(?![\\s\\S])", - "type": [ - "string", - "null" - ] - }, - "source": { - "maxLength": 100, - "pattern": "^/(?:receipt|invoice|purchase_order)(?:/[A-Za-z0-9_]+)*(?![\\s\\S])", - "type": "string" - }, - "status": { - "enum": [ - "no_discrepancies", - "needs_review" - ] - }, - "target": { - "anyOf": [ - { - "maxLength": 100, - "pattern": "^/(?:receipt|invoice|purchase_order)(?:/[A-Za-z0-9_]+)*(?![\\s\\S])", - "type": "string" - }, - { - "type": "null" - } - ] - }, - "unit_price_difference": { - "maxLength": 50, - "pattern": "^-?(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?(?![\\s\\S])", - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "source", - "target", - "candidate_targets", - "match_method", - "comparison_performed", - "status", - "quantity_difference", - "unit_price_difference", - "amount_difference" - ], - "type": "object" - }, - "maxItems": 100, - "type": "array" - }, - "status": { - "enum": [ - "no_discrepancies", - "needs_review" - ] - } - }, - "required": [ - "pair", - "status", - "document_identity_comparable", - "rows" - ], - "type": "object" - }, - "maxItems": 2, - "minItems": 2, - "type": "array" - }, - "contract_version": { - "const": "ardaro.purchase-document-reconciliation.response.v1" - }, - "delivery_verified": { - "const": false - }, - "discrepancies": { - "items": { - "additionalProperties": false, - "properties": { - "code": { - "maxLength": 80, - "pattern": "^[a-z_]+(?![\\s\\S])", - "type": "string" - }, - "scope": { - "enum": [ - "receipt", - "invoice", - "purchase_order", - "receipt_to_invoice", - "invoice_to_purchase_order" - ] - }, - "severity": { - "enum": [ - "unknown", - "discrepancy" - ] - }, - "sources": { - "items": { - "maxLength": 100, - "pattern": "^/(?:receipt|invoice|purchase_order)(?:/[A-Za-z0-9_]+)*(?![\\s\\S])", - "type": "string" - }, - "maxItems": 101, - "type": "array" - } - }, - "required": [ - "code", - "scope", - "severity", - "sources" - ], - "type": "object" - }, - "maxItems": 6000, - "type": "array" - }, - "document_summary": { - "items": { - "additionalProperties": false, - "properties": { - "currency_minor_units": { - "enum": [ - 0, - 2, - null - ] - }, - "currency_supported": { - "type": "boolean" - }, - "document": { - "enum": [ - "receipt", - "invoice", - "purchase_order" - ] - }, - "line_count": { - "maximum": 100, - "minimum": 0, - "type": "integer" - }, - "present": { - "type": "boolean" - } - }, - "required": [ - "document", - "present", - "line_count", - "currency_supported", - "currency_minor_units" - ], - "type": "object" - }, - "maxItems": 3, - "minItems": 3, - "type": "array" - }, - "financial_posting_performed": { - "const": false - }, - "human_review_required": { - "const": true - }, - "payment_approved": { - "const": false - }, - "policy": { - "const": { - "arithmetic_scope": "Exact decimal comparisons with per-line ROUND_HALF_UP at supported currency precision. No tax applicability, discounts, freight or currency conversion is inferred.", - "decision_scope": "No discrepancies means the supported checks found none in supplied data. It is not payment authorization, accounting approval or supplier verification.", - "document_storage_performed": false, - "matching_rule": "explicit line reference, else unique exact case-sensitive product code, else unique NFKC/casefold/whitespace-normalized description when both product codes are absent; never fuzzy or semantic", - "model_calls": 0, - "paid_tool_calls": 0, - "payment_required": false, - "quantity_scope": "Differences concern only these three supplied documents. Partial receipts, partial invoicing, prior invoices, returns and delivery events are not inferred.", - "receipt_scope": "An expense receipt is not evidence of delivery. A delivery_receipt label is caller-supplied and does not authenticate delivery.", - "retention_scope": "This function retains no documents or results; caller and transport retention are outside this function's guarantees." - } - }, - "provenance": { - "const": { - "document_authenticity_verified": false, - "external_data_fetched": false, - "source": "caller_supplied_documents_only", - "source_pointer_root": "original_arguments" - } - }, - "result_identity": { - "pattern": "^res_[0-9a-f]{64}(?![\\s\\S])", - "type": "string" - }, - "status": { - "enum": [ - "no_discrepancies", - "needs_review" - ] - } - }, - "required": [ - "contract_version", - "human_review_required", - "payment_approved", - "delivery_verified", - "financial_posting_performed", - "provenance", - "policy", - "status", - "result_identity", - "document_summary", - "comparisons", - "discrepancies" - ], - "type": "object" - }, - { - "additionalProperties": false, - "properties": { - "contract_version": { - "const": "ardaro.purchase-document-reconciliation.response.v1" - }, - "error": { - "additionalProperties": false, - "properties": { - "code": { - "maxLength": 80, - "type": "string" - }, - "message": { - "maxLength": 300, - "type": "string" - } - }, - "required": [ - "code", - "message" - ], - "type": "object" - }, - "status": { - "const": "error" - } - }, - "required": [ - "contract_version", - "status", - "error" - ], - "type": "object" - } -]New value: +[ + { + "additionalProperties": false, + "properties": { + "comparisons": { + "items": { + "additionalProperties": false, + "properties": { + "document_identity_comparable": { + "type": "boolean" + }, + "pair": { + "enum": [ + "receipt_to_invoice", + "invoice_to_purchase_order" + ] + }, + "rows": { + "items": { + "additionalProperties": false, + "properties": { + "amount_difference": { + "maxLength": 50, + "pattern": "^-?(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$", + "type": [ + "string", + "null" + ] + }, + "candidate_targets": { + "items": { + "maxLength": 100, + "pattern": "^/(?:receipt|invoice|purchase_order)(?:/[A-Za-z0-9_]+)*$", + "type": "string" + }, + "maxItems": 100, + "type": "array" + }, + "comparison_performed": { + "type": "boolean" + }, + "match_method": { + "enum": [ + "unmatched", + "explicit_line_reference", + "exact_product_code", + "normalized_description" + ] + }, + "quantity_difference": { + "maxLength": 50, + "pattern": "^-?(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$", + "type": [ + "string", + "null" + ] + }, + "source": { + "maxLength": 100, + "pattern": "^/(?:receipt|invoice|purchase_order)(?:/[A-Za-z0-9_]+)*$", + "type": "string" + }, + "status": { + "enum": [ + "no_discrepancies", + "needs_review" + ] + }, + "target": { + "anyOf": [ + { + "maxLength": 100, + "pattern": "^/(?:receipt|invoice|purchase_order)(?:/[A-Za-z0-9_]+)*$", + "type": "string" + }, + { + "type": "null" + } + ] + }, + "unit_price_difference": { + "maxLength": 50, + "pattern": "^-?(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$", + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "source", + "target", + "candidate_targets", + "match_method", + "comparison_performed", + "status", + "quantity_difference", + "unit_price_difference", + "amount_difference" + ], + "type": "object" + }, + "maxItems": 100, + "type": "array" + }, + "status": { + "enum": [ + "no_discrepancies", + "needs_review" + ] + } + }, + "required": [ + "pair", + "status", + "document_identity_comparable", + "rows" + ], + "type": "object" + }, + "maxItems": 2, + "minItems": 2, + "type": "array" + }, + "contract_version": { + "const": "ardaro.purchase-document-reconciliation.response.v1" + }, + "delivery_verified": { + "const": false + }, + "discrepancies": { + "items": { + "additionalProperties": false, + "properties": { + "code": { + "maxLength": 80, + "pattern": "^[a-z_]+$", + "type": "string" + }, + "scope": { + "enum": [ + "receipt", + "invoice", + "purchase_order", + "receipt_to_invoice", + "invoice_to_purchase_order" + ] + }, + "severity": { + "enum": [ + "unknown", + "discrepancy" + ] + }, + "sources": { + "items": { + "maxLength": 100, + "pattern": "^/(?:receipt|invoice|purchase_order)(?:/[A-Za-z0-9_]+)*$", + "type": "string" + }, + "maxItems": 101, + "type": "array" + } + }, + "required": [ + "code", + "scope", + "severity", + "sources" + ], + "type": "object" + }, + "maxItems": 6000, + "type": "array" + }, + "document_summary": { + "items": { + "additionalProperties": false, + "properties": { + "currency_minor_units": { + "enum": [ + 0, + 2, + null + ] + }, + "currency_supported": { + "type": "boolean" + }, + "document": { + "enum": [ + "receipt", + "invoice", + "purchase_order" + ] + }, + "line_count": { + "maximum": 100, + "minimum": 0, + "type": "integer" + }, + "present": { + "type": "boolean" + } + }, + "required": [ + "document", + "present", + "line_count", + "currency_supported", + "currency_minor_units" + ], + "type": "object" + }, + "maxItems": 3, + "minItems": 3, + "type": "array" + }, + "financial_posting_performed": { + "const": false + }, + "human_review_required": { + "const": true + }, + "payment_approved": { + "const": false + }, + "policy": { + "const": { + "arithmetic_scope": "Exact decimal comparisons with per-line ROUND_HALF_UP at supported currency precision. No tax applicability, discounts, freight or currency conversion is inferred.", + "decision_scope": "No discrepancies means the supported checks found none in supplied data. It is not payment authorization, accounting approval or supplier verification.", + "document_storage_performed": false, + "matching_rule": "explicit line reference, else unique exact case-sensitive product code, else unique NFKC/casefold/whitespace-normalized description when both product codes are absent; never fuzzy or semantic", + "model_calls": 0, + "paid_tool_calls": 0, + "payment_required": false, + "quantity_scope": "Differences concern only these three supplied documents. Partial receipts, partial invoicing, prior invoices, returns and delivery events are not inferred.", + "receipt_scope": "An expense receipt is not evidence of delivery. A delivery_receipt label is caller-supplied and does not authenticate delivery.", + "retention_scope": "This function retains no documents or results; caller and transport retention are outside this function's guarantees." + } + }, + "provenance": { + "const": { + "document_authenticity_verified": false, + "external_data_fetched": false, + "source": "caller_supplied_documents_only", + "source_pointer_root": "original_arguments" + } + }, + "result_identity": { + "pattern": "^res_[0-9a-f]{64}$", + "type": "string" + }, + "status": { + "enum": [ + "no_discrepancies", + "needs_review" + ] + } + }, + "required": [ + "contract_version", + "human_review_required", + "payment_approved", + "delivery_verified", + "financial_posting_performed", + "provenance", + "policy", + "status", + "result_identity", + "document_summary", + "comparisons", + "discrepancies" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "contract_version": { + "const": "ardaro.purchase-document-reconciliation.response.v1" + }, + "error": { + "additionalProperties": false, + "properties": { + "code": { + "maxLength": 80, + "type": "string" + }, + "message": { + "maxLength": 300, + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + }, + "status": { + "const": "error" + } + }, + "required": [ + "contract_version", + "status", + "error" + ], + "type": "object" + } +]
2 tool updates
- Changed
get_document_example1 field changed- changed
Input schema / properties / service / descriptionPrevious value: -"Service whose fixed example or current terms to inspect."New value: +"receipt: extraction checks; invoice: paid invoice-to-PO quantity allocation; reconciliation: free three-document discrepancy checks without allocation. Choose one service; examples do not process caller documents."
- Changed
get_document_service_status1 field changed- changed
Input schema / properties / service / descriptionPrevious value: -"Service whose fixed example or current terms to inspect."New value: +"receipt: extraction checks; invoice: paid invoice-to-PO quantity allocation; reconciliation: free three-document discrepancy checks without allocation. Choose one service; examples do not process caller documents."
19 tool updates
- Removed
authorize_agent_spend - Removed
compress_agent_context - Removed
get_authorize_agent_spend_example - Removed
get_authorize_agent_spend_service_status - Removed
get_compress_agent_context_example - Removed
get_compress_agent_context_service_status - Added
get_document_example - Added
get_document_service_status - Removed
get_invoice_matching_example - Removed
get_invoice_matching_service_status - Removed
get_receipt_example - Removed
get_receipt_service_status - Removed
get_reconcile_api_ledger_example - Removed
get_reconcile_api_ledger_service_status - Removed
get_route_model_intent_example - Removed
get_route_model_intent_service_status - Removed
reconcile_api_ledger - Added
reconcile_purchase_documents - Removed
route_model_intent
12 tool updates
- Added
authorize_agent_spend - Added
compress_agent_context - Added
get_authorize_agent_spend_example - Added
get_authorize_agent_spend_service_status - Added
get_compress_agent_context_example - Added
get_compress_agent_context_service_status - Added
get_reconcile_api_ledger_example - Added
get_reconcile_api_ledger_service_status - Added
get_route_model_intent_example - Added
get_route_model_intent_service_status - Added
reconcile_api_ledger - Added
route_model_intent
1 tool update
- Changed
get_invoice_matching_service_status3 fields changed- changed
Output schema / properties / endpoints / properties / analyze / patternPrevious value: -"^https?://[^/?#]+/v1/invoice\\-matching/analyze(?![\\s\\S])"New value: +"^https?://[^/?#]+/v1/invoice-matching/analyze(?![\\s\\S])" - changed
Output schema / properties / endpoints / properties / example / patternPrevious value: -"^https?://[^/?#]+/agent\\-services/invoice\\-matching/example(?![\\s\\S])"New value: +"^https?://[^/?#]+/agent-services/invoice-matching/example(?![\\s\\S])" - changed
Output schema / properties / endpoints / properties / status / patternPrevious value: -"^https?://[^/?#]+/agent\\-services/invoice\\-matching/status(?![\\s\\S])"New value: +"^https?://[^/?#]+/agent-services/invoice-matching/status(?![\\s\\S])"
3 tool updates
- Added
get_invoice_matching_example - Added
get_invoice_matching_service_status - Added
match_invoice
1 tool update
- Added
get_receipt_service_status
2 tool updates
- Changed
analyze_receipt4 fields changed- added
Input schema / properties / contract_version / descriptionAdded value: +"Required request contract identifier; send this exact version string." - added
Input schema / properties / existing_fingerprints / descriptionAdded value: +"Receipt fingerprints already known to the caller for duplicate comparison. Supply lowercase 64-character SHA-256 hex strings, or an empty array when none are available; at most 10,000 entries." - added
Input schema / properties / input / descriptionAdded value: +"One receipt supplied as bounded OCR text or a provider-neutral structured extraction. Choose exactly one input kind." - changed
Input schema / properties / input / oneOfPrevious value: -[ - { - "additionalProperties": false, - "properties": { - "kind": { - "const": "text" - }, - "text": { - "maxLength": 20000, - "minLength": 1, - "type": "string" - } - }, - "required": [ - "kind", - "text" - ], - "type": "object" - }, - { - "additionalProperties": false, - "properties": { - "analysis": { - "additionalProperties": false, - "minProperties": 1, - "properties": { - "currency": { - "oneOf": [ - { - "maxLength": 3, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "maximum": 100, - "minimum": 0, - "type": "number" - }, - "value": { - "oneOf": [ - { - "maxLength": 3, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - } - ] - } - }, - "required": [ - "value" - ], - "type": "object" - } - ] - }, - "line_items": { - "items": { - "additionalProperties": false, - "minProperties": 1, - "properties": { - "amount": { - "oneOf": [ - { - "maxLength": 80, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "maximum": 100, - "minimum": 0, - "type": "number" - }, - "value": { - "oneOf": [ - { - "maxLength": 80, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - } - ] - } - }, - "required": [ - "value" - ], - "type": "object" - } - ] - }, - "description": { - "oneOf": [ - { - "maxLength": 240, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "maximum": 100, - "minimum": 0, - "type": "number" - }, - "value": { - "oneOf": [ - { - "maxLength": 240, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - } - ] - } - }, - "required": [ - "value" - ], - "type": "object" - } - ] - }, - "product_code": { - "oneOf": [ - { - "maxLength": 80, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "maximum": 100, - "minimum": 0, - "type": "number" - }, - "value": { - "oneOf": [ - { - "maxLength": 80, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - } - ] - } - }, - "required": [ - "value" - ], - "type": "object" - } - ] - }, - "quantity": { - "oneOf": [ - { - "maxLength": 80, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "maximum": 100, - "minimum": 0, - "type": "number" - }, - "value": { - "oneOf": [ - { - "maxLength": 80, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - } - ] - } - }, - "required": [ - "value" - ], - "type": "object" - } - ] - }, - "unit_price": { - "oneOf": [ - { - "maxLength": 80, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "maximum": 100, - "minimum": 0, - "type": "number" - }, - "value": { - "oneOf": [ - { - "maxLength": 80, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - } - ] - } - }, - "required": [ - "value" - ], - "type": "object" - } - ] - } - }, - "type": "object" - }, - "maxItems": 100, - "type": "array" - }, - "purchase_date": { - "oneOf": [ - { - "maxLength": 10, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "maximum": 100, - "minimum": 0, - "type": "number" - }, - "value": { - "oneOf": [ - { - "maxLength": 10, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - } - ] - } - }, - "required": [ - "value" - ], - "type": "object" - } - ] - }, - "purchase_order": { - "oneOf": [ - { - "maxLength": 160, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "maximum": 100, - "minimum": 0, - "type": "number" - }, - "value": { - "oneOf": [ - { - "maxLength": 160, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - } - ] - } - }, - "required": [ - "value" - ], - "type": "object" - } - ] - }, - "receipt_reference": { - "oneOf": [ - { - "maxLength": 160, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "maximum": 100, - "minimum": 0, - "type": "number" - }, - "value": { - "oneOf": [ - { - "maxLength": 160, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - } - ] - } - }, - "required": [ - "value" - ], - "type": "object" - } - ] - }, - "subtotal": { - "oneOf": [ - { - "maxLength": 32, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "maximum": 100, - "minimum": 0, - "type": "number" - }, - "value": { - "oneOf": [ - { - "maxLength": 32, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - } - ] - } - }, - "required": [ - "value" - ], - "type": "object" - } - ] - }, - "tax": { - "oneOf": [ - { - "maxLength": 32, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "maximum": 100, - "minimum": 0, - "type": "number" - }, - "value": { - "oneOf": [ - { - "maxLength": 32, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - } - ] - } - }, - "required": [ - "value" - ], - "type": "object" - } - ] - }, - "total": { - "oneOf": [ - { - "maxLength": 32, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "maximum": 100, - "minimum": 0, - "type": "number" - }, - "value": { - "oneOf": [ - { - "maxLength": 32, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - } - ] - } - }, - "required": [ - "value" - ], - "type": "object" - } - ] - }, - "vendor": { - "oneOf": [ - { - "maxLength": 160, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "maximum": 100, - "minimum": 0, - "type": "number" - }, - "value": { - "oneOf": [ - { - "maxLength": 160, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - } - ] - } - }, - "required": [ - "value" - ], - "type": "object" - } - ] - } - }, - "type": "object" - }, - "kind": { - "const": "structured" - } - }, - "required": [ - "kind", - "analysis" - ], - "type": "object" - } -]New value: +[ + { + "additionalProperties": false, + "properties": { + "kind": { + "const": "text", + "description": "Selects receipt text input; supply the text property." + }, + "text": { + "description": "OCR or receipt text for one document, up to 20,000 characters. Exclude payment-card data, credentials, customer-record payloads, and financial posting instructions.", + "maxLength": 20000, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "kind", + "text" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "analysis": { + "additionalProperties": false, + "description": "Provider-neutral receipt extraction using only the listed fields. Omit fields that were not extracted.", + "minProperties": 1, + "properties": { + "currency": { + "description": "Three-letter currency code shown on the receipt, for example USD. Supply the extracted value directly or wrap it with optional extraction confidence.", + "oneOf": [ + { + "maxLength": 3, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", + "maximum": 100, + "minimum": 0, + "type": "number" + }, + "value": { + "description": "The extracted field value, supplied as text or a number before receipt normalization.", + "oneOf": [ + { + "maxLength": 3, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "value" + ], + "type": "object" + } + ] + }, + "line_items": { + "description": "Extracted receipt line items, limited to 100 entries; omit unavailable item fields.", + "items": { + "additionalProperties": false, + "minProperties": 1, + "properties": { + "amount": { + "description": "Extended amount printed for this line item, in the receipt currency. Supply the extracted value directly or wrap it with optional extraction confidence.", + "oneOf": [ + { + "maxLength": 80, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", + "maximum": 100, + "minimum": 0, + "type": "number" + }, + "value": { + "description": "The extracted field value, supplied as text or a number before receipt normalization.", + "oneOf": [ + { + "maxLength": 80, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "value" + ], + "type": "object" + } + ] + }, + "description": { + "description": "Item description printed on the receipt. Supply the extracted value directly or wrap it with optional extraction confidence.", + "oneOf": [ + { + "maxLength": 240, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", + "maximum": 100, + "minimum": 0, + "type": "number" + }, + "value": { + "description": "The extracted field value, supplied as text or a number before receipt normalization.", + "oneOf": [ + { + "maxLength": 240, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "value" + ], + "type": "object" + } + ] + }, + "product_code": { + "description": "Product identifier or SKU printed for this line item. Supply the extracted value directly or wrap it with optional extraction confidence.", + "oneOf": [ + { + "maxLength": 80, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", + "maximum": 100, + "minimum": 0, + "type": "number" + }, + "value": { + "description": "The extracted field value, supplied as text or a number before receipt normalization.", + "oneOf": [ + { + "maxLength": 80, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "value" + ], + "type": "object" + } + ] + }, + "quantity": { + "description": "Quantity purchased for this line item. Supply the extracted value directly or wrap it with optional extraction confidence.", + "oneOf": [ + { + "maxLength": 80, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", + "maximum": 100, + "minimum": 0, + "type": "number" + }, + "value": { + "description": "The extracted field value, supplied as text or a number before receipt normalization.", + "oneOf": [ + { + "maxLength": 80, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "value" + ], + "type": "object" + } + ] + }, + "unit_price": { + "description": "Price per unit for this line item, in the receipt currency. Supply the extracted value directly or wrap it with optional extraction confidence.", + "oneOf": [ + { + "maxLength": 80, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", + "maximum": 100, + "minimum": 0, + "type": "number" + }, + "value": { + "description": "The extracted field value, supplied as text or a number before receipt normalization.", + "oneOf": [ + { + "maxLength": 80, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "value" + ], + "type": "object" + } + ] + } + }, + "type": "object" + }, + "maxItems": 100, + "type": "array" + }, + "purchase_date": { + "description": "Purchase date as extracted; YYYY-MM-DD is recommended. Supply the extracted value directly or wrap it with optional extraction confidence.", + "oneOf": [ + { + "maxLength": 10, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", + "maximum": 100, + "minimum": 0, + "type": "number" + }, + "value": { + "description": "The extracted field value, supplied as text or a number before receipt normalization.", + "oneOf": [ + { + "maxLength": 10, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "value" + ], + "type": "object" + } + ] + }, + "purchase_order": { + "description": "Purchase-order reference printed on the receipt; this does not select or link an Ardaro job. Supply the extracted value directly or wrap it with optional extraction confidence.", + "oneOf": [ + { + "maxLength": 160, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", + "maximum": 100, + "minimum": 0, + "type": "number" + }, + "value": { + "description": "The extracted field value, supplied as text or a number before receipt normalization.", + "oneOf": [ + { + "maxLength": 160, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "value" + ], + "type": "object" + } + ] + }, + "receipt_reference": { + "description": "Receipt, invoice, or transaction reference printed on the document. Supply the extracted value directly or wrap it with optional extraction confidence.", + "oneOf": [ + { + "maxLength": 160, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", + "maximum": 100, + "minimum": 0, + "type": "number" + }, + "value": { + "description": "The extracted field value, supplied as text or a number before receipt normalization.", + "oneOf": [ + { + "maxLength": 160, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "value" + ], + "type": "object" + } + ] + }, + "subtotal": { + "description": "Receipt subtotal before tax, in the receipt currency. Supply the extracted value directly or wrap it with optional extraction confidence.", + "oneOf": [ + { + "maxLength": 32, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", + "maximum": 100, + "minimum": 0, + "type": "number" + }, + "value": { + "description": "The extracted field value, supplied as text or a number before receipt normalization.", + "oneOf": [ + { + "maxLength": 32, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "value" + ], + "type": "object" + } + ] + }, + "tax": { + "description": "Total tax amount printed on the receipt, in the receipt currency. Supply the extracted value directly or wrap it with optional extraction confidence.", + "oneOf": [ + { + "maxLength": 32, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", + "maximum": 100, + "minimum": 0, + "type": "number" + }, + "value": { + "description": "The extracted field value, supplied as text or a number before receipt normalization.", + "oneOf": [ + { + "maxLength": 32, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "value" + ], + "type": "object" + } + ] + }, + "total": { + "description": "Final receipt total, in the receipt currency. Supply the extracted value directly or wrap it with optional extraction confidence.", + "oneOf": [ + { + "maxLength": 32, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", + "maximum": 100, + "minimum": 0, + "type": "number" + }, + "value": { + "description": "The extracted field value, supplied as text or a number before receipt normalization.", + "oneOf": [ + { + "maxLength": 32, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "value" + ], + "type": "object" + } + ] + }, + "vendor": { + "description": "Merchant or supplier name printed on the receipt. Supply the extracted value directly or wrap it with optional extraction confidence.", + "oneOf": [ + { + "maxLength": 160, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", + "maximum": 100, + "minimum": 0, + "type": "number" + }, + "value": { + "description": "The extracted field value, supplied as text or a number before receipt normalization.", + "oneOf": [ + { + "maxLength": 160, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "value" + ], + "type": "object" + } + ] + } + }, + "type": "object" + }, + "kind": { + "const": "structured", + "description": "Selects structured receipt input; supply the analysis property." + } + }, + "required": [ + "kind", + "analysis" + ], + "type": "object" + } +]
- Changed
get_receipt_example4 fields changed- added
Output schema / properties / request / properties / contract_version / descriptionAdded value: +"Required request contract identifier; send this exact version string." - added
Output schema / properties / request / properties / existing_fingerprints / descriptionAdded value: +"Receipt fingerprints already known to the caller for duplicate comparison. Supply lowercase 64-character SHA-256 hex strings, or an empty array when none are available; at most 10,000 entries." - added
Output schema / properties / request / properties / input / descriptionAdded value: +"One receipt supplied as bounded OCR text or a provider-neutral structured extraction. Choose exactly one input kind." - changed
Output schema / properties / request / properties / input / oneOfPrevious value: -[ - { - "additionalProperties": false, - "properties": { - "kind": { - "const": "text" - }, - "text": { - "maxLength": 20000, - "minLength": 1, - "type": "string" - } - }, - "required": [ - "kind", - "text" - ], - "type": "object" - }, - { - "additionalProperties": false, - "properties": { - "analysis": { - "additionalProperties": false, - "minProperties": 1, - "properties": { - "currency": { - "oneOf": [ - { - "maxLength": 3, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "maximum": 100, - "minimum": 0, - "type": "number" - }, - "value": { - "oneOf": [ - { - "maxLength": 3, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - } - ] - } - }, - "required": [ - "value" - ], - "type": "object" - } - ] - }, - "line_items": { - "items": { - "additionalProperties": false, - "minProperties": 1, - "properties": { - "amount": { - "oneOf": [ - { - "maxLength": 80, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "maximum": 100, - "minimum": 0, - "type": "number" - }, - "value": { - "oneOf": [ - { - "maxLength": 80, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - } - ] - } - }, - "required": [ - "value" - ], - "type": "object" - } - ] - }, - "description": { - "oneOf": [ - { - "maxLength": 240, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "maximum": 100, - "minimum": 0, - "type": "number" - }, - "value": { - "oneOf": [ - { - "maxLength": 240, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - } - ] - } - }, - "required": [ - "value" - ], - "type": "object" - } - ] - }, - "product_code": { - "oneOf": [ - { - "maxLength": 80, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "maximum": 100, - "minimum": 0, - "type": "number" - }, - "value": { - "oneOf": [ - { - "maxLength": 80, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - } - ] - } - }, - "required": [ - "value" - ], - "type": "object" - } - ] - }, - "quantity": { - "oneOf": [ - { - "maxLength": 80, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "maximum": 100, - "minimum": 0, - "type": "number" - }, - "value": { - "oneOf": [ - { - "maxLength": 80, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - } - ] - } - }, - "required": [ - "value" - ], - "type": "object" - } - ] - }, - "unit_price": { - "oneOf": [ - { - "maxLength": 80, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "maximum": 100, - "minimum": 0, - "type": "number" - }, - "value": { - "oneOf": [ - { - "maxLength": 80, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - } - ] - } - }, - "required": [ - "value" - ], - "type": "object" - } - ] - } - }, - "type": "object" - }, - "maxItems": 100, - "type": "array" - }, - "purchase_date": { - "oneOf": [ - { - "maxLength": 10, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "maximum": 100, - "minimum": 0, - "type": "number" - }, - "value": { - "oneOf": [ - { - "maxLength": 10, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - } - ] - } - }, - "required": [ - "value" - ], - "type": "object" - } - ] - }, - "purchase_order": { - "oneOf": [ - { - "maxLength": 160, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "maximum": 100, - "minimum": 0, - "type": "number" - }, - "value": { - "oneOf": [ - { - "maxLength": 160, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - } - ] - } - }, - "required": [ - "value" - ], - "type": "object" - } - ] - }, - "receipt_reference": { - "oneOf": [ - { - "maxLength": 160, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "maximum": 100, - "minimum": 0, - "type": "number" - }, - "value": { - "oneOf": [ - { - "maxLength": 160, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - } - ] - } - }, - "required": [ - "value" - ], - "type": "object" - } - ] - }, - "subtotal": { - "oneOf": [ - { - "maxLength": 32, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "maximum": 100, - "minimum": 0, - "type": "number" - }, - "value": { - "oneOf": [ - { - "maxLength": 32, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - } - ] - } - }, - "required": [ - "value" - ], - "type": "object" - } - ] - }, - "tax": { - "oneOf": [ - { - "maxLength": 32, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "maximum": 100, - "minimum": 0, - "type": "number" - }, - "value": { - "oneOf": [ - { - "maxLength": 32, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - } - ] - } - }, - "required": [ - "value" - ], - "type": "object" - } - ] - }, - "total": { - "oneOf": [ - { - "maxLength": 32, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "maximum": 100, - "minimum": 0, - "type": "number" - }, - "value": { - "oneOf": [ - { - "maxLength": 32, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - } - ] - } - }, - "required": [ - "value" - ], - "type": "object" - } - ] - }, - "vendor": { - "oneOf": [ - { - "maxLength": 160, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - }, - { - "additionalProperties": false, - "properties": { - "confidence": { - "maximum": 100, - "minimum": 0, - "type": "number" - }, - "value": { - "oneOf": [ - { - "maxLength": 160, - "minLength": 1, - "type": "string" - }, - { - "type": "number" - } - ] - } - }, - "required": [ - "value" - ], - "type": "object" - } - ] - } - }, - "type": "object" - }, - "kind": { - "const": "structured" - } - }, - "required": [ - "kind", - "analysis" - ], - "type": "object" - } -]New value: +[ + { + "additionalProperties": false, + "properties": { + "kind": { + "const": "text", + "description": "Selects receipt text input; supply the text property." + }, + "text": { + "description": "OCR or receipt text for one document, up to 20,000 characters. Exclude payment-card data, credentials, customer-record payloads, and financial posting instructions.", + "maxLength": 20000, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "kind", + "text" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "analysis": { + "additionalProperties": false, + "description": "Provider-neutral receipt extraction using only the listed fields. Omit fields that were not extracted.", + "minProperties": 1, + "properties": { + "currency": { + "description": "Three-letter currency code shown on the receipt, for example USD. Supply the extracted value directly or wrap it with optional extraction confidence.", + "oneOf": [ + { + "maxLength": 3, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", + "maximum": 100, + "minimum": 0, + "type": "number" + }, + "value": { + "description": "The extracted field value, supplied as text or a number before receipt normalization.", + "oneOf": [ + { + "maxLength": 3, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "value" + ], + "type": "object" + } + ] + }, + "line_items": { + "description": "Extracted receipt line items, limited to 100 entries; omit unavailable item fields.", + "items": { + "additionalProperties": false, + "minProperties": 1, + "properties": { + "amount": { + "description": "Extended amount printed for this line item, in the receipt currency. Supply the extracted value directly or wrap it with optional extraction confidence.", + "oneOf": [ + { + "maxLength": 80, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", + "maximum": 100, + "minimum": 0, + "type": "number" + }, + "value": { + "description": "The extracted field value, supplied as text or a number before receipt normalization.", + "oneOf": [ + { + "maxLength": 80, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "value" + ], + "type": "object" + } + ] + }, + "description": { + "description": "Item description printed on the receipt. Supply the extracted value directly or wrap it with optional extraction confidence.", + "oneOf": [ + { + "maxLength": 240, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", + "maximum": 100, + "minimum": 0, + "type": "number" + }, + "value": { + "description": "The extracted field value, supplied as text or a number before receipt normalization.", + "oneOf": [ + { + "maxLength": 240, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "value" + ], + "type": "object" + } + ] + }, + "product_code": { + "description": "Product identifier or SKU printed for this line item. Supply the extracted value directly or wrap it with optional extraction confidence.", + "oneOf": [ + { + "maxLength": 80, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", + "maximum": 100, + "minimum": 0, + "type": "number" + }, + "value": { + "description": "The extracted field value, supplied as text or a number before receipt normalization.", + "oneOf": [ + { + "maxLength": 80, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "value" + ], + "type": "object" + } + ] + }, + "quantity": { + "description": "Quantity purchased for this line item. Supply the extracted value directly or wrap it with optional extraction confidence.", + "oneOf": [ + { + "maxLength": 80, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", + "maximum": 100, + "minimum": 0, + "type": "number" + }, + "value": { + "description": "The extracted field value, supplied as text or a number before receipt normalization.", + "oneOf": [ + { + "maxLength": 80, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "value" + ], + "type": "object" + } + ] + }, + "unit_price": { + "description": "Price per unit for this line item, in the receipt currency. Supply the extracted value directly or wrap it with optional extraction confidence.", + "oneOf": [ + { + "maxLength": 80, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", + "maximum": 100, + "minimum": 0, + "type": "number" + }, + "value": { + "description": "The extracted field value, supplied as text or a number before receipt normalization.", + "oneOf": [ + { + "maxLength": 80, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "value" + ], + "type": "object" + } + ] + } + }, + "type": "object" + }, + "maxItems": 100, + "type": "array" + }, + "purchase_date": { + "description": "Purchase date as extracted; YYYY-MM-DD is recommended. Supply the extracted value directly or wrap it with optional extraction confidence.", + "oneOf": [ + { + "maxLength": 10, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", + "maximum": 100, + "minimum": 0, + "type": "number" + }, + "value": { + "description": "The extracted field value, supplied as text or a number before receipt normalization.", + "oneOf": [ + { + "maxLength": 10, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "value" + ], + "type": "object" + } + ] + }, + "purchase_order": { + "description": "Purchase-order reference printed on the receipt; this does not select or link an Ardaro job. Supply the extracted value directly or wrap it with optional extraction confidence.", + "oneOf": [ + { + "maxLength": 160, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", + "maximum": 100, + "minimum": 0, + "type": "number" + }, + "value": { + "description": "The extracted field value, supplied as text or a number before receipt normalization.", + "oneOf": [ + { + "maxLength": 160, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "value" + ], + "type": "object" + } + ] + }, + "receipt_reference": { + "description": "Receipt, invoice, or transaction reference printed on the document. Supply the extracted value directly or wrap it with optional extraction confidence.", + "oneOf": [ + { + "maxLength": 160, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", + "maximum": 100, + "minimum": 0, + "type": "number" + }, + "value": { + "description": "The extracted field value, supplied as text or a number before receipt normalization.", + "oneOf": [ + { + "maxLength": 160, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "value" + ], + "type": "object" + } + ] + }, + "subtotal": { + "description": "Receipt subtotal before tax, in the receipt currency. Supply the extracted value directly or wrap it with optional extraction confidence.", + "oneOf": [ + { + "maxLength": 32, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", + "maximum": 100, + "minimum": 0, + "type": "number" + }, + "value": { + "description": "The extracted field value, supplied as text or a number before receipt normalization.", + "oneOf": [ + { + "maxLength": 32, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "value" + ], + "type": "object" + } + ] + }, + "tax": { + "description": "Total tax amount printed on the receipt, in the receipt currency. Supply the extracted value directly or wrap it with optional extraction confidence.", + "oneOf": [ + { + "maxLength": 32, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", + "maximum": 100, + "minimum": 0, + "type": "number" + }, + "value": { + "description": "The extracted field value, supplied as text or a number before receipt normalization.", + "oneOf": [ + { + "maxLength": 32, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "value" + ], + "type": "object" + } + ] + }, + "total": { + "description": "Final receipt total, in the receipt currency. Supply the extracted value directly or wrap it with optional extraction confidence.", + "oneOf": [ + { + "maxLength": 32, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", + "maximum": 100, + "minimum": 0, + "type": "number" + }, + "value": { + "description": "The extracted field value, supplied as text or a number before receipt normalization.", + "oneOf": [ + { + "maxLength": 32, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "value" + ], + "type": "object" + } + ] + }, + "vendor": { + "description": "Merchant or supplier name printed on the receipt. Supply the extracted value directly or wrap it with optional extraction confidence.", + "oneOf": [ + { + "maxLength": 160, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + }, + { + "additionalProperties": false, + "properties": { + "confidence": { + "description": "Optional caller-supplied extraction confidence: 0 to 1 is a fraction; values greater than 1 are percentages up to 100. A value of 1 means full confidence.", + "maximum": 100, + "minimum": 0, + "type": "number" + }, + "value": { + "description": "The extracted field value, supplied as text or a number before receipt normalization.", + "oneOf": [ + { + "maxLength": 160, + "minLength": 1, + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "value" + ], + "type": "object" + } + ] + } + }, + "type": "object" + }, + "kind": { + "const": "structured", + "description": "Selects structured receipt input; supply the analysis property." + } + }, + "required": [ + "kind", + "analysis" + ], + "type": "object" + } +]
2 tool updates
- First observed
analyze_receipt - First observed
get_receipt_example
Related MCP Connectors
Invoice and receipt extractor: reads PDF and image invoices/receipts with AI, pulling date…
Capture receipts, scan Gmail, analyze spending, and create reviewed reports from AI assistants.
AU GST/ABN receipt extraction — assigns entertainment/ITC tax codes per line, not just OCR.
- FinStatOAuthai.finstat
Documents in, reconciled double-entry books out. Statements, invoices, receipts, matched and posted.
Related MCP Servers
- FlicenseNot gradedqualityCmaintenanceEnables accounts payable teams to extract invoice data from PDFs and images, detect duplicates, normalize vendor names, calculate payment terms, and validate invoice completeness. Supports local extraction for text PDFs and optional vision providers for scanned documents.-
- FlicenseNot gradedqualityBmaintenanceEnables AI assistants to inspect and extract invoice metadata from PDFs, Word documents, Excel files, and images, then synchronize and enrich the extracted data into an Excel ledger.-
- AlicenseBqualityCmaintenanceEnables automated OCR and Thai tax invoice processing from PDFs and scanned images, including parsing key invoice fields, three-tier routing, SQLite storage, and human review workflows via MCP tools.9MIT

DocumentPro MCPofficial
AlicenseNot gradedqualityCmaintenanceExtract structured, schema-typed data from invoices, purchase orders, receipts, and tax forms, and classify documents into custom label sets — via a hosted MCP server. Free tier included.MIT
Glama MCP Gateway
Add one secure layer between your agents and this server.