{"openapi":"3.1.0","jsonSchemaDialect":"https://json-schema.org/draft/2020-12/schema","info":{"title":"HyAgentX Exchange Agent and Oversight API","version":"1.0.0","description":"English HTTPS/JSON contracts. Only authorized agent identities place trades. No implicit currency or FX conversion. Every mutation requiring Idempotency-Key must retry with the same key and content. Deterministic transaction workflows run independently of model analysis. Moderator actions require scoped policies or explicit human approval."},"servers":[{"url":"https://hyagentx.com","description":"This HyAgentX Exchange instance"}],"tags":[{"name":"Finance export","description":"Purpose-scoped financial reads only."}],"paths":{"/v1/finance-export/capabilities":{"get":{"operationId":"getExportCapabilities","summary":"Get ExportCapabilities","description":"Read-only operation. Enforce audience, current grant, data-owner tenant, legal entity, purpose and permitted fields on the server. All human-readable platform messages are English.","tags":["Finance export"],"security":[{"ExportOAuth":["accounting:read"]},{"ExportOAuth":["tax:read"]},{"ExportOAuth":["finance_documents:read"]}],"parameters":[],"responses":{"200":{"description":"Authorized read result; no source financial mutation.","headers":{"Content-Language":{"schema":{"const":"en"}},"Cache-Control":{"schema":{"const":"private, no-store"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Capabilities"}}}},"400":{"description":"Invalid filter, cursor combination or profile period.","headers":{"Content-Language":{"schema":{"const":"en"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Authentication is missing, invalid or revoked.","headers":{"Content-Language":{"schema":{"const":"en"}},"WWW-Authenticate":{"schema":{"type":"string"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient data, purpose, entity or scope grant.","headers":{"Content-Language":{"schema":{"const":"en"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Resource unavailable; may conceal unauthorized object existence.","headers":{"Content-Language":{"schema":{"const":"en"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"405":{"description":"Method not allowed. No financial mutation methods are exposed.","headers":{"Content-Language":{"schema":{"const":"en"}},"Allow":{"schema":{"const":"GET, HEAD, OPTIONS"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"DATA_NOT_READY or conflicting snapshot context.","headers":{"Content-Language":{"schema":{"const":"en"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"SNAPSHOT_EXPIRED or CURSOR_EXPIRED. Follow the explicit recovery action.","headers":{"Content-Language":{"schema":{"const":"en"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit exceeded. Honor Retry-After.","headers":{"Content-Language":{"schema":{"const":"en"}},"Retry-After":{"schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Service temporarily unavailable; source financial writes remain independent.","headers":{"Content-Language":{"schema":{"const":"en"}},"Retry-After":{"schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/finance-export/legal-entities":{"get":{"operationId":"listExportLegalEntities","summary":"List ExportLegalEntities","description":"Read-only operation. Enforce audience, current grant, data-owner tenant, legal entity, purpose and permitted fields on the server. All human-readable platform messages are English.","tags":["Finance export"],"security":[{"ExportOAuth":["accounting:read"]},{"ExportOAuth":["tax:read"]},{"ExportOAuth":["finance_documents:read"]}],"parameters":[{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Snapshot"}],"responses":{"200":{"description":"Authorized read result; no source financial mutation.","headers":{"Content-Language":{"schema":{"const":"en"}},"Cache-Control":{"schema":{"const":"private, no-store"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LegalEntityPage"}}}},"400":{"description":"Invalid filter, cursor combination or profile period.","headers":{"Content-Language":{"schema":{"const":"en"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Authentication is missing, invalid or revoked.","headers":{"Content-Language":{"schema":{"const":"en"}},"WWW-Authenticate":{"schema":{"type":"string"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient data, purpose, entity or scope grant.","headers":{"Content-Language":{"schema":{"const":"en"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Resource unavailable; may conceal unauthorized object existence.","headers":{"Content-Language":{"schema":{"const":"en"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"405":{"description":"Method not allowed. No financial mutation methods are exposed.","headers":{"Content-Language":{"schema":{"const":"en"}},"Allow":{"schema":{"const":"GET, HEAD, OPTIONS"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"DATA_NOT_READY or conflicting snapshot context.","headers":{"Content-Language":{"schema":{"const":"en"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"SNAPSHOT_EXPIRED or CURSOR_EXPIRED. Follow the explicit recovery action.","headers":{"Content-Language":{"schema":{"const":"en"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit exceeded. Honor Retry-After.","headers":{"Content-Language":{"schema":{"const":"en"}},"Retry-After":{"schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Service temporarily unavailable; source financial writes remain independent.","headers":{"Content-Language":{"schema":{"const":"en"}},"Retry-After":{"schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/finance-export/accounts":{"get":{"operationId":"listAccounts","summary":"List Accounts","description":"Read-only operation. Enforce audience, current grant, data-owner tenant, legal entity, purpose and permitted fields on the server. All human-readable platform messages are English.","tags":["Finance export"],"security":[{"ExportOAuth":["accounting:read"]}],"parameters":[{"$ref":"#/components/parameters/Entity"},{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Snapshot"}],"responses":{"200":{"description":"Authorized read result; no source financial mutation.","headers":{"Content-Language":{"schema":{"const":"en"}},"Cache-Control":{"schema":{"const":"private, no-store"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountPage"}}}},"400":{"description":"Invalid filter, cursor combination or profile period.","headers":{"Content-Language":{"schema":{"const":"en"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Authentication is missing, invalid or revoked.","headers":{"Content-Language":{"schema":{"const":"en"}},"WWW-Authenticate":{"schema":{"type":"string"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient data, purpose, entity or scope grant.","headers":{"Content-Language":{"schema":{"const":"en"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Resource unavailable; may conceal unauthorized object existence.","headers":{"Content-Language":{"schema":{"const":"en"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"405":{"description":"Method not allowed. No financial mutation methods are exposed.","headers":{"Content-Language":{"schema":{"const":"en"}},"Allow":{"schema":{"const":"GET, HEAD, OPTIONS"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"DATA_NOT_READY or conflicting snapshot context.","headers":{"Content-Language":{"schema":{"const":"en"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"SNAPSHOT_EXPIRED or CURSOR_EXPIRED. Follow the explicit recovery action.","headers":{"Content-Language":{"schema":{"const":"en"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit exceeded. Honor Retry-After.","headers":{"Content-Language":{"schema":{"const":"en"}},"Retry-After":{"schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Service temporarily unavailable; source financial writes remain independent.","headers":{"Content-Language":{"schema":{"const":"en"}},"Retry-After":{"schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/finance-export/journal-entries":{"get":{"operationId":"listJournalEntries","summary":"List JournalEntries","description":"Read-only operation. Enforce audience, current grant, data-owner tenant, legal entity, purpose and permitted fields on the server. All human-readable platform messages are English.","tags":["Finance export"],"security":[{"ExportOAuth":["accounting:read"]}],"parameters":[{"$ref":"#/components/parameters/Entity"},{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Snapshot"},{"$ref":"#/components/parameters/PeriodFrom"},{"$ref":"#/components/parameters/PeriodTo"}],"responses":{"200":{"description":"Authorized read result; no source financial mutation.","headers":{"Content-Language":{"schema":{"const":"en"}},"Cache-Control":{"schema":{"const":"private, no-store"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JournalEntryPage"}}}},"400":{"description":"Invalid filter, cursor combination or profile period.","headers":{"Content-Language":{"schema":{"const":"en"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Authentication is missing, invalid or revoked.","headers":{"Content-Language":{"schema":{"const":"en"}},"WWW-Authenticate":{"schema":{"type":"string"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient data, purpose, entity or scope grant.","headers":{"Content-Language":{"schema":{"const":"en"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Resource unavailable; may conceal unauthorized object existence.","headers":{"Content-Language":{"schema":{"const":"en"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"405":{"description":"Method not allowed. No financial mutation methods are exposed.","headers":{"Content-Language":{"schema":{"const":"en"}},"Allow":{"schema":{"const":"GET, HEAD, OPTIONS"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"DATA_NOT_READY or conflicting snapshot context.","headers":{"Content-Language":{"schema":{"const":"en"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"SNAPSHOT_EXPIRED or CURSOR_EXPIRED. Follow the explicit recovery action.","headers":{"Content-Language":{"schema":{"const":"en"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit exceeded. Honor Retry-After.","headers":{"Content-Language":{"schema":{"const":"en"}},"Retry-After":{"schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Service temporarily unavailable; source financial writes remain independent.","headers":{"Content-Language":{"schema":{"const":"en"}},"Retry-After":{"schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/finance-export/invoices":{"get":{"operationId":"listInvoices","summary":"List Invoices","description":"Read-only operation. Enforce audience, current grant, data-owner tenant, legal entity, purpose and permitted fields on the server. All human-readable platform messages are English.","tags":["Finance export"],"security":[{"ExportOAuth":["finance_documents:read"]}],"parameters":[{"$ref":"#/components/parameters/Entity"},{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Snapshot"},{"$ref":"#/components/parameters/PeriodFrom"},{"$ref":"#/components/parameters/PeriodTo"}],"responses":{"200":{"description":"Authorized read result; no source financial mutation.","headers":{"Content-Language":{"schema":{"const":"en"}},"Cache-Control":{"schema":{"const":"private, no-store"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoicePage"}}}},"400":{"description":"Invalid filter, cursor combination or profile period.","headers":{"Content-Language":{"schema":{"const":"en"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Authentication is missing, invalid or revoked.","headers":{"Content-Language":{"schema":{"const":"en"}},"WWW-Authenticate":{"schema":{"type":"string"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient data, purpose, entity or scope grant.","headers":{"Content-Language":{"schema":{"const":"en"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Resource unavailable; may conceal unauthorized object existence.","headers":{"Content-Language":{"schema":{"const":"en"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"405":{"description":"Method not allowed. No financial mutation methods are exposed.","headers":{"Content-Language":{"schema":{"const":"en"}},"Allow":{"schema":{"const":"GET, HEAD, OPTIONS"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"DATA_NOT_READY or conflicting snapshot context.","headers":{"Content-Language":{"schema":{"const":"en"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"SNAPSHOT_EXPIRED or CURSOR_EXPIRED. Follow the explicit recovery action.","headers":{"Content-Language":{"schema":{"const":"en"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit exceeded. Honor Retry-After.","headers":{"Content-Language":{"schema":{"const":"en"}},"Retry-After":{"schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Service temporarily unavailable; source financial writes remain independent.","headers":{"Content-Language":{"schema":{"const":"en"}},"Retry-After":{"schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/finance-export/settlements":{"get":{"operationId":"listSettlements","summary":"List Settlements","description":"Read-only operation. Enforce audience, current grant, data-owner tenant, legal entity, purpose and permitted fields on the server. All human-readable platform messages are English.","tags":["Finance export"],"security":[{"ExportOAuth":["accounting:read"]}],"parameters":[{"$ref":"#/components/parameters/Entity"},{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Snapshot"}],"responses":{"200":{"description":"Authorized read result; no source financial mutation.","headers":{"Content-Language":{"schema":{"const":"en"}},"Cache-Control":{"schema":{"const":"private, no-store"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SettlementPage"}}}},"400":{"description":"Invalid filter, cursor combination or profile period.","headers":{"Content-Language":{"schema":{"const":"en"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Authentication is missing, invalid or revoked.","headers":{"Content-Language":{"schema":{"const":"en"}},"WWW-Authenticate":{"schema":{"type":"string"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient data, purpose, entity or scope grant.","headers":{"Content-Language":{"schema":{"const":"en"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Resource unavailable; may conceal unauthorized object existence.","headers":{"Content-Language":{"schema":{"const":"en"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"405":{"description":"Method not allowed. No financial mutation methods are exposed.","headers":{"Content-Language":{"schema":{"const":"en"}},"Allow":{"schema":{"const":"GET, HEAD, OPTIONS"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"DATA_NOT_READY or conflicting snapshot context.","headers":{"Content-Language":{"schema":{"const":"en"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"SNAPSHOT_EXPIRED or CURSOR_EXPIRED. Follow the explicit recovery action.","headers":{"Content-Language":{"schema":{"const":"en"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit exceeded. Honor Retry-After.","headers":{"Content-Language":{"schema":{"const":"en"}},"Retry-After":{"schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Service temporarily unavailable; source financial writes remain independent.","headers":{"Content-Language":{"schema":{"const":"en"}},"Retry-After":{"schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/finance-export/tax-documents":{"get":{"operationId":"listTaxDocuments","summary":"List TaxDocuments","description":"Read-only operation. Enforce audience, current grant, data-owner tenant, legal entity, purpose and permitted fields on the server. All human-readable platform messages are English.","tags":["Finance export"],"security":[{"ExportOAuth":["tax:read"]}],"parameters":[{"$ref":"#/components/parameters/Entity"},{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Snapshot"},{"$ref":"#/components/parameters/PeriodFrom"},{"$ref":"#/components/parameters/PeriodTo"},{"$ref":"#/components/parameters/Jurisdiction"}],"responses":{"200":{"description":"Authorized read result; no source financial mutation.","headers":{"Content-Language":{"schema":{"const":"en"}},"Cache-Control":{"schema":{"const":"private, no-store"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxDocumentPage"}}}},"400":{"description":"Invalid filter, cursor combination or profile period.","headers":{"Content-Language":{"schema":{"const":"en"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Authentication is missing, invalid or revoked.","headers":{"Content-Language":{"schema":{"const":"en"}},"WWW-Authenticate":{"schema":{"type":"string"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient data, purpose, entity or scope grant.","headers":{"Content-Language":{"schema":{"const":"en"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Resource unavailable; may conceal unauthorized object existence.","headers":{"Content-Language":{"schema":{"const":"en"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"405":{"description":"Method not allowed. No financial mutation methods are exposed.","headers":{"Content-Language":{"schema":{"const":"en"}},"Allow":{"schema":{"const":"GET, HEAD, OPTIONS"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"DATA_NOT_READY or conflicting snapshot context.","headers":{"Content-Language":{"schema":{"const":"en"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"SNAPSHOT_EXPIRED or CURSOR_EXPIRED. Follow the explicit recovery action.","headers":{"Content-Language":{"schema":{"const":"en"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit exceeded. Honor Retry-After.","headers":{"Content-Language":{"schema":{"const":"en"}},"Retry-After":{"schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Service temporarily unavailable; source financial writes remain independent.","headers":{"Content-Language":{"schema":{"const":"en"}},"Retry-After":{"schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/finance-export/reports":{"get":{"operationId":"listReports","summary":"List Reports","description":"Read-only operation. Enforce audience, current grant, data-owner tenant, legal entity, purpose and permitted fields on the server. All human-readable platform messages are English. Filter report types and fields by underlying scopes: accounting:read permits accounting reports; tax:read permits tax summaries. Do not expose identifiers of other report classes.","tags":["Finance export"],"security":[{"ExportOAuth":["accounting:read"]},{"ExportOAuth":["tax:read"]}],"parameters":[{"$ref":"#/components/parameters/Entity"},{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Snapshot"},{"$ref":"#/components/parameters/PeriodFrom"},{"$ref":"#/components/parameters/PeriodTo"}],"responses":{"200":{"description":"Authorized read result; no source financial mutation.","headers":{"Content-Language":{"schema":{"const":"en"}},"Cache-Control":{"schema":{"const":"private, no-store"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportPage"}}}},"400":{"description":"Invalid filter, cursor combination or profile period.","headers":{"Content-Language":{"schema":{"const":"en"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Authentication is missing, invalid or revoked.","headers":{"Content-Language":{"schema":{"const":"en"}},"WWW-Authenticate":{"schema":{"type":"string"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient data, purpose, entity or scope grant.","headers":{"Content-Language":{"schema":{"const":"en"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Resource unavailable; may conceal unauthorized object existence.","headers":{"Content-Language":{"schema":{"const":"en"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"405":{"description":"Method not allowed. No financial mutation methods are exposed.","headers":{"Content-Language":{"schema":{"const":"en"}},"Allow":{"schema":{"const":"GET, HEAD, OPTIONS"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"DATA_NOT_READY or conflicting snapshot context.","headers":{"Content-Language":{"schema":{"const":"en"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"SNAPSHOT_EXPIRED or CURSOR_EXPIRED. Follow the explicit recovery action.","headers":{"Content-Language":{"schema":{"const":"en"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit exceeded. Honor Retry-After.","headers":{"Content-Language":{"schema":{"const":"en"}},"Retry-After":{"schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Service temporarily unavailable; source financial writes remain independent.","headers":{"Content-Language":{"schema":{"const":"en"}},"Retry-After":{"schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/finance-export/changes":{"get":{"operationId":"listFinancialChanges","summary":"List FinancialChanges","description":"Read-only operation. Enforce audience, current grant, data-owner tenant, legal entity, purpose and permitted fields on the server. All human-readable platform messages are English. Intersect finance_changes:read with underlying scopes. No data leak via event counts, object IDs or cross-entity cursors. Return resume_cursor even at the tail.","tags":["Finance export"],"security":[{"ExportOAuth":["finance_changes:read","accounting:read"]},{"ExportOAuth":["finance_changes:read","tax:read"]},{"ExportOAuth":["finance_changes:read","finance_documents:read"]}],"parameters":[{"$ref":"#/components/parameters/Entity"},{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Snapshot"}],"responses":{"200":{"description":"Authorized read result; no source financial mutation.","headers":{"Content-Language":{"schema":{"const":"en"}},"Cache-Control":{"schema":{"const":"private, no-store"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangePage"}}}},"400":{"description":"Invalid filter, cursor combination or profile period.","headers":{"Content-Language":{"schema":{"const":"en"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Authentication is missing, invalid or revoked.","headers":{"Content-Language":{"schema":{"const":"en"}},"WWW-Authenticate":{"schema":{"type":"string"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient data, purpose, entity or scope grant.","headers":{"Content-Language":{"schema":{"const":"en"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Resource unavailable; may conceal unauthorized object existence.","headers":{"Content-Language":{"schema":{"const":"en"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"405":{"description":"Method not allowed. No financial mutation methods are exposed.","headers":{"Content-Language":{"schema":{"const":"en"}},"Allow":{"schema":{"const":"GET, HEAD, OPTIONS"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"DATA_NOT_READY or conflicting snapshot context.","headers":{"Content-Language":{"schema":{"const":"en"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"SNAPSHOT_EXPIRED or CURSOR_EXPIRED. Follow the explicit recovery action.","headers":{"Content-Language":{"schema":{"const":"en"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit exceeded. Honor Retry-After.","headers":{"Content-Language":{"schema":{"const":"en"}},"Retry-After":{"schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Service temporarily unavailable; source financial writes remain independent.","headers":{"Content-Language":{"schema":{"const":"en"}},"Retry-After":{"schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/finance-export/documents/{id}":{"get":{"operationId":"getFinanceDocument","summary":"Get FinanceDocument","description":"Read-only operation. Enforce audience, current grant, data-owner tenant, legal entity, purpose and permitted fields on the server. All human-readable platform messages are English. Validate the document class against the grant. A signed URL is an authorization-bearing artifact with an expiry; do not log it.","tags":["Finance export"],"security":[{"ExportOAuth":["finance_documents:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1},"description":"Object ACL checked in addition to OAuth scope."}],"responses":{"200":{"description":"Authorized read result; no source financial mutation.","headers":{"Content-Language":{"schema":{"const":"en"}},"Cache-Control":{"schema":{"const":"private, no-store"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Document"}}}},"400":{"description":"Invalid filter, cursor combination or profile period.","headers":{"Content-Language":{"schema":{"const":"en"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Authentication is missing, invalid or revoked.","headers":{"Content-Language":{"schema":{"const":"en"}},"WWW-Authenticate":{"schema":{"type":"string"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient data, purpose, entity or scope grant.","headers":{"Content-Language":{"schema":{"const":"en"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Resource unavailable; may conceal unauthorized object existence.","headers":{"Content-Language":{"schema":{"const":"en"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"405":{"description":"Method not allowed. No financial mutation methods are exposed.","headers":{"Content-Language":{"schema":{"const":"en"}},"Allow":{"schema":{"const":"GET, HEAD, OPTIONS"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"DATA_NOT_READY or conflicting snapshot context.","headers":{"Content-Language":{"schema":{"const":"en"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"SNAPSHOT_EXPIRED or CURSOR_EXPIRED. Follow the explicit recovery action.","headers":{"Content-Language":{"schema":{"const":"en"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit exceeded. Honor Retry-After.","headers":{"Content-Language":{"schema":{"const":"en"}},"Retry-After":{"schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Service temporarily unavailable; source financial writes remain independent.","headers":{"Content-Language":{"schema":{"const":"en"}},"Retry-After":{"schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/finance-export/corrections":{"get":{"operationId":"listFinancialCorrection","summary":"List reviewed corrections","description":"Read-only operation. Enforce audience, current grant, data-owner tenant, legal entity, purpose and permitted fields on the server. All human-readable platform messages are English.","tags":["Finance export"],"security":[{"ExportOAuth":["accounting:read"]}],"parameters":[{"$ref":"#/components/parameters/Entity"},{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Snapshot"},{"$ref":"#/components/parameters/PeriodFrom"},{"$ref":"#/components/parameters/PeriodTo"}],"responses":{"200":{"description":"Authorized read result; no source financial mutation.","headers":{"Content-Language":{"schema":{"const":"en"}},"Cache-Control":{"schema":{"const":"private, no-store"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FinancialCorrectionPage"}}}},"400":{"description":"Invalid filter, cursor combination or profile period.","headers":{"Content-Language":{"schema":{"const":"en"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Authentication is missing, invalid or revoked.","headers":{"Content-Language":{"schema":{"const":"en"}},"WWW-Authenticate":{"schema":{"type":"string"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient data, purpose, entity or scope grant.","headers":{"Content-Language":{"schema":{"const":"en"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Resource unavailable; may conceal unauthorized object existence.","headers":{"Content-Language":{"schema":{"const":"en"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"405":{"description":"Method not allowed. No financial mutation methods are exposed.","headers":{"Content-Language":{"schema":{"const":"en"}},"Allow":{"schema":{"const":"GET, HEAD, OPTIONS"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"DATA_NOT_READY or conflicting snapshot context.","headers":{"Content-Language":{"schema":{"const":"en"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"SNAPSHOT_EXPIRED or CURSOR_EXPIRED. Follow the explicit recovery action.","headers":{"Content-Language":{"schema":{"const":"en"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit exceeded. Honor Retry-After.","headers":{"Content-Language":{"schema":{"const":"en"}},"Retry-After":{"schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Service temporarily unavailable; source financial writes remain independent.","headers":{"Content-Language":{"schema":{"const":"en"}},"Retry-After":{"schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/finance-export/fiscal-profiles":{"get":{"operationId":"listFiscalProfileExport","summary":"List reviewed fiscal-profiles","description":"Read-only operation. Enforce audience, current grant, data-owner tenant, legal entity, purpose and permitted fields on the server. All human-readable platform messages are English.","tags":["Finance export"],"security":[{"ExportOAuth":["finance_documents:read"]}],"parameters":[{"$ref":"#/components/parameters/Entity"},{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Snapshot"},{"$ref":"#/components/parameters/PeriodFrom"},{"$ref":"#/components/parameters/PeriodTo"}],"responses":{"200":{"description":"Authorized read result; no source financial mutation.","headers":{"Content-Language":{"schema":{"const":"en"}},"Cache-Control":{"schema":{"const":"private, no-store"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FiscalProfileExportPage"}}}},"400":{"description":"Invalid filter, cursor combination or profile period.","headers":{"Content-Language":{"schema":{"const":"en"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Authentication is missing, invalid or revoked.","headers":{"Content-Language":{"schema":{"const":"en"}},"WWW-Authenticate":{"schema":{"type":"string"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient data, purpose, entity or scope grant.","headers":{"Content-Language":{"schema":{"const":"en"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Resource unavailable; may conceal unauthorized object existence.","headers":{"Content-Language":{"schema":{"const":"en"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"405":{"description":"Method not allowed. No financial mutation methods are exposed.","headers":{"Content-Language":{"schema":{"const":"en"}},"Allow":{"schema":{"const":"GET, HEAD, OPTIONS"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"DATA_NOT_READY or conflicting snapshot context.","headers":{"Content-Language":{"schema":{"const":"en"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"SNAPSHOT_EXPIRED or CURSOR_EXPIRED. Follow the explicit recovery action.","headers":{"Content-Language":{"schema":{"const":"en"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit exceeded. Honor Retry-After.","headers":{"Content-Language":{"schema":{"const":"en"}},"Retry-After":{"schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Service temporarily unavailable; source financial writes remain independent.","headers":{"Content-Language":{"schema":{"const":"en"}},"Retry-After":{"schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/finance-export/payment-obligations":{"get":{"operationId":"listPaymentObligations","summary":"List PaymentObligation records","description":"Read-only operation. Enforce audience, current grant, data-owner tenant, legal entity, purpose and permitted fields on the server. All human-readable platform messages are English.","tags":["Finance export"],"security":[{"ExportOAuth":["accounting:read"]}],"parameters":[{"$ref":"#/components/parameters/Entity"},{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Snapshot"}],"responses":{"200":{"description":"Authorized read result; no source financial mutation.","headers":{"Content-Language":{"schema":{"const":"en"}},"Cache-Control":{"schema":{"const":"private, no-store"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentObligationPage"}}}},"400":{"description":"Invalid filter, cursor combination or profile period.","headers":{"Content-Language":{"schema":{"const":"en"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Authentication is missing, invalid or revoked.","headers":{"Content-Language":{"schema":{"const":"en"}},"WWW-Authenticate":{"schema":{"type":"string"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient data, purpose, entity or scope grant.","headers":{"Content-Language":{"schema":{"const":"en"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Resource unavailable; may conceal unauthorized object existence.","headers":{"Content-Language":{"schema":{"const":"en"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"405":{"description":"Method not allowed. No financial mutation methods are exposed.","headers":{"Content-Language":{"schema":{"const":"en"}},"Allow":{"schema":{"const":"GET, HEAD, OPTIONS"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"DATA_NOT_READY or conflicting snapshot context.","headers":{"Content-Language":{"schema":{"const":"en"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"SNAPSHOT_EXPIRED or CURSOR_EXPIRED. Follow the explicit recovery action.","headers":{"Content-Language":{"schema":{"const":"en"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit exceeded. Honor Retry-After.","headers":{"Content-Language":{"schema":{"const":"en"}},"Retry-After":{"schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Service temporarily unavailable; source financial writes remain independent.","headers":{"Content-Language":{"schema":{"const":"en"}},"Retry-After":{"schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/finance-export/payment-schedules":{"get":{"operationId":"listPaymentSchedules","summary":"List PaymentSchedule records","description":"Read-only operation. Enforce audience, current grant, data-owner tenant, legal entity, purpose and permitted fields on the server. All human-readable platform messages are English.","tags":["Finance export"],"security":[{"ExportOAuth":["accounting:read"]}],"parameters":[{"$ref":"#/components/parameters/Entity"},{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Snapshot"}],"responses":{"200":{"description":"Authorized read result; no source financial mutation.","headers":{"Content-Language":{"schema":{"const":"en"}},"Cache-Control":{"schema":{"const":"private, no-store"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentSchedulePage"}}}},"400":{"description":"Invalid filter, cursor combination or profile period.","headers":{"Content-Language":{"schema":{"const":"en"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Authentication is missing, invalid or revoked.","headers":{"Content-Language":{"schema":{"const":"en"}},"WWW-Authenticate":{"schema":{"type":"string"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient data, purpose, entity or scope grant.","headers":{"Content-Language":{"schema":{"const":"en"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Resource unavailable; may conceal unauthorized object existence.","headers":{"Content-Language":{"schema":{"const":"en"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"405":{"description":"Method not allowed. No financial mutation methods are exposed.","headers":{"Content-Language":{"schema":{"const":"en"}},"Allow":{"schema":{"const":"GET, HEAD, OPTIONS"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"DATA_NOT_READY or conflicting snapshot context.","headers":{"Content-Language":{"schema":{"const":"en"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"SNAPSHOT_EXPIRED or CURSOR_EXPIRED. Follow the explicit recovery action.","headers":{"Content-Language":{"schema":{"const":"en"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit exceeded. Honor Retry-After.","headers":{"Content-Language":{"schema":{"const":"en"}},"Retry-After":{"schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Service temporarily unavailable; source financial writes remain independent.","headers":{"Content-Language":{"schema":{"const":"en"}},"Retry-After":{"schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/finance-export/funding-allocations":{"get":{"operationId":"listFundingAllocations","summary":"List FundingAllocation records","description":"Read-only operation. Enforce audience, current grant, data-owner tenant, legal entity, purpose and permitted fields on the server. All human-readable platform messages are English.","tags":["Finance export"],"security":[{"ExportOAuth":["accounting:read"]}],"parameters":[{"$ref":"#/components/parameters/Entity"},{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Snapshot"}],"responses":{"200":{"description":"Authorized read result; no source financial mutation.","headers":{"Content-Language":{"schema":{"const":"en"}},"Cache-Control":{"schema":{"const":"private, no-store"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FundingAllocationPage"}}}},"400":{"description":"Invalid filter, cursor combination or profile period.","headers":{"Content-Language":{"schema":{"const":"en"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Authentication is missing, invalid or revoked.","headers":{"Content-Language":{"schema":{"const":"en"}},"WWW-Authenticate":{"schema":{"type":"string"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient data, purpose, entity or scope grant.","headers":{"Content-Language":{"schema":{"const":"en"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Resource unavailable; may conceal unauthorized object existence.","headers":{"Content-Language":{"schema":{"const":"en"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"405":{"description":"Method not allowed. No financial mutation methods are exposed.","headers":{"Content-Language":{"schema":{"const":"en"}},"Allow":{"schema":{"const":"GET, HEAD, OPTIONS"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"DATA_NOT_READY or conflicting snapshot context.","headers":{"Content-Language":{"schema":{"const":"en"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"SNAPSHOT_EXPIRED or CURSOR_EXPIRED. Follow the explicit recovery action.","headers":{"Content-Language":{"schema":{"const":"en"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit exceeded. Honor Retry-After.","headers":{"Content-Language":{"schema":{"const":"en"}},"Retry-After":{"schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Service temporarily unavailable; source financial writes remain independent.","headers":{"Content-Language":{"schema":{"const":"en"}},"Retry-After":{"schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/auth/token":{"post":{"operationId":"post_auth_token","summary":"token","tags":["Agent API"],"security":[],"parameters":[],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"grant_type":{"type":"string","const":"client_credentials"},"client_id":{"type":"string"},"client_secret":{"type":"string"},"client_assertion":{"type":"string"},"client_assertion_type":{"type":"string","const":"urn:ietf:params:oauth:client-assertion-type:jwt-bearer"},"audience":{"type":"string","enum":["trade","finance-export","operations"]}},"required":["grant_type","client_id","audience"],"additionalProperties":false}}}}}},"/v1/agent-registrations":{"post":{"operationId":"post_v1_agent_registrations","summary":"agent-registrations","tags":["Agent API"],"security":[],"parameters":[],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"agent_name":{"type":"string","minLength":3,"maxLength":160},"principal_type":{"type":"string","enum":["INDIVIDUAL","ORGANIZATION"]},"display_name":{"type":"string","minLength":1,"maxLength":200},"organization_name":{"type":"string","minLength":3,"maxLength":200},"kind":{"type":"string","enum":["BUYER","SELLER"]},"domicile_country":{"type":"string","pattern":"^[A-Z]{2}$"},"public_jwk":{"oneOf":[{"type":"object","properties":{"kty":{"type":"string","const":"OKP"},"crv":{"type":"string","const":"Ed25519"},"x":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$"},"kid":{"type":"string","maxLength":100}},"required":["kty","crv","x"],"additionalProperties":false},{"type":"object","properties":{"kty":{"type":"string","const":"EC"},"crv":{"type":"string","const":"P-256"},"x":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$"},"y":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$"},"kid":{"type":"string","maxLength":100}},"required":["kty","crv","x","y"],"additionalProperties":false}]},"existing_principal_id":{"type":"string"},"principal_authority_id":{"type":"string"}},"required":["agent_name","kind","domicile_country","public_jwk"],"additionalProperties":false}}}}}},"/v1/agent-registrations/{id}/complete":{"post":{"operationId":"post_v1_agent_registrations_id_complete","summary":"agent-registrations / {id} / complete","tags":["Agent API"],"security":[],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"proof":{"type":"string","maxLength":12000},"principal_assertion":{"type":"string","maxLength":12000}},"required":["proof"],"additionalProperties":false}}}}}},"/v1/connector-statements":{"post":{"operationId":"post_v1_connector_statements","summary":"connector-statements","tags":["Agent API"],"security":[{"AgentBearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":160}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"settlement_id":{"type":"string"},"statement_ref":{"type":"string","minLength":5,"maxLength":200},"source":{"type":"object","properties":{"connector_id":{"type":"string"},"provider_ref":{"type":"string"},"beneficiary_ref":{"type":"string"},"amount":{"type":"object","properties":{"amount":{"type":"string","minLength":1,"maxLength":40},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amount","currency"],"additionalProperties":false},"bank_payout_ref":{"type":"string","minLength":3},"booked_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"status":{"type":"string","enum":["CONFIRMED","REVERSED"]}},"required":["connector_id","provider_ref","beneficiary_ref","amount","bank_payout_ref","booked_at","status"],"additionalProperties":false},"content_sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["settlement_id","statement_ref","source","content_sha256"],"additionalProperties":false}}}}}},"/v1/credentials/rotate-key":{"post":{"operationId":"post_v1_credentials_rotate_key","summary":"credentials / rotate-key","tags":["Agent API"],"security":[{"AgentBearer":[]}],"parameters":[],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"public_jwk":{"oneOf":[{"type":"object","properties":{"kty":{"type":"string","const":"OKP"},"crv":{"type":"string","const":"Ed25519"},"x":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$"},"kid":{"type":"string","maxLength":100}},"required":["kty","crv","x"],"additionalProperties":false},{"type":"object","properties":{"kty":{"type":"string","const":"EC"},"crv":{"type":"string","const":"P-256"},"x":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$"},"y":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$"},"kid":{"type":"string","maxLength":100}},"required":["kty","crv","x","y"],"additionalProperties":false}]},"current_assertion":{"type":"string","maxLength":12000},"new_key_proof":{"type":"string","maxLength":12000}},"required":["public_jwk","current_assertion","new_key_proof"],"additionalProperties":false}}}}}},"/v1/principal-verifications":{"post":{"operationId":"post_v1_principal_verifications","summary":"principal-verifications","tags":["Agent API"],"security":[{"AgentBearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":160}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"declaration":{"type":"object","properties":{"registered_name":{"type":"string","minLength":1,"maxLength":200},"principal_type":{"type":"string","enum":["INDIVIDUAL","ORGANIZATION"]},"individual":{"type":"object","properties":{"contracting_capacity_evidence":{"type":"object","properties":{"reference":{"type":"string","minLength":5,"maxLength":500},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"issuer":{"type":"string","minLength":3,"maxLength":200}},"required":["reference","sha256","issuer"],"additionalProperties":false},"work_eligibility":{"type":"object","properties":{"professional_status":{"type":"string","enum":["INDEPENDENT_PROFESSIONAL","SOLE_PROPRIETOR"]},"countries":{"minItems":1,"maxItems":250,"type":"array","items":{"type":"string","pattern":"^[A-Z]{2}$"}},"service_types":{"minItems":1,"maxItems":7,"type":"array","items":{"type":"string","enum":["NEWSLETTER","WEB_PLACEMENT","IMPRESSIONS","SPONSORED_ARTICLE","CREATIVE","CAMPAIGN_MANAGEMENT","ANALYTICS"]}},"evidence":{"type":"object","properties":{"reference":{"type":"string","minLength":5,"maxLength":500},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"issuer":{"type":"string","minLength":3,"maxLength":200}},"required":["reference","sha256","issuer"],"additionalProperties":false},"valid_until":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["professional_status","countries","service_types","evidence","valid_until"],"additionalProperties":false}},"required":["contracting_capacity_evidence"],"additionalProperties":false},"domicile_country":{"type":"string","pattern":"^[A-Z]{2}$"},"tax_registration_ids":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}},"authority_public_jwk":{"oneOf":[{"type":"object","properties":{"kty":{"type":"string","const":"OKP"},"crv":{"type":"string","const":"Ed25519"},"x":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$"},"kid":{"type":"string","maxLength":100}},"required":["kty","crv","x"],"additionalProperties":false},{"type":"object","properties":{"kty":{"type":"string","const":"EC"},"crv":{"type":"string","const":"P-256"},"x":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$"},"y":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$"},"kid":{"type":"string","maxLength":100}},"required":["kty","crv","x","y"],"additionalProperties":false}]},"verification_evidence":{"type":"object","properties":{"reference":{"type":"string","minLength":5,"maxLength":500},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"issuer":{"type":"string","minLength":3,"maxLength":200}},"required":["reference","sha256","issuer"],"additionalProperties":false},"beneficiary":{"anyOf":[{"type":"object","properties":{"reference":{"type":"string","minLength":3,"maxLength":200},"connector_id":{"type":"string"},"evidence_ref":{"type":"string","minLength":5,"maxLength":500},"owner_principal_id":{"type":"string","minLength":1,"maxLength":200}},"required":["reference","connector_id","evidence_ref"],"additionalProperties":false},{"type":"null"}]}},"required":["registered_name","domicile_country","tax_registration_ids","authority_public_jwk","verification_evidence","beneficiary"],"additionalProperties":false},"authority_proof":{"type":"string","maxLength":12000}},"required":["declaration","authority_proof"],"additionalProperties":false}}}}},"get":{"operationId":"get_v1_principal_verifications","summary":"principal-verifications","tags":["Agent API"],"security":[{"AgentBearer":[]}],"parameters":[],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/staff/principal-verifications":{"get":{"operationId":"get_v1_staff_principal_verifications","summary":"staff / principal-verifications","tags":["Staff oversight"],"security":[{"StaffCookie":[]}],"parameters":[],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/staff/principal-verifications/{id}/decision":{"post":{"operationId":"post_v1_staff_principal_verifications_id_decision","summary":"staff / principal-verifications / {id} / decision","tags":["Staff oversight"],"security":[{"StaffCookie":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":160}},{"name":"X-CSRF-Token","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"decision":{"type":"string","enum":["APPROVED","REJECTED"]},"declaration_hash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"review_note":{"type":"string","minLength":20,"maxLength":4000},"evidence_checked":{"type":"boolean"}},"required":["decision","declaration_hash","review_note","evidence_checked"],"additionalProperties":false}}}}}},"/v1/principal-authorities":{"get":{"operationId":"get_v1_principal_authorities","summary":"principal-authorities","tags":["Agent API"],"security":[{"AgentBearer":[]}],"parameters":[],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/mandates":{"post":{"operationId":"post_v1_mandates","summary":"mandates","tags":["Agent API"],"security":[{"AgentBearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":160}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"authority_id":{"type":"string"},"mandate":{"type":"object","properties":{"reference":{"type":"string","minLength":5,"maxLength":160},"actions":{"minItems":1,"maxItems":6,"type":"array","items":{"type":"string","enum":["BUY","SELL","SETTLE","REFUND","CANCEL","RESOLVE_DISPUTE"]}},"limits":{"minItems":1,"maxItems":30,"type":"array","items":{"type":"object","properties":{"amount":{"type":"string","minLength":1,"maxLength":40},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amount","currency"],"additionalProperties":false}},"countries":{"minItems":1,"maxItems":250,"type":"array","items":{"type":"string","pattern":"^[A-Z]{2}$"}},"formats":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"string","enum":["NEWSLETTER","WEB_PLACEMENT","IMPRESSIONS","SPONSORED_ARTICLE","CREATIVE","CAMPAIGN_MANAGEMENT","ANALYTICS"]}},"valid_from":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"valid_to":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["reference","actions","limits","countries","formats","valid_from","valid_to"],"additionalProperties":false},"authority_proof":{"type":"string","maxLength":12000}},"required":["authority_id","mandate","authority_proof"],"additionalProperties":false}}}}}},"/v1/mandates/{id}/revoke":{"post":{"operationId":"post_v1_mandates_id_revoke","summary":"mandates / {id} / revoke","tags":["Agent API"],"security":[{"AgentBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":160}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/budgets":{"post":{"operationId":"post_v1_budgets","summary":"budgets","tags":["Agent API"],"security":[{"AgentBearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":160}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"authority_id":{"type":"string"},"budget":{"type":"object","properties":{"reference":{"type":"string","minLength":5,"maxLength":160},"limit":{"type":"object","properties":{"amount":{"type":"string","minLength":1,"maxLength":40},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amount","currency"],"additionalProperties":false},"period_start":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"period_end":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["reference","limit","period_start","period_end"],"additionalProperties":false},"authority_proof":{"type":"string","maxLength":12000}},"required":["authority_id","budget","authority_proof"],"additionalProperties":false}}}}},"get":{"operationId":"get_v1_budgets","summary":"budgets","tags":["Agent API"],"security":[{"AgentBearer":[]}],"parameters":[],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/webhooks":{"post":{"operationId":"post_v1_webhooks","summary":"webhooks","tags":["Agent API"],"security":[{"AgentBearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":160}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"url":{"type":"string","maxLength":2048,"format":"uri"},"topics":{"minItems":1,"maxItems":30,"type":"array","items":{"type":"string","pattern":"^[a-z_]+\\.[a-z_]+$"}}},"required":["url","topics"],"additionalProperties":false}}}}},"get":{"operationId":"get_v1_webhooks","summary":"webhooks","tags":["Agent API"],"security":[{"AgentBearer":[]}],"parameters":[],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/webhooks/{id}/revoke":{"post":{"operationId":"post_v1_webhooks_id_revoke","summary":"webhooks / {id} / revoke","tags":["Agent API"],"security":[{"AgentBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":160}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/auth/login":{"post":{"operationId":"post_auth_login","summary":"login","tags":["Agent API"],"security":[],"parameters":[],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"email":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"password":{"type":"string","minLength":1,"maxLength":1024}},"required":["email","password"],"additionalProperties":false}}}}}},"/auth/methods":{"get":{"operationId":"get_auth_methods","summary":"methods","tags":["Agent API"],"security":[],"parameters":[],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/auth/session":{"get":{"operationId":"get_auth_session","summary":"session","tags":["Agent API"],"security":[],"parameters":[],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/auth/oidc/start":{"get":{"operationId":"get_auth_oidc_start","summary":"oidc / start","tags":["Agent API"],"security":[],"parameters":[],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/auth/oidc/callback":{"get":{"operationId":"get_auth_oidc_callback","summary":"oidc / callback","tags":["Agent API"],"security":[],"parameters":[],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/staff/logout":{"post":{"operationId":"post_v1_staff_logout","summary":"staff / logout","tags":["Staff oversight"],"security":[{"StaffCookie":[]}],"parameters":[{"name":"X-CSRF-Token","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/staff/me":{"get":{"operationId":"get_v1_staff_me","summary":"staff / me","tags":["Staff oversight"],"security":[{"StaffCookie":[]}],"parameters":[],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/health":{"get":{"operationId":"get_v1_health","summary":"health","tags":["Agent API"],"security":[],"parameters":[],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/capabilities":{"get":{"operationId":"get_v1_capabilities","summary":"capabilities","tags":["Agent API"],"security":[],"parameters":[],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/catalog":{"get":{"operationId":"get_v1_catalog","summary":"catalog","tags":["Agent API"],"security":[],"parameters":[],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/agent/me":{"get":{"operationId":"get_v1_agent_me","summary":"agent / me","tags":["Agent API"],"security":[{"AgentBearer":[]}],"parameters":[],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/catalog/products":{"post":{"operationId":"post_v1_catalog_products","summary":"catalog / products","tags":["Agent API"],"security":[{"AgentBearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":160}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"mandate_id":{"type":"string"},"connector_id":{"type":"string"},"title":{"type":"string","minLength":3,"maxLength":180},"description":{"type":"string","minLength":5,"maxLength":6000},"format":{"type":"string","enum":["NEWSLETTER","WEB_PLACEMENT","IMPRESSIONS","SPONSORED_ARTICLE","CREATIVE","CAMPAIGN_MANAGEMENT","ANALYTICS"]},"country":{"type":"string","pattern":"^[A-Z]{2}$"},"unit_price":{"type":"object","properties":{"amount":{"type":"string","minLength":1,"maxLength":40},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amount","currency"],"additionalProperties":false},"capacity":{"type":"integer","exclusiveMinimum":0,"maximum":1000000},"guarantee":{"type":"string","enum":["INDICATIVE","LOCAL_HOLD","SELLER_CONFIRMED","ALLOCATED_CAPACITY"]},"authorization_ref":{"type":"string","minLength":3},"payment_profile_ref":{"type":"string"},"provenance":{"type":"object","properties":{"property_id":{"type":"string"},"seller_authorization_ref":{"type":"string"},"valid_until":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["property_id","seller_authorization_ref","valid_until"],"additionalProperties":false}},"required":["mandate_id","connector_id","title","description","format","country","unit_price","capacity","guarantee","authorization_ref","provenance"],"additionalProperties":false}}}}}},"/v1/rfqs":{"get":{"operationId":"get_v1_rfqs","summary":"rfqs","tags":["Agent API"],"security":[{"AgentBearer":[]}],"parameters":[],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"post_v1_rfqs","summary":"rfqs","tags":["Agent API"],"security":[{"AgentBearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":160}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":180},"brief":{"type":"string","minLength":5,"maxLength":8000},"country":{"type":"string","pattern":"^[A-Z]{2}$"},"format":{"type":"string","enum":["NEWSLETTER","WEB_PLACEMENT","IMPRESSIONS","SPONSORED_ARTICLE","CREATIVE","CAMPAIGN_MANAGEMENT","ANALYTICS"]},"budget":{"type":"object","properties":{"amount":{"type":"string","minLength":1,"maxLength":40},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amount","currency"],"additionalProperties":false},"quantity":{"type":"integer","exclusiveMinimum":0,"maximum":1000000},"start_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"end_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"timezone":{"type":"string","minLength":3,"maxLength":80},"expires_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"required_terms":{"default":[],"maxItems":20,"type":"array","items":{"type":"string"}},"payment":{"type":"object","properties":{"profile_ref":{"type":"string","minLength":1,"maxLength":200},"provider_account_ref":{"type":"string","minLength":1,"maxLength":200},"provider_product":{"type":"string","minLength":1,"maxLength":200},"provider_legal_entity_ref":{"type":"string","minLength":1,"maxLength":200},"collection_source_ref":{"anyOf":[{"type":"string","minLength":3,"maxLength":500},{"type":"null"}]},"milestones":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"object","properties":{"reference":{"type":"string","minLength":1,"maxLength":200},"title":{"type":"string","minLength":3,"maxLength":180},"quantity":{"type":"integer","exclusiveMinimum":0,"maximum":1000000},"start_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"end_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"funding_due_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["reference","title","quantity","start_at","end_at","funding_due_at"],"additionalProperties":false}}},"required":["profile_ref","provider_account_ref","provider_product","provider_legal_entity_ref","collection_source_ref","milestones"],"additionalProperties":false},"ranking_weights":{"default":{"all_in_price":100},"type":"object","properties":{"all_in_price":{"type":"number","const":100}},"required":["all_in_price"],"additionalProperties":false}},"required":["title","brief","country","format","budget","quantity","start_at","end_at","timezone","expires_at"],"additionalProperties":false}}}}}},"/v1/rfqs/{id}":{"patch":{"operationId":"patch_v1_rfqs_id_","summary":"rfqs / {id}","tags":["Agent API"],"security":[{"AgentBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":160}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"expected_revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"state":{"type":"string","enum":["OPEN","CANCELLED"]},"brief":{"type":"string","minLength":5,"maxLength":8000},"budget":{"type":"object","properties":{"amount":{"type":"string"},"currency":{"type":"string"}},"required":["amount","currency"],"additionalProperties":false}},"required":["expected_revision","state"],"additionalProperties":false}}}}}},"/v1/offers":{"get":{"operationId":"get_v1_offers","summary":"offers","tags":["Agent API"],"security":[{"AgentBearer":[]}],"parameters":[{"name":"rfq_id","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"post_v1_offers","summary":"offers","tags":["Agent API"],"security":[{"AgentBearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":160}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"payment":{"type":"object","properties":{"profile_ref":{"type":"string","minLength":1,"maxLength":200},"provider_account_ref":{"type":"string","minLength":1,"maxLength":200},"provider_product":{"type":"string","minLength":1,"maxLength":200},"provider_legal_entity_ref":{"type":"string","minLength":1,"maxLength":200},"collection_source_ref":{"anyOf":[{"type":"string","minLength":3,"maxLength":500},{"type":"null"}]},"milestones":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"object","properties":{"reference":{"type":"string","minLength":1,"maxLength":200},"title":{"type":"string","minLength":3,"maxLength":180},"quantity":{"type":"integer","exclusiveMinimum":0,"maximum":1000000},"start_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"end_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"funding_due_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["reference","title","quantity","start_at","end_at","funding_due_at"],"additionalProperties":false}}},"required":["profile_ref","provider_account_ref","provider_product","provider_legal_entity_ref","collection_source_ref","milestones"],"additionalProperties":false},"delivery_policy_ref":{"type":"string"},"rfq_id":{"type":"string"},"rfq_revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"product_id":{"type":"string"},"product_revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"mandate_id":{"type":"string"},"unit_price":{"type":"object","properties":{"amount":{"type":"string","minLength":1,"maxLength":40},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amount","currency"],"additionalProperties":false},"quantity":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"expires_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"tax":{"type":"object","properties":{"status":{"type":"string","enum":["DETERMINED","UNDETERMINED"]},"amount":{"anyOf":[{"type":"object","properties":{"amount":{"type":"string","minLength":1,"maxLength":40},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amount","currency"],"additionalProperties":false},{"type":"null"}]},"ruleset_ref":{"type":["string","null"]}},"required":["status","amount","ruleset_ref"],"additionalProperties":false},"evidence_source_ids":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"string"}},"evidence_rule":{"type":"string","enum":["TRUSTED_REPORT","CORROBORATED_REPORT"]},"dispute_window_seconds":{"type":"integer","minimum":0,"maximum":2592000},"cancellation":{"type":"string","enum":["BEFORE_BOOKING","NO_AUTOMATIC_CANCELLATION"]},"supersedes":{"type":"string"}},"required":["rfq_id","rfq_revision","product_id","product_revision","mandate_id","unit_price","quantity","expires_at","evidence_source_ids","evidence_rule","dispute_window_seconds","cancellation"],"additionalProperties":false}}}}}},"/v1/rfqs/{id}/rank":{"post":{"operationId":"post_v1_rfqs_id_rank","summary":"rfqs / {id} / rank","tags":["Agent API"],"security":[{"AgentBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":160}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/trades/prepare":{"post":{"operationId":"post_v1_trades_prepare","summary":"trades / prepare","tags":["Agent API"],"security":[{"AgentBearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":160}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"offer_id":{"type":"string"},"expected_revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"accepted_offer_hash":{"type":"string","minLength":64,"maxLength":64}},"required":["offer_id","expected_revision","accepted_offer_hash"],"additionalProperties":false}}}}}},"/v1/trades/commit":{"post":{"operationId":"post_v1_trades_commit","summary":"trades / commit","tags":["Agent API"],"security":[{"AgentBearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":160}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"prepared_trade_ref":{"type":"string"},"accepted_offer_hash":{"type":"string","minLength":64,"maxLength":64},"mandate_id":{"type":"string"},"budget_id":{"type":"string"}},"required":["prepared_trade_ref","accepted_offer_hash","mandate_id","budget_id"],"additionalProperties":false}}}}}},"/v1/orders":{"get":{"operationId":"get_v1_orders","summary":"orders","tags":["Agent API"],"security":[{"AgentBearer":[]}],"parameters":[],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Order"}}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orders/{id}":{"get":{"operationId":"get_v1_orders_id_","summary":"orders / {id}","tags":["Agent API"],"security":[{"AgentBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orders/{id}/settlements":{"post":{"operationId":"post_v1_orders_id_settlements","summary":"orders / {id} / settlements","tags":["Agent API"],"security":[{"AgentBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":160}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"mandate_id":{"type":"string"},"expected_revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"retry_of":{"type":"string"}},"required":["mandate_id","expected_revision"],"additionalProperties":false}}}}}},"/v1/orders/{id}/refunds":{"post":{"operationId":"post_v1_orders_id_refunds","summary":"orders / {id} / refunds","tags":["Agent API"],"security":[{"AgentBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":160}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"mandate_id":{"type":"string"},"expected_revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"retry_of":{"type":"string"}},"required":["mandate_id","expected_revision"],"additionalProperties":false}}}}}},"/v1/orders/{id}/cancel":{"post":{"operationId":"post_v1_orders_id_cancel","summary":"orders / {id} / cancel","tags":["Agent API"],"security":[{"AgentBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":160}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"mandate_id":{"type":"string"},"expected_revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["mandate_id","expected_revision"],"additionalProperties":false}}}}}},"/v1/orders/{id}/evidence":{"post":{"operationId":"post_v1_orders_id_evidence","summary":"orders / {id} / evidence","tags":["Agent API"],"security":[{"AgentBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":160}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"source_event_id":{"type":"string","minLength":3,"maxLength":180},"milestone_ref":{"type":"string","minLength":1,"maxLength":200},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"correction_of":{"type":"string"},"period_start":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"period_end":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"reported_quantity":{"type":"integer","minimum":0,"maximum":9007199254740991},"rejected_quantity":{"type":"integer","minimum":0,"maximum":9007199254740991},"final":{"type":"boolean"},"content_sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"source_record_ref":{"type":"string","minLength":3,"maxLength":500},"source_record":{"type":"object","properties":{"accepted":{"type":"integer","minimum":0,"maximum":9007199254740991},"rejected":{"type":"integer","minimum":0,"maximum":9007199254740991},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["accepted","rejected","revision"],"additionalProperties":false}},"required":["source_event_id","revision","period_start","period_end","reported_quantity","rejected_quantity","final","content_sha256","source_record_ref","source_record"],"additionalProperties":false}}}}},"get":{"operationId":"get_v1_orders_id_evidence","summary":"orders / {id} / evidence","tags":["Agent API"],"security":[{"AgentBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orders/{id}/verify":{"post":{"operationId":"post_v1_orders_id_verify","summary":"orders / {id} / verify","tags":["Agent API"],"security":[{"AgentBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":160}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orders/{id}/disputes":{"post":{"operationId":"post_v1_orders_id_disputes","summary":"orders / {id} / disputes","tags":["Agent API"],"security":[{"AgentBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":160}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"milestone_ref":{"type":"string","minLength":1,"maxLength":200},"amount":{"type":"object","properties":{"amount":{"type":"string"},"currency":{"type":"string"}},"required":["amount","currency"],"additionalProperties":false},"reason":{"type":"string","minLength":10,"maxLength":4000},"evidence_refs":{"maxItems":30,"type":"array","items":{"type":"string"}},"expected_revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["amount","reason","evidence_refs","expected_revision"],"additionalProperties":false}}}}},"get":{"operationId":"get_v1_orders_id_disputes","summary":"orders / {id} / disputes","tags":["Agent API"],"security":[{"AgentBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/disputes/{id}/withdraw":{"post":{"operationId":"post_v1_disputes_id_withdraw","summary":"disputes / {id} / withdraw","tags":["Agent API"],"security":[{"AgentBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":160}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/disputes/{id}/resolutions":{"post":{"operationId":"post_v1_disputes_id_resolutions","summary":"disputes / {id} / resolutions","tags":["Agent API"],"security":[{"AgentBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":160}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"mandate_id":{"type":"string"},"expected_order_revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"accepted_quantity":{"type":"integer","minimum":0,"maximum":9007199254740991},"milestone_quantities":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"object","properties":{"reference":{"type":"string"},"accepted_quantity":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["reference","accepted_quantity"],"additionalProperties":false}},"reason":{"type":"string","minLength":10,"maxLength":4000},"expires_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["mandate_id","expected_order_revision","accepted_quantity","reason","expires_at"],"additionalProperties":false}}}}}},"/v1/dispute-resolutions/{id}/accept":{"post":{"operationId":"post_v1_dispute_resolutions_id_accept","summary":"dispute-resolutions / {id} / accept","tags":["Agent API"],"security":[{"AgentBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":160}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"mandate_id":{"type":"string"},"content_hash":{"type":"string","minLength":64,"maxLength":64}},"required":["mandate_id","content_hash"],"additionalProperties":false}}}}}},"/v1/delivery-policy":{"get":{"operationId":"get_v1_delivery_policy","summary":"delivery-policy","tags":["Agent API"],"security":[],"parameters":[],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/staff/payment-profiles":{"get":{"operationId":"get_v1_staff_payment_profiles","summary":"staff / payment-profiles","tags":["Staff oversight"],"security":[{"StaffCookie":[]}],"parameters":[],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"post_v1_staff_payment_profiles","summary":"staff / payment-profiles","tags":["Staff oversight"],"security":[{"StaffCookie":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":160}},{"name":"X-CSRF-Token","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"TERMS"},"supersedes":{"type":"string","minLength":1,"maxLength":200},"body":{"type":"object","properties":{"schema_version":{"type":"string","const":"1.0"},"environment":{"type":"string","enum":["sandbox","production"]},"account_owner_principal_id":{"type":"string","minLength":1,"maxLength":200},"provider_legal_entity_ref":{"type":"string","minLength":1,"maxLength":200},"provider_product":{"type":"string","minLength":1,"maxLength":200},"provider_account_ref":{"type":"string","minLength":1,"maxLength":200},"source_connector_id":{"type":"string","minLength":1,"maxLength":200},"service_type":{"type":"string","enum":["NEWSLETTER","WEB_PLACEMENT","IMPRESSIONS","SPONSORED_ARTICLE","CREATIVE","CAMPAIGN_MANAGEMENT","ANALYTICS"]},"country":{"type":"string","pattern":"^[A-Z]{2}$"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"funds_flow_policy_ref":{"type":"string","minLength":1,"maxLength":200},"source":{"type":"object","properties":{"reference":{"type":"string","minLength":3,"maxLength":1000},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"effective_from":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"effective_to":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"checked_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"precedence":{"type":"string","minLength":10,"maxLength":2000}},"required":["reference","sha256","effective_from","effective_to","checked_at","precedence"],"additionalProperties":false},"participant_eligibility":{"type":"object","properties":{"seller_principal_types":{"minItems":1,"maxItems":2,"type":"array","items":{"type":"string","enum":["INDIVIDUAL","ORGANIZATION"]}},"access_mode":{"type":"string","enum":["SERVICE_DELIVERY_ONLY","SELLER_PROVIDER_ACCOUNT","BUYER_DELEGATED_ACCESS"]},"independent_service_terms_ref":{"type":"string","minLength":5,"maxLength":500},"source":{"type":"object","properties":{"reference":{"type":"string","minLength":5,"maxLength":500},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"issuer":{"type":"string","minLength":3,"maxLength":200}},"required":["reference","sha256","issuer"],"additionalProperties":false},"provider_authorization":{"type":"object","properties":{"seller_principal_id":{"type":"string","minLength":1,"maxLength":200},"account_owner_principal_id":{"type":"string","minLength":1,"maxLength":200},"provider_account_ref":{"type":"string","minLength":1,"maxLength":200},"evidence":{"type":"object","properties":{"reference":{"type":"string","minLength":5,"maxLength":500},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"issuer":{"type":"string","minLength":3,"maxLength":200}},"required":["reference","sha256","issuer"],"additionalProperties":false},"valid_until":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["seller_principal_id","account_owner_principal_id","provider_account_ref","evidence","valid_until"],"additionalProperties":false}},"required":["seller_principal_types","access_mode","independent_service_terms_ref","source"],"additionalProperties":false},"debtor_rule":{"type":"string","const":"CONTRACTING_BUYER"},"mode":{"type":"string","enum":["FUNDED_MILESTONES","VERIFIED_CREDIT","CONDITIONAL_COLLECTION"]},"facility_ref":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}]},"automatic_payment":{"type":"boolean"},"automatic_refund":{"type":"boolean"},"funding_lead_seconds":{"type":"integer","minimum":1,"maximum":86400},"due":{"type":"object","properties":{"anchor":{"type":"string","enum":["SERVICE_END","ACCEPTANCE","INVOICE_ISSUED","VALID_INVOICE_RECEIVED","COLLECTION_RECEIVED"]},"month_end":{"type":"boolean"},"days":{"type":"integer","minimum":0,"maximum":730},"day_type":{"type":"string","enum":["CALENDAR","BUSINESS"]},"timezone":{"type":"string","minLength":3,"maxLength":80},"time":{"type":"string","pattern":"^([01][0-9]|2[0-3]):[0-5][0-9]$"},"holidays":{"maxItems":1000,"type":"array","items":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"weekend_days":{"maxItems":6,"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"weekend_adjustment":{"type":"string","enum":["NONE","FOLLOWING"]}},"required":["anchor","month_end","days","day_type","timezone","time","holidays","weekend_days","weekend_adjustment"],"additionalProperties":false},"invoice":{"type":"object","properties":{"delivery_method":{"type":"string","const":"AGENTX_INBOX"},"issue":{"type":"string","enum":["AT_ACCEPTANCE","AT_PAYMENT"]},"authority_ref":{"type":"string","minLength":3,"maxLength":500},"validation_hours":{"type":"integer","minimum":1,"maximum":720},"automatic_validation":{"type":"boolean"},"requirements":{"maxItems":30,"type":"array","items":{"type":"string","minLength":3,"maxLength":300}}},"required":["delivery_method","issue","authority_ref","validation_hours","automatic_validation","requirements"],"additionalProperties":false},"acceptance":{"type":"object","properties":{"mode":{"type":"string","enum":["VERIFIED_EVIDENCE","REVIEW_THEN_AUTO"]},"review_hours":{"type":"integer","minimum":0,"maximum":720},"criteria":{"type":"string","minLength":10,"maxLength":4000}},"required":["mode","review_hours","criteria"],"additionalProperties":false},"payout":{"type":"object","properties":{"discharge_event":{"type":"string","enum":["TRANSFER_CONFIRMED","BANK_PAYOUT_CONFIRMED"]},"method":{"type":"string","minLength":2,"maxLength":120},"minimum_minor":{"type":"string","pattern":"^(0|[1-9][0-9]{0,35})$"},"final_balance_days":{"type":"integer","minimum":0,"maximum":730},"estimated_bank_days":{"type":"integer","minimum":0,"maximum":60},"maximum_hold_days":{"type":"integer","minimum":1,"maximum":730},"provider_fee_minor":{"type":"string","pattern":"^(0|[1-9][0-9]{0,35})$"},"fee_payer":{"type":"string","enum":["PLATFORM","DEBTOR"]}},"required":["discharge_event","method","minimum_minor","final_balance_days","estimated_bank_days","maximum_hold_days","provider_fee_minor","fee_payer"],"additionalProperties":false},"risk":{"type":"object","properties":{"collection_dependency":{"type":"boolean"},"recourse_rule":{"type":"string","enum":["CONTRACTING_BUYER","NAMED_PRINCIPAL"]},"recourse_principal_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}]},"chargeback_terms":{"type":"string","minLength":10,"maxLength":4000},"cancellation_terms":{"type":"string","minLength":10,"maxLength":4000},"reserve_minor":{"type":"string","pattern":"^(0|[1-9][0-9]{0,35})$"},"reserve_release_days":{"type":"integer","minimum":0,"maximum":730},"guarantee_ref":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"guaranteed_due":{"anyOf":[{"type":"object","properties":{"anchor":{"type":"string","enum":["SERVICE_END","ACCEPTANCE","INVOICE_ISSUED","VALID_INVOICE_RECEIVED","COLLECTION_RECEIVED"]},"month_end":{"type":"boolean"},"days":{"type":"integer","minimum":0,"maximum":730},"day_type":{"type":"string","enum":["CALENDAR","BUSINESS"]},"timezone":{"type":"string","minLength":3,"maxLength":80},"time":{"type":"string","pattern":"^([01][0-9]|2[0-3]):[0-5][0-9]$"},"holidays":{"maxItems":1000,"type":"array","items":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"weekend_days":{"maxItems":6,"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"weekend_adjustment":{"type":"string","enum":["NONE","FOLLOWING"]}},"required":["anchor","month_end","days","day_type","timezone","time","holidays","weekend_days","weekend_adjustment"],"additionalProperties":false},{"type":"null"}]}},"required":["collection_dependency","recourse_rule","recourse_principal_id","chargeback_terms","cancellation_terms","reserve_minor","reserve_release_days","guarantee_ref","guaranteed_due"],"additionalProperties":false}},"required":["schema_version","environment","account_owner_principal_id","provider_legal_entity_ref","provider_product","provider_account_ref","source_connector_id","service_type","country","currency","funds_flow_policy_ref","source","debtor_rule","mode","facility_ref","automatic_payment","automatic_refund","funding_lead_seconds","due","invoice","acceptance","payout","risk"],"additionalProperties":false}},"required":["kind","body"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"FACILITY"},"supersedes":{"type":"string","minLength":1,"maxLength":200},"body":{"type":"object","properties":{"schema_version":{"type":"string","const":"1.0"},"environment":{"type":"string","enum":["sandbox","production"]},"debtor_principal_id":{"type":"string","minLength":1,"maxLength":200},"funding_principal_id":{"type":"string","minLength":1,"maxLength":200},"payment_connector_id":{"type":"string","minLength":1,"maxLength":200},"provider_facility_ref":{"type":"string","minLength":1,"maxLength":200},"draw_authority_ref":{"type":"string","minLength":1,"maxLength":200},"funding_model":{"type":"string","const":"PREFUND_EACH_MILESTONE"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"limit_minor":{"type":"string","pattern":"^(0|[1-9][0-9]{0,35})$"},"source":{"type":"object","properties":{"reference":{"type":"string","minLength":3,"maxLength":1000},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"effective_from":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"effective_to":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"checked_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"precedence":{"type":"string","minLength":10,"maxLength":2000}},"required":["reference","sha256","effective_from","effective_to","checked_at","precedence"],"additionalProperties":false},"kind":{"type":"string","enum":["CREDIT","GUARANTEE"]},"coverage":{"type":"string","minLength":10,"maxLength":4000},"exclusions":{"type":"string","minLength":3,"maxLength":4000},"repayment_due":{"type":"object","properties":{"anchor":{"type":"string","enum":["SERVICE_END","ACCEPTANCE","INVOICE_ISSUED","VALID_INVOICE_RECEIVED","COLLECTION_RECEIVED"]},"month_end":{"type":"boolean"},"days":{"type":"integer","minimum":0,"maximum":730},"day_type":{"type":"string","enum":["CALENDAR","BUSINESS"]},"timezone":{"type":"string","minLength":3,"maxLength":80},"time":{"type":"string","pattern":"^([01][0-9]|2[0-3]):[0-5][0-9]$"},"holidays":{"maxItems":1000,"type":"array","items":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"weekend_days":{"maxItems":6,"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"weekend_adjustment":{"type":"string","enum":["NONE","FOLLOWING"]}},"required":["anchor","month_end","days","day_type","timezone","time","holidays","weekend_days","weekend_adjustment"],"additionalProperties":false},"recourse_terms":{"type":"string","minLength":10,"maxLength":4000}},"required":["schema_version","environment","debtor_principal_id","funding_principal_id","payment_connector_id","provider_facility_ref","draw_authority_ref","funding_model","currency","limit_minor","source","kind","coverage","exclusions","repayment_due","recourse_terms"],"additionalProperties":false}},"required":["kind","body"],"additionalProperties":false}]}}}}}},"/v1/staff/payment-profiles/{id}":{"get":{"operationId":"get_v1_staff_payment_profiles_id_","summary":"staff / payment-profiles / {id}","tags":["Staff oversight"],"security":[{"StaffCookie":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/staff/payment-profiles/{id}/decision":{"post":{"operationId":"post_v1_staff_payment_profiles_id_decision","summary":"staff / payment-profiles / {id} / decision","tags":["Staff oversight"],"security":[{"StaffCookie":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":160}},{"name":"X-CSRF-Token","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"content_hash":{"type":"string","minLength":64,"maxLength":64},"decision":{"type":"string","enum":["APPROVE","REJECT"]},"reason":{"type":"string","minLength":10,"maxLength":3000},"evidence_refs":{"minItems":1,"maxItems":30,"type":"array","items":{"type":"string","minLength":3,"maxLength":500}}},"required":["content_hash","decision","reason","evidence_refs"],"additionalProperties":false}}}}}},"/v1/staff/payment-profiles/{id}/status":{"post":{"operationId":"post_v1_staff_payment_profiles_id_status","summary":"staff / payment-profiles / {id} / status","tags":["Staff oversight"],"security":[{"StaffCookie":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":160}},{"name":"X-CSRF-Token","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"content_hash":{"type":"string","minLength":64,"maxLength":64},"state":{"type":"string","enum":["STALE","CONFLICTED","SUSPENDED"]},"reason":{"type":"string","minLength":10,"maxLength":3000},"evidence_ref":{"type":"string","minLength":3,"maxLength":500}},"required":["content_hash","state","reason","evidence_ref"],"additionalProperties":false}}}}}},"/v1/payment-profiles/{id}":{"get":{"operationId":"get_v1_payment_profiles_id_","summary":"payment-profiles / {id}","tags":["Agent API"],"security":[{"AgentBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/payments":{"get":{"operationId":"get_v1_payments","summary":"payments","tags":["Agent API"],"security":[{"AgentBearer":[]}],"parameters":[],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/staff/payments":{"get":{"operationId":"get_v1_staff_payments","summary":"staff / payments","tags":["Staff oversight"],"security":[{"StaffCookie":[]}],"parameters":[],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orders/{id}/payments":{"get":{"operationId":"get_v1_orders_id_payments","summary":"orders / {id} / payments","tags":["Agent API"],"security":[{"AgentBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/staff/payments/{id}":{"get":{"operationId":"get_v1_staff_payments_id_","summary":"staff / payments / {id}","tags":["Staff oversight"],"security":[{"StaffCookie":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orders/{id}/invoice-review":{"post":{"operationId":"post_v1_orders_id_invoice_review","summary":"orders / {id} / invoice-review","tags":["Agent API"],"security":[{"AgentBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":160}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"milestone_ref":{"type":"string","minLength":1,"maxLength":200},"invoice_refs":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}},"decision":{"type":"string","enum":["VALID","REJECT"]},"reason":{"type":"string","minLength":10,"maxLength":3000},"evidence_refs":{"maxItems":30,"type":"array","items":{"type":"string","minLength":3,"maxLength":500}}},"required":["milestone_ref","invoice_refs","decision","reason","evidence_refs"],"additionalProperties":false}}}}}},"/v1/payment-cases":{"get":{"operationId":"get_v1_payment_cases","summary":"payment-cases","tags":["Agent API"],"security":[{"AgentBearer":[]}],"parameters":[],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"post_v1_payment_cases","summary":"payment-cases","tags":["Agent API"],"security":[{"AgentBearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":160}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"order_id":{"type":"string","minLength":1,"maxLength":200},"kind":{"type":"string","enum":["LATE_PAYMENT","INVOICE","FUNDING","DELIVERY","CHARGEBACK","PROVIDER_CHANGE","OTHER"]},"reason":{"type":"string","minLength":10,"maxLength":4000},"evidence_refs":{"maxItems":30,"type":"array","items":{"type":"string","minLength":3,"maxLength":500}},"amount_minor":{"type":"string","pattern":"^(0|[1-9][0-9]{0,35})$"}},"required":["order_id","kind","reason","evidence_refs","amount_minor"],"additionalProperties":false}}}}}},"/v1/payment-cases/{id}":{"get":{"operationId":"get_v1_payment_cases_id_","summary":"payment-cases / {id}","tags":["Agent API"],"security":[{"AgentBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/payment-cases/{id}/actions":{"post":{"operationId":"post_v1_payment_cases_id_actions","summary":"payment-cases / {id} / actions","tags":["Agent API"],"security":[{"AgentBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":160}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"expected_revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"action":{"type":"string","enum":["MESSAGE","APPEAL","RESOLVE","REOPEN","ESCALATE_FINANCE"]},"reason":{"type":"string","minLength":10,"maxLength":4000},"evidence_refs":{"maxItems":30,"type":"array","items":{"type":"string","minLength":3,"maxLength":500}}},"required":["expected_revision","action","reason","evidence_refs"],"additionalProperties":false}}}}}},"/v1/payment-events":{"post":{"operationId":"post_v1_payment_events","summary":"payment-events","tags":["Agent API"],"security":[{"AgentBearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":160}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"order_id":{"type":"string","minLength":1,"maxLength":200},"milestone_ref":{"type":"string","minLength":1,"maxLength":200},"kind":{"type":"string","enum":["COLLECTION_RECEIVED","FUNDS_RESTRICTED","FUNDS_RELEASED","FACILITY_REPAYMENT","CHARGEBACK"]},"source_event_id":{"type":"string","minLength":1,"maxLength":200},"occurred_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"amount_minor":{"type":"string","pattern":"^(0|[1-9][0-9]{0,35})$"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"source_ref":{"type":"string","minLength":3,"maxLength":500},"source_record":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"source_sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["order_id","kind","source_event_id","occurred_at","amount_minor","currency","source_ref","source_record","source_sha256"],"additionalProperties":false}}}}}},"/v1/agent/delivery-record":{"get":{"operationId":"get_v1_agent_delivery_record","summary":"agent / delivery-record","tags":["Agent API"],"security":[{"AgentBearer":[]}],"parameters":[{"name":"cursor","in":"query","schema":{"type":"string","maxLength":1000}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":100}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/delivery-incidents/{id}":{"get":{"operationId":"get_v1_delivery_incidents_id_","summary":"delivery-incidents / {id}","tags":["Agent API"],"security":[{"AgentBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/delivery-incidents/{id}/submissions":{"post":{"operationId":"post_v1_delivery_incidents_id_submissions","summary":"delivery-incidents / {id} / submissions","tags":["Agent API"],"security":[{"AgentBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":160}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"kind":{"type":"string","enum":["JUSTIFICATION","APPEAL"]},"reason_code":{"type":"string","minLength":3,"maxLength":80},"body":{"type":"string","minLength":10,"maxLength":12000},"evidence_refs":{"maxItems":40,"type":"array","items":{"type":"string","minLength":3,"maxLength":500}}},"required":["kind","reason_code","body","evidence_refs"],"additionalProperties":false}}}}}},"/v1/staff/delivery-incidents":{"get":{"operationId":"get_v1_staff_delivery_incidents","summary":"staff / delivery-incidents","tags":["Staff oversight"],"security":[{"StaffCookie":[]}],"parameters":[{"name":"cursor","in":"query","schema":{"type":"string","maxLength":1000}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":100}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/staff/delivery-incidents/{id}":{"get":{"operationId":"get_v1_staff_delivery_incidents_id_","summary":"staff / delivery-incidents / {id}","tags":["Staff oversight"],"security":[{"StaffCookie":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/staff/delivery-incidents/{id}/decision":{"post":{"operationId":"post_v1_staff_delivery_incidents_id_decision","summary":"staff / delivery-incidents / {id} / decision","tags":["Staff oversight"],"security":[{"StaffCookie":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":160}},{"name":"X-CSRF-Token","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"expected_revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"review_digest":{"type":"string","pattern":"^[a-f0-9]{64}$"},"reason":{"type":"string","minLength":20,"maxLength":4000},"decision":{"type":"string","enum":["CONFIRM_FAILURE","EXCUSE","UPHOLD_APPEAL","OVERTURN"]},"reason_code":{"type":"string","enum":["NOT_DELIVERED","UNJUSTIFIED_LATE_DELIVERY","ABANDONED","BUYER_DEPENDENCY_DELAY","VERIFIED_PROVIDER_OUTAGE","FORCE_MAJEURE","AGREED_EXTENSION","PLATFORM_FAULT","OTHER_EVIDENCED_CAUSE"]},"evidence_refs":{"minItems":1,"maxItems":40,"type":"array","items":{"type":"string","minLength":3,"maxLength":200}},"evidence_checked":{"type":"boolean","const":true},"responsibility_confirmed":{"type":"boolean"},"no_valid_justification":{"type":"boolean"},"actual_delivery_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["expected_revision","review_digest","reason","decision","reason_code","evidence_refs","evidence_checked","responsibility_confirmed","no_valid_justification"],"additionalProperties":false}}}}}},"/v1/staff/delivery-incidents/{id}/release":{"post":{"operationId":"post_v1_staff_delivery_incidents_id_release","summary":"staff / delivery-incidents / {id} / release","tags":["Staff oversight"],"security":[{"StaffCookie":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":160}},{"name":"X-CSRF-Token","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"expected_revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"review_digest":{"type":"string","pattern":"^[a-f0-9]{64}$"},"reason":{"type":"string","minLength":20,"maxLength":4000}},"required":["expected_revision","review_digest","reason"],"additionalProperties":false}}}}}},"/v1/support/cases":{"get":{"operationId":"get_v1_support_cases","summary":"support / cases","tags":["Support"],"security":[{"AgentBearer":[]}],"parameters":[],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"post_v1_support_cases","summary":"support / cases","tags":["Support"],"security":[{"AgentBearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":160}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"subject":{"type":"string","minLength":3,"maxLength":180},"body":{"type":"string","minLength":1,"maxLength":16000},"category":{"type":"string","enum":["DELIVERY","TECHNICAL","FINANCE","POLICY_APPEAL","STAFF_COMPLAINT","GENERAL"]},"visibility":{"type":"string","enum":["AGENT_VISIBLE","ADMIN_ONLY"]},"related_object_id":{"type":"string"},"reported_actor_id":{"type":"string"}},"required":["subject","body","category","visibility"],"additionalProperties":false}}}}}},"/v1/support/cases/{id}":{"get":{"operationId":"get_v1_support_cases_id_","summary":"support / cases / {id}","tags":["Support"],"security":[{"AgentBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"operationId":"patch_v1_support_cases_id_","summary":"support / cases / {id}","tags":["Support"],"security":[{"AgentBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":160}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"expected_revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"state":{"type":"string","enum":["OPEN","INVESTIGATING","WAITING_FOR_AGENT","ESCALATED","RESOLVED"]},"assignee_id":{"type":"string"},"reason":{"type":"string","minLength":5,"maxLength":2000}},"required":["expected_revision","reason"],"additionalProperties":false}}}}}},"/v1/support/cases/{id}/messages":{"post":{"operationId":"post_v1_support_cases_id_messages","summary":"support / cases / {id} / messages","tags":["Support"],"security":[{"AgentBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":160}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"body":{"type":"string","minLength":1,"maxLength":16000},"visibility":{"type":"string","enum":["AGENT_VISIBLE","STAFF_INTERNAL","ADMIN_ONLY"]},"correction_of":{"type":"string"}},"required":["body","visibility"],"additionalProperties":false}}}}}},"/v1/staff/overview":{"get":{"operationId":"get_v1_staff_overview","summary":"staff / overview","tags":["Staff oversight"],"security":[{"StaffCookie":[]}],"parameters":[],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/staff/orders":{"get":{"operationId":"get_v1_staff_orders","summary":"staff / orders","tags":["Staff oversight"],"security":[{"StaffCookie":[]}],"parameters":[],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/staff/finance":{"get":{"operationId":"get_v1_staff_finance","summary":"staff / finance","tags":["Staff oversight"],"security":[{"StaffCookie":[]}],"parameters":[],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/staff/agents":{"get":{"operationId":"get_v1_staff_agents","summary":"staff / agents","tags":["Staff oversight"],"security":[{"StaffCookie":[]}],"parameters":[],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/staff/people":{"get":{"operationId":"get_v1_staff_people","summary":"staff / people","tags":["Staff oversight"],"security":[{"StaffCookie":[]}],"parameters":[],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/staff/interventions":{"get":{"operationId":"get_v1_staff_interventions","summary":"staff / interventions","tags":["Staff oversight"],"security":[{"StaffCookie":[]}],"parameters":[],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"post_v1_staff_interventions","summary":"staff / interventions","tags":["Staff oversight"],"security":[{"StaffCookie":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":160}},{"name":"X-CSRF-Token","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","oneOf":[{"type":"object","properties":{"action":{"type":"string","const":"REVOKE_PRINCIPAL_AUTHORITY"},"target_id":{"type":"string"},"reason":{"type":"string","minLength":10},"payload":{"type":"object","properties":{},"additionalProperties":false}},"required":["action","target_id","reason","payload"],"additionalProperties":false},{"type":"object","properties":{"action":{"type":"string","const":"RELEASE_RESTRICTION"},"target_id":{"type":"string"},"reason":{"type":"string","minLength":10},"payload":{"type":"object","properties":{},"additionalProperties":false}},"required":["action","target_id","reason","payload"],"additionalProperties":false},{"type":"object","properties":{"action":{"type":"string","const":"STAFF_ROLE_CHANGE"},"target_id":{"type":"string"},"reason":{"type":"string","minLength":10},"payload":{"type":"object","properties":{"role":{"type":"string","enum":["PLATFORM_ADMIN","FINANCE_REVIEWER","OPERATIONS_MODERATOR"]}},"required":["role"],"additionalProperties":false}},"required":["action","target_id","reason","payload"],"additionalProperties":false},{"type":"object","properties":{"action":{"type":"string","const":"PUBLISH_NONFINANCIAL_POLICY"},"target_id":{"type":"string"},"reason":{"type":"string","minLength":10},"payload":{"type":"object","properties":{"kind":{"type":"string","enum":["SUPPORT","MODERATION","DELIVERY_RELIABILITY"]},"body":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["kind","body"],"additionalProperties":false}},"required":["action","target_id","reason","payload"],"additionalProperties":false},{"type":"object","properties":{"action":{"type":"string","const":"REVOKE_AGENT"},"target_id":{"type":"string"},"reason":{"type":"string","minLength":10},"payload":{"type":"object","properties":{},"additionalProperties":false}},"required":["action","target_id","reason","payload"],"additionalProperties":false}]}}}}}},"/v1/staff/interventions/{id}/decision":{"post":{"operationId":"post_v1_staff_interventions_id_decision","summary":"staff / interventions / {id} / decision","tags":["Staff oversight"],"security":[{"StaffCookie":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":160}},{"name":"X-CSRF-Token","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"decision":{"type":"string","enum":["APPROVED","REJECTED"]},"payload_hash":{"type":"string","minLength":64,"maxLength":64}},"required":["decision","payload_hash"],"additionalProperties":false}}}}}},"/v1/staff/restrictions":{"post":{"operationId":"post_v1_staff_restrictions","summary":"staff / restrictions","tags":["Staff oversight"],"security":[{"StaffCookie":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":160}},{"name":"X-CSRF-Token","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"scope_type":{"type":"string","enum":["global","principal","agent","product","connector"]},"scope_id":{"type":"string"},"channel":{"type":"string","enum":["NEW_TRADE","PAYOUT","REFUND"]},"reason":{"type":"string","minLength":10,"maxLength":2000},"evidence_ref":{"type":"string","minLength":3},"duration_minutes":{"type":"integer","minimum":1,"maximum":60}},"required":["scope_type","scope_id","channel","reason","evidence_ref","duration_minutes"],"additionalProperties":false}}}}},"get":{"operationId":"get_v1_staff_restrictions","summary":"staff / restrictions","tags":["Staff oversight"],"security":[{"StaffCookie":[]}],"parameters":[],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/staff/products/{id}":{"patch":{"operationId":"patch_v1_staff_products_id_","summary":"staff / products / {id}","tags":["Staff oversight"],"security":[{"StaffCookie":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":160}},{"name":"X-CSRF-Token","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"expected_revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"title":{"type":"string","minLength":3,"maxLength":180},"status":{"type":"string","enum":["ACTIVE","QUARANTINED"]},"reason":{"type":"string","minLength":5}},"required":["expected_revision","reason"],"additionalProperties":false}}}}}},"/v1/staff/audit":{"get":{"operationId":"get_v1_staff_audit","summary":"staff / audit","tags":["Staff oversight"],"security":[{"StaffCookie":[]}],"parameters":[],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/staff/connectors":{"get":{"operationId":"get_v1_staff_connectors","summary":"staff / connectors","tags":["Staff oversight"],"security":[{"StaffCookie":[]}],"parameters":[],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/staff/operations":{"get":{"operationId":"get_v1_staff_operations","summary":"staff / operations","tags":["Staff oversight"],"security":[{"StaffCookie":[]}],"parameters":[],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/staff/configuration":{"get":{"operationId":"get_v1_staff_configuration","summary":"staff / configuration","tags":["Staff oversight"],"security":[{"StaffCookie":[]}],"parameters":[],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/staff/fiscal-profiles":{"get":{"operationId":"get_v1_staff_fiscal_profiles","summary":"staff / fiscal-profiles","tags":["Staff oversight"],"security":[{"StaffCookie":[]}],"parameters":[],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"post_v1_staff_fiscal_profiles","summary":"staff / fiscal-profiles","tags":["Staff oversight"],"security":[{"StaffCookie":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":160}},{"name":"X-CSRF-Token","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"legal_entity_id":{"anyOf":[{"type":"string","minLength":3,"maxLength":500},{"type":"null"}]},"create_operator_entity":{"default":false,"type":"boolean"},"environment":{"type":"string","enum":["sandbox","production"]},"body":{"type":"object","properties":{"registered_name":{"type":"string","minLength":1,"maxLength":250},"principal_type":{"type":"string","enum":["INDIVIDUAL","ORGANIZATION"]},"tax_capacity":{"type":"string","enum":["BUSINESS","NON_BUSINESS"]},"domicile_country":{"type":"string","pattern":"^[A-Z]{2}$"},"registered_address":{"type":"string","minLength":5,"maxLength":1000},"tax_registration_ids":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"country":{"type":"string","pattern":"^[A-Z]{2}$"},"scheme":{"type":"string","minLength":3,"maxLength":500},"value":{"type":"string","minLength":3,"maxLength":500}},"required":["country","scheme","value"],"additionalProperties":false}},"tax_status":{"type":"string","enum":["REGISTERED","NOT_REGISTERED"]},"operating_countries":{"minItems":1,"maxItems":200,"type":"array","items":{"type":"string","pattern":"^[A-Z]{2}$"}},"service_types":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":3,"maxLength":500}},"effective_from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"effective_to":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"period_timezone":{"type":"string","minLength":3,"maxLength":500},"accounting_currency":{"type":"string","pattern":"^[A-Z]{3}$"},"reporting_currency":{"type":"string","pattern":"^[A-Z]{3}$"},"commercial_role":{"type":"string","const":"DISCLOSED_MARKETPLACE_AGENT"},"tax_point_basis":{"type":"string","enum":["INVOICE_ISSUED","PAYMENT_RECEIVED","SERVICE_START"]},"invoice_authority_ref":{"type":"string","minLength":3,"maxLength":500},"review":{"type":"object","properties":{"source_ref":{"type":"string","minLength":3,"maxLength":500},"reviewed_by":{"type":"string","minLength":3,"maxLength":500},"reviewed_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"evidence_sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["source_ref","reviewed_by","reviewed_at","evidence_sha256"],"additionalProperties":false},"accounts":{"type":"object","propertyNames":{"type":"string","enum":["PSP_CLEARING","CUSTOMER_FUNDS","SELLER_PAYABLE","PLATFORM_REVENUE","TAX_PAYABLE","SELLER_RECOVERABLE","CUSTOMER_REFUND_PAYABLE","CUSTOMER_RECEIVABLE"]},"additionalProperties":{"type":"object","properties":{"code":{"type":"string","minLength":3,"maxLength":500},"label":{"type":"string","minLength":3,"maxLength":500},"type":{"type":"string","enum":["ASSET","LIABILITY","EQUITY","REVENUE","EXPENSE"]}},"required":["code","label","type"],"additionalProperties":false},"required":["PSP_CLEARING","CUSTOMER_FUNDS","SELLER_PAYABLE","PLATFORM_REVENUE","TAX_PAYABLE","SELLER_RECOVERABLE","CUSTOMER_REFUND_PAYABLE","CUSTOMER_RECEIVABLE"]},"additional_accounts":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":3,"maxLength":500},"label":{"type":"string","minLength":3,"maxLength":500},"type":{"type":"string","enum":["ASSET","LIABILITY","EQUITY","REVENUE","EXPENSE"]}},"required":["code","label","type"],"additionalProperties":false}},"periods":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"object","properties":{"ref":{"type":"string","minLength":3,"maxLength":500},"start":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"end":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"filing_status":{"type":"string","enum":["NOT_FILED","FILED"]},"filing_receipt_ref":{"anyOf":[{"type":"string","minLength":3,"maxLength":500},{"type":"null"}]}},"required":["ref","start","end","filing_status","filing_receipt_ref"],"additionalProperties":false}},"rules":{"maxItems":500,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":3,"maxLength":500},"component":{"type":"string","enum":["MEDIA","PLATFORM_FEE"]},"service_type":{"type":"string","minLength":3,"maxLength":500},"supplier_country":{"type":"string","pattern":"^[A-Z]{2}$"},"customer_country":{"type":"string","pattern":"^[A-Z]{2}$"},"service_country":{"type":"string","pattern":"^[A-Z]{2}$"},"customer_tax_status":{"type":"string","enum":["REGISTERED","NOT_REGISTERED"]},"customer_tax_capacity":{"type":"string","enum":["BUSINESS","NON_BUSINESS"]},"effective_from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"effective_to":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"tax_jurisdiction":{"type":"string","minLength":3,"maxLength":500},"tax_type":{"type":"string","minLength":3,"maxLength":500},"tax_code":{"type":"string","minLength":3,"maxLength":500},"treatment":{"type":"string","enum":["STANDARD","EXEMPT","REVERSE_CHARGE","OUT_OF_SCOPE"]},"rate_basis_points":{"type":"integer","minimum":0,"maximum":10000},"explanation":{"type":"string","minLength":10,"maxLength":2000},"exemption_reason":{"anyOf":[{"type":"string","minLength":5,"maxLength":1000},{"type":"null"}]},"review":{"type":"object","properties":{"source_ref":{"type":"string","minLength":3,"maxLength":500},"reviewed_by":{"type":"string","minLength":3,"maxLength":500},"reviewed_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"evidence_sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["source_ref","reviewed_by","reviewed_at","evidence_sha256"],"additionalProperties":false}},"required":["id","component","service_type","supplier_country","customer_country","service_country","customer_tax_status","effective_from","effective_to","tax_jurisdiction","tax_type","tax_code","treatment","rate_basis_points","explanation","exemption_reason","review"],"additionalProperties":false}},"fx_rates":{"maxItems":1000,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":3,"maxLength":500},"from":{"type":"string","pattern":"^[A-Z]{3}$"},"to":{"type":"string","pattern":"^[A-Z]{3}$"},"numerator":{"type":"string","pattern":"^[1-9][0-9]{0,23}$"},"denominator":{"type":"string","pattern":"^[1-9][0-9]{0,23}$"},"effective_from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"effective_to":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"rate_date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"method":{"type":"string","minLength":3,"maxLength":500},"review":{"type":"object","properties":{"source_ref":{"type":"string","minLength":3,"maxLength":500},"reviewed_by":{"type":"string","minLength":3,"maxLength":500},"reviewed_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"evidence_sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["source_ref","reviewed_by","reviewed_at","evidence_sha256"],"additionalProperties":false}},"required":["id","from","to","numerator","denominator","effective_from","effective_to","rate_date","method","review"],"additionalProperties":false}}},"additionalProperties":false},"reason":{"type":"string","minLength":10,"maxLength":2000}},"required":["legal_entity_id","environment","body","reason"],"additionalProperties":false}}}}}},"/v1/staff/fiscal-profiles/{id}/submit":{"post":{"operationId":"post_v1_staff_fiscal_profiles_id_submit","summary":"staff / fiscal-profiles / {id} / submit","tags":["Staff oversight"],"security":[{"StaffCookie":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":160}},{"name":"X-CSRF-Token","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"content_hash":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["content_hash"],"additionalProperties":false}}}}}},"/v1/staff/fiscal-profiles/{id}/decision":{"post":{"operationId":"post_v1_staff_fiscal_profiles_id_decision","summary":"staff / fiscal-profiles / {id} / decision","tags":["Staff oversight"],"security":[{"StaffCookie":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":160}},{"name":"X-CSRF-Token","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"content_hash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"decision":{"type":"string","enum":["APPROVED","REJECTED"]},"note":{"type":"string","minLength":10,"maxLength":2000}},"required":["content_hash","decision","note"],"additionalProperties":false}}}}}},"/v1/staff/fiscal-periods":{"post":{"operationId":"post_v1_staff_fiscal_periods","summary":"staff / fiscal-periods","tags":["Staff oversight"],"security":[{"StaffCookie":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":160}},{"name":"X-CSRF-Token","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"profile_id":{"type":"string","minLength":3,"maxLength":500},"period_ref":{"type":"string","minLength":3,"maxLength":500},"action":{"type":"string","enum":["CLOSE","REOPEN"]},"reason":{"type":"string","minLength":10,"maxLength":2000},"evidence_ref":{"type":"string","minLength":3,"maxLength":500}},"required":["profile_id","period_ref","action","reason","evidence_ref"],"additionalProperties":false}}}}}},"/v1/staff/fiscal-periods/{id}/decision":{"post":{"operationId":"post_v1_staff_fiscal_periods_id_decision","summary":"staff / fiscal-periods / {id} / decision","tags":["Staff oversight"],"security":[{"StaffCookie":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":160}},{"name":"X-CSRF-Token","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"content_hash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"decision":{"type":"string","enum":["APPROVED","REJECTED"]},"note":{"type":"string","minLength":10,"maxLength":2000}},"required":["content_hash","decision","note"],"additionalProperties":false}}}}}},"/v1/staff/financial-corrections":{"get":{"operationId":"get_v1_staff_financial_corrections","summary":"staff / financial-corrections","tags":["Staff oversight"],"security":[{"StaffCookie":[]}],"parameters":[],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"post_v1_staff_financial_corrections","summary":"staff / financial-corrections","tags":["Staff oversight"],"security":[{"StaffCookie":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":160}},{"name":"X-CSRF-Token","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","oneOf":[{"type":"object","properties":{"order_id":{"type":"string","minLength":3,"maxLength":500},"reason":{"type":"string","minLength":10,"maxLength":4000},"evidence_refs":{"minItems":1,"maxItems":30,"type":"array","items":{"type":"string","minLength":3,"maxLength":500}},"posting_date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"posting_profile_ref":{"type":"string","minLength":3,"maxLength":500},"kind":{"type":"string","const":"COMMERCIAL_CREDIT"},"invoice_id":{"type":"string","minLength":3,"maxLength":500},"net_credit":{"type":"object","properties":{"amount":{"type":"string"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amount","currency"],"additionalProperties":false}},"required":["order_id","reason","evidence_refs","posting_date","kind","invoice_id","net_credit"],"additionalProperties":false},{"type":"object","properties":{"order_id":{"type":"string","minLength":3,"maxLength":500},"reason":{"type":"string","minLength":10,"maxLength":4000},"evidence_refs":{"minItems":1,"maxItems":30,"type":"array","items":{"type":"string","minLength":3,"maxLength":500}},"posting_date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"posting_profile_ref":{"type":"string","minLength":3,"maxLength":500},"kind":{"type":"string","const":"TAX_REPLACEMENT"},"invoice_id":{"type":"string","minLength":3,"maxLength":500},"replacement_rule":{"type":"object","properties":{"id":{"type":"string","minLength":3,"maxLength":500},"component":{"type":"string","enum":["MEDIA","PLATFORM_FEE"]},"service_type":{"type":"string","minLength":3,"maxLength":500},"supplier_country":{"type":"string","pattern":"^[A-Z]{2}$"},"customer_country":{"type":"string","pattern":"^[A-Z]{2}$"},"service_country":{"type":"string","pattern":"^[A-Z]{2}$"},"customer_tax_status":{"type":"string","enum":["REGISTERED","NOT_REGISTERED"]},"customer_tax_capacity":{"type":"string","enum":["BUSINESS","NON_BUSINESS"]},"effective_from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"effective_to":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"tax_jurisdiction":{"type":"string","minLength":3,"maxLength":500},"tax_type":{"type":"string","minLength":3,"maxLength":500},"tax_code":{"type":"string","minLength":3,"maxLength":500},"treatment":{"type":"string","enum":["STANDARD","EXEMPT","REVERSE_CHARGE","OUT_OF_SCOPE"]},"rate_basis_points":{"type":"integer","minimum":0,"maximum":10000},"explanation":{"type":"string","minLength":10,"maxLength":2000},"exemption_reason":{"anyOf":[{"type":"string","minLength":5,"maxLength":1000},{"type":"null"}]},"review":{"type":"object","properties":{"source_ref":{"type":"string","minLength":3,"maxLength":500},"reviewed_by":{"type":"string","minLength":3,"maxLength":500},"reviewed_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"evidence_sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["source_ref","reviewed_by","reviewed_at","evidence_sha256"],"additionalProperties":false}},"required":["id","component","service_type","supplier_country","customer_country","service_country","customer_tax_status","effective_from","effective_to","tax_jurisdiction","tax_type","tax_code","treatment","rate_basis_points","explanation","exemption_reason","review"],"additionalProperties":false}},"required":["order_id","reason","evidence_refs","posting_date","kind","invoice_id","replacement_rule"],"additionalProperties":false},{"type":"object","properties":{"order_id":{"type":"string","minLength":3,"maxLength":500},"reason":{"type":"string","minLength":10,"maxLength":4000},"evidence_refs":{"minItems":1,"maxItems":30,"type":"array","items":{"type":"string","minLength":3,"maxLength":500}},"posting_date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"posting_profile_ref":{"type":"string","minLength":3,"maxLength":500},"kind":{"type":"string","const":"JOURNAL_RECLASSIFICATION"},"journal_id":{"type":"string","minLength":3,"maxLength":500},"mappings":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"object","properties":{"from":{"type":"string","minLength":3,"maxLength":500},"to":{"type":"string","minLength":3,"maxLength":500}},"required":["from","to"],"additionalProperties":false}}},"required":["order_id","reason","evidence_refs","posting_date","kind","journal_id","mappings"],"additionalProperties":false},{"type":"object","properties":{"order_id":{"type":"string","minLength":3,"maxLength":500},"reason":{"type":"string","minLength":10,"maxLength":4000},"evidence_refs":{"minItems":1,"maxItems":30,"type":"array","items":{"type":"string","minLength":3,"maxLength":500}},"posting_date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"posting_profile_ref":{"type":"string","minLength":3,"maxLength":500},"kind":{"type":"string","const":"PAYMENT_RECONCILIATION"},"settlement_id":{"type":"string","minLength":3,"maxLength":500}},"required":["order_id","reason","evidence_refs","posting_date","kind","settlement_id"],"additionalProperties":false}]}}}}}},"/v1/staff/financial-corrections/{id}/preview":{"post":{"operationId":"post_v1_staff_financial_corrections_id_preview","summary":"staff / financial-corrections / {id} / preview","tags":["Staff oversight"],"security":[{"StaffCookie":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":160}},{"name":"X-CSRF-Token","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}}}},"/v1/staff/financial-corrections/{id}/submit":{"post":{"operationId":"post_v1_staff_financial_corrections_id_submit","summary":"staff / financial-corrections / {id} / submit","tags":["Staff oversight"],"security":[{"StaffCookie":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":160}},{"name":"X-CSRF-Token","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"content_hash":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["content_hash"],"additionalProperties":false}}}}}},"/v1/staff/financial-corrections/{id}/decision":{"post":{"operationId":"post_v1_staff_financial_corrections_id_decision","summary":"staff / financial-corrections / {id} / decision","tags":["Staff oversight"],"security":[{"StaffCookie":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":160}},{"name":"X-CSRF-Token","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"content_hash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"decision":{"type":"string","enum":["APPROVED","REJECTED"]},"note":{"type":"string","minLength":10,"maxLength":2000}},"required":["content_hash","decision","note"],"additionalProperties":false}}}}}},"/v1/staff/financial-corrections/{id}/retry":{"post":{"operationId":"post_v1_staff_financial_corrections_id_retry","summary":"staff / financial-corrections / {id} / retry","tags":["Staff oversight"],"security":[{"StaffCookie":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":160}},{"name":"X-CSRF-Token","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"failed_operation_id":{"type":"string"}},"required":["failed_operation_id"],"additionalProperties":false}}}}}},"/v1/orders/{id}/financial-corrections":{"get":{"operationId":"get_v1_orders_id_financial_corrections","summary":"orders / {id} / financial-corrections","tags":["Agent API"],"security":[{"AgentBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/financial-corrections/{id}/consent":{"post":{"operationId":"post_v1_financial_corrections_id_consent","summary":"financial-corrections / {id} / consent","tags":["Agent API"],"security":[{"AgentBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":160}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"mandate_id":{"type":"string","minLength":3,"maxLength":500},"consent_hash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"decision":{"type":"string","enum":["ACCEPTED","REJECTED"]}},"required":["mandate_id","consent_hash","decision"],"additionalProperties":false}}}}}},"/v1/correction-statements":{"post":{"operationId":"post_v1_correction_statements","summary":"correction-statements","tags":["Agent API"],"security":[{"AgentBearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":160}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"operation_id":{"type":"string","minLength":3,"maxLength":500},"statement_ref":{"type":"string","minLength":3,"maxLength":500},"source":{"type":"object","properties":{"connector_id":{"type":"string","minLength":3,"maxLength":500},"provider_ref":{"type":"string","minLength":3,"maxLength":500},"original_provider_ref":{"type":"string","minLength":3,"maxLength":500},"amount":{"type":"object","properties":{"amount":{"type":"string"},"currency":{"type":"string"}},"required":["amount","currency"],"additionalProperties":false},"status":{"type":"string","enum":["CONFIRMED","REVERSED"]},"booked_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"receipt_ref":{"type":"string","minLength":3,"maxLength":500}},"required":["connector_id","provider_ref","original_provider_ref","amount","status","booked_at","receipt_ref"],"additionalProperties":false},"content_sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["operation_id","statement_ref","source","content_sha256"],"additionalProperties":false}}}}}},"/v1/staff/filing-receipts":{"get":{"operationId":"get_v1_staff_filing_receipts","summary":"staff / filing-receipts","tags":["Staff oversight"],"security":[{"StaffCookie":[]}],"parameters":[],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"post_v1_staff_filing_receipts","summary":"staff / filing-receipts","tags":["Staff oversight"],"security":[{"StaffCookie":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":160}},{"name":"X-CSRF-Token","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"profile_id":{"type":"string","minLength":3,"maxLength":500},"period_ref":{"type":"string","minLength":3,"maxLength":500},"correction_id":{"anyOf":[{"type":"string","minLength":3,"maxLength":500},{"type":"null"}]},"authority_reference":{"type":"string","minLength":3,"maxLength":500},"submitted_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"receipt_document_ref":{"type":"string","minLength":3,"maxLength":500},"receipt_sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"review_note":{"type":"string","minLength":10,"maxLength":2000}},"required":["profile_id","period_ref","correction_id","authority_reference","submitted_at","receipt_document_ref","receipt_sha256","review_note"],"additionalProperties":false}}}}}},"/v1/staff/filing-receipts/{id}/decision":{"post":{"operationId":"post_v1_staff_filing_receipts_id_decision","summary":"staff / filing-receipts / {id} / decision","tags":["Staff oversight"],"security":[{"StaffCookie":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":160}},{"name":"X-CSRF-Token","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"content_hash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"decision":{"type":"string","enum":["APPROVED","REJECTED"]},"note":{"type":"string","minLength":10,"maxLength":2000}},"required":["content_hash","decision","note"],"additionalProperties":false}}}}}},"/v1/receivable-receipts":{"post":{"operationId":"post_v1_receivable_receipts","summary":"receivable-receipts","tags":["Agent API"],"security":[{"AgentBearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":160}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"correction_id":{"type":"string","minLength":3,"maxLength":500},"source":{"type":"object","properties":{"connector_id":{"type":"string","minLength":3,"maxLength":500},"provider_ref":{"type":"string","minLength":3,"maxLength":500},"invoice_ref":{"type":"string","minLength":3,"maxLength":500},"buyer_principal_id":{"type":"string","minLength":3,"maxLength":500},"payer_authorization_ref":{"type":"string","minLength":3,"maxLength":500},"amount":{"type":"object","properties":{"amount":{"type":"string"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amount","currency"],"additionalProperties":false},"status":{"type":"string","const":"CONFIRMED"},"booked_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"statement_ref":{"type":"string","minLength":3,"maxLength":500},"seller_transfer":{"anyOf":[{"type":"object","properties":{"provider_ref":{"type":"string","minLength":3,"maxLength":500},"beneficiary_ref":{"type":"string","minLength":3,"maxLength":500},"amount":{"type":"object","properties":{"amount":{"type":"string"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amount","currency"],"additionalProperties":false}},"required":["provider_ref","beneficiary_ref","amount"],"additionalProperties":false},{"type":"null"}]}},"required":["connector_id","provider_ref","invoice_ref","buyer_principal_id","payer_authorization_ref","amount","status","booked_at","statement_ref","seller_transfer"],"additionalProperties":false},"content_sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["correction_id","source","content_sha256"],"additionalProperties":false}}}}}},"/v1/finance-export/documents/{id}/content":{"get":{"operationId":"get_v1_finance_export_documents_id_content","summary":"finance-export / documents / {id} / content","tags":["Agent API"],"security":[{"AgentBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/events":{"get":{"operationId":"get_v1_events","summary":"events","tags":["Agent API"],"security":[{"AgentBearer":[]}],"parameters":[{"name":"after","in":"query","schema":{"type":"string","pattern":"^[0-9]{1,19}$","default":"0"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/openapi.json":{"get":{"operationId":"get_v1_openapi_json","summary":"openapi.json","tags":["Agent API"],"security":[],"parameters":[],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/finance-openapi.json":{"get":{"operationId":"get_v1_finance_openapi_json","summary":"finance-openapi.json","tags":["Agent API"],"security":[],"parameters":[],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/staff/moderation/metrics":{"get":{"operationId":"get_v1_staff_moderation_metrics","summary":"staff / moderation / metrics","tags":["Staff oversight"],"security":[{"StaffCookie":[]}],"parameters":[],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/staff/moderation/status":{"get":{"operationId":"get_v1_staff_moderation_status","summary":"staff / moderation / status","tags":["Staff oversight"],"security":[{"StaffCookie":[]}],"parameters":[],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/staff/moderation/settings":{"post":{"operationId":"post_v1_staff_moderation_settings","summary":"staff / moderation / settings","tags":["Staff oversight"],"security":[{"StaffCookie":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":160}},{"name":"X-CSRF-Token","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"expected_revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"mode":{"type":"string","enum":["off","observe","assist","auto_r1"]},"owner_id":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_.:@/-]+$"},"backup_id":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_.:@/-]+$"},"reason":{"type":"string","minLength":5,"maxLength":2000}},"required":["expected_revision","mode","owner_id","backup_id","reason"],"additionalProperties":false}}}}}},"/v1/staff/moderation/cases":{"get":{"operationId":"get_v1_staff_moderation_cases","summary":"staff / moderation / cases","tags":["Staff oversight"],"security":[{"StaffCookie":[]}],"parameters":[],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"post_v1_staff_moderation_cases","summary":"staff / moderation / cases","tags":["Staff oversight"],"security":[{"StaffCookie":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":160}},{"name":"X-CSRF-Token","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"source_type":{"type":"string","enum":["SUPPORT","OPERATION","DELIVERY","PAYMENT","SECURITY","ORDER","EXPORT"]},"source_id":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_.:@/-]+$"},"reason":{"type":"string","minLength":5,"maxLength":2000}},"required":["source_type","source_id","reason"],"additionalProperties":false}}}}}},"/v1/moderation/cases":{"get":{"operationId":"get_v1_moderation_cases","summary":"moderation / cases","tags":["Agent API"],"security":[{"AgentBearer":[]}],"parameters":[],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/staff/moderation/cases/{id}":{"get":{"operationId":"get_v1_staff_moderation_cases_id_","summary":"staff / moderation / cases / {id}","tags":["Staff oversight"],"security":[{"StaffCookie":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/moderation/cases/{id}":{"get":{"operationId":"get_v1_moderation_cases_id_","summary":"moderation / cases / {id}","tags":["Agent API"],"security":[{"AgentBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/staff/moderation/cases/{id}/plans":{"post":{"operationId":"post_v1_staff_moderation_cases_id_plans","summary":"staff / moderation / cases / {id} / plans","tags":["Staff oversight"],"security":[{"StaffCookie":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":160}},{"name":"X-CSRF-Token","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"expected_revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"runbook":{"type":"string","enum":["QUERY_EXISTING_OPERATION","REQUEST_MISSING_EVIDENCE","REFRESH_AUTHORIZED_REPORT","REVIEW_CONTRACT_EVIDENCE_MISMATCH","REBUILD_READ_PROJECTION","CHECK_FINANCIAL_DIFFERENCE","RESTORE_EXPORT_FRESHNESS","REVIEW_AUTHORITY_OR_QUOTA_BLOCK","PREPARE_DELIVERY_REVIEW","ESCALATE_WITH_EVIDENCE","REVIEW_AGENT_SECURITY_SIGNAL","REVIEW_EXTERNAL_SECURITY_SIGNAL","PREPARE_SECURITY_RESPONSE","VERIFY_SECURITY_RECOVERY","PAUSE_CONNECTOR_NEW_WORK"]},"reason":{"type":"string","minLength":5,"maxLength":2000},"expires_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"parameters":{"default":{},"type":"object","properties":{"target_id":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_.:@/-]+$"},"recipient_principal_id":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_.:@/-]+$"},"owner_id":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_.:@/-]+$"},"report_source_id":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_.:@/-]+$"},"export_client_id":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_.:@/-]+$"},"security_action":{"type":"string","enum":["REVOKE_CLIENT","REVOKE_SESSION","LIMIT_API","RELEASE_CONTROL"]},"endpoint":{"type":"string","maxLength":180,"pattern":"^\\/v1\\/[a-z0-9_/-]+$"},"request_limit":{"type":"integer","minimum":1,"maximum":100000},"duration_seconds":{"type":"integer","minimum":60,"maximum":86400},"recovery_id":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_.:@/-]+$"}},"additionalProperties":false},"cost_ceiling":{"default":null,"type":"null"}},"required":["expected_revision","runbook","reason","expires_at"],"additionalProperties":false}}}}}},"/v1/staff/moderation/cases/{id}/messages":{"post":{"operationId":"post_v1_staff_moderation_cases_id_messages","summary":"staff / moderation / cases / {id} / messages","tags":["Staff oversight"],"security":[{"StaffCookie":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":160}},{"name":"X-CSRF-Token","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"body":{"type":"string","minLength":1,"maxLength":8000},"visibility":{"type":"string","enum":["AGENT_VISIBLE","STAFF_INTERNAL","ADMIN_ONLY"]}},"required":["body","visibility"],"additionalProperties":false}}}}}},"/v1/staff/moderation/decisions/{id}":{"post":{"operationId":"post_v1_staff_moderation_decisions_id_","summary":"staff / moderation / decisions / {id}","tags":["Staff oversight"],"security":[{"StaffCookie":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":160}},{"name":"X-CSRF-Token","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"expected_revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"plan_hash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"action":{"type":"string","enum":["APPROVE","REJECT","REQUEST_EVIDENCE","REVISE_PLAN","HANDOFF","PAUSE_AUTOMATION","REVOKE"]},"reason":{"type":"string","minLength":5,"maxLength":2000},"owner_id":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_.:@/-]+$"}},"required":["expected_revision","plan_hash","action","reason"],"additionalProperties":false}}}}}},"/v1/staff/moderation/controls":{"post":{"operationId":"post_v1_staff_moderation_controls","summary":"staff / moderation / controls","tags":["Staff oversight"],"security":[{"StaffCookie":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":160}},{"name":"X-CSRF-Token","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"action":{"type":"string","enum":["PAUSE_MODEL_CALLS","PAUSE_R1_EXECUTION","PAUSE_OUTBOUND_MESSAGES","DISABLE_RUNBOOK_SCOPE","RESUME"]},"scope_type":{"type":"string","enum":["GLOBAL","CASE","RUNBOOK","PRINCIPAL"]},"scope_id":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_.:@/-]+$"},"expires_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"reason":{"type":"string","minLength":5,"maxLength":2000},"control_id":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_.:@/-]+$"}},"required":["action","scope_type","scope_id","expires_at","reason"],"additionalProperties":false}}}}}},"/v1/staff/moderation/policies":{"get":{"operationId":"get_v1_staff_moderation_policies","summary":"staff / moderation / policies","tags":["Staff oversight"],"security":[{"StaffCookie":[]}],"parameters":[],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"post_v1_staff_moderation_policies","summary":"staff / moderation / policies","tags":["Staff oversight"],"security":[{"StaffCookie":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":160}},{"name":"X-CSRF-Token","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"RUNBOOK"},"name":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_.:@/-]+$"},"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"environment":{"type":"string","enum":["sandbox","production"]},"body":{"type":"object","properties":{"runbook":{"type":"string","enum":["QUERY_EXISTING_OPERATION","REQUEST_MISSING_EVIDENCE","REFRESH_AUTHORIZED_REPORT","REVIEW_CONTRACT_EVIDENCE_MISMATCH","REBUILD_READ_PROJECTION","CHECK_FINANCIAL_DIFFERENCE","RESTORE_EXPORT_FRESHNESS","REVIEW_AUTHORITY_OR_QUOTA_BLOCK","PREPARE_DELIVERY_REVIEW","ESCALATE_WITH_EVIDENCE","REVIEW_AGENT_SECURITY_SIGNAL","REVIEW_EXTERNAL_SECURITY_SIGNAL","PREPARE_SECURITY_RESPONSE","VERIFY_SECURITY_RECOVERY","PAUSE_CONNECTOR_NEW_WORK"]},"code_hash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"mode":{"type":"string","enum":["ASSIST","AUTO_R1","DISABLED"]},"scope":{"type":"object","properties":{"principal_ids":{"maxItems":500,"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_.:@/-]+$"}},"connector_ids":{"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_.:@/-]+$"}}},"required":["principal_ids","connector_ids"],"additionalProperties":false},"max_attempts":{"type":"number","const":1},"max_actions_per_hour":{"type":"integer","minimum":1,"maximum":10000},"acceptance_ref":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_.:@/-]+$"},"valid_until":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"tool_pricing":{"type":"object","properties":{"amount":{"type":"string","pattern":"^(0|[1-9]\\d{0,20})(\\.\\d{1,9})?$"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"source_ref":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_.:@/-]+$"},"valid_until":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["amount","currency","source_ref","valid_until"],"additionalProperties":false}},"required":["runbook","code_hash","mode","scope","max_attempts","max_actions_per_hour","acceptance_ref","valid_until"],"additionalProperties":false}},"required":["kind","name","version","environment","body"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"BUDGET"},"name":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_.:@/-]+$"},"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"environment":{"type":"string","enum":["sandbox","production"]},"body":{"type":"object","properties":{"mode":{"type":"string","const":"METERED"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"daily":{"type":"null"},"monthly":{"type":"null"},"per_case":{"type":"null"},"per_principal_daily":{"type":"null"},"per_connector_daily":{"type":"null"},"timezone":{"type":"string","const":"UTC"},"valid_until":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["mode","currency","daily","monthly","per_case","per_principal_daily","per_connector_daily","timezone","valid_until"],"additionalProperties":false}},"required":["kind","name","version","environment","body"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"TARIFF"},"name":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_.:@/-]+$"},"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"environment":{"type":"string","enum":["sandbox","production"]},"body":{"type":"object","properties":{"provider":{"type":"string","const":"openai"},"model":{"type":"string","enum":["gpt-6.1-sol","gpt-6-astra"]},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"input_per_million":{"type":"string","pattern":"^(0|[1-9]\\d{0,20})(\\.\\d{1,9})?$"},"cached_input_per_million":{"type":"string","pattern":"^(0|[1-9]\\d{0,20})(\\.\\d{1,9})?$"},"cache_write_per_million":{"type":"string","pattern":"^(0|[1-9]\\d{0,20})(\\.\\d{1,9})?$"},"output_per_million":{"type":"string","pattern":"^(0|[1-9]\\d{0,20})(\\.\\d{1,9})?$"},"long_context_threshold":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"long_input_multiplier":{"type":"string","pattern":"^(0|[1-9]\\d{0,20})(\\.\\d{1,9})?$"},"long_output_multiplier":{"type":"string","pattern":"^(0|[1-9]\\d{0,20})(\\.\\d{1,9})?$"},"regional_multiplier":{"type":"string","pattern":"^(0|[1-9]\\d{0,20})(\\.\\d{1,9})?$"},"source_url":{"type":"string","maxLength":2000,"format":"uri"},"reviewed_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"valid_until":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["provider","model","currency","input_per_million","cached_input_per_million","cache_write_per_million","output_per_million","long_context_threshold","long_input_multiplier","long_output_multiplier","regional_multiplier","source_url","reviewed_at","valid_until"],"additionalProperties":false}},"required":["kind","name","version","environment","body"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"DATA"},"name":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_.:@/-]+$"},"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"environment":{"type":"string","enum":["sandbox","production"]},"body":{"type":"object","properties":{"provider":{"type":"string","const":"openai"},"region":{"type":"string","enum":["US","EU"]},"endpoint_origin":{"type":"string","enum":["https://api.openai.com","https://eu.api.openai.com"]},"approved_models":{"minItems":1,"maxItems":2,"type":"array","items":{"type":"string","enum":["gpt-6.1-sol","gpt-6-astra"]}},"allow_case_text":{"type":"boolean"},"retention_days":{"type":"integer","minimum":1,"maximum":3650},"agreement_ref":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_.:@/-]+$"},"model_acceptance_ref":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_.:@/-]+$"},"valid_until":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["provider","region","endpoint_origin","approved_models","allow_case_text","retention_days","agreement_ref","model_acceptance_ref","valid_until"],"additionalProperties":false}},"required":["kind","name","version","environment","body"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"SECURITY"},"name":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_.:@/-]+$"},"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"environment":{"type":"string","enum":["sandbox","production"]},"body":{"type":"object","properties":{"signal_type":{"type":"string","enum":["CREDENTIAL_COMPROMISE_VERIFIED","SESSION_COMPROMISE_VERIFIED","RESOURCE_ABUSE_VERIFIED"]},"producer_ids":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_.:@/-]+$"}},"adapter_id":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_.:@/-]+$"},"action":{"type":"string","enum":["REVOKE_CLIENT","REVOKE_SESSION","LIMIT_API"]},"target_type":{"type":"string","enum":["CLIENT","SESSION","ENDPOINT"]},"target_ids":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_.:@/-]+$"}},"minimum_count":{"type":"integer","exclusiveMinimum":0,"maximum":100000},"evidence_window_seconds":{"type":"integer","minimum":60,"maximum":3600},"max_active_actions":{"type":"integer","minimum":1,"maximum":100},"max_actions_per_hour":{"type":"integer","minimum":1,"maximum":100},"review_seconds":{"type":"integer","minimum":60,"maximum":86400},"duration_seconds":{"type":"integer","minimum":60,"maximum":86400},"request_limit":{"type":"integer","exclusiveMinimum":0,"maximum":100000},"endpoint":{"type":"string","maxLength":180,"pattern":"^\\/v1\\/[a-z0-9_/-]+$"},"acceptance_ref":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_.:@/-]+$"},"valid_until":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["signal_type","producer_ids","adapter_id","action","target_type","target_ids","minimum_count","evidence_window_seconds","max_active_actions","max_actions_per_hour","review_seconds","duration_seconds","acceptance_ref","valid_until"],"additionalProperties":false}},"required":["kind","name","version","environment","body"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"PRODUCER"},"name":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_.:@/-]+$"},"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"environment":{"type":"string","enum":["sandbox","production"]},"body":{"type":"object","properties":{"actor_id":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_.:@/-]+$"},"signal_types":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_.:@/-]+$"}},"target_ids":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_.:@/-]+$"}},"surfaces":{"minItems":1,"maxItems":2,"type":"array","items":{"type":"string","enum":["IN_PLATFORM_AGENT","EXTERNAL_SURFACE"]}},"max_events_per_minute":{"type":"integer","minimum":1,"maximum":1000},"max_clock_skew_seconds":{"type":"integer","minimum":1,"maximum":300},"heartbeat_seconds":{"type":"integer","minimum":30,"maximum":3600},"public_jwk":{"type":"object","properties":{"kty":{"type":"string","const":"OKP"},"crv":{"type":"string","const":"Ed25519"},"x":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$"}},"required":["kty","crv","x"],"additionalProperties":false},"valid_until":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["actor_id","signal_types","target_ids","surfaces","max_events_per_minute","max_clock_skew_seconds","heartbeat_seconds","public_jwk","valid_until"],"additionalProperties":false}},"required":["kind","name","version","environment","body"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"PILOT"},"name":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_.:@/-]+$"},"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"environment":{"type":"string","enum":["sandbox","production"]},"body":{"type":"object","properties":{"max_input_tokens":{"type":"integer","minimum":1000,"maximum":24000},"max_output_tokens":{"type":"integer","minimum":100,"maximum":4000},"max_calls_per_analysis":{"type":"integer","minimum":2,"maximum":4},"max_calls_per_case_day":{"type":"integer","minimum":2,"maximum":8},"max_active_cases_per_principal":{"type":"integer","minimum":1,"maximum":1000},"lease_seconds":{"type":"number","const":60},"escalation_seconds":{"type":"integer","minimum":60,"maximum":86400},"timezone":{"type":"string","minLength":1,"maxLength":100},"valid_until":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["max_input_tokens","max_output_tokens","max_calls_per_analysis","max_calls_per_case_day","max_active_cases_per_principal","lease_seconds","escalation_seconds","timezone","valid_until"],"additionalProperties":false}},"required":["kind","name","version","environment","body"],"additionalProperties":false}]}}}}}},"/v1/staff/moderation/policies/{id}/review":{"post":{"operationId":"post_v1_staff_moderation_policies_id_review","summary":"staff / moderation / policies / {id} / review","tags":["Staff oversight"],"security":[{"StaffCookie":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":160}},{"name":"X-CSRF-Token","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"content_hash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"decision":{"type":"string","enum":["APPROVE","REJECT","DISABLE"]},"reason":{"type":"string","minLength":5,"maxLength":2000}},"required":["content_hash","decision","reason"],"additionalProperties":false}}}}}},"/v1/staff/moderation/costs":{"get":{"operationId":"get_v1_staff_moderation_costs","summary":"staff / moderation / costs","tags":["Staff oversight"],"security":[{"StaffCookie":[]}],"parameters":[],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/staff/moderation/cost-receipts":{"get":{"operationId":"get_v1_staff_moderation_cost_receipts","summary":"staff / moderation / cost-receipts","tags":["Staff oversight"],"security":[{"StaffCookie":[]}],"parameters":[],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"post_v1_staff_moderation_cost_receipts","summary":"staff / moderation / cost-receipts","tags":["Staff oversight"],"security":[{"StaffCookie":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":160}},{"name":"X-CSRF-Token","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"kind":{"type":"string","enum":["MODEL_RECONCILIATION","TOOL","INFRASTRUCTURE","HUMAN_REVIEW"]},"reservation_id":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_.:@/-]+$"},"case_id":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_.:@/-]+$"},"amount":{"type":"object","properties":{"amount":{"type":"string","pattern":"^(0|[1-9]\\d{0,20})(\\.\\d{1,9})?$"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amount","currency"],"additionalProperties":false},"source_ref":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_.:@/-]+$"},"reason":{"type":"string","minLength":5,"maxLength":2000},"period_start":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"period_end":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"evidence_refs":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_.:@/-]+$"}}},"required":["kind","amount","source_ref","reason","period_start","period_end","evidence_refs"],"additionalProperties":false}}}}}},"/v1/staff/moderation/cost-receipts/{id}/review":{"post":{"operationId":"post_v1_staff_moderation_cost_receipts_id_review","summary":"staff / moderation / cost-receipts / {id} / review","tags":["Staff oversight"],"security":[{"StaffCookie":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":160}},{"name":"X-CSRF-Token","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"content_hash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"decision":{"type":"string","enum":["APPROVE","REJECT","DISABLE"]},"reason":{"type":"string","minLength":5,"maxLength":2000}},"required":["content_hash","decision","reason"],"additionalProperties":false}}}}}},"/v1/staff/moderation/cases/{id}/analysis":{"post":{"operationId":"post_v1_staff_moderation_cases_id_analysis","summary":"staff / moderation / cases / {id} / analysis","tags":["Staff oversight"],"security":[{"StaffCookie":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":160}},{"name":"X-CSRF-Token","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"expected_revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"model":{"type":"string","enum":["gpt-6.1-sol","gpt-6-astra"]},"reason":{"type":"string","minLength":5,"maxLength":2000}},"required":["expected_revision","model","reason"],"additionalProperties":false}}}}}},"/v1/staff/moderation/cases/{id}/analyses":{"get":{"operationId":"get_v1_staff_moderation_cases_id_analyses","summary":"staff / moderation / cases / {id} / analyses","tags":["Staff oversight"],"security":[{"StaffCookie":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/staff/moderation/handoffs/{id}/accept":{"post":{"operationId":"post_v1_staff_moderation_handoffs_id_accept","summary":"staff / moderation / handoffs / {id} / accept","tags":["Staff oversight"],"security":[{"StaffCookie":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":160}},{"name":"X-CSRF-Token","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}}}},"/v1/moderation/cases/{id}/appeals":{"post":{"operationId":"post_v1_moderation_cases_id_appeals","summary":"moderation / cases / {id} / appeals","tags":["Agent API"],"security":[{"AgentBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":160}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"body":{"type":"string","minLength":5,"maxLength":8000},"evidence_refs":{"default":[],"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_.:@/-]+$"}}},"required":["body"],"additionalProperties":false}}}}}},"/v1/staff/moderation/appeals/{id}/decision":{"post":{"operationId":"post_v1_staff_moderation_appeals_id_decision","summary":"staff / moderation / appeals / {id} / decision","tags":["Staff oversight"],"security":[{"StaffCookie":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":160}},{"name":"X-CSRF-Token","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"action":{"type":"string","enum":["ACCEPT","REJECT","REQUEST_EVIDENCE"]},"reason":{"type":"string","minLength":5,"maxLength":2000}},"required":["action","reason"],"additionalProperties":false}}}}}},"/v1/staff/security/cases/{id}/recoveries":{"post":{"operationId":"post_v1_staff_security_cases_id_recoveries","summary":"staff / security / cases / {id} / recoveries","tags":["Staff oversight"],"security":[{"StaffCookie":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":160}},{"name":"X-CSRF-Token","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"action_id":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_.:@/-]+$"},"reason":{"type":"string","minLength":5,"maxLength":2000},"evidence_refs":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_.:@/-]+$"}},"replacement_client_id":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_.:@/-]+$"},"ownership_proof":{"type":"string","maxLength":8192}},"required":["action_id","reason","evidence_refs"],"additionalProperties":false}}}}}},"/v1/staff/security/recoveries/{id}/review":{"post":{"operationId":"post_v1_staff_security_recoveries_id_review","summary":"staff / security / recoveries / {id} / review","tags":["Staff oversight"],"security":[{"StaffCookie":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":160}},{"name":"X-CSRF-Token","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"content_hash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"decision":{"type":"string","enum":["APPROVE","REJECT","DISABLE"]},"reason":{"type":"string","minLength":5,"maxLength":2000}},"required":["content_hash","decision","reason"],"additionalProperties":false}}}}}},"/v1/security/recovery":{"post":{"operationId":"post_v1_security_recovery","summary":"security / recovery","tags":["Agent API"],"security":[],"parameters":[],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"action_id":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_.:@/-]+$"},"reason":{"type":"string","minLength":5,"maxLength":2000},"evidence_refs":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_.:@/-]+$"}},"replacement_client_id":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_.:@/-]+$"},"ownership_proof":{"type":"string","maxLength":8192},"case_id":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_.:@/-]+$"}},"required":["action_id","reason","evidence_refs","case_id"],"additionalProperties":false}}}}}},"/internal/security/signals":{"post":{"operationId":"post_internal_security_signals","summary":"security / signals","tags":["Agent API"],"security":[{"ProducerBearer":[]}],"parameters":[],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"signal":{"type":"object","properties":{"source_event_id":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_.:@/-]+$"},"observed_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"environment":{"type":"string","enum":["sandbox","production"]},"primary_surface":{"type":"string","enum":["IN_PLATFORM_AGENT","EXTERNAL_SURFACE"]},"signal_type":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_.:@/-]+$"},"target_type":{"type":"string","enum":["CLIENT","SESSION","ENDPOINT","AGENT","UNATTRIBUTED"]},"target_id":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_.:@/-]+$"},"count":{"type":"integer","exclusiveMinimum":0,"maximum":100000},"evidence_refs":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_.:@/-]+$"}},"summary":{"type":"string","minLength":1,"maxLength":1000}},"required":["source_event_id","observed_at","environment","primary_surface","signal_type","target_type","target_id","count","evidence_refs","summary"],"additionalProperties":false},"signature":{"type":"string","minLength":50,"maxLength":8192}},"required":["signal","signature"],"additionalProperties":false}}}}}},"/internal/security/heartbeat":{"post":{"operationId":"post_internal_security_heartbeat","summary":"security / heartbeat","tags":["Agent API"],"security":[{"ProducerBearer":[]}],"parameters":[],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"heartbeat":{"type":"object","properties":{"source_event_id":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_.:@/-]+$"},"observed_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"environment":{"type":"string","enum":["sandbox","production"]}},"required":["source_event_id","observed_at","environment"],"additionalProperties":false},"signature":{"type":"string","minLength":50,"maxLength":8192}},"required":["heartbeat","signature"],"additionalProperties":false}}}}}},"/v1/staff/security/producers":{"post":{"operationId":"post_v1_staff_security_producers","summary":"staff / security / producers","tags":["Staff oversight"],"security":[{"StaffCookie":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":160}},{"name":"X-CSRF-Token","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":3,"maxLength":160},"authentication_public_jwk":{"oneOf":[{"type":"object","properties":{"kty":{"type":"string","const":"OKP"},"crv":{"type":"string","const":"Ed25519"},"x":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$"},"kid":{"type":"string","maxLength":100}},"required":["kty","crv","x"],"additionalProperties":false},{"type":"object","properties":{"kty":{"type":"string","const":"EC"},"crv":{"type":"string","const":"P-256"},"x":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$"},"y":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$"},"kid":{"type":"string","maxLength":100}},"required":["kty","crv","x","y"],"additionalProperties":false}]},"reason":{"type":"string","minLength":5,"maxLength":2000}},"required":["name","authentication_public_jwk","reason"],"additionalProperties":false}}}}}},"/v1/staff/security/producers/{id}/revoke":{"post":{"operationId":"post_v1_staff_security_producers_id_revoke","summary":"staff / security / producers / {id} / revoke","tags":["Staff oversight"],"security":[{"StaffCookie":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":160}},{"name":"X-CSRF-Token","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"reason":{"type":"string","minLength":5,"maxLength":2000}},"required":["reason"],"additionalProperties":false}}}}}},"/v1/staff/moderation/cases/{id}/assignment":{"post":{"operationId":"post_v1_staff_moderation_cases_id_assignment","summary":"staff / moderation / cases / {id} / assignment","tags":["Staff oversight"],"security":[{"StaffCookie":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":160}},{"name":"X-CSRF-Token","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"expected_revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"owner_id":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_.:@/-]+$"},"backup_id":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_.:@/-]+$"},"due_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"reason":{"type":"string","minLength":5,"maxLength":2000}},"required":["expected_revision","owner_id","backup_id","due_at","reason"],"additionalProperties":false}}}}}},"/v1/staff/moderation/cases/{id}/no-action":{"post":{"operationId":"post_v1_staff_moderation_cases_id_no_action","summary":"staff / moderation / cases / {id} / no-action","tags":["Staff oversight"],"security":[{"StaffCookie":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":160}},{"name":"X-CSRF-Token","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"expected_revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"reason":{"type":"string","minLength":5,"maxLength":2000},"evidence_refs":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_.:@/-]+$"}}},"required":["expected_revision","reason","evidence_refs"],"additionalProperties":false}}}}}},"/v1/staff/moderation/alerts/{id}/acknowledge":{"post":{"operationId":"post_v1_staff_moderation_alerts_id_acknowledge","summary":"staff / moderation / alerts / {id} / acknowledge","tags":["Staff oversight"],"security":[{"StaffCookie":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":160}},{"name":"X-CSRF-Token","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"reason":{"type":"string","minLength":5,"maxLength":2000}},"required":["reason"],"additionalProperties":false}}}}}},"/v1/staff/moderation/inbox/{id}/retry":{"post":{"operationId":"post_v1_staff_moderation_inbox_id_retry","summary":"staff / moderation / inbox / {id} / retry","tags":["Staff oversight"],"security":[{"StaffCookie":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":160}},{"name":"X-CSRF-Token","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Authorized result.","content":{"application/json":{"schema":{}}}},"default":{"description":"Structured error with a correlation ID and machine-readable next action.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"reason":{"type":"string","minLength":5,"maxLength":2000}},"required":["reason"],"additionalProperties":false}}}}}}},"components":{"securitySchemes":{"ExportOAuth":{"type":"oauth2","description":"Confidential client with private_key_jwt authentication; short-lived tokens, dedicated finance-export audience and revocable server-side entity/purpose grant. Token acquisition does not grant financial writes. Authentication-server metadata supplies the supported signing/token-binding profile.","flows":{"clientCredentials":{"tokenUrl":"https://hyagentx.com/auth/token","scopes":{"accounting:read":"Read approved accounting records within the grant.","tax:read":"Read tax records within the grant.","finance_documents:read":"Read authorized invoices and supporting documents.","finance_changes:read":"Read change notifications, intersected with the underlying data scopes."}}}},"AgentBearer":{"type":"http","scheme":"bearer","description":"Opaque short-lived token issued to a registered agent; authorization checks current client, scopes, audience and mandate on the server."},"StaffCookie":{"type":"apiKey","in":"cookie","name":"agentx_session","description":"Corporate OIDC session. Mutations additionally require X-CSRF-Token and role authorization."},"ProducerBearer":{"type":"http","scheme":"bearer","description":"Operations-audience token issued to a separately provisioned sensor with security:signals:write. The body additionally requires an Ed25519 JWS under a currently reviewed producer policy."}},"parameters":{"Entity":{"name":"legal_entity_id","in":"query","required":true,"schema":{"type":"string","minLength":1},"description":"Must belong to the authenticated grant; never expands access."},"PeriodFrom":{"name":"period_from","in":"query","schema":{"type":"string","format":"date"},"description":"Inclusive business-date boundary. Must be paired with period_to. Does not replace the change feed for late postings."},"PeriodTo":{"name":"period_to","in":"query","schema":{"type":"string","format":"date"},"description":"Exclusive business-date boundary, interpreted using the selected accounting/tax profile."},"Cursor":{"name":"cursor","in":"query","schema":{"type":"string","minLength":1},"description":"Opaque scope-bound page or incremental cursor. Expired cursors return an explicit error."},"Snapshot":{"name":"snapshot_id","in":"query","schema":{"type":"string","minLength":1},"description":"Omit for initial read. Reuse the server-issued snapshot across pages/resources. Reject conflicting cursor or filters."},"Limit":{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":500,"default":100}},"Jurisdiction":{"name":"tax_jurisdiction","in":"query","schema":{"type":"string","minLength":1},"description":"Must be configured and authorized; global API paths are country-independent."}},"schemas":{"Problem":{"type":"object","properties":{"type":{"type":"string","format":"uri"},"title":{"type":"string","minLength":1,"description":"English summary."},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string","minLength":1,"description":"Safe English description; do not expose another entity or secrets."},"instance":{"type":"string","minLength":1},"code":{"type":"string","minLength":1,"description":"Stable machine-readable code."},"correlation_id":{"type":"string","minLength":1},"retryable":{"type":"boolean"},"safe_to_retry":{"type":"boolean"},"next_action":{"type":"object","properties":{"type":{"type":"string","enum":["REAUTHENTICATE","REQUEST_SCOPE","RETRY_AFTER","RESTART_SNAPSHOT","RESYNC_CHANGES","CONTACT_SUPPORT","WAIT_FOR_DATA"]},"after_seconds":{"type":"integer","minimum":0}},"required":["type"],"additionalProperties":false}},"required":["type","title","status","detail","instance","code","correlation_id","retryable","safe_to_retry","next_action"],"additionalProperties":false},"Money":{"type":"object","properties":{"amount":{"type":"string","pattern":"^-?(0|[1-9][0-9]*)(\\.[0-9]+)?$"},"currency":{"type":"string","pattern":"^[A-Z]{3}$","description":"ISO 4217 currency. Never inferred from locale or country."}},"required":["amount","currency"],"additionalProperties":false,"description":"Exact decimal string. Never a binary floating-point value."},"EffectivePeriod":{"type":"object","properties":{"effective_from":{"type":"string","format":"date-time"},"effective_to":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["effective_from","effective_to"],"additionalProperties":false,"description":"Start inclusive, end exclusive; null end is open-ended."},"LegalProfile":{"type":"object","properties":{"profile_ref":{"type":"string","minLength":1},"registered_name":{"type":["string","null"],"minLength":1,"description":"Reviewed legal name, or null while an individual has supplied only a public display name."},"domicile_country":{"type":"string","pattern":"^[A-Z]{2}$"},"tax_registration_ids":{"type":"array","items":{"type":"string","minLength":1}},"effective_period":{"$ref":"#/components/schemas/EffectivePeriod"},"principal_type":{"type":"string","enum":["INDIVIDUAL","ORGANIZATION","UNSPECIFIED"],"description":"Legal nature recorded in this historical profile, independent of tax registration and commercial role."}},"required":["profile_ref","registered_name","domicile_country","tax_registration_ids","effective_period"],"additionalProperties":false},"LegalEntity":{"type":"object","properties":{"legal_entity_id":{"type":"string","minLength":1},"data_owner_tenant_id":{"type":"string","minLength":1},"current_profile_ref":{"type":"string","minLength":1},"profiles":{"type":"array","items":{"$ref":"#/components/schemas/LegalProfile"}}},"required":["legal_entity_id","data_owner_tenant_id","current_profile_ref","profiles"],"additionalProperties":false,"description":"Only grant-authorized entities. Historical profiles never rewrite issued documents."},"Account":{"type":"object","properties":{"account_id":{"type":"string","minLength":1},"legal_entity_id":{"type":"string","minLength":1},"chart_revision":{"type":"string","minLength":1},"code":{"type":"string","minLength":1},"label":{"type":"string","minLength":1,"description":"English platform label."},"account_type":{"type":"string","enum":["ASSET","LIABILITY","EQUITY","REVENUE","EXPENSE"]},"effective_period":{"$ref":"#/components/schemas/EffectivePeriod"}},"required":["account_id","legal_entity_id","chart_revision","code","label","account_type","effective_period"],"additionalProperties":false},"JournalLine":{"type":"object","properties":{"line_id":{"type":"string","minLength":1},"account_id":{"type":"string","minLength":1},"side":{"type":"string","enum":["DEBIT","CREDIT"]},"amount":{"type":"string","pattern":"^(0|[1-9][0-9]*)(\\.[0-9]+)?$"},"currency":{"type":"string","pattern":"^[A-Z]{3}$","description":"ISO 4217 currency. Never inferred from locale or country."}},"required":["line_id","account_id","side","amount","currency"],"additionalProperties":false},"JournalEntry":{"type":"object","properties":{"journal_id":{"type":"string","minLength":1},"revision":{"type":"integer","minimum":1},"legal_entity_id":{"type":"string","minLength":1},"legal_profile_ref":{"type":"string","minLength":1},"accounting_profile_ref":{"type":"string","minLength":1},"posted_at":{"type":"string","format":"date-time"},"effective_on":{"type":"string","format":"date"},"status":{"type":"string","enum":["POSTED"]},"source_event_id":{"type":"string","minLength":1},"reversal_of":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"correction_of":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"entries":{"type":"array","items":{"$ref":"#/components/schemas/JournalLine"}}},"required":["journal_id","revision","legal_entity_id","legal_profile_ref","accounting_profile_ref","posted_at","effective_on","status","source_event_id","reversal_of","correction_of","entries"],"additionalProperties":false,"description":"Debits equal credits per currency. Append-only: corrections create new entries."},"TaxComponent":{"type":"object","properties":{"tax_jurisdiction":{"type":"string","minLength":1,"description":"Country plus jurisdiction where required; not restricted to CH."},"tax_type":{"type":"string","minLength":1,"description":"Country-profile code such as VAT, GST, SALES_TAX or WITHHOLDING."},"tax_code":{"type":"string","minLength":1},"tax_status":{"type":"string","enum":["DETERMINED","UNDETERMINED","NOT_APPLICABLE"]},"taxable_amount":{"$ref":"#/components/schemas/Money"},"rate_percent":{"anyOf":[{"type":"string","pattern":"^-?(0|[1-9][0-9]*)(\\.[0-9]+)?$"},{"type":"null"}]},"tax_amount":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}]},"exemption_reason":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"tax_ruleset_ref":{"type":"string","minLength":1}},"required":["tax_jurisdiction","tax_type","tax_code","tax_status","taxable_amount","rate_percent","tax_amount","exemption_reason","tax_ruleset_ref"],"additionalProperties":false,"description":"Unknown tax is null with UNDETERMINED status, never assumed zero."},"Invoice":{"type":"object","properties":{"invoice_id":{"type":"string","minLength":1},"revision":{"type":"integer","minimum":1},"document_type":{"type":"string","enum":["INVOICE","CREDIT_NOTE","DEBIT_NOTE"]},"legal_entity_id":{"type":"string","minLength":1},"issuer_legal_entity_id":{"type":"string","minLength":1},"issuer_legal_profile_ref":{"type":"string","minLength":1},"counterparty_ref":{"type":"string","minLength":1,"description":"Only minimum authorized counterparty information."},"issued_on":{"type":"string","format":"date"},"net":{"$ref":"#/components/schemas/Money"},"tax_components":{"type":"array","items":{"$ref":"#/components/schemas/TaxComponent"}},"gross":{"$ref":"#/components/schemas/Money"},"correction_of":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"document_ref":{"type":"string","minLength":1},"fiscal_context":{"$ref":"#/components/schemas/InvoiceFiscalContext"}},"required":["invoice_id","revision","document_type","legal_entity_id","issuer_legal_entity_id","issuer_legal_profile_ref","counterparty_ref","issued_on","net","tax_components","gross","correction_of","document_ref"],"additionalProperties":false,"description":"Amounts use the invoice currency. Original issuer/profile remain immutable after relocation."},"Settlement":{"type":"object","properties":{"settlement_id":{"type":"string","minLength":1},"legal_entity_id":{"type":"string","minLength":1},"order_ref":{"type":"string","minLength":1},"payable_ref":{"type":"string","minLength":1},"amount":{"$ref":"#/components/schemas/Money"},"provider_ref":{"type":"string","minLength":1},"transfer_status":{"type":"string","minLength":1},"bank_payout_status":{"type":"string","minLength":1},"reconciliation_status":{"type":"string","enum":["PENDING","MATCHED","EXCEPTION"]},"recorded_at":{"type":"string","format":"date-time"}},"required":["settlement_id","legal_entity_id","order_ref","payable_ref","amount","provider_ref","transfer_status","bank_payout_status","reconciliation_status","recorded_at"],"additionalProperties":false,"description":"No bank account secrets, payment credentials or write capability."},"FXConversion":{"type":"object","properties":{"source_amount":{"$ref":"#/components/schemas/Money"},"target_amount":{"$ref":"#/components/schemas/Money"},"rate":{"type":"string","pattern":"^(0|[1-9][0-9]*)(\\.[0-9]+)?$"},"rate_convention":{"type":"string","enum":["TARGET_PER_SOURCE"]},"rate_as_of":{"type":"string","format":"date-time"},"rate_source":{"type":"string","minLength":1},"rounding_rule_ref":{"type":"string","minLength":1}},"required":["source_amount","target_amount","rate","rate_convention","rate_as_of","rate_source","rounding_rule_ref"],"additionalProperties":false},"TaxDocument":{"type":"object","properties":{"tax_document_id":{"type":"string","minLength":1},"revision":{"type":"integer","minimum":1},"legal_entity_id":{"type":"string","minLength":1},"legal_profile_ref":{"type":"string","minLength":1},"invoice_id":{"type":"string","minLength":1},"issued_on":{"type":"string","format":"date"},"journal_status":{"type":"string","enum":["POSTED"]},"tax_profile_ref":{"type":"string","minLength":1},"tax_period_ref":{"type":"string","minLength":1},"tax_components":{"type":"array","items":{"$ref":"#/components/schemas/TaxComponent"}},"tax_currency_conversion":{"anyOf":[{"$ref":"#/components/schemas/ReviewedFXConversion"},{"$ref":"#/components/schemas/FXConversion"},{"type":"null"}]},"correction_of":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"document_type":{"enum":["INVOICE","CREDIT_NOTE","DEBIT_NOTE"]},"tax_effective_on":{"type":"string","format":"date"},"tax_direction":{"enum":["OUTPUT","INPUT_UNASSESSED"]}},"required":["tax_document_id","revision","legal_entity_id","legal_profile_ref","invoice_id","issued_on","journal_status","tax_profile_ref","tax_period_ref","tax_components","tax_currency_conversion","correction_of","document_type"],"additionalProperties":false},"ExportManifest":{"type":"object","properties":{"manifest_id":{"type":"string","minLength":1},"schema_version":{"type":"string","minLength":1},"snapshot_id":{"type":"string","minLength":1},"legal_entity_id":{"type":"string","minLength":1},"ledger_watermark":{"type":"string","minLength":1},"filter_hash":{"type":"string","minLength":1},"record_count":{"type":"integer","minimum":0},"content_sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"control_totals":{"type":"array","items":{"type":"object","properties":{"currency":{"type":"string","pattern":"^[A-Z]{3}$","description":"ISO 4217 currency. Never inferred from locale or country."},"total_debits":{"type":"string","pattern":"^-?(0|[1-9][0-9]*)(\\.[0-9]+)?$"},"total_credits":{"type":"string","pattern":"^-?(0|[1-9][0-9]*)(\\.[0-9]+)?$"}},"required":["currency","total_debits","total_credits"],"additionalProperties":false}},"accounting_profile_ref":{"type":["string","null"],"minLength":1},"generated_at":{"type":"string","format":"date-time"},"accounting_profile_refs":{"type":"array","items":{"type":"string","minLength":1},"uniqueItems":true}},"required":["manifest_id","schema_version","snapshot_id","legal_entity_id","ledger_watermark","filter_hash","record_count","content_sha256","control_totals","accounting_profile_ref","generated_at"],"additionalProperties":false},"Report":{"type":"object","properties":{"report_id":{"type":"string","minLength":1},"legal_entity_id":{"type":"string","minLength":1},"report_type":{"type":"string","enum":["TRIAL_BALANCE","INCOME_EXPENSE","TAX_SUMMARY"]},"status":{"type":"string","enum":["PROVISIONAL","FINAL"]},"period_from":{"type":"string","format":"date"},"period_to":{"type":"string","format":"date"},"period_timezone":{"type":"string","minLength":1,"description":"IANA time zone, independent of UI language."},"accounting_profile_ref":{"type":["string","null"],"minLength":1},"tax_profile_ref":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"manifest":{"$ref":"#/components/schemas/ExportManifest"},"document_ref":{"type":"string","minLength":1},"accounting_profile_refs":{"type":"array","items":{"type":"string","minLength":1},"uniqueItems":true},"tax_profile_refs":{"type":"array","items":{"type":"string","minLength":1},"uniqueItems":true}},"required":["report_id","legal_entity_id","report_type","status","period_from","period_to","period_timezone","accounting_profile_ref","tax_profile_ref","manifest","document_ref"],"additionalProperties":false,"description":"Only pre-generated reports in the grant. Metadata does not permit closing a period or filing a tax return."},"Change":{"type":"object","properties":{"event_id":{"type":"string","minLength":1},"sequence":{"type":"string","minLength":1,"description":"Opaque ordered position, not a floating-point number."},"legal_entity_id":{"type":"string","minLength":1},"object_type":{"type":"string","minLength":1},"object_id":{"type":"string","minLength":1},"revision":{"type":"integer","minimum":1},"change_type":{"type":"string","enum":["CREATED","CORRECTED","REVERSED","PROFILE_CHANGED","UPDATED"]},"recorded_at":{"type":"string","format":"date-time"},"effective_on":{"type":"string","format":"date"}},"required":["event_id","sequence","legal_entity_id","object_type","object_id","revision","change_type","recorded_at","effective_on"],"additionalProperties":false,"description":"Events must be intersected with all underlying object/data scopes. The feed never exposes unauthorized object existence."},"Document":{"type":"object","properties":{"document_id":{"type":"string","minLength":1},"legal_entity_id":{"type":"string","minLength":1},"media_type":{"type":"string","enum":["application/pdf","text/csv","application/json"]},"content_sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"download_url":{"type":"string","format":"uri"},"expires_at":{"type":"string","format":"date-time"},"manifest_ref":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["document_id","legal_entity_id","media_type","content_sha256","download_url","expires_at","manifest_ref"],"additionalProperties":false,"description":"Short-lived access to the already authorized object. Scope and expiry must also be enforced when fetching the bytes."},"Capabilities":{"type":"object","properties":{"schema_version":{"type":"string","minLength":1},"language":{"type":"string","enum":["en"]},"read_only":{"const":true},"granted_scopes":{"type":"array","items":{"type":"string","enum":["accounting:read","tax:read","finance_documents:read","finance_changes:read"]}},"legal_entity_ids":{"type":"array","items":{"type":"string","minLength":1}},"configured_jurisdictions":{"type":"array","items":{"type":"string","minLength":1}},"formats":{"type":"array","items":{"type":"string","enum":["application/json","text/csv","application/pdf"]}},"max_page_size":{"type":"integer","minimum":1},"api_audience":{"type":"string","minLength":1},"supported_resources":{"type":"array","items":{"type":"string","minLength":1}}},"required":["schema_version","language","read_only","granted_scopes","legal_entity_ids","configured_jurisdictions","formats","max_page_size","api_audience","supported_resources"],"additionalProperties":false,"description":"Global schema does not imply all jurisdictions are enabled. Required data grants are enforced independently of request filters."},"LegalEntityPage":{"type":"object","properties":{"schema_version":{"type":"string","minLength":1},"snapshot_id":{"type":"string","minLength":1},"snapshot_expires_at":{"type":"string","format":"date-time"},"ledger_watermark":{"type":"string","minLength":1},"generated_at":{"type":"string","format":"date-time"},"data_complete_through":{"type":"string","format":"date-time"},"data":{"type":"array","items":{"$ref":"#/components/schemas/LegalEntity"}},"next_cursor":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["schema_version","snapshot_id","snapshot_expires_at","ledger_watermark","generated_at","data_complete_through","data","next_cursor"],"additionalProperties":false,"description":"All pages use a stable, scope-bound snapshot. Pass snapshot_id from the first response across resources for a consistent export. Filters may not change within a cursor."},"AccountPage":{"type":"object","properties":{"schema_version":{"type":"string","minLength":1},"snapshot_id":{"type":"string","minLength":1},"snapshot_expires_at":{"type":"string","format":"date-time"},"ledger_watermark":{"type":"string","minLength":1},"generated_at":{"type":"string","format":"date-time"},"data_complete_through":{"type":"string","format":"date-time"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Account"}},"next_cursor":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["schema_version","snapshot_id","snapshot_expires_at","ledger_watermark","generated_at","data_complete_through","data","next_cursor"],"additionalProperties":false,"description":"All pages use a stable, scope-bound snapshot. Pass snapshot_id from the first response across resources for a consistent export. Filters may not change within a cursor."},"JournalEntryPage":{"type":"object","properties":{"schema_version":{"type":"string","minLength":1},"snapshot_id":{"type":"string","minLength":1},"snapshot_expires_at":{"type":"string","format":"date-time"},"ledger_watermark":{"type":"string","minLength":1},"generated_at":{"type":"string","format":"date-time"},"data_complete_through":{"type":"string","format":"date-time"},"data":{"type":"array","items":{"$ref":"#/components/schemas/JournalEntry"}},"next_cursor":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["schema_version","snapshot_id","snapshot_expires_at","ledger_watermark","generated_at","data_complete_through","data","next_cursor"],"additionalProperties":false,"description":"All pages use a stable, scope-bound snapshot. Pass snapshot_id from the first response across resources for a consistent export. Filters may not change within a cursor."},"InvoicePage":{"type":"object","properties":{"schema_version":{"type":"string","minLength":1},"snapshot_id":{"type":"string","minLength":1},"snapshot_expires_at":{"type":"string","format":"date-time"},"ledger_watermark":{"type":"string","minLength":1},"generated_at":{"type":"string","format":"date-time"},"data_complete_through":{"type":"string","format":"date-time"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Invoice"}},"next_cursor":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["schema_version","snapshot_id","snapshot_expires_at","ledger_watermark","generated_at","data_complete_through","data","next_cursor"],"additionalProperties":false,"description":"All pages use a stable, scope-bound snapshot. Pass snapshot_id from the first response across resources for a consistent export. Filters may not change within a cursor."},"SettlementPage":{"type":"object","properties":{"schema_version":{"type":"string","minLength":1},"snapshot_id":{"type":"string","minLength":1},"snapshot_expires_at":{"type":"string","format":"date-time"},"ledger_watermark":{"type":"string","minLength":1},"generated_at":{"type":"string","format":"date-time"},"data_complete_through":{"type":"string","format":"date-time"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Settlement"}},"next_cursor":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["schema_version","snapshot_id","snapshot_expires_at","ledger_watermark","generated_at","data_complete_through","data","next_cursor"],"additionalProperties":false,"description":"All pages use a stable, scope-bound snapshot. Pass snapshot_id from the first response across resources for a consistent export. Filters may not change within a cursor."},"TaxDocumentPage":{"type":"object","properties":{"schema_version":{"type":"string","minLength":1},"snapshot_id":{"type":"string","minLength":1},"snapshot_expires_at":{"type":"string","format":"date-time"},"ledger_watermark":{"type":"string","minLength":1},"generated_at":{"type":"string","format":"date-time"},"data_complete_through":{"type":"string","format":"date-time"},"data":{"type":"array","items":{"$ref":"#/components/schemas/TaxDocument"}},"next_cursor":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["schema_version","snapshot_id","snapshot_expires_at","ledger_watermark","generated_at","data_complete_through","data","next_cursor"],"additionalProperties":false,"description":"All pages use a stable, scope-bound snapshot. Pass snapshot_id from the first response across resources for a consistent export. Filters may not change within a cursor."},"ReportPage":{"type":"object","properties":{"schema_version":{"type":"string","minLength":1},"snapshot_id":{"type":"string","minLength":1},"snapshot_expires_at":{"type":"string","format":"date-time"},"ledger_watermark":{"type":"string","minLength":1},"generated_at":{"type":"string","format":"date-time"},"data_complete_through":{"type":"string","format":"date-time"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Report"}},"next_cursor":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["schema_version","snapshot_id","snapshot_expires_at","ledger_watermark","generated_at","data_complete_through","data","next_cursor"],"additionalProperties":false,"description":"All pages use a stable, scope-bound snapshot. Pass snapshot_id from the first response across resources for a consistent export. Filters may not change within a cursor."},"ChangePage":{"type":"object","properties":{"schema_version":{"type":"string","minLength":1},"snapshot_id":{"type":"string","minLength":1},"snapshot_expires_at":{"type":"string","format":"date-time"},"ledger_watermark":{"type":"string","minLength":1},"generated_at":{"type":"string","format":"date-time"},"data_complete_through":{"type":"string","format":"date-time"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Change"}},"next_cursor":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"resume_cursor":{"type":"string","minLength":1,"description":"Persist after processing all data; use on the next incremental request even when next_cursor is null."}},"required":["schema_version","snapshot_id","snapshot_expires_at","ledger_watermark","generated_at","data_complete_through","data","next_cursor","resume_cursor"],"additionalProperties":false,"description":"All pages use a stable, scope-bound snapshot. Pass snapshot_id from the first response across resources for a consistent export. Filters may not change within a cursor."},"ReviewedFXConversion":{"type":"object","properties":{"source_amount":{"$ref":"#/components/schemas/Money"},"reporting_amount":{"$ref":"#/components/schemas/Money"},"rate_ref":{"type":"string"},"numerator":{"type":"string","pattern":"^[1-9][0-9]*$"},"denominator":{"type":"string","pattern":"^[1-9][0-9]*$"},"rate_date":{"type":"string","format":"date"},"method":{"type":"string"},"source_ref":{"type":"string"},"rounding":{"const":"HALF_UP_MINOR_UNIT"}},"required":["source_amount","reporting_amount","rate_ref","numerator","denominator","rate_date","method","source_ref","rounding"],"additionalProperties":false},"InvoiceFiscalContext":{"type":"object","properties":{"commercial_role":{"const":"DISCLOSED_MARKETPLACE_AGENT"},"component":{"enum":["MEDIA","PLATFORM_FEE"]},"profile_ref":{"type":"string"},"invoice_authority_ref":{"type":"string"},"payment_operation_ref":{"type":["string","null"]},"issuer":{"type":"object","properties":{"registered_name":{"type":"string"},"registered_address":{"type":"string"},"domicile_country":{"type":"string"},"tax_registration_ids":{"type":"array","items":{"type":"object","properties":{"country":{"type":"string"},"scheme":{"type":"string"},"value":{"type":"string"}},"required":["country","scheme","value"],"additionalProperties":false}}},"required":["registered_name","registered_address","domicile_country","tax_registration_ids"],"additionalProperties":false},"tax_period_ref":{"type":"string"},"tax_date":{"type":"string","format":"date"},"tax_determination_ref":{"type":"string"},"reporting_conversion":{"anyOf":[{"$ref":"#/components/schemas/ReviewedFXConversion"},{"type":"null"}]},"correction_id":{"type":"string"},"correction_reason":{"type":"string"},"original_invoice_ref":{"type":"string"},"tax_reporting_status":{"type":"string"},"posting_period_ref":{"type":"string"},"posting_date":{"type":"string","format":"date"},"payment_milestone_ref":{"type":"string"}},"required":["commercial_role","component","profile_ref","invoice_authority_ref","issuer","tax_period_ref","tax_date","tax_determination_ref","reporting_conversion","payment_operation_ref"],"additionalProperties":false},"FinancialCorrection":{"type":"object","properties":{"correction_id":{"type":"string"},"legal_entity_id":{"type":"string"},"order_ref":{"type":"string"},"kind":{"type":"string"},"state":{"type":"string"},"document_state":{"type":"string"},"journal_state":{"type":"string"},"cash_state":{"type":"string"},"tax_state":{"type":"string"},"cash_action":{"type":"string"},"reason":{"type":"string"},"recorded_at":{"type":"string","format":"date-time"},"effective_on":{"type":"string","format":"date"},"original_tax_period_ref":{"type":["string","null"]},"source_refs":{"type":"array","items":{"type":"string"}},"document_refs":{"type":"array","items":{"type":"string"}},"journal_refs":{"type":"array","items":{"type":"string"}},"cash_amount":{"$ref":"#/components/schemas/Money"},"cash_operations":{"type":"array","items":{"type":"object","properties":{"operation_id":{"type":"string"},"kind":{"type":"string"},"state":{"type":"string"},"provider_ref":{"type":["string","null"]},"original_operation_ref":{"type":"string"},"amount":{"$ref":"#/components/schemas/Money"}},"required":["operation_id","kind","state","provider_ref","original_operation_ref","amount"],"additionalProperties":false}},"filing_receipt_ref":{"type":["string","null"],"minLength":1},"receivable_receipt_ref":{"type":["string","null"],"minLength":1}},"required":["correction_id","legal_entity_id","order_ref","kind","state","document_state","journal_state","cash_state","tax_state","cash_action","reason","recorded_at","effective_on","original_tax_period_ref","source_refs","document_refs","journal_refs","cash_amount","cash_operations"],"additionalProperties":false},"FiscalProfileExport":{"type":"object","properties":{"profile_ref":{"type":"string"},"legal_entity_id":{"type":"string"},"environment":{"enum":["sandbox","production"]},"content_hash":{"type":"string"},"activated_at":{"type":"string","format":"date-time"},"configuration":{"type":"object","properties":{"registered_name":{"type":"string","minLength":1,"maxLength":250},"principal_type":{"type":"string","enum":["INDIVIDUAL","ORGANIZATION"]},"tax_capacity":{"type":"string","enum":["BUSINESS","NON_BUSINESS"]},"domicile_country":{"type":"string","pattern":"^[A-Z]{2}$"},"registered_address":{"type":"string","minLength":5,"maxLength":1000},"tax_registration_ids":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"country":{"type":"string","pattern":"^[A-Z]{2}$"},"scheme":{"type":"string","minLength":3,"maxLength":500},"value":{"type":"string","minLength":3,"maxLength":500}},"required":["country","scheme","value"],"additionalProperties":false}},"tax_status":{"type":"string","enum":["REGISTERED","NOT_REGISTERED"]},"operating_countries":{"minItems":1,"maxItems":200,"type":"array","items":{"type":"string","pattern":"^[A-Z]{2}$"}},"service_types":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":3,"maxLength":500}},"effective_from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"effective_to":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"period_timezone":{"type":"string","minLength":3,"maxLength":500},"accounting_currency":{"type":"string","pattern":"^[A-Z]{3}$"},"reporting_currency":{"type":"string","pattern":"^[A-Z]{3}$"},"commercial_role":{"type":"string","const":"DISCLOSED_MARKETPLACE_AGENT"},"tax_point_basis":{"type":"string","enum":["INVOICE_ISSUED","PAYMENT_RECEIVED","SERVICE_START"]},"invoice_authority_ref":{"type":"string","minLength":3,"maxLength":500},"review":{"type":"object","properties":{"source_ref":{"type":"string","minLength":3,"maxLength":500},"reviewed_by":{"type":"string","minLength":3,"maxLength":500},"reviewed_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"evidence_sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["source_ref","reviewed_by","reviewed_at","evidence_sha256"],"additionalProperties":false},"accounts":{"type":"object","propertyNames":{"type":"string","enum":["PSP_CLEARING","CUSTOMER_FUNDS","SELLER_PAYABLE","PLATFORM_REVENUE","TAX_PAYABLE","SELLER_RECOVERABLE","CUSTOMER_REFUND_PAYABLE","CUSTOMER_RECEIVABLE"]},"additionalProperties":{"type":"object","properties":{"code":{"type":"string","minLength":3,"maxLength":500},"label":{"type":"string","minLength":3,"maxLength":500},"type":{"type":"string","enum":["ASSET","LIABILITY","EQUITY","REVENUE","EXPENSE"]}},"required":["code","label","type"],"additionalProperties":false},"required":["PSP_CLEARING","CUSTOMER_FUNDS","SELLER_PAYABLE","PLATFORM_REVENUE","TAX_PAYABLE","SELLER_RECOVERABLE","CUSTOMER_REFUND_PAYABLE","CUSTOMER_RECEIVABLE"]},"additional_accounts":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":3,"maxLength":500},"label":{"type":"string","minLength":3,"maxLength":500},"type":{"type":"string","enum":["ASSET","LIABILITY","EQUITY","REVENUE","EXPENSE"]}},"required":["code","label","type"],"additionalProperties":false}},"periods":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"object","properties":{"ref":{"type":"string","minLength":3,"maxLength":500},"start":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"end":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"filing_status":{"type":"string","enum":["NOT_FILED","FILED"]},"filing_receipt_ref":{"anyOf":[{"type":"string","minLength":3,"maxLength":500},{"type":"null"}]}},"required":["ref","start","end","filing_status","filing_receipt_ref"],"additionalProperties":false}},"rules":{"maxItems":500,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":3,"maxLength":500},"component":{"type":"string","enum":["MEDIA","PLATFORM_FEE"]},"service_type":{"type":"string","minLength":3,"maxLength":500},"supplier_country":{"type":"string","pattern":"^[A-Z]{2}$"},"customer_country":{"type":"string","pattern":"^[A-Z]{2}$"},"service_country":{"type":"string","pattern":"^[A-Z]{2}$"},"customer_tax_status":{"type":"string","enum":["REGISTERED","NOT_REGISTERED"]},"customer_tax_capacity":{"type":"string","enum":["BUSINESS","NON_BUSINESS"]},"effective_from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"effective_to":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"tax_jurisdiction":{"type":"string","minLength":3,"maxLength":500},"tax_type":{"type":"string","minLength":3,"maxLength":500},"tax_code":{"type":"string","minLength":3,"maxLength":500},"treatment":{"type":"string","enum":["STANDARD","EXEMPT","REVERSE_CHARGE","OUT_OF_SCOPE"]},"rate_basis_points":{"type":"integer","minimum":0,"maximum":10000},"explanation":{"type":"string","minLength":10,"maxLength":2000},"exemption_reason":{"anyOf":[{"type":"string","minLength":5,"maxLength":1000},{"type":"null"}]},"review":{"type":"object","properties":{"source_ref":{"type":"string","minLength":3,"maxLength":500},"reviewed_by":{"type":"string","minLength":3,"maxLength":500},"reviewed_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"evidence_sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["source_ref","reviewed_by","reviewed_at","evidence_sha256"],"additionalProperties":false}},"required":["id","component","service_type","supplier_country","customer_country","service_country","customer_tax_status","effective_from","effective_to","tax_jurisdiction","tax_type","tax_code","treatment","rate_basis_points","explanation","exemption_reason","review"],"additionalProperties":false}},"fx_rates":{"maxItems":1000,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":3,"maxLength":500},"from":{"type":"string","pattern":"^[A-Z]{3}$"},"to":{"type":"string","pattern":"^[A-Z]{3}$"},"numerator":{"type":"string","pattern":"^[1-9][0-9]{0,23}$"},"denominator":{"type":"string","pattern":"^[1-9][0-9]{0,23}$"},"effective_from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"effective_to":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"rate_date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"method":{"type":"string","minLength":3,"maxLength":500},"review":{"type":"object","properties":{"source_ref":{"type":"string","minLength":3,"maxLength":500},"reviewed_by":{"type":"string","minLength":3,"maxLength":500},"reviewed_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"evidence_sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["source_ref","reviewed_by","reviewed_at","evidence_sha256"],"additionalProperties":false}},"required":["id","from","to","numerator","denominator","effective_from","effective_to","rate_date","method","review"],"additionalProperties":false}}},"required":["registered_name","domicile_country","registered_address","tax_registration_ids","tax_status","operating_countries","service_types","effective_from","effective_to","period_timezone","accounting_currency","reporting_currency","commercial_role","tax_point_basis","invoice_authority_ref","review","accounts","periods","rules","fx_rates"],"additionalProperties":false}},"required":["profile_ref","legal_entity_id","environment","content_hash","activated_at","configuration"],"additionalProperties":false},"FinancialCorrectionPage":{"type":"object","properties":{"schema_version":{"type":"string","minLength":1},"snapshot_id":{"type":"string","minLength":1},"snapshot_expires_at":{"type":"string","format":"date-time"},"ledger_watermark":{"type":"string","minLength":1},"generated_at":{"type":"string","format":"date-time"},"data_complete_through":{"type":"string","format":"date-time"},"data":{"type":"array","items":{"$ref":"#/components/schemas/FinancialCorrection"}},"next_cursor":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["schema_version","snapshot_id","snapshot_expires_at","ledger_watermark","generated_at","data_complete_through","data","next_cursor"],"additionalProperties":false,"description":"All pages use a stable, scope-bound snapshot. Pass snapshot_id from the first response across resources for a consistent export. Filters may not change within a cursor."},"FiscalProfileExportPage":{"type":"object","properties":{"schema_version":{"type":"string","minLength":1},"snapshot_id":{"type":"string","minLength":1},"snapshot_expires_at":{"type":"string","format":"date-time"},"ledger_watermark":{"type":"string","minLength":1},"generated_at":{"type":"string","format":"date-time"},"data_complete_through":{"type":"string","format":"date-time"},"data":{"type":"array","items":{"$ref":"#/components/schemas/FiscalProfileExport"}},"next_cursor":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["schema_version","snapshot_id","snapshot_expires_at","ledger_watermark","generated_at","data_complete_through","data","next_cursor"],"additionalProperties":false,"description":"All pages use a stable, scope-bound snapshot. Pass snapshot_id from the first response across resources for a consistent export. Filters may not change within a cursor."},"PaymentObligation":{"type":"object","properties":{"obligation_id":{"type":"string","minLength":1},"order_id":{"type":"string","minLength":1},"milestone_id":{"type":"string","minLength":1},"legal_entity_id":{"type":"string","minLength":1},"debtor_legal_entity_id":{"type":"string","minLength":1},"creditor_legal_entity_id":{"type":"string","minLength":1},"kind":{"enum":["MEDIA","SERVICE","PLATFORM_FEE","COVERAGE","FINANCING_REPAYMENT"]},"contractual_ceiling":{"$ref":"#/components/schemas/Money"},"earned":{"$ref":"#/components/schemas/Money"},"transferred":{"$ref":"#/components/schemas/Money"},"due_at":{"type":["string","null"],"format":"date-time"},"state":{"type":"string","minLength":1},"terms_hash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"recorded_at":{"type":"string","format":"date-time"}},"required":["obligation_id","order_id","milestone_id","legal_entity_id","debtor_legal_entity_id","creditor_legal_entity_id","kind","contractual_ceiling","earned","transferred","due_at","state","terms_hash","recorded_at"],"additionalProperties":false},"PaymentObligationPage":{"type":"object","properties":{"schema_version":{"type":"string","minLength":1},"snapshot_id":{"type":"string","minLength":1},"snapshot_expires_at":{"type":"string","format":"date-time"},"ledger_watermark":{"type":"string","minLength":1},"generated_at":{"type":"string","format":"date-time"},"data_complete_through":{"type":"string","format":"date-time"},"data":{"type":"array","items":{"$ref":"#/components/schemas/PaymentObligation"}},"next_cursor":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["schema_version","snapshot_id","snapshot_expires_at","ledger_watermark","generated_at","data_complete_through","data","next_cursor"],"additionalProperties":false,"description":"All pages use a stable, scope-bound snapshot. Pass snapshot_id from the first response across resources for a consistent export. Filters may not change within a cursor."},"PaymentSchedule":{"type":"object","properties":{"milestone_id":{"type":"string","minLength":1},"order_id":{"type":"string","minLength":1},"legal_entity_id":{"type":"string","minLength":1},"reference":{"type":"string","minLength":1},"title":{"type":"string","minLength":1},"quantity":{"type":"integer","minimum":1},"accepted_quantity":{"type":"integer","minimum":0},"state":{"type":"string","minLength":1},"start_at":{"type":"string","format":"date-time"},"end_at":{"type":"string","format":"date-time"},"funding_due_at":{"type":"string","format":"date-time"},"provider_due_at":{"type":["string","null"],"format":"date-time"},"payment_due_at":{"type":["string","null"],"format":"date-time"},"accepted_at":{"type":["string","null"],"format":"date-time"},"invoice_received_at":{"type":["string","null"],"format":"date-time"},"invoice_valid_at":{"type":["string","null"],"format":"date-time"},"invoice_refs":{"type":"array","items":{"type":"string","minLength":1}},"recorded_at":{"type":"string","format":"date-time"}},"required":["milestone_id","order_id","legal_entity_id","reference","title","quantity","accepted_quantity","state","start_at","end_at","funding_due_at","provider_due_at","payment_due_at","accepted_at","invoice_received_at","invoice_valid_at","invoice_refs","recorded_at"],"additionalProperties":false},"PaymentSchedulePage":{"type":"object","properties":{"schema_version":{"type":"string","minLength":1},"snapshot_id":{"type":"string","minLength":1},"snapshot_expires_at":{"type":"string","format":"date-time"},"ledger_watermark":{"type":"string","minLength":1},"generated_at":{"type":"string","format":"date-time"},"data_complete_through":{"type":"string","format":"date-time"},"data":{"type":"array","items":{"$ref":"#/components/schemas/PaymentSchedule"}},"next_cursor":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["schema_version","snapshot_id","snapshot_expires_at","ledger_watermark","generated_at","data_complete_through","data","next_cursor"],"additionalProperties":false,"description":"All pages use a stable, scope-bound snapshot. Pass snapshot_id from the first response across resources for a consistent export. Filters may not change within a cursor."},"FundingAllocation":{"type":"object","properties":{"allocation_id":{"type":"string","minLength":1},"order_id":{"type":"string","minLength":1},"legal_entity_id":{"type":"string","minLength":1},"facility_ref":{"type":["string","null"]},"ceiling":{"$ref":"#/components/schemas/Money"},"funded":{"$ref":"#/components/schemas/Money"},"repaid":{"$ref":"#/components/schemas/Money"},"restricted":{"$ref":"#/components/schemas/Money"},"released":{"$ref":"#/components/schemas/Money"},"credit_exposure":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}]},"recorded_at":{"type":"string","format":"date-time"}},"required":["allocation_id","order_id","legal_entity_id","facility_ref","ceiling","funded","repaid","restricted","released","credit_exposure","recorded_at"],"additionalProperties":false},"FundingAllocationPage":{"type":"object","properties":{"schema_version":{"type":"string","minLength":1},"snapshot_id":{"type":"string","minLength":1},"snapshot_expires_at":{"type":"string","format":"date-time"},"ledger_watermark":{"type":"string","minLength":1},"generated_at":{"type":"string","format":"date-time"},"data_complete_through":{"type":"string","format":"date-time"},"data":{"type":"array","items":{"$ref":"#/components/schemas/FundingAllocation"}},"next_cursor":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["schema_version","snapshot_id","snapshot_expires_at","ledger_watermark","generated_at","data_complete_through","data","next_cursor"],"additionalProperties":false,"description":"All pages use a stable, scope-bound snapshot. Pass snapshot_id from the first response across resources for a consistent export. Filters may not change within a cursor."},"Order":{"type":"object","required":["id","revision","buyer_id","seller_id","quantity","states","contract","all_in_total","settled","refunded"],"properties":{"id":{"type":"string"},"revision":{"type":"integer"},"buyer_id":{"type":"string"},"seller_id":{"type":"string"},"offer_id":{"type":"string"},"product_id":{"type":"string"},"quantity":{"type":"integer"},"accepted_quantity":{"type":"integer"},"agreed_resolution_quantity":{"type":["integer","null"]},"created_at":{"type":"string","format":"date-time"},"media":{"$ref":"#/components/schemas/Money"},"platform_fee":{"$ref":"#/components/schemas/Money"},"tax":{"$ref":"#/components/schemas/Money"},"all_in_total":{"$ref":"#/components/schemas/Money"},"settled":{"$ref":"#/components/schemas/Money"},"refunded":{"$ref":"#/components/schemas/Money"},"disputed":{"$ref":"#/components/schemas/Money"},"states":{"type":"object","required":["contract","reservation","delivery","verification","funding","settlement","dispute"],"additionalProperties":{"type":"string"}},"contract":{"type":"object","required":["schema_version","terms","accepted_offer_hash","environment","canonical_profile"]},"operations":{"type":"array","items":{"type":"object","required":["id","kind","state","attempts"]}}},"additionalProperties":false}}},"x-architecture-revision":"1.2","x-language":"en","x-read-only":true,"x-required-runtime-controls":["Deny every source financial write at gateway, service and database layers.","Grant entity/tenant/time/purpose scope is always authoritative.","Legal relocation creates profiles or entities; never rewrites past records.","Use snapshot-consistent pagination and incremental changes for late corrections.","Internal audit/metrics writes are not financial mutations.","Never imply all-country tax compliance from the global schema."]}