Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Excerpt

This method returns a list of auto-apply discounts that could be applied to a subscription or job having the specified characteristics. Multiple auto apply discounts are returned by each call

...

Name

Type

Description

token

String

The token retrieved from the login method

accounts_receivable

(semi-optional)

Accounts Receivable Object 

Information related with the accounts receivable that will own the subscription or the job that could possibly be discounted

Tip

Up to CRM.COM R14 accounts receivable was a mandatory

subscription

(semi-optional)

Subscriptions ObjectInformation related with the subscription that could possibly be discounted

job

(semi-optional)

Job ObjectInformation related with the job that could possibly be discounted

buy_in_advance_request

(optional)

 

Buy in Advance Request Object

Information related with buy in advance request that might be applicable on the subscription that could possible be discounted. This information is applicable only if a subscription is specified.

Tip

Not available from CRM.COM R15.0.0

product

(optional)

Products Object

The product the discount is for.

Tip

Applicable from CRM.COM R15.0.0

existing_product_list

(optional)

Set of invoice physical goods

A list of physical goods that will be bought by the customer, used to validated against discounts' existing product conditions. This is only applicable for quick sales, as the existing products of jobs and subscriptions are taken through the defined entity.

Tip

Applicable from CRM.COM R15.0.0


date

(optional)

Date

The date for which you want to see the available discounts for.
Applicable for all products apart from termed services

Tip

Applicable from CRM.COM R15.0.0

from_date

(optional)

 Date

The date from which the termed service discount will be applied from.

Applicable only for termed services

Tip

Applicable from CRM.COM R15.0.0

to_date

(optional)

 Date

The date up to which the termed service discount will be applied to

Applicable only for termed services

Tip

Applicable from CRM.COM R15.0.0

usage_amount

(optional)

 Float

The usage amount of the usage service.

Applicable only for usage services

Tip

Applicable from CRM.COM R15.0.0

usage_zone

(optional)

 String

The usage zone the usage service belongs to.

Applicable only for usage services

Tip

Applicable from CRM.COM R15.0.0

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

...

Expand
titleExample 1

HTTP Method: POST

 

Request:

Body:

Code Block
linenumberstrue
{
 "token":"{{token}}",
 "accounts_receivable":
 {
 "classification_identifier":{"name":"Residential Customer"}
 },
 "subscription":
 {
 "type_identifier":{"name":"Normal"},
 "owned_by_group_identifier": {"name":"Main Group"},
 "billing_terms":
 {
 "billing_term_scheme_identifier":{"code":"Normal Billing Scheme"},
 "price_plan_identifier" : {"code":"BPPT"},
 "billing_cycle_day":5,
 "agreement_date": "2015-05-05T15:49:59",
 "billing_frequency":"DAILY",
 "binding_information":
 {
 "binding_period":"WEEK",
 "start_date": "2015-06-05T15:49:59"
 },
 "concurrent_usage_based_pricing":
 {
 "concurrent_usage":10,
 "rate_percentage":25
 }
 },
 "services_set":
 [
 {
 "service_identifier":{"code":"Bronze"}
 }
 ]
 }
}

 

Response:

 

Code Block
languagexml
linenumberstrue
{
 "data": [
 {
 "product": null,
 "from_date": "2015-05-05T00:00:00",
 "to_date": null,
 "discount_amount": null,
 "additive_discount_definition": {
 "alternative_code": "PS1B",
 "name": "Pricing SB 19 B",
 "id": "F7A2BAD8EC1C49A18F4E394BA37973FC",
 "life_cycle_state": "EFFECTIVE",
 "classification": "GENERAL",
 "type": "AUTO_APPLY"
 },
 "free_period": null,
 "discount_percentage": 20,
 "free_period_UOT": null,
 "discount_amount_UOT": null
 },
 {
 "product": null,
 "from_date": "2015-05-05T00:00:00",
 "to_date": null,
 "discount_amount": null,
 "additive_discount_definition": {
 "alternative_code": "PS1C",
 "name": "Pricing SB 19 C",
 "id": "7482128AE0644004AD823A103A50CC9C",
 "life_cycle_state": "EFFECTIVE",
 "classification": "GENERAL",
 "type": "AUTO_APPLY"
 },
 "free_period": null,
 "discount_percentage": 30,
 "free_period_UOT": null,
 "discount_amount_UOT": null
 },
 {
 "product": null,
 "from_date": "2015-05-05T00:00:00",
 "to_date": null,
 "discount_amount": null,
 "additive_discount_definition": {
 "alternative_code": "PS2A",
 "name": "Pricing SB 20 A",
 "id": "FACFA7509F46492A98BE37841B5A9D3A",
 "life_cycle_state": "EFFECTIVE",
 "classification": "SUBSCRIPTIONS",
 "type": "AUTO_APPLY"
 },
 "free_period": null,
 "discount_percentage": null,
 "free_period_UOT": null,
 "discount_amount_UOT": null
 },
 {
 "product": null,
 "from_date": "2015-05-05T00:00:00",
 "to_date": null,
 "discount_amount": null,
 "additive_discount_definition": {
 "alternative_code": "PS2C",
 "name": "Pricing SB 20 C",
 "id": "63855F7EFCEA4E73A6C9B8C64FDF709A",
 "life_cycle_state": "EFFECTIVE",
 "classification": "SUBSCRIPTIONS",
 "type": "AUTO_APPLY"
 },
 "free_period": null,
 "discount_percentage": null,
 "free_period_UOT": null,
 "discount_amount_UOT": null
 },
 {
 "product": null,
 "from_date": "2015-05-05T00:00:00",
 "to_date": null,
 "discount_amount": null,
 "additive_discount_definition": {
 "alternative_code": "PS2B",
 "name": "Pricing SB 20 B",
 "id": "803D9FDAB06B4F6ABF5E99C5FE347706",
 "life_cycle_state": "EFFECTIVE",
 "classification": "SUBSCRIPTIONS",
 "type": "AUTO_APPLY"
 },
 "free_period": null,
 "discount_percentage": null,
 "free_period_UOT": null,
 "discount_amount_UOT": null
 }
 ],
 "status": {
 "code": "OK",
 "description": "",
 "message": ""
 }
}