{"openapi":"3.1.0","info":{"title":"POST /api/v1/credit/adverse-actions/{adverse_action_id}/waive","version":"1.0.0","description":"Waive an adverse-action notice"},"servers":[{"url":"https://api.ondayzero.com","description":"Production"}],"paths":{"/api/v1/credit/adverse-actions/{adverse_action_id}/waive":{"post":{"tags":["credit"],"summary":"Waive an adverse-action notice","description":"Closes a pending notice without sending it: `outcome` `waived` (the default) or `not_required` (counsel found none owed). `reason` is required. Operator action.","operationId":"credit_waive_adverse_action","parameters":[{"name":"adverse_action_id","in":"path","required":true,"schema":{"type":"string","title":"Adverse Action 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"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdverseActionWaiveRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope_CreditAdverseActionResponse_"}}}},"400":{"description":"Bad Request - Invalid input","content":{"application/json":{"example":{"error":"validation_error","message":"Validation failed: due_date: Input should be a valid date","errors":{"due_date":"Input should be a valid date"},"code":"GEN_002","request_id":"3f0e7c2a-9b4d-4e1a-8c6f-2d5b7a1e9c30"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized - Missing or expired token, an MCP OAuth token used against the REST API, or no access to this business","content":{"application/json":{"example":{"error":"unauthorized","message":"Authentication required","code":"AUTH_001","request_id":"3f0e7c2a-9b4d-4e1a-8c6f-2d5b7a1e9c30"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"error":"forbidden","message":"You don't have permission to access this resource","code":"AUTH_002","request_id":"3f0e7c2a-9b4d-4e1a-8c6f-2d5b7a1e9c30"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found - Resource does not exist","content":{"application/json":{"example":{"error":"not_found","message":"Resource not found","code":"NOT_FOUND_001","request_id":"3f0e7c2a-9b4d-4e1a-8c6f-2d5b7a1e9c30"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":"validation_error","message":"Validation failed: amount: Input should be a valid integer","errors":{"amount":"Input should be a valid integer"},"code":"GEN_002","request_id":"3f0e7c2a-9b4d-4e1a-8c6f-2d5b7a1e9c30"}}}}},"x-fastapi-operation-id":"credit_waive_adverse_action_api_v1_credit_adverse_actions__adverse_action_id__waive_post"}}},"components":{"schemas":{"AdverseActionWaiveRequest":{"properties":{"reason":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Reason","description":"Why (required)."},"outcome":{"type":"string","enum":["waived","not_required"],"title":"Outcome","description":"`waived`: it will not be sent. `not_required`: counsel found no notice is owed.","default":"waived"}},"additionalProperties":false,"type":"object","title":"AdverseActionWaiveRequest","description":"Close a pending notice without sending it."},"CreditAdverseActionResponse":{"properties":{"id":{"type":"string","title":"Id","description":"The record."},"credit_line_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Credit Line Id","description":"The line; null for a declined application."},"program_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Program Id","description":"Its program."},"subject_type":{"type":"string","title":"Subject Type","description":"`assessment`, `limit_review`, `limit_change_request` or `line_status`."},"subject_id":{"type":"string","title":"Subject Id","description":"What it was about."},"action":{"type":"string","title":"Action","description":"`declined`, `limit_decreased`, `line_suspended` or `line_closed`."},"action_on":{"type":"string","format":"date","title":"Action On","description":"The date of the action (UTC)."},"due_on":{"type":"string","format":"date","title":"Due On","description":"When the notice is due."},"reason_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason Code","description":"The status change's reason code, when one."},"reasons":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Reasons","description":"The principal reasons, each with a `sentence`."},"detail":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Detail","description":"Limits before and after, the status, and so on."},"status":{"type":"string","title":"Status","description":"`pending`, `sent`, `waived` or `not_required`."},"resolution_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resolution Reason","description":"Why it was waived or found not required."},"resolved_by_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resolved By User Id","description":"Who decided."},"resolved_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Resolved At","description":"When."},"template_jurisdiction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Template Jurisdiction","description":"The template used to send it."},"template_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Template Version","description":"Its version."},"pdf_sha256":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pdf Sha256","description":"SHA-256 of the notice as sent."},"sent_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Sent At","description":"When it was sent."},"channel":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Channel","description":"`email`."},"recipient":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recipient","description":"Where it went."},"notice_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notice Id","description":"The borrower notice that carried it."},"days_until_due":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Days Until Due","description":"Days from today (UTC) to `due_on`; negative overdue."},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At","description":"When recorded."},"send_blocked_reason":{"anyOf":[{"type":"string","enum":["no_credit_line","no_merchant_email"]},{"type":"null"}],"title":"Send Blocked Reason","description":"On a pending notice in the list: why `send` would be refused (`CREDIT_614`). `no_credit_line`: a declined application has no line, so no merchant email; deliver it yourself and waive it. `no_merchant_email`: set the line's `merchant_email` first. Null when it can be sent, and on any other response."}},"type":"object","required":["id","subject_type","subject_id","action","action_on","due_on","status"],"title":"CreditAdverseActionResponse","description":"One adverse action and its notice."},"SuccessEnvelope_CreditAdverseActionResponse_":{"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/CreditAdverseActionResponse"},{"type":"null"}]}},"additionalProperties":true,"type":"object","title":"SuccessEnvelope[CreditAdverseActionResponse]"},"ErrorResponse":{"title":"ErrorResponse","type":"object","description":"Envelope returned by every non-2xx response. Branch on `code` (stable) rather than `message` (human-readable, may change).","required":["error","message","code"],"properties":{"error":{"type":"string","description":"Error category: `validation_error`, `unauthorized`, `forbidden`, `not_found`, `conflict`, `rate_limited`, `server_error`, or `service_unavailable`."},"message":{"type":"string","description":"Human-readable explanation, safe to show to end users."},"code":{"type":"string","description":"Stable machine-readable code in `CATEGORY_NNN` form (e.g. `NOT_FOUND_006`, `AUTH_010`, `GEN_002`)."},"request_id":{"type":"string","description":"Correlation id for support requests. Echoes the `x-request-id` request header when one was supplied."},"errors":{"type":"object","additionalProperties":{"type":"string"},"description":"Field-level validation messages keyed by field name. Present on 400/422 validation failures only."}}}},"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API Token","description":"API token authentication. Format: `Bearer dz_...`"}}},"security":[{"BearerAuth":[]}]}