<< Click to Display Table of Contents >> Navigation: Journalytix API > Change Product User |
Description
The Change Product User API is used to change the expiry date of the already subscribed product expire date. The Jigsaw Products are assigned to the companies by a Jigsaw Trading Administrator, so they can distribute to their customers.
Parameters
Company Username - Company Username of admin user for the company 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
Email – Registered Email Address of the customer
Product ID – Registered User Product ID
Expire Date – New Expiry Date for the Subscribed Product of the Registered Customer
Validation Rules
Company User Name Required.
Company Password Required.
Company API code Required.
User Email Required.
Please Enter Correct User Email format.
Expiry Date Required.
Expiry Date must be format YYYY-MM-DD.
Expiry Date must be a date format.
Expiry Date must after today date.
Expiry Date must be before 2037-12-31.
Product Id Required.
Please enter Product Id in number digits only.
Request Parameters
Request Type – POST
- companyUserName
- companyPassword
- companyAPICode
- productId
- expireDate
Request – Success Response
- User Expiry Date Changed
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: Product X not allowed for modification
- 05: User with email - abc@example.com is not your employee. Please invite the user using Invite API.
- 06: User with email - abc@example.com is disabled. Please make the user active from Manage Traders Menu under Tools Menu in Company Journalytix Account.
- 07: User with email - abc@example.com is in pending status. Please ask user to accept your company invitation sent on their email.
- 08: User with email - abc@example.com is in rejected state. Please invite the user again using Invite API.
- 09: User with email - abc@example.com is not found in our system. Please register this user using CreateProductUser API
- 10: No subscription found for product X. Please use CreateProductUser API to assign product subscription to current user
- 11: 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", // Employee Email Address "productId" => "53", // Product ID assigned "expireDate" => "2027-12-31" // Expiry Date );
$url = 'https://app.journalytix.me/api/ChangeProductUser'; $make_call = callAPI($url, json_encode($data_array)); echo $make_call; ?> |
You can test your API credentials on this page: