{"openapi":"3.1.0","info":{"title":"GET /api/v1/credit/lines/{credit_line_id}/statements/{cycle_id}","version":"1.0.0","description":"Get a rendered statement"},"servers":[{"url":"https://api.ondayzero.com","description":"Production"}],"paths":{"/api/v1/credit/lines/{credit_line_id}/statements/{cycle_id}":{"get":{"tags":["credit"],"summary":"Get a rendered statement","description":"The statement document for one cycle: roll-forward, the settlements behind it, and the amount due. The partner provides the download affordance and nothing else.","operationId":"get_statement_api_v1_credit_lines__credit_line_id__statements__cycle_id__get","parameters":[{"name":"credit_line_id","in":"path","required":true,"schema":{"type":"string","title":"Credit Line Id"}},{"name":"cycle_id","in":"path","required":true,"schema":{"type":"string","title":"Cycle Id"}},{"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_StatementDocumentResponse_"}}}},"400":{"description":"Bad Request - Invalid input","content":{"application/json":{"example":{"detail":"Invalid request parameters"}}}},"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"}}}},"404":{"description":"Not Found - Resource does not exist","content":{"application/json":{"example":{"detail":"Resource not found"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"CardSettlementResponse":{"properties":{"id":{"type":"string","title":"Id"},"external_settlement_id":{"type":"string","title":"External Settlement Id"},"cycle_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cycle Id"},"settled_on":{"type":"string","format":"date","title":"Settled On"},"amount_cents":{"type":"integer","title":"Amount Cents"},"merchant_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Merchant Name"},"card_last_four":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Card Last Four"},"merchant_category_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Merchant Category Code"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"source":{"type":"string","title":"Source"}},"type":"object","required":["id","external_settlement_id","settled_on","amount_cents","source"],"title":"CardSettlementResponse","description":"A settlement line item in the activity list (§7.2)."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"RollForwardResponse":{"properties":{"previous_balance_cents":{"type":"integer","title":"Previous Balance Cents"},"new_purchases_cents":{"type":"integer","title":"New Purchases Cents"},"fees_cents":{"type":"integer","title":"Fees Cents"},"interest_cents":{"type":"integer","title":"Interest Cents"},"payments_cents":{"type":"integer","title":"Payments Cents"},"statement_balance_cents":{"type":"integer","title":"Statement Balance Cents"}},"type":"object","required":["previous_balance_cents","new_purchases_cents","fees_cents","interest_cents","payments_cents","statement_balance_cents"],"title":"RollForwardResponse","description":"The statement summary band as one equation (§7.1)."},"StatementDocumentResponse":{"properties":{"cycle_id":{"type":"string","title":"Cycle Id"},"period_start":{"type":"string","format":"date","title":"Period Start"},"period_end":{"type":"string","format":"date","title":"Period End"},"issued_on":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Issued On"},"due_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Due Date"},"amount_due_cents":{"type":"integer","title":"Amount Due Cents"},"roll_forward":{"$ref":"#/components/schemas/RollForwardResponse"},"settlements":{"items":{"$ref":"#/components/schemas/CardSettlementResponse"},"type":"array","title":"Settlements"},"legal_lending_entity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Legal Lending Entity"},"branding":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Branding"},"format":{"type":"string","enum":["json","html"],"title":"Format","default":"json"},"html":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Html"}},"type":"object","required":["cycle_id","period_start","period_end","amount_due_cents","roll_forward"],"title":"StatementDocumentResponse","description":"A rendered statement.\n\nThe partner provides the download affordance and nothing else: no\npagination, no layout, no statement arithmetic (§8)."},"SuccessEnvelope_StatementDocumentResponse_":{"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":[{"$ref":"#/components/schemas/StatementDocumentResponse"},{"type":"null"}]}},"additionalProperties":true,"type":"object","title":"SuccessEnvelope[StatementDocumentResponse]"},"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":[]}]}