Skip to content
Last updated

Product Booking

This guide explains how to manage EGYM products (like Smart Strength, EGYM+) for members using the MMS API V2.

Introduction

Product booking allows you to assign specific EGYM services to a member's account. This includes:

  • Smart Strength: Access to EGYM Smart Strength machines.
  • EGYM+: Access to advanced training methods and programs.

Workflow

The typical workflow for managing products is:

  1. Retrieve available products to see what can be assigned.
  2. Activate a product for a specific member.
  3. Check active products to verify assignments.
  4. Deactivate a product when it's no longer needed.

1. Retrieve Available Products

First, retrieve the list of products available in your gym. This will give you the productId needed for assignment.

curl -i -X GET \
  https://one-mms-service.ext-1.test.co.egym.coffee/api/v2/products \
  -H 'x-api-key: YOUR_API_KEY_HERE'

2. Activate a Product

To assign a product to a member, use the PUT endpoint. You need to specify the productId, startDate, and optionally an endDate.

curl -i -X PUT \
  'https://one-mms-service.ext-1.test.co.egym.coffee/api/v2/accounts/{accountId}/products' \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: YOUR_API_KEY_HERE' \
  -d '{
    "productId": "smart_strength",
    "startDate": "2024-01-01",
    "endDate": "2024-12-31"
  }'

Note:

  • startDate can be today or a future date.
  • endDate is optional but recommended for fixed-term contracts.
  • endDate max value is 2050-12-31

3. List User Products

To see which products are currently active for a member, use the GET endpoint.

curl -i -X GET \
  'https://one-mms-service.ext-1.test.co.egym.coffee/api/v2/accounts/{accountId}/products' \
  -H 'x-api-key: YOUR_API_KEY_HERE'

4. Deactivate a Product

To cancel or remove a product from a member's account, use the DELETE endpoint.

curl -i -X DELETE \
  'https://one-mms-service.ext-1.test.co.egym.coffee/api/v2/accounts/{accountId}/products/{productId}' \
  -H 'x-api-key: YOUR_API_KEY_HERE'