This guide provides an intro to the check-in API. If you want to make a custom application for checking in attendees, this is the right place to start.
End-point: http://www.yoursite.com/tc-api/your_api_key_here/check_credentials
Purpose: Use this to check if api key is valid. We use it during the first / login screen
Example Call:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | $url = 'http://www.yoursite.com/tc-api/your_api_key_here/check_credentials'; $response = wp_remote_post( $url, array( 'method' => 'GET', 'timeout' => 45, 'redirection' => 5, 'httpversion' => '1.0', 'blocking' => true, 'headers' => array(), 'body' => '', 'cookies' => array() ) ); if ( is_wp_error( $response ) ) { echo "Something went wrong: ".$response->get_error_message(); } else { print_r( $response ); } |
Example Response 1 (api key is invalid):
1 2 3 | { "pass":false } |
Example Response 2 (api key is valid):
1 2 3 4 5 6 | { "pass":true, "license_key":"4DDGH-cMzNUjmTcd2uONA6AO2wyFjqzZJPglWnsy2YS6Y", "admin_email":"admin@example.com", "tc_iw_is_pr":true } |
In this response, you'll only use "pass" argument. In this case "pass": true means that api key is valid.
End-point: http://www.yoursite.com/tc-api/your_api_key_here/event_essentials
Purpose: Use this to get some basic information about the event like event name, location, number of tickets sold and number of checked-in attendees
Example Call:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | $url = 'http://www.yoursite.com/tc-api/your_api_key_here/event_essentials'; $response = wp_remote_post( $url, array( 'method' => 'GET', 'timeout' => 45, 'redirection' => 5, 'httpversion' => '1.0', 'blocking' => true, 'headers' => array(), 'body' => '', 'cookies' => array() ) ); if ( is_wp_error( $response ) ) { echo "Something went wrong: ".$response->get_error_message(); } else { print_r( $response ); } |
Example Response
1 2 3 4 5 6 7 8 | { "event_name":"Example Event", "event_date_time":"8th March 2017 12:15 am", "event_location":"Somewhere", "sold_tickets":995,//useful for pagination when you list attendees and tickets (see bellow) "checked_tickets":45, "pass":true } |
End-point: http://www.yoursite.com/tc-api/your_api_key_here/tickets_
Purpose: Use this to get a list of attendees / tickets and also custom field values
Example Call:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | $url = 'http://www.yoursite.com/tc-api/your_api_key_here/tickets_info/5/1/'; $response = wp_remote_post( $url, array( 'method' => 'GET', 'timeout' => 45, 'redirection' => 5, 'httpversion' => '1.0', 'blocking' => true, 'headers' => array(), 'body' => '', 'cookies' => array() ) ); if ( is_wp_error( $response ) ) { echo "Something went wrong: ".$response->get_error_message(); } else { print_r( $response ); } |
Example Response