<< Click to Display Table of Contents >> Navigation: Journalytix API > Invite Customer/Employee |
The Invite Customer/Employee API is used to invite existing Journalytix users to participate in your companies' Journalytix. You will be able to see their full history and log on as that user. An email will be sent to the user and he will need to click an approval link before you will see them on your side.
The parameters to send to register a customer are as follows:
Company ID - admin user id of company on the Journalytix system
Company Password - password of the admin user for the company on the Journalytix system
API Code - API code for the company
Employee Email Address - Email address of Employee to Invite
Account Provider ID - Provider ID of the account (e.g CQG, GAIN, IBTWS, JIGSAW_SIM, MT4, MT5, NT8, Rithmic, Tradovate, TTAPI, TTRESTAPI)
Account Name - Account number of the account
Account Provider ID and Account Name are optional.
Account Provider Id and Account Name will only be allowed if the email address already belongs to an existing member/user of Journalytix. For registering completely new members use Register Customer/Employee.
Note that if user accepts, the user will be either permanently assigned as an employee or for the number of days set in "Default Account Days" in Company Settings.
All inputs are mandatory.
Error Codes
01 - Technical Issue Sending Email, Contact Jigsaw Support
02 - API Code Not Valid
03 - Invalid Company User Name or Password
04 - Not All Properties Have a Value
05 - Account Details not Allowed for Unregistered Emails
06 - Account Does not Belong to This Company
Success Code
"Email Sent"
Sample PHP Code for Posting to the API is here
<?php ini_set('error_reporting', '1');
function callAPI($url, $data){ $curl = curl_init(); curl_setopt($curl, CURLOPT_POST, 1); if ($data) curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
// OPTIONS: curl_setopt($curl, CURLOPT_URL, $url); curl_setopt($curl, CURLOPT_HTTPHEADER, array( 'Content-Type: application/json', ));
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
// EXECUTE: $result = curl_exec($curl); if(!$result){die("Connection Failure");} curl_close($curl); return $result; }
$data_array = array( "empCompanyUserName" => "testCompany", // Company Username "empCompanyPassword" => "Test123", // Company Password "empCompanyApiCode" => "xxxxxxxxx", // Company API Code "empEmail" => "test@user.com", // Employee Email Address "accProvider" => "IBTWS", // Optional Field For AccountProvider ID like Rihtmic,MT4,MT5 etc "accountName" => "test1" // Optional Field for AccountName );
$url = 'http://app.journalytix.com/api/sendInvite'; $make_call = callAPI($url, json_encode($data_array)) echo $make_call; /*
Errors List "01"=>"Technical Issue Sending Email, Contact Jigsaw Support" "02"=>"API Code Not Valid" "03"=>"Invalid Company User Name or Password" "04"=>"Not All Properties Have a Value" "05"=>"Account Details Not Allowed for Unregistered Emails" "06"=>"Account does not belong to this Company"
Success Response "Email Sent" */
?>
|
You can test adding a customer via the API here: