POST accounts_receivable/rewards/calculate_total_awarded_amount
Available from CRM.COM R17.0.0
This method calculates the total awarded amount that was provided to a specific accounts receivable and the amount that was awarded by each scheme that the accounts receivable participated to. 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's participant for which the awarded amount will be calculated for. The allowed accounts receivable identifier fields are the following:
| ||||||||||||||||||||||||||||||
reward_scheme_identifier | Reward Scheme Identifier | The reward scheme that awarded the calculated amount. If specified then the calculation will include only awards provided by the specified reward scheme. The allowed reward scheme identifier fields are the following:
| ||||||||||||||||||||||||||||||
from_date (optional) | Date | If specified then the calculation will include only awards that were provided on that date or on a date after that date will be | ||||||||||||||||||||||||||||||
to_date (optional) | Date | If specified then the calculation will include only awards that were provided on that date or on a date before that date will be | ||||||||||||||||||||||||||||||
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