GRS- Carlton One Gift Card Integration Document

Written By Devin O'Neill ()

Updated at April 17th, 2025

Regions

Region Region ID
Europe r1
North America r2
Asia Pacific r3

Authentication Fields

The following fields are used for authentication.

Field Value
Member ID Admin
API Token nIFtzvxxwKvxrACpPbfiFDuWUGntSTPb
GRS API URL https://annexclouddemo.annexcloud.p2motivate.com/client/json.php
 

Member APIs

First, create an object of the GRS library file, and access the GRS member APIs.

In this library, three APIs are used for member operations:

Get Member Details

File GRS.php
Method getSubordinateAccount($member_id,$pin)
Description Retrieves member details.
Input Parameters

$member_id=”admin”; (A constant value)

$pin=”s.allie.grater@gmail.com”; (The subordinate member identifier, such as Employee ID, Username, or Email)

Add Member Details

File GRS.php
Method createSubordinateAccount($member_id,$data)
Description Add member details to the GRS.
Input Parameters

$member_id=”admin”; - (A constant value)

$data= Data array of member fields:

Data $data = array(
"employeeId" => "nitinpatil@test.com",
"firstName" => "Nitin",
"lastName" => "Aher",
"email" => "nitinpatil@test.com",
"address1" => "16, Somewhere Blvd.",
"address2" => "",
"city" => "Toronto",
"postalCode" => "P0B0X1",
"provinceState" => "ON",
"country" => "CA",
"telephone" => "000 000 0000",
"language" => "en",
"hireDate" => "2022-03-30",
"hierarchyNodeCode" => "ROOT",
"accessGroups" => array(0 => "defaultStorefrontExternalMember")
);

Update Member Details

File GRS.php
Method updateSubordinateAccount($member_id,$data)
Description Update existing GRS member details.
Input Parameters

$member_id=”admin”;(A constant value)

$data= Data array of member fields:

Data

$data = array(
"id" => "XQPG1040",
"employeeId" => "nitinpatil@test.com",
"firstName" => "Nitin",
"lastName" => "Patil",
"email" => "nitinpatil@test.com",
"address1" => "16, Somewhere Blvd.",
"address2" => "",
"city" => "Toronto",
"postalCode" => "P0B0X1",
"provinceState" => "ON",
"country" => "CA",
"telephone" => "000 000 0000",
"language" => "en",
"hireDate" => "2022-02-09",
"hierarchyNodeCode" => "ROOT"
);

Note: Use the "Get Member Details" API to fetch the member's ID, which is required for the update.

GRS APIs

Create an object of the GRS library file, to access the GRS APIs.
The GRS library contains the following APIs:

Get Member Account

File GRS.php
Method getMemberAccount($member_id)
Description Retrieves the account details of the currently authenticated member.
Input Parameter $member_id=”admin”; (A constant value)

Get Members under Administration

File GRS.php
Method getMembersUnderAdministration($member_id)
Description Retrieves the PINs of the subordinate members under the current authenticated member.
Input Parameter $member_id=”admin”; (A constant value)

Create Subordinate Account

File GRS.php
Method createSubordinateAccount($member_id,$data)
Description Add subordinate member details to the GRS.
Input Parameters

$member_id=”admin”; (A constant value)

$data= Data array of member fields

Data

$data= array("employeeId" => "nitinpatil@test.com",

"firstName" => "Nitin",

"lastName" => "Aher",

"email" => "nitinpatil@test.com",

"address1" => "16, Somewhere Blvd.",

"address2" =>"" ,

"city" => "Toronto",

"postalCode" => "P0B0X1",

"provinceState" => "ON" ,

"country" => "CA",

"telephone" => "000 000 0000",

"language" => "en",

"hireDate" => "2022-03-30",

"hierarchyNodeCode" => "ROOT",

"accessGroups" => array(0=>"defaultStorefrontExternalMember"));

Update Subordinate Account

File GRS.php
Method updateSubordinateAccount($member_id,$data)
Description Update existing subordinate member details.
Input Parameters

$member_id=”admin”; (A constant value)

$data= Data array of member fields

Data

