Go back to list

Introduction

PerfectGym system is growing very fast. We are developing new features on a daily basis, adapting to new markets and covering more and more business models. To reduce maintenance costs and provide Clubs with a more stable PGM system version with a significant number of usable endpoints, we've decided to turn off the API v1. 

We have introduced API v2 in 2021, which offers improved speed and flexibility. A majority of our clients have already migrated to it, and we highly encourage you to join them. Read more

API v1 is being phased out. This means we are no longer developing it and you cannot build new integrations based on API v1. You have until October 1, 2023 to migrate

What it means for developers supporting my club? 

We recommend to review your integration and make sure that you don't make any calls to API v1.  If this is the case, development work on your side may be required. 

What I need to do before 1st of October? 

Verify your API usage in case of endpoints from API v1. All endpoints, which doesn't have in the title '/v2/' are using API v1 and should be migrated to the APIv2 endpoints. 

What will happen after 1st of October? 

API v1 will be decommissioned and you won't be able to use it. 

If I don't  make any changes what will happen? 

Your integration and custom apps build based on PG API v1 may stop working properly. It could include a group class timetable on your website, an online joining form, custom mobile app or synchronization with external systems. If you use Perfect Gym Client Portal or Perfect Gym Go app, those solutions are unaffected.

Before you start 

Please verify your API usage in case of endpoints from API v1. All endpoints, which doesn't have in the title '/v2.1/' are using API v1 and should be migrated to the APIv2 endpoints. 

Example

API v1 endpoint looks like - Classes/UserClasses

API v2 endpoint looks like - /v2.1/odata/Classes

List of API v1 endpoints reflected in the API v2

Below, you will find the reflection of the endpoints with links to the detailed documentation.  

API v1 Endpoint API v2 Endpoint Comments
Classes/ClassesTypes /v2.1/odata/ClassTypes  
Classes/Classes /v2.1/odata/Classes  
Classes/UserPresence /v2.1/ClassBooking/SetMembersPresenceOnClass available in version R88 and higher
Classes/Categories /v2.1/odata/ClassCategories  
Classes/UserClasses /v2.1/odata/ClassBookings  
Classes/UserClass /v2.1/odata/ClassBookings  
Classes/BookClass /v2.1/ClassBooking/BookClass  
Classes/AvailableSeatNumbers /v2.1/odata/ClassTypeAppAvailabilities  
Classes/CancelBooking /v2.1/ClassBooking/CancelClassBooking  
Classes/BookClass/PersonalTraining /v2.1/PersonalTrainings/BookPersonalTraining  
Classes/RateClass /v2.1/Ratings/RateClass  
Classes/RateInstructor v2/Ratings/RateClass  
Classes/WhoIsIn /v2.1/odata/ClassBookings  
Clubs/Club /v2.1/odata/Clubs  
Clubs/WhoIsIn /v2.1/odata/MemberClubVisits  
Instructors/Instructors /v2.1/odata/Instructors  
Instructors/Instructor/Available /v2.1/odata/EmployeeAvailabilitySlots  
Instructors/Instructor/Sheduler /v2.1/odata/PersonalTrainingBookings  
Memberships/Memberships /v2.1/odata/MembershipRules  
Memberships/Membership /v2.1/odata/MembershipTypes  
PaymentPlans/PaymentPlans /v2.1/odata/PaymentPlans  
PaymentPlans/ProrataCalculation /v2.1/Contracts/CalculateProrata  
PaymentPlans/PaymentPlan /v2.1/odata/PaymentPlans  
Discounts/Discounts /v2.1/odata/ContractDiscountDefinitions  
Discounts/DiscountedFees /v2.1/Contracts/SimulateNewContract  
Contracts/Contracts /v2.1/odata/Contracts  
Contracts/Contract /v2.1/odata/Contracts  
Contracts/Contract/Fees /v2.1/odata/ContractCharges also: /v2.1/odata/ContractPayments
Contracts/FreezeReasons /v2.1/odata/FreezeReasons  
Contracts/FreezeTypes /v2.1/odata/FreezeTypes  
Contracts/FreezeType /v2.1/odata/FreezeTypes  
Contracts/Freeze /v2.1/Contracts/Freeze  
Users/Users /v2.1/odata/Members  
Users/User /v2.1/odata/Members  
Users/Search /v2.1/odata/Members  
Users/User [POST] /v2.1/Members/AddContractMember also: /v2.1/Members/AddGuestMember
Users/User [PUT] /v2.1/Members/UpdateMemberDetails  
Users/Photo /v2.1/Members/SetPhoto  
Users/UserContract /v2.1/Members/AddContractMember  
Users/Contract /v2.1/Contracts/AddContract  
Users/Contract [DELETE] /v2.1/Contracts/Delete  
Users/SignContract /v2.1/Contracts/SignContractDocument  
Users/CreditCard /v2.1/CreditCards/InitExternalCreditCardRegistration  
Users/DirectDebit /v2.1/MemberPaymentSource/AddDirectDebitPaymentMethod  
Users/Agreements /v2.1/MemberAgreements/Set  
Users/AgreementType /v2.1/odata/MemberAgreementTypes  
Users/UserProducts /v2.1/odata/MemberProducts  
Users/MembershipCards /v2.1/odata/MemberCards  
Users/MembershipCard [POST] /v2.1/MemberCards/AssignCard  
Users/DetachMembershipCard /v2.1/MemberCards/DetachCard  
Users/FriendStatus /v2.1/odata/MemberRelations  
Users/Friends /v2.1/odata/MemberRelations  
Users/SignUp /v2.1/Members/AddContractMember also: /v2.1/Members/AddGuestMember
Users/ResetPassword

