Skip to main content

changeTenantWalletServiceState

TenantWalletServiceSettingsWrapper changeTenantWalletServiceState(ChangeWalletServiceStateRequestDto)

POST /api/2.0/portal/payment/servicestate

Switch a wallet service

Switches one wallet service on or off for the portal: service names it and enabled says which way. The portal needs a billing customer, and the caller needs both the permission to edit the portal settings and DocSpace administrator rights. Order matters between the two AI services - AI tools has to be on before AI search may be switched on, and switching AI tools off switches AI search off with it - so a request that breaks that order is refused with 403. The call is mutating and idempotent: switching on a service that is already on changes nothing. It is written to the portal audit trail, and switching AI tools notifies the portal clients so the AI features appear or disappear for them without a reload. The whole updated set of switched-on services comes back. Switching a service on does not buy it - its units are still bought with PUT api/2.0/portal/payment/updatewallet.

Parameters​

NameInTypeDescriptionNotes
ChangeWalletServiceStateRequestDtobodyChangeWalletServiceStateRequestDto[optional]

Responses​

Status codeDescriptionTypeResponse headers
200The whole set of wallet services switched on for the portal after the changeTenantWalletServiceSettingsWrapperX-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
400The request body cannot be read, including a service name that is not a wallet service--
403The caller has no portal-settings right or is not a DocSpace administrator, the portal has no billing service configured, AI tools or AI search was switched on while AI is disabled for the portal, or AI search was switched on while AI tools is off--
404This portal has no billing customer yet--
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​

TenantWalletServiceSettingsWrapper

Authorization​

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

HTTP request headers​

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