跳到主要内容

switchToDevPack

BooleanWrapper switchToDevPack(DocsCloudDevPackRequestDto)

POST /api/2.0/settings/docscloud/switchtodevpack

Switch Docs Connect to Docs Connect Dev Pack

Upgrades the paid Docs Connect subscription of the current portal to Docs Connect Dev Pack for the requested number of users, charging the price difference to the portal wallet and moving the Docs Connect license to the new product. The portal must hold an active Docs Connect subscription, must not already hold a Docs Connect Dev Pack one, and its tariff must not be delayed or unpaid: the quotas and the state of the current tariff are listed by GET api/2.0/portal/tariff, and the amount that will be charged is returned by POST api/2.0/settings/docscloud/calculatedevpack for the same quantity. The caller must be a DocSpace administrator of a portal registered with the billing service. The switch is synchronous, mutating and not idempotent: repeating it after a successful call fails with 400, and concurrent calls for one portal are serialized so that the wallet is charged only once. It returns true when the subscription has been switched, and false when the billing service declines or fails to perform the switch, in which case nothing is charged and the portal stays on Docs Connect. Only the Docs Connect to Docs Connect Dev Pack direction is supported: to change the number of users of a subscription the portal already has, or to schedule a reversion from Docs Connect Dev Pack back to Docs Connect at the next billing period, use PUT api/2.0/portal/payment/updatewallet instead.

Parameters​

NameInTypeDescriptionNotes
DocsCloudDevPackRequestDtobodyDocsCloudDevPackRequestDto[optional]

Responses​

Status codeDescriptionTypeResponse headers
200Boolean value: true if the subscription is switched to Docs Connect Dev Pack, false if the billing service declines itBooleanWrapperX-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
400The request body cannot be read, the quantity is below the allowed minimum, the portal has no active Docs Connect subscription, or it already has a Docs Connect Dev Pack subscription--
402The portal tariff is delayed or not paid, so the subscription cannot be switched--
403The caller is not a DocSpace administrator, or the billing service is not configured--
404The portal is not registered as a billing customer, or the Docs Connect and Docs Connect Dev Pack wallet products are not configured on this installation--
401UnauthorizedErrorApiResponse-
429Too Many Requests.ErrorApiResponseRetry-After
500Internal Server Error.ErrorApiResponse-
502Bad Gateway. Returned by the reverse proxy, response body may be HTML and not JSON.--
503Service Unavailable. Returned by the reverse proxy, response body may be HTML and not JSON.--

Return type​

BooleanWrapper

Authorization​

Basic, OAuth2 (scopes: read, write), ApiKeyBearer, asc_auth_key, Bearer, OpenId

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/json