Snapshot API Guide
Overview
This document describes the Livescore API endpoints for managing customer packages and triggering snapshot requests.
Base URL: https://engage-api.lsports.eu/api/livescore
Endpoints
1. Trigger Snapshot
Triggers a snapshot request for a livescore package. Sends a snapshot event to the messaging system for processing.
This endpoint publishes all upcoming fixtures (not yet started) to your Fixtures Queue.
Endpoint
POST https://engage-api.lsports.eu/api/livescore/snapshots/triggerRequest Body
{
"packageId": 123,
"username": "[email protected]",
"password": "password123"
}Responses
|| Status Code || Description || | 200 | Success | | 400 | Validation Error | | 500 | Server Error |
Success Response (200 OK)
Validation Error (400 Bad Request)
Possible Validation Errors:
"PackageId must be a positive integer"
"Username is required"
"Password is required"
"Invalid package credentials"
Server Error (500 Internal Server Error)
cURL Example
2. Activate Package
Activates a livescore package. Validates credentials and updates the package status to active in the database.
Endpoint
Request Body
Responses
|| Status Code || Description || | 200 | Success | | 400 | Validation Error | | 500 | Server Error |
Success Response (200 OK)
If the package is already active, the API returns success with the message "Package is already active"
Validation Error (400 Bad Request)
Possible Validation Errors:
"PackageId must be a positive integer"
"Username is required"
"Password is required"
"Invalid package credentials"
Server Error (500 Internal Server Error)
cURL Example
3. Deactivate Package
Deactivates a livescore package. Validates credentials and updates the package status to inactive in the database.
Endpoint
Request Body
Responses
|| Status Code || Description || | 200 | Success | | 400 | Validation Error | | 500 | Server Error |
Success Response (200 OK)
If the package is already inactive, the API returns success with the message "Package is already inactive"
Validation Error (400 Bad Request)
Possible Validation Errors:
"PackageId must be a positive integer"
"Username is required"
"Password is required"
"Invalid package credentials"
Server Error (500 Internal Server Error)
cURL Example
4. Get Package Status
Retrieves the current status of a livescore package without modifying it. Returns whether the package is active or inactive.
Endpoint
Request Body
Responses
|| Status Code || Description || | 200 | Success | | 400 | Validation Error | | 500 | Server Error |
Success Response (200 OK)
Note: The status field can be either "active" or "inactive"
Validation Error (400 Bad Request)
Possible Validation Errors:
"PackageId must be a positive integer"
"Username is required"
"Password is required"
"Invalid package credentials"
Server Error (500 Internal Server Error)
cURL Example
Authentication
All endpoints require authentication via the username and password fields in the request body. The credentials are validated against the stored package credentials in the database.
Error Handling
Validation Errors (400)
Returned when:
Required fields are missing or invalid
Package credentials don't match
Package doesn't exist
Server Errors (500)
Returned when:
Database connection fails
External API calls fail
Unexpected server-side errors occur
Last updated
Was this helpful?