Skip to content

PerfectGym Next API (1.10.0)

  • Appointment, bookable appointment and slots operations
  • Redeem checkin vouchers
  • Class and slots operations
  • Cross studio operations
  • Get customers and contracts
  • Retrieve customer accounting details
  • Retrieve customer communication details
  • Get device information
  • Employee operations
  • Debt collection operations
  • Leads operations
  • Manage membership contracts
  • Membership operations
  • Payment operations
  • Get studio information
  • Get trial offers information
Download OpenAPI description
Languages
Servers
Demo tenant

https://open-api-demo.open-api.perfectgym.com/

Mock server

https://redocly.sportalliance.com/_mock/apis/perfectgym/openapi/openapi/

Appointments

Appointment, bookable appointment and slots operations

Operations

Checkin vouchers

Redeem checkin vouchers

Operations
Operations

Cross Studio

Cross studio operations

Operations

Customers

Get customers and contracts

Operations

Customers Account

Retrieve customer accounting details

Operations

Get customer's account balance data

Request

Required Scopes: CUSTOMER_ACCOUNT_READ

Returns customer's current account balance data

Security
ApiKeyAuth
Path
customerIdinteger(int64)required

Unique ID of the customer

curl -i -X GET \
  'https://open-api-demo.open-api.perfectgym.com/v1/customers/{customerId}/account/balances' \
  -H 'X-API-KEY: YOUR_API_KEY_HERE'

Responses

OK

Bodyapplication/json
accountBalanceobject(Money)

Represents a financial data

consumptionCreditobject(Money)

Represents a financial data

dunningLevelstring

The dunning level of the customer

Example: "Dunning Level 1"
inDebtCollectionbooleanrequired

Whether the customers open debt claims where transferred to a debt collection agency

Response
application/json
{ "accountBalance": { "amount": 20, "currency": "EUR" }, "consumptionCredit": { "amount": 20, "currency": "EUR" }, "dunningLevel": "Dunning Level 1", "inDebtCollection": true }

Get customer's account past transactions in slices

Request

Required Scopes: CUSTOMER_ACCOUNT_READ

Returns customer's account transaction data for the past excluding today

Security
ApiKeyAuth
Path
customerIdinteger(int64)required

Unique ID of the customer

Query
sliceSizeinteger(int32)[ 1 .. 50 ]

Desired size of data chunk

Default 10
offsetstring

Offset from last request

Default "0"
curl -i -X GET \
  'https://open-api-demo.open-api.perfectgym.com/v1/customers/{customerId}/account/transactions?sliceSize=10&offset=0' \
  -H 'X-API-KEY: YOUR_API_KEY_HERE'

Responses

OK

Bodyapplication/json
resultArray of objects(BookingEntry)required

List of booking entries

result[].​idinteger(int64)required

The internal id of the entry

result[].​dueDatestring(date)required

Date to booking is/was to be paid

result[].​descriptionstring

Description of the booking

result[].​amountobject(Money)

Represents a financial data

result[].​openAmountobject(Money)

Represents a financial data

result[].​installmentPlanbooleanrequired

Whether or not the booking was transferred into an installment plan

hasNextbooleanrequired

True if there exists next data slice

Example: true
offsetstringrequired

Offset for next query

Example: "1234567890"
Response
application/json
{ "result": [ {} ], "hasNext": true, "offset": "1234567890" }

Get customer's account upcoming transactions in slices within the next year

Request

Required Scopes: CUSTOMER_ACCOUNT_READ

Returns customer's account upcoming transaction data including today

Security
ApiKeyAuth
Path
customerIdinteger(int64)required

Unique ID of the customer

Query
sliceSizeinteger(int32)[ 1 .. 50 ]

Desired size of data chunk

Default 10
offsetstring

Offset from last request

Default "0"
curl -i -X GET \
  'https://open-api-demo.open-api.perfectgym.com/v1/customers/{customerId}/account/transactions/upcoming?sliceSize=10&offset=0' \
  -H 'X-API-KEY: YOUR_API_KEY_HERE'

Responses

OK

Bodyapplication/json
resultArray of objects(BookingEntry)required

List of booking entries

result[].​idinteger(int64)required

The internal id of the entry

result[].​dueDatestring(date)required

Date to booking is/was to be paid

result[].​descriptionstring

Description of the booking

result[].​amountobject(Money)

Represents a financial data

result[].​openAmountobject(Money)

Represents a financial data

result[].​installmentPlanbooleanrequired

Whether or not the booking was transferred into an installment plan

hasNextbooleanrequired

True if there exists next data slice

Example: true
offsetstringrequired

Offset for next query

Example: "1234567890"
Response
application/json
{ "result": [ {} ], "hasNext": true, "offset": "1234567890" }

Request

Required Scopes: PAYMENT_WRITE

Request to book a payment for a specific customer. This endpoint is used to process payments associated with a member's account.

Security
ApiKeyAuth
Path
customerIdinteger(int64)required

Unique ID of the customer

Bodyapplication/jsonrequired
paymentRequestTokenstringrequired

Payment Request Token obtained by initializing the Universal Payment Component with a User Payment Session created via the OpenAPI. The token must belong to the same customer for whom the OpenAPI user is posting the payment. If the customer does not match the customer scope of the User Payment Session, an error is returned.

amountobject(Money)required

Total monetary amount to be paid, including currency information.

amount.​amountnumberrequired

Amount of the finance data tuple

Example: 20
amount.​currencystring(ISO 4217)required

Currency of the finance data tuple

Example: "EUR"
debtClaimIdsArray of integers(int64)

List of debt claim IDs that will be settled as part of this payment.

curl -i -X POST \
  'https://open-api-demo.open-api.perfectgym.com/v1/customers/{customerId}/account/payment' \
  -H 'Content-Type: application/json' \
  -H 'X-API-KEY: YOUR_API_KEY_HERE' \
  -d '{
    "paymentRequestToken": "string",
    "amount": {
      "amount": 20,
      "currency": "EUR"
    },
    "debtClaimIds": [
      0
    ]
  }'

Responses

OK

Bodyapplication/json
object(BookCustomerPaymentResponse)

Response to book a payment for a specific customer.

Response
application/json
{}

Update payment instrument of a customer

Request

Required Scopes: PAYMENT_WRITE

Update a payment instrument for a specific customer.

Security
ApiKeyAuth
Path
customerIdinteger(int64)required

Unique ID of the customer

Bodyapplication/jsonrequired
paymentRequestTokenstringrequired

Payment Request Token obtained by initializing the Universal Payment Component with a User Payment Session created via the OpenAPI. The token must belong to the same customer for whom the OpenAPI user is posting the payment. If the customer does not match the customer scope of the User Payment Session, an error is returned.

curl -i -X POST \
  'https://open-api-demo.open-api.perfectgym.com/v1/customers/{customerId}/account/payment-instrument' \
  -H 'Content-Type: application/json' \
  -H 'X-API-KEY: YOUR_API_KEY_HERE' \
  -d '{
    "paymentRequestToken": "string"
  }'

Responses

OK

Bodyapplication/json
object(UpdateCustomerPaymentInstrumentResponseDto)

Update customer payment instrument response.

Response
application/json
{}

Customers Communication

Retrieve customer communication details

Operations
Operations
Operations
Operations
Operations
Operations

Membership Self-service

Manage membership contracts

Operations
Operations
Operations
Operations

Trial Offers

Get trial offers information

Operations