Versions Compared

Key

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

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...


Excerpt

It previews the bill of one subscription based on a specific as of date

...

Name

Type

Description

token

String

The token retrieved from the login method

subscription_identifier

(semi-optional)

Identifier  

The identifier of the subscription that should be previewed. The allowed subscription identifier fields are the following:

Include Page
V4:subscription_identifier
V4:subscription_identifier

Tip

For releases prior to CRM.COM R13.0.0 the subscription_identifier is mandatory


accounts_receivable_identifier

(semi-optional)

Accounts Receivable Identifier

The accounts receivable identifier that can be used to perform the subscription modification. The allowed accounts receivable identifier fields are the following:

Include Page
V4:accounts_receivable_identifier_post
V4:accounts_receivable_identifier_post

Note

The ability to use the accounts_receivable_identifier instead of the subscription_identifier is applicable only when the specified Accounts Receivable owns only one Subscription

Tip

Available when the specified Accounts Receivable owns only one Subscription


Tip

Available from CRM.COM R13.0.0


as_of_date

(mandatory)

Date

The date that will be used to bill the subscription

Tip

Starting from CRM.COM

R13

R10.0.0

as_of_date

(mandatory)

Date

The date that will be used to bill the subscription

Tip

Starting from CRM.COM R10.0.0 this parameter will not be applicable on subscriptions following a prepaid billing term scheme

this parameter will not be applicable on subscriptions following a prepaid billing term scheme


action_type_identifier

(optional)

Subscription action type identifier

The action type that should be used. The allowed subscription action type identifier fields are the following:

Include Page
V4:subscription_action_type_identifier
V4:subscription_action_type_identifier


Tip

Deprecated from CRM.COM R15.0.0


sub_action_type_identifier

(optional)

Subscription sub action type identifier

The sub action type that should be used. The allowed subscription sub action type identifier fields are the following:

Include Page
V4:subscription_sub_action_type_identifier
V4:subscription_sub_action_type_identifier

 

sub_action_type
Tip

Deprecated from CRM.COM R15.0.0


classification_identifier

(optional)

Subscription sub action type identifierAction Classification Identifier

The

sub action type that should be used

subscription action's classification. The allowed subscription

sub

action

type

classification identifier fields are the following:

Include Page
V4:subscription_

sub_

action_

type

classification_identifier
V4:subscription_

sub_

action_

type

classification_identifier

 

Tip

Available from CRM.COM R18.0.0


transaction_reference_number

(optional)

String

The transaction reference number of the performed subscription action. The transaction reference number is unique against already submitted subscription actions. 

Tip

Available from CRM.COM R13.0.0


performed_by_user_identifier

(optional)

User identifier

 The user that actually performed the action. The allowed user identifier fields are the following:

Include Page
V4:user_identifier
V4:user_identifier
 


performed_on

(optional)

Date

 The date that the action was actually performed

 


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

Tip

Available from CRM.COM R10.0.0

 

 

 


Restrictions

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

...

Expand
titleExample 1

HTTP Method: POST 


Request:

Body:

Code Block
languagejavascript
themeConfluencelanguagejavascript
linenumberstrue
{
    "token":"827646F7058139B66EA59CBA46D46FF3",
    "subscription_identifier":{"number":"S60261"},
    "as_of_date":"2014-12-31T00:00:00"
}


Response:

Code Block
languagejavascript
themeConfluence
languagejavascript
linenumberstrue
{
    "status":
    {
        "message": null,
        "description": null,
        "code": "OK"
    },
    "data":
    {
        "bill_preview":
        {
            "total_amount_to_be_paid": 329.35,
            "product_set":
            [
                {
                    "to_date": "2015-01-01T00:00:00",
                    "from_date": "2014-12-01T00:00:00",
                    "total_amount": 310,
                    "product":
                    {
                        "product_type":
                        {
                            "physical_good_type": null,
                            "service_type": "TERMED",
                            "used_for_provisioning": true,
                            "composition_method": "FLAT",
                            "classification": "SERVICES",
                            "name": "Subscription Packages",
                            "id": "BC954969D3172372D498D3BB2BA590A0",
                            "description": "Subscription main packages",
                            "alternative_code": "SP"
                        },
                        "id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
                        "description": "Bronze Premium Package",
                        "code": "Bronze",
                        "alternative_code": "BP"
                    }
                },
                {
                    "to_date": "2015-01-01T00:00:00",
                    "from_date": "2014-12-02T00:00:00",
                    "total_amount": 19.35,
                    "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": "EBAC84F9A0086191BD58B624D236D61D",
                        "description": "Sports 1",
                        "code": "Sports 1",
                        "alternative_code": "S1"
                    }
                }
            ],
            "to_date": null,
            "from_date": null,
            "total_billed_amount": 329.35
        },
        "wallet_consumption_preview": null
    }
}


...

Expand
titleExample 2

HTTP Method: POST 


Request:

Body:

