Billing

billing.Subscription

Estimated reading: 26 minutes 805 views
Namespace: Billing
REST: https://[hoster-api-host]/1.0/billing/subscription/rest/{method-name}
Scripting: billing.subscription.{method-name}
This service is responsible for the implementation and utilization of subscription-based solutions on the platform. Learn the terminology: Product – a solution (application) that is offered on a subscription basis. Service Plan – a specific Product’s variant (one Product can have multiple Service Plans). It provides details on the provided resources, subscription charge information, etc. Category – an optional internal data for Product organization in the user dashboard. Subscription – an object with all the details on the specific subscription.

Methods

Cancel( appid, session, id, [immediately], [cancelDate], [passphrase], [expandFields] ) :

Schedules a Subscription to be automatically cancelled after the end of already purchased period.

URL

https://[hoster-api-host]/1.0/billing/subscription/rest/cancel

Parameters

  • appid : “string”

    unique identifier of the target application (required for authentication).

  • session : “string”
  • id : “int”

    unique identifier of the target subscription.

  • immediately : “boolean” (optional)

    defines whether the current subscription should be cancelled immediately (true) or at the end of already purchased period (false).

  • cancelDate : “string” (optional)

    a specific date when the subscription should be canceled. UTC time in the ISO 8601 format, e.g. “2022-11-16T00:00:00”.

  • passphrase : “string” (optional)

    unique code to confirm immediate subscription resources deletion.

  • expandFields : “string” (optional)

    there are fields that are not included in responses by default. You can request these fields as an expanded response by listing required object paths in this parameter (e.g. account.group).

Example

Method: POST

https://[hoster-api-host]/1.0/billing/subscription/rest/cancel?cancelDate=[string]&session=[string]&appid=[string]&expandFields=[string]&passphrase=[string]&id=[int]&immediately=[boolean]

Response

  • ArrayItemResponse
    {
       "arrayItem": "ArrayItem",
       "className": "Class",
       "error": "string",
       "expandablePath": [
          "string",
          "..."
       ],
       "reason": "int",
       "result": "int",
       "source": "string"
    }
    

CloneProduct (appid, session, subscriptionId, [itemId], itemResourceId, targetEnvName ) :

Clones a subscription item (installed service plan) according to the provided subscription.

URL

https://[hoster-api-host]/1.0/billing/subscription/rest/cloneproduct

Parameters

  • appid : “string”

    unique identifier of the target application (required for authentication).

  • session : “string”

    user session or personal access token.

  • subscriptionId : “int”

    unique identifier of the target subscription.

  • itemId : “int” (optional)

    unique identifier of the target subscription item.

  • itemResourceId : “int”

    unique identifier of the target subscription item resource.

  • targetEnvName : “string”

    domain prefix for the cloned environment.

Example

Method: POST

https://[hoster-api-host]/1.0/billing/subscription/rest/cloneproduct?itemId=[int]&itemResourceId=[int]&session=[string]&targetEnvName=[string]&appid=[string]&subscriptionId=[int]

Response

  • Response
    {
       "error": "string",
       "reason": "int",
       "result": "int",
       "source": "string"
    }
    

DiscardUpdateSubscription (appid, session, subscriptionId ) :

Discards the subscription update invoice.

URL

https://[hoster-api-host]/1.0/billing/subscription/rest/discardupdatesubscription

Parameters

  • appid : “string”

    unique identifier of the target application (required for authentication).

  • session : “string”

    user session or personal access token.

  • subscriptionId : “int”

    unique identifier of the target subscription.

Example

Method: POST

https://[hoster-api-host]/1.0/billing/subscription/rest/discardupdatesubscription?session=[string]&appid=[string]&subscriptionId=[int]

Response

  • Response
    {
       "error": "string",
       "reason": "int",
       "result": "int",
       "source": "string"
    }
    

GetCategories (appid, session, [expandFields] ) :

Discards the subscription update invoice.

URL

https://[hoster-api-host]/1.0/billing/subscription/rest/discardupdatesubscription

Parameters

  • appid : “string”

    unique identifier of the target application (required for authentication).

  • session : “string”

    user session or personal access token.

  • subscriptionId : “int”

    unique identifier of the target subscription.

Example

Method: POST

https://[hoster-api-host]/1.0/billing/subscription/rest/discardupdatesubscription?session=[string]&appid=[string]&subscriptionId=[int]

Response

  • Response
    {
       "error": "string",
       "reason": "int",
       "result": "int",
       "source": "string"
    }
    

GetProducts (appid, session, [id], [categoryId], [expandFields], [startRow], [resultCount], [orderField], [orderDirection] ) :

Returns subscription Product list according to the provided parameters.

URL

https://[hoster-api-host]/1.0/billing/subscription/rest/getproducts

Parameters

  • appid : “string”

    unique identifier of the target application (required for authentication).

  • session : “string”

    user session or personal access token.

  • id : “int” (optional)

    unique identifier of the target subscription Product (for filtering).

  • categoryId : “int” (optional)

    unique identifier of the target subscription Category (for filtering).

  • expandFields : “string” (optional)

    there are fields that are not included in responses by default. You can request these fields as an expanded response by listing required object paths in this parameter (e.g. account.group).

  • startRow : “int” (optional)

    returns information starting from the specified row in the response (starts with 0, by default).

  • resultCount : “int” (optional)

    returns the specified number of rows from the response (0 – unlimited – by default).

  • orderField : “string” (optional)

    sorts results by the specified field

  • orderDirection : “string” (optional)

    sorts results in the ascending (ASC) or descending (DESC) order

Example

Method: POST

https://[hoster-api-host]/1.0/billing/subscription/rest/getproducts?resultCount=[int]&startRow=[int]&session=[string]&appid=[string]&expandFields=[string]&orderDirection=[string]&id=[int]&orderField=[string]&categoryId=[int]

