Sail TV Mobile APP

Sail Tv Mobile APP API
Series

Manage Race Series

POST /series
New Series
POST /series

Create a New Series

Equipment

Equipment Services

GET /raceclasses
List of Classes
GET /raceclasses

List of Race Classes

Request parameters

organisations
array of string optional

List of Organisagtions

Collection format: csv

Responses

200 OK
Body
Object
id
string
Example:
guid
Name
string
Example:
Handicap
Description
string
Example:
Handicap Class
Example 1
GET /raceclasses HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "guid",
    "Name": "Handicap",
    "Description": "Handicap Class"
}
Results
GET /races/{race_id}/results
POST /race/{id}/results
GET /event/{id}/results
Race Results
GET /races/{race_id}/results

Path variables

race_id
string required

Responses

200 OK
Body
Object
id
string

Results ID used for update

Example:
event_race_id_guid
member
Object

Event Entry Member

id
string

Equipment Owner from Entry to Event

Example:
guid
memberName
string

Name of ther Member

Example:
Sam Steward
equipment
Object
id
string

Unique ID of Equipment

Example:
guid
equipmentName
string
Example:
Seen Leaving
rigId
string

Unique ID of Rig

Example:
Laser Radial
rigClassName
string

Rig Class Name

Example:
Laser Radial
sailNumber
string
Example:
213537
crew
Array
Object
id
string
Example:
guid
memberName
string
Example:
Bill Smith
crewRole
string
Example:
crew
raceResult
Object
position
integer
Example:
1
raceStatus
string
Example:
OK,DNF,DNC,RAF
handicap
number

Handicap Rating for the System and Rig

Example:
1045
elapsedTime
integer

Time of Race in Seconds

Example:
3634
correctedTime
integer

Time of Race in Seconds

Example:
2987
laps
integer

Number of Laps

Example:
3
isDiscard
boolean

Is the Race Discarded

seriesPosition
number

Postion in Series on This Date

Example 1
GET /events/{id}/races/{race_id}/results HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "event_race_id_guid",
    "member": {
        "id": "guid",
        "memberName": "Sam Steward"
    },
    "equipment": {
        "id": "guid",
        "equipmentName": "Seen Leaving",
        "rigId": "guid",
        "rigClassName": "Laser Radial",
        "sailNumber": "213537"
    },
    "crew": [
        {
            "id": "guid",
            "memberName": "Bill Smith",
            "crewRole": "crew"
        }
    ],
    "raceResult": {
        "position": 1,
        "raceStatus": "OK",
        "handicap": 1045,
        "elapsedTime": 3634,
        "correctedTime": 2987,
        "laps": 3,
        "isDiscard": true
    }
}
Add Results
POST /race/{id}/results

Path variables

id
string required

Request body

Object
results
Array
Object
eventRaceId
string
Example:
guid
eventMemberId
string
Example:
guid
rig_id
string
Example:
guid
hullNumber
string
Example:
15
handicap
integer
Example:
1135
elapsedTime
integer
Example:
3789
laps
integer
Example:
3
raceStatus
string
Example:
OK

Responses

200 OK
Body
Object
raceResult
Array
Object
eventEntryId
string
Example:
guid
position
integer
Example:
1
points
integer
Example:
1
raceStatus
string
Example:
OK
elapsedTime
integer
Example:
3634
correctedTime
integer
Example:
2987
laps
integer
Example:
3
isDiscard
boolean
Example:
true
Example 1
POST /race/{id}/results HTTP/1.1 

Content-Type: application/json

{
    "results": [
        {
            "eventRaceId": "guid",
            "eventMemberId": "guid",
            "rig_id": "guid",
            "hullNumber": "15",
            "handicap": 1135,
            "elapsedTime": 3789,
            "laps": 3,
            "raceStatus": "OK"
        }
    ]
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "raceResult": [
        {
            "eventEntryId": "guid",
            "position": 1,
            "points": 1,
            "raceStatus": "OK",
            "elapsedTime": 3634,
            "correctedTime": 2987,
            "laps": 3,
            "isDiscard": true
        }
    ]
}
Series Results
GET /event/{id}/results

Path variables

id
string required

Responses

