Sandbox
Getting Started
Gympass provides a secure and zero-cost environment to check and validate all possible responses from the Access Control API.
Here you can simulate all the Access control API responses using the URL model and the response codes table below.
- The response codes table includes one gympass_id associated with each one of the code responses.
- Substitute the gympass_id variable in the payload to see all the return responses you can simulate.
Credentials
URL:
https://sandbox.partners.gympass.com/access/v1/validate
Authorization: Bearer Token:
testkey
X-Gym-Id:
1234
POST - Access validate
Example1curl -X POST \2 https://sandbox.partners.gympass.com/access/v1/validate \3 -H 'Content-Type: application/json' \4 -H 'Authorization: testkey' \5 -H 'X-Gym-Id: 1234' \6 -d '{7 "gympass_id": "1234321567890"8}'
Response
Example HTTP 200 ok12{3 "metadata": {4 "total": 1,5 "errors": 06 },7 "results":8 {9 "user": {10 "gympass_id": "1234321567890"11 },12 "gym": {13 "id": 12,14 "product": {15 "id": 1234,16 "description": "swimming pool"17 }18 },19 "validated_at": "2020-02-28T23:01:51Z"20 }21}
Please note: The response for 404 and 400 will return an Array of Error Objects as opposed to the 200 response.
gympass_id | HTTP Status | Result |
---|---|---|
1234321567890 | 200 ok | { "metadata": {"total": 1, "errors": 0 }, "results":{ "user": {"gympass_id": "1234321567890" }, "gym": { "id": 12, "product": { "id": 1234, "description": "swimming pool" }}, "validated_at": "2020-02-28T23:01:51Z" } } |
111111111111111 | 404 Not Found | {"metadata": { "total": 0, "errors": 1},"errors": [{ "message": "Check-In not found in database", "key": "checkin.validation.notfound" }] } |
1234321567894 | 400 Bad Request | {"metadata": { "total": 0, "errors": 1},"errors": [{ "message": "Check-In canceled", "key": "checkin.validation.canceled" }] } |
1234321567887 | 400 Bad Request | {"metadata": { "total": 0, "errors": 1 },"errors": [{ "message": "Check-In expired", "key": "checkin.validation.expired" }] } |
1231234321566 | 400 Bad Request | {"metadata": { "total": 0, "errors": 1},"errors": [{ "message": "Check-In already validated", "key": "checkin.already.validated" }] } |