mirror of
https://github.com/Sea-Haven-Industries/seahaven-ap.git
synced 2026-10-01 19:03:22 +00:00
68 lines
1.7 KiB
YAML
68 lines
1.7 KiB
YAML
get:
|
|
tags: [Master data]
|
|
summary: List GL accounts
|
|
description: Returns every GL account row.
|
|
operationId: get-api-gl-accounts
|
|
responses:
|
|
"200":
|
|
description: GL account list.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
required: [items]
|
|
properties:
|
|
items:
|
|
type: array
|
|
items:
|
|
$ref: ../components/schemas.yaml#/GlAccount
|
|
"401":
|
|
description: Missing session.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: ../components/schemas.yaml#/Error
|
|
post:
|
|
tags: [Master data]
|
|
summary: Create a GL account
|
|
description: Admin-only insert. Requires admin:settings.
|
|
operationId: post-api-gl-accounts
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
required: [code, name]
|
|
properties:
|
|
code:
|
|
type: string
|
|
example: "6200"
|
|
name:
|
|
type: string
|
|
example: Utilities
|
|
responses:
|
|
"201":
|
|
description: Created GL account.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: ../components/schemas.yaml#/GlAccount
|
|
"400":
|
|
description: Validation failed.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: ../components/schemas.yaml#/Error
|
|
"401":
|
|
description: Missing session.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: ../components/schemas.yaml#/Error
|
|
"403":
|
|
description: Caller lacks admin:settings.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: ../components/schemas.yaml#/Error
|