POST/partners/customers/{domainId}/subscriptions/{subscriptionId}/paid-service

  • You need to specify the plan. Do not specify the productId.
  • If the contract type is license-based, specify the number of licenses (licenseCount).
  • When a subscription is converted to a paid one, all the scheduled settings for the subscription will be deleted.
  • Trial options will remain even after the conversion to paid. To convert an option to a paid subscription, use Convert an option to paid.

Authorization

oauth2

OAuth 2.0 authentication. For more information, see Authentication and Authorization.

Scope

partner

HTTP Request

POSThttps://www.worksapis.com/v1.0/partners/customers/{domainId}/subscriptions/{subscriptionId}/paid-service

Path Parameters

ParameterTypeDescription
domainId integer 

Domain ID


required
example : 10000001 
subscriptionId string 

Subscription ID


required 

Header Parameters

HeadertypeDescription
Authorization string 

Bearer {token}


required 

Request Body

PropertyTypeDescription
plan string 

Paid contract type

  • MONTHLY: Monthly contract postpay
  • ANNUAL_LICENSE: Annual contract monthly license
  • ANNUAL_PREPAY_LICENSE: Annual contract lump sum license

Applicable contract types by plan group

  • LINE WORKS Service
    • MONTHLY: Monthly contract postpay
    • ANNUAL_LICENSE: Annual contract monthly license
    • ANNUAL_PREPAY_LICENSE: Annual contract lump sum license

required
Allowed values : MONTHLY, ANNUAL_LICENSE, ANNUAL_PREPAY_LICENSE 
productId 

Plan ID


Allowed values : STD, ADV 
licenseCount integer 

Number of licenses

  • It is required if the contract type (Plan) is license-based.
  • Minimum value: Number of members

nullable : true 

Request Example

Convert a Trial subscription to monthly contract postpay

1{2  "plan": "MONTHLY"3}

Convert a Trial subscription to annual contract monthly license (300 licenses)

1{2  "plan": "ANNUAL_LICENSE",3  "licenseCount": 3004}

Response

HTTP 200

OK

PropertyTypeDescription
domainId integer 

Domain ID


required
readOnly : true 
subscriptionId integer 

Subscription ID


required 
productId string 
  • LINE WORKS Service
    • STD_T: Standard Trial plan
    • ADV_T: Advanced Trial plan
    • STD: Standard plan
    • ADV: Advanced plan

required
Allowed values : STD_T, ADV_T, STD, ADV 
plan string 

Contract type

  • TRIAL: Trial
  • MONTHLY: Monthly contract postpay
  • ANNUAL_LICENSE: Annual contract monthly license
  • ANNUAL_PREPAY_LICENSE: Annual contract lump sum license

Applicable contract types by plan group

  • LINE WORKS Service
    • TRIAL: Trial
    • MONTHLY: Monthly contract postpay
    • ANNUAL_LICENSE: Annual contract monthly license
    • ANNUAL_PREPAY_LICENSE: Annual contract lump sum license

required
Allowed values : TRIAL, MONTHLY, ANNUAL_LICENSE, ANNUAL_PREPAY_LICENSE 
planStartDate string 

Start date


required
format : date
readOnly : true 
planEndDate string 

End date

  • For a paid plan, it is the plan end date.

format : date
readOnly : true
nullable : true 
licenseAssignType string 

License assignment type

  • NONE: None
 
licenseCount integer 

Number of licenses


nullable : true 
status string 

Subscription status

  • ACTIVE: Active
  • SUSPENDED_TRIALEND: Suspended (Trial ended)

required
Allowed values : ACTIVE, SUSPENDED_TRIALEND 
renewal object (renewal) 

This model specifies renewal of a paid subscription. Use the type property to choose whether to renew the subscription with the current conditions or to change them. It is also possible to reduce the number of licenses upon renewal.

 

renewal

PropertyTypeDescription
subscriptionId integer 

Subscription ID


required 
type string 

Subscription renewal type

  • STAY: Renew the subscription under the same conditions.
  • CHANGE: Renew the subscription with changes (which are specified as parameters)
  • CANCEL: No renewal (cancellation)

required
Allowed values : STAY, CHANGE, CANCEL 
productId string 

Paid plan ID

  • LINE WORKS Service
    • STD: Standard plan
    • ADV: Advanced plan

Allowed values : STD, ADV 
plan string 

Paid contract type

  • MONTHLY: Monthly contract postpay
  • ANNUAL_LICENSE: Annual contract monthly license
  • ANNUAL_PREPAY_LICENSE: Annual contract lump sum license

Applicable contract types by plan group

  • LINE WORKS Service
    • MONTHLY: Monthly contract postpay
    • ANNUAL_LICENSE: Annual contract monthly license
    • ANNUAL_PREPAY_LICENSE: Annual contract lump sum license

Allowed values : MONTHLY, ANNUAL_LICENSE, ANNUAL_PREPAY_LICENSE 
licenseCount integer 

Number of licenses to apply at the time of renewal


maximum : 1000000 

Response Example

example

1{2  "domainId": 10000001,3  "subscriptionId": 12345,4  "productId": "STD",5  "plan": "MONTHLY",6  "planStartDate": "2021-11-01",7  "planEndDate": "2021-11-30",8  "memberCount": 100,9  "maxMemberCount": 100,10  "status": "ACTIVE",11  "renewal": {12    "subscriptionId": 12345,13    "type": "STAY",14    "productId": "STD",15    "plan": "MONTHLY",16    "maxMemberCount": 10017  }18}