INFORMATION FOR WEB DEVELOPERS

PointLoyalty REST API attempts to conform to the design principles of REST (Representational State Transfer).
PointLoyalty Manager defines following REST resources:
Actions of customers(customers' transactions).
Bonus corrections.
Bonus points.
Customers and a history of transactions.
Your loyalty programs and offers.
Member accounts for Member Console.
Services for clearing the data .
Utility methods.
Demo resource.
All HTTP methods - GET, POST, PUT, DELETE can be overridden with parameter !method, for example &!method=GET.
PointLoyalty supports XML and JSON data formats. The type of return value is defined by !output_type parameter with following acceptable values: JSON and XML. To get results in XML form, specify !output_type=XML. By default results are returned as JSON objects.
Pay attention that some methods do not return results.
In case of server side errors methods return HTTP status code 500 and an error description.

REST API IN DETAILS

Actions

Main REST resource for integration. Processing of customers' operations (transactions). Bonus points are calculated automatically after data is submitted to the system.
URL: http://www.pointloyalty.com/wl/rest/actions
example »
Method: POST
Sends a batch of user transactions to PointLoyalty Manager system for bonus calculation. Pay attention that one action can cause calculating bonuses in multiple loyalty offers.
Parameter(s):
  • login - <login-bean>. Your account in PointLoyalty Manager system.
  • data-id - string. Optional. The client identifier of the customers' transaction batch. At later point in time you can delete the batch of transactions by this identifier.
  • actions - array or a single element of type <action-bean>. Customers' operations (transactions) for processing.
Returns: array or a single element of type <bonus-full-bean>. The list of calculated bonuses. Can be empty if there are no bonuses calculated for incoming transactions.
Method: DELETE
Delete transaction batch from the system.
Parameter(s):
  • login - <login-bean>. Your account in PointLoyalty Manager system.
  • data-id - string. Client identifier of the batch to delete.

Bonus adjustments

The set of bonus adjustments(for example, information about bonus redemption) in PointLoyalty Manager.
Can be used if it planned to notify customers on bonus adjustments using member console.
URL: http://www.pointloyalty.com/wl/rest/adjustments
Method: GET
Get the information on bonus adjustments during certain time interval for one of the customers.
Parameter(s):
Returns: array or a single element of type <bonus-adjustment-bean>. Can be empty.
Method: POST
Entering the bonus adjustments data into the system.
Parameter(s):
  • login - <login-bean>. Your account in PointLoyalty Manager system.
  • data-id - string. Optional. Client identifier of adjustment batch.
  • bonus-adjustments - array or a single element of type <bonus-adjustment-bean>. Bonus adjustments for processing.
Method: DELETE
Delete the data on bonus adjustments.
Parameter(s):
  • login - <login-bean>. Your account in PointLoyalty Manager system.
  • data-id - string. Client identifier of adjustment batch.

Bonuses

Set of customer bonuses in PointLoyalty Manager.
URL: http://www.pointloyalty.com/wl/rest/bonuses
Method: GET
Get the data on earned bonus points.
Parameter(s):
Returns: array or a single element of type <bonus-full-bean>. The list of charged bonus points. Can be empty if there are no bonus points earned.
Method: DELETE
Delete calculated bonuses from the system.
Parameter(s):
  • login - <login-bean>. Your account in PointLoyalty Manager system.
  • bonus-ids - array or one element of type string. Bonus identifiers for deletetion.

Members

Operations with the customers data.
Adding customers data is used if you plan to create loyalty programs accounting for your customers' attributes.
URL: http://www.pointloyalty.com/wl/rest/members
Method: GET
Get the list of customer actions registered in the system during specified time interval.
Parameter(s):
Returns: array or a single element of type <member-activity-bean>. Customer action registered in the system during specified time interval. Can be empty.
Method: POST
Entering data on your customers into the system.
Parameter(s):
  • login - <login-bean>. Your account in PointLoyalty Manager system.
  • members - array or a single element of type <member-bean>. The list of customers to add.
Method: DELETE
Delete customers from the system.
Parameter(s):
  • login - <login-bean>. Your account in PointLoyalty Manager system.
  • member-ids - array or one element of type string. Identifiers of program members to be deleted.

Offers

Set of active loyalty offers.
URL: http://www.pointloyalty.com/wl/rest/offers
Method: GET
Get the set of currently active loyalty offers.
Parameter(s):
  • login - <login-bean>. Your account in PointLoyalty Manager system.
Returns: array or a single element of type <offers-activity-bean>. The set of active loyalty offers. Can be empty.
top

Member accounts

Create and delete customers'accounts for the Member Console.
URL: http://www.pointloyalty.com/wl/rest/memberaccounts
Method: POST
Create accounts in Member Console for your clients. Note that clients must be submitted to the system (see. Members) prior to this action.
Parameter(s):
Method: DELETE
Delete registered members' accounts.
Parameter(s):
  • login - <login-bean>. Your account in PointLoyalty Manager system.
  • personal-ids - array or one element of type string. Personal account identifiers of program members to be deleted.
top

Delete all

Resource for full deleting various types of data.
URL: http://www.pointloyalty.com/wl/rest/deleteall
Method: DELETE
Pay attention that while deleting program members interval is ignored. In other cases if interval is not set - all data of certain type gets deletes.
Parameter(s):
  • login - <login-bean>. Your account in PointLoyalty Manager system.
  • datatype - string. Type of data to delete - one of the: "actions", "bonus-adjustments", "bonuses", "members", "member-accounts".
  • from - number(datetime). Interval start date. Optional parameter. If not set - all the data till interval end will be deleted.
  • to - number(datetime). Interval end date. Optional parameter. If not set - all the data from interval start will be deleted.
top

Utilities

Set of various utility methods.
URL: http://www.pointloyalty.com/wl/rest/utils
Metod: GET
  • If utils-method equal to "check-client-account" - check if client is registered in the PointLoyalty Manager system.
    Used parameter: login - client's account.
  • If utils-method equal to "check-member-account" - check if program member has account and registered in Member Console.
    Used parameter: login - member's account.
  • If utils-method equal to "check-members-template" - check if member attributes are registered in the system.
    Used parameters: - login - client's account, attributes - member attribute
  • If utils-method equal to "check-attributes-template" - check if action attributes are registered in the system.
    Used parameters: - login - client's account, action - client action name, attributes - action attributes.
Parameter(s):
  • utils-method - string. The name of utility method.
    Valid values are: "check-client-account", "check-member-account", "check-members-template", "check-attributes-template".
  • login -<login-bean>. Account in PointLoyalty Manager system.
  • action - string. Client action name.
  • attributes - string or an array of strings. Attributes' names.
Returns: <value-bean> type. The boolean type field contains the result.
top

Demo

Resource for demonstration purposes and integration tests.
URL: http://www.pointloyalty.com/wl/rest/demo
Method: GET
If the parameter actions is not passed the method return active offers. If the parameter is passed - bonuses will get calculated for passed customers' actions in accordance with following loyalty offer:
"All customers who performed action buy with action attribute sum value exceeding 1000 will get a bonus equal to 5% from the sum value".
Parameter(s):
  • login - <login-bean>. Your account in PointLoyalty Manager system.
  • actions - array of <action-bean>. Set of customers' transactions. Optional.
Returns: array or a single element of type <bonus-full-bean>. A list of charged bonuses. Can be empty.
top

 

PARAMETER TYPES

<login-bean>

User authentication data.
name string PointLoyalty Manager client name.
password string Password.
locale string Client language. Only 'EN' and 'RU' values are supported. Default value - 'EN'.
timeZoneId string Client timezone. String representation as in Java.

<action-bean>

Information about customer's transaction.
values <named-value-bean> Set of attributes of customer transaction.
memberId string Customer identifier.
name string Customer action.
actionDatetime number(datetime) Action date. By default - current time in your timezone.
recNum number Record number in a batch. Optional.

<bonus-adjustment-bean>

Bonus adjustment information.
programName string Loyalty program name.
offerName string Offer name.
memberId number Customer identifier.
adjustmentDatetime number(datetime) Date of adjustment.
quantity number The value of correction.
description string Text description - comment.

<bonus-full-bean>

An information on earned bonus.
programName string Loyalty program name.
offerName string Offer name.
memberId number Customer identifier.
actionName string Customer action name.
actionDatetime number(datetime) Date of the action.
bonus string Bonus value.
calcDatetime number(datetime) Date of charging points to customer account.
recNum number Record number in a batch.
bonusInternalId number Bonus identifier in PointLoyalty Manager.

<member-bean>

Member information. Fields "email", "password" and "personalId" are optional and serve to enable joining members to the Member console.
memberId string Member identifier. (See also action-bean).
email string Member's email.
password number Member password.
personalId string Member account personal identifier.
values <value-bean> Set of member data (member attributes).

<member-activity-bean>

Information about registered customer action and associated bonuses (if any) or bonus adjustment.
values <value-bean> Set of attributes of customer transaction. Emtpy for adjustments.
memberId string Customer identifier.
actionName string Customer action name.
actionDatetime number(datetime) Action or bonus adjustment date.
bonus string Summary bonus (or adjustment value) associated with the action.
bonusesHolder <bonus-full-bean> List of bonuses calculated for this action (always null for bonus adjustments).
adjustmentDescription string Adjustment description. (Always null for customer actions).
isAdjustment boolean Flag indicating is it a customer action or a bonus adjustment.

<value-bean>

Named value with type information (field). Exactly one filed only must be filled.
name string Name of the filed.
stringValue string String of symbols.
numericValue number Real number.
dateValue number(date) Date.
timeValue number(time) Time.
datetimeValue number(datetime) Date and time.
longValue number Integer number.
boolValue boolean Boolean value (true/false).

<member-account-bean>

Data for creating client accounts in Member Console.
name string Unique name for entering the system.
password string Password for entering the system. (See also member-bean).
email string Member's email. (See also member-bean).
personalId string Member account personal identifier. (See also member-bean).
firstName string Member first name.
lastName string Member last name.
timeZoneId string TimeZone. String representation like in Java language.
top

Date and time values:

number(date) Value — date rounded to whole days (hours, minutes and seconds are ignored). Represented as an integer number in milliseconds from January 1st, 1970 year (like in Java).
number(datetime) Value — date and time rounded to whole seconds. Represented as integer number in milliseconds from January 1st, 1970 year (like in Java).
number(time) Value — time. Days, months and years are ignored. Represented as integer number in milliseconds from January 1st, 1970 year (like in Java).
top

String values and numbers:

string The length is restricted to 128 symbols except description fields(descriptions - 2000 symbols).
number Maximum value for number - 1000000000000. For real values, only 5 digits after the point.
top