Response

  • PagedArrayResponse
    {
    "array": [
    {
    "categories": [
    {
    "description": "string",
    "displayName": "string",
    "isPublished": "boolean",
    "uniqueName": "string"
    },
    "..."
    ],
    "description": "string",
    "displayName": "string",
    "icon": "string",
    "metadata": "string",
    "servicePlans": [
    {
    "allowMove": "boolean",
    "chargeType": "FIXED(0) | FLEXIBLE(1)",
    "description": "string",
    "displayName": "string",
    "gracePeriod": "int",
    "maxCount": "int",
    "metadata": "string",
    "order": "int",
    "overrideRegions": "boolean",
    "products": [
    {
    "categories": [
    "Category",
    "..."
    ],
    "description": "string",
    "displayName": "string",
    "icon": "string",
    "metadata": "string",
    "servicePlans": [
    {
    "allowMove": "boolean",
    "chargeType": "FIXED(0) | FLEXIBLE(1)",
    "description": "string",
    "displayName": "string",
    "gracePeriod": "int",
    "maxCount": "int",
    "metadata": "string",
    "order": "int",
    "overrideRegions": "boolean",
    "products": [
    "Product",
    "..."
    ],
    "regionPricing": [
    {
    "hardNodeGroup": "string",
    "isEnabled": "boolean",
    "pricingModel": {
    "description": "string",
    "isDeleted": "boolean",
    "name": "string",
    "reseller": {
    "cert": "string",
    "certKey": "string",
    "comment": "string",
    "distributor": {
    "description": "string",
    "email": "string",
    "isDeleted": "boolean",
    "name": "string",
    "resellers": [
    {
    "cert": "string",
    "certKey": "string",
    "comment": "string",
    "distributor": "Distributor",
    "domain": "string",
    "intermediate": "string",
    "name": "string",
    "ownerUid": "int",
    "regions": [
    {
    "cert": "string",
    "domain": "string",
    "id": "int",
    "intermediate": "string",
    "isSslEnabled": "boolean",
    "key": "string",
    "nginxCert": "string",
    "regionId": "int",
    "resellerId": "int",
    "source502": "string",
    "sslExpireDate": "date",
    "sslType": "string",
    "type": "PLATFORM(0) | REGION(1)"
    },
    "..."
    ],
    "sslEnabled": "boolean",
    "sslExpireDate": "date",
    "sslType": "string",
    "status": "ACTIVE(0) | INACTIVE(1) | STOPPED(2) | SUSPENDED(3)"
    },
    "..."
    ]
    },
    "domain": "string",
    "intermediate": "string",
    "name": "string",
    "ownerUid": "int",
    "regions": [
    {
    "cert": "string",
    "domain": "string",
    "id": "int",
    "intermediate": "string",
    "isSslEnabled": "boolean",
    "key": "string",
    "nginxCert": "string",
    "regionId": "int",
    "resellerId": "int",
    "source502": "string",
    "sslExpireDate": "date",
    "sslType": "string",
    "type": "PLATFORM(0) | REGION(1)"
    },
    "..."
    ],
    "sslEnabled": "boolean",
    "sslExpireDate": "date",
    "sslType": "string",
    "status": "ACTIVE(0) | INACTIVE(1) | STOPPED(2) | SUSPENDED(3)"
    },
    "tariffGrids": [
    {
    "billStrategy": "ALL(0) | PEAK(1) | AVG(2)",
    "description": "string",
    "displayName": "string",
    "items": [
    {
    "description": "string",
    "displayName": "string",
    "name": "string",
    "options": [
    {
    "option": {
    "description": "string",
    "displayName": "string",
    "name": "string"
    },
    "value": "string"
    },
    "..."
    ],
    "order": "int",
    "plan": {
    "billableResourceScope": "NODE(0) | ENVIRONMENT(1) | COMMON(2) | ACCOUNT(3)",
    "chargeOnlyRunning": "boolean",
    "cloudletIncrement": "int",
    "currency": "Currency",
    "description": "string",
    "docUrl": "string",
    "freeResourceScope": "NODE(0) | ENVIRONMENT(1) | COMMON(2) | ACCOUNT(3)",
    "keyword": "string",
    "minCloudletCount": "int",
    "minimumFee": "BigDecimal",
    "minimumFeeResourceAmount": "double",
    "name": "string",
    "overridesTypes": [
    "TariffPlanType",
    "..."
    ],
    "priceType": "RECURRING(0) | ONETIME(1)",
    "recurringInterval": "HOUR(0) | DAY(1) | WEEK(2) | MONTH(3) | YEAR(4)",
    "recurringIntervalCount": "int",
    "resource": {
    "description": "string",
    "name": "string",
    "type": "DEFAULT(0) | EXTERNAL(1) | CUSTOM(2)",
    "unit": "UNIT(0) | MB(1) | MBPS(2) | MHZ(3) | HOUR(4) | MIB(5) | MIBPS(6) | GB(7) | COUNT(8)"
    },
    "sku": "string",
    "strategy": "VOLUME(0) | GRADUATED(1) | ACCUMULATED(2) | FLAT(3)",
    "strategyData": {
    "data": "string",
    "roundingMode": "UP(0) | DOWN(1) | CEILING(2) | FLOOR(3) | HALF_UP(4) | HALF_DOWN(5) | HALF_EVEN(6) | UNNECESSARY(7)",
    "scale": "int",
    "secondary": "Resource",
    "strategyMode": "VOLUME(0) | GRADUATED(1)"
    },
    "tiers": [
    "Tier",
    "..."
    ],
    "type": "FIXED(0) | FLEXIBLE(1) | OPTION(2) | NETWORK(3) | STORAGE(4) | STORAGE_FIXED(5) | LICENCE(6) | EXTERNAL(7) | SUBSCRIPTION(8)",
    "uniqueName": "string"
    }
    },
    "..."
    ],
    "name": "string",
    "nodeType": "string",
    "tariffItems": [
    "TariffGridTariffGridItem",
    "..."
    ]
    },
    "..."
    ],
    "tariffs": [
    {
    "billableResourceScope": "NODE(0) | ENVIRONMENT(1) | COMMON(2) | ACCOUNT(3)",
    "chargeOnlyRunning": "boolean",
    "cloudletIncrement": "int",
    "currency": "Currency",
    "description": "string",
    "docUrl": "string",
    "freeResourceScope": "NODE(0) | ENVIRONMENT(1) | COMMON(2) | ACCOUNT(3)",
    "keyword": "string",
    "minCloudletCount": "int",
    "minimumFee": "BigDecimal",
    "minimumFeeResourceAmount": "double",
    "name": "string",
    "overridesTypes": [
    "TariffPlanType",
    "..."
    ],
    "priceType": "RECURRING(0) | ONETIME(1)",
    "recurringInterval": "HOUR(0) | DAY(1) | WEEK(2) | MONTH(3) | YEAR(4)",
    "recurringIntervalCount": "int",
    "resource": {
    "description": "string",
    "name": "string",
    "type": "DEFAULT(0) | EXTERNAL(1) | CUSTOM(2)",
    "unit": "UNIT(0) | MB(1) | MBPS(2) | MHZ(3) | HOUR(4) | MIB(5) | MIBPS(6) | GB(7) | COUNT(8)"
    },
    "sku": "string",
    "strategy": "VOLUME(0) | GRADUATED(1) | ACCUMULATED(2) | FLAT(3)",
    "strategyData": {
    "data": "string",
    "roundingMode": "UP(0) | DOWN(1) | CEILING(2) | FLOOR(3) | HALF_UP(4) | HALF_DOWN(5) | HALF_EVEN(6) | UNNECESSARY(7)",
    "scale": "int",
    "secondary": "Resource",
    "strategyMode": "VOLUME(0) | GRADUATED(1)"
    },
    "tiers": [
    "Tier",
    "..."
    ],
    "type": "FIXED(0) | FLEXIBLE(1) | OPTION(2) | NETWORK(3) | STORAGE(4) | STORAGE_FIXED(5) | LICENCE(6) | EXTERNAL(7) | SUBSCRIPTION(8)",
    "uniqueName": "string"
    },
    "..."
    ],
    "type": "FIXED(0) | FLEXIBLE(1) | HYBRID(2)",
    "uniqueName": "string"
    }
    },
    "..."
    ],
    "resourceId": "string",
    "resourceSettings": "string",
    "resourceType": "MARKETPLACE(0)",
    "status": "DRAFT(0) | ACTIVE(1) | INACTIVE(2) | ARCHIVED(3)",
    "subscriptionCount": {
    "(key) SubscriptionStatus": "(value) long",
    "...": "..."
    },
    "tariffPlans": [
    {
    "billableResourceScope": "NODE(0) | ENVIRONMENT(1) | COMMON(2) | ACCOUNT(3)",
    "chargeOnlyRunning": "boolean",
    "cloudletIncrement": "int",
    "currency": "Currency",
    "description": "string",
    "docUrl": "string",
    "freeResourceScope": "NODE(0) | ENVIRONMENT(1) | COMMON(2) | ACCOUNT(3)",
    "keyword": "string",
    "minCloudletCount": "int",
    "minimumFee": "BigDecimal",
    "minimumFeeResourceAmount": "double",
    "name": "string",
    "overridesTypes": [
    "TariffPlanType",
    "..."
    ],
    "priceType": "RECURRING(0) | ONETIME(1)",
    "recurringInterval": "HOUR(0) | DAY(1) | WEEK(2) | MONTH(3) | YEAR(4)",
    "recurringIntervalCount": "int",
    "resource": {
    "description": "string",
    "name": "string",
    "type": "DEFAULT(0) | EXTERNAL(1) | CUSTOM(2)",
    "unit": "UNIT(0) | MB(1) | MBPS(2) | MHZ(3) | HOUR(4) | MIB(5) | MIBPS(6) | GB(7) | COUNT(8)"
    },
    "sku": "string",
    "strategy": "VOLUME(0) | GRADUATED(1) | ACCUMULATED(2) | FLAT(3)",
    "strategyData": {
    "data": "string",
    "roundingMode": "UP(0) | DOWN(1) | CEILING(2) | FLOOR(3) | HALF_UP(4) | HALF_DOWN(5) | HALF_EVEN(6) | UNNECESSARY(7)",
    "scale": "int",
    "secondary": {
    "description": "string",
    "name": "string",
    "type": "DEFAULT(0) | EXTERNAL(1) | CUSTOM(2)",
    "unit": "UNIT(0) | MB(1) | MBPS(2) | MHZ(3) | HOUR(4) | MIB(5) | MIBPS(6) | GB(7) | COUNT(8)"
    },
    "strategyMode": "VOLUME(0) | GRADUATED(1)"
    },
    "tiers": [
    {
    "currencyPrice": "double",
    "free": "double",
    "price": "double",
    "trialPeriod": "int",
    "value": "double"
    },
    "..."
    ],
    "type": "FIXED(0) | FLEXIBLE(1) | OPTION(2) | NETWORK(3) | STORAGE(4) | STORAGE_FIXED(5) | LICENCE(6) | EXTERNAL(7) | SUBSCRIPTION(8)",
    "uniqueName": "string"
    },
    "..."
    ],
    "type": "PLAN(0) | ADDON(1) | CHARGE(2)"
    },
    "..."
    ],
    "shortDescription": "string",
    "status": "INACTIVE(0) | ACTIVE(1) | ARCHIVED(2)",
    "subscriptionCount": {
    "(key) SubscriptionStatus": "(value) long",
    "...": "..."
    },
    "type": "MARKETPLACE(0)"
    },
    "..."
    ],
    "regionPricing": [
    {
    "hardNodeGroup": "string",
    "isEnabled": "boolean",
    "pricingModel": "PricingModel"
    },
    "..."
    ],
    "resourceId": "string",
    "resourceSettings": "string",
    "resourceType": "MARKETPLACE(0)",
    "status": "DRAFT(0) | ACTIVE(1) | INACTIVE(2) | ARCHIVED(3)",
    "subscriptionCount": {
    "(key) SubscriptionStatus": "(value) long",
    "...": "..."
    },
    "tariffPlans": [
    "TariffPlan",
    "..."
    ],
    "type": "PLAN(0) | ADDON(1) | CHARGE(2)"
    },
    "..."
    ],
    "shortDescription": "string",
    "status": "INACTIVE(0) | ACTIVE(1) | ARCHIVED(2)",
    "subscriptionCount": {
    "(key) SubscriptionStatus": "(value) long",
    "...": "..."
    },
    "type": "MARKETPLACE(0)"
    },
    "..."
    ],
    "className": "Class",
    "error": "string",
    "expandablePath": [
    "string",
    "..."
    ],
    "reason": "int",
    "result": "int",
    "source": "string",
    "totalCount": "long"
    }
    

