HCG Web Services Documentation
2 Nov 2011 • Version 1.0

Remote Tags for Jobs

These remote tags are designed to provide the ability to browse jobs and submit resumes through a simple tag placed in a remote website.

NOTE: Remote Tags are a restricted service and are intended for use only in websites owned by The Hain Celestial Group. They are not for general use. Please contact Jim Applegate if you need to set up access to Remote Tags.

Base URL : http://rtags.hcgweb.net/{version}/jobs/

The current version is v1.

The HTTP Method used is POST.

Available Tags:

General Notes

listing

Displays a listing of open job positions.

The data must be submitted via the POST method.

URL Format

http://rtags.hcgweb.net/{version}/jobs/listing

Parameter Required Description Options and Samples
version Yes The version of the rTag that you are using. Indicated as part of the URL. v1
listing-url No The URL for the listing page. This is used to build the links for changing the sort order. /careers/positions.php
Default: $_SERVER['PHP_SELF'];
detail-url No The URL for the detail pages. /careers/detail.php
Default: /careers/detail.php
location-id No The location ID to use to limit the list of positions. 123
Default: 0
category-id No The category ID to use to limit the list of positions. 123
Default: 0
order-by No The column that should be sorted for the display. JobNum = the Job Number column
Default: CategoryName
direction No The direction to sort the column asc or desc
Default: asc

*For security reasons, there is no mechanism for overriding templates directly from a remote server. Many modifications can be made using CSS, but if you need to make markup changes to a template, contact Jim Applegate to either modify the default template or add a new template to the list of options.

Example Pages

The example page below shows what the tag looks like in action.

Templates and CSS

The code

The code below shows how to place the remote tag into your website page using cURL and PHP. Other implementations are possible.

<?php
   $post_array = array();
   $post_vars = '';
   $ch = '';
   $output = '';
   $rtag_url = $server.'v1/jobs/listing';
   
   $config = array();
   $config['listing-url'] = '/docs/jobs/jobs-example-1.html';
   $config['detail-url'] = '/docs/jobs/jobs-example-2.html';
   // loc and cat can be passed in via GET or POST
   $config['location-id'] = (isset($_REQUEST['loc'])) ? $_REQUEST['loc'] : 0;
   $config['category-id'] = (isset($_REQUEST['cat'])) ? $_REQUEST['cat'] : 0;
   // col and dir will be passed in via a query string
   $config['order-by'] = (isset($_GET['col'])) ? $_GET['col'] : 'CategoryName';
   $config['direction'] = (isset($_GET['dir'])) ? $_GET['dir'] : 'asc';
   
   foreach ($config AS $key => $value)
      $post_array[] = $key.'='.$value;
   
   $post_vars = implode('&', $post_array);

   $ch = curl_init($rtag_url);
   curl_setopt($ch, CURLOPT_POST, 1);
   curl_setopt($ch, CURLOPT_POSTFIELDS, $post_vars);
   curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
   curl_setopt($ch, CURLOPT_HEADER, 0);
   curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
   $output = curl_exec($ch);
   curl_close($ch);
        
   echo $output;
?>

detail

Displays a job's detail page.

The data must be submitted via the POST method.

URL Format

http://rtags.hcgweb.net/{version}/jobs/detail

Parameter Required Description Options and Samples
version Yes The version of the rTag that you are using. Indicated as part of the URL. v1
job-id Yes The job ID number. 123
listing-url No The URL for the listing page. /careers/positions.php
Default: /careers/positions.php
resume-url No The URL for the Submit Your Resume page. /careers/submit_resume.php
Default: /careers/submit_resume.php
friend-url No The URL for the Email to a Friend page. /careers/email.php
Default: /careers/email.php
print-url No The URL for the Print-Friendly page. /careers/print.php
Default: /careers/print.php
print No A boolean indicating whether this is for a printer-friendly details page. It excludes certail page items like the buttons. 1
Default: 0

*For security reasons, there is no mechanism for overriding templates directly from a remote server. Many modifications can be made using CSS, but if you need to make markup changes to a template, contact Jim Applegate to either modify the default template or add a new template to the list of options.

Example Pages

The example page below shows what the tag looks like in action.

Templates and CSS

The code

The code below shows how to place the remote tag into your website page using cURL and PHP. Other implementations are possible.

<?php
   $post_array = array();
   $post_vars = '';
   $ch = '';
   $output = '';
   $rtag_url = $server.'v1/jobs/detail';
   
   $config = array();
   // jid is passed in via the query string and is required.
   $config['job-id'] = $_GET['jid'];
   $config['listing-url'] = '/docs/jobs/jobs-example-1.html';
   $config['resume-url'] = '/docs/jobs/jobs-example-4.html';
   $config['friend-url'] = '/docs/jobs/jobs-example-3.html';
   $config['print-url'] = '/docs/jobs/jobs-example-2.html';
   // print might be hard-wired if you have a unique print page, but it
   // is being passed in because we are using the same details page.
   $config['print'] = (isset($_GET['print'])) ? $_GET['print'] : 0;
   
   foreach ($config AS $key => $value)
      $post_array[] = $key.'='.$value;
   
   $post_vars = implode('&', $post_array);

   $ch = curl_init($rtag_url);
   curl_setopt($ch, CURLOPT_POST, 1);
   curl_setopt($ch, CURLOPT_POSTFIELDS, $post_vars);
   curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
   curl_setopt($ch, CURLOPT_HEADER, 0);
   curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
   $output = curl_exec($ch);
   curl_close($ch);
        
   echo $output;
