{"openapi":"3.1.0","info":{"title":"POST /api/v1/ap-approval/batch-approve","version":"1.0.0","description":"Batch approve pending items"},"servers":[{"url":"https://api.ondayzero.com","description":"Production"}],"paths":{"/api/v1/ap-approval/batch-approve":{"post":{"tags":["ap-approval"],"summary":"Batch approve pending items","description":"Approve multiple suspended workflow executions in a single request.","operationId":"batch_approve_api_v1_ap_approval_batch_approve_post","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/BatchApproveRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchApproveResponse"}}}},"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":{"BatchApproveRequest":{"properties":{"execution_ids":{"items":{"type":"string"},"type":"array","maxItems":50,"minItems":1,"title":"Execution Ids","description":"List of workflow execution UUIDs to approve."},"comment":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Comment","description":"Optional comment applied to all approvals in the batch."}},"type":"object","required":["execution_ids"],"title":"BatchApproveRequest","description":"Body for ``POST /ap-approval/batch-approve``."},"BatchApproveResponse":{"properties":{"total":{"type":"integer","title":"Total","description":"Total executions submitted."},"succeeded":{"type":"integer","title":"Succeeded","description":"Number of successful approvals."},"failed":{"type":"integer","title":"Failed","description":"Number of failed approvals."},"results":{"items":{"$ref":"#/components/schemas/BatchApproveResultItem"},"type":"array","title":"Results","description":"Per-execution results."}},"type":"object","required":["total","succeeded","failed"],"title":"BatchApproveResponse","description":"Response for ``POST /ap-approval/batch-approve``."},"BatchApproveResultItem":{"properties":{"execution_id":{"type":"string","title":"Execution Id","description":"Execution UUID."},"success":{"type":"boolean","title":"Success","description":"Whether this approval succeeded."},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error","description":"Error message if the approval failed."}},"type":"object","required":["execution_id","success"],"title":"BatchApproveResultItem","description":"Result for a single execution in a batch-approve request."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"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":[]}]}