65 lines
2.3 KiB
YAML
65 lines
2.3 KiB
YAML
|
get:
|
||
|
summary: Returns a list of (optionally filtered) memberships.
|
||
|
description: Returns the list of (optionally filtered) memberships which are visible to the current user or any of it's assumed roles.
|
||
|
tags:
|
||
|
- hs-office-memberships
|
||
|
operationId: listMemberships
|
||
|
parameters:
|
||
|
- $ref: './auth.yaml#/components/parameters/currentUser'
|
||
|
- $ref: './auth.yaml#/components/parameters/assumedRoles'
|
||
|
- name: partnerUuid
|
||
|
in: query
|
||
|
required: false
|
||
|
schema:
|
||
|
type: string
|
||
|
format: uuid
|
||
|
description: UUID of the business partner.
|
||
|
- name: memberNumber
|
||
|
in: query
|
||
|
required: false
|
||
|
schema:
|
||
|
type: integer
|
||
|
description: Member number.
|
||
|
responses:
|
||
|
"200":
|
||
|
description: OK
|
||
|
content:
|
||
|
'application/json':
|
||
|
schema:
|
||
|
type: array
|
||
|
items:
|
||
|
$ref: './hs-office-membership-schemas.yaml#/components/schemas/HsOfficeMembership'
|
||
|
"401":
|
||
|
$ref: './error-responses.yaml#/components/responses/Unauthorized'
|
||
|
"403":
|
||
|
$ref: './error-responses.yaml#/components/responses/Forbidden'
|
||
|
|
||
|
post:
|
||
|
summary: Adds a new membership.
|
||
|
tags:
|
||
|
- hs-office-memberships
|
||
|
operationId: addMembership
|
||
|
parameters:
|
||
|
- $ref: './auth.yaml#/components/parameters/currentUser'
|
||
|
- $ref: './auth.yaml#/components/parameters/assumedRoles'
|
||
|
requestBody:
|
||
|
description: A JSON object describing the new membership.
|
||
|
required: true
|
||
|
content:
|
||
|
application/json:
|
||
|
schema:
|
||
|
$ref: '/hs-office-membership-schemas.yaml#/components/schemas/HsOfficeMembershipInsert'
|
||
|
responses:
|
||
|
"201":
|
||
|
description: Created
|
||
|
content:
|
||
|
'application/json':
|
||
|
schema:
|
||
|
$ref: './hs-office-membership-schemas.yaml#/components/schemas/HsOfficeMembership'
|
||
|
"401":
|
||
|
$ref: './error-responses.yaml#/components/responses/Unauthorized'
|
||
|
"403":
|
||
|
$ref: './error-responses.yaml#/components/responses/Forbidden'
|
||
|
"409":
|
||
|
$ref: './error-responses.yaml#/components/responses/Conflict'
|