$data= array("id"=>"XQPG1040",

"employeeId" => "nitinpatil@test.com",

"firstName" => "Nitin",

"lastName" => "Patil",

"email" => "nitinpatil@test.com",

"address1" => "16, Somewhere Blvd.",

"address2" =>"" ,

"city" => "Toronto",

"postalCode" => "P0B0X1",

"provinceState" => "ON" ,

"country" => "CA",

"telephone" => "000 000 0000",

"language" => "en",

"hireDate" => "2022-02-09",

"hierarchyNodeCode" => "ROOT");

Note: Use the "Get Member Details" API to retrieve the member ID, which is required for the update.

Get Subordinate Account

File GRS.php
Method getSubordinateAccount($member_id,$pin)
Description Retrieves the details of a subordinate member.
Input Parameters

$member_id=”admin”; (A constant value)

$pin=”s.allie.grater@gmail.com”; (The subordinate member identifier, such as PIN, Employee ID, Username, or Email)

Create Subordinate Account Extended

File GRS.php
Method createSubordinateAccountExtended($member_id,$data)
Description Add subordinate member details to the GRS with additional parameters.
Input Parameters

$member_id=”admin”; (A constant value)

$data= Data array of member fields

Data $data = array(
'employeeId' => '123456',
'firstName' => 'John',
'lastName' => 'Doe',
'email' => 'johndoe@example.org',
'address1' => '10 Somewhere Blvd.',
'address2' => '',
'city' => 'Toronto',
'postalCode' => 'P0B0X1',
'provinceState' => 'ON',
'country' => 'CA',
'tel_countrycode' => '1',
'tel_areacode' => '000',
'telephone' => '0000000',
'language' => 'en',
'hireDate' => '2012-01-01',
'accessGroups' => array(0 => 'Manager'),
'hierarchyNodeCode' => 'Home',
'hierarchyRoles' => array(0 => array('hierarchyRoleId' => 'District Manager', 'hierarchyNodeCode' => 'IT', 'hierarchyRoleNodeAccess' => 2)),
'metadata' => array(
0 => array('id' => 'Region', 'name' => 'Region', 'data' => 'East'),
1 => array('id' => 'Sector', 'name' => 'Sector', 'data' => 'InformationTechnology')
),
'administratorRole' => array(0 => array('hierarchyNodeCode' => 'Home', 'administratorRoleNodeAccess' => 2)),
'sendWelcomeLetter' => true
);

Update Subordinate Account Extended

File GRS.php
Method UpdateSubordinateAccountExtended($member_id,$data)
Description Update existing subordinate member details with extended parameters.
Input Parameters

$member_id=”admin”; - It is a constant value

$data= Data array of member fields

Data

$data= array('id'=>'XQPG1141',

'employeeId'=>'123456',

'firstName'=>'John',

'lastName'=>'Doe',

'email'=>'johndoe@example.org',

'address1'=>'10 Somewhere Blvd.','address2'=>'',

'city'=>'Toronto',

'postalCode'=>'P0B0X1',

'provinceState'=>'ON',

'country'=>'CA',

'tel_countrycode'=>'1',

'tel_areacode'=>'000',

'telephone'=>'0000000',

'language'=>'en',

'hireDate'=>'2012-01-01',

'accessGroups'=>array(0=>'Manager'),

'hierarchyNodeCode'=>'Home',

'hierarchyRoles'=>array(0=>array('hierarchyRoleId'=>'District Manager','hierarchyNodeCode'=>'IT',

'hierarchyRoleNodeAccess'=>2)),

'metadata'=>array(0=>array('id'=>'Region',

'name'=>'Region',

'data'=>'East',),

1=>array('id'=>'Sector',

'name'=>'Sector',

'data'=>'InformationTechnology')),

'administratorRole'=>array(0=>array('hierarchyNodeCode'=>'Home',

'administratorRoleNodeAccess'=> 2)),

'sendWelcomeLetter'=> true);

Note: Use the "Get Member Details" API to retrieve the member ID, which is required for the update.

Get Subordinate Orders

File GRS.php
Method getSubordinateOrders($member_id,$UniquePin)
Description Retrieves the orders of a subordinate member.
Input Parameters

$member_id=”admin”; (A constant value)

$UniquePin=”s.allie.grater@gmail.com”;(The subordinate member identifier, such as PIN, Employee ID, Username, or Email)

Credentials

File Paths:

  • Production: www_prod/www/api/grs/GRS.php

Note: Please refer below files for reference

www_prod/www/api/grs/getMember.php
www_prod/www/api/grs/createUpdateMember.php