Base URL: /gatekeeper_api/v2, Version: 2.0.0
The Gatekeeper API using basic authentication to verify 3rd party integration, the username and apikey (password) can be found in your GymMaster Settings > Integrations under the Gatekeeper API section. You need to replace the following curl examples with actual GM_SITE_NAME and API_KEY
Path | Operation | Description |
---|---|---|
/doors | GET |
get current doors settings |
/log_swipe | POST |
Log swipe entry |
/members | GET |
Get members information |
/membershiptypes | GET |
Get membership types |
/swipe | POST |
Process key tag swipe |
/system | GET |
Get the current system settings |
/time | GET |
Get the current time stamp from the server |
This provides all the information about the doors.
Example:
curl -u $GM_SITE_NAME:$API_KEY https://$GM_SITE_NAME.gymmasteronline.com/gatekeeper_api/v2/doors
Uses default content-types: application/json
successful response
{
"doors": [
{
"auto_addtoclass": false,
"booking_checkin": 1,
"check_booking_resources": [],
"checkout": false,
"companyid": 2,
"concessionhandling": 0,
"detect_tailgate": false,
"door_sublocationid": null,
"exit_door_id": null,
"exrlink": false,
"gatekeeperid": 3,
"id": 16,
"last_status_id": null,
"lastupdate": {
"__datetime__": null,
"day": 22,
"hour": 12,
"microsecond": 887514,
"minute": 27,
"month": 2,
"second": 36,
"year": 2018
},
"mac_address": "api",
"name": "Example Door",
"optional_args": null,
"overhead_camera": "None",
"profile_camera": "None",
"reader_type": null,
"record_duration": null,
"resourceid": null,
"restricted_door": false,
"sentry_com_port": null,
"sentry_ip_address": null,
"sentry_mac_address": null,
"showlastvisits": true,
"siteid": 2,
"status": 1,
"swipe_enter_delay": null,
"update_user_name": "exampleuser",
"womenonly": false
}
],
"error": null
}
The doors list
Error message in case of an error
BasicAuth |
This end point logs a swipe visit to the database.
Example:
curl -u $GM_SITE_NAME:$API_KEY -H "Content-Type: application/json" -X POST -d '{"swipe":[{"membershipid": 8296815, "tagserial_short": "Mx9e428c","comment": null, "tagid": 2, "tagserial": "Mx03009e428c29ac", "when": "2019-09-03 18:04:38", "doorid": 113, "access": 1, "memberid": 1987137248, "debug": false}]}' https://$GM_SITE_NAME.gymmasteronline.com/gatekeeper_api/v2/log_swipe
The swipe log entries
Uses default content-types: application/json
successful response
{
"error": null,
"response": 1
}
Number of successfully processed swipe log
Error message in case of an error
BasicAuth |
This end point shows all the members that have got tags as well as the memberships that that the members have, this shows member and membership specific data (e.g. member owing amount, start date, end date, visit count, tag serial). Member's tag number can be assigned by click the get tag button which will try to get the last swipe tag that is not assigned to any member.
Example:
curl -u $GM_SITE_NAME:$API_KEY https://$GM_SITE_NAME.gymmasteronline.com/gatekeeper_api/v2/members
memberid | The specified member's ID for synchronisation, optional, none means all current members. |
query | integer | |
timestamp | The timestamp from the lastsync field of last call to this endpoint, none means full synchronisation |
query | number | |
last_id | The last memberid of the return list from last call to this endpoint, none means the first call to this endpoint. |
query | integer | |
companyid | Filter the members list by company, only members from this company will be returned. |
query | integer |
Uses default content-types: application/json
successful response
{
"lastsync": 1519305582.50599,
"members": [
{
"membership": [
{
"extensions": [],
"memberid": 35,
"tagid": 50024469,
"membershiptypeid": 843,
"cancel_reason": null,
"canceled_at": null,
"priority": 0,
"visit": 30,
"startdate": {
"__date__": null,
"year": 2017,
"month": 10,
"day": 5
},
"enddate": null,
"tagserial_short": "BAR50024469",
"membershipid": 64306,
"incomplete": false,
"tagserial": null,
"expired": false
}
],
"name": "Tic Toe",
"memberid": 35,
"owingdeadline": null,
"siteid": 2,
"bookings": [],
"id": 35,
"stopatgate": false,
"gender": "M",
"company_name": "Site 1 Name",
"dob": "1999-12-31",
"code": "current",
"has_payment_plan": false,
"entryexit": [],
"passcode": null,
"card": [
{
"cardserial": "BAR50024469",
"memberid": 35,
"cardid": 50024469
}
],
"owe": {
"__decimal__": "0.000"
}
}
]
}
The membership types list
The timestamp for this synchronisation, should be used as timestamp parameters next time
Has more members to load?
Error message in case of an error
BasicAuth |
This end point lists all the programmes/membership types that a member can have assigned to them. programmes/membershiptypes provide all the details and limitations for access to doors.
Example:
curl -u $GM_SITE_NAME:$API_KEY https://$GM_SITE_NAME.gymmasteronline.com/gatekeeper_api/v2/membershiptypes
membershiptypeid | The specified membership type ID for synchronisation, optional, none means all membership types. |
query | integer |
Uses default content-types: application/json
successful response
{
"error": null,
"membershiptypes": [
{
"basis": "Club Visit Pack",
"basisid": 3,
"benefitenabled": true,
"concessionlimit": 11,
"door": [
{
"doorid": 1,
"id": 442,
"rosterid": 6215
}
],
"id": 62,
"membershiptypeid": 62,
"multisite": false,
"name": "FOUND - Sunbed Course 10pk",
"priority": 100,
"siteid": 2,
"swipe_cpv": true
}
]
}
The membership types list
Error message in case of an error
BasicAuth |
This end point process key tag swipe in the database, and return the result of the swipe. This differs from /log_swipe as this end point will tell you whether GymMaster thinks you should grant or deny access to the id card. /log_swipe is GymMaster being told whether access was granted.
Example:
curl -u $GM_SITE_NAME:$API_KEY -H "Content-Type: application/json" -X POST -d '{"doorid":1,"cardserial":"Mxce9b2a"}' https://$GM_SITE_NAME.gymmasteronline.com/gatekeeper_api/v2/swipe
The card serial number
Uses default content-types: application/json
successful response
{
"granted": false
}
If the key tag is granted access to the system.
Error message in case of an error, optional.
BasicAuth |
This shows database configuration type data that is system wide (e.g. site independent) this includes open hours of gyms, warning limits, GymMaster version number, etc.
Example:
curl -u $GM_SITE_NAME:$API_KEY https://$GM_SITE_NAME.gymmasteronline.com/gatekeeper_api/v2/system
Uses default content-types: application/json
successful response
BasicAuth |
This endpoint synchronise timing information from the server to store time correction to the local access control system
Example:
curl -u $GM_SITE_NAME:$API_KEY https://$GM_SITE_NAME.gymmasteronline.com/gatekeeper_api/v2/time
Uses default content-types: application/json
successful response
{
"current_date": "2018-02-22",
"current_time": "12:23:40.877828+13",
"dow": 4.0,
"epoch": 1519255420.87783,
"ts": "2018-02-22 12:23:40.877828"
}
BasicAuth |
whether the access should be checked automatically into a booking, 0 false, else true
whether is a checkout only door
the companyid of the door
whether the door counts visits when used
unused
doorid of the exit door
the id of the gatekeeper that controls the door
the id of the door
the last update timestamp for the door record
mac address of associated gatekeeper
door name
override arguments for the door software
type of reader used
ID of the resource associated with the door
whether the door has restricted access
gatekeeper socket for the reader
IP address of network reader
mac address of network reader
Show swipes in the visitor log
the site id of the door
current status of the door
username of last update user
is the door female only.
List of the cards that the member has (is the same as tag)
ID of the cards (is the same as tagid)
Serials of the cards (is the same as the tagserial)
gender of the member, M=Male, F=Female
The date of birth of the member
the ID of the member
The code is a string that represets the status the member has, based on what memberships and holds they have currently. It is updated daily.
If you have a keypad reader, this is their unique passcode to get into the door.
A list of the members' memberships
the membership account
The balance of the member account.
The number of visits the member has made
The start date of the membership
The end date of the membership
Whether the membership is expired
Whether the membership has been completed
The ID of the membership
The ID of the membership type.
The day the balance of the account gets refreshed.
The ID of the tag.
The serial of the tag
The short version of the tag.
The name of the member.
The amount the member owes.
The date that the member has to pay the owing amount by (e.g. is allowed in, even if owing is above the stop threshold, up to the date specified)
The name of the site that the member belongs to. It will match siteid.
The site that the member belongs to. The number represents the club/company that the member belongs to has their home club.
Whether a stop at gate task is active
The membership type basis name
the membership type basis id
whether the membership type is using the benefit system
Specifies a lmit on how many visits are used
specifies a list of doors that the membership type has access to
doorid of the membership type?
the benefit ID
The ID of the membership type.
The ID of the roster associated with the door access times
the membership type id
Specifies if this membership type has multisite access
Name of the membership type
The priority of the membership
The ID of the site the membership belongs to
The ID of door
The ID of keytag
The ID of the member
The ID of the membership that the member is used
When the swipe happen, format YYYY-MM-DD HH:mm:ss
Comment/notes for the check in
Keytag serial number
Keytag serial number (short)
access status code, access=1 if granted, otherwise denied
Is this swipe a checkout instead of check in
The website host for the other clubs, separated by commas
contains the roster defining the hours of the gym
The GymMaster Database Version.
Stop on owe amount. If the member owes over this value than deny them from entering. (w/ currency symbol)
Whether to stop members with incomplete memberships.
warn on owe amount. If the member owes more than this value, warn them at the gate. (w/ currency symbol)
Hour of day
Minute
Second
Microsecond
Current date of the datebase
Current time of the database
Current day of the week
Seconds since the unix epoch
Current timestamp