Returns a single entrant for a specified league for the authenticated RoadLeagues user.
Method | URI |
---|---|
GET |
https://roadleagues.com/api/v1/entrant?token={ACCESS-TOKEN}&lid={LID}&leid={LEID} |
POST |
https://roadleagues.com/api/v1/entrant |
POST
Headers{
"Accept" : "application/json",
"Content-Type" : "application/x-www-form-urlencoded",
"Authorization" : "Bearer {ACCESS-TOKEN}"
}
POST
Data Parameters'lid' : "{LID}", // Required - Integer
"leid" : "{LEID}", // Required - Integer
{
"data": {
"eid": 1,
"userID": 1,
"clubID": 2,
"entrantName": "Paul Doe",
"entrantEmail": "paul@gmail.com",
"entrantType": "race",
"creationDate": "2020-01-07 09:44:27",
"lastUpdated": "2020-01-07 09:44:27",
"league": {
"leagueID": 1,
"leID": 8,
"raceGroup": "1",
"canAcceptEmail": null,
"emailVerified": null,
"invoiceID": null,
"feeStatus": "paid",
"blacklisted": null,
"blacklistedReason": null,
"leagueEntryDate": "2020-01-15 15:56:24",
"lastUpdated": "2020-01-15 15:56:24"
}
},
"extra": {
"api_author": "Richie McMullen",
"api_version": "v1",
"api_rate_limit": null,
"current_limit_count": null
}
}
{primary} A couple of examples using
Ajax
&PHP cURL
on how you might go about making aPOST
request for this endpoint. Remember to replace the placeholders with your own credentials.
$.ajax({
type: "POST",
url: "https://roadleagues.com/api/v1/entrant",
data: {
"lid": "{LID}", // Required
"leid": "{LEID}", // Required
},
headers: {
"Accept": 'application/json',
"Content-Type": 'application/x-www-form-urlencoded',
"Authorization": 'Bearer {ACCESS-TOKEN}',
},
dataType: "JSON",
cache: false,
success: function (data) {
console.log(data);
}
});
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://roadleagues.com/api/v1/entrant",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "lid={LID}&leid={LEID}",
CURLOPT_HTTPHEADER => array(
"Accept: application/json",
"Content-Type: application/x-www-form-urlencoded",
"Authorization: Bearer {ACCESS-TOKEN}"
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;