MyRacePass API

Overview

Resources

Resource: Schedules/Results

GET /v2/schedules/events/Gets schedule events filtered by arguments

Request Parameters

Below is a list or available request parameters.

NameTypeDescriptionDefault
ScheduleId INT Schedule id to pull events from (0 for all) 0
TagId INT ID of tag to pull events from (used with TagType) 0
TagType STRING type of tag (used with TagId) [empty]
StartDate DATE Min date to pull events from [empty]
EndDate DATE Max date to pull events from [empty]
EventYear INT Year to pull events from (0 for all) 0
FutureCount INT Number of future events to pull from the EndDate 0
PastCount INT Number of past events to pull from the StartDate 0
IncludeClass BOOL Tells the system whether or not to include the Classes section
Set to false to reduce the size of payload if class names are not required
true
IncludeResults BOOL Tells the system whether or not to include the Results section
Results are pulled from the highest ranking class for each event
false
DriverCount INT Number of drivers to include in results section
Max of 10
5

Format Parameters

none

Notes

A ScheduleId, StartDate and EndDate, StartDate and FutureEventCount, OR EventYear is required.

If FutureCount and PastCount as both passed, the system will try to return events around today’s date, or the passed in start date. If there is not enough future or past events, the system will still try to return a total number of events equal to FutureCount + PastCount

Driver/Team or Track/Series formatting
The system will automatically know what type of site your KEY is configured to pull as. Below are examples of the two different output formats are.

Example Call

GET

https://api.myracepass.com/v2/schedules/events/?key={xxx}&ScheduleId={id}

Response Information (Track/Series)

Returns

A list of schedule events.

Response Body
	{
	"RequestValid": 1,
	"ItemsReturned": 2,
	"ScheduleEvents": [{
		"EventId": 1,
		"EventDate": "5/11/2015 12:00:00 AM",
		"EventName": "Ice Breaker",
		"EventDescription": "",
		"CancelType": "",
		"CancelMessage": "",
		"Track": [{
			"TrackId": 1,
			"TrackName": "Sample Track",
			"TrackCity": "Madison",
			"TrackState": "WI",
			"TrackCountry": ""
		}],
		"Classes": [{
			"ClassId": 1000,
			"ClassName": "410 Sprints - Winged",
			"ClassNameOverride": ""
		}],
		"Tickets": [],
		"Results": [{
			"ResultPlace": 1,
			"ResultStart": 0,
			"ResultTime": "",
			"ResultCarNum": "15",
			"ResultDNF": 0,
			"ResultDNS": 0,
			"ResultDQ": 0,
			"Driver": [{
				"DriverId": "1",
				"DriverFName": "Sample",
				"DriverLName": "Driver",
				"DriverSuffix": "",
				"DriverCity": "Madison",
				"DriverState": "WI",
				"DriverCountry": ""
			}]
		}, {
			"ResultPlace": 2,
			"ResultStart": 0,
			"ResultTime": "",
			"ResultCarNum": "18",
			"ResultDNF": 0,
			"ResultDNS": 0,
			"ResultDQ": 0,
			"Driver": [{
				"DriverId": "2",
				"DriverFName": "Johnny",
				"DriverLName": "Driver",
				"DriverSuffix": "",
				"DriverCity": "Appleton",
				"DriverState": "WI",
				"DriverCountry": ""
			}]
		}]
	}, {
		"EventId": 2,
		"EventDate": "5/12/2015 12:00:00 AM",
		"EventName": "Ice Breaker",
		"EventDescription": "",
		"CancelType": "",
		"CancelMessage": "",
		"Track": [{
			"TrackId": 1,
			"TrackName": "Sample Track",
			"TrackCity": "Madison",
			"TrackState": "WI",
			"TrackCountry": ""
		}],
		"Classes": [{
			"ClassId": 1000,
			"ClassName": "410 Sprints - Winged",
			"ClassNameOverride": ""
		}],
		"Tickets": [{
			"TicketSiteId": 10000,
			"TicketSiteName": "Sample Track",
			"TicketSiteUrl": "sampletrack.com",
			"TicketPurchaseLink": "http://market.myracepass.com/store/tickets/.....",
			"TicketEventName": "Kids night at the Track (5/12/2015)",
			"TicketStartDate": "5/6/2015 12:00:00 AM",
			"TicketEndDate": "5/12/2015 11:59:00 AM",
			"TicketsAvailable": [{
				"TicketName": "Adult General Admission",
				"TicketPrice": 10,
				"TicketSalePrice": 0,
				"TicketOnSale": 0,
				"TicketQty": 500
			}, {
				"TicketName": "Kids General Admission",
				"TicketPrice": 5,
				"TicketSalePrice": 0,
				"TicketOnSale": 0,
				"TicketQty": 500
			}, {
				"TicketName": "Senior General Admission",
				"TicketPrice": 8,
				"TicketSalePrice": 0,
				"TicketOnSale": 0,
				"TicketQty": 500
			}, {
				"TicketName": "Adult VIP Call for Reservations 918-434-7223",
				"TicketPrice": 20,
				"TicketSalePrice": 0,
				"TicketOnSale": 0,
				"TicketQty": -1
			}, {
				"TicketName": "Kids VIP Call for Reservations 918-434-7223",
				"TicketPrice": 20,
				"TicketSalePrice": 0,
				"TicketOnSale": 0,
				"TicketQty": -1
			}, {
				"TicketName": "Pit Pass",
				"TicketPrice": 30,
				"TicketSalePrice": 0,
				"TicketOnSale": 0,
				"TicketQty": 500
			}]
		}]
	}],
	"RequestCached": 0
}