GetServicePlans (appid, session, [id], [productId], [expandFields] ) :

Returns a subscription Service Plans list according to the provided parameters.

URL

https://[hoster-api-host]/1.0/billing/subscription/rest/getserviceplans

Parameters

  • appid : “string”

    unique identifier of the target application (required for authentication).

  • session : “string”

    user session or personal access token.

  • id : “int” (optional)

    unique identifier of the target service plan (for filtering).

  • productId : “int” (optional)

    unique identifier of the target subscription product (for filtering).

  • expandFields : “string” (optional)

    there are fields that are not included in responses by default. You can request these fields as an expanded response by listing required object paths in this parameter (e.g. account.group).

Example

Method: POST

https://[hoster-api-host]/1.0/billing/subscription/rest/getserviceplans?productId=[int]&session=[string]&appid=[string]&expandFields=[string]&id=[int]

Response

  • ArrayResponse
    {
    "array": [
    {
    "allowMove": "boolean",
    "chargeType": "FIXED(0) | FLEXIBLE(1)",
    "description": "string",
    "displayName": "string",
    "gracePeriod": "int",
    "maxCount": "int",
    "metadata": "string",
    "order": "int",
    "overrideRegions": "boolean",
    "products": [
    {
    "categories": [
    {
    "description": "string",
    "displayName": "string",
    "isPublished": "boolean",
    "uniqueName": "string"
    },
    "..."
    ],
    "description": "string",
    "displayName": "string",
    "icon": "string",
    "metadata": "string",
    "servicePlans": [
    {
    "allowMove": "boolean",
    "chargeType": "FIXED(0) | FLEXIBLE(1)",
    "description": "string",
    "displayName": "string",
    "gracePeriod": "int",
    "maxCount": "int",
    "metadata": "string",
    "order": "int",
    "overrideRegions": "boolean",
    "products": [
    "Product",
    "..."
    ],
    "regionPricing": [
    {
    "hardNodeGroup": "string",
    "isEnabled": "boolean",
    "pricingModel": {
    "description": "string",
    "isDeleted": "boolean",
    "name": "string",
    "reseller": {
    "cert": "string",
    "certKey": "string",
    "comment": "string",
    "distributor": {
    "description": "string",
    "email": "string",
    "isDeleted": "boolean",
    "name": "string",
    "resellers": [
    {
    "cert": "string",
    "certKey": "string",
    "comment": "string",
    "distributor": "Distributor",
    "domain": "string",
    "intermediate": "string",
    "name": "string",
    "ownerUid": "int",
    "regions": [
    {
    "cert": "string",
    "domain": "string",
    "id": "int",
    "intermediate": "string",
    "isSslEnabled": "boolean",
    "key": "string",
    "nginxCert": "string",
    "regionId": "int",
    "resellerId": "int",
    "source502": "string",
    "sslExpireDate": "date",
    "sslType": "string",
    "type": "PLATFORM(0) | REGION(1)"
    },
    "..."
    ],
    "sslEnabled": "boolean",
    "sslExpireDate": "date",
    "sslType": "string",
    "status": "ACTIVE(0) | INACTIVE(1) | STOPPED(2) | SUSPENDED(3)"
    },
    "..."
    ]
    },
    "domain": "string",
    "intermediate": "string",
    "name": "string",
    "ownerUid": "int",
    "regions": [
    {
    "cert": "string",
    "domain": "string",
    "id": "int",
    "intermediate": "string",
    "isSslEnabled": "boolean",
    "key": "string",
    "nginxCert": "string",
    "regionId": "int",
    "resellerId": "int",
    "source502": "string",
    "sslExpireDate": "date",
    "sslType": "string",
    "type": "PLATFORM(0) | REGION(1)"
    },
    "..."
    ],
    "sslEnabled": "boolean",
    "sslExpireDate": "date",
    "sslType": "string",
    "status": "ACTIVE(0) | INACTIVE(1) | STOPPED(2) | SUSPENDED(3)"
    },
    "tariffGrids": [
    {
    "billStrategy": "ALL(0) | PEAK(1) | AVG(2)",
    "description": "string",
    "displayName": "string",
    "items": [
    {
    "description": "string",
    "displayName": "string",
    "name": "string",
    "options": [
    {
    "option": {
    "description": "string",
    "displayName": "string",
    "name": "string"
    },
    "value": "string"
    },
    "..."
    ],
    "order": "int",
    "plan": {
    "billableResourceScope": "NODE(0) | ENVIRONMENT(1) | COMMON(2) | ACCOUNT(3)",
    "chargeOnlyRunning": "boolean",
    "cloudletIncrement": "int",
    "currency": "Currency",
    "description": "string",
    "docUrl": "string",
    "freeResourceScope": "NODE(0) | ENVIRONMENT(1) | COMMON(2) | ACCOUNT(3)",
    "keyword": "string",
    "minCloudletCount": "int",
    "minimumFee": "BigDecimal",
    "minimumFeeResourceAmount": "double",
    "name": "string",
    "overridesTypes": [
    "TariffPlanType",
    "..."
    ],
    "priceType": "RECURRING(0) | ONETIME(1)",
    "recurringInterval": "HOUR(0) | DAY(1) | WEEK(2) | MONTH(3) | YEAR(4)",
    "recurringIntervalCount": "int",
    "resource": {
    "description": "string",
    "name": "string",
    "type": "DEFAULT(0) | EXTERNAL(1) | CUSTOM(2)",
    "unit": "UNIT(0) | MB(1) | MBPS(2) | MHZ(3) | HOUR(4) | MIB(5) | MIBPS(6) | GB(7) | COUNT(8)"
    },
    "sku": "string",
    "strategy": "VOLUME(0) | GRADUATED(1) | ACCUMULATED(2) | FLAT(3)",
    "strategyData": {
    "data": "string",
    "roundingMode": "UP(0) | DOWN(1) | CEILING(2) | FLOOR(3) | HALF_UP(4) | HALF_DOWN(5) | HALF_EVEN(6) | UNNECESSARY(7)",
    "scale": "int",
    "secondary": "Resource",
    "strategyMode": "VOLUME(0) | GRADUATED(1)"
    },
    "tiers": [
    "Tier",
    "..."
    ],
    "type": "FIXED(0) | FLEXIBLE(1) | OPTION(2) | NETWORK(3) | STORAGE(4) | STORAGE_FIXED(5) | LICENCE(6) | EXTERNAL(7) | SUBSCRIPTION(8)",
    "uniqueName": "string"
    }
    },
    "..."
    ],
    "name": "string",
    "nodeType": "string",
    "tariffItems": [
    "TariffGridTariffGridItem",
    "..."
    ]
    },
    "..."
    ],
    "tariffs": [
    {
    "billableResourceScope": "NODE(0) | ENVIRONMENT(1) | COMMON(2) | ACCOUNT(3)",
    "chargeOnlyRunning": "boolean",
    "cloudletIncrement": "int",
    "currency": "Currency",
    "description": "string",
    "docUrl": "string",
    "freeResourceScope": "NODE(0) | ENVIRONMENT(1) | COMMON(2) | ACCOUNT(3)",
    "keyword": "string",
    "minCloudletCount": "int",
    "minimumFee": "BigDecimal",
    "minimumFeeResourceAmount": "double",
    "name": "string",
    "overridesTypes": [
    "TariffPlanType",
    "..."
    ],
    "priceType": "RECURRING(0) | ONETIME(1)",
    "recurringInterval": "HOUR(0) | DAY(1) | WEEK(2) | MONTH(3) | YEAR(4)",
    "recurringIntervalCount": "int",
    "resource": {
    "description": "string",
    "name": "string",
    "type": "DEFAULT(0) | EXTERNAL(1) | CUSTOM(2)",
    "unit": "UNIT(0) | MB(1) | MBPS(2) | MHZ(3) | HOUR(4) | MIB(5) | MIBPS(6) | GB(7) | COUNT(8)"
    },
    "sku": "string",
    "strategy": "VOLUME(0) | GRADUATED(1) | ACCUMULATED(2) | FLAT(3)",
    "strategyData": {
    "data": "string",
    "roundingMode": "UP(0) | DOWN(1) | CEILING(2) | FLOOR(3) | HALF_UP(4) | HALF_DOWN(5) | HALF_EVEN(6) | UNNECESSARY(7)",
    "scale": "int",
    "secondary": "Resource",
    "strategyMode": "VOLUME(0) | GRADUATED(1)"
    },
    "tiers": [
    "Tier",
    "..."
    ],
    "type": "FIXED(0) | FLEXIBLE(1) | OPTION(2) | NETWORK(3) | STORAGE(4) | STORAGE_FIXED(5) | LICENCE(6) | EXTERNAL(7) | SUBSCRIPTION(8)",
    "uniqueName": "string"
    },
    "..."
    ],
    "type": "FIXED(0) | FLEXIBLE(1) | HYBRID(2)",
    "uniqueName": "string"
    }
    },
    "..."
    ],
    "resourceId": "string",
    "resourceSettings": "string",
    "resourceType": "MARKETPLACE(0)",
    "status": "DRAFT(0) | ACTIVE(1) | INACTIVE(2) | ARCHIVED(3)",
    "subscriptionCount": {
    "(key) SubscriptionStatus": "(value) long",
    "...": "..."
    },
    "tariffPlans": [
    {
    "billableResourceScope": "NODE(0) | ENVIRONMENT(1) | COMMON(2) | ACCOUNT(3)",
    "chargeOnlyRunning": "boolean",
    "cloudletIncrement": "int",
    "currency": "Currency",
    "description": "string",
    "docUrl": "string",
    "freeResourceScope": "NODE(0) | ENVIRONMENT(1) | COMMON(2) | ACCOUNT(3)",
    "keyword": "string",
    "minCloudletCount": "int",
    "minimumFee": "BigDecimal",
    "minimumFeeResourceAmount": "double",
    "name": "string",
    "overridesTypes": [
    "TariffPlanType",
    "..."
    ],
    "priceType": "RECURRING(0) | ONETIME(1)",
    "recurringInterval": "HOUR(0) | DAY(1) | WEEK(2) | MONTH(3) | YEAR(4)",
    "recurringIntervalCount": "int",
    "resource": {
    "description": "string",
    "name": "string",
    "type": "DEFAULT(0) | EXTERNAL(1) | CUSTOM(2)",
    "unit": "UNIT(0) | MB(1) | MBPS(2) | MHZ(3) | HOUR(4) | MIB(5) | MIBPS(6) | GB(7) | COUNT(8)"
    },
    "sku": "string",
    "strategy": "VOLUME(0) | GRADUATED(1) | ACCUMULATED(2) | FLAT(3)",
    "strategyData": {
    "data": "string",
    "roundingMode": "UP(0) | DOWN(1) | CEILING(2) | FLOOR(3) | HALF_UP(4) | HALF_DOWN(5) | HALF_EVEN(6) | UNNECESSARY(7)",
    "scale": "int",
    "secondary": {
    "description": "string",
    "name": "string",
    "type": "DEFAULT(0) | EXTERNAL(1) | CUSTOM(2)",
    "unit": "UNIT(0) | MB(1) | MBPS(2) | MHZ(3) | HOUR(4) | MIB(5) | MIBPS(6) | GB(7) | COUNT(8)"
    },
    "strategyMode": "VOLUME(0) | GRADUATED(1)"
    },
    "tiers": [
    {
    "currencyPrice": "double",
    "free": "double",
    "price": "double",
    "trialPeriod": "int",
    "value": "double"
    },
    "..."
    ],
    "type": "FIXED(0) | FLEXIBLE(1) | OPTION(2) | NETWORK(3) | STORAGE(4) | STORAGE_FIXED(5) | LICENCE(6) | EXTERNAL(7) | SUBSCRIPTION(8)",
    "uniqueName": "string"
    },
    "..."
    ],
    "type": "PLAN(0) | ADDON(1) | CHARGE(2)"
    },
    "..."
    ],
    "shortDescription": "string",
    "status": "INACTIVE(0) | ACTIVE(1) | ARCHIVED(2)",
    "subscriptionCount": {
    "(key) SubscriptionStatus": "(value) long",
    "...": "..."
    },
    "type": "MARKETPLACE(0)"
    },
    "..."
    ],
    "regionPricing": [
    {
    "hardNodeGroup": "string",
    "isEnabled": "boolean",
    "pricingModel": "PricingModel"
    },
    "..."
    ],
    "resourceId": "string",
    "resourceSettings": "string",
    "resourceType": "MARKETPLACE(0)",
    "status": "DRAFT(0) | ACTIVE(1) | INACTIVE(2) | ARCHIVED(3)",
    "subscriptionCount": {
    "(key) SubscriptionStatus": "(value) long",
    "...": "..."
    },
    "tariffPlans": [
    "TariffPlan",
    "..."
    ],
    "type": "PLAN(0) | ADDON(1) | CHARGE(2)"
    },
    "..."
    ],
    "className": "Class",
    "error": "string",
    "expandablePath": [
    "string",
    "..."
    ],
    "reason": "int",
    "result": "int",
    "source": "string"
    }
    

