This method is used to preview the amount that will be awarded, the amount that will be spend instantly and the additional amount that can be spent on a purchase customer event, prior to submitting a purchase customer event.
Resource URL
Parameters
Name | Type | Description |
token | String | The token retrieved from the login method |
accounts_receivable_identifier (mandatory) | Accounts receivable Identifier | The related accounts receivable. The allowed accounts receivable identifier fields are the following: Name | Type | Description |
---|
id (semi-optional) | String | The ID of the accounts receivable | number (semi-optional) | String | The number of the accounts receivable | name (semi-optional) | String | The name of the accounts receivable | access_token_identifier (semi-optional) | Access Token Identifier | The identifier of the access token which is related with the accounts receivable. Only effective access tokens can be used to identify an accounts receivable. The allowed access token identifier fields are the following Name | Type | Description |
---|
authentication_code (semi-optional) | String | The authentication code of the access token | identifier (semi-optional) | String | The identifier of the access token. If the identifier is specified then it will be validated against the specified pass code | pass_code (mandatory on conditions) | String | The pass code of the access token, which is applicable and mandatory if the identifier is specified | one_time_password (semi-optional) | Integer | The one-time password (OTP) of the access token |
|
|
rewards_participant_identifier (semi-optional) | Rewards Participant Identifier | The related rewards participant. The allowed rewards participant identifier fields are the following: Name | Type | Description |
---|
id (semi-optional) | String | The ID of the rewards participant | number (semi-optional) | String | The number of the rewards participant | access_token_identifier (semi-optional) | Access Token Identifier | The identifier of the access token which is related with the rewards participant. Only effective access tokens can be used to identify a rewards participant. The allowed access token identifier fields are the following: Name | Type | Description |
---|
authentication_code (semi-optional) | String | The authentication code of the access token | identifier (semi-optional) | String | The identifier of the access token. If the identifier is specified then it will be validated against the specified pass code | pass_code (mandatory on conditions) | String | The pass code of the access token, which is applicable and mandatory if the identifier is specified | one_time_password (semi-optional) | Integer | The one-time password (OTP) of the access token |
|
|
classification_identifier (optional) | Customer Event Classification Identifier | The classification of the customer event. The allowed customer event classification identifier fields are the following: Name | Type | Description |
---|
id (semi-optional) | String | The ID of the customer event classification | name (semi-optional) | String | The name of the customer event classification | alternative_code (semi-optional) | String | The alternative code of the customer event classification |
|
performed_by_unit_identifier (mandatory) | Unit Identifier | The unit that initiated the customer event. The allowed unit identifier fields are the following: Name | Type | Description |
---|
id (semi-optional) | String | The ID of the Unit | name (semi-optional) | String | The name of the Unit | alternative_code (semi-optional) | String | The alternative code of the Unit |
|
performed_by_business_unit_identifier (mandatory) | Business Unit Identifier | The business unit that initiated the customer event. The allowed business unit identifier fields are the following: Name | Type | Description |
---|
id (semi-optional) | String | The ID of the business unit | name (semi-optional) | String | The code of the business unit | code (semi-optional) | String | The code of the business unit |
|
performed_on (mandatory) | Date | The date that the customer event was actually performed |
description (optional) | String | A description of the customer event |
reference_number (mandatory) | String | The reference number of the retrieved purchase customer event |
external_system_reference_number (optional) | String | The reference number that uniquely identifies the purchase customer event in the external system |
payment_medium_brand_identifier (optional) | Payment Medium Brand Identifier | The identifier of the payment medium brand with which the purchase customer event has been made. The allowed payment medium brand identifier fields are the following: Name | Type | Description |
---|
id (semi-optional) | String | The ID of the payment medium brand | name (semi-optional) | String | The name of the payment medium brand | alternative_code (semi-optional) | String | The alternative code of the payment medium brand |
|
payment_medium_type_identifier (optional) | Payment Medium Type Identifier | The payment medium type with which the purchase customer event has been made. The allowed payment medium type identifier fields are the following: Name | Type | Description |
---|
id (semi-optional) | String | The ID of the payment medium type | name (semi-optional) | String | The name of the payment medium type | alternative_code (semi-optional) | String | The alternative code of the payment medium type |
|
payment_medium_identifier (optional) | String | The payment medium identifier with which the purchase customer event has been made
|
spend_request_classification_identifier (optional) | Customer Event Classification Identifier | The classification of the spend request that will possibly be created to spend any amount that will be awarded for this purchase customer event. The allowed customer event classification identifier fields are the following: Name | Type | Description |
---|
id (semi-optional) | String | The ID of the customer event classification | name (semi-optional) | String | The name of the customer event classification | alternative_code (semi-optional) | String | The alternative code of the customer event classification |
|
disable_instant_spend (optional) | Boolean | It determines if instant spend offers should be disabled (i.e. not applied) or not. By default all instant spend offers are applied if their conditions are met. |
products_set (mandatory) | Set of Purchase Product Objects | The purchased products, along with the total amount, net amount and VAT amount for each product |
fields_set (optional) | List of Strings, comma separated
| A list of fields that should be included in the results. If not specified then all the available fields will be returned
|
Referred Parameter Objects
purchase customer event product parameter object data
Name | Type | Description |
product_identifier (mandatory) | Products Identifier | The purchased product. The allowed product identifier fields are the following: Name | Type | Description |
---|
id (semi-optional) | String | The ID of the product | code (semi-optional) | String | The code of the product | alternative_code (semi-optional) | String | The alternative code of the product |
|
quantity (optional) | Number | The quantity of the specified purchase customer event product. If not specified then it automatically defaults to 1
|
net_amount (mandatory) | Number | The net amount of the specified purchase customer event product |
vat_amount (mandatory) | Number | The VAT amount of the specified purchase customer event product |
total_amount (mandatory) | Number | The total amount of the specified purchase customer event product |
Restrictions
- It is mandatory to specify one of the semi-optional parameters. Only one of those parameters is allowed to be specified.
Response Data
Name | Type | Description |
---|
total_award_amount | Number | The total amount that will be awarded for that purchase customer event in system currency |
total_award_alternative_amount | Number | The total amount that will be awarded for that purchase customer event in alternative currency and only if the awarded amount will be in alternative currency |
total_instant_spend_amount | Number | The total amount that will be spend instantly on that purchase customer event |
total_automatic_spend_amount | Number | The total amount that will be spend automatically on that purchase customer event, if the automatic awards spending is allowed. This amount does not include the amount that will be instantly spent on a voucher |
total_additional_spend_amount | Number | The additional amount that is available and can be spend on that purchase customer event. This amount does not include the amount that will be instantly spent on a voucher |
minimum_spend_amount_per_transaction | Number | The minimum amount that can be spend per each spend request customer event |
maximum_spend_amount_per_transaction | Number | The maximum amount that can be spend per each spend request customer event |
reduction_method | String | It defines how the amount that will be spend instantly or automatically will be reduced. The allowed methods are the following: - FRONT_END_REDUCTION: If selected then the reduction will be done by the front-end system (for example the POS). This is the default option
- BACK_END_REDUCTION: If selected then the reduction will be done by a back-end system (for example Paypal). If this option is selected then it is mandatory to specify the back-end reduction settings
|
rewards_participant_id | String | The ID of the purchase customer event's rewards participant |
rewards_participant_name | String | The full name of the retrieved rewards participant |
wallet_balance | Number | The current wallet balance of the customer in wallet currency |
wallet_alternative_balance | Number | The current wallet balance of the customer in wallet alternative |
allow_spending | Boolean | It determines if spending is allowed to be done on the specific purchase customer event |
voucher_types_set | Set of Voucher Types Objects | The set of type of the voucher that will be awarded instantly if such a purchase customer event is performed |
applied_reward_offers_set | Set of Applied Reward Offers | A set of reward offers that will be applied on the specific purchase customer event |
Referred Objects Response Data
voucher_type response data object
Name | Type | Description |
---|
Id | String | The ID of the retrieved voucher type |
name | String | The Name of the retrieved voucher type |
alternative_code | String | The Alternative Code of the retrieved voucher type |
value_options | String | Defines if the value should be fixed, as defined in the voucher type, or a variable, as defined during the creation of the vouchers. The supported options are FIXED and VARIABLE |
classification | String | The Classification of the retrieved voucher type |
description | String | The Description of the retrieved voucher type |
applied reward offers short response data object
Name | Type | Description |
---|
Id | String | The ID of the applied reward offer |
name | String | The name of the applied reward offer |
scheme_name | String | The reward scheme name of the applied reward offer |
Examples
Example 1
HTTP Method: POST
Request:
Body:
{
"token": "618012859",
"accounts_receivable_identifier":{"number":"ACR0000000265"},
"classification_identifier":{"name":"Purchase Classification"},
"performed_by_unit_identifier":{"name":"Admin Unit"},
"performed_on":"2016-06-22T15:00:00",
"reference_number":"RF000001",
"total_amount":900,
"net_amount":800,
"vat_amount":100,
"invoice_identifier":{"number":"I00000733"},
"payment_medium_brand_identifier":{"name":"VISA"},
"payment_medium_type_identifier":{"alternative_code":"CC"},
"payment_medium_identifier":"PI000001",
"products_set":
[
{
"product_identifier":{"code":"Serendipity"},
"total_amount":400,
"net_amount":350,
"vat_amount":50
},
{
"product_identifier":{"code":"Bronze"},
"total_amount":500,
"net_amount":450,
"vat_amount":50
}
]
}
Response:
{
"data": {
"total_additional_spend_amount": 673.7,
"minimum_spend_amount_per_transaction": 10,
"total_instant_spend_amount": 0,
"total_award_amount": 43.2,
"maximum_spend_amount_per_transaction": 3444
},
"status": {
"code": "OK",
"description": "",
"message": ""
}
}
Example 2
HTTP Method: POST
Request:
Body:
{
"token":"{{token}}",
"accounts_receivable_identifier":{"name":"0000000001 Eleni M"},
"performed_by_unit_identifier":{"name":"Merchant A unit"},
"performed_on":"2018-09-07T13:09:00",
"description":"purchase event",
"process_immediately":true,
"reference_number":"PCE1API32",
"disable_instant_spend":true,
"total_amount":3,
"net_amount":3,
"vat_amount":0,
"products_set":
[
{
"product_identifier":{"code":"Serendipity"},
"total_amount":3,
"net_amount":3,
"vat_amount":0,
"quantity":1
}
]
}
Response:
{
"data": {
"total_additional_spend_amount": 0,
"allow_spending": false,
"applied_reward_offers_set": [
{
"scheme_name": "Sales Scheme",
"name": "Test",
"id": "27268409D98F4D408BA056632B9316E9"
}
],
"minimum_spend_amount_per_transaction": 1,
"rewards_participant_id": "57A9AC82559149019061B743F13CD39B",
"total_automatic_spend_amount": 0,
"wallet_balance": 3256.81,
"total_instant_spend_amount": 0,
"rewards_participant_name": "Eleni Mich",
"total_award_amount": 0.15,
"reduction_method": null,
"maximum_spend_amount_per_transaction": 1000000
},
"status": {
"code": "OK",
"description": "",
"message": ""
}
}