2022-10-18 13:57:35 +02:00
|
|
|
get:
|
|
|
|
summary: Returns a list of (optionally filtered) memberships.
|
2024-01-24 15:57:16 +01:00
|
|
|
description: Returns the list of memberships which are visible to the current user or any of it's assumed roles.
|
|
|
|
The list can optionally be filtered by either the `partnerUuid` or the `memberNumber` - not both at the same time.
|
2022-10-18 13:57:35 +02:00
|
|
|
tags:
|
|
|
|
- hs-office-memberships
|
|
|
|
operationId: listMemberships
|
|
|
|
parameters:
|
2024-04-16 10:08:00 +02:00
|
|
|
- $ref: 'auth.yaml#/components/parameters/currentUser'
|
|
|
|
- $ref: 'auth.yaml#/components/parameters/assumedRoles'
|
2022-10-18 13:57:35 +02:00
|
|
|
- name: partnerUuid
|
|
|
|
in: query
|
|
|
|
required: false
|
|
|
|
schema:
|
|
|
|
type: string
|
|
|
|
format: uuid
|
2024-01-24 15:57:16 +01:00
|
|
|
description: UUID of the business partner, exclusive to `memberNumber`.
|
2022-10-18 13:57:35 +02:00
|
|
|
- name: memberNumber
|
|
|
|
in: query
|
|
|
|
required: false
|
|
|
|
schema:
|
|
|
|
type: integer
|
2024-01-24 15:57:16 +01:00
|
|
|
description: Member number, exclusive to `partnerUuid`.
|
2022-10-18 13:57:35 +02:00
|
|
|
responses:
|
|
|
|
"200":
|
|
|
|
description: OK
|
|
|
|
content:
|
|
|
|
'application/json':
|
|
|
|
schema:
|
|
|
|
type: array
|
|
|
|
items:
|
2024-04-16 10:08:00 +02:00
|
|
|
$ref: 'hs-office-membership-schemas.yaml#/components/schemas/HsOfficeMembership'
|
2022-10-18 13:57:35 +02:00
|
|
|
"401":
|
2024-04-16 10:08:00 +02:00
|
|
|
$ref: 'error-responses.yaml#/components/responses/Unauthorized'
|
2022-10-18 13:57:35 +02:00
|
|
|
"403":
|
2024-04-16 10:08:00 +02:00
|
|
|
$ref: 'error-responses.yaml#/components/responses/Forbidden'
|
2022-10-18 13:57:35 +02:00
|
|
|
|
|
|
|
post:
|
|
|
|
summary: Adds a new membership.
|
|
|
|
tags:
|
|
|
|
- hs-office-memberships
|
|
|
|
operationId: addMembership
|
|
|
|
parameters:
|
2024-04-16 10:08:00 +02:00
|
|
|
- $ref: 'auth.yaml#/components/parameters/currentUser'
|
|
|
|
- $ref: 'auth.yaml#/components/parameters/assumedRoles'
|
2022-10-18 13:57:35 +02:00
|
|
|
requestBody:
|
|
|
|
description: A JSON object describing the new membership.
|
|
|
|
required: true
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
2024-04-16 10:08:00 +02:00
|
|
|
$ref: 'hs-office-membership-schemas.yaml#/components/schemas/HsOfficeMembershipInsert'
|
2022-10-18 13:57:35 +02:00
|
|
|
responses:
|
|
|
|
"201":
|
|
|
|
description: Created
|
|
|
|
content:
|
|
|
|
'application/json':
|
|
|
|
schema:
|
2024-04-16 10:08:00 +02:00
|
|
|
$ref: 'hs-office-membership-schemas.yaml#/components/schemas/HsOfficeMembership'
|
2022-10-18 13:57:35 +02:00
|
|
|
"401":
|
2024-04-16 10:08:00 +02:00
|
|
|
$ref: 'error-responses.yaml#/components/responses/Unauthorized'
|
2022-10-18 13:57:35 +02:00
|
|
|
"403":
|
2024-04-16 10:08:00 +02:00
|
|
|
$ref: 'error-responses.yaml#/components/responses/Forbidden'
|
2022-10-18 13:57:35 +02:00
|
|
|
"409":
|
2024-04-16 10:08:00 +02:00
|
|
|
$ref: 'error-responses.yaml#/components/responses/Conflict'
|