Get the detail about a specific upload
GET /v1/{sport}/upload/{uploadType}/type/{entityType}/id/{entityId}
Parameter Name | Value | Description |
---|---|---|
Required Parameters | ||
sport |
string |
The sport for which you are making the request |
uploadType |
string |
The type of upload. Check the parameter matrix for valid options. |
entityType |
string |
The type of entity the upload is for. eg. team, league. Check the parameter matrix for valid options. |
entityId |
integer |
The unique identification number for the entity. eg. personId, teamId. Check the parameter matrix for valid options. |
Optional Parameters | ||
useExternalForLeague |
integer |
If this value is set to the leagueId for the upload, then the URL parameter entityId will instead refer to the externalId field of the entity. |
uploadType | entityType | entityId |
---|---|---|
logo |
league |
leagueId |
logo |
club |
clubId |
jersey |
club |
clubId |
logo |
competition |
competitionId |
logo |
team |
teamId |
jersey |
team |
teamId |
photo |
team |
teamId |
photo |
person |
personId |
Do not supply a request body with this method.
If successful this method returns an Upload resource.
Upload a new file. Only one file can be associated with a particular type at any one moment. Uploading a new file will associate the type with a new file.
WARNING: By using this API call, you assert that you have the legal right and authority to upload and distribute this image.
POST /v1/{sport}/upload/{uploadType}/type/{entityType}/id/{entityId}
Parameter Name | Value | Description |
---|---|---|
Required Parameters | ||
sport |
string |
The sport for which you are making the request |
uploadType |
string |
The type of upload. Check the parameter matrix for valid options. |
entityType |
string |
The type of entity the upload is for. eg. team, league. Check the parameter matrix for valid options. |
entityId |
integer |
The unique identification number for the entity. eg. personId, teamId. Check the parameter matrix for valid options. |
Optional Parameters | ||
fileField |
string |
If using the multipart-form method, this parameter specifies the name of the form field containing the file data. |
urlLoad |
integer |
If set to 1, then upload the image from a URL contained in the body. Cannot be set if fileField is also set. |
useExternalForLeague |
integer |
If this value is set to the leagueId for the upload, then the URL parameter entityId will instead refer to the externalId field of the entity. |
The request body can be one of two formats.
In the simple upload format the fileField parameter is not used and the request body contains the data of the file being uploaded.
POST /v1/basketball/upload/logo/type/team/id/123?ak=TESTAUTHKEY HTTP/1.1
Host: API host
Content-Type: image/png
Content-Length: number of bytes in PNG file
PNG data
In the multipart upload format the data is sent as a multipart/form-data request. The parameter name for the file is given by the parameter fileField.
POST /v1/basketball/upload/logo/type/team/id/123?ak=TESTAUTHKEY&fileField=file HTTP/1.1
Host: API host
Content-Length: number of bytes in entire request body
Content-Type: multipart/related; boundary="xxxboundaryxxx"
--xxxboundary
Content-Type: image/png
Content-Disposition: form-data; name="file"; filename="logo.png"
PNG data
--xxxboundaryxxx--
In the body you must provide a JSON structure containing the following fields.
Parameter Name | Value | Description |
---|---|---|
Required Parameters | ||
url |
string |
The URL of the image. Must contain the full protocol (http://). eg. http://www.example.com/teams/teamlogo.png. |
{
"url":"http://www.example.com/teams/logo.png"
}
The system will only accept image uploads of the following types:
image/png
image/jpeg
It is strongly recommended to upload PNG files with an alpha channel. This ensures the most flexible usage of the images.
The file being uploaded must be under 200Kb in size.
The image file being uploaded should be square in size and not larger than 1024x1024. If the image is not square then it will be automatically padded with tranparent (or white depending on image format) pixels to achieve a square image.
The system will automatically generate images at defined sizes. If the initial image is smaller than one of the defined sizes, then that size will not be generated. eg. An initial image of 400x400 will not generate an image of 600x600.
If successful this method returns an Upload resource.
Delete an existing upload
DELETE /v1/{sport}/upload/{uploadType}/type/{entityType}/id/{entityId}
Parameter Name | Value | Description |
---|---|---|
Required Parameters | ||
sport |
string |
The sport for which you are making the request |
uploadType |
string |
The type of upload. Check the parameter matrix for valid options. |
entityType |
string |
The type of entity the upload is for. eg. team, league. Check the parameter matrix for valid options. |
entityId |
integer |
The unique identification number for the entity. eg. personId, teamId. Check the parameter matrix for valid options. |
Optional Parameters | ||
useExternalForLeague |
integer |
If this value is set to the leagueId for the upload, then the URL parameter entityId will instead refer to the externalId field of the entity. |
Do not supply a request body with this method.
On success this method returns SUCCESS.