API Reference
Use our API to access your data and build apps on our platform
Use our API to access your data and build apps on our platform
Base64(account ID:private key)
https
for all calls$ curl https://api.riderhq.com/api/v2/events?o=walton-festival \ -u {account ID}:{private key} \ --data-urlencode limit_int="12" \/* (Optional) Max number of values to return (default: 100) */--data-urlencode starting_after_id="ev_kelaej0" \/* (Optional) { Event ID }: Start listing after this event (for multi-page results) */--data-urlencode starting_from_id="ev_kelaej0" \/* (Optional) { Event ID }: Start listing from (including) this event (for multi-page results) */--data-urlencode sort="start_day, end_day desc" \/* (Optional) valid values: start_day|start_time|end_day|eventname_txt more */--data-urlencode filter="(start_day>'21-jan-2000' and eventtype_enu='RUNNING')" \/* (Optional) fields: eventname_txt|start_day|start_time|end_day|eventtype_enu|subtitle_txt|description_txt|event_rank_int|accountname_txt|id eventtype_enu value_enu (cf. eventcategoriesandtypes endpoint) filtering */
{ "type" : "events", "data" : [ { "type" : "event", "id" : "ev_21c5v9", "name" : "Landworth Circuit Race", "start_date" : "2018-01-23",/* null means start date is 'TBC' */"entrytypes" : [ { "type" : "entrytype", "id" : "et_a7rlf2", "name" : "All", "url" : "https://api.riderhq.com/api/v2/entrytypes/et_a7rlf2" } ], "entryform" : { "type" : "form", "id" : "frm_6mxpxy", "url" : "https://api.riderhq.com/api/v2/forms/frm_6mxpxy" } }, {...} ], "has_more" : true }
$ curl https://api.riderhq.com/api/v2/events/ev_xx9zflx/entrants \ -u {account ID}:{private key} \ --data-urlencode entrytype_id="et_ekaekeleks" \/* (Optional. Can provide multiple params) Only entrants in specified entry type */--data-urlencode limit_int="2" \/* (Optional) Max number of values to return (default: 100) */--data-urlencode starting_after_id="en_kelaej0" \/* (Optional) { Entrant ID }: Start listing after this entrant (for multi-page results) */--data-urlencode starting_from_id="en_kelaej0" \/* (Optional) { Entrant ID }: Start listing from (including) this entrant (for multi-page results) */--data-urlencode include="q_8ekale1hm4,q_el2ngnln" \/* (Optional) Extra per-entrant fields to include in the response */--data-urlencode sort="lastname_txt, entered_on_day desc" \/* (Optional) valid values: lastname_txt|entered_on_day more */--data-urlencode filter="(entered_on_day>'21-jan-2000' or question[q_8jsao51hmt]='Every day')" \/* (Optional) fields: name_txt|entered_on_day Or custom questions like question[{ID}]= more */
{ "type" : "entrants", "data" : [ { "type" : "entrant", "id" : "en_oirdfsdvip", "first_names" : "John U", "last_name" : "Botelho", "email" : "7rsq9brahyqzg1r67@mailinator.com", "entered_on" : "2019-01-23", "last_modified" : "2018-11-30T11:19:36Z", "user" : { "type" : "user", "id" : "u_g3eqb5w", "first_names" : "Bagnol", "last_name" : "McEntrant", "email" : "7rsq9brahyqzg1r67@mailinator.com" }, "answers" : {/* Answers are only populated if you send one or more question ID parameters */"q_gnfg1lnhuo" : "Yes", "q_8jsao51hmt" : "1966-01-20", "q_t4510ucdp3" : "blah blah blah \nblah", } }, {...} } ], "has_more" : true }
$ curl https://api.riderhq.com/api/v2/groups?o=walton-festival \ -u {account ID}:{private key}
{ "type" : "groups", "data" : [ { "type" : "group", "id" : "grp_xx9zflx", "name" : "Jorvik Berry Club", "membershiptypes" : [ { "type" : "membershiptype", "id" : "gmt_5f0n0z", "name" : "Standard membership", "url" : "https://api.riderhq.com/api/v2/membershiptypes/gmt_5f0n0z"/* call url for more details on this membership type */}, { "type" : "membershiptype", "id" : "gmt_lox1t02", "name" : "Junior membership", "url" : "https://api.riderhq.com/api/v2/membershiptypes/gmt_lox1t02"/* call url for more details on this membership type */} ], "linkedmembershiptypes" : [ ] } ] }
$ curl https://api.riderhq.com/api/v2/membershiptypes/gmt_5f0n0z?o=walton-festival \ -u {account ID}:{private key}
{ "type" : "membershiptype", "id" : "gmt_5f0n0z", "name" : "Standard membership", "joinform" : { "type" : "form", "id" : "frm_ac32piq", "url" : "https://api.riderhq.com/api/v2/forms/frm_ac32piq"/* call url for details of this membership form */} }
$ curl https://api.riderhq.com/api/v2/groups/grp_xx9zflx/members \ -u {account ID}:{private key} \ --data-urlencode limit_int="2" \/* (Optional) Max number of values to return (default: 100) */--data-urlencode starting_after_id="gm_erickj0" \/* (Optional) { Member ID }: List starts after this member (for multi-page results) */--data-urlencode starting_from_id="en_kelaej0" \/* (Optional) { Entrant ID }: Start listing from (including) this member (for multi-page results) */--data-urlencode include="q_8jsao51hmt,q_gnfg1lnhuo" \/* (Optional) Extra per-member fields to include in the response */--data-urlencode sort="lastname_txt, joined_day desc" \/* (Optional) valid values: lastname_txt|expiry_day|joined_day more */--data-urlencode filter="(joined_day>'21-jan-2000' or question[q_8jsao51hmt]='Every day')" \/* (Optional) fields: name_txt|expiry_day|joined_day Or custom questions like question[{ID}]= more */
{ "api_type" : "members", "data" : [ { "api_type" : "member", "id" : "gm_tqye49", "firstnames" : "John", "lastname" : "Maquito", "email" : "rjeyjukd0c6@mailinator.com", "joinedday" : "2018-11-29", "expiryday" : "2019-11-28", "last_modified" : "2018-11-30T11:19:36Z", "user" : {/* The user (if any) who owns this membership */"type" : "user", "id" : "u_gew4ln", "first_names" : "Osiah", "last_name" : "Maquito", "email" : "rjeyjukd0c6@mailinator.com" }, "answers" : {/* Answers are only populated if you send one or more question ID parameters */"q_gnfg1lnhuo" : "Yes", "q_8jsao51hmt" : "1966-01-20", "q_t4510ucdp3" : "blah blah blah \nblah", } }, {...} } ], "has_more" : true, }
$ curl https://api.riderhq.com/api/v2/forms/frm_ac32piq?o=walton-festival \ -u {account ID}:{private key}
{ "type" : "form", "id" : "frm_ac32piq", "questions" : [ { "id" : "q_x4grjo79zy", "label" : "What is your best 5k time?",/* 'label' is the 'name' of the question that users filling in the form see */"type" : "duration",/* Must be one of: explanation|text|checkbox|paragraph|day|duration|dropdown|radio|richtext|imageupload|image|tabularvalues|isearch */"internalname" : null,/* You can set a short name here to help identify this question */"defaultvalue" : null,/* Must by compatible with the question type */"helptext" : null,/* Explanation text shown just below the question */"adminsonly" : false,/* If 'true' only admins of this account can view and edit this question */"mandatory" : false,/* If 'true' users must provide a value to submit the form */"hidden" : false,/* If 'true' this question not active on the form. Any dependant questions are inactive as well */"shared" : false,/* If 'true' this question is also used on other forms. Changes affect all forms */"shareid" : null }, {...}, ] }
We suffix field names with the the expected 'type' of data to make parsing easier
Here is a summary of the type suffixes we use and how to parse them
Suffix | Full name | Example | Notes |
---|---|---|---|
_txt | text | "hello" | A string value |
_html | HTML format text | "<a href='#'>link</a>" | A string value in HTML format |
_int | integer | 100 | An integer number, prefixed with sign if negative |
_dec | decimal | 100.00 | A decimal number, prefixed with sign if negative |
_hex | Hex | #55a4f2 | Hexadecimal value |
_pc | percent | 99 | Percentage |
_bool | boolean | true | An boolean value |
_enu | enum | "red" | String format. One of a closed set of possible values |
_day | day | "2019-10-11" | A string corresponding to a day-of-the-year in yyyy-mm-dd format |
_time | time | "20:01" | A string corresponding to a time of day (without timezone) in 24hr hh:mm format |
_tstamp | timestamp | "1970-01-01T00:00:00Z" | A string corresponding to an instant in RFC 822 format |
_dur | duration | "9982829918" | A numeric value - number of milliseconds |
_email | abc@def.com | A string value formatted as an email address | |
_tw | @address | @abc | A string value formatted as @address |
_mny | money | {"amount_int": 2300, "currency_enu": "GBP"} | An object corresponding to a monetary value amount is in smallest-denomination units (e.g. USD20.56 would be 2056, JPY3452 would be 3452) with currency |
_url | URL | "https://api.riderhq.com/api/reference" | A string value holding a url (including protocol, domain, path and, optionally, query string) |
_geo | Geo-coordinate | {lat_dec" : 51.355793,"lng_dec" : -0.30435,"ele_dec" : 516.0} | A value representing a Geo Coordinate with latitude, longitude and, optionally, elevation |
_id | ID | "ev_1abkeleiakekek" | A string value holding the ID of some api object |
You can request answers corresponding to custom questions you have defined on entry forms, join forms etc. in API responses.
You can also filter on custom question answer values and sort by answer values
number boolean text date timestamp time
Question type | Data type | Example |
---|---|---|
Explanation | null |
|
Text | text | question[q_dke3lake]='abc' |
Checkbox | boolean | question[q_dke3lake]=true |
Multiline text | text | question[q_dke3lake]='abc' |
Day | date | question[q_dke3lake]=1966-12-31 |
Duration | time | question[q_dke3lake]=04:22 |
Dropdown | text | question[q_dke3lake]='abc' |
Multiple choice | text | question[q_dke3lake]='abc' |
Rich text | text | question[q_dke3lake]='abc' |
Image upload | text | question[q_dke3lake]='abc' |
Image | text | question[q_dke3lake]='abc' |
Tabular values | text | question[q_dke3lake]='abc' |
Incremental search | text | question[q_dke3lake]='abc' |
If more records are available we will return a value of 'true' for the has_more_bool
parameter
Send a second, equivalent call with the addition of the starting_after_id
parameter or the starting_after_id
to retrieve the next page
--data-urlencode starting_after_id='ev_ab525asdf'"/* First record is the one following the one with id: 'ev_ab525asdf' */--data-urlencode starting_from_id='ev_ab525asdf'"/* First record is the one with id: 'ev_ab525asdf' */
Syntax for sorting the results is similar to SQL.
Specify an ordered list of sort fields, separated by commas. Use 'asc
' 'desc
' to indicate direction. The default, if direction is not specified, is 'asc'.
Sort fields can be the valid values suggested in the endpoint documentation, and/or custom question IDs (e.g. q_ekaleeeek,q_393lema
)
-data-urlencode sort="lastname_txt desc, firstnames_txt"
Syntax is similar to SQL expressions.
Join expressions with and
, or
, use parentheses to indicate precedence.
like <> >= <= = > <
( )
string number true false null
string
values must be enclosed in single quotes '
If a string
itself value contains one or more single quotes, escape each of them by prepending an additional single quote character.
The like
operator works as in SQL: include the % character as a zero-or-more-character wildcard e.g. lastname like '%mith'
matches 'Smith', 'Paisley-Smith', 'Hindemith' etc.
If you need to include a literal % character in the match string, escape it by prepending an additional % character e.g. question[q_abce12l] like '%400%%'
matches values: '3400%', 'over 400%' but not: 'over 4005'
If you need to include a literal ' character in the match string, escape it by prepending an additional ' character e.g. question[q_abce12l] like 'Women''s'
matches value: "Women's"
--data-urlencode filter="lastname_txt like '%cde' and (joined_day > '17-jan-2000' or expiry_day <= '17-jan-2025')" --data-urlencode filter="last_modified_tstamp <> '17-jan-2000'" --data-urlencode filter="last_modified_tstamp is null" --data-urlencode filter="question[q_dy61rzcf] ='1959-04-01'"