GetSubscriptions( appid, session, [id], [productId], [status], [expandFields], [startRow], [resultCount], [orderField], [orderDirection] ) :

Returns Subscription list of the current user according to the provided parameters.

URL

https://[hoster-api-host]/1.0/billing/subscription/rest/getsubscriptions

Parameters

  • appid : “string”

    unique identifier of the target application (required for authentication).

  • session : “string”

    user session or personal access token.

  • id : “int” (optional)

    unique identifier of the target subscription (for filtering).

  • productId : “int” (optional)

    unique identifier of the target subscription product (for filtering).

  • status : “string” (optional)

    a comma-separated list of the subscription statuses.(“INCOMPLETE”, “INCOMPLETE_EXPIRED”, “TRIAL”, “ACTIVE”, “PAST_DUE”, “UNPAID”, “SUSPENDED”, “CANCELED”, “ENDED”).

  • expandFields : “string” (optional)

    there are fields that are not included in responses by default. You can request these fields as an expanded response by listing required object paths in this parameter (e.g. account.group).

  • startRow : “int” (optional)

    returns information starting from the specified row in the response (starts with 0, by default).

  • resultCount : “int” (optional)

    returns the specified number of rows from the response (0 – unlimited – by default).

  • orderField : “string” (optional)

    sorts results by the specified field

  • orderDirection : “string” (optional)

    sorts results in the ascending (ASC) or descending (DESC) order

