1
0
Michael Hoennig eb9edf1cb1 remove current-subject from OpenAPI header specs, use Authorization instead (#164)
Co-authored-by: Michael Hoennig <michael@hoennig.de>
Reviewed-on: https://dev.hostsharing.net/hostsharing/hs.hsadmin.ng/pulls/164
Reviewed-by: Timotheus Pokorra <timotheus.pokorra@hostsharing.net>
2025-03-18 11:52:29 +01:00

69 lines
2.4 KiB
YAML

get:
summary: Returns a list of (optionally filtered) debitors.
description: Returns the list of (optionally filtered) debitors which are visible to the current subject or any of it's assumed roles.
tags:
- hs-office-debitors
operationId: getListOfDebitors
parameters:
- $ref: 'auth.yaml#/components/parameters/assumedRoles'
- name: name
in: query
required: false
schema:
type: string
description: Prefix of name properties from person or contact to filter the results.
- name: partnerUuid
in: query
required: false
schema:
type: string
format: uuid
description: UUID of the business partner, exclusive to `memberNumber`.
- name: partnerNumber
in: query
required: false
schema:
type: string
pattern: 'P-[0-9]{5}'
description: Partner number of the requested debitor.
responses:
"200":
description: OK
content:
'application/json':
schema:
type: array
items:
$ref: 'hs-office-debitor-schemas.yaml#/components/schemas/HsOfficeDebitor'
"401":
$ref: 'error-responses.yaml#/components/responses/Unauthorized'
"403":
$ref: 'error-responses.yaml#/components/responses/Forbidden'
post:
summary: Adds a new debitor.
tags:
- hs-office-debitors
operationId: postNewDebitor
parameters:
- $ref: 'auth.yaml#/components/parameters/assumedRoles'
requestBody:
content:
'application/json':
schema:
$ref: 'hs-office-debitor-schemas.yaml#/components/schemas/HsOfficeDebitorInsert'
required: true
responses:
"201":
description: Created
content:
'application/json':
schema:
$ref: 'hs-office-debitor-schemas.yaml#/components/schemas/HsOfficeDebitor'
"401":
$ref: 'error-responses.yaml#/components/responses/Unauthorized'
"403":
$ref: 'error-responses.yaml#/components/responses/Forbidden'
"409":
$ref: 'error-responses.yaml#/components/responses/Conflict'