For the complete documentation index, see llms.txt. This page is also available as Markdown.

Customers API Guide

Overview

This document describes the Livescore API endpoints for managing customer packages, subscriptions, fixtures, quota usage, and 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": "user@example.com",
  "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


5. Get Subscriptions

Returns the hierarchy subscriptions the package holds, as a flat list. Each item is one subscription you added with subscriptions/add. To see every league those subscriptions cover, use subscriptions/subscribed.

Request body

Success (200)

Each item holds only the ids that apply to it. A sport-level subscription has sportId only; a location-level subscription adds locationId. Items are sorted by sport, then location, then league.

Validation Error (400)

Server Error (500)

cURL


6. Available Subscriptions

Returns the sport / location / league hierarchy the package is allowed to subscribe to but has not yet subscribed to, as a nested tree.

Request body

Success (200)

What is returned:

  • Only leagues the package is allowed to subscribe to. With no package filter this is the whole catalog; with a filter it is limited to the sports, leagues, and tours in that filter.

  • A league already covered by an active subscription (at sport, location, or league level) is excluded — it appears under subscriptions/subscribed instead.

  • Sports or locations with no remaining leagues are omitted.

Validation Error (400)

Server Error (500)

cURL


7. Subscribed Subscriptions

Returns the sport / location / league hierarchy the package is currently subscribed to, as a nested tree. Same request body and response shape as subscriptions/available.

A league is included when the package has an active subscription covering it — a sport-level subscription covers every league in that sport, a location-level subscription covers every league in that location, and a league-level subscription covers that league. Leagues not yet subscribed appear under subscriptions/available instead.

Server Error (500)

cURL


8. Add Subscriptions

Subscribes the package to one or more hierarchy items. Each item is a sport, a location inside a sport, or a league. A league can be sent with only leagueId; sport and location are resolved from that league.

Request body

Item result (200, 207, or 400)

Each result echoes the ids that were sent. Omitted ids are left out of the object.

HTTP status for the batch:

  • 200 — every item is SUCCESS

  • 207 — some items succeeded and some did not

  • 400 with the results body — every item failed

status

Meaning

SUCCESS

Subscribed

MISSING_PARENT_CONTEXT

The item has no ids, or a location was sent without its sport

INVALID_HIERARCHY

The sport, location, or league does not exist, the ids do not belong together, the sport is not supported, or the league is inactive

REDUNDANT_HIERARCHY

Already covered by a subscription at this level or a parent level, including another successful item in the same request

OUTSIDE_PACKAGE_FILTER

The item is outside the package filter. A sport is allowed only when the filter includes that whole sport. A location is allowed only when every active league in it is allowed. A league is allowed when its id or its tour is in the filter

Request rejected (400) — the batch is not processed. There is no results array.

The same shape is returned when the package is missing, is not active, or has no expiration date. The error string is the reason.

cURL


9. Remove Subscriptions

Removes hierarchy subscriptions. The package filter is not applied on remove.

Same request body as subscriptions/add. Same batch HTTP statuses: 200 when every item succeeds, 207 when mixed, 400 with results when every item fails, and 400 { "error": "..." } when the request is rejected before items are processed.

status

Meaning

SUCCESS

The hierarchy subscription was removed, or fixture subscriptions that were added manually under it were revoked

MISSING_PARENT_CONTEXT

The item has no ids, or a location was sent without its sport

INVALID_HIERARCHY

The sport, location, or league does not exist, the ids do not belong together, or the sport is not supported

NOT_SUBSCRIBED

Nothing was subscribed at that hierarchy item


10. Available Fixtures

Returns the fixtures the package can still add with fixtures/add. Results are paged and can be narrowed to a sport, location, or league.

Request body

Field
Required
Description

sportId

No

Return fixtures in this sport only

locationId

No

Return fixtures in this location only. Requires sportId

leagueId

No

Return fixtures in this league only

skip

No

Number of fixtures to skip. Default 0, maximum 10,000

take

No

Number of fixtures to return. Default 100, maximum 500

Values above the maximum are capped at the maximum.

Success (200)

