{"openapi":"3.1.0","info":{"title":"GET /api/v1/credit/lines/{credit_line_id}/cards/monitor","version":"1.0.0","description":"Monitor card spend and controls"},"servers":[{"url":"https://api.ondayzero.com","description":"Production"}],"paths":{"/api/v1/credit/lines/{credit_line_id}/cards/monitor":{"get":{"tags":["credit"],"summary":"Monitor card spend and controls","description":"Per-card cleared spend, remaining headroom, and any drift between our record and the issuer's.","operationId":"monitor_cards_api_v1_credit_lines__credit_line_id__cards_monitor_get","parameters":[{"name":"credit_line_id","in":"path","required":true,"schema":{"type":"string","title":"Credit Line 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_CardMonitorResponse_"}}}},"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":{"CardIssuanceStatusEnum":{"type":"string","enum":["requested","active","suspended","terminated","failed"],"title":"CardIssuanceStatusEnum","description":"Lifecycle of a card we issued on a merchant's behalf.\n\nMirrors the issuer's own fund/card states so a reconciliation sweep\ncan compare ours against theirs without a translation table."},"CardMonitorResponse":{"properties":{"credit_line_id":{"type":"string","title":"Credit Line Id"},"cards":{"items":{"$ref":"#/components/schemas/CardSpendSummary"},"type":"array","title":"Cards"},"total_cleared_cents":{"type":"integer","title":"Total Cleared Cents","default":0},"total_pending_cents":{"type":"integer","title":"Total Pending Cents","default":0},"drift":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Drift"},"as_of":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"As Of"}},"type":"object","required":["credit_line_id"],"title":"CardMonitorResponse","description":"Card monitoring for a line: controls, spend, and drift.\n\n``drift`` names cards whose issuer-side state disagrees with ours at\nthe last sync — a suspended card we still think is active is exactly\nthe condition worth surfacing rather than logging."},"CardSpendSummary":{"properties":{"card_id":{"type":"string","title":"Card Id"},"provider_card_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider Card Id"},"last_four":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Four"},"status":{"$ref":"#/components/schemas/CardIssuanceStatusEnum"},"spend_limit_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Spend Limit Cents"},"spend_interval":{"type":"string","title":"Spend Interval"},"cleared_cents":{"type":"integer","title":"Cleared Cents","default":0},"pending_cents":{"type":"integer","title":"Pending Cents","default":0},"available_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Available Cents"},"settlement_count":{"type":"integer","title":"Settlement Count","default":0},"last_settled_on":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Last Settled On"}},"type":"object","required":["card_id","status","spend_interval"],"title":"CardSpendSummary","description":"Live spend against one card's controls."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"SuccessEnvelope_CardMonitorResponse_":{"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/CardMonitorResponse"},{"type":"null"}]}},"additionalProperties":true,"type":"object","title":"SuccessEnvelope[CardMonitorResponse]"},"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":[]}]}