POST /api/door-access/
Base URL
https://api.oloidpreview.com
orProduction domains
Authentication
This API requires an API key for authentication. Include your API key in the header of each request:
- QR Code Data (
qrData): The data encoded in the QR code, typically a string. - Door ID (
doorId): The unique identifier for the door that needs to be unlocked. - Client Token (
clientToken): A token to verify the request’s and client’s authenticity.
- status (
string): Indicates the result of the request, such asSuccessorFailure. - message (
string): Provides additional information about the result, e.g., “Door opened successfully” or “Invalid QR code”.
- 400 Bad Request: Missing or invalid input data.
- 401 Unauthorized: Invalid or missing API key.
- 403 Forbidden: The authentication token is invalid or expired.
- 404 Not Found: The specified Door ID does not exist.
- 500 Internal Server Error: Unexpected server error.
Integration Steps
- Authentication: Ensure your system is capable of securely storing and transmitting the API key.
- QR Code Reading: Implement functionality in your QR code reader to capture and encode the QR data.
- API Invocation: Use the captured QR data, along with the Door ID and authentication token, to make a POST request to the API endpoint.
- Response Handling: Based on the API response, take the appropriate action (e.g., unlock the door, display an error message).
Security Considerations
- Always use HTTPS to encrypt data in transit.
- Store the API key and authentication tokens securely.
- Register Clients for endpoint security
- Validate the QR code data before sending it to prevent injection attacks.