Example

Method: POST

https://[hoster-api-host]/1.0/billing/subscription/rest/getsubscriptions?resultCount=[int]&productId=[int]&startRow=[int]&session=[string]&appid=[string]&expandFields=[string]&orderDirection=[string]&id=[int]&orderField=[string]&status=[string]

Response

  • PagedArrayResponse
    {
    "array": [
    {
    "account": {
    "accountData": [
    "AccountData",
    "..."
    ],
    "autoPayType": "REGULAR(0) | LEVEL(1)",
    "balance": "BigDecimal",
    "bonus": "BigDecimal",
    "credit": "BigDecimal",
    "debit": "BigDecimal",
    "ebsUserId": "string",
    "group": {
    "conversionGroup": "string",
    "conversionGroupName": "string",
    "description": "string",
    "groupPricingModels": [
    {
    "group": {
    "conversionGroup": "string",
    "conversionGroupName": "string",
    "description": "string",
    "groupPricingModels": [
    {
    "group": "Group",
    "hardNodeGroup": "string",
    "isEnabled": "boolean",
    "pricingModel": {
    "description": "string",
    "isDeleted": "boolean",
    "name": "string",
    "reseller": {
    "cert": "string",
    "certKey": "string",
    "comment": "string",
    "distributor": {
    "description": "string",
    "email": "string",
    "isDeleted": "boolean",
    "name": "string",
    "resellers": [
    {
    "cert": "string",
    "certKey": "string",
    "comment": "string",
    "distributor": "Distributor",
    "domain": "string",
    "intermediate": "string",
    "name": "string",
    "ownerUid": "int",
    "regions": [
    {
    "cert": "string",
    "domain": "string",
    "id": "int",
    "intermediate": "string",
    "isSslEnabled": "boolean",
    "key": "string",
    "nginxCert": "string",
    "regionId": "int",
    "resellerId": "int",
    "source502": "string",
    "sslExpireDate": "date",
    "sslType": "string",
    "type": "PLATFORM(0) | REGION(1)"
    },
    "..."
    ],
    "sslEnabled": "boolean",
    "sslExpireDate": "date",
    "sslType": "string",
    "status": "ACTIVE(0) | INACTIVE(1) | STOPPED(2) | SUSPENDED(3)"
    },
    "..."
    ]
    },
    "domain": "string",
    "intermediate": "string",
    "name": "string",
    "ownerUid": "int",
    "regions": [
    {
    "cert": "string",
    "domain": "string",
    "id": "int",
    "intermediate": "string",
    "isSslEnabled": "boolean",
    "key": "string",
    "nginxCert": "string",
    "regionId": "int",
    "resellerId": "int",
    "source502": "string",
    "sslExpireDate": "date",
    "sslType": "string",
    "type": "PLATFORM(0) | REGION(1)"
    },
    "..."
    ],
    "sslEnabled": "boolean",
    "sslExpireDate": "date",
    "sslType": "string",
    "status": "ACTIVE(0) | INACTIVE(1) | STOPPED(2) | SUSPENDED(3)"
    },
    "tariffGrids": [
    {
    "billStrategy": "ALL(0) | PEAK(1) | AVG(2)",
    "description": "string",
    "displayName": "string",
    "items": [
    {
    "description": "string",
    "displayName": "string",
    "name": "string",
    "options": [
    {
    "option": {
    "description": "string",
    "displayName": "string",
    "name": "string"
    },
    "value": "string"
    },
    "..."
    ],
    "order": "int",
    "plan": {
    "billableResourceScope": "NODE(0) | ENVIRONMENT(1) | COMMON(2) | ACCOUNT(3)",
    "chargeOnlyRunning": "boolean",
    "cloudletIncrement": "int",
    "currency": "Currency",
    "description": "string",
    "docUrl": "string",
    "freeResourceScope": "NODE(0) | ENVIRONMENT(1) | COMMON(2) | ACCOUNT(3)",
    "keyword": "string",
    "minCloudletCount": "int",
    "minimumFee": "BigDecimal",
    "minimumFeeResourceAmount": "double",
    "name": "string",
    "overridesTypes": [
    "TariffPlanType",
    "..."
    ],
    "priceType": "RECURRING(0) | ONETIME(1)",
    "recurringInterval": "HOUR(0) | DAY(1) | WEEK(2) | MONTH(3) | YEAR(4)",
    "recurringIntervalCount": "int",
    "resource": {
    "description": "string",
    "name": "string",
    "type": "DEFAULT(0) | EXTERNAL(1) | CUSTOM(2)",
    "unit": "UNIT(0) | MB(1) | MBPS(2) | MHZ(3) | HOUR(4) | MIB(5) | MIBPS(6) | GB(7) | COUNT(8)"
    },
    "sku": "string",
    "strategy": "VOLUME(0) | GRADUATED(1) | ACCUMULATED(2) | FLAT(3)",
    "strategyData": {
    "data": "string",
    "roundingMode": "UP(0) | DOWN(1) | CEILING(2) | FLOOR(3) | HALF_UP(4) | HALF_DOWN(5) | HALF_EVEN(6) | UNNECESSARY(7)",
    "scale": "int",
    "secondary": "Resource",
    "strategyMode": "VOLUME(0) | GRADUATED(1)"
    },
    "tiers": [
    "Tier",
    "..."
    ],
    "type": "FIXED(0) | FLEXIBLE(1) | OPTION(2) | NETWORK(3) | STORAGE(4) | STORAGE_FIXED(5) | LICENCE(6) | EXTERNAL(7) | SUBSCRIPTION(8)",
    "uniqueName": "string"
    }
    },
    "..."
    ],
    "name": "string",
    "nodeType": "string",
    "tariffItems": [
    "TariffGridTariffGridItem",
    "..."
    ]
    },
    "..."
    ],
    "tariffs": [
    {
    "billableResourceScope": "NODE(0) | ENVIRONMENT(1) | COMMON(2) | ACCOUNT(3)",
    "chargeOnlyRunning": "boolean",
    "cloudletIncrement": "int",
    "currency": "Currency",
    "description": "string",
    "docUrl": "string",
    "freeResourceScope": "NODE(0) | ENVIRONMENT(1) | COMMON(2) | ACCOUNT(3)",
    "keyword": "string",
    "minCloudletCount": "int",
    "minimumFee": "BigDecimal",
    "minimumFeeResourceAmount": "double",
    "name": "string",
    "overridesTypes": [
    "TariffPlanType",
    "..."
    ],
    "priceType": "RECURRING(0) | ONETIME(1)",
    "recurringInterval": "HOUR(0) | DAY(1) | WEEK(2) | MONTH(3) | YEAR(4)",
    "recurringIntervalCount": "int",
    "resource": {
    "description": "string",
    "name": "string",
    "type": "DEFAULT(0) | EXTERNAL(1) | CUSTOM(2)",
    "unit": "UNIT(0) | MB(1) | MBPS(2) | MHZ(3) | HOUR(4) | MIB(5) | MIBPS(6) | GB(7) | COUNT(8)"
    },
    "sku": "string",
    "strategy": "VOLUME(0) | GRADUATED(1) | ACCUMULATED(2) | FLAT(3)",
    "strategyData": {
    "data": "string",
    "roundingMode": "UP(0) | DOWN(1) | CEILING(2) | FLOOR(3) | HALF_UP(4) | HALF_DOWN(5) | HALF_EVEN(6) | UNNECESSARY(7)",
    "scale": "int",
    "secondary": {
    "description": "string",
    "name": "string",
    "type": "DEFAULT(0) | EXTERNAL(1) | CUSTOM(2)",
    "unit": "UNIT(0) | MB(1) | MBPS(2) | MHZ(3) | HOUR(4) | MIB(5) | MIBPS(6) | GB(7) | COUNT(8)"
    },
    "strategyMode": "VOLUME(0) | GRADUATED(1)"
    },
    "tiers": [
    {
    "currencyPrice": "double",
    "free": "double",
    "price": "double",
    "trialPeriod": "int",
    "value": "double"
    },
    "..."
    ],
    "type": "FIXED(0) | FLEXIBLE(1) | OPTION(2) | NETWORK(3) | STORAGE(4) | STORAGE_FIXED(5) | LICENCE(6) | EXTERNAL(7) | SUBSCRIPTION(8)",
    "uniqueName": "string"
    },
    "..."
    ],
    "type": "FIXED(0) | FLEXIBLE(1) | HYBRID(2)",
    "uniqueName": "string"
    }
    },
    "..."
    ],
    "isCollaboration": "boolean",
    "isDefault": "boolean",
    "isDeleted": "boolean",
    "isSignup": "boolean",
    "name": "string",
    "quotasValues": [
    "QuotaValue",
    "..."
    ],
    "reseller": "Reseller",
    "type": "post(0) | billing(1) | beta(2) | trial(3)",
    "winDomainId": "int"
    },
    "hardNodeGroup": "string",
    "isEnabled": "boolean",
    "pricingModel": {
    "description": "string",
    "isDeleted": "boolean",
    "name": "string",
    "reseller": {
    "cert": "string",
    "certKey": "string",
    "comment": "string",
    "distributor": "Distributor",
    "domain": "string",
    "intermediate": "string",
    "name": "string",
    "ownerUid": "int",
    "regions": [
    {
    "cert": "string",
    "domain": "string",
    "id": "int",
    "intermediate": "string",
    "isSslEnabled": "boolean",
    "key": "string",
    "nginxCert": "string",
    "regionId": "int",
    "resellerId": "int",
    "source502": "string",
    "sslExpireDate": "date",
    "sslType": "string",
    "type": "PLATFORM(0) | REGION(1)"
    },
    "..."
    ],
    "sslEnabled": "boolean",
    "sslExpireDate": "date",
    "sslType": "string",
    "status": "ACTIVE(0) | INACTIVE(1) | STOPPED(2) | SUSPENDED(3)"
    },
    "tariffGrids": [
    {
    "billStrategy": "ALL(0) | PEAK(1) | AVG(2)",
    "description": "string",
    "displayName": "string",
    "items": [
    "TariffGridItem",
    "..."
    ],
    "name": "string",
    "nodeType": "string",
    "tariffItems": [
    "TariffGridTariffGridItem",
    "..."
    ]
    },
    "..."
    ],
    "tariffs": [
    "TariffPlan",
    "..."
    ],
    "type": "FIXED(0) | FLEXIBLE(1) | HYBRID(2)",
    "uniqueName": "string"
    }
    },
    "..."
    ],
    "isCollaboration": "boolean",
    "isDefault": "boolean",
    "isDeleted": "boolean",
    "isSignup": "boolean",
    "name": "string",
    "quotasValues": [
    {
    "quota": {
    "description": "string",
    "isBusiness": "boolean",
    "isCustom": "boolean",
    "isHidden": "boolean",
    "name": "string",
    "referenceId": "string"
    },
    "type": "PERSONAL(0) | GROUP(1)",
    "value": "int"
    },
    "..."
    ],
    "reseller": "Reseller",
    "type": "post(0) | billing(1) | beta(2) | trial(3)",
    "winDomainId": "int"
    },
    "isEnabled": "boolean",
    "language": "string",
    "note": "string",
    "quotasValues": [
    {
    "quota": "Quota",
    "type": "PERSONAL(0) | GROUP(1)",
    "value": "int"
    },
    "..."
    ],
    "status": "int",
    "sumCostPerHour": "BigDecimal",
    "uid": "int"
    },
    "cancelOnPeriodEnd": "boolean",
    "cancelReason": "string",
    "collectionMethod": "CHARGE_AUTOMATICALLY(0) | SEND_INVOICE(1)",
    "currencyCode": "string",
    "endReason": "string",
    "endStrategy": "DESTROY_RESOURCES(0)",
    "gracePeriod": "int",
    "invoices": [
    "Invoice",
    "..."
    ],
    "items": [
    {
    "amount": "BigDecimal",
    "currencyCode": "string",
    "freeQuantity": "int",
    "priceType": "RECURRING(0) | ONETIME(1)",
    "quantity": "int",
    "resources": [
    {
    "resources": "string",
    "resourcesSet": [
    "ResourceItem",
    "..."
    ],
    "state": "INSTALLING(0) | INSTALLED(1) | INSTALLATION_FAILED(2) | CLONING(3) | CONFIGURING(4) | CONFIGURING_FAILED(5)",
    "type": "MARKETPLACE_INSTALLATION(0)",
    "uniqueName": "string"
    },
    "..."
    ],
    "servicePlan": {
    "allowMove": "boolean",
    "chargeType": "FIXED(0) | FLEXIBLE(1)",
    "description": "string",
    "displayName": "string",
    "gracePeriod": "int",
    "maxCount": "int",
    "metadata": "string",
    "order": "int",
    "overrideRegions": "boolean",
    "products": [
    "Product",
    "..."
    ],
    "regionPricing": [
    {
    "hardNodeGroup": "string",
    "isEnabled": "boolean",
    "pricingModel": "PricingModel"
    },
    "..."
    ],
    "resourceId": "string",
    "resourceSettings": "string",
    "resourceType": "MARKETPLACE(0)",
    "status": "DRAFT(0) | ACTIVE(1) | INACTIVE(2) | ARCHIVED(3)",
    "subscriptionCount": {
    "(key) SubscriptionStatus": "(value) long",
    "...": "..."
    },
    "tariffPlans": [
    {
    "billableResourceScope": "NODE(0) | ENVIRONMENT(1) | COMMON(2) | ACCOUNT(3)",
    "chargeOnlyRunning": "boolean",
    "cloudletIncrement": "int",
    "currency": "Currency",
    "description": "string",
    "docUrl": "string",
    "freeResourceScope": "NODE(0) | ENVIRONMENT(1) | COMMON(2) | ACCOUNT(3)",
    "keyword": "string",
    "minCloudletCount": "int",
    "minimumFee": "BigDecimal",
    "minimumFeeResourceAmount": "double",
    "name": "string",
    "overridesTypes": [
    "TariffPlanType",
    "..."
    ],
    "priceType": "RECURRING(0) | ONETIME(1)",
    "recurringInterval": "HOUR(0) | DAY(1) | WEEK(2) | MONTH(3) | YEAR(4)",
    "recurringIntervalCount": "int",
    "resource": {
    "description": "string",
    "name": "string",
    "type": "DEFAULT(0) | EXTERNAL(1) | CUSTOM(2)",
    "unit": "UNIT(0) | MB(1) | MBPS(2) | MHZ(3) | HOUR(4) | MIB(5) | MIBPS(6) | GB(7) | COUNT(8)"
    },
    "sku": "string",
    "strategy": "VOLUME(0) | GRADUATED(1) | ACCUMULATED(2) | FLAT(3)",
    "strategyData": {
    "data": "string",
    "roundingMode": "UP(0) | DOWN(1) | CEILING(2) | FLOOR(3) | HALF_UP(4) | HALF_DOWN(5) | HALF_EVEN(6) | UNNECESSARY(7)",
    "scale": "int",
    "secondary": "Resource",
    "strategyMode": "VOLUME(0) | GRADUATED(1)"
    },
    "tiers": [
    "Tier",
    "..."
    ],
    "type": "FIXED(0) | FLEXIBLE(1) | OPTION(2) | NETWORK(3) | STORAGE(4) | STORAGE_FIXED(5) | LICENCE(6) | EXTERNAL(7) | SUBSCRIPTION(8)",
    "uniqueName": "string"
    },
    "..."
    ],
    "type": "PLAN(0) | ADDON(1) | CHARGE(2)"
    },
    "unitPrice": "BigDecimal",
    "updateItem": {
    "amount": "BigDecimal",
    "currencyCode": "string",
    "freeQuantity": "int",
    "priceType": "RECURRING(0) | ONETIME(1)",
    "quantity": "int",
    "resources": [
    {
    "resources": "string",
    "resourcesSet": [
    "ResourceItem",
    "..."
    ],
    "state": "INSTALLING(0) | INSTALLED(1) | INSTALLATION_FAILED(2) | CLONING(3) | CONFIGURING(4) | CONFIGURING_FAILED(5)",
    "type": "MARKETPLACE_INSTALLATION(0)",
    "uniqueName": "string"
    },
    "..."
    ],
    "servicePlan": "ProductServicePlan",
    "unitPrice": "BigDecimal",
    "updateItem": "SubscriptionItem"
    }
    },
    "..."
    ],
    "latestInvoice": "Invoice",
    "pendingUpdate": "string",
    "product": {
    "categories": [
    {
    "description": "string",
    "displayName": "string",
    "isPublished": "boolean",
    "uniqueName": "string"
    },
    "..."
    ],
    "description": "string",
    "displayName": "string",
    "icon": "string",
    "metadata": "string",
    "servicePlans": [
    {
    "allowMove": "boolean",
    "chargeType": "FIXED(0) | FLEXIBLE(1)",
    "description": "string",
    "displayName": "string",
    "gracePeriod": "int",
    "maxCount": "int",
    "metadata": "string",
    "order": "int",
    "overrideRegions": "boolean",
    "products": [
    {
    "categories": [
    "Category",
    "..."
    ],
    "description": "string",
    "displayName": "string",
    "icon": "string",
    "metadata": "string",
    "servicePlans": [
    {
    "allowMove": "boolean",
    "chargeType": "FIXED(0) | FLEXIBLE(1)",
    "description": "string",
    "displayName": "string",
    "gracePeriod": "int",
    "maxCount": "int",
    "metadata": "string",
    "order": "int",
    "overrideRegions": "boolean",
    "products": [
    "Product",
    "..."
    ],
    "regionPricing": [
    {
    "hardNodeGroup": "string",
    "isEnabled": "boolean",
    "pricingModel": {
    "description": "string",
    "isDeleted": "boolean",
    "name": "string",
    "reseller": {
    "cert": "string",
    "certKey": "string",
    "comment": "string",
    "distributor": "Distributor",
    "domain": "string",
    "intermediate": "string",
    "name": "string",
    "ownerUid": "int",
    "regions": [
    {
    "cert": "string",
    "domain": "string",
    "id": "int",
    "intermediate": "string",
    "isSslEnabled": "boolean",
    "key": "string",
    "nginxCert": "string",
    "regionId": "int",
    "resellerId": "int",
    "source502": "string",
    "sslExpireDate": "date",
    "sslType": "string",
    "type": "PLATFORM(0) | REGION(1)"
    },
    "..."
    ],
    "sslEnabled": "boolean",
    "sslExpireDate": "date",
    "sslType": "string",
    "status": "ACTIVE(0) | INACTIVE(1) | STOPPED(2) | SUSPENDED(3)"
    },
    "tariffGrids": [
    {
    "billStrategy": "ALL(0) | PEAK(1) | AVG(2)",
    "description": "string",
    "displayName": "string",
    "items": [
    "TariffGridItem",
    "..."
    ],
    "name": "string",
    "nodeType": "string",
    "tariffItems": [
    "TariffGridTariffGridItem",
    "..."
    ]
    },
    "..."
    ],
    "tariffs": [
    "TariffPlan",
    "..."
    ],
    "type": "FIXED(0) | FLEXIBLE(1) | HYBRID(2)",
    "uniqueName": "string"
    }
    },
    "..."
    ],
    "resourceId": "string",
    "resourceSettings": "string",
    "resourceType": "MARKETPLACE(0)",
    "status": "DRAFT(0) | ACTIVE(1) | INACTIVE(2) | ARCHIVED(3)",
    "subscriptionCount": {
    "(key) SubscriptionStatus": "(value) long",
    "...": "..."
    },
    "tariffPlans": [
    {
    "billableResourceScope": "NODE(0) | ENVIRONMENT(1) | COMMON(2) | ACCOUNT(3)",
    "chargeOnlyRunning": "boolean",
    "cloudletIncrement": "int",
    "currency": "Currency",
    "description": "string",
    "docUrl": "string",
    "freeResourceScope": "NODE(0) | ENVIRONMENT(1) | COMMON(2) | ACCOUNT(3)",
    "keyword": "string",
    "minCloudletCount": "int",
    "minimumFee": "BigDecimal",
    "minimumFeeResourceAmount": "double",
    "name": "string",
    "overridesTypes": [
    "TariffPlanType",
    "..."
    ],
    "priceType": "RECURRING(0) | ONETIME(1)",
    "recurringInterval": "HOUR(0) | DAY(1) | WEEK(2) | MONTH(3) | YEAR(4)",
    "recurringIntervalCount": "int",
    "resource": {
    "description": "string",
    "name": "string",
    "type": "DEFAULT(0) | EXTERNAL(1) | CUSTOM(2)",
    "unit": "UNIT(0) | MB(1) | MBPS(2) | MHZ(3) | HOUR(4) | MIB(5) | MIBPS(6) | GB(7) | COUNT(8)"
    },
    "sku": "string",
    "strategy": "VOLUME(0) | GRADUATED(1) | ACCUMULATED(2) | FLAT(3)",
    "strategyData": {
    "data": "string",
    "roundingMode": "UP(0) | DOWN(1) | CEILING(2) | FLOOR(3) | HALF_UP(4) | HALF_DOWN(5) | HALF_EVEN(6) | UNNECESSARY(7)",
    "scale": "int",
    "secondary": "Resource",
    "strategyMode": "VOLUME(0) | GRADUATED(1)"
    },
    "tiers": [
    "Tier",
    "..."
    ],
    "type": "FIXED(0) | FLEXIBLE(1) | OPTION(2) | NETWORK(3) | STORAGE(4) | STORAGE_FIXED(5) | LICENCE(6) | EXTERNAL(7) | SUBSCRIPTION(8)",
    "uniqueName": "string"
    },
    "..."
    ],
    "type": "PLAN(0) | ADDON(1) | CHARGE(2)"
    },
    "..."
    ],
    "shortDescription": "string",
    "status": "INACTIVE(0) | ACTIVE(1) | ARCHIVED(2)",
    "subscriptionCount": {
    "(key) SubscriptionStatus": "(value) long",
    "...": "..."
    },
    "type": "MARKETPLACE(0)"
    },
    "..."
    ],
    "regionPricing": [
    {
    "hardNodeGroup": "string",
    "isEnabled": "boolean",
    "pricingModel": "PricingModel"
    },
    "..."
    ],
    "resourceId": "string",
    "resourceSettings": "string",
    "resourceType": "MARKETPLACE(0)",
    "status": "DRAFT(0) | ACTIVE(1) | INACTIVE(2) | ARCHIVED(3)",
    "subscriptionCount": {
    "(key) SubscriptionStatus": "(value) long",
    "...": "..."
    },
    "tariffPlans": [
    "TariffPlan",
    "..."
    ],
    "type": "PLAN(0) | ADDON(1) | CHARGE(2)"
    },
    "..."
    ],
    "shortDescription": "string",
    "status": "INACTIVE(0) | ACTIVE(1) | ARCHIVED(2)",
    "subscriptionCount": {
    "(key) SubscriptionStatus": "(value) long",
    "...": "..."
    },
    "type": "MARKETPLACE(0)"
    },
    "recurringInterval": "HOUR(0) | DAY(1) | WEEK(2) | MONTH(3) | YEAR(4)",
    "recurringIntervalCount": "int",
    "status": "INCOMPLETE(0) | INCOMPLETE_EXPIRED(1) | TRIAL(2) | ACTIVE(3) | PAST_DUE(4) | UNPAID(5) | SUSPENDED(6) | CANCELED(7) | ENDED(8)",
    "type": "REGULAR(0) | UPDATE(1)",
    "uniqueName": "string"
    },
    "..."
    ],
    "className": "Class",
    "error": "string",
    "expandablePath": [
    "string",
    "..."
    ],
    "reason": "int",
    "result": "int",
    "source": "string",
    "totalCount": "long"
    }
    

