{"openapi":"3.1.0","info":{"title":"AbaNinja Members API - Members","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"}],"security":[{"ApiToken":[]}],"paths":{"/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":{"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"}},"message":{"title":"message","type":"string"},"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"}},"required":["data","message","status"]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"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"}},"required":["detail","type","message","status"]}}}}},"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":{"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"},"message":{"title":"message","type":"string"},"status":{"example":201},"meta":{"title":"meta","type":["object","null"]}},"required":["data","message","status"]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"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"}},"required":["detail","type","message","status"]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/members"]}],"x-legacy-operation-id":"603bdd96e416535a9c922edfaf470e3d","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":{"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"},"message":{"title":"message","type":"string"},"status":{"example":200},"meta":{"title":"meta","type":["object","null"]}},"required":["data","message","status"]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"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"}},"required":["detail","type","message","status"]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"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"}},"required":["detail","type","message","status"]}}}}},"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":{"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"},"message":{"title":"message","type":"string"},"status":{"example":200},"meta":{"title":"meta","type":["object","null"]}},"required":["data","message","status"]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"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"}},"required":["detail","type","message","status"]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"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"}},"required":["detail","type","message","status"]}}}}},"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":{"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"}},"required":["detail","type","message","status"]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/members"]}],"x-legacy-operation-id":"ad4cb3ff718ad63cb872dc07dd620dee","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":{"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"}},"message":{"title":"message","type":"string"},"status":{"example":200},"meta":{"title":"meta","type":["object","null"]}},"required":["data","message","status"]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"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"}},"required":["detail","type","message","status"]}}}}},"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":{"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"}},"message":{"title":"message","type":"string"},"status":{"example":200},"meta":{"title":"meta","type":["object","null"]}},"required":["data","message","status"]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"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"}},"required":["detail","type","message","status"]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"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"}},"required":["detail","type","message","status"]}}}}},"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":{"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"}},"message":{"title":"message","type":"string"},"status":{"example":200},"meta":{"title":"meta","type":["object","null"]}},"required":["data","message","status"]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"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"}},"required":["detail","type","message","status"]}}}}},"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":{"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"}},"message":{"title":"message","type":"string"},"status":{"example":200},"meta":{"title":"meta","type":["object","null"]}},"required":["data","message","status"]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"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"}},"required":["detail","type","message","status"]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"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"}},"required":["detail","type","message","status"]}}}}},"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."}}}}