POST/partners/customers/{domainId}/subscriptions/{subscriptionId}/reservation

Adds a scheduled task for a subscription. You can add only one of the following scheduled subscriptions: Start a paid subscription (type: START_PAID_SERVICE), Add licenses (type: ADD_LICENSE), or Cancel a subscription (** type: CANCEL**).

  • Starting a paid subscription (type: START_PAID_SERVICE) is available only for a Trial subscription.
  • If the contract type (Plan) is license-based, you can schedule the addition of licenses (type:ADD_LICENSE).
  • Canceling a subscription (type:CANCEL) is available only for paid subscriptions.

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}/reservation

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
type string 

Scheduled subscription type

  • CANCEL: Cancel a subscription
  • START_PAID_SERVICE: Start a paid subscription
  • ADD_LICENSE: Add licenses

required
Allowed values : CANCEL, START_PAID_SERVICE, ADD_LICENSE 
applyDate string 

Scheduled date

  • If type is START_PAID_SERVICE
    • Trial plan: The date can range up to the end of the Trial grace period.
  • If type is ADD_LICENSE
    • The date can range from the next day to the end of the contract.
  • If type is CANCEL
    • The date can range from the next day to the day after the contract ends.

required 
licenseCount integer 

Number of licenses

  • It is the number of licenses to apply if type is START_PAID_SERVICE.
  • It is the number of licenses to add if type is ADD_LICENSE.

maximum : 1000000 
plan 

Plan

  • It is Plan if type is START_PAID_SERVICE.
  • It is not specified for a Trial plan.

Allowed values : MONTHLY, ANNUAL_LICENSE, ANNUAL_PREPAY_LICENSE 
productId 

Plan ID

  • Specify a plan ID to use if converting to a paid subscription.
    • Otherwise, you do not need to specify a plan ID.

Allowed values : STD, ADV 

Request Example

Schedule paid plan conversion from LINE WORKS Free to Advanced monthly contract postpay on 2021-11-01 (available only using a domain)

1{2  "type": "START_PAID_SERVICE",3  "applyDate": "2021-11-01",4  "plan": "MONTHLY",5  "productId": "ADV"6}

Schedule the addition of 100 licenses on 2021-08-11

1{2  "type": "ADD_LICENSE",3  "applyDate": "2021-08-11",4  "licenseCount": 1005}

Schedule the cancellation of the current subscription on 2021-11-01

1{2  "type": "CANCEL",3  "applyDate": "2021-11-01"4}

Response

HTTP 201

OK

PropertyTypeDescription
subscriptionId integer 

Subscription ID


required 
type string 

Scheduled subscription type

  • CANCEL: Cancel a subscription
  • START_PAID_SERVICE: Start a paid subscription
  • ADD_LICENSE: Add licenses

required
Allowed values : CANCEL, START_PAID_SERVICE, ADD_LICENSE 
applyDate string 

Scheduled date


required
format : date 
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 
productId string 

Paid plan ID

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

Allowed values : STD, ADV 
licenseCount integer 
  • When starting a paid subscription: Number of licenses to apply (the specified number of licenses is applied)
  • When adding licenses: Number of licenses to add (the specified number of licenses is added)