seahaven-ap/packages/api/openapi/paths/approval-steps-id-decisions.yaml

57 lines
1.5 KiB
YAML

parameters:
- name: id
in: path
required: true
description: Approval step primary key.
schema:
type: string
format: uuid
example: eeeeeeee-eeee-4eee-8eee-eeeeeeeeeeee
post:
tags: [Approvals]
summary: Record an approval decision
description: Approves, rejects, or skips a pending step. Requires approve:invoices.
operationId: post-api-approval-steps-id-decisions
requestBody:
required: true
content:
application/json:
schema:
type: object
required: [action]
properties:
action:
type: string
enum: [approve, reject, skip]
example: approve
responses:
"200":
description: Updated step.
content:
application/json:
schema:
$ref: ../components/schemas.yaml#/ApprovalStep
"400":
description: Validation failed.
content:
application/json:
schema:
$ref: ../components/schemas.yaml#/Error
"403":
description: Caller lacks approve:invoices.
content:
application/json:
schema:
$ref: ../components/schemas.yaml#/Error
"404":
description: Step not found.
content:
application/json:
schema:
$ref: ../components/schemas.yaml#/Error
"409":
description: Step is not pending.
content:
application/json:
schema:
$ref: ../components/schemas.yaml#/Error