# Member Account

These operations are needed to create and update member accounts and their membership information.

## Retrieve an account

 - [GET /api/v2/accounts/{accountId}](https://developer.egym.com/mms-api-v2/apis/mms-v2/member-account/retrieveaccount.md): Retrieve an account using accountId.

## Update an account

 - [PUT /api/v2/accounts/{accountId}](https://developer.egym.com/mms-api-v2/apis/mms-v2/member-account/updateaccount.md): Update an account using accountId.

## Delete an account

 - [DELETE /api/v2/accounts/{accountId}](https://developer.egym.com/mms-api-v2/apis/mms-v2/member-account/eraseaccountmembershipdata.md): Delete an account using accountId.
eraseMemberData parameter is optional and defaults to false. If set to true it removes all member data that belongs to a gym (personal data, contract data, rfid, product bookings).
If set to false it deletes only membershipId and contract data.

## Partially update an account

 - [PATCH /api/v2/accounts/{accountId}](https://developer.egym.com/mms-api-v2/apis/mms-v2/member-account/partialupdate.md): Partially update an account using accountId. Only non-null fields in the request will be updated. This is optimized for small, incremental changes.

## Upload account image

 - [PUT /api/v2/accounts/{accountId}/images](https://developer.egym.com/mms-api-v2/apis/mms-v2/member-account/uploadimage.md): This endpoint allows to upload a profile picture to the specified user using accountId (Supported formats: JPG, JPEG, PNG. Max file size: 16MB)

## Delete account image

 - [DELETE /api/v2/accounts/{accountId}/images](https://developer.egym.com/mms-api-v2/apis/mms-v2/member-account/deleteimage.md): This endpoint allows to delete a profile picture of the specified user using accountId

## List member accounts

 - [GET /api/v2/accounts](https://developer.egym.com/mms-api-v2/apis/mms-v2/member-account/listaccounts.md): Request all member accounts with paginated response. Result is always ordered by update timestamp (DESC). By default only accounts of the current gym are returned, otherwise set currentGymOnly to false.

## Create an account

 - [POST /api/v2/accounts](https://developer.egym.com/mms-api-v2/apis/mms-v2/member-account/publishaccount.md): Create an account in the EGYM System.

## Retrieve an account roles

 - [GET /api/v2/accounts/{accountId}/roles](https://developer.egym.com/mms-api-v2/apis/mms-v2/member-account/getroles.md): Retrieve an account roles in the current gym for given accountId

## Set an account roles

 - [POST /api/v2/accounts/{accountId}/roles](https://developer.egym.com/mms-api-v2/apis/mms-v2/member-account/assignroles.md): Update an account roles using accountId.

## Retrieve an account by RFID

 - [GET /api/v2/accounts/rfid/{rfid}](https://developer.egym.com/mms-api-v2/apis/mms-v2/member-account/getbyrfid.md): Retrieve an account using RFID.

## Retrieve an account by NFC

 - [GET /api/v2/accounts/nfc/{nfc}](https://developer.egym.com/mms-api-v2/apis/mms-v2/member-account/getbynfc.md): Retrieve an account using NFC.

## Retrieve an account by membership ID

 - [GET /api/v2/accounts/membership/{membershipId}](https://developer.egym.com/mms-api-v2/apis/mms-v2/member-account/retrieveaccountbymembershipid.md): Retrieve an account using membershipId.

## Retrieve an account by email

 - [GET /api/v2/accounts/email/{email}](https://developer.egym.com/mms-api-v2/apis/mms-v2/member-account/getbyemail.md): Retrieve an account using email.

## Retrieve an account roles

 - [GET /api/v2/accounts/{accountId}/roles](https://developer.egym.com/mms-api-v2/apis/mms-v2/member-account-roles/getroles.md): Retrieve an account roles in the current gym for given accountId

## Set an account roles

 - [POST /api/v2/accounts/{accountId}/roles](https://developer.egym.com/mms-api-v2/apis/mms-v2/member-account-roles/assignroles.md): Update an account roles using accountId.

## Retrieve an account by RFID

 - [GET /api/v2/accounts/rfid/{rfid}](https://developer.egym.com/mms-api-v2/apis/mms-v2/member-rfids/getbyrfid.md): Retrieve an account using RFID.

## Retrieve an account by NFC

 - [GET /api/v2/accounts/nfc/{nfc}](https://developer.egym.com/mms-api-v2/apis/mms-v2/member-account-nfc/getbynfc.md): Retrieve an account using NFC.

