{"openapi":"3.1.0","info":{"title":"GET /api/v1/credit/programs","version":"1.0.0","description":"List lending programs"},"servers":[{"url":"https://api.ondayzero.com","description":"Production"}],"paths":{"/api/v1/credit/programs":{"get":{"tags":["credit"],"summary":"List lending programs","description":"Every program this business operates, with its policy status.","operationId":"list_programs_api_v1_credit_programs_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-business-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Business-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope_list_CreditProgramResponse__"}}}},"401":{"description":"Unauthorized - Authentication required","content":{"application/json":{"example":{"detail":"Not authenticated"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"detail":"Not enough permissions"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"CreditProgramResponse":{"properties":{"id":{"type":"string","title":"Id"},"slug":{"type":"string","title":"Slug"},"display_name":{"type":"string","title":"Display Name"},"status":{"$ref":"#/components/schemas/ProgramStatusEnum"},"limit_min_cents":{"type":"integer","title":"Limit Min Cents"},"limit_max_cents":{"type":"integer","title":"Limit Max Cents"},"allowed_term_days":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Allowed Term Days"},"default_rate_bps":{"type":"integer","title":"Default Rate Bps"},"default_disbursement_fee_bps":{"type":"integer","title":"Default Disbursement Fee Bps"},"max_float_days":{"type":"integer","title":"Max Float Days"},"legal_lending_entity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Legal Lending Entity"},"statement_branding":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Statement Branding"},"event_delivery_mode":{"$ref":"#/components/schemas/EventDeliveryMode"},"issuing_enabled":{"type":"boolean","title":"Issuing Enabled"},"issuing_provider":{"type":"string","title":"Issuing Provider"},"ramp_spend_program_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ramp Spend Program Id"},"allowed_mcc_codes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Allowed Mcc Codes"},"blocked_mcc_codes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Blocked Mcc Codes"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"policy":{"anyOf":[{"$ref":"#/components/schemas/PolicyDecisionStatus"},{"type":"null"}]}},"type":"object","required":["id","slug","display_name","status","limit_min_cents","limit_max_cents","default_rate_bps","default_disbursement_fee_bps","max_float_days","event_delivery_mode","issuing_enabled","issuing_provider"],"title":"CreditProgramResponse","description":"A partner lending program."},"EventDeliveryMode":{"type":"string","enum":["webhook","polling","both"],"title":"EventDeliveryMode","description":"How a partner learns that something happened.\n\nThe FRD lists this twice as an open joint decision (§13.3 items 2 and\n6). Making it per-program means the decision never blocks the build:\na partner that wants webhooks registers an endpoint, one that wants to\npoll simply does not."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"PolicyDecisionStatus":{"properties":{"statement_balance_mode":{"type":"string","title":"Statement Balance Mode"},"allocation_scope":{"type":"string","title":"Allocation Scope"},"cycle_boundary_basis":{"type":"string","title":"Cycle Boundary Basis"},"cycle_close_rule":{"type":"string","title":"Cycle Close Rule"},"excess_credit_disposition":{"type":"string","title":"Excess Credit Disposition"},"late_terms_decided":{"type":"boolean","title":"Late Terms Decided"},"early_payoff_decided":{"type":"boolean","title":"Early Payoff Decided"},"underwriting_criteria_decided":{"type":"boolean","title":"Underwriting Criteria Decided"},"undecided":{"items":{"type":"string"},"type":"array","title":"Undecided","description":"Rules with no answer yet. Paths needing them raise."}},"type":"object","required":["statement_balance_mode","allocation_scope","cycle_boundary_basis","cycle_close_rule","excess_credit_disposition","late_terms_decided","early_payoff_decided","underwriting_criteria_decided"],"title":"PolicyDecisionStatus","description":"Which rules this program is running on, and which are still open.\n\nSurfaced deliberately: a partner integrating against the API should be\nable to see that, say, the late-fee path will raise, rather than\ndiscovering it when a cycle first goes past due."},"ProgramStatusEnum":{"type":"string","enum":["draft","active","paused","retired"],"title":"ProgramStatusEnum","description":"Whether a program may open new lines."},"SuccessEnvelope_list_CreditProgramResponse__":{"properties":{"success":{"type":"boolean","title":"Success","default":true},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/CreditProgramResponse"},"type":"array"},{"type":"null"}],"title":"Data"}},"additionalProperties":true,"type":"object","title":"SuccessEnvelope[list[CreditProgramResponse]]"},"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"}},"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API Token","description":"API token authentication. Format: `Bearer dz_...`"}}},"security":[{"BearerAuth":[]}]}