This guide explains how to manage RFID assignments for members using the MMS API V2.
RFIDs (Radio Frequency Identification) are used by members to access the gym (turnstiles), lock/unlock lockers, and log in to EGYM machines. Assigning an RFID to a member's account is a crucial step in the onboarding process.
The typical workflow for managing RFIDs is:
- Assign an RFID to a member.
- List RFIDs to see what is currently assigned.
- Find a member by scanning an RFID.
- Remove an RFID if it's lost or replaced.
You can assign an RFID to a member using the POST endpoint. This adds the RFID to the member's list of credentials.
- Testhttps://one-mms-service.ext-1.test.co.egym.coffee/api/v2/accounts/{accountId}/rfids
- Prodhttps://mms.api.egym.com/api/v2/accounts/{accountId}/rfids
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
'https://one-mms-service.ext-1.test.co.egym.coffee/api/v2/accounts/{accountId}/rfids' \
-H 'Content-Type: application/json' \
-H 'x-api-key: YOUR_API_KEY_HERE' \
-d '{
"rfid": "0x12345678",
"type": "Mifare"
}'Note:
- The
rfidvalue should be a hex string starting with0x. - If you want to replace all RFIDs for a user (e.g., if they lost their card and got a new one), use the
PUTendpoint (updateUsersRfids) instead. - If you pass RFID that already belongs to other member it will be automatically reassigned to target member
To retrieve all RFIDs assigned to a member, use the GET endpoint.
- Testhttps://one-mms-service.ext-1.test.co.egym.coffee/api/v2/accounts/{accountId}/rfids
- Prodhttps://mms.api.egym.com/api/v2/accounts/{accountId}/rfids
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://one-mms-service.ext-1.test.co.egym.coffee/api/v2/accounts/{accountId}/rfids?allSources=false' \
-H 'x-api-key: YOUR_API_KEY_HERE'If a member scans their RFID at a terminal, you can identify them using the GET endpoint with the RFID value.
- Testhttps://one-mms-service.ext-1.test.co.egym.coffee/api/v2/accounts/rfid/{rfid}
- Prodhttps://mms.api.egym.com/api/v2/accounts/rfid/{rfid}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://one-mms-service.ext-1.test.co.egym.coffee/api/v2/accounts/rfid/{rfid}?tagFormat=HITAG1' \
-H 'x-api-key: YOUR_API_KEY_HERE'To remove a specific RFID from a member's account (e.g., if it was lost), use the DELETE endpoint.
- Testhttps://one-mms-service.ext-1.test.co.egym.coffee/api/v2/accounts/{accountId}/rfids/{rfid}
- Prodhttps://mms.api.egym.com/api/v2/accounts/{accountId}/rfids/{rfid}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X DELETE \
'https://one-mms-service.ext-1.test.co.egym.coffee/api/v2/accounts/{accountId}/rfids/{rfid}?tagFormat=HITAG1' \
-H 'x-api-key: YOUR_API_KEY_HERE'