ProductContext

Retrieve a product context for the current user

Changed on

Retrieve a product context for the current user

get/billing/v1/userProductContext/{applicationId}

Request

Path parameters

applicationIdnumber required

id of the application

Response

OK

assignedboolean

True when the subscription has users assigned to it.

editionIdnumber nullable

The pricing plan ID of the subscription.

freeTrialAllowedboolean

True if a free trial is allowed for this edition or if the current subscription is in a free trial.

freeTrialDaysLeftnumber nullable

The number of days remaining in the free trial for the application. Not present if there is no free trial for the edition, if the free trial is over, or if the free trial has been activated to a paid subscription.

maxUsersnumber nullable

Maximum number of users that can be assigned to the application. Not present when unlimited.

numAssignedUsersnumber nullable

Number of users assigned to the subscription.

partOfExistingBundleboolean

True if this application was bought as part of a bundle.

pendingEventTypestring nullable

If the subscription is blocked due to communication with a third party, this field represents the latest event type that was blocked. Can be one of:

SUBSCRIPTION_ORDER, SUBSCRIPTION_CHANGE, SUBSCRIPTION_CANCEL, SUBSCRIPTION_NOTICE, USER_ASSIGNMENT, USER_UNASSIGNMENT, USER_UPDATED, ADDON_ORDER, ADDON_CHANGE, ADDON_CANCEL, ADDON_BIND, ADDON_UNBIND

statusstring nullable

The subscription status for the product owned by the requested user. Can be one of: INITIALIZED, FAILED, FREE_TRIAL, FREE_TRIAL_EXPIRED, ACTIVE, SUSPENDED, CANCELLED;

Example response

{
  "assigned": true,
  "editionId": 12345,
  "freeTrialAllowed": true,
  "freeTrialDaysLeft": 12345,
  "maxUsers": 12345,
  "numAssignedUsers": 12345,
  "owner": {
    "href": "...",
    "id": "..."
  },
  "partOfExistingBundle": true,
  "paymentPlan": {
    "href": "...",
    "id": "..."
  },
  "pendingEventType": "...",
  "purchaseRestriction": [
    {
      "appId": 12345,
      "appName": "...",
      "browsedEditionId": 12345,
      "ownedEditionId": 12345,
      "ownedEditionName": "...",
      "requiredAppEdition": [
        {
          "appId": 12345,
          "appName": "...",
          "editionId": 12345,
          "editionName": "..."
        },
        {
          "appId": 12345,
          "appName": "...",
          "editionId": 12345,
          "editionName": "..."
        }
      ],
      "restrictionType": "...",
      "upcomingSubscription": true
    },
    {
      "appId": 12345,
      "appName": "...",
      "browsedEditionId": 12345,
      "ownedEditionId": 12345,
      "ownedEditionName": "...",
      "requiredAppEdition": [
        {
          "appId": 12345,
          "appName": "...",
          "editionId": 12345,
          "editionName": "..."
        },
        {
          "appId": 12345,
          "appName": "...",
          "editionId": 12345,
          "editionName": "..."
        }
      ],
      "restrictionType": "...",
      "upcomingSubscription": true
    }
  ],
  "status": "...",
  "subscription": {
    "href": "...",
    "id": "..."
  }
}

Changes