Available from CRM.COM R9.1.0
This method is used to calculate the rates that will be applied while creating a new subscription or modifying an existing one, before submitting the actual request. The rates calculation can be applied on a single subscription per each call.
Resource URL
http://host_name/crmapi/rest/$version/subscriptions/calculate_rates
Parameters
Name | Type | Description | |||||||||
token | String | The token retrieved from the login method | |||||||||
mode (mandatory) | String | It determines if the rate calculation should be applied on a new subscriptions or a modification of an existing subscription. The following options are supported:
RATE_AMEND_SERVICES_INSTALLED_ITEMS available from CRM.COM R14.3.0 RATE_BUY_IN_ADVANCE_REQUESTS deprecated in CRM.COM R18.0.0 RATE_BILLING_FREQUENCY_CHANGE available from CRM.COM R14.28.0 | |||||||||
number_of_additional_periods (optional) | Number | It determines if the rates should be calculated only for the upcoming period or for additional billing periods. If not specified then the method will return only the rates for the upcoming period | |||||||||
scheduled_date (optional) | Date | The date on which the subscription action is scheduled to be executed, therefore rates will be applied as of this scheduled date. Available from CRM.COM R14.5.0 | |||||||||
subscription_identifier (mandatory and applicable on conditions) | Subscription Identifier | The identifier of the existing subscription that should be rated. The allowed subscription identifier fields are the following:
Note that this information is applicable and mandatory only if the mode is set to RATE_ACTIVATE_SUBSCRIPTIONS, RATE_ADD_SERVICES, RATE_REMOVE_SERVICES, RATE_SWAP_SERVICES, RATE_START_SERVICES, RATE_STOP_SERVICES, RATE_BUY_IN_ADVANCE_REQUESTS, RATE_ADD_EXPENSES | |||||||||
(mandatory and applicable on conditions) | Accounts Receivable Object | Information related with the accounts receivable that will own the new subscription that will be rated. Note that this information is applicable and mandatory only if the mode is set to RATE_BECOME_SUBSCRIBER | |||||||||
(mandatory and applicable on conditions) | Subscriptions Object | Information related with the new subscription that will be rated Note that this information is applicable and mandatory only if the mode is set to RATE_BECOME_SUBSCRIBER | |||||||||
(mandatory on conditions) | Buy in Advance Request Object | Information related with a buy in advance request that might be applicable on the new or existing subscription that will be rated. Note that this information is applicable for all modes but is mandatory only if the mode is set to RATE_BUY_IN_ADVANCE_REQUESTS Deprecated from CRM.COM R18.0.0 | |||||||||
(mandatory and applicable on conditions) | Set of New Subscription Services | Information with new services that will be added and activated on the existing subscription that was specified Note that this information is applicable and mandatory only if the mode is set to RATE_ADD_SERVICES or RATE_ADD_EXPENSES When the mode is set to RATE_AMEND_SERVICES_INSTALLED_ITEMS, this information is applicable but it is optional. | |||||||||
(mandatory and applicable on conditions) | Set of Existing Subscription Services | Information with existing subscription services that will be modified on the existing subscription that was specified Note that this information is applicable and mandatory only if the mode is set to RATE_REMOVE_SERVICES, RATE_START_SERVICES, RATE_STOP_SERVICES. When the mode is set to RATE_AMEND_SERVICES_INSTALLED_ITEMS, this information is applicable but it is optional. | |||||||||
(mandatory and applicable on conditions) | Set of Existing Subscription Services that will be swapped | Information with existing subscription services that will be swapped on the existing subscription that was specified Note that this information is applicable and mandatory only if the mode is set to RATE_SWAP_SERVICES. When the mode is set to RATE_AMEND_SERVICES_INSTALLED_ITEMS, this information is applicable but it is optional. | |||||||||
(optional and applicable on conditions) | Set of New Subscription Installed Items | Information with new subscription installed items that will be added on the subscription that was specified Note that this information is applicable and optional only if the mode is set to RATE_AMEND_SERVICES_INSTALLED_ITEMS | |||||||||
(optional and applicable on conditions) | Set of Existing Subscription Installed Items | Information with new subscription installed items that will be removed from the subscription that was specified Note that this information is applicable and optional only if the mode is set to RATE_AMEND_SERVICES_INSTALLED_ITEMS | |||||||||
billing_frequency (mandatory and applicable on conditions) | String | The billing frequency of the billing terms that will be created. Billing Frequencies are used to denote how often a subscription should be billed.The supported options are the following: DAILY, WEEKLY, MONTHLY, QUARTERLY, BIANNUAL, ANNUAL, TWOYEARS, CUSTOM1, CUSTOM2, CUSTOM3, CUSTOM4, CUSTOM5 When the mode is set to RATE_AMEND_SERVICES_INSTALLED_ITEMS, this information is applicable but it is optional. When the mode is set to RATE_BILLING_FREQUENCY_CHANGE, this information is mandatory. | |||||||||
udf_string_1 (optional) | String | User Defined Field of type String | |||||||||
udf_string_2 (optional) | String | User Defined Field of type String | |||||||||
udf_string_3 (optional) | String | User Defined Field of type String | |||||||||
udf_string_4 (optional) | String | User Defined Field of type String | |||||||||
udf_string_5 (optional) | String | User Defined Field of type String | |||||||||
udf_string_6 (optional) | String | User Defined Field of type String | |||||||||
udf_string_7 (optional) | String | User Defined Field of type String | |||||||||
udf_string_8 (optional) | String | User Defined Field of type String | |||||||||
udf_float_1 (optional) | Float | User Defined Field of type Float | |||||||||
udf_float_2 (optional) | Float | User Defined Field of type Float | |||||||||
udf_float_3 (optional) | Float | User Defined Field of type Float | |||||||||
udf_float_4 (optional) | Float | User Defined Field of type Float | |||||||||
udf_date_1 (optional) | Date | User Defined Field of type Date | |||||||||
udf_date_2 (optional) | Date | User Defined Field of type Date | |||||||||
udf_date_3 (optional) | Date | User Defined Field of type Date | |||||||||
udf_date_4 (optional) | Date | User Defined Field of type Date | |||||||||
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 Parameters Objects Data
Restrictions
- It is mandatory to specify one of the semi-optional parameters. More than one of those parameters are allowed to be specified.
Response Data
Name | Type | Description |
---|---|---|
upcoming_rates | Calculated Upcoming Rates Object | The upcoming rates are the rates that will be charged for the next (upcoming) billing period, which in some cases might be prorated |
Set of Calculated Additional Period Rates Object | The rates for the additional billing periods that will occur after the upcoming billing period. The number of periods that are included are based on the specified number of additional periods specified in the parameters |
Referred Objects Response Data