Versions Compared

Key

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

...

...

...

...

...

...

...

...

...

...

...

...


Tip

Available from CRM.COM R14.2.0


Excerpt

It applies a promo code on an existing subscription

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 the promo code will be applied on. 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


promo_code

(mandatory)

String

The code of the promo code that will be redeemed

 


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

TipAvailable 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
language
languagejavascript
themeConfluence
javascriptlinenumberstrue
 

Response:

Code Block
 

 

 

...

{
    "token":"{{token}}",
    "accounts_receivable_identifier":{"number":"ACR0000002278"},
    "promo_code":"SC4I0EnXfSky6Qt"
}


Response:

Code Block
 {
    "data": {
        "number": "S0000001547",
        "first_activated_date": "2018-07-26T19:01:11",
        "rating_state": "PENDING",
        "accounts_receivable": {
            "number": "ACR0000002278",
            "name": "ACR0000002278 Jack Jack",
            "id": "3CA398616D084C80B85FB979ADF6E85F",
            "life_cycle_state": "ACTIVE",
            "account_owner": {
                "company_profile": null,
                "company_name": null,
                "name": null,
                "last_name": "Jack",
                "id": "AD6CE01DC8D84386B12F4B59E5EFCC2F",
                "life_cycle_state": "FINANCIAL",
                "middle_name": null,
                "title": null,
                "type": "PERSON",
                "first_name": "Jack",
                "demographics": {
                    "id_number": null,
                    "gender": null,
                    "country_of_residence": {
                        "alternative_code": "CY",
                        "three_character_code": null,
                        "name": "Cyprus",
                        "id": "5BC0",
                        "two_character_code": null
                    },
                    "date_of_birth": {
                        "month": null,
                        "year": null,
                        "day": null
                    },
                    "industry_sector": null,
                    "industry": null,
                    "name_day": {
                        "month": null,
                        "day": null
                    },
                    "passport_number_expiration_date": null,
                    "id_number_expiration_date": null,
                    "passport_number": null,
                    "social_security_number": null,
                    "id_issued_by_country": null,
                    "passport_issued_by_country": null
                }
            }
        },
        "id": "6A0E041667F64D3597534D47F2E2961B",
        "life_cycle_state": null,
        "type": {
            "alternative_code": "NormalSub",
            "name": "Normal",
            "description": null,
            "id": "D1BAE6454A2248189EBCD7ADD3B4B65F",
            "classification": "FLEXIBLE"
        }
    },
    "status": {
        "code": "OK",
        "description": "",
        "message": ""
    }
}