Skip to end of banner
Go to start of banner

POST subscriptions/apply_promo_code

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Current »

Available from CRM.COM R14.2.0

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:

Name

Type

Description

id 

(semi-optional)

String

The ID of subscription

number 

(semi-optional)

String

The number of subscription

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:

Name

Type

Description

id

(semi-optional)

String

The ID of the accounts receivable

number

(semi-optional)

String

The number of the accounts receivable

name

(semi-optional)

String

The name of the accounts receivable

access_token_identifier

(semi-optional)

Access Token Identifier

The identifier of the access token which is related with the accounts receivable. Only effective access tokens can be used to identify an accounts receivable. The allowed access token identifier fields are the following

Name

Type

Description

authentication_code

(semi-optional)

String

The authentication code of the access token

identifier

(semi-optional)

StringThe identifier of the access token. If the identifier is specified then it will be validated against the specified pass code

pass_code

(mandatory on conditions)

StringThe pass code of the access token, which is applicable and mandatory if the identifier is specified

one_time_password

(semi-optional)

Integer

The one-time password (OTP) of the access token

Available from CRM.COM R13.0.0

Available from CRM.COM R8.0.0

Deprecated from CRM.COM R18.0.0

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

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

 subscription object response data

Name

Type

Description

id

String

The ID of the retrieved subscription

number

String

The number of the retrieved subscription

life_cycle_state

String

The life cycle state of the subscription. One of the following values is returned

DRAFT, EFFECTIVE, NOT_EFFECTIVE, SHORT_TERM_EFFECTIVE, SHORT_TERM_NOT_EFFECTIVE, IN_RESTING, CANCELLED, REGRETTED, REPLACED, PENDING_VERIFICATION

REPLACED life cycle state available from CRM.COM R14.0.0, deprecated in CRM.COM R17.0.0

PENDING_VERIFICATION life cycle state available from CRM.COM R15.0.0

first_activated_dateDate

The date that the subscription became effective for the first time (i.e. the date that the first effective period of that subscription started)

Available from CRM.COM R9.0.0

rating_stateString

The rating state of the retrieved subscription that can be PENDING or COMPLETED

Available from CRM.COM R9.0.0

accounts_receivableAccounts receivable objectThe accounts receivable owning the subscriptions
typeSubscription type objectThe type of the retrieved subscription

Referred Objects Response Data

 accounts_receivable object response data

Name

Type

Description

id

String

The ID of the retrieved accounts receivable

number

String

The number of the retrieved accounts receivable

nameStringThe name of the retrieved accounts receivable

life_cycle_state

String

The life cycle state of the accounts receivable. One of the following values is returned:

ACTIVE, SUSPENDED, TERMINATED

account_ownerContact information objectThe contact information owning the accounts receivable

Referred Objects Response Data

 contact_information object response data

Name

Type

Description

id

String

The ID of the retrieved contact information

type

String

The type of the retrieved contact information which can be PERSON or COMPANY

life_cycle_state

String

The lifecycle state of the retrieved contact information which can be MARKETING or FINANCIAL

name

String

The full name of the retrieved contact information

first_name

String

The first name of the retrieved contact information

middle_name

String

The middle name of the retrieved contact information

last_name

String

The last name of the retrieved contact information

title

String

The title of the retrieved contact information

company_nameSting

The company name of the retrieved contact information

demographics

Demographics Object

The demographics information of the retrieved contact information

company_profile

Company profile object

The company profile of the retrieve contact information

Referred Objects Response Data

 demographics object response data

Name

Type

Description

gender

String

The gender of the retrieved contact information which can be MALE or FEMALE

id_number

String

The ID number of the retrieved contact information

id_number_expiration_dateDate

The ID number's expiration date of the retrieved contact information

Available from CRM.COM R14.0.0

passport_number

String

The passport number of the retrieved contact information

passport_number_expiration_dateDate

The passport's expiration date of the retrieved contact information

Available from CRM.COM R14.0.0

social_security_number

String

The social security number of the retrieved contact information

date_of_birth

Date of Birth Object

The date of birth of the retrieved contact information

name_day

Name Day Object

The name day of the retrieved contact information

country_of_residence

Country Object

The country of residence of the retrieved contact information

id_issued_by_country

Country Object

