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:
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.
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. |
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 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):
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- 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.
Delete transaction batch from the system.
Parameter(s):
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- login - <login-bean>. Your account in PointLoyalty Manager system.
- from - number(datetime). Interval begin. Optional.
- to - number(datetime). Interval end. Optional.
- member-id - string. Customer's identifier.
Entering the bonus adjustments data into the system.
Parameter(s):
Method: DELETE- 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.
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- login - <login-bean>. Your account in PointLoyalty Manager system.
- from - number(datetime). Interval begin. Optional.
- to - number(datetime). Interval end. Optional.
- member-id - string. Customer's identifier.
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- login - <login-bean>. Your account in PointLoyalty Manager system.
- from - number(datetime). Interval begin.
- to - number(datetime). Interval end.
- member-id - string. Customer's identifier.
Entering data on your customers into the system.
Parameter(s):
Method: DELETE- 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.
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):
Returns: array or a single element of type <offers-activity-bean>. The set of active loyalty offers. Can be empty.
- login - <login-bean>. Your account in PointLoyalty Manager system.
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- login - <login-bean>. Your account in PointLoyalty Manager system.
- memberaccounts - array or one element of type <member-account-bean>. Data for creating client accounts in Member Console.
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.
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.
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):
Returns: <value-bean> type. The boolean type field contains the result.
- 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.
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".
"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):
Returns: array or a single element of type <bonus-full-bean>. A list of charged bonuses. Can be empty.
- login - <login-bean>. Your account in PointLoyalty Manager system.
- actions - array of <action-bean>. Set of customers' transactions. Optional.





