API – Getting Started Guide
API – Getting Started Guide
Objective
This guide gives you the essential steps to begin consuming data from the KSI API.
You will learn how to generate an authentication token, how to send authenticated requests, and how to access key endpoints such as traffic indicators, queue metrics, and store groups.
Requirements
Before making any API requests, ensure you have:
- A valid user account in the KSI platform
- Permission to generate API tokens
- Access to the API documentation
👉 API Documentation:
- https://app.ksivision.com/api/docs (general)
- https://la.ksivision.com/api/docs (LATAM)
- https://eu.ksivision.com/api/docs (Europe)
1. Generate Your API Token
To authenticate with the KSI API, you must generate a Bearer token.
Follow these steps:
- Go to “My Profile” in the KSI platform
- Select “Generate new token”
- Copy the token and store it securely
Your token should be included in the HTTP header of every request.
Example Authentication Header
Authorization: Bearer <your_token_here>
If the header is missing or invalid, the API will return an authentication error.
2. Example API Endpoints
Below are examples of commonly used API routes.
Get Store Groups (locations_groups)
Returns the list of store groups available to your account.
GEThttps://app.ksivision.com/api/locations_groups
Traffic Indicators
Retrieves traffic KPIs for a specific store group, filtered by time range and bucket size.
GEThttps://app.ksivision.com/api/locations_group/<locations_group_id>/kpis/traffic-total?timeBucket=1%20hour&fromTime=2024-10-01T00:00:00-03:00&toTime=2024-10-01T23:59:59-03:00&isEntrance=true&page=0&size=50
Parameters include:
timeBucket→ aggregation intervalfromTime/toTime→ ISO 8601 timestampsisEntrance→ filter for entrance counterspageandsize→ pagination options
Get Configured Queues
Retrieves queue configurations for a specific store group.
GEThttps://app.ksivision.com/api/locations_group/<locations_group_id>/bot-groups?bot_type=queueManagement
Queue Indicators
Retrieves queue-related KPIs such as wait time, queue length, or service speed.
GEThttps://app.ksivision.com/api/locations_group/<locations_group_id>/kpis/queue-management?timeBucket=1%20minutes&fromTime=2024-09-01T15:00:00-03:00&toTime=2024-09-01T15:05:00-03:00&page=0&size=50
3. Checklist Before Using the API
- You have generated a valid API token
- You confirmed you can access the API documentation
- You tested a simple request (e.g.,
locations_groups) - You validated your time zone and timestamp formats
- You verified pagination requirements (
page,size)
Support
If you need help with API authentication, endpoint usage, or integration troubleshooting:
The KSI support team can assist with technical guidance and best practices.