{"openapi":"3.1.0","info":{"title":"GET /api/v1/credit/lines/{credit_line_id}/payoff-quote","version":"1.0.0","description":"Quote the payoff amount"},"servers":[{"url":"https://api.ondayzero.com","description":"Production"}],"paths":{"/api/v1/credit/lines/{credit_line_id}/payoff-quote":{"get":{"tags":["credit"],"summary":"Quote the payoff amount","description":"Principal plus accrued interest as at a date. Request this rather than reusing the displayed balance: principal and accrued interest settle separately, so the balance alone is not the payoff amount.","operationId":"get_payoff_quote_api_v1_credit_lines__credit_line_id__payoff_quote_get","parameters":[{"name":"credit_line_id","in":"path","required":true,"schema":{"type":"string","title":"Credit Line Id"}},{"name":"as_of","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Quote date. Defaults to today.","title":"As Of"},"description":"Quote date. Defaults to today."},{"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_PayoffQuoteResponse_"}}}},"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":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"PayoffQuoteResponse":{"properties":{"credit_line_id":{"type":"string","title":"Credit Line Id"},"as_of":{"type":"string","format":"date","title":"As Of"},"principal_cents":{"type":"integer","title":"Principal Cents"},"fee_cents":{"type":"integer","title":"Fee Cents"},"interest_cents":{"type":"integer","title":"Interest Cents"},"interest_rebate_cents":{"type":"integer","title":"Interest Rebate Cents","default":0},"fee_rebate_cents":{"type":"integer","title":"Fee Rebate Cents","default":0},"prepayment_penalty_cents":{"type":"integer","title":"Prepayment Penalty Cents","default":0},"total_cents":{"type":"integer","title":"Total Cents"},"cycle_ids":{"items":{"type":"string"},"type":"array","title":"Cycle Ids"},"quote_expires_on":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Quote Expires On","description":"Last date this figure holds, from the program's `quote_valid_days`. Beyond it, re-quote."}},"type":"object","required":["credit_line_id","as_of","principal_cents","fee_cents","interest_cents","total_cents"],"title":"PayoffQuoteResponse","description":"Principal plus accrued interest as at a date (§14, call 7).\n\nThe partner must request this rather than using the displayed\nbalance: principal and accrued interest settle separately, so the\nbalance alone is not the payoff amount (§10.6)."},"SuccessEnvelope_PayoffQuoteResponse_":{"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/PayoffQuoteResponse"},{"type":"null"}]}},"additionalProperties":true,"type":"object","title":"SuccessEnvelope[PayoffQuoteResponse]"},"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":[]}]}