Code Block
language
languagejavascript
themeConfluence
javascriptlinenumberstrue
{
    "token":"{{token}}",
    "subscription_identifier":{"number":"S0000000020"},
    "as_of_date":"2016-07-05T00:00:00"
}


Response:

Code Block
languagejavascript
themeConfluence
languagejavascript
linenumberstrue
{
  "data": {
    "wallet_consumption_preview": null,
    "bill_preview": {
      "from_date": "2016-03-18T00:00:00",
      "to_date": "2016-08-01T00:00:00",
      "currency": {
        "suffix_symbol": null,
        "prefix_symbol": "£",
        "decimal_part_name": null,
        "code": "GBP",
        "integer_part_name": null,
        "id": "9"
      },
      "total_billed_amount": 251.4,
      "total_amount_to_be_paid": 477.61,
      "product_set": [
        {
          "product": {
            "code": "Gold",
            "product_type": {
              "service_type": "TERMED",
              "used_for_provisioning": true,
              "alternative_code": "Main Packages",
              "composition_method": "FLAT",
              "name": "Main Packages",
              "description": null,
              "id": "E186E293AAAB49EE86A729540A4287FE",
              "classification": "SERVICES",
              "physical_good_type": null
            },
            "alternative_code": "G",
            "description": "Gold",
            "id": "D1EB074DFD904E54A0C67CAB9DC7E010"
          },
          "from_date": "2016-06-17T00:00:00",
          "to_date": "2016-08-01T00:00:00",
          "total_amount": 73.33,
          "applied_additive_discounts_set": []
        },
        {
          "product": {
            "code": "Bronze",
            "product_type": {
              "service_type": "TERMED",
              "used_for_provisioning": true,
              "alternative_code": "Main Packages",
              "composition_method": "FLAT",
              "name": "Main Packages",
              "description": null,
              "id": "E186E293AAAB49EE86A729540A4287FE",
              "classification": "SERVICES",
              "physical_good_type": null
            },
            "alternative_code": "B",
            "description": "Bronze",
            "id": "F50CC52934BD4F119B6E18E215A4FC55"
          },
          "from_date": "2016-06-17T00:00:00",
          "to_date": "2016-08-01T00:00:00",
          "total_amount": 58.67,
          "applied_additive_discounts_set": []
        },
        {
          "product": {
            "code": "Bronze",
            "product_type": {
              "service_type": "TERMED",
              "used_for_provisioning": true,
              "alternative_code": "Main Packages",
              "composition_method": "FLAT",
              "name": "Main Packages",
              "description": null,
              "id": "E186E293AAAB49EE86A729540A4287FE",
              "classification": "SERVICES",
              "physical_good_type": null
            },
            "alternative_code": "B",
            "description": "Bronze",
            "id": "F50CC52934BD4F119B6E18E215A4FC55"
          },
          "from_date": "2016-03-18T00:00:00",
          "to_date": "2016-06-17T00:00:00",
          "total_amount": 119.4,
          "applied_additive_discounts_set": []
        }
      ]
    }
  },
  "status": {
    "code": "OK",
    "description": "",
    "message": ""
  }
}


...

Expand
titleExample 3

HTTP Method: POST

 


Request:

Body:

Code Block
languagejavascript
themeConfluence
languagejavascript
linenumberstrue
{
    "token":"{{token}}",
    "subscription_identifier":{"number":"S0000008563"},
    "as_of_date":"2017-04-30T00:00:00"
}


Response:

Code Block
languagejavascript
themeConfluencelanguagejavascript
linenumberstrue
{
  "data": {
    "wallet_consumption_preview": null,
    "bill_preview": {
      "total_vat_amount_of_member": 1.92,
      "from_date": "2017-04-06T00:00:00",
      "to_date": "2017-05-01T00:00:00",
      "total_vat_amount_of_parent": 46.4,
      "total_billed_amount_of_member": 9.58,
      "total_tax_amount_of_parent": 23.42,
      "total_tax_amount_of_member": 0.22,
      "currency": {
        "suffix_symbol": null,
        "prefix_symbol": "€",
        "decimal_part_name": null,
        "code": "EUR",
        "integer_part_name": null,
        "id": "2"
      },
      "total_amount_to_be_paid": 9.58,
      "total_billed_amount_of_parent": 250,
      "product_set": [
        {
          "product": {
            "code": "Movies 1",
            "product_type": {
              "service_type": "TERMED",
              "used_for_provisioning": true,
              "alternative_code": "AS",
              "composition_method": "FLAT",
              "name": "Additional Services",
              "description": null,
              "id": "C8321F0BCA8A4051857BC35CEEE41555",
              "classification": "SERVICES",
              "physical_good_type": null
            },
            "alternative_code": "M1",
            "description": "Movies 1",
            "id": "571C10876AF840088372A94A14D0A02C"
          },
          "from_date": "2017-04-06T00:00:00",
          "to_date": "2017-05-01T00:00:00",
          "total_amount": 9.58,
          "applied_additive_discounts_set": []
        }
      ]
    }
  },
  "status": {
    "code": "OK",
    "description": "",
    "message": ""
  }
}


...