{"openapi":"3.1.0","info":{"title":"CREDFORT API","description":"Fraud checks on payslips, bank statements, SARS tax certificates and assessments, proof of address and employment letters: metadata forensics, arithmetic integrity, income verification and document reuse. Authenticate with `Authorization: Bearer <api key>`.","version":"1.0.0"},"paths":{"/health":{"get":{"tags":["service"],"summary":"Health","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/catalogue":{"get":{"tags":["reference"],"summary":"Catalogue","operationId":"catalogue_v1_catalogue_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/pricing":{"get":{"tags":["reference"],"summary":"Public Pricing","operationId":"public_pricing_v1_pricing_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/files":{"post":{"tags":["cases"],"summary":"Upload File","operationId":"upload_file_v1_files_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_file_v1_files_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/cases":{"post":{"tags":["cases"],"summary":"Create Case","operationId":"create_case_v1_cases_post","parameters":[{"name":"idempotency-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaseIn"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["cases"],"summary":"List Cases","operationId":"list_cases_v1_cases_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":25,"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"}}}}}}},"/v1/cases/{case_id}":{"get":{"tags":["cases"],"summary":"Get Case","operationId":"get_case_v1_cases__case_id__get","parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","title":"Case 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"}}}}}}},"/v1/cases/{case_id}/outcome":{"post":{"tags":["cases"],"summary":"Post Outcome","operationId":"post_outcome_v1_cases__case_id__outcome_post","parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","title":"Case Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutcomeIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/checks/doc-forensics":{"post":{"tags":["checks"],"summary":"Doc Forensics","operationId":"doc_forensics_v1_checks_doc_forensics_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_doc_forensics_v1_checks_doc_forensics_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/rules":{"get":{"tags":["account"],"summary":"Get Rules","operationId":"get_rules_v1_rules_get","parameters":[{"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"}}}}}},"put":{"tags":["account"],"summary":"Put Rules","operationId":"put_rules_v1_rules_put","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/RuleSet"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/usage":{"get":{"tags":["account"],"summary":"Usage","operationId":"usage_v1_usage_get","parameters":[{"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"}}}}}}},"/v1/billing":{"get":{"tags":["account"],"summary":"My Billing","description":"This month's running invoice (or another month's, as YYYY-MM).","operationId":"my_billing_v1_billing_get","parameters":[{"name":"month","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Month"}},{"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":{"Body_doc_forensics_v1_checks_doc_forensics_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"},"document_type":{"type":"string","title":"Document Type","default":"PAYSLIP"}},"type":"object","required":["file"],"title":"Body_doc_forensics_v1_checks_doc_forensics_post"},"Body_upload_file_v1_files_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_file_v1_files_post"},"CaseFileIn":{"properties":{"file_id":{"type":"string","title":"File Id"},"document_type":{"type":"string","enum":["PAYSLIP","BANK_STATEMENT","TAX_CERTIFICATE","TAX_ASSESSMENT","PROOF_OF_ADDRESS","EMPLOYMENT_LETTER"],"title":"Document Type"},"figures":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Figures"}},"type":"object","required":["file_id","document_type"],"title":"CaseFileIn"},"CaseIn":{"properties":{"external_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Ref"},"modules":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Modules"},"subject":{"$ref":"#/components/schemas/Subject"},"files":{"items":{"$ref":"#/components/schemas/CaseFileIn"},"type":"array","maxItems":10,"minItems":1,"title":"Files"},"consent":{"$ref":"#/components/schemas/Consent"}},"type":"object","required":["subject","files","consent"],"title":"CaseIn"},"Consent":{"properties":{"reference":{"type":"string","minLength":1,"title":"Reference"},"captured_at":{"type":"string","format":"date-time","title":"Captured At"},"channel":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Channel"}},"type":"object","required":["reference","captured_at"],"title":"Consent"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"OutcomeIn":{"properties":{"outcome":{"type":"string","enum":["approved","declined","confirmed_fraud","false_positive"],"title":"Outcome"}},"type":"object","required":["outcome"],"title":"OutcomeIn"},"RuleSet":{"properties":{"payslip_max_age_days":{"type":"integer","title":"Payslip Max Age Days","default":40},"statement_max_age_days":{"type":"integer","title":"Statement Max Age Days","default":31},"min_statement_months":{"type":"integer","title":"Min Statement Months","default":3},"tax_document_max_age_days":{"type":"integer","title":"Tax Document Max Age Days","default":550},"address_max_age_days":{"type":"integer","title":"Address Max Age Days","default":92},"employment_letter_max_age_days":{"type":"integer","title":"Employment Letter Max Age Days","default":92},"arithmetic_tolerance_rand":{"type":"number","title":"Arithmetic Tolerance Rand","default":5.0},"salary_variance_tolerance_pct":{"type":"number","title":"Salary Variance Tolerance Pct","default":15.0},"salary_sweep_tolerance_pct":{"type":"number","title":"Salary Sweep Tolerance Pct","default":10.0},"min_salary_months":{"type":"integer","title":"Min Salary Months","default":3},"declared_income_variance_pct":{"type":"number","title":"Declared Income Variance Pct","default":25.0},"incremental_saves_hard":{"type":"integer","title":"Incremental Saves Hard","default":3},"bank_modified_after_creation_seconds":{"type":"integer","title":"Bank Modified After Creation Seconds","default":3600},"bank_producer_check":{"type":"boolean","title":"Bank Producer Check","default":true},"mismatch_strikes_to_block":{"type":"integer","title":"Mismatch Strikes To Block","default":2},"auto_block":{"type":"boolean","title":"Auto Block","default":true},"severity_overrides":{"additionalProperties":{"type":"string"},"type":"object","title":"Severity Overrides"},"statement_severity_overrides":{"additionalProperties":{"type":"string"},"type":"object","title":"Statement Severity Overrides"}},"type":"object","title":"RuleSet"},"Subject":{"properties":{"id_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id Number"},"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"},"account_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Number"},"employer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Employer"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"}},"type":"object","title":"Subject"},"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"}}}}