{"openapi":"3.1.0","info":{"title":"PATCH /api/v1/ap-approval/thresholds","version":"1.0.0","description":"Update approval thresholds"},"servers":[{"url":"https://api.ondayzero.com","description":"Production"}],"paths":{"/api/v1/ap-approval/thresholds":{"patch":{"tags":["ap-approval"],"summary":"Update approval thresholds","description":"Update amount thresholds and/or escalation timeout without re-provisioning. Only provided fields are changed; the rest retain their current values.","operationId":"update_thresholds_api_v1_ap_approval_thresholds_patch","parameters":[{"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/UpdateThresholdsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateThresholdsResponse"}}}},"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"},"UpdateThresholdsRequest":{"properties":{"auto_approve_max_cents":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Auto Approve Max Cents","description":"Max bill amount (cents) for auto-approval. Must be less than ops threshold."},"ops_approve_max_cents":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Ops Approve Max Cents","description":"Max bill amount (cents) for ops-tier approval. Must be greater than auto threshold."},"escalation_hours":{"anyOf":[{"type":"integer","maximum":720.0,"minimum":1.0},{"type":"null"}],"title":"Escalation Hours","description":"Hours before a pending approval automatically escalates to the next tier. Applies to ops and advisor gates. Set to null to use per-gate defaults."}},"type":"object","title":"UpdateThresholdsRequest","description":"Body for ``PATCH /ap-approval/thresholds``.\n\nAll fields are optional — only provided fields are updated."},"UpdateThresholdsResponse":{"properties":{"workflow_id":{"type":"string","title":"Workflow Id","description":"Workflow UUID."},"auto_approve_max_cents":{"type":"integer","title":"Auto Approve Max Cents","description":"Auto-approve threshold in cents."},"ops_approve_max_cents":{"type":"integer","title":"Ops Approve Max Cents","description":"Ops approval threshold in cents."},"escalation_hours":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Escalation Hours","description":"Escalation timeout in hours (null = per-gate default)."}},"type":"object","required":["workflow_id","auto_approve_max_cents","ops_approve_max_cents"],"title":"UpdateThresholdsResponse","description":"Response for ``PATCH /ap-approval/thresholds``."},"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":[]}]}