{"openapi":"3.1.0","info":{"title":"Path Invoice Service","description":"Generates ISV and Bank invoices/statements for Path merchants.","version":"1.0.0"},"paths":{"/health":{"get":{"summary":"Health","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/generate":{"post":{"summary":"Trigger Generate","operationId":"trigger_generate_generate_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/export":{"post":{"summary":"Generate Export Pdf","description":"Render a merchant export PDF and store it. Returns the stored path, which\nthe portal records on the job and streams back to the merchant.","operationId":"generate_export_pdf_export_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportPdfRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportPdfResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/runs":{"get":{"summary":"List Runs","operationId":"list_runs_runs_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/runs/{run_id}":{"get":{"summary":"Get Run","operationId":"get_run_runs__run_id__get","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"ExportPdfRequest":{"properties":{"account_id":{"type":"string","title":"Account Id"},"job_id":{"type":"string","title":"Job Id"},"brand_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand Name"},"primary_colour":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Primary Colour"},"accent_colour":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accent Colour"},"logo_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logo Path"},"logo_data":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logo Data"},"logo_mime":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logo Mime"},"title":{"type":"string","title":"Title"},"merchant_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Merchant Name"},"date_range_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date Range Label"},"generated_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Generated Label"},"columns":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Columns","default":[]},"rows":{"items":{"items":{},"type":"array"},"type":"array","title":"Rows","default":[]},"totals":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Totals","default":[]},"truncated":{"type":"boolean","title":"Truncated","default":false},"footer_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Footer Text"}},"type":"object","required":["account_id","job_id","title"],"title":"ExportPdfRequest","description":"Ad-hoc merchant export PDF. The portal sends pre-formatted cells/totals/\nlabels, so this service is a pure renderer (no DB access)."},"ExportPdfResponse":{"properties":{"storage_path":{"type":"string","title":"Storage Path"}},"type":"object","required":["storage_path"],"title":"ExportPdfResponse"},"GenerateRequest":{"properties":{"billing_month":{"type":"string","title":"Billing Month"},"run_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Run Id"},"bank_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bank Id"},"partner_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Partner Id"},"account_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Account Ids"}},"type":"object","required":["billing_month"],"title":"GenerateRequest"},"GenerateResponse":{"properties":{"run_id":{"type":"string","title":"Run Id"},"status":{"type":"string","title":"Status"},"generated":{"type":"integer","title":"Generated"},"failed":{"type":"integer","title":"Failed"},"failed_accounts":{"items":{},"type":"array","title":"Failed Accounts"}},"type":"object","required":["run_id","status","generated","failed","failed_accounts"],"title":"GenerateResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}