The ID issued country of retrieved contact information

passport_issued_by_country

Country Object

The passport  issued country of retrieved contact information

industry

Industry Object

The industry of retrieved contact information

industry_sector

Industry sector Object

The sector of retrieved contact information

Referred Objects Response Data

 date_of_birth object response data

Name

Type

Description

day

Integer

The day of the retrieved date of birth

month

Integer

The month of the retrieved date of birth

year

Integer

The year of the retrieved date of birth

 name_day object response data

Name

Type

Description

day

Integer

The day of the retrieved name day

month

Integer

The month of the retrieved name day

 country object response data

Name

Type

Description

id

String

The id of the retrieved country

name

String

The name of the retrieved country

alternative_codeString

The alternative code of the retrieved country

dialing_codeString

The dialing code of the retrieved country

Available from CRM.COM R15.1.0

two_character_codeString

The two character code of the retrieved country

three_character_codeString

The three character code of the retrieved country

country_flagImage Object

The flag of the retrieved country

Available from CRM.COM R15.1.0

Referred Objects Response Data

 country_flag object response data

Name

Type

Description

id

String

The ID of the retrieved country flag

fileFile ObjectThe information of the attached file

Referred Objects Response Data

 file object response data

 

Name

Type

Description

file_nameStringThe name of the file
file_content_urlStringThe url that can be used to access the actual content of the file
file_mime_typeStringThe mime type of the attached file

 industry object response data

Name

Type

Description

id

String

The id of the retrieved industry

name

String

The name of the retrieved industry

code

String

The code of the retrieved industry

 industry sector object response data

Name

Type

Description

id

String

The id of the retrieved industry sector

name

String

The name of the retrieved industry sector

alternative_code

String

The alternative code of the retrieved industry sector

 company profile object response data

Name

Type

Description

profile_year

Number

The profile year of the retrieved contact information

annual_turnover

Number

The annual turnover of the retrieved contact information

established_date

Date

The established date of the retrieved contact information

number_of_employeesNumber

The number of employees of the retrieved contact information

registration_number

String

The registration number of the retrieved contact information

vat_registration_numberString

The vat registration number of the retrieved contact information

vat_registered_byString

The vat registration by of the retrieved contact information

vat_registration_date

Date

The vat registration date of the retrieved contact information

tax_reference_numberString

The tax referenece number of the retrieved contact information

registered_in_country

Country Object

The country of residence of the retrieved contact information

industry

Industry Object

The industry of retrieved contact information

industry_sector

Industry sector Object

The sector of retrieved contact information

Referred Objects Response Data

 country object response data

Name

Type

Description

id

String

The id of the retrieved country

name

String

The name of the retrieved country

alternative_codeString

The alternative code of the retrieved country

dialing_codeString

The dialing code of the retrieved country

Available from CRM.COM R15.1.0

two_character_codeString

The two character code of the retrieved country

three_character_codeString

The three character code of the retrieved country

country_flagImage Object

The flag of the retrieved country

Available from CRM.COM R15.1.0

Referred Objects Response Data

 country_flag object response data

Name

Type

Description

id

String

The ID of the retrieved country flag

fileFile ObjectThe information of the attached file

Referred Objects Response Data

 file object response data

 

Name

Type

Description

file_nameStringThe name of the file
file_content_urlStringThe url that can be used to access the actual content of the file
file_mime_typeStringThe mime type of the attached file

 industry object response data

Name

Type

Description

id

String

The id of the retrieved industry

name

String

The name of the retrieved industry

code

String

The code of the retrieved industry

 industry sector object response data

Name

Type

Description

id

String

The id of the retrieved industry sector

name

String

The name of the retrieved industry sector

alternative_code

String

The alternative code of the retrieved industry sector

 subscription type object response data

Name

Type

Description

id

String

The ID of the retrieved subscription type

name

String

The name of the retrieved subscription type

alternative_code

String

The alternative code of the retrieved subscription type

descriptionStringA description of the retrieved subscription type
classificationString

The classification of the retrieved subscription type, Flexible or Package

Available from CRM.COM R14.0.0

Deprecated from CRM.COM R17.0.0

Examples

 Example 1

HTTP Method: POST

 

Request:

Body:

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


Response:

 {
    "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": ""
    }
}

 

 

 

  • No labels