<?php

error_reporting(E_ALL);
ini_set('display_errors', 'On');
require_once 'config.php';
/** initialize and configure Services_WorkXpress objects **/
// get the configuration settings
$app_role = Services_WorkXpress::APPLICATION_ROLE_OCD;
$api_version = $services_workxpress_config['api_version'];
$auth_key = $services_workxpress_config[$app_role]['auth_key'];
$remote_host = $services_workxpress_config[$app_role]['remote_host'];
// load the Services_WorkXpress object
$workxpress = new Services_WorkXpress();
$workxpress->setAPIVersion($services_workxpress_config['api_version']);
$workxpress->setAuthKey($services_workxpress_config[$app_role]['auth_key']);
$workxpress->setRemoteHost($services_workxpress_config[$app_role]['remote_host']);
// load the request object
$request = $workxpress->loadRequest('LookupData', Services_WorkXpress::REQUEST_TYPE_MASS);
/** build the request **/
// add items to the request
$request->addItem(1);
$request->addItem(2);
// add fields to the request
$request->addField(3100);
$request->addField(3101);
$request->addField(102);
// add relations to the request
$request->addRelation(134, 'base');
/** make the API call **/
try {
    // make the call and get the data array