Welcome!

J2T Giftvoucher API

More Views

J2T Giftvoucher API

Add-on for J2T Gift Voucher's 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 Gift Voucher API, allow access and modification of vouchers within Magento® web service!
Note that this module only works with J2T Points & Rewards 1.1.1 or greater.

How convenient is it to be able to add or remove vouchers 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 update vouchers and/or create one according to requirements, check the amout left in order to use it from the physical store!

* Required Fields

€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 Gift Voucher API, allow access and modification of vouchers within Magento® web service!
Note that this module only works with J2T Points & Rewards 1.1.1 or greater. 

How convenient is it to be able to add or remove vouchers 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 update vouchers and/or create one according to requirements, check the amout left  in order to use it 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 vouchers

$customerId = 1;
var_dump($proxy->call($sessionId, 'j2tgiftvoucherapi.info', array($customerId)));

>> return value will be:

array
0 =>
array
'id' => string '1' (length=1)
'product_id' => string '168' (length=3)
'customer_id' => string '1' (length=1)
'recipient_name' => string 'Xxx X' (length=5)
'recipient_email' => string 'xxxxxxxxxxxxxx@xxxxxxx.xxx' (length=26)
'message' => string 'Your gift card' (length=14)
'voucher_code' => string 'QMHI41QHBV1Z' (length=12)
'voucher_date' => string '2014-03-04' (length=10)
'voucher_date_end' => null
'voucher_amount' => string '0.0000' (length=6)
'voucher_base_amount' => string '60.0000' (length=7)
'voucher_base_currency' => string 'USD' (length=3)
'voucher_order_currency' => string 'USD' (length=3)
'voucher_store_currency' => string '1' (length=1)
'voucher_base_rate' => string '1.0000' (length=6)
'voucher_order_rate' => string '1.0000' (length=6)
'voucher_current_base_amount' => string '60.0000' (length=7)
'order_id' => string '6' (length=1)
'quote_id' => string '35' (length=2)
'order_item_id' => string '9' (length=1)
'valid' => string '1' (length=1)
'send_email' => null
'send_post' => null
'store_id' => string '0' (length=1)

How to get customer vouchers

$filter = array("customer_id" => "1", "voucher_code" => "IV61KWMXNEA3");
var_dump($proxy->call($sessionId, 'j2tgiftvoucherapi.list', array($filter)));

How to add vouchers

$customer_id = 1;
$recipient_name = "My Friend";
$recipient_email = "myfriendemail@example.com";
$message = "Your message";
$from_name = "Your Friend";
$voucher_date = "2014-01-01";
$voucher_date_end = null;
$voucher_base_amount = "30"; //voucher base amount
$voucher_current_base_amount = "30"; //current base amount available
$voucher_code = null;
$product_id = 168;
$valid = 1;
$notify = 1;

$proxy->call($sessionId, 'j2tgiftvoucherapi.add', array($customer_id, $recipient_name, $recipient_email, $message, $from_name, $voucher_date, $voucher_date_end, $voucher_base_amount, $voucher_current_base_amount, $voucher_code, $product_id, $valid, $notify));

How to remove vouchers

$customer_id = 1;
$voucher_code = 'VP2RHDHR4UB0';
$proxy->call($sessionId, 'j2tgiftvoucherapi.remove', array($customer_id, $voucher_code));

How to update vouchers

$proxy->call($sessionId, 'j2tgiftvoucherapi.update', array(array('id' => '1', 'product_id' => 168, 'customer_id' => 1, 'voucher_code' => 'QMHI41QHBV1Z', 'voucher_date_end' => '2014-03-23')));

>> id, product_id and customer_id are required values. It is possible to update all other field. Note that date format is YYYY-MM-DD and if you'd like to regenerate coupon code, you need to set 'voucher_code' to null.

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

J2T Gift Voucher

J2T Gift Voucher

€47.99
     

1.0.x versions

* 1.0.0: first release

  1. Check if you have properly installed J2T Gift Voucher module 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