?>

emailToAFriend

Displays a form to allow a user to send info about a job opening to a friend.

The data must be submitted via the POST method.

URL Format

http://rtags.hcgweb.net/{version}/jobs/emailToAFriend

Parameter Required Description Options and Samples
version Yes The version of the rTag that you are using. Indicated as part of the URL. v1
job-id Yes The job ID number. 123
action Yes The action URL for the Email to a Friend form. /careers/submit_resume.php
listing-url No The URL for the listing page. /careers/positions.php
Default: /careers/positions.php
detail-url No The URL for the detail pages.This needs to be a full URL as it will end up in the email, directing the friend back to the site. http://www.hain-celestial.com/careers/detail.php
Default: http://www.hain-celestial.com/careers/detail.php
mail-tpl No The template used to send the info to the friend. friend_mail
Default: friend_mail
thank-you No The page that we should go to to thank the user. There is a default thank you that will display if this is left blank, but this allows you to create a special message if desired. This should be a full URL. http://example.com/thank-you
Default: #

*For security reasons, there is no mechanism for overriding templates directly from a remote server. Many modifications can be made using CSS, but if you need to make markup changes to a template, contact Jim Applegate to either modify the default template or add a new template to the list of options.

Example Pages

The example page below shows what the tag looks like in action.

Templates and CSS

The code

The code below shows how to place the remote tag into your website page using cURL and PHP. Other implementations are possible.

<?php
   $post_array = array();
   $post_vars = '';
   $ch = '';
   $output = '';
   $rtag_url = $server.'v1/jobs/emailToAFriend';
   
   $config = array();
   // jid is passed in via the query string and is required.
   $config['job-id'] = $_GET['jid'];
   $config['action'] = $_SERVER['PHP_SELF'];
   $config['listing-url'] = '/docs/jobs/jobs-example-1.html';
   $config['detail-url'] = $base_url.'docs/jobs/jobs-example-2.html';
   $config['mail-tpl'] = 'friend_mail';
   $config['thank-you'] = '';
   
   foreach ($config AS $key => $value)
      $post_array[] = $key.'='.$value;
   
   foreach ($_POST AS $key => $value)
      $post_array[] = $key.'='.$value;

   $post_vars = implode('&', $post_array);

   $ch = curl_init($rtag_url);
   curl_setopt($ch, CURLOPT_POST, 1);
   curl_setopt($ch, CURLOPT_POSTFIELDS, $post_vars);
   curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
   curl_setopt($ch, CURLOPT_HEADER, 0);
   curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
   $output = curl_exec($ch);
   curl_close($ch);
        
   echo $output;
?>

submitResume

Displays and processes the EEO form and the Submit a Resume form. The EEO form must be filled out before a resume can be submitted.

The data must be submitted via the POST method.

URL Format

http://rtags.hcgweb.net/{version}/jobs/submitResume

Parameter Required Description Options and Samples
version Yes The version of the rTag that you are using. Indicated as part of the URL. v1
action Yes The action URL for the EEO and resume forms. /careers/submit_resume.php
home-url No The URL for the careers home page. /careers/index.php
Default: /careers/index.php
listing-url No The URL for the job listing page. /careers/positions.php
Default: /careers/positions.php
detail-url No The URL for the job listing page. /careers/detail.php
Default: /careers/detail.php
job-id No The job ID number. 123
Default: 0
location-id No The location ID number. 123
Default: 0
category-id No The category ID number. 123
Default: 0
forward-mail-tpl No The template used to forward the resume internally. submit_resume_mail
Default: submit_resume_mail
reply-mail-tpl No The template used to reply to the person who submitted the resume. submit_resume_reply
Default: submit_resume_reply
thank-you No The page that we should go to to thank the user. There is a default thank you that will display if this is left blank, but this allows you to create a special message if desired. This should be a full URL. http://example.com/thank-you
Default: #

*For security reasons, there is no mechanism for overriding templates directly from a remote server. Many modifications can be made using CSS, but if you need to make markup changes to a template, contact Jim Applegate to either modify the default template or add a new template to the list of options.

Example Pages

The example page below shows what the tag looks like in action.

Templates and CSS

The code

The code below shows how to place the remote tag into your website page using cURL and PHP. Other implementations are possible.

