seahaven-ap/packages/api/openapi/paths/invoices-id-comments.yaml

81 lines
2 KiB
YAML
Raw Normal View History

parameters:
- name: id
in: path
required: true
description: Invoice primary key.
schema:
type: string
format: uuid
example: 88888888-8888-4888-8888-888888888888
get:
tags: [Approvals]
summary: List invoice comments
description: Returns comments on one invoice.
operationId: get-api-invoices-id-comments
responses:
"200":
description: Comment list.
content:
application/json:
schema:
type: object
required: [items]
properties:
items:
type: array
items:
$ref: ../components/schemas.yaml#/InvoiceComment
"400":
description: Invalid id.
content:
application/json:
schema:
$ref: ../components/schemas.yaml#/Error
"401":
description: Missing session.
content:
application/json:
schema:
$ref: ../components/schemas.yaml#/Error
"404":
description: Invoice not found.
content:
application/json:
schema:
$ref: ../components/schemas.yaml#/Error
post:
tags: [Approvals]
summary: Add an invoice comment
description: Appends a comment and an activity row.
operationId: post-api-invoices-id-comments
requestBody:
required: true
content:
application/json:
schema:
type: object
required: [body]
properties:
body:
type: string
example: Looks good.
responses:
"201":
description: Created comment.
content:
application/json:
schema:
$ref: ../components/schemas.yaml#/InvoiceComment
"400":
description: Validation failed.
content:
application/json:
schema:
$ref: ../components/schemas.yaml#/Error
"404":
description: Invoice not found.
content:
application/json:
schema:
$ref: ../components/schemas.yaml#/Error