Integrate ZOHO Recruit API?

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?

Read More

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

Related posts

Leave a Reply

1 comment

  1. 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.

    <?php
        $api_key = 'API_KEY'; // insert your API key here;
        $ticket = 'TICKET_ID'; // your ticket here (should be with your account);
        $data = 
            "<JobOpenings>
            <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>
            </row>
            </JobOpenings>";
    
        ?>
    

    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:

    <?php
        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!