Versions Compared

Key

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

POST additive_discounts/auto_apply_disounts/get_applicable_discounts

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.

Tip

Available from CRM.COM R6.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

...

Restrictions

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

Response Data

...

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
        }
    ]
}

POST additive_discounts/ad_hoc_disounts/get_available_discounts

This method returns a list of ad hoc discounts that are available for a subscription or a job having the specified characteristics. Ad hoc discounts are applied manually. Multiple ad hoc 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.

Tip

Available from CRM.COM R6.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

...

Restrictions

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

Response Data

...

Examples

...

titleExample 1

HTTP Method: POST

 

Request:

Body:

Code Block
themeConfluence
languagejavascript
linenumberstrue
 {
  "token":"C224050D1AD945009263D65CE98AFE35",
  "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":"ABTS"},
      "price_plan_identifier" : {"code":"BPP0614"},
      "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"
      }
    },
     "services_set":
     [
      {
       "service_identifier":{"code":"Bronze"}
      },
      {
       "service_identifier":{"code":"Movies 2"}
      }
     ] 
  }
}

 

 

Response:

...

themeConfluence
languagejavascript
linenumberstrue

...

POST additive_discounts/auto_apply_disounts/get_applicable_discounts

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.

Tip

Available from CRM.COM R6.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

Anchor
applicable discounts referred objects parameters
applicable discounts referred objects parameters
Referred Parameters Objects Data

Include Page
V4:rate_calculation_accounts_receivable_parameters
V4:rate_calculation_accounts_receivable_parameters

Include Page
V4:rate_calculation_subscription_parameters
V4:rate_calculation_subscription_parameters

Include Page
V4:additive_discount_job_parameters
V4:additive_discount_job_parameters

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":
      {
        "classificationbinding_period": "SERVICESWEEK",
           
        "namestart_date": "Subscription Packages",2015-06-05T15:49:59"
             },
      "idconcurrent_usage_based_pricing":
"BC954969D3172372D498D3BB2BA590A0",      {
        "concurrent_usage":10,
     "description": "Subscription main packages",
"rate_percentage":25
      }
      },
     "alternativeservices_codeset":
"SP"     [
      {
    },   "service_identifier":{"code":"Bronze"}
      },
      "id": "CAD1E31269B76D7A65ACCE45B2E68DFD",{
       "service_identifier":{"code":"Movies 2"}
      }
 "description": "Bronze Premium Package",  ]
  }
}

 

 

Response:

Code Block
themeConfluence
languagejavascript
linenumberstrue
      {
    "codestatus":
"Bronze",    {
        "message": null,
  "alternative_code": "BP"     "description": null,
      },  "code": "OK"
    },
    "free_period_UOTdata": null
        },[
        {
            "discount_amount_UOT": "YEARS"null,
            "to_date": "20152016-0603-12T0011T00:00:00",
            "from_date": "2015-0504-05T0006T00:00:00",
            "free_period": null,
            "discount_amount": 50null,
            "discount_percentage": null25,
            "additive_discount_definition":
            {
                "life_cycle_state": "EFFECTIVE",
                "classification": "SUBSCRIPTIONS",
                "type": "ADAUTO_HOCAPPLY",
                "name": "Sub Test Auto Apply TC 2_1",
                "id": "78309B32849D44C1B11DFE8A9796F9C7B49A5B2D654B4E5F88DCD3DD8855BE63",
                "alternative_code": "STAAT2_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
        }
    ]
}