Customers 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.

POST https://engage-api.lsports.eu/api/livescore/snapshots/trigger

Request body

{
  "packageId": 123,
  "username": "[email protected]",
  "password": "password123"
}

Success (200)

Validation Error (400)

Possible validation errors:

  • "PackageId must be a positive integer"

  • "Username is required"

  • "Password is required"

  • "Invalid package credentials"

Server Error (500)

cURL


2. Activate Package

Activates a livescore package. Validates credentials and updates the package status to active in the database.

If the package is already active, the API returns success with the message "Package is already active".

Request body

Success (200)

Validation Error (400)

Possible validation errors:

  • "PackageId must be a positive integer"

  • "Username is required"

  • "Password is required"

  • "Invalid package credentials"

Server Error (500)

cURL


3. Deactivate Package

Deactivates a livescore package. Validates credentials and updates the package status to inactive in the database.

If the package is already inactive, the API returns success with the message "Package is already inactive".

Request body

Success (200)

Validation Error (400)

Server Error (500)

cURL


4. Get Package Status

Retrieves the current status of a livescore package without modifying it. Returns whether the package is active or inactive.

Request body

Success (200)

The status field can be either "active" or "inactive".

Validation Error (400)

Server Error (500)

cURL


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?