InstallProduct (appid, session, subscriptionId, [itemId], [settings], [envName], [displayName], [envGroups], [region], [lang] ) :

Installs a subscription Product according to the provided subscription.

URL

https://[hoster-api-host]/1.0/billing/subscription/rest/installproduct

Parameters

  • appid : “string”

    unique identifier of the target application (required for authentication).

  • session : “string”

    user session or personal access token.

  • subscriptionId : “int”

    unique identifier of the target subscription.

  • itemId : “int” (optional)

    unique identifier of the target subscription item.

  • settings : “string” (optional)

    JSON object with subscription configuration.

  • envName : “string” (optional)

    target environment name

  • displayName : “string” (optional)

    target environment display name

  • envGroups : “string” (optional)

    target environment groups

  • region : “string” (optional)

    target environment region

  • lang : “string” (optional)

    target installation language

Example

Method: POST

https://[hoster-api-host]/1.0/billing/subscription/rest/installproduct?itemId=[int]&settings=[string]&envGroups=[string]&session=[string]&envName=[string]&displayName=[string]&appid=[string]&subscriptionId=[int]&region=[string]&lang=[string]

Response

  • Response
    {
    "error": "string",
    "reason": "int",
    "result": "int",
    "source": "string"
    }
    

MoveProduct (appid, session, subscriptionId, [itemId], itemResourceId, targetSubscriptionId, targetItemId, passphrase ) :

