{"openapi":"3.1.0","info":{"title":"Invoice Manager","version":"1.0"},"paths":{"/api/upload":{"post":{"summary":"Upload","description":"Batch upload. `paths` (optional) carries each file's folder-relative path\nfrom a directory upload. Only recognised categories are inherited.","operationId":"upload_api_upload_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_api_upload_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/invoices":{"post":{"summary":"Create Manual","operationId":"create_manual_api_invoices_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManualInvoice"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"summary":"List Invoices","operationId":"list_invoices_api_invoices_get","parameters":[{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"doc_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Doc Type"}},{"name":"party","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Party"}},{"name":"payer","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payer"}},{"name":"reclaim","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reclaim"}},{"name":"checked","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Checked"}},{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"}},{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"}},{"name":"year","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Year"}},{"name":"review","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Review"}},{"name":"datev","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Datev"}},{"name":"duplicate","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Duplicate"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string","default":"created_at","title":"Sort"}},{"name":"order","in":"query","required":false,"schema":{"type":"string","default":"desc","title":"Order"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/library":{"get":{"summary":"Library Summary","operationId":"library_summary_api_library_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/me":{"get":{"summary":"Current Person","operationId":"current_person_api_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/activity":{"get":{"summary":"List Activity","operationId":"list_activity_api_activity_get","parameters":[{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}},{"name":"document_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Document Id"}},{"name":"action","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Action"}},{"name":"before","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Before"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/duplicates/scan":{"post":{"summary":"Scan Duplicates","operationId":"scan_duplicates_api_duplicates_scan_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/duplicates":{"get":{"summary":"List Duplicates","operationId":"list_duplicates_api_duplicates_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","default":"pending","title":"Status"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/duplicates/{left_id}/{right_id}/{decision}":{"post":{"summary":"Decide Duplicate","operationId":"decide_duplicate_api_duplicates__left_id___right_id___decision__post","parameters":[{"name":"left_id","in":"path","required":true,"schema":{"type":"integer","title":"Left Id"}},{"name":"right_id","in":"path","required":true,"schema":{"type":"integer","title":"Right Id"}},{"name":"decision","in":"path","required":true,"schema":{"type":"string","title":"Decision"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/intake/status":{"get":{"summary":"Intake Status","operationId":"intake_status_api_intake_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/stats":{"get":{"summary":"Stats","operationId":"stats_api_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/meta":{"get":{"summary":"Meta","operationId":"meta_api_meta_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/fx/refresh":{"post":{"summary":"Refresh Fx","description":"Download official ECB historical rates, then recompute every EUR amount.","operationId":"refresh_fx_api_fx_refresh_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/invoices/{inv_id}":{"get":{"summary":"Get Invoice","operationId":"get_invoice_api_invoices__inv_id__get","parameters":[{"name":"inv_id","in":"path","required":true,"schema":{"type":"integer","title":"Inv Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"summary":"Update Invoice","operationId":"update_invoice_api_invoices__inv_id__patch","parameters":[{"name":"inv_id","in":"path","required":true,"schema":{"type":"integer","title":"Inv Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete Invoice","operationId":"delete_invoice_api_invoices__inv_id__delete","parameters":[{"name":"inv_id","in":"path","required":true,"schema":{"type":"integer","title":"Inv Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/invoices/{inv_id}/file":{"get":{"summary":"Get File","operationId":"get_file_api_invoices__inv_id__file_get","parameters":[{"name":"inv_id","in":"path","required":true,"schema":{"type":"integer","title":"Inv Id"}},{"name":"download","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Download"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/invoices/{inv_id}/toggle-paid":{"post":{"summary":"Toggle Paid","operationId":"toggle_paid_api_invoices__inv_id__toggle_paid_post","parameters":[{"name":"inv_id","in":"path","required":true,"schema":{"type":"integer","title":"Inv Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/invoices/bulk":{"post":{"summary":"Bulk Action","description":"Mark a selected group reimbursed/unreimbursed, or delete it.","operationId":"bulk_action_api_invoices_bulk_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkAction"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/export/documents":{"post":{"summary":"Export Documents","operationId":"export_documents_api_export_documents_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentExport"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/reimbursement":{"post":{"summary":"Reimbursement","description":"JSON summary for the on-screen preview + the ready-to-copy transfer block.\nThe transfer reference is a single short id; the full itemisation is in the PDF.","operationId":"reimbursement_api_reimbursement_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReimburseRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/reimbursement/pdf":{"get":{"summary":"Reimbursement Pdf","description":"One PDF per payer's unpaid items (or an explicit id set): each amount, its ECB\nmonthly rate and EUR value, headed by the unique reference used on the transfer.","operationId":"reimbursement_pdf_api_reimbursement_pdf_get","parameters":[{"name":"payer","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payer"}},{"name":"ids","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ids"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/bank/import":{"post":{"summary":"Bank Import","description":"Import CAMT.053 / MT940 / CSV statement exports. Duplicate lines are skipped,\nso overlapping periods can be re-imported safely.","operationId":"bank_import_api_bank_import_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_bank_import_api_bank_import_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/bank/transactions":{"get":{"summary":"List Transactions","operationId":"list_transactions_api_bank_transactions_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}},{"name":"month","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Month"}},{"name":"direction","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Direction"}},{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"}},{"name":"counterparty","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Counterparty"}},{"name":"date_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date From"}},{"name":"date_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date To"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string","default":"booking_date","title":"Sort"}},{"name":"order","in":"query","required":false,"schema":{"type":"string","default":"desc","title":"Order"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/bank/transactions/{txn_id}":{"get":{"summary":"Get Transaction","operationId":"get_transaction_api_bank_transactions__txn_id__get","parameters":[{"name":"txn_id","in":"path","required":true,"schema":{"type":"integer","title":"Txn Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"summary":"Update Transaction","operationId":"update_transaction_api_bank_transactions__txn_id__patch","parameters":[{"name":"txn_id","in":"path","required":true,"schema":{"type":"integer","title":"Txn Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/bank/transactions/{txn_id}/suggestions":{"get":{"summary":"Transaction Suggestions","description":"Ranked documents that could account for this transaction.","operationId":"transaction_suggestions_api_bank_transactions__txn_id__suggestions_get","parameters":[{"name":"txn_id","in":"path","required":true,"schema":{"type":"integer","title":"Txn Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/bank/transactions/{txn_id}/documents":{"post":{"summary":"Upload Document For Transaction","description":"Upload the invoice for one bank transaction and attach it immediately.\n\nDocuments arriving this way were paid from the company account, so they are marked\npayment_source='company': nobody is owed a reimbursement, and they stay out of the\nper-person reimbursement figures. Missing fields (vendor, date) fall back to the\ntransaction itself, which is often better data than a card receipt carries.","operationId":"upload_document_for_transaction_api_bank_transactions__txn_id__documents_post","parameters":[{"name":"txn_id","in":"path","required":true,"schema":{"type":"integer","title":"Txn Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_document_for_transaction_api_bank_transactions__txn_id__documents_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/documents/bulk":{"post":{"summary":"Bulk Documents","description":"Upload many invoices at once and let each find its own bank transaction.\n\nThe inverse of /api/bank/automatch: that walks transactions looking for documents,\nthis walks documents looking for the payment. Matching only happens against\ntransactions that still need a document, and only when the winner is both strong\nand clearly ahead of the runner-up — an unsure document is stored unattached\nrather than pinned to the wrong payment.","operationId":"bulk_documents_api_documents_bulk_post","parameters":[{"name":"threshold","in":"query","required":false,"schema":{"type":"number","default":0.72,"title":"Threshold"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_bulk_documents_api_documents_bulk_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/bank/match":{"post":{"summary":"Match Documents","operationId":"match_documents_api_bank_match_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MatchRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/bank/match/{match_id}":{"delete":{"summary":"Unmatch","operationId":"unmatch_api_bank_match__match_id__delete","parameters":[{"name":"match_id","in":"path","required":true,"schema":{"type":"integer","title":"Match Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/bank/automatch":{"post":{"summary":"Automatch","description":"Attach documents where the evidence is strong and unambiguous; everything else\nis left for review. Reports what it did (and would have done, in dry-run).","operationId":"automatch_api_bank_automatch_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutoMatchRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/bank/stats":{"get":{"summary":"Bank Stats","description":"Monthly spending, document coverage, and the VAT-reclaim picture.","operationId":"bank_stats_api_bank_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/bank/categorise":{"post":{"summary":"Categorise Transactions","description":"Fill in transaction categories from the rule set. Leaves manually-set\ncategories alone unless overwrite=true.","operationId":"categorise_transactions_api_bank_categorise_post","parameters":[{"name":"overwrite","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Overwrite"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/financials":{"get":{"summary":"Financials","operationId":"financials_api_financials_get","parameters":[{"name":"months","in":"query","required":false,"schema":{"type":"integer","default":12,"title":"Months"}},{"name":"year","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Year"}},{"name":"quarter","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Quarter"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/updates/{year}/{quarter}":{"get":{"summary":"Get Update","operationId":"get_update_api_updates__year___quarter__get","parameters":[{"name":"year","in":"path","required":true,"schema":{"type":"integer","title":"Year"}},{"name":"quarter","in":"path","required":true,"schema":{"type":"integer","title":"Quarter"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/updates":{"put":{"summary":"Save Update","description":"Upsert the narrative for a period.","operationId":"save_update_api_updates_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/reports/quarters":{"get":{"summary":"List Quarters","description":"Quarters that actually contain data, newest first.","operationId":"list_quarters_api_reports_quarters_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/reports/quarterly":{"get":{"summary":"Quarterly Json","operationId":"quarterly_json_api_reports_quarterly_get","parameters":[{"name":"year","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Year"}},{"name":"quarter","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Quarter"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/reports/quarterly.pdf":{"get":{"summary":"Quarterly Pdf Report","operationId":"quarterly_pdf_report_api_reports_quarterly_pdf_get","parameters":[{"name":"year","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Year"}},{"name":"quarter","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Quarter"}},{"name":"audience","in":"query","required":false,"schema":{"type":"string","default":"investor","title":"Audience"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/reports/spending.csv":{"get":{"summary":"Spending Csv","operationId":"spending_csv_api_reports_spending_csv_get","parameters":[{"name":"year","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Year"}},{"name":"quarter","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Quarter"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/vat/report":{"get":{"summary":"Vat Report","description":"Input-VAT (Vorsteuer) overview per month, from documents that carry a tax\namount AND pass the billing-address check. Documents flagged 'check' are listed\nseparately — they are NOT counted as reclaimable until reviewed.","operationId":"vat_report_api_vat_report_get","parameters":[{"name":"year","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Year"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/":{"get":{"summary":"Index","operationId":"index__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/intake/heartbeat":{"post":{"summary":"Heartbeat","operationId":"heartbeat_api_intake_heartbeat_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Heartbeat"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/intake/email":{"post":{"summary":"Receive","operationId":"receive_api_intake_email_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_receive_api_intake_email_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AutoMatchRequest":{"properties":{"transaction_ids":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Transaction Ids"},"dry_run":{"type":"boolean","title":"Dry Run","default":false},"threshold":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Threshold"}},"type":"object","title":"AutoMatchRequest","description":"Run the matcher over unaccounted transactions."},"Body_bank_import_api_bank_import_post":{"properties":{"files":{"items":{"type":"string","contentMediaType":"application/octet-stream"},"type":"array","title":"Files"}},"type":"object","required":["files"],"title":"Body_bank_import_api_bank_import_post"},"Body_bulk_documents_api_documents_bulk_post":{"properties":{"files":{"items":{"type":"string","contentMediaType":"application/octet-stream"},"type":"array","title":"Files"}},"type":"object","required":["files"],"title":"Body_bulk_documents_api_documents_bulk_post"},"Body_receive_api_intake_email_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"},"sender":{"type":"string","title":"Sender"},"message_id":{"type":"string","title":"Message Id"},"sender_verified":{"type":"boolean","title":"Sender Verified","default":false},"mailbox":{"type":"string","title":"Mailbox","default":"reimbursement@helliontech.eu"}},"type":"object","required":["file","sender","message_id"],"title":"Body_receive_api_intake_email_post"},"Body_upload_api_upload_post":{"properties":{"files":{"items":{"type":"string","contentMediaType":"application/octet-stream"},"type":"array","title":"Files"},"paths":{"items":{"type":"string"},"type":"array","title":"Paths","default":[]},"source":{"type":"string","title":"Source","default":"employee"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"labels":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Labels"},"payer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payer"}},"type":"object","required":["files"],"title":"Body_upload_api_upload_post"},"Body_upload_document_for_transaction_api_bank_transactions__txn_id__documents_post":{"properties":{"files":{"items":{"type":"string","contentMediaType":"application/octet-stream"},"type":"array","title":"Files"}},"type":"object","required":["files"],"title":"Body_upload_document_for_transaction_api_bank_transactions__txn_id__documents_post"},"BulkAction":{"properties":{"ids":{"items":{"type":"integer"},"type":"array","title":"Ids"},"action":{"type":"string","title":"Action"}},"type":"object","required":["ids","action"],"title":"BulkAction"},"DocumentExport":{"properties":{"ids":{"items":{"type":"integer"},"type":"array","title":"Ids"},"source":{"type":"string","title":"Source"}},"type":"object","required":["ids","source"],"title":"DocumentExport"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"Heartbeat":{"properties":{"mailbox":{"type":"string","title":"Mailbox"},"ok":{"type":"boolean","title":"Ok","default":true},"imported":{"type":"integer","title":"Imported","default":0},"error":{"type":"string","title":"Error","default":""}},"type":"object","required":["mailbox"],"title":"Heartbeat"},"InvoiceUpdate":{"properties":{"datev_sent":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Datev Sent"},"doc_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Doc Type"},"party":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Party"},"payer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payer"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"labels":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Labels"},"invoice_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invoice Number"},"issue_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Issue Date"},"due_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Due Date"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency"},"amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Amount"},"tax_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tax Amount"},"amount_eur":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Amount Eur"},"tax_reclaim":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tax Reclaim"},"checked":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Checked"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"paid_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Paid Date"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","title":"InvoiceUpdate"},"ManualInvoice":{"properties":{"doc_type":{"type":"string","title":"Doc Type","default":"invoice"},"payment_source":{"type":"string","title":"Payment Source","default":"employee"},"party":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Party"},"payer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payer"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"labels":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Labels"},"invoice_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invoice Number"},"issue_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Issue Date"},"due_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Due Date"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency"},"amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Amount"},"tax_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tax Amount"},"tax_reclaim":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tax Reclaim"},"checked":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Checked","default":false},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","title":"ManualInvoice","description":"Create an entry by hand (no file)."},"MatchRequest":{"properties":{"transaction_id":{"type":"integer","title":"Transaction Id"},"invoice_ids":{"items":{"type":"integer"},"type":"array","title":"Invoice Ids"}},"type":"object","required":["transaction_id","invoice_ids"],"title":"MatchRequest","description":"Attach one or more documents to a bank transaction."},"PeriodUpdate":{"properties":{"year":{"type":"integer","title":"Year"},"quarter":{"type":"integer","title":"Quarter"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"},"highlights":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Highlights"},"lowlights":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lowlights"},"plans":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plans"},"asks":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Asks"},"kpis":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kpis"},"headcount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Headcount"},"revenue_eur":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Revenue Eur"},"author":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Author"}},"type":"object","required":["year","quarter"],"title":"PeriodUpdate","description":"Narrative for one reporting period. Everything optional — a partly-filled\nupdate is better than none, and empty sections are simply omitted from the PDF."},"ReimburseRequest":{"properties":{"payer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payer"},"ids":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Ids"}},"type":"object","title":"ReimburseRequest","description":"Generate a reimbursement statement for one payer's unpaid items, or for an\nexplicit set of document ids."},"TransactionUpdate":{"properties":{"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"counterparty":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Counterparty"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","title":"TransactionUpdate"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}