I'm working with a client using ZOHO Recruit to manage his staffing agency. The form for candidates to submit their information is given by ZOHO as a simple embed code. However, for employers to submit their jobs, it must use ZOHO's API - which is beyond what i know how to do so far.

I'm all up for learning and have been looking for tutorials, but I can't find a good starting place to learn. Here is what ZOHO sent - anyone around to give me a starting place to know what to do with this?

http://www.zoho.com/recruit/api.html http://www.zoho.com/recruit/add-records.html

  • Are you trying to integrate ZOHO API data into WordPress, or merely embed an application? – Chip Bennett Nov 1 '11 at 19:16
  • I want to make available on one of my WordPress sites the option for an employer to add a job opening. I don't need to display the job openings themselves - but the form that allows an employer to submit a new job opening that then gets passed to ZOHO Recruit - that's what I need to display on the site. ZOHO responded with the two links above saying it is done using their API's, but I just don't know what to do with it (even though they give what I think are some pretty clear instructions!). – angiemeeker Nov 2 '11 at 12:42

Basically, what you'll need to do is XML-ize your data and POST it to the API URLs they provide. I'll start out with the basic request, and we can build on the solution if you want.

    $api_key = 'API_KEY'; // insert your API key here;
    $ticket = 'TICKET_ID'; // your ticket here (should be with your account);
    $data = 
        <row no='1'>
        <FL val='Posting title'>$job_title</FL>
        <FL val='Client'>$client</FL>
        <FL val='Assigned recruiter'>$recruiter_id</FL>
        <FL val='Job opening status'>$job_status</FL>
        <FL val='Number of positions'>$num_positions</FL>
        <FL val='Country'>$job_country</FL>
        <FL val='Roles and responsibilities'>$job_description</FL>


You'd need to populate those variables with the values you've collected from the user. Then, you need to make a POST request. You can use the WP_Http class for that:

    if( !class_exists( 'WP_Http' ) )
        include_once( ABSPATH . WPINC. '/class-http.php' );

    $url = "https://recruit.zoho.com/ats/private/xml/Module/addRecords?apikey=$api_key&ticket=$ticket";
    $request = new WP_Http;
    $result = $request->request( $url, array( 'method' => 'POST', 'body' => $data) );

Now, obviously you'll need to do some tweaking to add the data you'll need for your posting, and you'll need to handle the case that the request fails. But I hope this gives you a start (I can't guarantee the code will work 100%) - let me know and we can build on it!

  • To follow up, thank you for the responses. I had to have a developer work with me on this because I didn't feel like I could quickly enough work through your suggestions. From what he said though, they were correct! – angiemeeker Nov 14 '12 at 20:30
  • No problem - glad I was sorta right, at least! – Andy Adams Nov 15 '12 at 17:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.