You are viewing an old version of this page. View the current version.
Compare with Current
View Page History
Version 1
Next »
This method calculates an accounts receivable's value units (period and lifetime) and the (new) reward tier that should be assigned against it on the next reward tier evaluation. A single accounts receivable can be specified in each call.
Resource URL
Parameters
Name | Type | Description |
token | String | The token retrieved from the login method |
accounts_receivable_identifier (mandatory) | Accounts Receivable Identifier | The accounts receivable for which the value units will be calculated for. 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 |
|
|
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 |
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_awarded_amount | Number | The total amount that was awarded to the specific accounts receivable in accounts receivable's currency |
total_awarded_alternative_amount | Number | The total amount that was awarded to the specific rewards participant in accounts receivable's alternative currency, if any. |
from_date | Date | The date that the first award was applied |
to_date | Date | The date that the last award was applied |
currency | Currency object | The accounts receivable's currency |
alternative_currency | Currency Object | The accounts receivable's alternative currency |
reward_scheme_awards_set | Set of Reward Scheme Awards Objects | A list of awards provided by reward schemes that the accounts receivable participated to |
Referred Objects Response Data
currency object response data
Name | Type | Description |
---|
id | String | The ID of the retrieved currency |
code | String | The code of the retrieved currency |
prefix_symbol | String | The prefix symbol for the specified currency |
suffix_symbol | String | The suffix symbol for the specified currency |
life_cycle_state | String | The life cycle state for the specified currency, which can be EFFECTIVE or NOT EFFECTIVE |
integer_part_name | String | The integer part name for the specified currency |
decimal_part_name | String | The decimal part name for the specified currency |
reward scheme awards object response data
Name | Type | Description |
---|
total_awarded_amount | Number | The total amount that was awarded by the specific scheme |
scheme | Reward Scheme Object | The reward scheme that provided the award |
Referred Objects Response Data
reward scheme object response data
Name | Type | Description |
---|
id | String | The ID of the retrieved reward scheme |
name | String | The name of the retrieved reward scheme |
alternative_code | String | The alternative code of the retrieved reward scheme |
description | String | A description of the retrieved reward scheme |
life_cycle_state | String | The life cycle state of the reward scheme which can be EFFECTIVE or NOT_EFFECTIVE |
Examples
Example 1
HTTP Method: POST
Request
{{server}}/crmapi/rest/v2/accounts_receivable/rewards/calculate_value_units
Body
Response