{"openapi":"3.1.0","info":{"title":"AP Control Labs API","description":"Agent-native finance and operations controls for invoices, matching, validation, history, and vendor remittance review. AP Control never writes to accounting systems or initiates payments.","version":"1.1.0"},"paths":{"/health":{"get":{"tags":["Operations"],"summary":"Liveness check","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Health Health Get"}}}}}}},"/ready":{"get":{"tags":["Operations"],"summary":"Readiness check","operationId":"ready_ready_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Ready Ready Get"}}}}}}},"/v1/organizations":{"post":{"summary":"Create Organization","description":"Development onboarding endpoint. Production onboarding is completed through a verified Supabase JWT.","operationId":"create_organization_v1_organizations_post","parameters":[{"name":"X-Development-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Development-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/api-keys":{"post":{"tags":["Workspace"],"summary":"Create a scoped API key","operationId":"create_api_key_v1_api_keys_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIKeyRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIKeyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Workspace"],"summary":"List active API keys","operationId":"list_api_keys_v1_api_keys_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/APIKeyResponse"},"title":"Response List Api Keys V1 Api Keys Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/api-keys/{key_id}":{"delete":{"tags":["Workspace"],"summary":"Revoke an API key","operationId":"revoke_api_key_v1_api_keys__key_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","title":"Key Id"}},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/uploads":{"post":{"tags":["AP Control"],"summary":"Create a private single-document upload","operationId":"create_upload_v1_uploads_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/invoices":{"post":{"tags":["AP Control"],"summary":"Queue one idempotent invoice analysis","operationId":"create_invoice_v1_invoices_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","title":"Idempotency-Key"}},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceCreateRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["AP Control"],"summary":"List caller-owned invoices","operationId":"list_invoices_v1_invoices_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceResponse"},"title":"Response List Invoices V1 Invoices Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/invoices/{invoice_id}":{"get":{"tags":["AP Control"],"summary":"Get an invoice analysis status and decision","operationId":"get_invoice_v1_invoices__invoice_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"string","title":"Invoice Id"}},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/invoices/{invoice_id}/document":{"get":{"tags":["Invoice Extract"],"summary":"Create a short-lived source-document download link","operationId":"get_invoice_document_v1_invoices__invoice_id__document_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"string","title":"Invoice Id"}},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentDownloadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/invoices/{invoice_id}/exceptions":{"get":{"tags":["AP Control"],"summary":"Get the agent-readable review packet","operationId":"get_exceptions_v1_invoices__invoice_id__exceptions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"string","title":"Invoice Id"}},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ExceptionResponse"},"title":"Response Get Exceptions V1 Invoices  Invoice Id  Exceptions Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/invoices/{invoice_id}/review":{"post":{"tags":["AP Control"],"summary":"Record a human review decision","operationId":"review_invoice_v1_invoices__invoice_id__review_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"string","title":"Invoice Id"}},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/imports/invoices":{"post":{"tags":["Invoice History Search"],"summary":"Import an unbilled invoice-history baseline","operationId":"import_history_v1_imports_invoices_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/imports/invoices/csv":{"post":{"tags":["Invoice History Search"],"summary":"Import an unbilled CSV invoice-history baseline","operationId":"import_history_csv_v1_imports_invoices_csv_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/webhooks":{"post":{"tags":["Webhooks"],"summary":"Configure signed event delivery","operationId":"create_webhook_v1_webhooks_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Webhooks"],"summary":"List active webhook endpoints","operationId":"list_webhooks_v1_webhooks_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WebhookResponse"},"title":"Response List Webhooks V1 Webhooks Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/webhooks/{webhook_id}":{"delete":{"tags":["Webhooks"],"summary":"Disable a webhook endpoint","operationId":"disable_webhook_v1_webhooks__webhook_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","title":"Webhook Id"}},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/usage":{"get":{"tags":["Workspace"],"summary":"Get trial and paid-analysis usage","operationId":"get_usage_v1_usage_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/purchase-orders":{"post":{"tags":["AP Match"],"summary":"Create Purchase Order","operationId":"create_purchase_order_v1_purchase_orders_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseOrderRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseOrderResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/purchase-orders/from-extraction":{"post":{"tags":["Purchase Order Extract"],"summary":"Save a completed private-preview PO extraction as a revision","operationId":"save_extracted_purchase_order_v1_purchase_orders_from_extraction_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveExtractedPurchaseOrderRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseOrderResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/receipts":{"post":{"tags":["AP Match"],"summary":"Create Receipt","operationId":"create_receipt_v1_receipts_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReceiptRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReceiptResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/invoices/{invoice_id}/match":{"post":{"tags":["AP Match"],"summary":"Match Invoice","operationId":"match_invoice_v1_invoices__invoice_id__match_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"string","title":"Invoice Id"}},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MatchRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MatchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["AP Match"],"summary":"Get Matches","operationId":"get_matches_v1_invoices__invoice_id__match_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"string","title":"Invoice Id"}},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MatchResponse"},"title":"Response Get Matches V1 Invoices  Invoice Id  Match Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/mcp":{"post":{"tags":["MCP"],"summary":"Mcp","operationId":"mcp_mcp_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-AP-Control-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Ap-Control-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Request"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/onboarding/organizations":{"post":{"tags":["Organization"],"summary":"Onboard","operationId":"onboard_v1_onboarding_organizations_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Development-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Development-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/organization":{"get":{"tags":["Organization"],"summary":"Get Organization","operationId":"get_organization_v1_organization_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/organization/retention":{"patch":{"tags":["Organization"],"summary":"Update Retention","operationId":"update_retention_v1_organization_retention_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"retention_days","in":"query","required":true,"schema":{"type":"integer","title":"Retention Days"}},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/checkout":{"post":{"tags":["Billing"],"summary":"Checkout","operationId":"checkout_v1_billing_checkout_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Checkout V1 Billing Checkout Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/portal":{"post":{"tags":["Billing"],"summary":"Portal","operationId":"portal_v1_billing_portal_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Portal V1 Billing Portal Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/invoices/{invoice_id}/extraction":{"get":{"tags":["Finance controls","Invoice Extract"],"summary":"Get Invoice Extraction","operationId":"get_invoice_extraction_v1_invoices__invoice_id__extraction_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"string","title":"Invoice Id"}},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceExtractionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/invoice-lines/normalize":{"post":{"tags":["Finance controls","Invoice Line Normalize"],"summary":"Normalize customer-supplied invoice lines","operationId":"normalize_invoice_lines_v1_invoice_lines_normalize_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceLineNormalizeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceLineNormalizeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/invoices/{invoice_id}/risk":{"get":{"tags":["Finance controls","Invoice Risk Score"],"summary":"Return an explainable deterministic control score","operationId":"get_invoice_risk_v1_invoices__invoice_id__risk_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"string","title":"Invoice Id"}},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceRiskResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/invoice-validations":{"post":{"tags":["Finance controls","Invoice Validate"],"summary":"Validate Invoice","operationId":"validate_invoice_v1_invoice_validations_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceValidationRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceValidationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/invoice-history/search":{"post":{"tags":["Finance controls","Invoice History Search"],"summary":"Search Invoice History","operationId":"search_invoice_history_v1_invoice_history_search_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceHistorySearchRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceHistorySearchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/vendors/{reference}":{"put":{"tags":["Finance controls","Remittance Change Detect"],"summary":"Put Vendor Baseline","operationId":"put_vendor_baseline_v1_vendors__reference__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"reference","in":"path","required":true,"schema":{"type":"string","title":"Reference"}},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VendorBaselineRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VendorBaselineResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/vendors/{reference}/remittance-check":{"post":{"tags":["Finance controls","Remittance Change Detect"],"summary":"Check Remittance Change","operationId":"check_remittance_change_v1_vendors__reference__remittance_check_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"reference","in":"path","required":true,"schema":{"type":"string","title":"Reference"}},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemittanceChangeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemittanceChangeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/preview-requests":{"post":{"tags":["Private Preview"],"summary":"Request invite-only private-preview access","operationId":"request_preview_v1_preview_requests_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreviewRequestPayload"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreviewRequestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/preview-requests/workspace":{"post":{"tags":["Private Preview"],"summary":"Request preview access for the signed-in workspace","operationId":"request_workspace_preview_v1_preview_requests_workspace_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreviewRequestPayload"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreviewRequestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/purchase-order-extractions":{"post":{"tags":["Private Preview","Purchase Order Extract"],"summary":"Queue one private purchase-order document extraction","operationId":"create_purchase_order_extraction_v1_purchase_order_extractions_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","title":"Idempotency-Key"}},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseOrderExtractionRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseOrderExtractionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/purchase-order-extractions/{extraction_id}":{"get":{"tags":["Private Preview","Purchase Order Extract"],"summary":"Get Purchase Order Extraction","operationId":"get_purchase_order_extraction_v1_purchase_order_extractions__extraction_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"extraction_id","in":"path","required":true,"schema":{"type":"string","title":"Extraction Id"}},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseOrderExtractionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/purchase-orders/diffs":{"post":{"tags":["Private Preview","PO Amendment Diff"],"summary":"Compare two caller-owned purchase-order revisions","operationId":"diff_purchase_orders_v1_purchase_orders_diffs_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseOrderDiffRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseOrderDiffResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/erp-bill-preflights":{"post":{"tags":["Vertical preflight controls","ERP Bill Preflight"],"summary":"Preflight a NetSuite or QuickBooks bill without writing to the ERP","operationId":"preflight_erp_bill_v1_erp_bill_preflights_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ERPBillPreflightRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreflightResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/construction/subcontractor-preflights":{"post":{"tags":["Vertical preflight controls","Construction AP Control"],"summary":"Preflight a subcontractor invoice against commitment and compliance evidence","operationId":"preflight_subcontractor_invoice_v1_construction_subcontractor_preflights_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConstructionSubcontractorPreflightRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreflightResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/freight/invoice-preflights":{"post":{"tags":["Vertical preflight controls","Freight Invoice Control"],"summary":"Preflight a freight invoice against a supplied shipment quote and charge policy","operationId":"preflight_freight_invoice_v1_freight_invoice_preflights_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FreightInvoicePreflightRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreflightResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/franchises/invoice-preflights":{"post":{"tags":["Vertical preflight controls","Franchise AP Control"],"summary":"Detect cross-location duplicate invoices against a supplied franchise baseline","operationId":"preflight_franchise_invoice_v1_franchises_invoice_preflights_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FranchiseInvoicePreflightRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreflightResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/procurement/agent-preflights":{"post":{"tags":["Vertical preflight controls","Procurement Agent Safety"],"summary":"Evaluate a proposed procurement agent action against supplied deterministic policy","operationId":"preflight_procurement_agent_action_v1_procurement_agent_preflights_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProcurementAgentPreflightRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreflightResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/vendors/entity-resolutions":{"post":{"tags":["Operations controls","Vendor Entity Resolve"],"summary":"Resolve Vendor Entity","operationId":"resolve_vendor_entity_v1_vendors_entity_resolutions_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VendorEntityResolveRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreflightResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/vendors/onboarding-checks":{"post":{"tags":["Operations controls","Vendor Onboarding Check"],"summary":"Check Vendor Onboarding","operationId":"check_vendor_onboarding_v1_vendors_onboarding_checks_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VendorOnboardingCheckRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreflightResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tax-forms/checks":{"post":{"tags":["Operations controls","W-9 / Tax Form Check"],"summary":"Check Tax Form","operationId":"check_tax_form_v1_tax_forms_checks_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxFormCheckRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreflightResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/vendors/domain-risk-checks":{"post":{"tags":["Operations controls","Vendor Domain Risk"],"summary":"Check Vendor Domain","operationId":"check_vendor_domain_v1_vendors_domain_risk_checks_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VendorDomainRiskRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreflightResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/quotes/compare":{"post":{"tags":["Operations controls","Quote Compare"],"summary":"Compare Quotes","operationId":"compare_quotes_v1_quotes_compare_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteCompareRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreflightResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/contracts/obligations/extract":{"post":{"tags":["Operations controls","Contract Obligation Extract"],"summary":"Extract Contract Obligations","operationId":"extract_contract_obligations_v1_contracts_obligations_extract_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractObligationExtractRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreflightResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/certificates/expiry-checks":{"post":{"tags":["Operations controls","Certificate Expiry Check"],"summary":"Check Certificate Expiry","operationId":"check_certificate_expiry_v1_certificates_expiry_checks_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CertificateExpiryCheckRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreflightResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/remittances/match":{"post":{"tags":["Operations controls","Remittance Advice Match"],"summary":"Match Remittance Advice","operationId":"match_remittance_advice_v1_remittances_match_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemittanceAdviceMatchRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreflightResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/bank-statements/normalize":{"post":{"tags":["Operations controls","Bank Statement Normalize"],"summary":"Normalize Bank Statement","operationId":"normalize_bank_statement_v1_bank_statements_normalize_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BankStatementNormalizeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreflightResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/reconciliations/match":{"post":{"tags":["Operations controls","Reconciliation Match"],"summary":"Match Reconciliation","operationId":"match_reconciliation_v1_reconciliations_match_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReconciliationMatchRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreflightResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/marketplace/rapid/v1/invoice-validations":{"post":{"tags":["RapidAPI marketplace"],"summary":"Validate a normalized invoice before routing","description":"Run deterministic field, date, line-item, and arithmetic checks. No accounting record or payment is created.","operationId":"validateInvoice","parameters":[{"name":"X-RapidAPI-Proxy-Secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Rapidapi-Proxy-Secret"}},{"name":"X-RapidAPI-User","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Rapidapi-User"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceValidationRequest"},"examples":{"complete_invoice":{"summary":"A complete USD invoice","value":{"invoice":{"vendor_name":"Northstar Supply","invoice_number":"INV-1042","invoice_date":"2026-08-09","due_date":"2026-09-08","currency":"USD","total":"1250.00","line_items":[{"description":"Office chairs","quantity":"10","unit_price":"125.00","line_total":"1250.00"}]}}}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceValidationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/marketplace/rapid/v1/vendors/onboarding-checks":{"post":{"tags":["RapidAPI marketplace"],"summary":"Find missing supplier onboarding evidence","description":"Compare a customer-defined requirements list with supplied evidence. The result does not create or approve a vendor.","operationId":"checkVendorOnboarding","parameters":[{"name":"X-RapidAPI-Proxy-Secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Rapidapi-Proxy-Secret"}},{"name":"X-RapidAPI-User","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Rapidapi-User"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VendorOnboardingCheckRequest"},"examples":{"approved_packet":{"summary":"A complete customer-approved packet","value":{"vendor_reference":"vendor-1007","required_items":["W9","insurance_certificate","customer_approval"],"supplied_items":["W9","insurance_certificate","customer_approval"],"approved_by_customer":true,"remittance_fingerprint_present":true}}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreflightResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/marketplace/rapid/v1/vendors/domain-risk-checks":{"post":{"tags":["RapidAPI marketplace"],"summary":"Flag unexpected vendor sender domains","description":"Compare a sender address with customer-approved and previously observed domains. No message or vendor-record change is made.","operationId":"checkVendorDomainRisk","parameters":[{"name":"X-RapidAPI-Proxy-Secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Rapidapi-Proxy-Secret"}},{"name":"X-RapidAPI-User","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Rapidapi-User"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VendorDomainRiskRequest"},"examples":{"approved_domain":{"summary":"A sender on the approved domain","value":{"vendor_reference":"vendor-1007","sender_email":"ap@northstarsupply.com","approved_domains":["northstarsupply.com"],"prior_sender_domains":["northstarsupply.com"]}}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreflightResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/marketplace/rapid/v1/quotes/compare":{"post":{"tags":["RapidAPI marketplace"],"summary":"Compare customer-provided vendor quotes","description":"Calculate comparable totals and surface currency, validity, and term differences. The result never selects a vendor or creates a purchase order.","operationId":"compareQuotes","parameters":[{"name":"X-RapidAPI-Proxy-Secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Rapidapi-Proxy-Secret"}},{"name":"X-RapidAPI-User","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Rapidapi-User"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteCompareRequest"},"examples":{"two_quotes":{"summary":"Two comparable USD quotes","value":{"quotes":[{"quote_reference":"Q-100","vendor_name":"Northstar Supply","currency":"USD","lines":[{"sku":"CHAIR-01","description":"Office chair","quantity":"10","unit_price":"125.00"}],"payment_terms":"Net 30","valid_until":"2026-12-31"},{"quote_reference":"Q-101","vendor_name":"Summit Office","currency":"USD","lines":[{"sku":"CHAIR-01","description":"Office chair","quantity":"10","unit_price":"119.00"}],"payment_terms":"Net 15","valid_until":"2026-12-31"}],"expected_currency":"USD"}}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreflightResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/marketplace/rapid/v1/vendors/entity-resolutions":{"post":{"tags":["RapidAPI marketplace"],"summary":"Resolve a vendor against customer-supplied identity evidence","description":"Compare names, aliases, addresses, and approved domains without claiming official identity verification.","operationId":"resolveVendorEntity","parameters":[{"name":"X-RapidAPI-Proxy-Secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Rapidapi-Proxy-Secret"}},{"name":"X-RapidAPI-User","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Rapidapi-User"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VendorEntityResolveRequest"},"examples":{"complete_request":{"summary":"Complete customer-supplied evidence","value":{"vendor_name":"Acme, Inc.","aliases":["Acme"],"expected_name":"Acme Inc"}}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreflightResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/marketplace/rapid/v1/tax-forms/checks":{"post":{"tags":["RapidAPI marketplace"],"summary":"Check customer-supplied tax-form completeness","description":"Check W-9 or W-8 completeness using only the final four identifier digits. This is not tax advice or tax-ID verification.","operationId":"checkTaxForm","parameters":[{"name":"X-RapidAPI-Proxy-Secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Rapidapi-Proxy-Secret"}},{"name":"X-RapidAPI-User","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Rapidapi-User"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxFormCheckRequest"},"examples":{"complete_request":{"summary":"Complete customer-supplied evidence","value":{"form_type":"W9","legal_name":"Acme, Inc.","tax_identifier_last4":"1234","signed_on":"2026-01-01","entity_country":"US"}}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreflightResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/marketplace/rapid/v1/contracts/obligations/extract":{"post":{"tags":["RapidAPI marketplace"],"summary":"Find candidate commercial dates and obligation indicators","description":"Extract deterministic candidates from supplied contract text for source review. This is not legal advice.","operationId":"extractContractObligations","parameters":[{"name":"X-RapidAPI-Proxy-Secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Rapidapi-Proxy-Secret"}},{"name":"X-RapidAPI-User","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Rapidapi-User"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractObligationExtractRequest"},"examples":{"complete_request":{"summary":"Complete customer-supplied evidence","value":{"contract_reference":"C-1","contract_text":"Renewal notice is due by 2026-12-01. Payment terms apply."}}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreflightResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/marketplace/rapid/v1/certificates/expiry-checks":{"post":{"tags":["RapidAPI marketplace"],"summary":"Check customer-provided certificate expiry metadata","description":"Flag expired, expiring, or unreviewed certificate metadata without claiming authenticity or coverage verification.","operationId":"checkCertificateExpiry","parameters":[{"name":"X-RapidAPI-Proxy-Secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Rapidapi-Proxy-Secret"}},{"name":"X-RapidAPI-User","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Rapidapi-User"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CertificateExpiryCheckRequest"},"examples":{"complete_request":{"summary":"Complete customer-supplied evidence","value":{"vendor_reference":"acme","certificates":[{"certificate_reference":"COI-1","certificate_type":"Insurance","expires_on":"2027-12-31","verified_by_customer":true}]}}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreflightResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/marketplace/rapid/v1/remittances/match":{"post":{"tags":["RapidAPI marketplace"],"summary":"Match remittance advice to supplied open invoices","description":"Return exact customer-evidence candidates without posting a payment or accounting entry.","operationId":"matchRemittanceAdvice","parameters":[{"name":"X-RapidAPI-Proxy-Secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Rapidapi-Proxy-Secret"}},{"name":"X-RapidAPI-User","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Rapidapi-User"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemittanceAdviceMatchRequest"},"examples":{"complete_request":{"summary":"Complete customer-supplied evidence","value":{"remittance_reference":"REM-1","remitted_amount":"25.00","invoice_references":["INV-1"],"open_invoices":[{"invoice_reference":"INV-1","open_amount":"25.00"}]}}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreflightResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/marketplace/rapid/v1/bank-statements/normalize":{"post":{"tags":["RapidAPI marketplace"],"summary":"Normalize customer-provided statement transactions","description":"Create canonical transaction records for reconciliation without connecting to a bank.","operationId":"normalizeBankStatement","parameters":[{"name":"X-RapidAPI-Proxy-Secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Rapidapi-Proxy-Secret"}},{"name":"X-RapidAPI-User","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Rapidapi-User"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BankStatementNormalizeRequest"},"examples":{"complete_request":{"summary":"Complete customer-supplied evidence","value":{"account_reference":"acct-fingerprint-1","transactions":[{"transaction_reference":"TX-1","posted_on":"2026-08-01","amount":"-25.00","description":"Acme payment"}]}}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreflightResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/marketplace/rapid/v1/reconciliations/match":{"post":{"tags":["RapidAPI marketplace"],"summary":"Match customer-provided reconciliation records","description":"Return deterministic one-to-one candidates without posting a reconciliation.","operationId":"matchReconciliation","parameters":[{"name":"X-RapidAPI-Proxy-Secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Rapidapi-Proxy-Secret"}},{"name":"X-RapidAPI-User","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Rapidapi-User"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReconciliationMatchRequest"},"examples":{"complete_request":{"summary":"Complete customer-supplied evidence","value":{"source_records":[{"record_reference":"A","amount":"25.00","posted_on":"2026-08-01","counterparty":"Acme"}],"target_records":[{"record_reference":"B","amount":"25.00","posted_on":"2026-08-02","counterparty":"Acme"}]}}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreflightResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/marketplace/rapid/v1/erp-bill-preflights":{"post":{"tags":["RapidAPI marketplace"],"summary":"Preflight a NetSuite or QuickBooks bill","description":"Check supplied bill mappings and approval evidence without connecting to or writing to an ERP.","operationId":"preflightErpBill","parameters":[{"name":"X-RapidAPI-Proxy-Secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Rapidapi-Proxy-Secret"}},{"name":"X-RapidAPI-User","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Rapidapi-User"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ERPBillPreflightRequest"},"examples":{"complete_request":{"summary":"Complete customer-supplied evidence","value":{"erp":"NETSUITE","invoice":{"vendor_name":"Acme","invoice_number":"INV-100","currency":"USD","total":"125.00"},"vendor_reference":"vendor-42","source_record_id":"intake-100"}}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreflightResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/marketplace/rapid/v1/construction/subcontractor-preflights":{"post":{"tags":["RapidAPI marketplace"],"summary":"Preflight a construction subcontractor invoice","description":"Check supplied commitment, retainage, work, waiver, and insurance evidence without making a project or accounting write.","operationId":"preflightSubcontractorInvoice","parameters":[{"name":"X-RapidAPI-Proxy-Secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Rapidapi-Proxy-Secret"}},{"name":"X-RapidAPI-User","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Rapidapi-User"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConstructionSubcontractorPreflightRequest"},"examples":{"complete_request":{"summary":"Complete customer-supplied evidence","value":{"invoice":{"vendor_name":"Acme Subcontracting","invoice_number":"APP-7","currency":"USD","total":"10000.00"},"project_reference":"JOB-42","subcontract_reference":"SUB-11","approved_contract_amount":"100000.00","current_application_amount":"10000.00","schedule_of_values_matched":true,"work_completed_verified":true}}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreflightResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/marketplace/rapid/v1/freight/invoice-preflights":{"post":{"tags":["RapidAPI marketplace"],"summary":"Preflight a freight invoice","description":"Check supplied shipment, quote, delivery, fuel, and accessorial evidence without connecting to a carrier or TMS.","operationId":"preflightFreightInvoice","parameters":[{"name":"X-RapidAPI-Proxy-Secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Rapidapi-Proxy-Secret"}},{"name":"X-RapidAPI-User","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Rapidapi-User"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FreightInvoicePreflightRequest"},"examples":{"complete_request":{"summary":"Complete customer-supplied evidence","value":{"invoice":{"vendor_name":"Northstar Freight","invoice_number":"FRT-1","currency":"USD","total":"80.00"},"shipment_reference":"PRO-100","carrier_scac":"ABCD","quoted_linehaul":"80.00","invoiced_linehaul":"80.00","shipment_delivered":true}}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreflightResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/marketplace/rapid/v1/franchises/invoice-preflights":{"post":{"tags":["RapidAPI marketplace"],"summary":"Check a franchise invoice for cross-location duplicates","description":"Compare one invoice with a customer-supplied location history without searching another customer's records.","operationId":"preflightFranchiseInvoice","parameters":[{"name":"X-RapidAPI-Proxy-Secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Rapidapi-Proxy-Secret"}},{"name":"X-RapidAPI-User","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Rapidapi-User"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FranchiseInvoicePreflightRequest"},"examples":{"complete_request":{"summary":"Complete customer-supplied evidence","value":{"invoice":{"vendor_name":"Acme","invoice_number":"INV-7","currency":"USD","total":"100.00"},"location_reference":"DEN-01","vendor_reference":"acme","historical_invoices":[]}}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreflightResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/marketplace/rapid/v1/procurement/agent-preflights":{"post":{"tags":["RapidAPI marketplace"],"summary":"Check a proposed procurement-agent action","description":"Evaluate supplied policy evidence before the caller invokes its own authorized downstream system.","operationId":"preflightProcurementAgentAction","parameters":[{"name":"X-RapidAPI-Proxy-Secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Rapidapi-Proxy-Secret"}},{"name":"X-RapidAPI-User","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Rapidapi-User"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProcurementAgentPreflightRequest"},"examples":{"complete_request":{"summary":"Complete customer-supplied evidence","value":{"agent_id":"buyer-agent","action":"CREATE_PURCHASE_ORDER","category":"supplies","amount":"250.00","budget_available":true,"requester_authorized":true,"vendor_approved":true,"contract_reference":"MSA-1"}}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreflightResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"APIKeyRequest":{"properties":{"name":{"type":"string","maxLength":120,"minLength":1,"title":"Name"},"scopes":{"items":{"type":"string","enum":["invoices:read","invoices:write","webhooks:write"]},"type":"array","title":"Scopes"}},"type":"object","required":["name"],"title":"APIKeyRequest"},"APIKeyResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"prefix":{"type":"string","title":"Prefix"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes"},"secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secret"}},"type":"object","required":["id","name","prefix","scopes"],"title":"APIKeyResponse"},"BankStatementNormalizeRequest":{"properties":{"account_reference":{"type":"string","maxLength":120,"minLength":1,"title":"Account Reference"},"transactions":{"items":{"$ref":"#/components/schemas/BankStatementTransaction"},"type":"array","maxItems":1000,"minItems":1,"title":"Transactions"}},"type":"object","required":["account_reference","transactions"],"title":"BankStatementNormalizeRequest"},"BankStatementTransaction":{"properties":{"transaction_reference":{"type":"string","maxLength":120,"minLength":1,"title":"Transaction Reference"},"posted_on":{"type":"string","format":"date","title":"Posted On"},"amount":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*(?:\\d{0,12}|(?=[\\d.]{1,15}0*$)\\d{0,12}\\.\\d{0,2}0*$)"}],"title":"Amount"},"currency":{"type":"string","maxLength":3,"minLength":3,"title":"Currency","default":"USD"},"description":{"type":"string","maxLength":1000,"minLength":1,"title":"Description"},"counterparty":{"anyOf":[{"type":"string","maxLength":250},{"type":"null"}],"title":"Counterparty"}},"type":"object","required":["transaction_reference","posted_on","amount","description"],"title":"BankStatementTransaction"},"CertificateExpiryCheckRequest":{"properties":{"vendor_reference":{"type":"string","maxLength":120,"minLength":1,"title":"Vendor Reference"},"certificates":{"items":{"$ref":"#/components/schemas/CertificateRecord"},"type":"array","maxItems":100,"minItems":1,"title":"Certificates"},"as_of_date":{"type":"string","format":"date","title":"As Of Date"},"warning_days":{"type":"integer","maximum":365.0,"minimum":1.0,"title":"Warning Days","default":30}},"type":"object","required":["vendor_reference","certificates"],"title":"CertificateExpiryCheckRequest"},"CertificateRecord":{"properties":{"certificate_reference":{"type":"string","maxLength":120,"minLength":1,"title":"Certificate Reference"},"certificate_type":{"type":"string","maxLength":120,"minLength":1,"title":"Certificate Type"},"expires_on":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Expires On"},"verified_by_customer":{"type":"boolean","title":"Verified By Customer","default":false}},"type":"object","required":["certificate_reference","certificate_type"],"title":"CertificateRecord"},"ConstructionSubcontractorPreflightRequest":{"properties":{"invoice":{"$ref":"#/components/schemas/InvoiceFields-Input"},"project_reference":{"type":"string","maxLength":120,"minLength":1,"title":"Project Reference"},"subcontract_reference":{"type":"string","maxLength":120,"minLength":1,"title":"Subcontract Reference"},"approved_contract_amount":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*(?:\\d{0,12}|(?=[\\d.]{1,15}0*$)\\d{0,12}\\.\\d{0,2}0*$)"}],"title":"Approved Contract Amount"},"approved_change_order_amount":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*(?:\\d{0,12}|(?=[\\d.]{1,15}0*$)\\d{0,12}\\.\\d{0,2}0*$)"}],"title":"Approved Change Order Amount","default":"0"},"billed_to_date":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*(?:\\d{0,12}|(?=[\\d.]{1,15}0*$)\\d{0,12}\\.\\d{0,2}0*$)"}],"title":"Billed To Date","default":"0"},"current_application_amount":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*(?:\\d{0,12}|(?=[\\d.]{1,15}0*$)\\d{0,12}\\.\\d{0,2}0*$)"}],"title":"Current Application Amount"},"retainage_rate":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*(?:\\d{0,1}|(?=[\\d.]{1,6}0*$)\\d{0,1}\\.\\d{0,4}0*$)"}],"title":"Retainage Rate","default":"0"},"retainage_withheld":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*(?:\\d{0,12}|(?=[\\d.]{1,15}0*$)\\d{0,12}\\.\\d{0,2}0*$)"}],"title":"Retainage Withheld","default":"0"},"schedule_of_values_matched":{"type":"boolean","title":"Schedule Of Values Matched"},"work_completed_verified":{"type":"boolean","title":"Work Completed Verified"},"lien_waiver_status":{"type":"string","enum":["CONDITIONAL","UNCONDITIONAL","MISSING","NOT_REQUIRED"],"title":"Lien Waiver Status","default":"MISSING"},"insurance_status":{"type":"string","enum":["VALID","EXPIRED","MISSING","NOT_REQUIRED"],"title":"Insurance Status","default":"MISSING"}},"type":"object","required":["invoice","project_reference","subcontract_reference","approved_contract_amount","current_application_amount","schedule_of_values_matched","work_completed_verified"],"title":"ConstructionSubcontractorPreflightRequest"},"ContractObligationExtractRequest":{"properties":{"contract_reference":{"type":"string","maxLength":120,"minLength":1,"title":"Contract Reference"},"contract_text":{"type":"string","maxLength":100000,"minLength":20,"title":"Contract Text"},"as_of_date":{"type":"string","format":"date","title":"As Of Date"},"lookahead_days":{"type":"integer","maximum":365.0,"minimum":1.0,"title":"Lookahead Days","default":90}},"type":"object","required":["contract_reference","contract_text"],"title":"ContractObligationExtractRequest"},"DocumentDownloadResponse":{"properties":{"invoice_id":{"type":"string","title":"Invoice Id"},"download_url":{"type":"string","title":"Download Url"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"}},"type":"object","required":["invoice_id","download_url","expires_at"],"title":"DocumentDownloadResponse"},"ERPBillPreflightRequest":{"properties":{"erp":{"type":"string","enum":["NETSUITE","QUICKBOOKS"],"title":"Erp"},"invoice":{"$ref":"#/components/schemas/InvoiceFields-Input"},"vendor_reference":{"type":"string","maxLength":120,"minLength":1,"title":"Vendor Reference"},"source_record_id":{"type":"string","maxLength":120,"minLength":1,"title":"Source Record Id"},"purchase_order_reference":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Purchase Order Reference"},"expected_vendor_reference":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Expected Vendor Reference"},"expected_currency":{"anyOf":[{"type":"string","maxLength":3,"minLength":3},{"type":"null"}],"title":"Expected Currency"},"existing_bill_reference":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Existing Bill Reference"},"approval_required_above":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*(?:\\d{0,12}|(?=[\\d.]{1,15}0*$)\\d{0,12}\\.\\d{0,2}0*$)"},{"type":"null"}],"title":"Approval Required Above"},"approval_present":{"type":"boolean","title":"Approval Present","default":false}},"type":"object","required":["erp","invoice","vendor_reference","source_record_id"],"title":"ERPBillPreflightRequest"},"ExceptionResponse":{"properties":{"code":{"type":"string","title":"Code"},"severity":{"type":"string","title":"Severity"},"retryable":{"type":"boolean","title":"Retryable"},"message":{"type":"string","title":"Message"},"suggested_next_action":{"type":"string","title":"Suggested Next Action"},"evidence":{"additionalProperties":true,"type":"object","title":"Evidence"},"matched_invoice":{"anyOf":[{"$ref":"#/components/schemas/MatchedInvoice"},{"type":"null"}]}},"type":"object","required":["code","severity","retryable","message","suggested_next_action"],"title":"ExceptionResponse"},"FranchiseHistoryInvoice":{"properties":{"location_reference":{"type":"string","maxLength":120,"minLength":1,"title":"Location Reference"},"vendor_reference":{"type":"string","maxLength":120,"minLength":1,"title":"Vendor Reference"},"invoice_number":{"type":"string","maxLength":120,"minLength":1,"title":"Invoice Number"},"currency":{"type":"string","maxLength":3,"minLength":3,"title":"Currency","default":"USD"},"total":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*(?:\\d{0,12}|(?=[\\d.]{1,15}0*$)\\d{0,12}\\.\\d{0,2}0*$)"}],"title":"Total"}},"type":"object","required":["location_reference","vendor_reference","invoice_number","total"],"title":"FranchiseHistoryInvoice"},"FranchiseInvoicePreflightRequest":{"properties":{"invoice":{"$ref":"#/components/schemas/InvoiceFields-Input"},"location_reference":{"type":"string","maxLength":120,"minLength":1,"title":"Location Reference"},"vendor_reference":{"type":"string","maxLength":120,"minLength":1,"title":"Vendor Reference"},"approved_vendor_references":{"items":{"type":"string"},"type":"array","maxItems":500,"title":"Approved Vendor References"},"historical_invoices":{"items":{"$ref":"#/components/schemas/FranchiseHistoryInvoice"},"type":"array","maxItems":500,"title":"Historical Invoices"},"location_open":{"type":"boolean","title":"Location Open","default":true}},"type":"object","required":["invoice","location_reference","vendor_reference"],"title":"FranchiseInvoicePreflightRequest"},"FreightCharge":{"properties":{"code":{"type":"string","maxLength":80,"minLength":1,"title":"Code"},"amount":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*(?:\\d{0,12}|(?=[\\d.]{1,15}0*$)\\d{0,12}\\.\\d{0,2}0*$)"}],"title":"Amount"}},"type":"object","required":["code","amount"],"title":"FreightCharge"},"FreightInvoicePreflightRequest":{"properties":{"invoice":{"$ref":"#/components/schemas/InvoiceFields-Input"},"shipment_reference":{"type":"string","maxLength":120,"minLength":1,"title":"Shipment Reference"},"carrier_scac":{"type":"string","maxLength":20,"minLength":2,"title":"Carrier Scac"},"quoted_linehaul":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*(?:\\d{0,12}|(?=[\\d.]{1,15}0*$)\\d{0,12}\\.\\d{0,2}0*$)"}],"title":"Quoted Linehaul"},"invoiced_linehaul":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*(?:\\d{0,12}|(?=[\\d.]{1,15}0*$)\\d{0,12}\\.\\d{0,2}0*$)"}],"title":"Invoiced Linehaul"},"quoted_fuel_surcharge":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*(?:\\d{0,12}|(?=[\\d.]{1,15}0*$)\\d{0,12}\\.\\d{0,2}0*$)"}],"title":"Quoted Fuel Surcharge","default":"0"},"invoiced_fuel_surcharge":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*(?:\\d{0,12}|(?=[\\d.]{1,15}0*$)\\d{0,12}\\.\\d{0,2}0*$)"}],"title":"Invoiced Fuel Surcharge","default":"0"},"allowed_accessorials":{"items":{"$ref":"#/components/schemas/FreightCharge"},"type":"array","maxItems":100,"title":"Allowed Accessorials"},"invoiced_accessorials":{"items":{"$ref":"#/components/schemas/FreightCharge"},"type":"array","maxItems":100,"title":"Invoiced Accessorials"},"shipment_delivered":{"type":"boolean","title":"Shipment Delivered"},"duplicate_shipment_invoice":{"type":"boolean","title":"Duplicate Shipment Invoice","default":false}},"type":"object","required":["invoice","shipment_reference","carrier_scac","quoted_linehaul","invoiced_linehaul","shipment_delivered"],"title":"FreightInvoicePreflightRequest"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ImportRequest":{"properties":{"invoices":{"items":{"$ref":"#/components/schemas/ImportRow"},"type":"array","maxItems":5000,"minItems":1,"title":"Invoices"}},"type":"object","required":["invoices"],"title":"ImportRequest"},"ImportResponse":{"properties":{"imported":{"type":"integer","title":"Imported"},"skipped":{"type":"integer","title":"Skipped"}},"type":"object","required":["imported","skipped"],"title":"ImportResponse"},"ImportRow":{"properties":{"vendor_name":{"type":"string","maxLength":250,"minLength":1,"title":"Vendor Name"},"invoice_number":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Invoice Number"},"invoice_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Invoice Date"},"due_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Due Date"},"currency":{"type":"string","maxLength":3,"minLength":3,"title":"Currency","default":"USD"},"total":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*(?:\\d{0,12}|(?=[\\d.]{1,15}0*$)\\d{0,12}\\.\\d{0,2}0*$)"}],"title":"Total"},"line_items":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Line Items"},"document_sha256":{"anyOf":[{"type":"string","pattern":"^[a-fA-F0-9]{64}$"},{"type":"null"}],"title":"Document Sha256"},"external_id":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"External Id"}},"type":"object","required":["vendor_name","total"],"title":"ImportRow"},"InvoiceCreateRequest":{"properties":{"upload_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Upload Id"},"invoice":{"anyOf":[{"$ref":"#/components/schemas/InvoiceFields-Input"},{"type":"null"}]}},"type":"object","title":"InvoiceCreateRequest"},"InvoiceExtractionResponse":{"properties":{"invoice_id":{"type":"string","title":"Invoice Id"},"status":{"type":"string","title":"Status"},"fields":{"anyOf":[{"$ref":"#/components/schemas/InvoiceFields-Output"},{"type":"null"}]},"confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Confidence"},"evidence":{"additionalProperties":true,"type":"object","title":"Evidence"},"next_action":{"type":"string","title":"Next Action"}},"type":"object","required":["invoice_id","status","next_action"],"title":"InvoiceExtractionResponse"},"InvoiceFields-Input":{"properties":{"vendor_name":{"type":"string","maxLength":250,"minLength":1,"title":"Vendor Name"},"invoice_number":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Invoice Number"},"invoice_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Invoice Date"},"due_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Due Date"},"currency":{"type":"string","maxLength":3,"minLength":3,"title":"Currency","default":"USD"},"total":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*(?:\\d{0,12}|(?=[\\d.]{1,15}0*$)\\d{0,12}\\.\\d{0,2}0*$)"}],"title":"Total"},"line_items":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Line Items"},"document_sha256":{"anyOf":[{"type":"string","pattern":"^[a-fA-F0-9]{64}$"},{"type":"null"}],"title":"Document Sha256"}},"type":"object","required":["vendor_name","total"],"title":"InvoiceFields"},"InvoiceFields-Output":{"properties":{"vendor_name":{"type":"string","maxLength":250,"minLength":1,"title":"Vendor Name"},"invoice_number":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Invoice Number"},"invoice_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Invoice Date"},"due_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Due Date"},"currency":{"type":"string","maxLength":3,"minLength":3,"title":"Currency","default":"USD"},"total":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*(?:\\d{0,12}|(?=[\\d.]{1,15}0*$)\\d{0,12}\\.\\d{0,2}0*$)","title":"Total"},"line_items":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Line Items"},"document_sha256":{"anyOf":[{"type":"string","pattern":"^[a-fA-F0-9]{64}$"},{"type":"null"}],"title":"Document Sha256"}},"type":"object","required":["vendor_name","total"],"title":"InvoiceFields"},"InvoiceHistoryMatch":{"properties":{"invoice_id":{"type":"string","title":"Invoice Id"},"invoice_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invoice Number"},"vendor_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vendor Name"},"total":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Total"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency"},"invoice_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Invoice Date"},"score":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Score"},"basis":{"type":"string","title":"Basis"}},"type":"object","required":["invoice_id","invoice_number","vendor_name","total","currency","invoice_date","score","basis"],"title":"InvoiceHistoryMatch"},"InvoiceHistorySearchRequest":{"properties":{"invoice":{"$ref":"#/components/schemas/InvoiceFields-Input"},"limit":{"type":"integer","maximum":20.0,"minimum":1.0,"title":"Limit","default":10}},"type":"object","required":["invoice"],"title":"InvoiceHistorySearchRequest"},"InvoiceHistorySearchResponse":{"properties":{"matches":{"items":{"$ref":"#/components/schemas/InvoiceHistoryMatch"},"type":"array","title":"Matches"},"next_action":{"type":"string","title":"Next Action"}},"type":"object","required":["matches","next_action"],"title":"InvoiceHistorySearchResponse"},"InvoiceLineNormalizeRequest":{"properties":{"line_items":{"items":{"additionalProperties":true,"type":"object"},"type":"array","maxItems":500,"minItems":1,"title":"Line Items"}},"type":"object","required":["line_items"],"title":"InvoiceLineNormalizeRequest"},"InvoiceLineNormalizeResponse":{"properties":{"status":{"type":"string","const":"COMPLETED","title":"Status","default":"COMPLETED"},"line_items":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Line Items"},"issues":{"items":{"$ref":"#/components/schemas/ExceptionResponse"},"type":"array","title":"Issues"},"next_action":{"type":"string","title":"Next Action"}},"type":"object","required":["line_items","next_action"],"title":"InvoiceLineNormalizeResponse"},"InvoiceResponse":{"properties":{"id":{"type":"string","title":"Id"},"status":{"type":"string","title":"Status"},"decision":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decision"},"source_type":{"type":"string","title":"Source Type"},"vendor_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vendor Name"},"invoice_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invoice Number"},"total":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Total"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency"},"confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Confidence"},"duplicate_score":{"type":"number","title":"Duplicate Score"},"extraction":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Extraction"},"exceptions":{"items":{"$ref":"#/components/schemas/ExceptionResponse"},"type":"array","title":"Exceptions"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"}},"type":"object","required":["id","status","decision","source_type","vendor_name","invoice_number","total","currency","confidence","duplicate_score","extraction","created_at","completed_at"],"title":"InvoiceResponse"},"InvoiceRiskResponse":{"properties":{"invoice_id":{"type":"string","title":"Invoice Id"},"score":{"type":"integer","maximum":100.0,"minimum":0.0,"title":"Score"},"band":{"type":"string","enum":["LOW","MEDIUM","HIGH","CRITICAL"],"title":"Band"},"decision":{"type":"string","enum":["CLEAR","REVIEW_REQUIRED","BLOCKED"],"title":"Decision"},"signals":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Signals"},"evidence":{"additionalProperties":true,"type":"object","title":"Evidence"},"next_action":{"type":"string","title":"Next Action"}},"type":"object","required":["invoice_id","score","band","decision","signals","evidence","next_action"],"title":"InvoiceRiskResponse"},"InvoiceValidationRequest":{"properties":{"invoice":{"$ref":"#/components/schemas/InvoiceFields-Input"}},"type":"object","required":["invoice"],"title":"InvoiceValidationRequest"},"InvoiceValidationResponse":{"properties":{"status":{"type":"string","const":"COMPLETED","title":"Status","default":"COMPLETED"},"decision":{"type":"string","enum":["CLEAR","REVIEW_REQUIRED"],"title":"Decision"},"exceptions":{"items":{"$ref":"#/components/schemas/ExceptionResponse"},"type":"array","title":"Exceptions"},"confidence":{"type":"number","title":"Confidence","default":1.0},"next_action":{"type":"string","title":"Next Action"}},"type":"object","required":["decision","next_action"],"title":"InvoiceValidationResponse"},"MatchLine-Input":{"properties":{"sku":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Sku"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"quantity":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*(?:\\d{0,11}|(?=[\\d.]{1,15}0*$)\\d{0,11}\\.\\d{0,3}0*$)"}],"title":"Quantity"},"unit_price":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*(?:\\d{0,10}|(?=[\\d.]{1,15}0*$)\\d{0,10}\\.\\d{0,4}0*$)"}],"title":"Unit Price"}},"type":"object","required":["quantity","unit_price"],"title":"MatchLine"},"MatchLine-Output":{"properties":{"sku":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Sku"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"quantity":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*(?:\\d{0,11}|(?=[\\d.]{1,15}0*$)\\d{0,11}\\.\\d{0,3}0*$)","title":"Quantity"},"unit_price":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*(?:\\d{0,10}|(?=[\\d.]{1,15}0*$)\\d{0,10}\\.\\d{0,4}0*$)","title":"Unit Price"}},"type":"object","required":["quantity","unit_price"],"title":"MatchLine"},"MatchRequest":{"properties":{"purchase_order_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Purchase Order Id"},"purchase_order_number":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Purchase Order Number"},"mode":{"type":"string","enum":["TWO_WAY","THREE_WAY"],"title":"Mode","default":"THREE_WAY"}},"type":"object","title":"MatchRequest"},"MatchResponse":{"properties":{"id":{"type":"string","title":"Id"},"invoice_id":{"type":"string","title":"Invoice Id"},"purchase_order_id":{"type":"string","title":"Purchase Order Id"},"purchase_order_number":{"type":"string","title":"Purchase Order Number"},"mode":{"type":"string","title":"Mode"},"decision":{"type":"string","title":"Decision"},"line_results":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Line Results"},"exceptions":{"items":{"$ref":"#/components/schemas/ExceptionResponse"},"type":"array","title":"Exceptions"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","invoice_id","purchase_order_id","purchase_order_number","mode","decision","line_results","exceptions","created_at"],"title":"MatchResponse"},"MatchedInvoice":{"properties":{"invoice_id":{"type":"string","title":"Invoice Id"},"invoice_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invoice Number"},"vendor_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vendor Name"},"total":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Total"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency"},"invoice_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Invoice Date"}},"type":"object","required":["invoice_id","invoice_number","vendor_name","total","currency","invoice_date"],"title":"MatchedInvoice"},"OpenInvoiceRecord":{"properties":{"invoice_reference":{"type":"string","maxLength":120,"minLength":1,"title":"Invoice Reference"},"vendor_reference":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Vendor Reference"},"currency":{"type":"string","maxLength":3,"minLength":3,"title":"Currency","default":"USD"},"open_amount":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*(?:\\d{0,12}|(?=[\\d.]{1,15}0*$)\\d{0,12}\\.\\d{0,2}0*$)"}],"title":"Open Amount"}},"type":"object","required":["invoice_reference","open_amount"],"title":"OpenInvoiceRecord"},"OrganizationRequest":{"properties":{"name":{"type":"string","maxLength":160,"minLength":2,"title":"Name"}},"type":"object","required":["name"],"title":"OrganizationRequest"},"OrganizationResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"retention_days":{"type":"integer","title":"Retention Days"}},"type":"object","required":["id","name","retention_days"],"title":"OrganizationResponse"},"PreflightResponse":{"properties":{"product":{"type":"string","title":"Product"},"status":{"type":"string","const":"COMPLETED","title":"Status","default":"COMPLETED"},"decision":{"type":"string","enum":["CLEAR","REVIEW_REQUIRED","BLOCKED"],"title":"Decision"},"exceptions":{"items":{"$ref":"#/components/schemas/ExceptionResponse"},"type":"array","title":"Exceptions"},"evidence":{"additionalProperties":true,"type":"object","title":"Evidence"},"next_action":{"type":"string","title":"Next Action"}},"type":"object","required":["product","decision","next_action"],"title":"PreflightResponse"},"PreviewRequestPayload":{"properties":{"email":{"type":"string","maxLength":320,"minLength":5,"title":"Email"},"company":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}],"title":"Company"},"products":{"items":{"type":"string","enum":["invoice-line-normalize","invoice-risk-score","purchase-order-extract","po-amendment-diff"]},"type":"array","maxItems":4,"minItems":1,"title":"Products"},"use_case":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Use Case"},"website":{"type":"string","maxLength":200,"title":"Website","default":""}},"type":"object","required":["email","products"],"title":"PreviewRequestPayload"},"PreviewRequestResponse":{"properties":{"accepted":{"type":"boolean","title":"Accepted","default":true},"message":{"type":"string","title":"Message","default":"Thanks. We will review your private-preview request."}},"type":"object","title":"PreviewRequestResponse"},"ProcurementAgentPreflightRequest":{"properties":{"agent_id":{"type":"string","maxLength":120,"minLength":1,"title":"Agent Id"},"action":{"type":"string","enum":["CREATE_PURCHASE_REQUISITION","CREATE_PURCHASE_ORDER","SEND_RFQ","UPDATE_VENDOR","RELEASE_PAYMENT"],"title":"Action"},"vendor_reference":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Vendor Reference"},"category":{"type":"string","maxLength":120,"minLength":1,"title":"Category"},"amount":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*(?:\\d{0,12}|(?=[\\d.]{1,15}0*$)\\d{0,12}\\.\\d{0,2}0*$)"}],"title":"Amount"},"currency":{"type":"string","maxLength":3,"minLength":3,"title":"Currency","default":"USD"},"budget_available":{"type":"boolean","title":"Budget Available"},"requester_authorized":{"type":"boolean","title":"Requester Authorized"},"vendor_approved":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Vendor Approved"},"contract_reference":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Contract Reference"},"approval_required_above":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*(?:\\d{0,12}|(?=[\\d.]{1,15}0*$)\\d{0,12}\\.\\d{0,2}0*$)"}],"title":"Approval Required Above","default":"0"},"approval_present":{"type":"boolean","title":"Approval Present","default":false},"restricted_categories":{"items":{"type":"string"},"type":"array","maxItems":100,"title":"Restricted Categories"}},"type":"object","required":["agent_id","action","category","amount","budget_available","requester_authorized"],"title":"ProcurementAgentPreflightRequest"},"PurchaseOrderDiffRequest":{"properties":{"before_purchase_order_id":{"type":"string","title":"Before Purchase Order Id"},"after_purchase_order_id":{"type":"string","title":"After Purchase Order Id"}},"type":"object","required":["before_purchase_order_id","after_purchase_order_id"],"title":"PurchaseOrderDiffRequest"},"PurchaseOrderDiffResponse":{"properties":{"decision":{"type":"string","enum":["CLEAR","REVIEW_REQUIRED"],"title":"Decision"},"changes":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Changes"},"evidence":{"additionalProperties":true,"type":"object","title":"Evidence"},"next_action":{"type":"string","title":"Next Action"}},"type":"object","required":["decision","changes","evidence","next_action"],"title":"PurchaseOrderDiffResponse"},"PurchaseOrderExtractionRequest":{"properties":{"upload_id":{"type":"string","title":"Upload Id"}},"type":"object","required":["upload_id"],"title":"PurchaseOrderExtractionRequest"},"PurchaseOrderExtractionResponse":{"properties":{"id":{"type":"string","title":"Id"},"status":{"type":"string","enum":["QUEUED","PROCESSING","COMPLETED","FAILED"],"title":"Status"},"fields":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Fields"},"evidence":{"additionalProperties":true,"type":"object","title":"Evidence"},"confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Confidence"},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"next_action":{"type":"string","title":"Next Action"}},"type":"object","required":["id","status","next_action"],"title":"PurchaseOrderExtractionResponse"},"PurchaseOrderRequest":{"properties":{"po_number":{"type":"string","maxLength":120,"minLength":1,"title":"Po Number"},"vendor_name":{"type":"string","maxLength":250,"minLength":1,"title":"Vendor Name"},"currency":{"type":"string","maxLength":3,"minLength":3,"title":"Currency","default":"USD"},"lines":{"items":{"$ref":"#/components/schemas/MatchLine-Input"},"type":"array","maxItems":500,"minItems":1,"title":"Lines"},"revision_label":{"type":"string","maxLength":120,"minLength":1,"title":"Revision Label","default":"CURRENT"},"terms":{"additionalProperties":true,"type":"object","title":"Terms"},"source_extraction_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Extraction Id"}},"type":"object","required":["po_number","vendor_name","lines"],"title":"PurchaseOrderRequest"},"PurchaseOrderResponse":{"properties":{"po_number":{"type":"string","maxLength":120,"minLength":1,"title":"Po Number"},"vendor_name":{"type":"string","maxLength":250,"minLength":1,"title":"Vendor Name"},"currency":{"type":"string","maxLength":3,"minLength":3,"title":"Currency","default":"USD"},"lines":{"items":{"$ref":"#/components/schemas/MatchLine-Output"},"type":"array","maxItems":500,"minItems":1,"title":"Lines"},"revision_label":{"type":"string","maxLength":120,"minLength":1,"title":"Revision Label","default":"CURRENT"},"terms":{"additionalProperties":true,"type":"object","title":"Terms"},"source_extraction_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Extraction Id"},"id":{"type":"string","title":"Id"},"status":{"type":"string","title":"Status"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["po_number","vendor_name","lines","id","status","created_at"],"title":"PurchaseOrderResponse"},"QuoteCompareRequest":{"properties":{"quotes":{"items":{"$ref":"#/components/schemas/VendorQuote"},"type":"array","maxItems":25,"minItems":2,"title":"Quotes"},"expected_currency":{"anyOf":[{"type":"string","maxLength":3,"minLength":3},{"type":"null"}],"title":"Expected Currency"}},"type":"object","required":["quotes"],"title":"QuoteCompareRequest"},"QuoteLine":{"properties":{"sku":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Sku"},"description":{"type":"string","maxLength":500,"minLength":1,"title":"Description"},"quantity":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*(?:\\d{0,11}|(?=[\\d.]{1,15}0*$)\\d{0,11}\\.\\d{0,3}0*$)"}],"title":"Quantity"},"unit_price":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*(?:\\d{0,12}|(?=[\\d.]{1,15}0*$)\\d{0,12}\\.\\d{0,2}0*$)"}],"title":"Unit Price"}},"type":"object","required":["description","quantity","unit_price"],"title":"QuoteLine"},"ReceiptRequest":{"properties":{"purchase_order_id":{"type":"string","title":"Purchase Order Id"},"receipt_number":{"type":"string","maxLength":120,"minLength":1,"title":"Receipt Number"},"lines":{"items":{"$ref":"#/components/schemas/MatchLine-Input"},"type":"array","maxItems":500,"minItems":1,"title":"Lines"},"received_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Received At"}},"type":"object","required":["purchase_order_id","receipt_number","lines"],"title":"ReceiptRequest"},"ReceiptResponse":{"properties":{"purchase_order_id":{"type":"string","title":"Purchase Order Id"},"receipt_number":{"type":"string","maxLength":120,"minLength":1,"title":"Receipt Number"},"lines":{"items":{"$ref":"#/components/schemas/MatchLine-Output"},"type":"array","maxItems":500,"minItems":1,"title":"Lines"},"received_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Received At"},"id":{"type":"string","title":"Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["purchase_order_id","receipt_number","lines","id","created_at"],"title":"ReceiptResponse"},"ReconciliationMatchRequest":{"properties":{"source_records":{"items":{"$ref":"#/components/schemas/ReconciliationRecord"},"type":"array","maxItems":500,"minItems":1,"title":"Source Records"},"target_records":{"items":{"$ref":"#/components/schemas/ReconciliationRecord"},"type":"array","maxItems":500,"minItems":1,"title":"Target Records"},"date_tolerance_days":{"type":"integer","maximum":31.0,"minimum":0.0,"title":"Date Tolerance Days","default":3}},"type":"object","required":["source_records","target_records"],"title":"ReconciliationMatchRequest"},"ReconciliationRecord":{"properties":{"record_reference":{"type":"string","maxLength":120,"minLength":1,"title":"Record Reference"},"amount":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*(?:\\d{0,12}|(?=[\\d.]{1,15}0*$)\\d{0,12}\\.\\d{0,2}0*$)"}],"title":"Amount"},"currency":{"type":"string","maxLength":3,"minLength":3,"title":"Currency","default":"USD"},"posted_on":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Posted On"},"counterparty":{"anyOf":[{"type":"string","maxLength":250},{"type":"null"}],"title":"Counterparty"}},"type":"object","required":["record_reference","amount"],"title":"ReconciliationRecord"},"RemittanceAdviceMatchRequest":{"properties":{"remittance_reference":{"type":"string","maxLength":120,"minLength":1,"title":"Remittance Reference"},"vendor_reference":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Vendor Reference"},"currency":{"type":"string","maxLength":3,"minLength":3,"title":"Currency","default":"USD"},"remitted_amount":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*(?:\\d{0,12}|(?=[\\d.]{1,15}0*$)\\d{0,12}\\.\\d{0,2}0*$)"}],"title":"Remitted Amount"},"invoice_references":{"items":{"type":"string"},"type":"array","maxItems":500,"title":"Invoice References"},"open_invoices":{"items":{"$ref":"#/components/schemas/OpenInvoiceRecord"},"type":"array","maxItems":500,"minItems":1,"title":"Open Invoices"}},"type":"object","required":["remittance_reference","remitted_amount","open_invoices"],"title":"RemittanceAdviceMatchRequest"},"RemittanceChangeRequest":{"properties":{"remittance_reference":{"type":"string","maxLength":120,"minLength":4,"title":"Remittance Reference"},"account_fingerprint":{"type":"string","maxLength":128,"minLength":32,"pattern":"^[a-fA-F0-9]+$","title":"Account Fingerprint"}},"type":"object","required":["remittance_reference","account_fingerprint"],"title":"RemittanceChangeRequest"},"RemittanceChangeResponse":{"properties":{"vendor_id":{"type":"string","title":"Vendor Id"},"decision":{"type":"string","enum":["CLEAR","REVIEW_REQUIRED"],"title":"Decision"},"exceptions":{"items":{"$ref":"#/components/schemas/ExceptionResponse"},"type":"array","title":"Exceptions"},"next_action":{"type":"string","title":"Next Action"}},"type":"object","required":["vendor_id","decision","next_action"],"title":"RemittanceChangeResponse"},"ReviewRequest":{"properties":{"action":{"type":"string","enum":["ACKNOWLEDGED","DISMISSED"],"title":"Action"},"note":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Note"}},"type":"object","required":["action"],"title":"ReviewRequest"},"SaveExtractedPurchaseOrderRequest":{"properties":{"extraction_id":{"type":"string","title":"Extraction Id"},"revision_label":{"type":"string","maxLength":120,"minLength":1,"title":"Revision Label"}},"type":"object","required":["extraction_id","revision_label"],"title":"SaveExtractedPurchaseOrderRequest"},"TaxFormCheckRequest":{"properties":{"form_type":{"type":"string","enum":["W9","W8BEN","W8BEN_E"],"title":"Form Type"},"legal_name":{"anyOf":[{"type":"string","maxLength":250},{"type":"null"}],"title":"Legal Name"},"tax_identifier_last4":{"anyOf":[{"type":"string","pattern":"^[0-9]{4}$"},{"type":"null"}],"title":"Tax Identifier Last4"},"signed_on":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Signed On"},"expires_on":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Expires On"},"entity_country":{"anyOf":[{"type":"string","maxLength":2,"minLength":2},{"type":"null"}],"title":"Entity Country"}},"type":"object","required":["form_type"],"title":"TaxFormCheckRequest"},"UploadRequest":{"properties":{"filename":{"type":"string","maxLength":255,"minLength":1,"title":"Filename"},"content_type":{"type":"string","enum":["application/pdf","image/png","image/jpeg","image/tiff"],"title":"Content Type"},"size_bytes":{"type":"integer","exclusiveMinimum":0.0,"title":"Size Bytes"},"purpose":{"type":"string","enum":["INVOICE","PURCHASE_ORDER"],"title":"Purpose","default":"INVOICE"}},"type":"object","required":["filename","content_type","size_bytes"],"title":"UploadRequest"},"UploadResponse":{"properties":{"upload_id":{"type":"string","title":"Upload Id"},"upload_url":{"type":"string","title":"Upload Url"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"required_headers":{"additionalProperties":{"type":"string"},"type":"object","title":"Required Headers"}},"type":"object","required":["upload_id","upload_url","expires_at","required_headers"],"title":"UploadResponse"},"UsageResponse":{"properties":{"trial_limit":{"type":"integer","title":"Trial Limit"},"used_this_period":{"type":"integer","title":"Used This Period"},"remaining_trial":{"type":"integer","title":"Remaining Trial"},"stripe_customer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripe Customer Id"}},"type":"object","required":["trial_limit","used_this_period","remaining_trial","stripe_customer_id"],"title":"UsageResponse"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"VendorBaselineRequest":{"properties":{"vendor_name":{"type":"string","maxLength":250,"minLength":1,"title":"Vendor Name"},"remittance_reference":{"type":"string","maxLength":120,"minLength":4,"title":"Remittance Reference"},"account_fingerprint":{"type":"string","maxLength":128,"minLength":32,"pattern":"^[a-fA-F0-9]+$","title":"Account Fingerprint"}},"type":"object","required":["vendor_name","remittance_reference","account_fingerprint"],"title":"VendorBaselineRequest"},"VendorBaselineResponse":{"properties":{"vendor_name":{"type":"string","maxLength":250,"minLength":1,"title":"Vendor Name"},"remittance_reference":{"type":"string","maxLength":120,"minLength":4,"title":"Remittance Reference"},"account_fingerprint":{"type":"string","maxLength":128,"minLength":32,"pattern":"^[a-fA-F0-9]+$","title":"Account Fingerprint"},"id":{"type":"string","title":"Id"},"reference":{"type":"string","title":"Reference"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["vendor_name","remittance_reference","account_fingerprint","id","reference","created_at","updated_at"],"title":"VendorBaselineResponse"},"VendorDomainRiskRequest":{"properties":{"vendor_reference":{"type":"string","maxLength":120,"minLength":1,"title":"Vendor Reference"},"sender_email":{"type":"string","maxLength":320,"minLength":3,"title":"Sender Email"},"approved_domains":{"items":{"type":"string"},"type":"array","maxItems":100,"title":"Approved Domains"},"prior_sender_domains":{"items":{"type":"string"},"type":"array","maxItems":100,"title":"Prior Sender Domains"}},"type":"object","required":["vendor_reference","sender_email"],"title":"VendorDomainRiskRequest"},"VendorEntityResolveRequest":{"properties":{"vendor_name":{"type":"string","maxLength":250,"minLength":1,"title":"Vendor Name"},"aliases":{"items":{"type":"string"},"type":"array","maxItems":100,"title":"Aliases"},"address":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Address"},"email_domain":{"anyOf":[{"type":"string","maxLength":253},{"type":"null"}],"title":"Email Domain"},"expected_name":{"anyOf":[{"type":"string","maxLength":250},{"type":"null"}],"title":"Expected Name"},"expected_address":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Expected Address"},"approved_domains":{"items":{"type":"string"},"type":"array","maxItems":100,"title":"Approved Domains"}},"type":"object","required":["vendor_name"],"title":"VendorEntityResolveRequest"},"VendorOnboardingCheckRequest":{"properties":{"vendor_reference":{"type":"string","maxLength":120,"minLength":1,"title":"Vendor Reference"},"required_items":{"items":{"type":"string"},"type":"array","maxItems":50,"minItems":1,"title":"Required Items"},"supplied_items":{"items":{"type":"string"},"type":"array","maxItems":50,"title":"Supplied Items"},"approved_by_customer":{"type":"boolean","title":"Approved By Customer","default":false},"remittance_fingerprint_present":{"type":"boolean","title":"Remittance Fingerprint Present","default":false}},"type":"object","required":["vendor_reference","required_items"],"title":"VendorOnboardingCheckRequest"},"VendorQuote":{"properties":{"quote_reference":{"type":"string","maxLength":120,"minLength":1,"title":"Quote Reference"},"vendor_name":{"type":"string","maxLength":250,"minLength":1,"title":"Vendor Name"},"currency":{"type":"string","maxLength":3,"minLength":3,"title":"Currency","default":"USD"},"lines":{"items":{"$ref":"#/components/schemas/QuoteLine"},"type":"array","maxItems":500,"minItems":1,"title":"Lines"},"payment_terms":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Payment Terms"},"valid_until":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Valid Until"}},"type":"object","required":["quote_reference","vendor_name","lines"],"title":"VendorQuote"},"WebhookRequest":{"properties":{"url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Url"},"events":{"items":{"type":"string","enum":["invoice.completed","invoice.review_required","invoice.blocked","invoice.failed"]},"type":"array","title":"Events"}},"type":"object","required":["url","events"],"title":"WebhookRequest"},"WebhookResponse":{"properties":{"id":{"type":"string","title":"Id"},"url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Url"},"events":{"items":{"type":"string"},"type":"array","title":"Events"},"secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secret"}},"type":"object","required":["id","url","events"],"title":"WebhookResponse"}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}},"tags":[{"name":"AP Control","description":"Asynchronous invoice intake, duplicate controls, review packets, and history imports."},{"name":"AP Match","description":"Read-only two-way and three-way invoice, purchase-order, and receipt matching."},{"name":"Invoice Extract","description":"Canonical fields, OCR confidence, evidence, and short-lived source-document links."},{"name":"Invoice Validate","description":"Deterministic invoice field and arithmetic validation before routing."},{"name":"Invoice History Search","description":"Explainable exact and near-match searches over the caller's own history."},{"name":"Remittance Change Detect","description":"Customer-controlled remittance-baseline comparison; not bank-account ownership verification."},{"name":"Invoice Line Normalize","description":"Private-preview deterministic invoice line normalization."},{"name":"Invoice Risk Score","description":"Private-preview explainable invoice control score and priority band."},{"name":"Purchase Order Extract","description":"Private-preview document extraction for customer-provided purchase orders."},{"name":"PO Amendment Diff","description":"Private-preview read-only comparison between saved purchase-order revisions."},{"name":"ERP Bill Preflight","description":"Read-only NetSuite and QuickBooks bill controls using customer-supplied record references; no ERP connection or write."},{"name":"Construction AP Control","description":"Read-only subcontractor invoice controls for commitments, retainage, schedule-of-values, and supplied compliance evidence."},{"name":"Freight Invoice Control","description":"Read-only shipment, rate, fuel, and accessorial exception controls against customer-supplied freight data."},{"name":"Franchise AP Control","description":"Read-only location-aware duplicate controls against the caller's supplied multi-location invoice history."},{"name":"Procurement Agent Safety","description":"Read-only deterministic policy checks before a procurement agent invokes an external system."},{"name":"Vendor Entity Resolve","description":"Read-only customer-evidence identity and alias controls; not official verification."},{"name":"Vendor Onboarding Check","description":"Read-only completeness checks over customer-defined supplier onboarding evidence."},{"name":"W-9 / Tax Form Check","description":"Document completeness checks only; not tax advice or tax-identifier verification."},{"name":"Vendor Domain Risk","description":"Read-only sender-domain comparison against customer-provided baselines."},{"name":"Quote Compare","description":"Read-only comparison of customer-provided quote lines, totals, currency, and validity."},{"name":"Contract Obligation Extract","description":"Deterministic candidate-date and obligation-indicator extraction from supplied contract text; not legal advice."},{"name":"Certificate Expiry Check","description":"Read-only expiry-window checks over customer-provided certificate metadata."},{"name":"Remittance Advice Match","description":"Read-only matching of supplied remittance advice to customer-provided open invoices."},{"name":"Bank Statement Normalize","description":"Normalize customer-provided transaction records for reconciliation; no bank connection."},{"name":"Reconciliation Match","description":"Read-only deterministic matching across customer-provided record sets."},{"name":"Workspace","description":"Organization, API-key, usage, and retention management."},{"name":"Webhooks","description":"Signed, minimized event delivery to customer-configured public HTTPS endpoints."},{"name":"Operations","description":"Unauthenticated liveness and readiness checks."}]}