Skip to content

Getting the ball dispenser status for a bay

Each bay can be queried for its ball dispenser status by issuing a GET request to the ball-dispenser-status endpoint:

GET /api/bays/{bayId}/ball-dispenser-status
Host: https://localsite.trackmanrange.com

The response will be an HTTP 200 OK status code with the following body:

{
  "isEnabled": true
}

Ball dispenser logic

The ball dispenser status is tightly coupled to the booking system. In order for the ball dispenser to be enabled, a valid booking must be in progress at the time of the query. This rule only applies to bays that are designated as BookingOnly. Any other type of bay will always return true from the above endpoint.

If the server is configured to be in offline mode, then the booking system is bypassed and the ball dispensers are going to be enabled by default, until the server is not in offline mode anymore.