200 OK
Body
Object
content
Array
Object
position
integer
Example:
1
points
integer
Example:
1
member
Object
id
string
Example:
guid
memberName
string
Example:
Sam Steward
equipment
Object
id
string
Example:
guid
equipmentName
string
Example:
Seen Leaving
rigId
string
Example:
guid
rigClassName
string
Example:
Laser Radial
sailNumber
string
Example:
213537
raceResults
Array
Object
raceId
string
Example:
guid
raceNumber
integer
Example:
1
position
integer
Example:
1
points
integer
Example:
1
isDiscard
boolean
Example:
true
raceStatus
string
Example:
OK
pageable
Object
page
integer
Example:
1
size
integer
Example:
10
sort
Object
orders
Array of unknown
total
integer
Example:
1
Example 1
GET /event/{id}/results HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "position": 1,
            "points": 1,
            "member": {
                "id": "guid",
                "memberName": "Sam Steward"
            },
            "equipment": {
                "id": "guid",
                "equipmentName": "Seen Leaving",
                "rigId": "guid",
                "rigClassName": "Laser Radial",
                "sailNumber": "213537"
            },
            "raceResults": [
                {
                    "raceId": "guid",
                    "raceNumber": 1,
                    "position": 1,
                    "points": 1,
                    "isDiscard": true,
                    "raceStatus": "OK"
                },
                
                {
                    "raceId": "guid",
                    "raceNumber": 2,
                    "position": null,
                    "points": 19,
                    "isDiscard": true,
                    "raceStatus": "DNC"
                }
            ]
        }
    ],
    "pageable": {
        "page": 1,
        "size": 10,
        "sort": {
            "orders": [
                null
            ]
        }
    },
    "total": 1
}
Events

Event Management

POST /events
GET /events
GET /events/{id}
POST /events/{id}/enter
GET /events/{id}/entries
GET /events/{id}/races
POST /events/{id}/tally
Create New Event
POST /events

Create a New Event as either a Race Series, Training or Social

Request body

Object
name
string
Example:
SEA VIEW YACHT CLUB REGATTA
description
string
Example:
lorem ipsum
eventType
string
Example:
RACESERIES
entryType
string
Example:
INDIVIDUAL
organisations
Array
Object
organisationId
string
Example:
guid
role
string
Example:
HOST
startDate
integer
Example:
1568764800
endDate
integer
Example:
1568764800
entryCloseDate
integer
Example:
1568764800
maxEntries
unknown nullable
Example 1
POST /event HTTP/1.1 

Content-Type: application/json

{
    "name": "SEA VIEW YACHT CLUB REGATTA",
    "description": "lorem ipsum",
    "eventType": "RACESERIES",
    "entryType": "INDIVIDUAL",
    "host": [
        {
            "organisationId": "guid_seaview",
            "role": "HOST"
        }
    ],
    "startDate": 1568764800,
    "endDate": 1568764800,
    "entryCloseDate": 1568764800,
    "maxParticipants": null
}
List of Events
GET /events

Should use the Authentication Token to check the Member and use that to find list of Organisations they belong to for the list.

Request parameters

organisation_id
string optional

Organisation to filter the list, can be a multiple

Responses

200 OK
Body
Object
content
Array
Object
externalId
string
Example:
dd68fd8b-bf8b-11e9-95ee-42010a9c00a0
name
string
Example:
SEA VIEW YACHT CLUB REGATTA
description
string
Example:
lorem ipsum
eventType
string
Example:
RACESERIES
entryType
string
Example:
INDIVIDUAL
host
Array
Object
organisationId
string
Example:
guid
name
string
Example:
Seaview Yacht Club
isHost
boolean
Example:
true
role
string
Example:
HOST
startDate
integer
Example:
1568764800
endDate
integer
Example:
1568764800
entryCloseDate
integer
Example:
1568764800
maxEntries
unknown nullable
noOfRaces
string

Number of Races in Event

Example:
6
nextDate
unknown nullable
member
Object
isEntered
boolean
pageable
Object
page
integer
size
integer
Example:
10
sort
Object
orders
Array of unknown
total
integer
Example:
1
Example 1
GET /events HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "externalId": "dd68fd8b-bf8b-11e9-95ee-42010a9c00a0",
            "name": "SEA VIEW YACHT CLUB REGATTA",
            "description": "lorem ipsum",
            "eventType": "RACESERIES",
            "entryType": "INDIVIDUAL",
            "host": [
                {
                    "organisationId": "guid",
                    "name": "Seaview Yacht Club",
                    "isHost": true,
                    "role": "HOST"
                }
            ],
            "startDate": 1568764800,
            "endDate": 1568764800,
            "entryCloseDate": 1568764800,
            "maxEntries": null,
            "noOfRaces" : 6
            "nextDate": null,
            "member": {
                "isEntered": true
            }
        }
    ],
    "pageable": {
        "page": 1,
        "size": 10,
        "sort": {
            "orders": [
                null
            ]
        }
    },
    "total": 1
}
Get Event
GET /events/{id}

