Versions Compared

Key

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

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

POST subscriptions/preview_bill

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

Resource URL

Parameters

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 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 R10.0.0 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

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

Tip

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

Tip

Available from CRM.COM R6.0.0

performed_on

(optional)

Date

 The date that the action was actually performed

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

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.

Response Data

Name

Type

Description

bill_previewBill preview objectThe bill preview results
wallet_consumption_previewWallet product consumption objectThe wallet product consumption preview results

...

Include Page
V4:wallet_consumption_preview_short
V4:wallet_consumption_preview_short

Examples

Expand
titleExample 1

HTTP Method: POST

 

Request:

Body:

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


Response:

Code Block
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
    }
}

...