Welcome!

J2T Reward API

More Views

J2T Reward API

Add-on for J2T Points & Rewards module

Availability: In stock

€24.99

Be the first to review this product

Related Products

Check items to add to the cart or select all

J2T Reward API, allow access and modification of points within Magento® web service!
Note that this module only works with J2T Points & Rewards 1.5.20 or greater.

How convenient is it to be able to add or remove points to a customer from any application that can use web services and make web services calls. For example, you could have a physical store and would like to
- add points to a customer that buys from your store
- check the available points the customer has
- remove points to the customer account when he or she uses the points from the physical store!

IMPORTANT: version 1.0.3 or greater will only be compatible with J2T Point & Rewards v1.8.0 or greater
€24.99

j2t-modules

  • Lowest price on the market for our modules

  • Free support available as well as extended support

  • High quality development with best Magento integration

Details

J2T Reward API, allow access and modification of points within Magento® web service!
Note that this module only works with J2T Points & Rewards 1.5.20 or greater. 

How convenient is it to be able to add or remove points to a customer from any application that can use web services and make web services calls. For example, you could have a physical store and would like to add points to a customer that buys from your store, check the available points the customer has and even remove points to the customer account when he or she uses the points from the physical store!

Intrunctions

Create an webservice access user and connect to Magento® webservice

$proxy = new SoapClient('http://your_magento_url/api/soap/?wsdl');
$sessionId = $proxy->login('api_login', 'api_key');

How to get customer points

Note that if points are configured to be used in global scope, results will be similar on all stores
$customerId = 1;
$storeId = 1;
var_dump($proxy->call($sessionId, 'j2trewardapi.info', array($customerId, $storeId)));

>> return value will be:

array(5) {
  ["current"]=>  string(2) "96" //points that the customer can use
  ["received"]=>  string(3) "146" //points history total amount
  ["spent"]=>  string(2) "50" //points used by the customer
  ["waiting"]=>  string(1) "0" //points waiting for validation
  ["lost"]=>  string(1) "0" // points lost (out of date)
}

How to get customer points

$storeId = 1;
$filter = array("main_table.customer_id" => "1");
var_dump($proxy->call($sessionId, 'j2trewardapi.list', array($storeId, $filter)));

How to add points

$customer_id = 1; 
$storeIds = "1,2"; 
$points = 20;
$proxy->call($sessionId, 'j2trewardapi.add', array($customer_id, $points, $storeIds));

How to remove points

$customer_id = 1; 
$storeIds = "1,2"; 
$points = 50;
$proxy->call($sessionId, 'j2trewardapi.remove', array($customer_id, $points, $storeIds));

Custom points allocation

You may want to add points with specific order id to the system. This can be done as the following. Note that you will need to use incremental order id. The date must be in the following format: YYYY-DD-MM

$customer_id = 1; 
$storeIds = "1,2"; 

//to add points
$proxy->call($sessionId, 'j2trewardapi.create', array(array('customer_id' => '1', 'order_id' => '12345', 'date_start' => '2012-23-03', 'points_current' => '20', 'store_id' => '1,2')));

//to remove points
$proxy->call($sessionId, 'j2trewardapi.create', array(array('customer_id' => '1', 'order_id' => '12345', 'date_start' => '2012-23-03', 'points_spent' => '20', 'store_id' => '1,2')));

You may also be interested in the following product(s)

J2T Points & Rewards

J2T Points & Rewards

€49.99
     

1.0.x versions

* 1.0.3: update for J2T Points & Rewards 1.8.x compatibility
* 1.0.2: update of J2t_All
* 1.0.1: Code improvements
* 1.0.0: first release

  1. Check if you have properly installed J2T Points & Rewards first
  2. Uncompress module folder to your Magento® root directory
  3. Create a web service user (if this has not been already done)
  4. Flush your Magento® cache
  5. Log out and log back to admin 
  6. start using the module
No

Write Your Own Review

Only registered users can write reviews. Please, log in or register

Contact Us

Contact Information

Please check our FAQ before contacting us. You might be able to find a answer to your question there.

Message details

FTP Details (Only for "professionnal installation" or "technical support" option)

Message details

Note that our team usually reply to emails within 1 to 3 working days (mon-fri). If for some reasons, you don't have any replies within this time, please kindly send back a new message to us and we'll try to reply asap.

Also note that support is exclusively done in English.

* Required Fields

You might also like