Skip to content

Migrating members

These operations are needed to migrate members from V1 API to V2 API.

Migrate an account

Request

Migrate membership from V1 API using old EGYM user id (if already migrated then just returns membership).

Security
mms
Query
legacyUserIdinteger, (int64)required
curl -i -X POST \
  'https://developer.egym.com/_mock/mms-api-v2/apis/mms-v2/api/v2/migrate?legacyUserId=0' \
  -H 'x-api-key: YOUR_API_KEY_HERE'

Responses

Ok

Bodyapplication/json
accountIdstringread-only

The EGYM account ID for the Gym Member.

emailstring, non-emptyrequired

The Member email address. It should be unique within the gym chain.

firstNamestring, non-emptyrequired

The Member first name.

Example:"John"
lastNamestring, non-emptyrequired

The Member last name.

Example:"Wick"
dateOfBirthstring, (date)

The Member date of birth. format: yyyy-MM-dd

genderstringrequired

The Member gender. Please note that NON_BINARY is not correctly supported yet, we send it as FEMALE for the usage of the machines.

Enum:"MALE""FEMALE""NON_BINARY"
contactobject(ContactDTO)

The user's contact information

membershipobject(MembershipDTO)required

The membership details.

Response
{ "accountId": "string", "email": "string", "firstName": "John", "lastName": "Wick", "dateOfBirth": "2019-08-24", "gender": "MALE", "contact": { "phone": "string", "street": "string", "streetNumber": "string", "zipCode": "string", "city": "string", "state": "string", "country": "DE" }, "membership": { "membershipId": "string", "agreementNumber": "string", "membershipType": "BASIC", "membershipSubType": "string", "endOfContract": "2019-08-24", "startOfContract": "2019-08-24", "referringMemberId": "string", "barcode": "string", "verificationTAN": "string", "corporateFitness": { … } } }