Appointment, bookable appointment and slots operations
PerfectGym Next API (1.7.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
- Manage membership contracts
- Membership operations
- Payment operations
- Get studio information
- Get trial offers information
https://open-api-demo.open-api.perfectgym.com/
https://redocly.sportalliance.com/_mock/apis/perfectgym/openapi/openapi/
- Demo tenant
https://open-api-demo.open-api.perfectgym.com/v1/debt-collection/configuration
- Mock server
https://redocly.sportalliance.com/_mock/apis/perfectgym/openapi/openapi/v1/debt-collection/configuration
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
https://open-api-demo.open-api.perfectgym.com/v1/debt-collection/configuration \
-H 'X-API-KEY: YOUR_API_KEY_HERE'OK
The client matches a studio or location. The complete element should identify the person or company with its details of address, taxId, contact data and bank account information. An address should be complete, but only fields mandatory for all countries are marked as such
Type of debt collection
| Enum Value | Description |
|---|---|
| TRUST | Claims are transferred, but still managed by the studio. |
| PURCHASE | Claims are transferred and bought by the debt collection agency. |
Debt handling on positive or negative closure of case
| Enum Value | Description |
|---|---|
| BY_PARTNER | Indicates that the partner decides in update if the debt is written off. |
| ALWAYS | Indicates that the debt is always written off. |
{ "client": { "name1": "GYMLAB Hamburg", "name2": "GMBH", "legalForm": "GmbH", "preTaxAttribute": false, "vatSerialNo": "DE 142156559", "postalCode": "1180", "city": "Vienna", "countryCode": "AT", "country": "Australia", "paymentDetails": { … }, "contactDetails": [ … ], "addressLine1": "Burgring 22", "addressLine2": "1180 Vienna", "addressLine3": "Austria", "region": "Vienna", "addressData": { … } }, "debtCollectionType": "TRUST", "derecognizeRemainingDebtsOnClosure": "BY_PARTNER", "derecognizeRemainingDebtsOnRejection": "BY_PARTNER" }
- Demo tenant
https://open-api-demo.open-api.perfectgym.com/v1/debt-collection/{debtCollectionRunId}/debtors
- Mock server
https://redocly.sportalliance.com/_mock/apis/perfectgym/openapi/openapi/v1/debt-collection/{debtCollectionRunId}/debtors
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://open-api-demo.open-api.perfectgym.com/v1/debt-collection/{debtCollectionRunId}/debtors?offset=0&sliceSize=10' \
-H 'X-API-KEY: YOUR_API_KEY_HERE'OK
List of debtors
The LiablePerson is used for members not being responsible themself for payments. The complete element should identify the liable person with its details of address, contact data and bank account information. It includes also country specific elements.
Describes the address in detail, so every country has its own fields filled. Use addressLines for preformatted address.
{ "result": [ { … } ], "hasNext": true, "offset": "1234567890" }
- Demo tenant
https://open-api-demo.open-api.perfectgym.com/v1/debt-collection/{debtCollectionRunId}/details
- Mock server
https://redocly.sportalliance.com/_mock/apis/perfectgym/openapi/openapi/v1/debt-collection/{debtCollectionRunId}/details
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://open-api-demo.open-api.perfectgym.com/v1/debt-collection/{debtCollectionRunId}/details' \
-H 'X-API-KEY: YOUR_API_KEY_HERE'OK
Type of debt collection
| Enum Value | Description |
|---|---|
| TRUST | Claims are transferred, but still managed by the studio. |
| PURCHASE | Claims are transferred and bought by the debt collection agency. |
The client matches a studio or location. The complete element should identify the person or company with its details of address, taxId, contact data and bank account information. An address should be complete, but only fields mandatory for all countries are marked as such
Status of a Transfer
| Enum Value | Description |
|---|---|
| COMPLETED | Processing is done and the Agency has confirmed the retrieval of the Transfer. |
| INTERNAL_PROCESSING | The transfer is currently processed by Magicline. |
| FAILED | At any of the previous stages an error occurred. |
| WAITING_FOR_CONFIRMATION | Processing is done, the Agency should have received a Webhook Notification and should confirm retrieval of the Transfer. |
Origin of debt collection
| Enum Value | Description |
|---|---|
| INDIVIDUAL_HANDOVER | Indicates that the debt was handed over via an individual transfer in the member account. |
| AUTOMATIC_HANDOVER | Indicates that the debt was handed over automatically due to a MemberCash rejection. |
| CONTRACT_CANCELATION | Indicates that the debt was handed over alongside the manual cancellation of a contract. |
| DEBT_COLLECTION_RUN | Indicates that the debt was part of a regular or scheduled debt collection run. |
{ "collectionDate": "1952-05-04", "debtCollectionType": "TRUST", "client": { "name1": "GYMLAB Hamburg", "name2": "GMBH", "legalForm": "GmbH", "preTaxAttribute": false, "vatSerialNo": "DE 142156559", "postalCode": "1180", "city": "Vienna", "countryCode": "AT", "country": "Australia", "paymentDetails": { … }, "contactDetails": [ … ], "addressLine1": "Burgring 22", "addressLine2": "1180 Vienna", "addressLine3": "Austria", "region": "Vienna", "addressData": { … } }, "status": "COMPLETED", "origin": "DEBT_COLLECTION_RUN" }
Debt collection update details
List of debtors with their payments
List of debt collection cases
ID the agency has assigned to this case
Optional customer facing identifier for this case, if there is one that differs from agencyCollectionCaseId and is used in human correspondence.
List of collection case ids which we have created, aggregated for that collection case
Must be set in case the case has been closed, omit this entirely if the case isn't closed.
Debts which were transferred to the agency. At least all changed debts must be included, also unchanged debts can be included.
Debt id from the Transfer, identifying a debt, in UUID format
Transferred amount to debt collection agency. Cancelled amount + paid amount should not be higher than original amount.
Not accepted amount. If the case is closed and writeOffRemainingDebts is set, they will be written off and not opened again.
Paid amount, the status should always contain the amount which was paid to the debt collection agency. If paidAmount is higher than original amount, the loose rest will still be booked to the debtor.
ISO 4217 currency of the debt code
- Demo tenant
https://open-api-demo.open-api.perfectgym.com/v1/debt-collection/update
- Mock server
https://redocly.sportalliance.com/_mock/apis/perfectgym/openapi/openapi/v1/debt-collection/update
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://open-api-demo.open-api.perfectgym.com/v1/debt-collection/update \
-H 'Content-Type: application/json' \
-H 'X-API-KEY: YOUR_API_KEY_HERE' \
-d '{
"debtors": [
{
"debtorId": "2334545",
"agencyCollectionCases": [
{
"agencyCollectionCaseId": "agency-id-123",
"publicCollectionCaseId": "case-john-wayne-1",
"collectionCaseIds": [
"123e4567-e89b-42d3-a456-556642440000"
],
"closure": {
"type": "POSITIVE",
"options": [
{}
],
"date": "2022-09-20",
"rejectionReason": "CLAIMS_ALREADY_IN_COURT",
"closureReason": "Not successful due to mail not successfully delivered"
},
"debts": [
{
"debtId": "123e4567-e89b-42d3-a456-556642440000",
"originalAmount": 100,
"canceledAmount": 0,
"paidAmount": 100,
"currency": "EUR",
"block": {}
}
]
}
],
"block": {
"limitType": "LIMITED",
"endDate": "2022-09-20"
}
}
],
"requestId": "fc336b0b-409c-4c66-a26d-ab25b87dcb8f"
}'Request
Required Scopes: DEBT_COLLECTION_WRITE
After fetching all data (details and debtors) related to a transfer use this endpoint to confirm the retrieval. This will flag the related data in Magicline as retrieved by the Agency. This endpoint should only be called if the status of the transfer is WAITING_FOR_CONFIRMATION (see getTransferDetails)
- Demo tenant
https://open-api-demo.open-api.perfectgym.com/v1/debt-collection/{debtCollectionRunId}/confirmTransfer
- Mock server
https://redocly.sportalliance.com/_mock/apis/perfectgym/openapi/openapi/v1/debt-collection/{debtCollectionRunId}/confirmTransfer
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
'https://open-api-demo.open-api.perfectgym.com/v1/debt-collection/{debtCollectionRunId}/confirmTransfer' \
-H 'X-API-KEY: YOUR_API_KEY_HERE'OK, we received the confirmation. If the transfer was already confirmed (e.g. retransmission) also 200 is returned.
No content- Demo tenant
https://open-api-demo.open-api.perfectgym.com/v1/debt-collection/cases
- Mock server
https://redocly.sportalliance.com/_mock/apis/perfectgym/openapi/openapi/v1/debt-collection/cases
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://open-api-demo.open-api.perfectgym.com/v1/debt-collection/cases?debtorId=string&collectionCaseId=string&agencyCollectionCaseId=string&caseAdjustmentRequestId=0' \
-H 'X-API-KEY: YOUR_API_KEY_HERE'OK
List of debt collection cases
ID the agency has assigned to this case
Optional customer facing identifier for this case, if there is one that differs from agencyCollectionCaseId and is used in human correspondence.
List of collection case ids which we have created, aggregated for that collection case
Must be set in case the case has been closed, omit this entirely if the case isn't closed.
Debts which were transferred to the agency. At least all changed debts must be included, also unchanged debts can be included.
Debt id from the Transfer, identifying a debt, in UUID format
Transferred amount to debt collection agency. Cancelled amount + paid amount should not be higher than original amount.
Not accepted amount. If the case is closed and writeOffRemainingDebts is set, they will be written off and not opened again.
Paid amount, the status should always contain the amount which was paid to the debt collection agency. If paidAmount is higher than original amount, the loose rest will still be booked to the debtor.
ISO 4217 currency of the debt code
Option to block the debtor for future collection cases. If no block is sent an existing block will be removed.
[ { "debtorId": "2334545", "agencyCollectionCases": [ … ], "block": { … } } ]
- Demo tenant
https://open-api-demo.open-api.perfectgym.com/v1/debt-collection/blocked/debtors
- Mock server
https://redocly.sportalliance.com/_mock/apis/perfectgym/openapi/openapi/v1/debt-collection/blocked/debtors
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://open-api-demo.open-api.perfectgym.com/v1/debt-collection/blocked/debtors?debtorId=string&offset=0&sliceSize=10' \
-H 'X-API-KEY: YOUR_API_KEY_HERE'{ "result": [ { … } ], "hasNext": true, "offset": "1234567890" }
- Demo tenant
https://open-api-demo.open-api.perfectgym.com/v1/debt-collection/blocked/debts
- Mock server
https://redocly.sportalliance.com/_mock/apis/perfectgym/openapi/openapi/v1/debt-collection/blocked/debts
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://open-api-demo.open-api.perfectgym.com/v1/debt-collection/blocked/debts?debtId=497f6eca-6276-4993-bfeb-53cbbbba6f08&offset=0&sliceSize=10' \
-H 'X-API-KEY: YOUR_API_KEY_HERE'{ "result": [ { … } ], "hasNext": true, "offset": "1234567890" }
Bookings accounting date range start. Must be in past and equal or before the toDate. The maximum time range is 90 days.
Bookings accounting date range end. Must be in past and equal or after the fromDate. The maximum time range is 90 days.
The export format of bookings
| Enum Value | Description |
|---|---|
| SINGLE | Contains all bookings as a single unit |
| AGGREGATED | Bookings are aggregated by account numbers |
The file format of the export
| Enum Value | Description |
|---|---|
| XLSX | Microsoft Excel |
| CSV | Comma Separated Values |
| JSON | JavaScript Object Notation |
- Demo tenant
https://open-api-demo.open-api.perfectgym.com/v1/taxadvisor/exports/create
- Mock server
https://redocly.sportalliance.com/_mock/apis/perfectgym/openapi/openapi/v1/taxadvisor/exports/create
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://open-api-demo.open-api.perfectgym.com/v1/taxadvisor/exports/create \
-H 'Content-Type: application/json' \
-H 'X-API-KEY: YOUR_API_KEY_HERE' \
-d '{
"fromDate": "2020-12-15",
"toDate": "2020-12-30",
"exportFormat": "AGGREGATED",
"exportFileFormat": "JSON",
"exportLocale": "ENGLISH"
}'{ "exportId": 0 }
- Demo tenant
https://open-api-demo.open-api.perfectgym.com/v1/taxadvisor/exports/{exportId}
- Mock server
https://redocly.sportalliance.com/_mock/apis/perfectgym/openapi/openapi/v1/taxadvisor/exports/{exportId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://open-api-demo.open-api.perfectgym.com/v1/taxadvisor/exports/{exportId}' \
-H 'X-API-KEY: YOUR_API_KEY_HERE'OK
The file format of the export
| Enum Value | Description |
|---|---|
| XLSX | Microsoft Excel |
| CSV | Comma Separated Values |
| JSON | JavaScript Object Notation |
The export format of bookings
| Enum Value | Description |
|---|---|
| SINGLE | Contains all bookings as a single unit |
| AGGREGATED | Bookings are aggregated by account numbers |
The locale of the export.
| Enum Value | Description |
|---|---|
| ENGLISH | English |
| GERMAN | German |
{ "fromDate": "2020-12-15", "toDate": "2020-12-30", "exportFileFormat": "JSON", "exportFormat": "AGGREGATED", "exportLocale": "ENGLISH", "downloadUrl": "string" }