Versions Compared

Key

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

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...


Tip

Available from CRM.COM R14.0.0


Tip

Deprecated from CRM.COM R16.0.0


Excerpt

This method is used to replace an existing subscription with a new one. The initial subscription is replaced in cases in which users require to move:

  • From a flexible subscription to another flexible subscription
  • From a flexible subscription to a packaged subscription and vice versa

A single subscription can be replaced by each call.

Resource URL

Parameters

Name

Type

Description

token

String

The token retrieved from the login method

subscription_identifier

(semi-optional)

Subscription identifier

The subscription to be modified. The allowed subscription identifier fields are the following:

Include Page
V4:subscription_identifier
V4:subscription_identifier

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


replaced_by_type_identifier

(mandatory)

Subscription Type Identifier

The subscription type of the subscription which will replace the specified subscription. The allowed subscription type identifier fields are the following:

Include Page
V4:subscription_type_identifier
V4:subscription_type_identifier

business_classification_code

(mandatory)

String

Defines if the subscription should be replaced by a Flexible Subscription Type or a Package Subscription Type. The allowed options are

  • REPLACE_SUB_FLEX_TO_FLEX: Replacement is done between a flexible subscription to a flexible subscription
  • REPLACE_SUB_FLEX_TO_PACK: Replacement is done between a flexible subscription to a packaged subscription
  • REPLACE_SUB_PACK_TO_FLEX: Replacement is done between a packaged subscription to a flexible subscription

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

Tip

Deprecated from CRM.COM R15.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

payment_gateway_card_identifier

(optional)

Payment Gateway Card Identifier

The payment gateway card that will be used to post a payment against the accounts receivable of the subscription. Applicable and required only for Subscriptions following the "Pay before bill" payment model. The applicable payment gateway card identifier fields are the following:

Include Page
V4:payment_gateway_card_identifier
V4:payment_gateway_card_identifier

Tip

Available from CRM.COM R14.3.0


performed_on

(optional)

Date The date that the action was actually performed

scheduled_date

(optional)

Date

The date that the action is scheduled to be executed. If not specified then the action will be executed immediately

 


use_proposed_scheduled_date

(optional)

Boolean

Defines whether the scheduled date automatically calculated and proposed by the system based on business rules, will be automatically set as the subscription's scheduled date or not. Applicable only if the subscription action includes a scheduled date and only if this scheduled date does not meet the business rules.

Tip

Available from CRM.COM R15.0.0


udf_string_1 

(optional)

String

User Defined Field of type String

udf_string_2 

(optional)

String

User Defined Field of type String

udf_string_3 

(optional)

String

User Defined Field of type String

udf_string_4 

(optional)

String

User Defined Field of type String

udf_string_5

(optional)

String

User Defined Field of type String

udf_string_6 

(optional)

String

User Defined Field of type String

udf_string_7

(optional)

String

User Defined Field of type String

udf_string_8

(optional)

String

User Defined Field of type String

udf_float_1

(optional)

Float

User Defined Field of type Float

udf_float_2

(optional)

Float

User Defined Field of type Float

udf_float_3

(optional)

Float

User Defined Field of type Float

udf_float_4

(optional)

Float

User Defined Field of type Float

udf_date_1 

(optional)

Date

User Defined Field of type Date

udf_date_2 

(optional)

Date

User Defined Field of type Date

udf_date_3

(optional)

Date

User Defined Field of type Date

udf_date_4

(optional)

Date

User Defined Field of type Date

billing_terms

(mandatory)

Billing terms object The billing terms of the subscription to be created

services_set

(optional)

Set of subscription service objects

The services that will be added on the subscription.

Tip

If the Subscription's Type is of classification Package then any Services added on the Subscription are considered as Additional Services.


installed_items_set

(optional)

Set of subscription installed item objects

The installed items that might be needed to be added on the subscription in order to be allowed to add the required services

Tip

