Customers API Guide

1. Activate Package

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

Endpoint

POST https://engage-api.lsports.eu/api/tips/package/activate

Request Body

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

Responses

|| Status Code || Description || | 200 | Success | | 400 | Validation Error | | 500 | Server Error |

Success Response (200 OK)

{
  "success": true,
  "message": "Package activation completed successfully",
  "packageId": 123,
  "username": "[email protected]"
}

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


2. Deactivate Package

Deactivates a tipsfeed 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


3. Get Package Status

Retrieves the current status of a Tipsfeed 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?