AppResellerSubscription

Create subscription

Changed on

Note: This endpoint is being deprecated. // Create a new subscription on behalf of a user who is a member of a marketplace company linked to the current reseller company

post/appReseller/v1/subscriptions

Request

Request body

targetCompanyIdstring required

(Required) ID of the company in which the Reseller will create the new subscription

targetUserIdstring required

(Required) ID of the user for whom the Reseller will create the new subscription

paymentPlanIdstring required

(Required) Edition Payment Plan ID

parentSubscriptionIdstring nullable

ID of an add-on product's parent subscription

orderLinesstring required

Unit type and quantity

Example request

{
  "targetCompanyId": "698555fc-bc65-4163-9fee-16308edec41b",
  "targetUserId": "2c061df6-4313-45e0-8709-a0ca19b0aaa3",
  "parentSubscriptionId": "386626c0-53e2-4515-8450-4a720bb5d029",
  "paymentPlanId": "30ccf1e7-1937-40cb-8e73-851a226fd4ea",
  "orderLines": [
    {
      "unit": "USER",
      "quantity": "1"
    }
  ]
}

Response

Success

idstring required

Subscription ID

createdOnnumber required

Creation date of the subscription, in Unix timestamp format

applicationNamestring required

Name of the application related to the subscription

pendingEventType'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 required

Subscription status (valid values are INITIALIZED, FAILED, FREE_TRIAL, FREE_TRIAL_EXPIRED, ACTIVE, SUSPENDED, or CANCELLED)

referenceCodestring

Code provided by Resellers and Sales Agents while purchasing a subscription

Example response

{
  "id": "386626c0-53e2-4515-8450-4a720bb5d029",
  "createdOn": 1529083173000,
  "activeOrder": {
    "id": "1553",
    "paymentPlanId": "30ccf1e7-1937-40cb-8e73-851a226fd4ea",
    "orderLines": [
      {
        "unit": "USER",
        "quantity": "1"
      }
    ],
    "status": "PENDING MANUAL RECOVERY",
    "frequency": "One Time",
    "totalFee": "USD350.00",
    "editionName": "Edition",
    "createdOn": 1529083173000
  },
  "company": {
    "id": "698555fc-bc65-4163-9fee-16308edec41b",
    "name": "Company A"
  },
  "user": {
    "id": "2c061df6-4313-45e0-8709-a0ca19b0aaa3",
    "firstName": "Michael",
    "lastName": "Jordan"
  },
  "applicationName": "AUTO_DISCOUNTS_APP",
  "pendingEvent": "SUBSCRIPTION_CHANGE",
  "status": "ACTIVE",
  "referenceCode": "bundle09"
}

Changes

    • breaking

      added the new required request property

    • breaking

      added the new required request property

    • breaking

      added the new required request property

    • breaking

      added the new required request property

    • breaking

      the request's body type changed from no type to object

    • breaking

      the response's body type changed from no type to object for status

    • info

      added the new optional request property

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status