openapi: 3.1.0
info:
  title: AbaNinja Members API
  version: 3.0.0
  x-domain-id: members
servers:
  - url: https://api.abaninja.ch
    description: The AbaNinja API server
tags:
  - name: members
    description: Manage members
    x-displayName: Members
  - name: member-groups
    description: Manage member groups
    x-displayName: Member Groups
  - name: memberships
    description: Manage memberships
    x-displayName: Memberships
security:
  - ApiToken: []
paths:
  /accounts/{accountUuid}/members/v2/member-groups:
    get:
      tags:
        - member-groups
      summary: Get member groups
      description: Get the member groups
      operationId: members_list_member_groups_2
      parameters:
        - name: accountUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: page
          in: query
          schema:
            type:
              - integer
              - 'null'
            default: 1
            minimum: 1
        - name: perPage
          in: query
          schema:
            type:
              - integer
              - 'null'
            minimum: 1
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                allOf:
                  - description: The response format of most endpoints for successful requests
                    required:
                      - data
                      - message
                      - status
                    properties:
                      data:
                        title: data
                      message:
                        title: message
                        type: string
                      status:
                        title: status
                        description: HTTP status code
                        type: integer
                      meta:
                        title: meta
                        type:
                          - object
                          - 'null'
                    type: object
                  - properties:
                      data:
                        type: array
                        items:
                          title: Member Group Resource
                          properties:
                            uuid:
                              type: string
                              format: uuid
                            name:
                              type: string
                            color:
                              description: Hexadecimal color
                              type: string
                          type: object
                      status:
                        example: 200
                      meta:
                        properties:
                          pagination:
                            properties:
                              currentPage:
                                type: integer
                                minimum: 1
                              firstPageUrl:
                                type:
                                  - string
                                  - 'null'
                                format: uri
                              from:
                                type:
                                  - integer
                                  - 'null'
                                example: 1
                              lastPage:
                                type: integer
                              lastPageUrl:
                                type: string
                                format: uri
                              nextPageUrl:
                                type:
                                  - string
                                  - 'null'
                                format: uri
                              perPage:
                                type: integer
                                example: 50
                              previousPageUrl:
                                type:
                                  - string
                                  - 'null'
                                format: uri
                              to:
                                type:
                                  - integer
                                  - 'null'
                                example: 50
                              totalItems:
                                type: integer
                            type: object
                        type: object
                    type: object
        '400':
          description: Bad request or validation error
          content:
            application/json:
              schema:
                allOf:
                  - description: The response format of most endpoints for erronous requests
                    required:
                      - detail
                      - type
                      - message
                      - status
                    properties:
                      detail:
                        title: details
                      type:
                        title: type
                        type: string
                      requestUuid:
                        title: requestUuid
                        type: string
                        format: uuid
                      path:
                        title: path
                        type: string
                      message:
                        title: message
                        type:
                          - string
                          - 'null'
                      status:
                        title: status
                        description: HTTP status code
                        type: integer
                    type: object
                  - properties: {}
      security:
        - ApiToken:
            - https://api.abaninja.ch/auth/members
      x-legacy-operation-id: fe2192b12051a15a90cbc50aca18b65c
      x-required-scopes:
        - members
    post:
      tags:
        - member-groups
      summary: Create member group
      description: Create a new member group
      operationId: members_create_member_groups
      parameters:
        - name: accountUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        description: Create member group
        required: true
        content:
          application/json:
            schema:
              $schema: https://json-schema.org/draft/2020-12/schema
              $id: https://api.abaninja.ch/schemas/2.0.0/member-group.create.schema.json
              description: A schema for creating a member group
              type: object
              additionalProperties: false
              properties:
                name:
                  type:
                    - string
                  minLength: 1
                  maxLength: 255
                color:
                  type:
                    - string
                  pattern: ^#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$
              required:
                - name
                - color
      responses:
        '201':
          description: Successful response
          content:
            application/json:
              schema:
                allOf:
                  - description: The response format of most endpoints for successful requests
                    required:
                      - data
                      - message
                      - status
                    properties:
                      data:
                        title: data
                      message:
                        title: message
                        type: string
                      status:
                        title: status
                        description: HTTP status code
                        type: integer
                      meta:
                        title: meta
                        type:
                          - object
                          - 'null'
                    type: object
                  - properties:
                      data:
                        title: Member Group Resource
                        properties:
                          uuid:
                            type: string
                            format: uuid
                          name:
                            type: string
                          color:
                            description: Hexadecimal color
                            type: string
                        type: object
                      status:
                        example: 201
                    type: object
        '400':
          description: Bad request or validation error
          content:
            application/json:
              schema:
                allOf:
                  - description: The response format of most endpoints for erronous requests
                    required:
                      - detail
                      - type
                      - message
                      - status
                    properties:
                      detail:
                        title: details
                      type:
                        title: type
                        type: string
                      requestUuid:
                        title: requestUuid
                        type: string
                        format: uuid
                      path:
                        title: path
                        type: string
                      message:
                        title: message
                        type:
                          - string
                          - 'null'
                      status:
                        title: status
                        description: HTTP status code
                        type: integer
                    type: object
                  - properties: {}
      security:
        - ApiToken:
            - https://api.abaninja.ch/auth/members
      x-legacy-operation-id: 99b267372c8dc0c54f1d935c67ce72cb
      x-required-scopes:
        - members
  /accounts/{accountUuid}/members/v2/members:
    get:
      tags:
        - members
      summary: Get members
      description: Get the members
      operationId: members_list_members
      parameters:
        - name: accountUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: page
          in: query
          schema:
            type:
              - integer
              - 'null'
            default: 1
            minimum: 1
        - name: perPage
          in: query
          schema:
            type:
              - integer
              - 'null'
            minimum: 1
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                allOf:
                  - description: The response format of most endpoints for successful requests
                    required:
                      - data
                      - message
                      - status
                    properties:
                      data:
                        title: data
                      message:
                        title: message
                        type: string
                      status:
                        title: status
                        description: HTTP status code
                        type: integer
                      meta:
                        title: meta
                        type:
                          - object
                          - 'null'
                    type: object
                  - properties:
                      data:
                        type: array
                        items:
                          title: Member Resource
                          properties:
                            uuid:
                              type: string
                              format: uuid
                            firstName:
                              type: string
                            lastName:
                              type: string
                            user:
                              properties:
                                uuid:
                                  type: string
                                  format: uuid
                                email:
                                  type:
                                    - string
                                    - 'null'
                                  format: email
                              type:
                                - object
                                - 'null'
                            address:
                              properties:
                                uuid:
                                  type: string
                                  format: uuid
                                customerNumber:
                                  type:
                                    - string
                                    - 'null'
                              type:
                                - object
                                - 'null'
                            memberGroups:
                              type: array
                              items:
                                properties:
                                  uuid:
                                    type: string
                                    format: uuid
                                  name:
                                    type: string
                                  color:
                                    description: Hexadecimal color
                                    type: string
                                type: object
                            memberships:
                              type: array
                              items:
                                properties:
                                  uuid:
                                    type: string
                                    format: uuid
                                  name:
                                    type: string
                                  color:
                                    description: Hexadecimal color
                                    type: string
                                type: object
                          type: object
                      status:
                        example: 200
                      meta:
                        properties:
                          pagination:
                            properties:
                              currentPage:
                                type: integer
                                minimum: 1
                              firstPageUrl:
                                type:
                                  - string
                                  - 'null'
                                format: uri
                              from:
                                type:
                                  - integer
                                  - 'null'
                                example: 1
                              lastPage:
                                type: integer
                              lastPageUrl:
                                type: string
                                format: uri
                              nextPageUrl:
                                type:
                                  - string
                                  - 'null'
                                format: uri
                              perPage:
                                type: integer
                                example: 50
                              previousPageUrl:
                                type:
                                  - string
                                  - 'null'
                                format: uri
                              to:
                                type:
                                  - integer
                                  - 'null'
                                example: 50
                              totalItems:
                                type: integer
                            type: object
                        type: object
                    type: object
        '400':
          description: Bad request or validation error
          content:
            application/json:
              schema:
                allOf:
                  - description: The response format of most endpoints for erronous requests
                    required:
                      - detail
                      - type
                      - message
                      - status
                    properties:
                      detail:
                        title: details
                      type:
                        title: type
                        type: string
                      requestUuid:
                        title: requestUuid
                        type: string
                        format: uuid
                      path:
                        title: path
                        type: string
                      message:
                        title: message
                        type:
                          - string
                          - 'null'
                      status:
                        title: status
                        description: HTTP status code
                        type: integer
                    type: object
                  - properties: {}
      security:
        - ApiToken:
            - https://api.abaninja.ch/auth/members
      x-legacy-operation-id: ea4fdf534d265a277360fee191e3dd58
      x-required-scopes:
        - members
    post:
      tags:
        - members
      summary: Create member
      description: Create a new member
      operationId: members_create_members
      parameters:
        - name: accountUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        description: Create member
        required: true
        content:
          application/json:
            schema:
              $schema: https://json-schema.org/draft/2020-12/schema
              $id: https://api.abaninja.ch/schemas/2.0.0/member.create.schema.json
              description: A schema for creating a member
              type: object
              additionalProperties: false
              properties:
                firstName:
                  type:
                    - string
                  minLength: 1
                  maxLength: 255
                lastName:
                  type:
                    - string
                  minLength: 1
                  maxLength: 255
                userUuid:
                  type:
                    - string
                    - 'null'
                  format: uuid
                addressUuid:
                  type:
                    - string
                    - 'null'
                  format: uuid
                memberGroups:
                  type:
                    - array
                  minItems: 0
                  maxItems: 20
                  items:
                    type:
                      - string
                    format: uuid
                memberships:
                  type:
                    - array
                  minItems: 0
                  maxItems: 1
                  items:
                    type:
                      - string
                    format: uuid
              required:
                - firstName
                - lastName
      responses:
        '201':
          description: Successful response
          content:
            application/json:
              schema:
                allOf:
                  - description: The response format of most endpoints for successful requests
                    required:
                      - data
                      - message
                      - status
                    properties:
                      data:
                        title: data
                      message:
                        title: message
                        type: string
                      status:
                        title: status
                        description: HTTP status code
                        type: integer
                      meta:
                        title: meta
                        type:
                          - object
                          - 'null'
                    type: object
                  - properties:
                      data:
                        title: Member Resource
                        properties:
                          uuid:
                            type: string
                            format: uuid
                          firstName:
                            type: string
                          lastName:
                            type: string
                          user:
                            properties:
                              uuid:
                                type: string
                                format: uuid
                              email:
                                type:
                                  - string
                                  - 'null'
                                format: email
                            type:
                              - object
                              - 'null'
                          address:
                            properties:
                              uuid:
                                type: string
                                format: uuid
                              customerNumber:
                                type:
                                  - string
                                  - 'null'
                            type:
                              - object
                              - 'null'
                          memberGroups:
                            type: array
                            items:
                              properties:
                                uuid:
                                  type: string
                                  format: uuid
                                name:
                                  type: string
                                color:
                                  description: Hexadecimal color
                                  type: string
                              type: object
                          memberships:
                            type: array
                            items:
                              properties:
                                uuid:
                                  type: string
                                  format: uuid
                                name:
                                  type: string
                                color:
                                  description: Hexadecimal color
                                  type: string
                              type: object
                        type: object
                      status:
                        example: 201
                    type: object
        '400':
          description: Bad request or validation error
          content:
            application/json:
              schema:
                allOf:
                  - description: The response format of most endpoints for erronous requests
                    required:
                      - detail
                      - type
                      - message
                      - status
                    properties:
                      detail:
                        title: details
                      type:
                        title: type
                        type: string
                      requestUuid:
                        title: requestUuid
                        type: string
                        format: uuid
                      path:
                        title: path
                        type: string
                      message:
                        title: message
                        type:
                          - string
                          - 'null'
                      status:
                        title: status
                        description: HTTP status code
                        type: integer
                    type: object
                  - properties: {}
      security:
        - ApiToken:
            - https://api.abaninja.ch/auth/members
      x-legacy-operation-id: 603bdd96e416535a9c922edfaf470e3d
      x-required-scopes:
        - members
  /accounts/{accountUuid}/members/v2/memberships:
    get:
      tags:
        - memberships
      summary: Get memberships
      description: Get the memberships
      operationId: members_list_memberships_2
      parameters:
        - name: accountUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: page
          in: query
          schema:
            type:
              - integer
              - 'null'
            default: 1
            minimum: 1
        - name: perPage
          in: query
          schema:
            type:
              - integer
              - 'null'
            minimum: 1
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                allOf:
                  - description: The response format of most endpoints for successful requests
                    required:
                      - data
                      - message
                      - status
                    properties:
                      data:
                        title: data
                      message:
                        title: message
                        type: string
                      status:
                        title: status
                        description: HTTP status code
                        type: integer
                      meta:
                        title: meta
                        type:
                          - object
                          - 'null'
                    type: object
                  - properties:
                      data:
                        type: array
                        items:
                          title: Membership Resource
                          properties:
                            uuid:
                              type: string
                              format: uuid
                            name:
                              type: string
                            color:
                              description: Hexadecimal color
                              type: string
                            invoiceTemplateUuid:
                              type:
                                - string
                                - 'null'
                              format: uuid
                          type: object
                      status:
                        example: 200
                      meta:
                        properties:
                          pagination:
                            properties:
                              currentPage:
                                type: integer
                                minimum: 1
                              firstPageUrl:
                                type:
                                  - string
                                  - 'null'
                                format: uri
                              from:
                                type:
                                  - integer
                                  - 'null'
                                example: 1
                              lastPage:
                                type: integer
                              lastPageUrl:
                                type: string
                                format: uri
                              nextPageUrl:
                                type:
                                  - string
                                  - 'null'
                                format: uri
                              perPage:
                                type: integer
                                example: 50
                              previousPageUrl:
                                type:
                                  - string
                                  - 'null'
                                format: uri
                              to:
                                type:
                                  - integer
                                  - 'null'
                                example: 50
                              totalItems:
                                type: integer
                            type: object
                        type: object
                    type: object
        '400':
          description: Bad request or validation error
          content:
            application/json:
              schema:
                allOf:
                  - description: The response format of most endpoints for erronous requests
                    required:
                      - detail
                      - type
                      - message
                      - status
                    properties:
                      detail:
                        title: details
                      type:
                        title: type
                        type: string
                      requestUuid:
                        title: requestUuid
                        type: string
                        format: uuid
                      path:
                        title: path
                        type: string
                      message:
                        title: message
                        type:
                          - string
                          - 'null'
                      status:
                        title: status
                        description: HTTP status code
                        type: integer
                    type: object
                  - properties: {}
      security:
        - ApiToken:
            - https://api.abaninja.ch/auth/members
      x-legacy-operation-id: 551b612d8fc00c7c383bf05407046885
      x-required-scopes:
        - members
    post:
      tags:
        - memberships
      summary: Create membership
      description: Create a new membership
      operationId: members_create_memberships
      parameters:
        - name: accountUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        description: Create membership
        required: true
        content:
          application/json:
            schema:
              $schema: https://json-schema.org/draft/2020-12/schema
              $id: https://api.abaninja.ch/schemas/2.0.0/membership.create.schema.json
              description: A schema for creating a membership
              type: object
              additionalProperties: false
              properties:
                name:
                  type:
                    - string
                  minLength: 1
                  maxLength: 255
                color:
                  type:
                    - string
                  pattern: ^#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$
                invoiceTemplateUuid:
                  type:
                    - string
                    - 'null'
                  format: uuid
              required:
                - name
                - color
      responses:
        '201':
          description: Successful response
          content:
            application/json:
              schema:
                allOf:
                  - description: The response format of most endpoints for successful requests
                    required:
                      - data
                      - message
                      - status
                    properties:
                      data:
                        title: data
                      message:
                        title: message
                        type: string
                      status:
                        title: status
                        description: HTTP status code
                        type: integer
                      meta:
                        title: meta
                        type:
                          - object
                          - 'null'
                    type: object
                  - properties:
                      data:
                        title: Membership Resource
                        properties:
                          uuid:
                            type: string
                            format: uuid
                          name:
                            type: string
                          color:
                            description: Hexadecimal color
                            type: string
                          invoiceTemplateUuid:
                            type:
                              - string
                              - 'null'
                            format: uuid
                        type: object
                      status:
                        example: 201
                    type: object
        '400':
          description: Bad request or validation error
          content:
            application/json:
              schema:
                allOf:
                  - description: The response format of most endpoints for erronous requests
                    required:
                      - detail
                      - type
                      - message
                      - status
                    properties:
                      detail:
                        title: details
                      type:
                        title: type
                        type: string
                      requestUuid:
                        title: requestUuid
                        type: string
                        format: uuid
                      path:
                        title: path
                        type: string
                      message:
                        title: message
                        type:
                          - string
                          - 'null'
                      status:
                        title: status
                        description: HTTP status code
                        type: integer
                    type: object
                  - properties: {}
      security:
        - ApiToken:
            - https://api.abaninja.ch/auth/members
      x-legacy-operation-id: 96555f09689d26bc907dbf9e9810556a
      x-required-scopes:
        - members
  /accounts/{accountUuid}/members/v2/member-groups/{memberGroupUuid}:
    get:
      tags:
        - member-groups
      summary: Get member group
      description: Get a member group
      operationId: members_get_member_groups
      parameters:
        - name: accountUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: memberGroupUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                allOf:
                  - description: The response format of most endpoints for successful requests
                    required:
                      - data
                      - message
                      - status
                    properties:
                      data:
                        title: data
                      message:
                        title: message
                        type: string
                      status:
                        title: status
                        description: HTTP status code
                        type: integer
                      meta:
                        title: meta
                        type:
                          - object
                          - 'null'
                    type: object
                  - properties:
                      data:
                        title: Member Group Resource
                        properties:
                          uuid:
                            type: string
                            format: uuid
                          name:
                            type: string
                          color:
                            description: Hexadecimal color
                            type: string
                        type: object
                      status:
                        example: 200
                    type: object
        '400':
          description: Bad request or validation error
          content:
            application/json:
              schema:
                allOf:
                  - description: The response format of most endpoints for erronous requests
                    required:
                      - detail
                      - type
                      - message
                      - status
                    properties:
                      detail:
                        title: details
                      type:
                        title: type
                        type: string
                      requestUuid:
                        title: requestUuid
                        type: string
                        format: uuid
                      path:
                        title: path
                        type: string
                      message:
                        title: message
                        type:
                          - string
                          - 'null'
                      status:
                        title: status
                        description: HTTP status code
                        type: integer
                    type: object
                  - properties: {}
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                allOf:
                  - description: The response format of most endpoints for erronous requests
                    required:
                      - detail
                      - type
                      - message
                      - status
                    properties:
                      detail:
                        title: details
                      type:
                        title: type
                        type: string
                      requestUuid:
                        title: requestUuid
                        type: string
                        format: uuid
                      path:
                        title: path
                        type: string
                      message:
                        title: message
                        type:
                          - string
                          - 'null'
                      status:
                        title: status
                        description: HTTP status code
                        type: integer
                    type: object
                  - properties: {}
      security:
        - ApiToken:
            - https://api.abaninja.ch/auth/members
      x-legacy-operation-id: 767a0ce2721126d4ec2c33db103a10be
      x-required-scopes:
        - members
    patch:
      tags:
        - member-groups
      summary: Update member group
      description: Update a member group
      operationId: members_update_member_groups_2
      parameters:
        - name: accountUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: memberGroupUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        description: Update member group
        required: true
        content:
          application/json:
            schema:
              $schema: https://json-schema.org/draft/2020-12/schema
              $id: https://api.abaninja.ch/schemas/2.0.0/member-group.update.schema.json
              description: A schema for updating a member group
              type: object
              minProperties: 1
              additionalProperties: false
              properties:
                name:
                  type:
                    - string
                  minLength: 1
                  maxLength: 255
                color:
                  type:
                    - string
                  pattern: ^#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$
              required: []
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                allOf:
                  - description: The response format of most endpoints for successful requests
                    required:
                      - data
                      - message
                      - status
                    properties:
                      data:
                        title: data
                      message:
                        title: message
                        type: string
                      status:
                        title: status
                        description: HTTP status code
                        type: integer
                      meta:
                        title: meta
                        type:
                          - object
                          - 'null'
                    type: object
                  - properties:
                      data:
                        title: Member Group Resource
                        properties:
                          uuid:
                            type: string
                            format: uuid
                          name:
                            type: string
                          color:
                            description: Hexadecimal color
                            type: string
                        type: object
                      status:
                        example: 200
                    type: object
        '400':
          description: Bad request or validation error
          content:
            application/json:
              schema:
                allOf:
                  - description: The response format of most endpoints for erronous requests
                    required:
                      - detail
                      - type
                      - message
                      - status
                    properties:
                      detail:
                        title: details
                      type:
                        title: type
                        type: string
                      requestUuid:
                        title: requestUuid
                        type: string
                        format: uuid
                      path:
                        title: path
                        type: string
                      message:
                        title: message
                        type:
                          - string
                          - 'null'
                      status:
                        title: status
                        description: HTTP status code
                        type: integer
                    type: object
                  - properties: {}
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                allOf:
                  - description: The response format of most endpoints for erronous requests
                    required:
                      - detail
                      - type
                      - message
                      - status
                    properties:
                      detail:
                        title: details
                      type:
                        title: type
                        type: string
                      requestUuid:
                        title: requestUuid
                        type: string
                        format: uuid
                      path:
                        title: path
                        type: string
                      message:
                        title: message
                        type:
                          - string
                          - 'null'
                      status:
                        title: status
                        description: HTTP status code
                        type: integer
                    type: object
                  - properties: {}
      security:
        - ApiToken:
            - https://api.abaninja.ch/auth/members
      x-legacy-operation-id: ece9f2baec0452ee133163a7e893b5d6
      x-required-scopes:
        - members
    delete:
      tags:
        - member-groups
      summary: Delete member group
      description: Delete a member group
      operationId: members_delete_member_groups
      parameters:
        - name: accountUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: memberGroupUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '204':
          description: Successful response
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                allOf:
                  - description: The response format of most endpoints for erronous requests
                    required:
                      - detail
                      - type
                      - message
                      - status
                    properties:
                      detail:
                        title: details
                      type:
                        title: type
                        type: string
                      requestUuid:
                        title: requestUuid
                        type: string
                        format: uuid
                      path:
                        title: path
                        type: string
                      message:
                        title: message
                        type:
                          - string
                          - 'null'
                      status:
                        title: status
                        description: HTTP status code
                        type: integer
                    type: object
                  - properties: {}
      security:
        - ApiToken:
            - https://api.abaninja.ch/auth/members
      x-legacy-operation-id: fb68e14cb896f5db19de8e62bfe8acc7
      x-required-scopes:
        - members
  /accounts/{accountUuid}/members/v2/members/{memberUuid}:
    get:
      tags:
        - members
      summary: Get member
      description: Get a member
      operationId: members_get_members
      parameters:
        - name: accountUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: memberUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                allOf:
                  - description: The response format of most endpoints for successful requests
                    required:
                      - data
                      - message
                      - status
                    properties:
                      data:
                        title: data
                      message:
                        title: message
                        type: string
                      status:
                        title: status
                        description: HTTP status code
                        type: integer
                      meta:
                        title: meta
                        type:
                          - object
                          - 'null'
                    type: object
                  - properties:
                      data:
                        title: Member Resource
                        properties:
                          uuid:
                            type: string
                            format: uuid
                          firstName:
                            type: string
                          lastName:
                            type: string
                          user:
                            properties:
                              uuid:
                                type: string
                                format: uuid
                              email:
                                type:
                                  - string
                                  - 'null'
                                format: email
                            type:
                              - object
                              - 'null'
                          address:
                            properties:
                              uuid:
                                type: string
                                format: uuid
                              customerNumber:
                                type:
                                  - string
                                  - 'null'
                            type:
                              - object
                              - 'null'
                          memberGroups:
                            type: array
                            items:
                              properties:
                                uuid:
                                  type: string
                                  format: uuid
                                name:
                                  type: string
                                color:
                                  description: Hexadecimal color
                                  type: string
                              type: object
                          memberships:
                            type: array
                            items:
                              properties:
                                uuid:
                                  type: string
                                  format: uuid
                                name:
                                  type: string
                                color:
                                  description: Hexadecimal color
                                  type: string
                              type: object
                        type: object
                      status:
                        example: 200
                    type: object
        '400':
          description: Bad request or validation error
          content:
            application/json:
              schema:
                allOf:
                  - description: The response format of most endpoints for erronous requests
                    required:
                      - detail
                      - type
                      - message
                      - status
                    properties:
                      detail:
                        title: details
                      type:
                        title: type
                        type: string
                      requestUuid:
                        title: requestUuid
                        type: string
                        format: uuid
                      path:
                        title: path
                        type: string
                      message:
                        title: message
                        type:
                          - string
                          - 'null'
                      status:
                        title: status
                        description: HTTP status code
                        type: integer
                    type: object
                  - properties: {}
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                allOf:
                  - description: The response format of most endpoints for erronous requests
                    required:
                      - detail
                      - type
                      - message
                      - status
                    properties:
                      detail:
                        title: details
                      type:
                        title: type
                        type: string
                      requestUuid:
                        title: requestUuid
                        type: string
                        format: uuid
                      path:
                        title: path
                        type: string
                      message:
                        title: message
                        type:
                          - string
                          - 'null'
                      status:
                        title: status
                        description: HTTP status code
                        type: integer
                    type: object
                  - properties: {}
      security:
        - ApiToken:
            - https://api.abaninja.ch/auth/members
      x-legacy-operation-id: ae6e36a93ca6d2165e3dc7e09bb4ef29
      x-required-scopes:
        - members
    patch:
      tags:
        - members
      summary: Update member
      description: Update a member
      operationId: members_update_members
      parameters:
        - name: accountUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: memberUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        description: Update member
        required: true
        content:
          application/json:
            schema:
              $schema: https://json-schema.org/draft/2020-12/schema
              $id: https://api.abaninja.ch/schemas/2.0.0/member.update.schema.json
              description: A schema for updating a member
              type: object
              minProperties: 1
              additionalProperties: false
              properties:
                firstName:
                  type:
                    - string
                  minLength: 1
                  maxLength: 255
                lastName:
                  type:
                    - string
                  minLength: 1
                  maxLength: 255
                userUuid:
                  type:
                    - string
                    - 'null'
                  format: uuid
                addressUuid:
                  type:
                    - string
                    - 'null'
                  format: uuid
              required: []
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                allOf:
                  - description: The response format of most endpoints for successful requests
                    required:
                      - data
                      - message
                      - status
                    properties:
                      data:
                        title: data
                      message:
                        title: message
                        type: string
                      status:
                        title: status
                        description: HTTP status code
                        type: integer
                      meta:
                        title: meta
                        type:
                          - object
                          - 'null'
                    type: object
                  - properties:
                      data:
                        title: Member Resource
                        properties:
                          uuid:
                            type: string
                            format: uuid
                          firstName:
                            type: string
                          lastName:
                            type: string
                          user:
                            properties:
                              uuid:
                                type: string
                                format: uuid
                              email:
                                type:
                                  - string
                                  - 'null'
                                format: email
                            type:
                              - object
                              - 'null'
                          address:
                            properties:
                              uuid:
                                type: string
                                format: uuid
                              customerNumber:
                                type:
                                  - string
                                  - 'null'
                            type:
                              - object
                              - 'null'
                          memberGroups:
                            type: array
                            items:
                              properties:
                                uuid:
                                  type: string
                                  format: uuid
                                name:
                                  type: string
                                color:
                                  description: Hexadecimal color
                                  type: string
                              type: object
                          memberships:
                            type: array
                            items:
                              properties:
                                uuid:
                                  type: string
                                  format: uuid
                                name:
                                  type: string
                                color:
                                  description: Hexadecimal color
                                  type: string
                              type: object
                        type: object
                      status:
                        example: 200
                    type: object
        '400':
          description: Bad request or validation error
          content:
            application/json:
              schema:
                allOf:
                  - description: The response format of most endpoints for erronous requests
                    required:
                      - detail
                      - type
                      - message
                      - status
                    properties:
                      detail:
                        title: details
                      type:
                        title: type
                        type: string
                      requestUuid:
                        title: requestUuid
                        type: string
                        format: uuid
                      path:
                        title: path
                        type: string
                      message:
                        title: message
                        type:
                          - string
                          - 'null'
                      status:
                        title: status
                        description: HTTP status code
                        type: integer
                    type: object
                  - properties: {}
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                allOf:
                  - description: The response format of most endpoints for erronous requests
                    required:
                      - detail
                      - type
                      - message
                      - status
                    properties:
                      detail:
                        title: details
                      type:
                        title: type
                        type: string
                      requestUuid:
                        title: requestUuid
                        type: string
                        format: uuid
                      path:
                        title: path
                        type: string
                      message:
                        title: message
                        type:
                          - string
                          - 'null'
                      status:
                        title: status
                        description: HTTP status code
                        type: integer
                    type: object
                  - properties: {}
      security:
        - ApiToken:
            - https://api.abaninja.ch/auth/members
      x-legacy-operation-id: 5e32a728f2adb4d53f2ab3fef4cab1a6
      x-required-scopes:
        - members
    delete:
      tags:
        - members
      summary: Delete member
      description: Delete a member
      operationId: members_delete_members
      parameters:
        - name: accountUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: memberUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '204':
          description: Successful response
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                allOf:
                  - description: The response format of most endpoints for erronous requests
                    required:
                      - detail
                      - type
                      - message
                      - status
                    properties:
                      detail:
                        title: details
                      type:
                        title: type
                        type: string
                      requestUuid:
                        title: requestUuid
                        type: string
                        format: uuid
                      path:
                        title: path
                        type: string
                      message:
                        title: message
                        type:
                          - string
                          - 'null'
                      status:
                        title: status
                        description: HTTP status code
                        type: integer
                    type: object
                  - properties: {}
      security:
        - ApiToken:
            - https://api.abaninja.ch/auth/members
      x-legacy-operation-id: ad4cb3ff718ad63cb872dc07dd620dee
      x-required-scopes:
        - members
  /accounts/{accountUuid}/members/v2/memberships/{membershipUuid}:
    get:
      tags:
        - memberships
      summary: Get membership
      description: Get a membership
      operationId: members_get_memberships
      parameters:
        - name: accountUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: membershipUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                allOf:
                  - description: The response format of most endpoints for successful requests
                    required:
                      - data
                      - message
                      - status
                    properties:
                      data:
                        title: data
                      message:
                        title: message
                        type: string
                      status:
                        title: status
                        description: HTTP status code
                        type: integer
                      meta:
                        title: meta
                        type:
                          - object
                          - 'null'
                    type: object
                  - properties:
                      data:
                        title: Membership Resource
                        properties:
                          uuid:
                            type: string
                            format: uuid
                          name:
                            type: string
                          color:
                            description: Hexadecimal color
                            type: string
                          invoiceTemplateUuid:
                            type:
                              - string
                              - 'null'
                            format: uuid
                        type: object
                      status:
                        example: 200
                    type: object
        '400':
          description: Bad request or validation error
          content:
            application/json:
              schema:
                allOf:
                  - description: The response format of most endpoints for erronous requests
                    required:
                      - detail
                      - type
                      - message
                      - status
                    properties:
                      detail:
                        title: details
                      type:
                        title: type
                        type: string
                      requestUuid:
                        title: requestUuid
                        type: string
                        format: uuid
                      path:
                        title: path
                        type: string
                      message:
                        title: message
                        type:
                          - string
                          - 'null'
                      status:
                        title: status
                        description: HTTP status code
                        type: integer
                    type: object
                  - properties: {}
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                allOf:
                  - description: The response format of most endpoints for erronous requests
                    required:
                      - detail
                      - type
                      - message
                      - status
                    properties:
                      detail:
                        title: details
                      type:
                        title: type
                        type: string
                      requestUuid:
                        title: requestUuid
                        type: string
                        format: uuid
                      path:
                        title: path
                        type: string
                      message:
                        title: message
                        type:
                          - string
                          - 'null'
                      status:
                        title: status
                        description: HTTP status code
                        type: integer
                    type: object
                  - properties: {}
      security:
        - ApiToken:
            - https://api.abaninja.ch/auth/members
      x-legacy-operation-id: 736a394a34d4c657b7e038a15f5b4635
      x-required-scopes:
        - members
    patch:
      tags:
        - memberships
      summary: Update membership
      description: Update a membership
      operationId: members_update_memberships_2
      parameters:
        - name: accountUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: membershipUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        description: Update membership
        required: true
        content:
          application/json:
            schema:
              $schema: https://json-schema.org/draft/2020-12/schema
              $id: https://api.abaninja.ch/schemas/2.0.0/membership.update.schema.json
              description: A schema for updating a membership
              type: object
              minProperties: 1
              additionalProperties: false
              properties:
                name:
                  type:
                    - string
                  minLength: 1
                  maxLength: 255
                color:
                  type:
                    - string
                  pattern: ^#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$
                invoiceTemplateUuid:
                  type:
                    - string
                    - 'null'
                  format: uuid
              required: []
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                allOf:
                  - description: The response format of most endpoints for successful requests
                    required:
                      - data
                      - message
                      - status
                    properties:
                      data:
                        title: data
                      message:
                        title: message
                        type: string
                      status:
                        title: status
                        description: HTTP status code
                        type: integer
                      meta:
                        title: meta
                        type:
                          - object
                          - 'null'
                    type: object
                  - properties:
                      data:
                        title: Membership Resource
                        properties:
                          uuid:
                            type: string
                            format: uuid
                          name:
                            type: string
                          color:
                            description: Hexadecimal color
                            type: string
                          invoiceTemplateUuid:
                            type:
                              - string
                              - 'null'
                            format: uuid
                        type: object
                      status:
                        example: 200
                    type: object
        '400':
          description: Bad request or validation error
          content:
            application/json:
              schema:
                allOf:
                  - description: The response format of most endpoints for erronous requests
                    required:
                      - detail
                      - type
                      - message
                      - status
                    properties:
                      detail:
                        title: details
                      type:
                        title: type
                        type: string
                      requestUuid:
                        title: requestUuid
                        type: string
                        format: uuid
                      path:
                        title: path
                        type: string
                      message:
                        title: message
                        type:
                          - string
                          - 'null'
                      status:
                        title: status
                        description: HTTP status code
                        type: integer
                    type: object
                  - properties: {}
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                allOf:
                  - description: The response format of most endpoints for erronous requests
                    required:
                      - detail
                      - type
                      - message
                      - status
                    properties:
                      detail:
                        title: details
                      type:
                        title: type
                        type: string
                      requestUuid:
                        title: requestUuid
                        type: string
                        format: uuid
                      path:
                        title: path
                        type: string
                      message:
                        title: message
                        type:
                          - string
                          - 'null'
                      status:
                        title: status
                        description: HTTP status code
                        type: integer
                    type: object
                  - properties: {}
      security:
        - ApiToken:
            - https://api.abaninja.ch/auth/members
      x-legacy-operation-id: d151fe7e4c3514507379e0fbc6813637
      x-required-scopes:
        - members
    delete:
      tags:
        - memberships
      summary: Delete membership
      description: Delete a membership
      operationId: members_delete_memberships
      parameters:
        - name: accountUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: membershipUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '204':
          description: Successful response
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                allOf:
                  - description: The response format of most endpoints for erronous requests
                    required:
                      - detail
                      - type
                      - message
                      - status
                    properties:
                      detail:
                        title: details
                      type:
                        title: type
                        type: string
                      requestUuid:
                        title: requestUuid
                        type: string
                        format: uuid
                      path:
                        title: path
                        type: string
                      message:
                        title: message
                        type:
                          - string
                          - 'null'
                      status:
                        title: status
                        description: HTTP status code
                        type: integer
                    type: object
                  - properties: {}
      security:
        - ApiToken:
            - https://api.abaninja.ch/auth/members
      x-legacy-operation-id: bd373a6cdd47b3f4a8efd634149d460a
      x-required-scopes:
        - members
  /accounts/{accountUuid}/members/v2/members/{memberUuid}/member-groups:
    get:
      tags:
        - members
      summary: Get member group assignments
      description: Get the member group assignments for a member
      operationId: members_list_member_groups
      parameters:
        - name: accountUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: memberUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                allOf:
                  - description: The response format of most endpoints for successful requests
                    required:
                      - data
                      - message
                      - status
                    properties:
                      data:
                        title: data
                      message:
                        title: message
                        type: string
                      status:
                        title: status
                        description: HTTP status code
                        type: integer
                      meta:
                        title: meta
                        type:
                          - object
                          - 'null'
                    type: object
                  - properties:
                      data:
                        type: array
                        items:
                          title: Member Group Resource
                          properties:
                            uuid:
                              type: string
                              format: uuid
                            name:
                              type: string
                            color:
                              description: Hexadecimal color
                              type: string
                          type: object
                      status:
                        example: 200
                    type: object
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                allOf:
                  - description: The response format of most endpoints for erronous requests
                    required:
                      - detail
                      - type
                      - message
                      - status
                    properties:
                      detail:
                        title: details
                      type:
                        title: type
                        type: string
                      requestUuid:
                        title: requestUuid
                        type: string
                        format: uuid
                      path:
                        title: path
                        type: string
                      message:
                        title: message
                        type:
                          - string
                          - 'null'
                      status:
                        title: status
                        description: HTTP status code
                        type: integer
                    type: object
                  - properties: {}
      security:
        - ApiToken:
            - https://api.abaninja.ch/auth/members
      x-legacy-operation-id: 172d9cd7072e6017ed56844cb3b018a0
      x-required-scopes:
        - members
    put:
      tags:
        - members
      summary: Set member group assignments
      description: Set the member group assignments for a member
      operationId: members_update_member_groups
      parameters:
        - name: accountUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: memberUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        description: Set member groups
        required: true
        content:
          application/json:
            schema:
              $schema: https://json-schema.org/draft/2020-12/schema
              $id: https://api.abaninja.ch/schemas/2.0.0/member-set-member-groups.schema.json
              description: A schema for setting member groups on a member
              type: object
              additionalProperties: false
              properties:
                memberGroups:
                  type:
                    - array
                  minItems: 0
                  maxItems: 20
                  items:
                    type:
                      - string
                    format: uuid
              required:
                - memberGroups
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                allOf:
                  - description: The response format of most endpoints for successful requests
                    required:
                      - data
                      - message
                      - status
                    properties:
                      data:
                        title: data
                      message:
                        title: message
                        type: string
                      status:
                        title: status
                        description: HTTP status code
                        type: integer
                      meta:
                        title: meta
                        type:
                          - object
                          - 'null'
                    type: object
                  - properties:
                      data:
                        type: array
                        items:
                          title: Member Group Resource
                          properties:
                            uuid:
                              type: string
                              format: uuid
                            name:
                              type: string
                            color:
                              description: Hexadecimal color
                              type: string
                          type: object
                      status:
                        example: 200
                    type: object
        '400':
          description: Bad request or validation error
          content:
            application/json:
              schema:
                allOf:
                  - description: The response format of most endpoints for erronous requests
                    required:
                      - detail
                      - type
                      - message
                      - status
                    properties:
                      detail:
                        title: details
                      type:
                        title: type
                        type: string
                      requestUuid:
                        title: requestUuid
                        type: string
                        format: uuid
                      path:
                        title: path
                        type: string
                      message:
                        title: message
                        type:
                          - string
                          - 'null'
                      status:
                        title: status
                        description: HTTP status code
                        type: integer
                    type: object
                  - properties: {}
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                allOf:
                  - description: The response format of most endpoints for erronous requests
                    required:
                      - detail
                      - type
                      - message
                      - status
                    properties:
                      detail:
                        title: details
                      type:
                        title: type
                        type: string
                      requestUuid:
                        title: requestUuid
                        type: string
                        format: uuid
                      path:
                        title: path
                        type: string
                      message:
                        title: message
                        type:
                          - string
                          - 'null'
                      status:
                        title: status
                        description: HTTP status code
                        type: integer
                    type: object
                  - properties: {}
      security:
        - ApiToken:
            - https://api.abaninja.ch/auth/members
      x-legacy-operation-id: 7fc465b477274d42be3f49071df32dfd
      x-required-scopes:
        - members
  /accounts/{accountUuid}/members/v2/members/{memberUuid}/memberships:
    get:
      tags:
        - members
      summary: Get membership assignments
      description: Get the membership assignments for a member
      operationId: members_list_memberships
      parameters:
        - name: accountUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: memberUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                allOf:
                  - description: The response format of most endpoints for successful requests
                    required:
                      - data
                      - message
                      - status
                    properties:
                      data:
                        title: data
                      message:
                        title: message
                        type: string
                      status:
                        title: status
                        description: HTTP status code
                        type: integer
                      meta:
                        title: meta
                        type:
                          - object
                          - 'null'
                    type: object
                  - properties:
                      data:
                        type: array
                        items:
                          title: Membership Resource
                          properties:
                            uuid:
                              type: string
                              format: uuid
                            name:
                              type: string
                            color:
                              description: Hexadecimal color
                              type: string
                            invoiceTemplateUuid:
                              type:
                                - string
                                - 'null'
                              format: uuid
                          type: object
                      status:
                        example: 200
                    type: object
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                allOf:
                  - description: The response format of most endpoints for erronous requests
                    required:
                      - detail
                      - type
                      - message
                      - status
                    properties:
                      detail:
                        title: details
                      type:
                        title: type
                        type: string
                      requestUuid:
                        title: requestUuid
                        type: string
                        format: uuid
                      path:
                        title: path
                        type: string
                      message:
                        title: message
                        type:
                          - string
                          - 'null'
                      status:
                        title: status
                        description: HTTP status code
                        type: integer
                    type: object
                  - properties: {}
      security:
        - ApiToken:
            - https://api.abaninja.ch/auth/members
      x-legacy-operation-id: 8558ae47f308a813eba95d85170bcb1f
      x-required-scopes:
        - members
    put:
      tags:
        - members
      summary: Set membership assignments
      description: Set the membership assignments for a member
      operationId: members_update_memberships
      parameters:
        - name: accountUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: memberUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        description: Set memberships
        required: true
        content:
          application/json:
            schema:
              $schema: https://json-schema.org/draft/2020-12/schema
              $id: https://api.abaninja.ch/schemas/2.0.0/member-set-memberships.schema.json
              description: A schema for setting memberships on a member
              type: object
              minProperties: 1
              additionalProperties: false
              properties:
                memberships:
                  type:
                    - array
                  minItems: 0
                  maxItems: 1
                  items:
                    type:
                      - string
                    format: uuid
              required:
                - memberships
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                allOf:
                  - description: The response format of most endpoints for successful requests
                    required:
                      - data
                      - message
                      - status
                    properties:
                      data:
                        title: data
                      message:
                        title: message
                        type: string
                      status:
                        title: status
                        description: HTTP status code
                        type: integer
                      meta:
                        title: meta
                        type:
                          - object
                          - 'null'
                    type: object
                  - properties:
                      data:
                        type: array
                        items:
                          title: Membership Resource
                          properties:
                            uuid:
                              type: string
                              format: uuid
                            name:
                              type: string
                            color:
                              description: Hexadecimal color
                              type: string
                            invoiceTemplateUuid:
                              type:
                                - string
                                - 'null'
                              format: uuid
                          type: object
                      status:
                        example: 200
                    type: object
        '400':
          description: Bad request or validation error
          content:
            application/json:
              schema:
                allOf:
                  - description: The response format of most endpoints for erronous requests
                    required:
                      - detail
                      - type
                      - message
                      - status
                    properties:
                      detail:
                        title: details
                      type:
                        title: type
                        type: string
                      requestUuid:
                        title: requestUuid
                        type: string
                        format: uuid
                      path:
                        title: path
                        type: string
                      message:
                        title: message
                        type:
                          - string
                          - 'null'
                      status:
                        title: status
                        description: HTTP status code
                        type: integer
                    type: object
                  - properties: {}
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                allOf:
                  - description: The response format of most endpoints for erronous requests
                    required:
                      - detail
                      - type
                      - message
                      - status
                    properties:
                      detail:
                        title: details
                      type:
                        title: type
                        type: string
                      requestUuid:
                        title: requestUuid
                        type: string
                        format: uuid
                      path:
                        title: path
                        type: string
                      message:
                        title: message
                        type:
                          - string
                          - 'null'
                      status:
                        title: status
                        description: HTTP status code
                        type: integer
                    type: object
                  - properties: {}
      security:
        - ApiToken:
            - https://api.abaninja.ch/auth/members
      x-legacy-operation-id: 815e904da9f58b43f966c9c56e3a08fd
      x-required-scopes:
        - members
components:
  securitySchemes:
    ApiToken:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Bearer token authentication. Create tokens in Settings > API Token.