Response Information (Drivers/Teams)

Returns

A list of schedule events formatted for drivers/teams.

Response Body
	{
    "RequestValid": 1,
    "ItemsReturned": 1,
    "ScheduleEvents": [
        {
            "EventId": 1,
            "EventDate": "5/11/2015",
            "EventName": "Ice Breaker",
            "EventDescription": "",
            "CancelType": "",
            "CancelMessage": "",
            "Track": [
                {
                    "TrackId": 1,
                    "TrackName": "Sample Track",
                    "TrackCity": "Madison",
                    "TrackState": "WI",
                    "TrackCountry": ""
                }
            ],
            "Classes": [
                {
                    "ClassId": 1003,
                    "ClassName": "410 Sprints - Non-Winged",
                    "ClassNameOverride": "Non-Wing Sprint Cars",
                    "Associations": [
                        {
                            "AssocId": 1,
                            "AssocName": "Non Winged Association"
                        }
                    ],
                    "Drivers": [
                        {
                            "DriverId": "1",
                            "DriverFName": "Sample",
                            "DriverLName": "Driver",
                            "DriverSuffix": "",
                            "DriverCity": "Madison",
                            "DriverState": "WI",
                            "DriverCountry": "US",
                            "Races": [
                                {
                                    "RaceName": "A Feature",
                                    "RaceType": "Feature",
                                    "RaceOrder": 1,
                                    "RaceLevel": "A",
                                    "Results": [
                                        {
                                            "ResultPlace": 8,
                                            "ResultStart": 0,
                                            "ResultTime": "",
                                            "ResultDNF": 0,
                                            "ResultDNS": 0,
                                            "ResultDQ": 0
                                        }
                                    ]
                                },
                                {
                                    "RaceName": "Heat 3",
                                    "RaceType": "Heat",
                                    "RaceOrder": 3,
                                    "RaceLevel": "",
                                    "Results": [
                                        {
                                            "ResultPlace": 5,
                                            "ResultStart": 0,
                                            "ResultTime": "",
                                            "ResultDNF": 0,
                                            "ResultDNS": 0,
                                            "ResultDQ": 0
                                        }
                                    ]
                                },
                                {
                                    "RaceName": "Qualifying",
                                    "RaceType": "Qualifying",
                                    "RaceOrder": 0,
                                    "RaceLevel": "",
                                    "Results": [
                                        {
                                            "ResultPlace": 12,
                                            "ResultStart": 0,
                                            "ResultTime": "",
                                            "ResultDNF": 0,
                                            "ResultDNS": 0,
                                            "ResultDQ": 0
                                        }
                                    ]
                                }
                            ]
                        }
                    ]
                }
            ]
        }
    ],
    "RequestCached": 0
}

Shopping Cart Update Cart ()

Loading...