Register a guest on Gympass
Purpose: The purpose of this API is to register your guests on external providers like Gympass.
You must provide the unique identifier of the external service provider in provider_id. The API will then register the guest on Gympass.
Before you begin
- You need a valid API key or access token. See Set up API authentication.
Permission: Manage API Keys (on the Administrator security object) — Required to access Zenoti APIs.
Endpoint
POST /v1/registrations
Base URL: https://api.zenoti.com
Request
Headers
| Header | Required | Description |
|---|---|---|
| Authorization | Yes | bearer {{access_token}} |
Query parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| provider_id | string | No | — | Name of the external service provider. In this case, it is Gympass. |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
| provider_registration_id | string | No | Unique registration id for the guest with the external service provider. |
| account_name | string | No | Name of the account as stored with the external service provider. |
| center_id | string | No | Unique identifier of the center. (As stored with the external provider) |
| schedule_id | string | No | Session to which the guest is registering. (As stored with the external provider). |
| user | object | No | Details of the guest who is registering with Gympass. |
Response
Success (201 Created)
{}
Example
curl --request POST \
--url 'https://api.zenoti.com/v1/registrations' \
--header 'Authorization: bearer {{access_token}}' \
--header 'Content-Type: application/json' \
--data '{
"provider_registration_id": "string",
"account_name": "string",
"center_id": "string",
"schedule_id": "string",
"user": {}
}'
const response = await fetch('https://api.zenoti.com/v1/registrations', {
method: 'POST',
headers: {
'Authorization': 'bearer {{access_token}}',
'Content-Type': 'application/json'
},
body: JSON.stringify({
provider_registration_id: 'string',
account_name: 'string',
center_id: 'string',
schedule_id: 'string',
user: {}
})
});
const data = await response.json();
import requests
response = requests.post(
'https://api.zenoti.com/v1/registrations',
headers={
'Authorization': 'bearer {{access_token}}',
},
json={'provider_registration_id': 'string', 'account_name': 'string', 'center_id': 'string', 'schedule_id': 'string', 'user': {}}
)
data = response.json()
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "bearer {{access_token}}");
var content = new StringContent(
JsonSerializer.Serialize(new {
provider_registration_id = "string",
account_name = "string",
center_id = "string",
schedule_id = "string",
user = new { }
}),
Encoding.UTF8, "application/json");
var response = await client.PostAsync(
"https://api.zenoti.com/v1/registrations", content);
var data = await response.Content.ReadAsStringAsync();
require 'net/http'
require 'json'
uri = URI('https://api.zenoti.com/v1/registrations')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri)
request['Authorization'] = 'bearer {{access_token}}'
request['Content-Type'] = 'application/json'
request.body = { provider_registration_id: 'string', account_name: 'string', center_id: 'string', schedule_id: 'string', user: {} }.to_json
response = http.request(request)
data = JSON.parse(response.body)
Error codes
| Status | Description |
|---|---|
| 400 | 400 |
| 401 | Unauthorized -- invalid or expired access token |
| 429 | Too many requests -- rate limit exceeded |