Moves a SubscriptionItem (installed service plan) to another subscription.

URL

https://[hoster-api-host]/1.0/billing/subscription/rest/moveproduct

Parameters

  • appid : “string”

    unique identifier of the target application (required for authentication).

  • session : “string”

    user session or personal access token.

  • subscriptionId : “int”

    unique identifier of the source subscription.

  • itemId : “int” (optional)

    unique identifier of the source subscription item.

  • itemResourceId : “int”

    unique identifier of the source subscription item resource.

  • targetSubscriptionId : “int”

    unique identifier of the target subscription item resource.

  • targetItemId : “int”

    unique identifier of the target subscription item.

  • passphrase : “string”

    confirmation code for the operation (provide the “uniqueName” value from the “ItemResource” object).

Example

Method: POST

https://[hoster-api-host]/1.0/billing/subscription/rest/moveproduct?itemId=[int]&itemResourceId=[int]&session=[string]&appid=[string]&passphrase=[string]&subscriptionId=[int]&targetSubscriptionId=[int]&targetItemId=[int]

Response

  • Response
    {
    "error": "string",
    "reason": "int",
    "result": "int",
    "source": "string"
    }
    

SetAutopay (appid, session, id, enable, [expandFields] ) :

Enables/disables auto payment for the provided subscription.