If the Subscription's Type is of classification Package then any Installed Items added on the Subscription are considered as Additional Installed Items.


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
subscription_replace referred objects parameters
subscription_replace referred objects parameters
Referred Parameter Objects Data

...

Expand
titleExample 1

HTTP Method: POST

{{server}}/crmapi/rest/v2/subscriptions/replace_subscription

Request:

Body:

Code Block
languagejavascript
themeConfluence
languagejavascript
linenumberstrue
{
	"token": {{token}},
	"subscription_identifier": {
		"number": "S0000009272"
	},
	"replaced_by_type_identifier": {
		"name": "Normal"
	},
	"business_classification_code": "REPLACE_SUB_FLEX_TO_FLEX",
	"billing_terms":{
        "billing_term_scheme_identifier":{
            "code":"Normal Billing Scheme"
        },
        "price_plan_identifier":{
            "code":"MPP"
        },
        "agreement_date":"2017-11-01T18:00:00",
        "binding_information": {
        	"binding_period": "ANNUAL",
        	"start_date": "2017-11-01T18:00:00"
        },
        "concurrent_usage_based_pricing": {
        	"concurrent_usage": "5",
        	"rate_percentage": "10"
        }
    }
}

Response:

Code Block
language
languagejavascript
themeConfluence
javascriptlinenumberstrue
{
    "data": {
        "performed_by": null,
        "action_type": null,
        "transaction_reference_number": null,
        "submitted_by": {
            "person_name": "CRM COM",
            "id": "1",
            "username": "MPAdministrator"
        },
        "executed_on": "2017-11-14T17:45:29",
        "life_cycle_state": "EXECUTED",
        "subscription": {
            "number": "S0000009402",
            "first_activated_date": null,
            "rating_state": "PENDING",
            "accounts_receivable": {
                "number": "ACR0000012787",
                "name": "ACR0000012787 Polina Kestora5",
                "id": "88B7848E892F45B49C12F1EA7829668B",
                "life_cycle_state": "ACTIVE",
                "account_owner": {
                    "company_profile": null,
                    "company_name": null,
                    "name": "Polina Kestora5",
                    "last_name": "Kestora5",
                    "id": "7920613F49EE401AA75A1931E4689C8A",
                    "life_cycle_state": "FINANCIAL",
                    "middle_name": null,
                    "title": null,
                    "type": "PERSON",
                    "first_name": "Polina",
                    "demographics": {
                        "name_day": {
                            "month": null,
                            "day": null
                        },
                        "id_number": "45452211",
                        "gender": null,
                        "country_of_residence": {
                            "alternative_code": "CYP",
                            "three_character_code": "CYP",
                            "name": "CYPRUS",
                            "id": "181",
                            "two_character_code": "CY"
                        },
                        "date_of_birth": {
                            "month": null,
                            "year": null,
                            "day": null
                        },
                        "industry_sector": null,
                        "passport_number": null,
                        "industry": null,
                        "social_security_number": null,
                        "id_issued_by_country": null,
                        "passport_issued_by_country": null
                    }
                }
            },
            "id": "573AE69FE7674983A7F822E0DB338716",
            "life_cycle_state": "DRAFT",
            "type": {
                "alternative_code": "normalsub",
                "name": "Normal",
                "description": null,
                "id": "D1BAE6454A2248189EBCD7ADD3B4B65F",
                "classification": "FLEXIBLE"
            }
        },
        "scheduled_date": "2017-11-14T17:45:29",
        "performed_on": null,
        "sub_action_type": null,
        "business_classification_code": "CREATE_DRAFT_SUBSCRIPTION",
        "number": "26598",
        "submitted_on": "2017-11-14T17:45:29",
        "id": "DDB0D1A0A5FF47B896D3872D6F0B70F1",
        "job": null,
        "behavior_code": "REPLACE_SUBSCRIPTION",
        "performed_by_unit": null
    },
    "status": {
        "code": "OK",
        "description": "",
        "message": ""
    }
}

 

 

...