Versions Compared

Key

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

Available from CRM.COM R15.0.0

Excerpt

This method returns a list of discount definitions that are available to be applied on subscriptions or jobs having either specific characteristics (i.e. subscription type) or discounts for specific subscriptions or jobs. It is also possible to select whether the retrieved discounts definitions are ad hoc or autoapply. Multiple discount definitions are returned by each call

Resource URL

Parameters

Name

Type

Description

token

String

The token retrieved from the login method

accounts_receivable

(semi-optional)

Accounts Receivable Object 

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

 

subscription

(semi-optional)

Subscriptions ObjectCharacteristics related to subscriptions that could possibly be discounted.
subscription_identifier

(semi-optional)

Subscription identifier  

The identifier of the subscription related with the ad hoc discounts that should be returned as a result. The allowed subscription identifier fields are the following:

Include Page
V4:subscription_identifier
V4:subscription_identifier

job

(semi-optional)

Job ObjectCharacteristics related to jobs that could possibly be discounted.

job_identifier

(semi-optional)

Job identifier

The identifier of the job related with the ad hoc discounts that should be returned as a result. The allowed job identifier fields are the following:

Include Page
V4:job_identifier
V4:job_identifier

product

(optional)

Products Object

The product the discount is for.

Products used as conditions to decide whether a discount can be given are defined through either the subscription or job object.

date

(optional)

Date

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

from_date

(optional)

 Date

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

Applicable only for termed services

to_date

(optional)

 Date

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

Applicable only for termed services

additive_discount_definition_classification

(optional)

String

The classification of the additive discount definition related with the applied additive that should be returned as a result. The supported classifications are SUBSCRIPTION, JOB, GENERAL

additive_discount_definition_type

(optional)

StringThe type of the additive discount definition related with the applied additive that should be returned as a result. The supported classifications are AUTO_APPLIED and AD_HOC

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
languagexml
titleBody
 {
  "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"}
      }
     ]
  },
  "additive_discount_definition_classification":"SUBSCRIPTIONS",
  "additive_discount_definition_type":"AUTO_APPLY"
}

 

Response: 

Code Block
{
    "data": [
        {
            "product": null,
            "discount_option": "FREE_USAGE",
            "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"
            },
            "for": null,
            "currency": {
                "suffix_symbol": null,
                "prefix_symbol": "€",
                "decimal_part_name": null,
                "code": "EUR",
                "integer_part_name": null,
                "id": "2",
                "life_cycle_state": "EFFECTIVE"
            },
            "discount_percentage": null,
            "renew": null,
            "discount_free_usage": 10
        },
        {
            "product": null,
            "discount_option": "AMOUNT_PER_PERIOD",
            "from_date": "2015-05-05T00:00:00",
            "to_date": null,
            "discount_amount": 5,
            "additive_discount_definition": {
                "alternative_code": "PS2C",
                "name": "Pricing SB 20 C",
                "id": "63855F7EFCEA4E73A6C9B8C64FDF709A",
                "life_cycle_state": "EFFECTIVE",
                "classification": "SUBSCRIPTIONS",
                "type": "AUTO_APPLY"
            },
            "for": null,
            "currency": {
                "suffix_symbol": null,
                "prefix_symbol": "€",
                "decimal_part_name": null,
                "code": "EUR",
                "integer_part_name": null,
                "id": "2",
                "life_cycle_state": "EFFECTIVE"
            },
            "discount_percentage": null,
            "renew": null,
            "discount_free_usage": null
        },
        {
            "product": null,
            "discount_option": "PERCENTAGE_PER_PERIOD",
            "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"
            },
            "for": {
                "for_option": "X_UOT",
                "for_uot": "WEEKS",
                "for_value": 1
            },
            "currency": {
                "suffix_symbol": null,
                "prefix_symbol": "€",
                "decimal_part_name": null,
                "code": "EUR",
                "integer_part_name": null,
                "id": "2",
                "life_cycle_state": "EFFECTIVE"
            },
            "discount_percentage": 25,
            "renew": {
                "for_option": "EVERY_X_UOT",
                "for_uot": "MONTHS",
                "for_value": 1
            },
            "discount_free_usage": null
        }
    ],
    "status": {
        "code": "OK",
        "description": "",
        "message": ""
    }
}