<< Click to Display Table of Contents >> Navigation: Journalytix API > Get Product User |
Description
The Get Product User API is used to fetch all the subscribed product user. These users can be expired or active product user.
Parameters
Company Username - Company Username of Company admin user in the Journalytix system
Company Password - password of the admin user for the company on the Journalytix system
API Code - API code for the company
User Type – Option to find Expired, Active or All User
Optional
Email – Registered Email Address of the customer
Validation Rules
Company User Name - Required.
Company Password - Required.
Company API code - Required.
Please Enter Correct User Email format.
User type is Required.
Request Parameters
Request Type – POST
- companyUserName
- companyPassword
- companyAPICode
- type
- Example - (“Expired”, ”Active”, ”All”)
- email - optional
Request – Success Response
- JSON List of Users
Request – Error Response
- 00: Technical Issue in API, Contact Jigsaw Support
- 01: Invalid username or password
- 02: API code not valid
- 03: IP Mismatch
- 04: Please Enter a valid type like Expired, Active or All
- 05: No Records Available
- 06: Company does not exist in member table
<?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( "companyUserName" => "testCompany", // Company Username "companyPassword" => "Test123", // Company Password "companyAPICode" => "xxxxxxxxx", // Company API Code "email" => "test@user.com", // Optional Employee Email Address "type" => "Expired", // Type supported - Expired, Active, All );
$url = 'https://app.journalytix.me/api/GetProductUser'; $make_call = callAPI($url, json_encode($data_array)); echo $make_call; ?> |
You can test your API credentials on this page: