Versions Compared

Key

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

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...


Excerpt

This method is used to create a new subscription by identifying an existing or new subscriber and the subscription services or installed items that should be added on the subscription. A single subscription can be created by each call

Resource URL

Parameters

Name

Type

Description

token

String

The token retrieved from the login method

business_classification_code

(mandatory)

String Defines if the subscription should be created as draft or effective. The allowed options are CREATE_ACTIVATE_SUBSCRIPTION or CREATE_DRAFT_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


classification_identifier

(optional)

Subscription Action Classification Identifier

The subscription action's classification. The allowed subscription action classification identifier fields are the following:

Include Page
V4:subscription_action_classification_identifier
V4:subscription_action_classification_identifier

Tip

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


billing_effective_date

(optional)

DateDetermines when the subscription services that are affected by the subscription action should be billed by the billing engine.

billable_period_start_date

(optional)

DateDetermines the start date of the billable period of each subscription service  (it answers to the question “from which date should I start billing this service) that is affected by the subscription action.

performed_on

(optional)

DateThe date that the action was actually performed

promo_code

(optional)

String

The effective, not expired promo code that can be redeemed, providing an Ad Hoc Discount to the Subscription. The promo code is validated against its related promotion campaign's settings and its related ad hoc discount definition settings in

order to be provided.

order to be provided.

Tip

Available from CRM.COM R14.2.0


require_verification

(optional)

Boolean

Determines whether the Subscription and Subscription Action will require fulfillment through a Job

Tip

Available from CRM.COM

R14

R15.

2

1.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)

String

Float

User Defined Field of type

String

Float

udf_

string

date_

8

1 

(optional)

String

Date

User Defined Field of type

String

Date

udf_

float

date_

1

2 

(optional)

Float

Date

User Defined Field of type

Float

Date

udf_

float

date_

2

3

(optional)

Float

Date

User Defined Field of type

Float

Date

udf_

float

date_

3

4

(optional)

Float

Date

User Defined Field of type

Float

Date

udf

custom_

float

field_

4

set

(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

Set of Custom Fields

The custom fields that are associated with the subscription

If no records are specified in the set then nothing will be updated. To add or update a value on a custom field use the custom field name as configured in CRM.COM along with the respective value. To remove a value from a custom field use the custom field name as configured in CRM.COM along with an empty value

Code Block
languagejavascript
themeConfluence
linenumberstrue
"custom_field_set": [
	{"field_name" : "value"},
	{"field_name" : "value"}
]


Tip

Available from CRM.COM R16.2.0


subscription

(mandatory)

Subscription objectInformation related with the subscription that should be created.

services_set

(mandatory)

Set of subscription service objects

The services that will be added on the subscription. The set is optional if the business classification code is set to CREATE_DRAFT_SUBSCRIPTION. Otherwise, if the option is set to CREATE_ACTIVATE_SUBSCRIPTION, the set is mandatory.

Tip

From CRM.COM R14.0.0 onwards, 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

provisioning_distributor_labels_set

(optional)

Set of subscription provisioning distributor label objects

The labels that will be applied on the specified provisioning distributor for that specific subscription. Each provisioning distributor can

be labeled only once per subscription. At least one service or installed item should be distributed to each provisioning distributor which is specified in that set

be labeled only once per subscription. At least one service or installed item should be distributed to each provisioning distributor which is specified in that set

Tip

Available from CRM.COM R13.0.0


Tip

Deprecated from CRM.COM R15.0.0


expenses_set

(optional)

Set of Subscription Expenses Objects

The expenses that will be added on the subscription

Tip

Available from CRM.COM

R13

R14.

0

5.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


Anchor
subscription_create referred objects parameters
subscription_create referred objects parameters
Referred Parameter Objects Data

...

Include Page
V4:subscription_provisioning_distributor_labels_parameter
V4:subscription_provisioning_distributor_labels_parameter

Include Page
V4:new_subscription_expense_parameter
V4:new_subscription_expense_parameter

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":"631A9039916CE2ACF1CAD64E4DFCA1AB",
    "business_classification_code":"CREATE_DRAFT_SUBSCRIPTION",
    "performed_by_user_identifier":{
        "username":"mpadministrator"
    },
    "performed_on":"2015-02-02T15:00:00",
   "udf_string_1":"udf string 1",
   "udf_string_2":"udf string 2",
   "udf_string_3":"udf string 3",
   "udf_string_4":"udf string 4",
   "udf_string_5":"udf string 5",
   "udf_string_6":"udf string 6",
   "udf_string_7":"udf string 7",
   "udf_string_8":"udf string 8",
   "udf_float_1":10,
   "udf_float_2":20,
   "udf_float_3":30,
   "udf_float_4":40,
   "udf_float_5":50,
   "udf_float_6":60,
   "udf_float_7":70,
   "udf_float_8":80,
   "udf_date_1":"2014-05-05T15:49:59",
   "udf_date_2":"2014-06-05T15:49:59",
   "udf_date_3":"2014-07-05T15:49:59",
   "udf_date_4":"2014-08-05T15:49:59",
   "billing_effective_date": "2015-02-30T15:49:59",
   "billable_period_start_date":"2015-02-30T15:49:59",
    "subscription":{
        "type_identifier":{
            "name":"London"
        },
        "owned_by_group_identifier":{
            "name":"Main Group"
        },
        "accounts_receivable":{
            "action":"EXISTING",
            "accounts_receivable_identifier":{
                "number":"463"
            }
        },
        "billing_terms":{
            "billing_term_scheme_identifier":{
                "code":"PPBT"
            },
            "price_plan_identifier":{
                "code":"BPP0614"
            },
            "agreement_date":"2015-02-02T13:00:00",
        },
        "subscription_address":{
            "action":"EXISTING",
            "type":"SAMEASBILLINGADDRESS"
        }
    },
    "services_set":[
        {
            "service_identifier":{
                "code":"Bronze"
            },
        "components_set":[
        {
            "service_identifier":{
                    "code":"Cartoons 1 "
            }
        }
        ],
            "services_distribution_set":[
                {
                    "provisioning_distributor_identifier":{
                        "name":"Main"
                    }
                },
                {
                    "provisioning_distributor_identifier":{
                        "name":"Twin 1"
                    }
                }
            ]
        },
        {
            "service_identifier":{
                "code":"Cartoons 1 "
            }
        }
    ],
            "installed_items_distribution_set":[
                {
                    "provisioning_distributor_identifier":{
                        "name":"Main"
                    }
                }
            ]
        }
    ]
}

Response:

Code Block
languagejavascript
themeConfluence
languagejavascript
linenumberstrue
{
    "status":
    {
        "message": null,
        "description": null,
        "code": "OK"
    },
    "data":
    {
        "accounts_receivable":
        {
            "account_owner":
            {
                "last_name": "Papapavlou",
                "life_cycle_state": "FINANCIAL",
                "middle_name": "Andreas",
                "company_profile": null,
                "title": "Ms",
                "type": "PERSON",
                "first_name": "Lucia",
                "name": "Lucia Papapavlou",
                "id": "1D92B269658D80DEDF2499E25201739E",
                "company_name": null,
                "demographics":
                {
                    "gender": "FEMALE",
                    "passport_issued_by_country":
                    {
                        "name": "GREECE",
                        "id": "209"
                    },
                    "passport_number": "113115",
                    "social_security_number": "113116",
                    "country_of_residence":
                    {
                        "name": "UNITED KINGDOM",
                        "id": "126"
                    },
                    "industry_sector":
                    {
                        "name": "GOVERNMENTAL",
                        "id": "A9BDEBD4D8FAEDB0BACE40C041156D12",
                        "alternative_code": "GOV"
                    },
                    "date_of_birth":
                    {
                        "month": 1,
                        "day": 1,
                        "year": 1990
                    },
                    "name_day":
                    {
                        "month": 5,
                        "day": 5
                    },
                    "id_number": "113114",
                    "id_issued_by_country":
                    {
                        "name": "GREECE",
                        "id": "209"
                    },
                    "industry":
                    {
                        "name": "Interior Design",
                        "id": "06B638258885DA26FA2BD40D9128D04E",
                        "code": "INTDS"
                    }
                }
            },
            "life_cycle_state": "ACTIVE",
            "number": "463",
            "name": "Loukia Papapavlou",
            "id": "ECEBDFA26C8B04960EC1C6D99363D48C"
        },
        "life_cycle_state": "DRAFT",
        "number": "S60261",
        "type":
        {
            "name": "London",
            "id": "3100B0D56E7C7EADF073C34BCE1E42AF",
            "description": "For Subscribers residing in London
",
            "alternative_code": "LND"
        },
        "id": "048CD57D30C9FC43D405CFCC81ECCE3B"
    }
}


...

Expand
titleExample 2

HTTP Method: POST

 


Request:

Body:

Code Block
languagejavascript
themeConfluencelanguagejavascript
linenumberstrue
{
    "token":"631A9039916CE2ACF1CAD64E4DFCA1AB",
{
    "token":"{{token}}",
     "fields_set":"number,accounts_receivable,type,sub_action_type,rating_state",
    "business_classification_code":"CREATE_DRAFT_SUBSCRIPTION",
    "performed_by_user_identifier":{
        "username":"mpadministrator"
    },
    "performed_on":"2015-02-02T15:00:00",
   "udf_string_1":"udf string 1",
   "udf_string_2":"udf string 2",
   "udf_string_3":"udf string 3",
   "udf_string_4":"udf string 4",
   "udf_string_5":"udf string 5",
   "udf_string_6":"udf string 6",
   "udf_string_7":"udf string 7",
   "udf_string_8":"udf string 8",
   "udf_float_1":10,
   "udf_float_2":20,
   "udf_float_3":30,
   "udf_float_4":40,
   "udf_float_5":50,
   "udf_float_6":60,
   "udf_float_7":70,
   "udf_float_8":80,
   "udf_date_1":"2014-05-05T15:49:59",
   "udf_date_2":"2014-06-05T15:49:59",
   "udf_date_3":"2014-07-05T15:49:59",
   "udf_date_4":"2014-08-05T15:49:59",
   "billing_effective_date": "2015-02-30T15:49:59",
   "billable_period_start_date":"2015-02-30T15:49:59",
    "subscription":{
        "type_identifier":{
            "name":"London"
        },
        "owned_by_group_identifier":{
            "name":"Main Group"
        },
        "accounts_receivable":{
            "action":"EXISTING",
            "accounts_receivable_identifier":{
                "number":"ACR000929"
            }
        },
        "billing_terms":{
            "billing_term_scheme_identifier":{
                "code":"Standard-9"
            },
            "billing_frequency":"MONTHLY",
            "price_plan_identifier":{
                "code":"BPP0614"
            },
            "agreement_date":"2015-02-02T13:00:00"
        },
        "subscription_address":{
            "action":"EXISTING",
            "type":"SAMEASBILLINGADDRESS"
        }
    },
    "services_set":[
        {
            "service_identifier":{
                "code":"Bronze"
            },
        "components_set":[
        {
            "service_identifier":{
                    "code":"Cartoons 1 "
            }
        }
        ]
        }
    ]
}

Response:

Code Block
languagejavascript
themeConfluencelanguagejavascript
linenumberstrue
{
  "status": {
    "message": "",
    "description": "",
    "code": "OK"
  },
  "data": {
    "accounts_receivable": {
      "account_owner": {
        "last_name": "Tz",
        "middle_name": null,
        "life_cycle_state": "FINANCIAL",
        "company_profile": null,
        "title": null,
        "first_name": "Ek",
        "type": "PERSON",
        "id": "15D4F07E221E44088CDE00A96DB1A250",
        "name": "Tz Ek",
        "company_name": null,
        "demographics": {
          "gender": null,
          "passport_issued_by_country": null,
          "social_security_number": null,
          "passport_number": "18181818",
          "industry_sector": null,
          "country_of_residence": {
            "three_character_code": "CYP",
            "two_character_code": "CY",
            "id": "181",
            "name": "CYPRUS",
            "alternative_code": null
          },
          "name_day": {
            "month": null,
            "day": null
          },
          "date_of_birth": {
            "month": null,
            "day": null,
            "year": null
          },
          "id_number": null,
          "industry": null,
          "id_issued_by_country": null
        }
      },
      "life_cycle_state": "ACTIVE",
      "number": "ACR000929",
      "id": "0DA7BAB9909E49828BB84079AA588AF8",
      "name": "ACR000929"
    },
    "number": "S60948",
    "type": {
      "id": "D433A85FB6CD4880A1BCEEB1E164EFA4",
      "name": "London",
      "description": "Subscription for London customers",
      "alternative_code": "LND"
    },
    "rating_state": "PENDING"
  }
}


...

Expand
titleExample 3 (with Stripe Payment Preference)

HTTP Method: POST 


Request:

Body:

Code Block
language
languagejavascript
themeConfluence
javascriptlinenumberstrue
{  
   "token":"{{token}}",
   "fields_set":"id",
   "business_classification_code":"CREATE_DRAFT_SUBSCRIPTION",
   "action_type_identifier":{  
      "name":"Become Subscriber Draft"
   },
   "sub_action_type_identifier":{  
      "name":"Become Subscriber Draft Sub"
   },
   "performed_by_user_identifier":{  
      "username":"mpadministrator"
   },
   "performed_on":"2015-02-02T15:00:00",
   "udf_string_1":"udf string 1",
   "udf_string_2":"udf string 2",
   "udf_string_3":"udf string 3",
   "udf_string_4":"udf string 4",
   "udf_string_5":"udf string 5",
   "udf_string_6":"udf string 6",
   "udf_string_7":"udf string 7",
   "udf_string_8":"udf string 8",
   "udf_float_1":10,
   "udf_float_2":20,
   "udf_float_3":30,
   "udf_float_4":40,
   "udf_float_5":50,
   "udf_float_6":60,
   "udf_float_7":70,
   "udf_float_8":80,
   "udf_date_1":"2014-05-05T15:49:59",
   "udf_date_2":"2014-06-05T15:49:59",
   "udf_date_3":"2014-07-05T15:49:59",
   "udf_date_4":"2014-08-05T15:49:59",
   "billing_effective_date":"2015-02-30T15:49:59",
   "billable_period_start_date":"2015-02-30T15:49:59",
   "subscription":{  
      "type_identifier":{  
         "name":"Normal"
      },
      "owned_by_group_identifier":{  
         "name":"Main Group"
      },
      "accounts_receivable":{  
         "action":"NEW",
         "billing_address":{  
            "action":"NEW",
            "address":{  
               "type":"CUSTOM1",
               "street_name":"Street"
            }
         },
         "contact_information":{  
            "action":"NEW",
            "type":"PERSON",
            "first_name":"John",
            "middle_name":"S",
            "last_name":"Smith",
            "address_set":[  
               {  
                  "type":"CUSTOM2",
                  "street_name":"Hollywood Blvd"
               }
            ]
         },
         "presentment_preferences_set":[  
            {  
               "presentment_preference_identifier":{  
                  "name":"Email"
               },
               "state":"ACTIVE",
               "email":{  
                  "action":"NEW",
                  "email":{  
                     "type":"BUSINESS",
                     "email_address":"crm.com.tst@gmail.com"
                  }
               }
            }
         ],
         "payment_preferences_set":[  
            {  
               "use_for_recurring_payments":true,
               "is_default":true,
               "payment_preference_identifier":{  
                  "alternative_code":"SP"
               },
               "cards_set":[  
                  {  
                     "default":true,
                     "number":"4242424242424242",
                     "expiration_month":3,
                     "expiration_year":2018,
                     "card_holder_name":"John Smith",
                     "card_security_code":123
                  }
               ]
            }
         ],
         "access_tokens_set":[  
            {  
               "action":"ADD_NEW"
            }
         ]
      },
      "billing_terms":{  
         "billing_term_scheme_identifier":{  
            "code":"Normal Billing Scheme"
         },
         "billing_frequency":"MONTHLY",
         "price_plan_identifier":{  
            "code":"MPP"
         },
         "agreement_date":"2016-04-01T13:00:00"
      },
      "subscription_address":{  
         "action":"NEW",
         "address":{  
            "type":"HOME",
            "street_name":"Business str"
         }
      }
   },
   "services_set":[  
      {  
         "service_identifier":{  
            "code":"Bronze"
         }
      }
   ]
}
    

Response:

Code Block
languagejavascript
themeConfluencelanguagejavascript
linenumberstrue
{
  "data": {
    "id": "2EF28BDA18C049D9B5221EFD0AEAECD3"
  },
  "status": {
    "code": "OK",
    "description": "",
    "message": ""
  }
}


...