Presentation and configuration

HikaSerial have a consume feature which allow to make specific action when the customer wants to use it.
The consume feature could be configure per pack, as the webservice access one.

  • Set consume serials to yes if you want to have a consume action for this pack
  • Set Webservice access to yes if you want to use webservices

Consuming

HikaSerial contains a module for the consumption. This module will display an input box where the user will be able to enter his serial

His the serial has the right to be consume, the consuming process will be launch and some actions will be performed.

You have several "consume" plugins in HikaSerial like "group association" (which give a new group to the user), "product add" (which add a product in the user cart) or "points consumer" (which give points to the user, using HikaShop points, AlphaUserPoints or HikaPoints).
If you have some specific requirements, you can easily create your own customized plugin.

How and when consume

In order to be consume, a serial should be "assigned". When consumed, the serial will become "used".
A serial can be consume just one time but you can change his status manually if you want to reset it.

When a pack have the consumption option activated, a serial will be set "assigned" after his creation. Otherwise the serial will be set as "used".

Some consumption plugins could ask for a logged user and will refuse the consumption if it is a guest. At this moment, warning message will be displayed.

Technical integration : the consume page

If you want to consume your serial from an outside application, the next part of this documentation is right for you.

The consume html page is:

index.php?option=com_hikaserial&ctrl=serial&task=consume

Using webservices, in the front end, to check a serial, you can call an url like this:

index.php?option=com_hikaserial&ctrl=serial&task=check&hikaserial[serial]=YOUR_SERIAL_DATA&hikaserial[format]=xml

It would result this:

You can use XML, JSON and HTML formats.

The consume action

After that, there is the "consume" feature.
You can only consume serials which have "assigned" status.

For example, you can call the URL:

index.php?option=com_hikaserial&ctrl=serial&task=consume&hikaserial[serial_data]=YOUR_SERIAL_DATA&hikaserial[serial_extra_data][myUser]=YOUR_USER_NAME&hikaserial[format]=json

And receive:

The webservice is compatible with html POST request.
So you can make a post request to the url:

index.php?option=com_hikaserial&ctrl=serial&task=consume

And give the rest of the parameters by POST ( hikaserial[serial_data] / hikaserial[format] / hikaserial[serial_extra_data][] )