Title: API call
Last modified: August 24, 2016

---

# API call

 *  [Patrick](https://wordpress.org/support/users/pskinner1972gmailcom/)
 * (@pskinner1972gmailcom)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/api-call/)
 * Hello,
 * I am trying to make simple API call on my WordPress site using the following 
   instructions here ([http://www.tourcms.com/support/api/mp/code/library_php.php](http://www.tourcms.com/support/api/mp/code/library_php.php))
 * This is so I can retrieve tour information back into my webiste. I’ve got to 
   the point where the test.php is working but I’m struggling to get the code working.
   I added thhe code below to my functions.php which returned an empty page ….?Please
   help
 *     ```
       add_action('inside_top_theloop', 'tourcms_custom_content');
       			function tourcms_custom_content(){
       				if (is_singular( 'holiday' ) ) {
       				include 'http://mywebsite.com/tourcms.php';
       				include 'http://mywebsite.com/config.php';
       				$tourcms = new TourCMS($marketplace_account_id, $api_private_key, "simplexml");
       				?><div>This is some data using API</div>
       				<?php $result = $tourcms->api_rate_limit_status($channel_id);
       				print  'Remaining hits: '.$result->remaining_hits;?>
   
       					<?php }
       }
       ```
   

The topic ‘API call’ is closed to new replies.

## Tags

 * [api](https://wordpress.org/support/topic-tag/api/)

 * 0 replies
 * 1 participant
 * Last reply from: [Patrick](https://wordpress.org/support/users/pskinner1972gmailcom/)
 * Last activity: [10 years, 11 months ago](https://wordpress.org/support/topic/api-call/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
