Introduction
LatePoint API Extension uses an API Keys based authentication system to ensure the security of your data. Each API request must include a valid key to be processed.API Key Generation
Create a New API Key
- Go to LatePoint > API Settings in your WordPress dashboard
- Click “Generate New API Key”
- Assign a descriptive name (e.g., “Mobile App”, “CRM System”)
- Configure the necessary permissions
- Copy and save the generated key securely
Important: The API Key is only shown once. If you lose it, you’ll need to generate a new one.
Permission Configuration
Each API Key can have specific permissions for different resources:Bookings
Bookings
- Read: Query existing bookings
- Create: Create new bookings
- Update: Modify existing bookings
- Delete: Delete bookings
Customers
Customers
- Read: Query customer information
- Create: Register new customers
- Update: Update customer data
- Delete: Delete customers (if they have no bookings)
Agents
Agents
- Read: Query agent list and their schedules
Services
Services
- Read: Query available services and their configurations
Availability
Availability
- Read: Check schedule availability
Using the API Key
Authentication Header
Include your API Key in theX-API-Key
header of each request:
API Key Types
Development Keys (Test)
For development and testing, use keys that start withlp_test_
:
- Only work in development environments
- Limited or simulated data
- More permissive rate limiting
Production Keys (Live)
For production environments, use keys that start withlp_live_
:
- Full access to real data
- Strict rate limiting
- Complete audit logs
Security and Best Practices
Secure Storage
Never hardcode API Keys in your source code. Use environment variables.
Environment Variables
Configure your API Keys as environment variables:.env
Key Rotation
- Generate a new API Key before the current one expires
- Update your application with the new key
- Test that everything works correctly
- Revoke the previous key once the change is confirmed
Monitoring and Logs
LatePoint API Extension automatically logs:- All authenticated requests
- Unauthorized access attempts
- Usage by API Key
- Authentication errors
Rate Limiting
Default Limits
Key Type | Requests per Minute | Requests per Hour |
---|---|---|
Test | 100 | 1,000 |
Live | 60 | 3,600 |
Rate Limiting Headers
Each response includes information about your current usage:Handling Exceeded Limits
When you exceed the limit, you’ll receive a429 Too Many Requests
response:
Authentication Errors
401 Unauthorized
Cause: Missing or invalid API Key- Verify that you include the
X-API-Key
header - Confirm that the API Key is correct
- Make sure the key hasn’t expired
403 Forbidden
Cause: Valid API Key but insufficient permissions- Review your API Key permissions
- Contact the administrator to expand permissions
API Key Management
List Active Keys
In LatePoint > API Settings, you can see:- All generated API Keys
- Creation date and last use
- Assigned permissions
- Status (active/inactive)
Revoke an API Key
- Go to LatePoint > API Settings
- Find the key you want to revoke
- Click “Revoke”
- Confirm the action
Once revoked, the API Key will stop working immediately in all applications that use it.