/v2.1/Members/ResetPassword 

/v2.1/MemberAuth/GenerateResetPasswordToken

 
Users/SendEmailToResetPassword /v2.1/MemberAuth/SendResetPasswordLink  
Users/Search /v2.1/Members/Search  
Users/ValidateCredentials /v2.1/MemberAuth/VerifyMemberCredentials

also /v2.1/MemberAuth/VerifyCredentials

Users/ClubVisits /v2.1/odata/MemberClubVisits  
Users/ClubVisits/All /v2.1/odata/MemberClubVisits  
Documents/Documents /v2.1/odata/MemberFiles  
Payments/ContractFees /v2.1/odata/ContractCharges also: /v2.1/odata/ContractPayments
Payments/ManualContractPayment /v2.1/Transactions/AddContractPayment  
Payments/ExternalSystemCreditCardPayment /v2.1/CreditCards/PayWithRedirect  
Payments/PayWithCreditCard /v2.1/CreditCards/PayWithCreditCard  
Payments/Prepaid /v2.1/Payments/PrepaidTopup available from version R88
Payments/Prepaid/Bonus /v2.1/odata/CashlessBonusStages  
Payments/PaymentStatus /v2.1/ClientPortal/GetPaymentStatus also: /v2.1/odata/OnlineGateTransactions
Products/Products /v2.1/odata/Products  
Products/CategoryTypes /v2.1/odata/ProductCategories  
Products/Product/Buy /v2.1/Products/AddPosPurchaseTransaction  
Products/Product/Use /v2.1/Products/Use  
Crm/Lead /v2.1/Crm2/AddLead also: /v2.1/Crm/AddLead
Crm/Lead/Sources /v2.1/odata/CrmLeadSources  
Crm/Lead/Agreements /v2.1/odata/MemberAgreementTypes  
Geo/Cities /v2.1/odata/Cities  
Geo/Countries /v2.1/odata/Countries  
ics /v2.1/Files/GetCalendarFileDownloadUrl also: /v2.1/Files/GetCalendarFile

Hints

Not every endpoint in API v2 works exactly as the respective endpoint in API v1. Contact Perfect Gym Support Team if you have trouble performing some operations using API v2 that you could do in the API v1.

Help us improve the Knowledge Base experience and rate this article!
0
No votes have been submitted yet.
Loading...