Path variables

id
string required

Responses

200 OK
Body
Array
Object
raceClass
Object
id
string
Example:
guid
name
string
Example:
Handicap
description
string
Example:
Handicap
races
Array
Object
id
string
Example:
guid
raceNumber
integer
Example:
1
startTime
integer
Example:
15345677
isHeat
boolean
Example:
true
raceStatus
string
Example:
RACED
Example 1
GET /events/{id} HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

[
    {
        "raceClass": 
            {
                "id": "guid",
                "name": "Handicap",
                "description": "Handicap",
                "races": [
                    {
                        "id": "guid",
                        "raceNumber": 1,
                        "startTime": 15345677,
                        "isHeat": true,
                        "raceStatus": "RACED"
                    },
                    {
                        "id": "guid",
                        "raceNumber": 2,
                        "startTime": 15345677,
                        "isHeat": true,
                        "raceStatus": "RACED"
                    }
                ]
            }
        
    },
    {
        "raceClass": 
            {
                "id": "guid",
                "name": "Scow",
                "description": "Scow",
                "races": [
                    {
                        "id": "guid",
                        "raceNumber": 1,
                        "startTime": 15345677,
                        "isHeat": true,
                        "raceStatus": "RACED"
                    },
                    {
                        "id": "guid",
                        "raceNumber": 1,
                        "startTime": 15345677,
                        "isHeat": true,
                        "raceStatus": "RACED"
                    }
                ]
            }
    }
]
Enter Event
POST /events/{id}/enter

Enter an event as a race particpant, with Optional equipment, or each equipment can be added or changed per race.

Path variables

id
string required

Request body

Object
memberId
string

Guid of Member Entering Event

eventClassId
string

Mandatory

role
string

Role Peforming

Enumeration:
OWNER
TRAINEE
SOCIAL
equipment_id
string

Equipment Entering Event With, If allowed an inidividual race can use different equipment

crew
Array

List of Crew Members

Object
member_id
string

Guid of Member who is allocated as Crew in this Series.

Example:
Guid
role
string
Enumeration:
CREW

Responses

200 OK
Body
Object
id
string
Example:
guid
Example 1
POST /events/{id}/enter HTTP/1.1 

Content-Type: application/json

{
    "member_id": "",
    "role": "OWNER",
    "equipment_id": "GUID",
    "crew": [
        {
            "member_id": "Guid",
            "role": "CREW"
        }
    ]
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "entry_id": "guid"
}
Entry List
GET /events/{id}/entries

List of Entries for the Event

Path variables

id
string required

Responses

200 OK
Body
Object
offers
Array
Object
id
string
Example:
6A24D2B5E44F44B28451FE021FCAD51E
member
Object
id
string
Example:
guid
forename
string
Example:
Sam
surname
string
Example:
Steward
avatar_url
string
equipment
Array
Object
id
string
isPrimary
boolean

The initial entry as the primary, alternates will be selected from the Member list of Equipment

Example:
true
name
string

name of Boat / equipment

sail_number
string

Sail Number

Example:
213537
class
Object

Class details

id
string
Example:
guid
name
string
Description
string
crew
Array
Object
id
string
Example:
guid
forename
string
Example:
Bill
surname
string
Example:
Smith
role
string
Example:
Trimmer
payment
Object
transaction_id
string
transaction_date
number
product_id
string

Unique Guid for the Product Purchased

product_name
string

Name of Product Purchased

total
integer
Example:
15.99
pageable
Object
page
integer
size
integer
Example:
10
sort
Object
orders
Array
Object
sort
string
Example:
DESC
property
string
ignoreCase
boolean
Example:
true
nullHandling
string
Example:
NATIVE
total
integer
Example:
25
Example 1
GET /event/123456/entries HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "offers": [
        {
            "id": "6A24D2B5E44F44B28451FE021FCAD51E",
            "member": {
                "id": "guid",
                "forename": "Sam",
                "surname": "Steward",
                "avatar_url": ""
            },
            "equipment": {
                "id": "",
                "name": "",
                "sail_number": "213537",
                "class": {
                    "id": "guid",
                    "name": "",
                    "Description": ""
                }
            },
            "crew": [
                {
                    "id": "guid",
                    "forename": "Bill",
                    "surname": "Smith",
                    "role": "Trimmer"
                }
            ],
            "payment": {
                "transaction_id": "",
                "transaction_date": 1,
                "product_id": "",
                "product_name": "",
                "total": 15.99
            }
        }
    ],
    "pageable": {
        "page": 1,
        "size": 10,
        "sort": {
            "orders": [
                {
                    "sort": "DESC",
                    "property": "",
                    "ignoreCase": true,
                    "nullHandling": "NATIVE"
                }
            ]
        }
    },
    "total": 25
}
Event Races
GET /events/{id}/races