<?php
   $post_array = array();
   $post_vars = '';
   $ch = '';
   $output = '';
   $rtag_url = $server.'v1/jobs/submitResume';
   
   $config = array();
   $config['action'] = '/docs/jobs/jobs-example-4.html';
   $config['home-url'] = '/docs/jobs/jobs-example-6.html';
   $config['listing-url'] = '/docs/jobs/jobs-example-1.html';
   $config['detail-url'] = '/docs/jobs/jobs-example-2.html';
   // jid is passed in via the query string but is not required in cases
   // where the submission is unsolicited.
   $config['job-id'] = (isset($_GET['jid'])) ? $_GET['jid'] : 0;
   // loc and cat can be passed in via GET or POST
   $config['location-id'] = (isset($_REQUEST['loc'])) ? $_REQUEST['loc'] : 0;
   $config['category-id'] = (isset($_REQUEST['cat'])) ? $_REQUEST['cat'] : 0;
   $config['forward-mail-tpl'] = 'submit_resume_mail';
   $config['reply-mail-tpl'] = 'submit_resume_reply';
   $config['thank-you'] = '';
   
   foreach ($config AS $key => $value)
      $post_array[] = $key.'='.$value;
   
   foreach ($_POST AS $key => $value)
      $post_array[] = $key.'='.$value;

   $post_vars = implode('&', $post_array);

   $ch = curl_init($rtag_url);
   curl_setopt($ch, CURLOPT_POST, 1);
   curl_setopt($ch, CURLOPT_POSTFIELDS, $post_vars);
   curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
   curl_setopt($ch, CURLOPT_HEADER, 0);
   curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
   $output = curl_exec($ch);
   curl_close($ch);
        
   echo $output;
?>

search

Generates an search form where the user can choose a location and category to limit their list of open positions.

The data must be submitted via the POST method.

URL Format

http://rtags.hcgweb.net/{version}/jobs/search

Parameter Required Description Options and Samples
version Yes The version of the rTag that you are using. Indicated as part of the URL. v1
action Yes The action URL for the listing page which processes the search request. /careers/positions.php
resume-url No The URL for the Submit Your Resume page. /careers/submit_resume.php
Default: /careers/submit_resume.php

*For security reasons, there is no mechanism for overriding templates directly from a remote server. Many modifications can be made using CSS, but if you need to make markup changes to a template, contact Jim Applegate to either modify the default template or add a new template to the list of options.

Example Pages

The example page below shows what the tag looks like in action.

Templates and CSS

The code

The code below shows how to place the remote tag into your website page using cURL and PHP. Other implementations are possible.

<?php
   $post_array = array();
   $post_vars = '';
   $ch = '';
   $output = '';
   $rtag_url = $server.'v1/jobs/search';
   
   $config = array();
   $config['action'] = '/docs/jobs/jobs-example-1.html';
   $config['resume-url'] = '/docs/jobs/jobs-example-4.html';
   
   foreach ($config AS $key => $value)
      $post_array[] = $key.'='.$value;
   
   $post_vars = implode('&', $post_array);

   $ch = curl_init($rtag_url);
   curl_setopt($ch, CURLOPT_POST, 1);
   curl_setopt($ch, CURLOPT_POSTFIELDS, $post_vars);
   curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
   curl_setopt($ch, CURLOPT_HEADER, 0);
   curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
   $output = curl_exec($ch);
   curl_close($ch);
        
   echo $output;
?>

unsolicited

Generates an unsolicited jobs form where the user can choose a location and category to get started.

The data must be submitted via the POST method.

URL Format

http://rtags.hcgweb.net/{version}/jobs/unsolicited

Parameter Required Description Options and Samples
version Yes The version of the rTag that you are using. Indicated as part of the URL. v1
action Yes The action URL for the Submit a Resume form which processes the results of this tag. /careers/resume.php

*For security reasons, there is no mechanism for overriding templates directly from a remote server. Many modifications can be made using CSS, but if you need to make markup changes to a template, contact Jim Applegate to either modify the default template or add a new template to the list of options.

Example Pages

The example page below shows what the tag looks like in action.

Templates and CSS

The code

The code below shows how to place the remote tag into your website page using cURL and PHP. Other implementations are possible.

<?php
   $post_array = array();
   $post_vars = '';
   $ch = '';
   $output = '';
   $rtag_url = $server.'v1/jobs/unsolicited';
   
   $config = array();
   $config['action'] = '/docs/jobs/jobs-example-4.html';
   
   foreach ($config AS $key => $value)
      $post_array[] = $key.'='.$value;
   
   $post_vars = implode('&', $post_array);

   $ch = curl_init($rtag_url);
   curl_setopt($ch, CURLOPT_POST, 1);
   curl_setopt($ch, CURLOPT_POSTFIELDS, $post_vars);
   curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
   curl_setopt($ch, CURLOPT_HEADER, 0);
   curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
   $output = curl_exec($ch);
   curl_close($ch);
        
   echo $output;
?>