What is returned:

  • Fixtures with livescore coverage in a supported sport.

  • Fixtures that are not in a final status (Finished, Cancelled, Abandoned, or Unknown). In-progress fixtures are included.

  • Fixtures inside the package filter, when the package has one.

  • Fixtures the package is not already subscribed to. Subscribed and pending fixtures appear under fixtures/subscribed instead.

startDate is in UTC. Fixtures are sorted by fixtureId, ascending. To read every page, increase skip by take until a page returns fewer than take fixtures. A sportId that is not supported returns an empty fixtures list.

Validation Error (400)

Possible validation errors:

  • "Invalid package credentials"

  • "hierarchy ids must be positive when provided"

  • "sportId is required when locationId is specified"

Server Error (500)

cURL


11. Subscribed Fixtures

Returns the fixtures the package is subscribed to, including pending ones. This covers fixtures added with fixtures/add and fixtures covered by your hierarchy subscriptions.

Request body

Success (200)

subscriptionStatus

Meaning

Subscribed

The fixture is active and counts toward your quota

Pending

The fixture is waiting for quota. It moves to Subscribed when quota is available

What is returned:

  • Fixtures sorted by start date, newest first.

  • Finished fixtures stay in the list. Cancelled, Abandoned, and Unknown fixtures are left out.

This endpoint returns subscriptionStatus as text. The add and remove endpoints return it as a number (1 subscribed, 2 pending).

Validation Error (400)

cURL


12. Add Fixtures

Subscribes the package to specific fixtures.

Request body

Item result (200, 207, or 400)

subscriptionStatus is present only on SUCCESS: 1 subscribed, 2 pending.

Batch HTTP statuses match subscriptions/add: 200, 207, or 400 with results. A rejected request is 400 { "error": "..." } with no results array. An empty fixtureIds list returns { "error": "fixtureIds must contain at least one item" }.

status

Meaning

SUCCESS

Added. subscriptionStatus 1 is subscribed; 2 is pending

INVALID_FIXTURE

The fixture cannot be subscribed. It does not exist, it is not a livescore fixture, its sport is not supported, or it is already in a final status. An in-progress fixture is valid

ALREADY_SUBSCRIBED

Already subscribed

OUTSIDE_PACKAGE_FILTER

The fixture is eligible, but its sport, league, or tour is outside the package filter

cURL


13. Remove Fixtures

Removes fixture subscriptions. The package filter is not applied on remove.

Same request body as fixtures/add. Same batch HTTP statuses.

status

Meaning

SUCCESS

Removed. subscriptionStatus 3 is unsubscribed; 4 is deleted

NOT_SUBSCRIBED

The package was not subscribed to that fixture


14. Quota Usage

Returns the package quota for the current billing period: the total, how much is used, and how much is left. Optionally includes the fixtures that are using it.

Request body

Set includeFixtures to true to add the fixtures list to the response. You can also pass it as a query parameter (/quota-usage?includeFixtures=true). The query parameter takes priority over the body.

Success (200)

Field
Description

periodStartDate

Start of the current billing period (UTC, inclusive)

periodEndDate

End of the current billing period (UTC, exclusive)

totalQuota

Fixtures the package can use in one billing period

totalConsumed

Fixtures used in the current billing period

remainingQuota

totalQuota minus totalConsumed

expirationDate

Package expiration date (UTC)

fixtures

Present only when includeFixtures is true. Same item shape as fixtures/subscribed

How quota is counted:

  • The billing period is one month, starting on the same day of the month as the package expiration date. If that day is after the 27th, the period starts on the 1st of the month.

  • A fixture uses quota once it is charged in the current period. Removing a charged fixture does not return its quota.

  • The fixtures list holds Subscribed fixtures only. Pending fixtures are left out because they do not use quota yet.

Validation Error (400)

Possible validation errors:

  • "Invalid package credentials"

  • "Package has no expiration_date; billing period cannot be computed."

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, is not active, or has no expiration date

Add and remove endpoints also return 400 with a results array when every item fails, and 207 when some items succeed. Read each item's status in sections 8, 9, 12, and 13. A rejected request has { "error": "..." } and no results array.

Server Errors (500) — Returned when:

  • Database connection fails

  • External API calls fail

  • Unexpected server-side errors occur


See also

  • Metadata API Guide — look up sport, location, league, period, and incident reference data

Last updated

Was this helpful?