Path variables

id
string required

Request parameters

raceClasses
array of string optional

Provide a list of classes top filter

Collection format: csv

Responses

200 OK
Body
Object
raceClass
Array
Object
externalId
string
Example:
8212cb85-bf88-11e9-95ee-42010a9c00a0
name
string
Example:
Handicap
description
string
Example:
Handicap
races
Array
Object
isHeat
boolean
raceStatus
string
Example:
RACED
raceNumber
integer
Example:
1
raceNotes
string
id
string
Example:
bdf68576-03aa-11ea-aa47-42010a9c0fdc
startTime
integer
Example:
1572170400
Example 1
GET /events/{id}/races HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "raceClasses": [
        {
            "externalId": "8212cb85-bf88-11e9-95ee-42010a9c00a0",
            "name": "Handicap",
            "description": "Handicap",
            "races": [
                {
                    "isHeat": true,
                    "raceStatus": "RACED",
                    "raceNumber": 1,
                    "raceNotes": "",
                    "id": "bdf68576-03aa-11ea-aa47-42010a9c0fdc",
                    "startTime": 1572170400
                }
            ]
        }
    ]
}
Register in races
POST /events/{id}/tally

before racing starts a member will “tally” in and register they intend to race, for a given day this can be more than one race.

Path variables

id
string required

Request body

Object
memberId
string

Member ID of Entered Person

Example:
guid
rigId
string
Example:
guid
crew
Array
Object
memberID
string

Member ID Of Crew Sailing With Entered Person

Example:
guid
role
string
Example:
role
tagDirection
string

In or Out Tally Use Search for Date for the OUT to make sure there is an IN. between 00:00:00 and 23:59:59

Enumeration:
IN
OUT
Series / Racing
POST /event/{id}/class
GET /event/{event_id}/class/{class_id}/races
PUT /races/{id}
Add Classes to Event
POST /event/{id}/class

Path variables

id
string required

Request body

Object
class
Array
Object
classId
string
Example:
guid of class
startSequence
number

Starting Sequence

Example:
1
handicap
string
Enumeration:
OD
PY
IRC
PHRF
ORC
maxEntries
integer
warning
integer
Example:
5
prepup
integer
Example:
4
prepdown
integer
Example:
1
scoringSystem
string
Enumeration:
LP
HP
bowNumbers
boolean
discards
Array
Object
raceCount
integer
Example:
1
raceToCount
integer
Example:
1
scoring
Array
Object
outcome
string
Example:
DNS
totalBoats
string
Enumeration:
RACE
SERIES
incremental
integer
Example:
1
Example 1
POST /event/{id}/class HTTP/1.1 

Content-Type: application/json

{
    "class": [
        {
            "classId": "guid of class",
            "startSequence": 1,
            "handicap": "PY",
            "maxEntries": 1,
            "warning": 5,
            "prepup": 4,
            "prepdown": 1,
            "scoringSystem": "LP",
            "bowNumbers": true,
            "discards": [
                {
                    "raceCount": 1,
                    "raceToCount": 1
                }
            ],
            "scoring": [
                {
                    "outcome": "DNS",
                    "totalBoats": "SERIES",
                    "incremental": 1
                }
            ]
        }
    ]
}
Add Class Races
GET /event/{event_id}/class/{class_id}/races

Add Races to a Class

Path variables

event_id
string required
class_id
string required

Request body

Object
races
Array
Object
start_date
integer
Example:
15678965
is_heat
boolean
raceStatus
string
Enumeration:
NOTRACED
RACED
ABANDONED
CANCELLED
raceNumber
integer
Example:
1
raceNotes
string
Example:
lorem ipsome
Example 1
GET /event/{event_id}/class/{class_id}/races HTTP/1.1 

Content-Type: application/json

{
    "races": [
        {
            "start_date": 15678965,
            "is_heat": true,
            "raceStatus": "RACED",
            "raceNumber": 1,
            "raceNotes": "lorem ipsome"
        }
    ]
}
Update Race
PUT /races/{id}

Path variables

id
string required

Request body

