mirror of
https://github.com/Sea-Haven-Industries/seahaven-ap.git
synced 2026-10-01 23:13:21 +00:00
82 lines
2.1 KiB
YAML
82 lines
2.1 KiB
YAML
parameters:
|
|
- name: id
|
|
in: path
|
|
required: true
|
|
description: GL account primary key.
|
|
schema:
|
|
type: string
|
|
format: uuid
|
|
example: 66666666-6666-4666-8666-666666666666
|
|
get:
|
|
tags: [Master data]
|
|
summary: Get a GL account
|
|
description: Returns one GL account by id.
|
|
operationId: get-api-gl-accounts-id
|
|
responses:
|
|
"200":
|
|
description: GL account.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: ../components/schemas.yaml#/GlAccount
|
|
"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: GL account not found.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: ../components/schemas.yaml#/Error
|
|
patch:
|
|
tags: [Master data]
|
|
summary: Update a GL account
|
|
description: Admin-only patch. Requires admin:settings.
|
|
operationId: patch-api-gl-accounts-id
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
code:
|
|
type: string
|
|
example: "6100"
|
|
name:
|
|
type: string
|
|
example: Facilities Expense
|
|
responses:
|
|
"200":
|
|
description: Updated GL account.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: ../components/schemas.yaml#/GlAccount
|
|
"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
|
|
"404":
|
|
description: GL account not found.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: ../components/schemas.yaml#/Error
|