Locations

Request: GET

Returns a list of locations that the user has access to.

HTTP Request

GET /v1/{sport}/locations
GET /v1/{sport}/leagues/{leagueId}/locations

Parameters

Parameter Name Value Description
Required Parameters
sport string The sport for which you are making the request
Optional Parameters
leagueId integer Unique identifier for the league the location belongs to.
status integer Display only where the Location is of a certain status

Request Body

Do not supply a request body with this method.

Response

If successful this method returns a list of Location resources.

Request: GET

Get the detail about a specific location

HTTP Request

GET /v1/{sport}/locations/{locationId}

Parameters

Parameter Name Value Description
Required Parameters
sport string The sport for which you are making the request
locationId integer The unique identifier for this location
Optional Parameters
useExternalForLeague integer If this value is set to the leagueId for the location, then the URL parameter locationId will instead refer to the externalId of the location in that league.

Request Body

Do not supply a request body with this method.

Response

If successful this method returns a Location resource.

Request: POST

Create a new location

HTTP Request

POST /v1/{sport}/leagues/{leagueId}/locations

Parameters

Parameter Name Value Description
Required Parameters
sport string The sport for which you are making the request
leagueId integer Unique identifier for the league the location belongs to.
Optional Parameters
minimumResponse integer If this value is set to 1 then the response resource will only contain locationId and externalId.
bulk integer Create multiple records.

Request Body

In the request body supply a Location resource. If the bulk parameter is specified a list of resources is expected.

Response

If successful this method returns a Location resource. If the bulk parameter is specified it will return a list of resources. Any errors returned are against the specific resource.

Request: PUT

Update an existing location

HTTP Request

PUT /v1/{sport}/locations/{locationId}

Parameters

Parameter Name Value Description
Required Parameters
sport string The sport for which you are making the request
locationId integer The unique identifier for this location
Optional Parameters
useExternalForLeague integer If this value is set to the leagueId for the location, then the URL parameter locationId will instead refer to the externalId of the location in that league.

Request Body

In the request body supply a Location resource.

Response

If successful this method returns a Location resource.

Request: DELETE

Delete an existing location

HTTP Request

DELETE /v1/{sport}/locations/{locationId}

Parameters

Parameter Name Value Description
Required Parameters
sport string The sport for which you are making the request
locationId integer The unique identifier for this location
Optional Parameters
useExternalForLeague integer If this value is set to the leagueId for the location, then the URL parameter locationId will instead refer to the externalId of the location in that league.
confirm integer 0 = Default. FAILURE returned if cascade records found.
1 = override cascades

Affected resources:

Request Body

Do not supply a request body.

Response

If no override is flag passed in and the locationId is involved in any of the affected resources then the DELETE will fail (returns FAILURE). Successful this method returns SUCCESS. The confirmation will simply set the venue LocationId to 0, not delete the venue.