Versions Compared

Key

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

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

Resource URL

Parameters

Name

Type

Description

token

String

The token retrieved from the login method

accounts_receivable

(mandatory)

Accounts Receivable Object 

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

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.

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

...

Include Page
V4:rate_calculation_buy_in_advance_request_parameters
V4:rate_calculation_buy_in_advance_request_parameters

Restrictions

  • It is mandatory to specify one of the semi-optional parameters. Only one semi-optional parameter can be specified.

Response Data

Include Page
V4:applicable_additive_discounts_short
V4:applicable_additive_discounts_short

Examples

Expand
titleExample 1

HTTP Method: POST

 

Request:

Body:

Code Block
themeConfluence
languagejavascript
linenumberstrue
{
  "token":"BC0919815F72418DBADA3F5F19C012F9",
  "accounts_receivable":
  {
    "classification_identifier":{"name":"Employee"},
    "presentment_preferences_set":
    [
     {"presentment_preference_identifier":{"name":"By Email"}},
     {"presentment_preference_identifier":{"name":"By Post"}}
    ],
    "payment_preferences_set":
    [
     {"payment_preference_identifier":{"name":"PayPal"}}
    ] 
  },
 "subscription":
  {
    "type_identifier":{"name":"London"},
    "owned_by_group_identifier": {"name":"Main Group"},
    "billing_terms":
    {
      "billing_term_scheme_identifier":{"code":"MPBTS"},
      "price_plan_identifier" : {"code":"ABPP"},
      "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"}
      },
      {
       "service_identifier":{"code":"Movies 2"}
      }
     ]
  }
}

 

 

Response:

Code Block
themeConfluence
languagejavascript
linenumberstrue
      {
    "status":
    {
        "message": null,
        "description": null,
        "code": "OK"
    },
    "data":
    [
        {
            "discount_amount_UOT": null,
            "to_date": "2016-03-11T00:00:00",
            "from_date": "2015-04-06T00:00:00",
            "free_period": null,
            "discount_amount": null,
            "discount_percentage": 25,
            "additive_discount_definition":
            {
                "life_cycle_state": "EFFECTIVE",
                "classification": "SUBSCRIPTIONS",
                "type": "AUTO_APPLY",
                "name": " Auto Apply TC 2_1",
                "id": "B49A5B2D654B4E5F88DCD3DD8855BE63",
                "alternative_code": "AAT2_1"
            },
            "product":
            {
                "product_type":
                {
                    "physical_good_type": null,
                    "service_type": "TERMED",
                    "used_for_provisioning": true,
                    "composition_method": "FLAT",
                    "classification": "SERVICES",
                    "name": "Subscription services",
                    "id": "600438B64B0F05AB3D020C902674949F",
                    "description": "Subscription services",
                    "alternative_code": "SS"
                },
                "id": "90578F46460B7C4530BE801CFE5CB9A1",
                "description": "Movies 2",
                "code": "Movies 2",
                "alternative_code": "m2"
            },
            "free_period_UOT": null
        }
    ]
}