mirror of
https://github.com/Sea-Haven-Industries/seahaven-ap.git
synced 2026-10-01 16:43:20 +00:00
72 lines
1.8 KiB
YAML
72 lines
1.8 KiB
YAML
get:
|
|
tags: [Master data]
|
|
summary: List vendors
|
|
description: Returns every vendor row.
|
|
operationId: get-api-vendors
|
|
responses:
|
|
"200":
|
|
description: Vendor list.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
required: [items]
|
|
properties:
|
|
items:
|
|
type: array
|
|
items:
|
|
$ref: ../components/schemas.yaml#/Vendor
|
|
"401":
|
|
description: Missing session.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: ../components/schemas.yaml#/Error
|
|
post:
|
|
tags: [Master data]
|
|
summary: Create a vendor
|
|
description: Admin-only insert. Requires admin:settings.
|
|
operationId: post-api-vendors
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
required: [name]
|
|
properties:
|
|
name:
|
|
type: string
|
|
example: Harbor Maintenance
|
|
email:
|
|
type: string
|
|
example: billing@harbor.example
|
|
defaultPaymentMethod:
|
|
type: string
|
|
enum: [check, ach]
|
|
example: ach
|
|
responses:
|
|
"201":
|
|
description: Created vendor.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: ../components/schemas.yaml#/Vendor
|
|
"400":
|
|
description: Validation failed.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: ../components/schemas.yaml#/Error
|
|
"403":
|
|
description: Caller lacks admin:settings.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: ../components/schemas.yaml#/Error
|
|
"401":
|
|
description: Missing session.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: ../components/schemas.yaml#/Error
|