Object
races
Array
Object
start_date
integer
Example:
15678965
is_heat
boolean
Example:
true
raceStatus
string
Example:
RACED
raceNumber
integer
Example:
1
raceNotes
string
Example:
lorem ipsome
member
GET /members/{id}/equipment
GET /members/{id}/entries
GET /member/{id}/results
Equipment List
GET /members/{id}/equipment

Get List of Equipment for a Member or Organisation

Path variables

id
string required

Request parameters

class_id
array of string optional

External ID of Class to allow selection of equipment relevant ot a class

Collection format: csv

Responses

200 OK
Body
Object
id
string
Example:
guid
name
string
Example:
name
description
string
Example:
description
rigs
Array
Object
rig_name
string
Example:
default
is_default
boolean
Example:
true
class
Object
id
string
Example:
guid
name
string
Example:
name
description
string
Example:
description
crew_limit
integer
Example:
1
handicap
Array
Object
id
string
Example:
guid
system
string
Example:
PY
rating
integer
Example:
1145
Example 1
GET /member/{id}/equipment HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "guid",
    "name": "Sam's Laser",
    "description": "Laser Radial With two Rigs",
    "rigs": [
        {
            "rig_name": "Laser Radial",
            "is_default": true,
            "class": {
                "id": "guid",
                "name": "Laser Radial",
                "description": "description",
                "crew_limit": 0,
                "handicap": [
                    {
                        "id": "guid",
                        "system": "PY",
                        "rating": 1145
                    }
                ]
            }
        },
        {
            "rig_name": "Laser 4.7",
            "is_default": false,
            "class": {
                "id": "guid",
                "name": "Laser 4.7",
                "description": "description",
                "crew_limit": 0,
                "handicap": [
                    {
                        "id": "guid",
                        "system": "PY",
                        "rating": 1240
                    }
                ]
            }
        }
    ]
}
List of Events Entered
GET /members/{id}/entries

Path variables

id
string required

Request parameters

eventDate
string optional

Date of Event - Checks for a current event to allow tag in / tag out

Responses

200 OK
Body
Object
id
string
Example:
dd68fd8b-bf8b-11e9-95ee-42010a9c00a0
name
string
Example:
SEA VIEW YACHT CLUB REGATTA
description
string
Example:
lorem ipsum
eventEntryID
string
Example:
guid
tagged
Array
Object
tag_id
string
Example:
guid
tag_in
integer
Example:
156789566
tag_out
integer
Example:
156789566
equipment
Array
Object
id
string
Example:
guid
name
string
Example:
name
rigId
string
Example:
guid
rigClassName
string
Example:
Laser Radial
isEntry
boolean
Example:
true
crew
Array
Object
memberId
string
Example:
guid
crewName
string
Example:
Billy Smith
crewEntryId
string
Example:
guid
tagged
Array
Object
tag_id
string
Example:
guid
tag_in
integer
Example:
156789566
tag_out
integer
Example:
156789566
Example 1
GET /members/{id}/entry HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "dd68fd8b-bf8b-11e9-95ee-42010a9c00a0",
    "name": "SEA VIEW YACHT CLUB REGATTA",
    "description": "lorem ipsum",
    "eventEntryID": "guid",
    "tagged": [
        {
            "tag_id": "guid",
            "tag_in": 156789566,
            "tag_out": 156789566
        }
    ],
    "equipment": [
        {
            "id": "guid",
            "name": "name",
            "rigId": "guid",
            "rigClassName": "Laser Radial",
            "isEntry": true
        }
    ],
    "crew": [
        {
            "memberId": "guid",
            "crewName": "Billy Smith",
            "crewEntryId": "guid",
            "tagged": [
                {
                    "tag_id": "guid",
                    "tag_in": 156789566,
                    "tag_out": 156789566
                }
            ]
        }
    ]
}
Latest Results
GET /member/{id}/results

Path variables

id
string required

Responses

200 OK
Body
Object
content
Array
Object
eventName
string
Example:
Frostbite
position
integer
Example:
1
points
string
Example:
1
scoreStatus
string
Example:
OK
isDiscard
boolean
Example:
true
pageable
Object
page
integer
Example:
1
size
integer
Example:
10
sort
Object
orders
Array of unknown
total
integer
Example:
1
App Styles
GET /app
Get App Styles
GET /app

Responses

200 OK
Body
Object
content
Array
Object
externalId
string
Example:
discovery_0
name
string
theme
Object
displayFormat
string
Example:
HERO
fgColour
string
bgColour
string
svgBackground
string