URL

https://[hoster-api-host]/1.0/billing/subscription/rest/setautopay

Parameters

  • appid : “string”

    unique identifier of the target application (required for authentication).

  • session : “string”

    user session or personal access token.

  • id : “int”

    unique identifier of the target subscription.

  • enable : “boolean”

    defines whether to enable (true) or disable (false) the auto pay option for the subscription.

  • expandFields : “string” (optional)

    there are fields that are not included in responses by default. You can request these fields as an expanded response by listing required object paths in this parameter (e.g. account.group).

Example

Method: POST

https://[hoster-api-host]/1.0/billing/subscription/rest/setautopay?session=[string]&enable=[boolean]&appid=[string]&expandFields=[string]&id=[int]

Response

  • ArrayItemResponse
    {
    "arrayItem": "ArrayItem",
    "className": "Class",
    "error": "string",
    "expandablePath": [
    "string",
    "..."
    ],
    "reason": "int",
    "result": "int",
    "source": "string"
    }
    

Subscribe (appid, session, productId, items, [chargeAutomatically], [expandFields] ) :

Subscribes current user for the provided Product.

URL

https://[hoster-api-host]/1.0/billing/subscription/rest/subscribe

Parameters

  • appid : “string”

    unique identifier of the target application (required for authentication).

  • session : “string”

    user session or personal access token.

  • productId : “int”

    unique identifier of the subscription product.

  • items : “string”

    JSON object with subscription details. For example: [{“servicePlanId”: 1, “tariffPlanId”: 1, “quantity”: 10}].

  • chargeAutomatically : “boolean” (optional)

    defines whether the auto pay option for the subscription should be enabled (true) or disabled (false).

  • expandFields : “string” (optional)

    there are fields that are not included in responses by default. You can request these fields as an expanded response by listing required object paths in this parameter (e.g. account.group).

Example

Method: POST

https://[hoster-api-host]/1.0/billing/subscription/rest/subscribe?productId=[int]&session=[string]&appid=[string]&expandFields=[string]&chargeAutomatically=[boolean]&items=[string]

Response

  • ArrayItemResponse
    {
    "arrayItem": "ArrayItem",
    "className": "Class",
    "error": "string",
    "expandablePath": [
    "string",
    "..."
    ],
    "reason": "int",
    "result": "int",
    "source": "string"
    }
    

UndoCancel( appid, session, id, [expandFields] ) :

Revokes a scheduled subscription cancellation.

URL

https://[hoster-api-host]/1.0/billing/subscription/rest/undocancel

Parameters

  • appid : “string”

    unique identifier of the target application (required for authentication).

  • session : “string”

    user session or personal access token.

  • id : “int”

    unique identifier of the target subscription.

  • expandFields : “string” (optional)

    there are fields that are not included in responses by default. You can request these fields as an expanded response by listing required object paths in this parameter (e.g. account.group).

Example

Method: POST

https://[hoster-api-host]/1.0/billing/subscription/rest/undocancel?session=[string]&appid=[string]&expandFields=[string]&id=[int]

Response

  • ArrayItemResponse
    {
    "arrayItem": "ArrayItem",
    "className": "Class",
    "error": "string",
    "expandablePath": [
    "string",
    "..."
    ],
    "reason": "int",
    "result": "int",
    "source": "string"
    }
    

UninstallProduct (appid, session, subscriptionId, itemId, itemResourceId, passphrase ) :

Uninstalls a subscription Product according to the provided subscription.

URL

https://[hoster-api-host]/1.0/billing/subscription/rest/uninstallproduct

Parameters

  • appid : “string”

    unique identifier of the target application (required for authentication).

  • session : “string”

    user session or personal access token.

  • subscriptionId : “int”

    unique identifier of the target subscription.

  • itemId : “int”

    unique identifier of the target subscription item.

  • itemResourceId : “int”

    unique identifier of the target subscription item resource.

  • passphrase : “string”

    confirmation code for the operation (provide the “uniqueName” value from the “ItemResource” object).

Example

Method: POST

https://[hoster-api-host]/1.0/billing/subscription/rest/uninstallproduct?itemId=[int]&itemResourceId=[int]&session=[string]&appid=[string]&passphrase=[string]&subscriptionId=[int]

Response

  • Response
    {
    "error": "string",
    "reason": "int",
    "result": "int",
    "source": "string"
    }
    

UpcomingInvoice (appid, session, subscriptionId, itemId, quantity ) :

Returns the subscription update invoice with the new installation quantity.

URL

https://[hoster-api-host]/1.0/billing/subscription/rest/upcominginvoice

Parameters

  • appid : “string”

    unique identifier of the target application (required for authentication).

  • session : “string”

    user session or personal access token.

  • subscriptionId : “int”

    unique identifier of the target subscription.

  • itemId : “int”

    unique identifier of the target subscription item.

  • quantity : “int”

    a new installation quantity for the subscription.

Example

Method: POST

https://[hoster-api-host]/1.0/billing/subscription/rest/upcominginvoice?itemId=[int]&quantity=[int]&session=[string]&appid=[string]&subscriptionId=[int]

Response

  • ArrayItemResponse
    {
    "arrayItem": "ArrayItem",
    "className": "Class",
    "error": "string",
    "expandablePath": [
    "string",
    "..."
    ],
    "reason": "int",
    "result": "int",
    "source": "string"
    }
    

UpdateSubscription (appid, session, subscriptionId, itemId, quantity, [expandFields] ) :

Updates subscription installation quantity.

URL

https://[hoster-api-host]/1.0/billing/subscription/rest/updatesubscription

Parameters

  • appid : “string”

    unique identifier of the target application (required for authentication).

  • session : “string”

    user session or personal access token.

  • subscriptionId : “int”

    unique identifier of the target subscription.

  • itemId : “int”

    unique identifier of the target subscription item.

  • quantity : “int”

    a new installation quantity for the subscription.

  • expandFields : “string” (optional)

    there are fields that are not included in responses by default. You can request these fields as an expanded response by listing required object paths in this parameter (e.g. account.group).

Example

Method: POST

https://[hoster-api-host]/1.0/billing/subscription/rest/updatesubscription?itemId=[int]&quantity=[int]&session=[string]&appid=[string]&expandFields=[string]&subscriptionId=[int]

Response

  • ArrayItemResponse
    {
    "arrayItem": "ArrayItem",
    "className": "Class",
    "error": "string",
    "expandablePath": [
    "string",
    "..."
    ],
    "reason": "int",
    "result": "int",
    "source": "string"
    }
    

Leave a Comment