Set Up Guide
Introduction
This guide will help you configure your environment for integrating with the Check In Service API. This API facilitates the transfer of check-in and check-out information to CLC while providing robust security and reliability. Follow these steps to set up your development and production environments effectively.
Prerequisites
Before you begin, ensure you have:
- API Key: Obtain your
X-Api-Keyfrom the administrator. - Base URLs:
- Mock Server URL:
https://c3a1ba49-c2e4-4e2f-829e-1195823e9d09.mock.pstmn.io - Production URL: (provided during production setup)
- Mock Server URL:
- An HTTP client or tool like Postman, cURL, or a supported SDK in your programming language.
- Basic understanding of RESTful APIs, JSON, and authentication headers.
Step 1: Configure Your Development Environment
Set Up Access to the Mock Server
- Use the following URL for testing and simulating API requests:
https://c3a1ba49-c2e4-4e2f-829e-1195823e9d09.mock.pstmn.io
- Use the following URL for testing and simulating API requests:
Store Your API Key Securely
- Your
X-Api-Keymust be included in all requests. - Example for cURL:
curl -X POST https://c3a1ba49-c2e4-4e2f-829e-1195823e9d09.mock.pstmn.io/api/v1/card/authorize \ -H "X-Api-Key: your-api-key-here" \ -H "Content-Type: application/json" \ -d '{"membershipId": "123456789"}'
- Your
Install Required Tools
- Install a library for HTTP requests (e.g.,
requestsfor Python oraxiosfor Node.js).
- Install a library for HTTP requests (e.g.,
Test Your Connection
Verify connectivity by calling the
GET /api/v1/reservation/status/{requestId}endpoint with a validrequestId:curl -X GET https://c3a1ba49-c2e4-4e2f-829e-1195823e9d09.mock.pstmn.io/api/v1/reservation/status/bb8350fc-dce1-41a1-91b1-91b0d64b5eeb \ -H "X-Api-Key: your-api-key-here"Expected response:
{ "authId": 177317191, "authStatus": "checked_in", "employeeIdentifier": "123456789" }
Step 2: Set Up Your Production Environment
Switch to Production URL
- Update the base URL to the production environment provided by the administrator.
https://api.yourcompany.com
- Update the base URL to the production environment provided by the administrator.
Use Separate API Keys
- Use a distinct production
X-Api-Keyto ensure secure access.
- Use a distinct production
Test Production Access
Start by verifying the status endpoint in production:
curl -X GET https://api.yourcompany.com/api/v1/reservation/status/{requestId} \ -H "X-Api-Key: your-production-api-key"Ensure the response matches expectations before deploying live requests.
Step 3: Handle Tokenised Linking Between Requests
Card Authorisation (
/api/v1/card/authorize)- Authorise the customer’s membership card and retrieve an
authId:{ "authId": 177317191, "authStatus": "authorized", "employeeIdentifier": "123456789" }
- Authorise the customer’s membership card and retrieve an
Check-In (
/api/v1/reservation/checkin)- Use the
authIdfrom the authorisation step to check in a guest:{ "authId": 177317191, "authStatus": "checked_in", "employeeIdentifier": "1234345", "supplierReservationId": "1234", "checkInDateTime": "2024-10-17T14:30:00-05:00", "roomNumber": "204", "folioNumber": "204", "guestFirstName": "Ada", "guestLastName": "Lovelace" }
- Use the
Check-Out (
/api/v1/reservation/checkout)- Use the same
authIdto check out the guest and provide stay details:{ "authId": 177317191, "authStatus": "checked_out", "employeeIdentifier": "1234345", "supplierReservationId": "1234", "checkOutDateTime": "2025-10-17T14:30:00-05:00", "roomNumber": "204", "folioNumber": "204", "guestFullName": "Ada Lovelace", "checkInDateTime": "2024-10-17T14:30:00-05:00" }
- Use the same
Best Practices
- Use Environment Variables: Store URLs and API keys securely as environment variables.
- Log All Requests and Responses: Maintain a clear audit trail.
- Validate All Inputs: Ensure payloads conform to the schema specified in the API Reference.
Troubleshooting
- 400 Bad Request: Verify your payload against the schema.
- 404 Not Found: Ensure your
requestIdorauthIdexists. - 500 Internal Server Error: Contact support if this persists.
For detailed endpoint information, visit the API Reference.