Set tariff

PUT /api/tariff/set

Request

Changes the portal pricing plan with the parameters specified in the request.

Headers

Acceptenum of string

Can be one of: application/json.

Content-Typeenum of string

Can be one of: application/json.

Body

activeUsersinteger

Number of active users

dueDatestring

End date of portal pricing plan

featuresstring

List of available features

maxFileSizenumber

Maximum size of the available disk space measured in bytes[^*]

maxTotalSizenumber

Maximum size of the uploaded files measured in bytes[^*]

portalNamestringrequired

Portal name

Examples

PUT /api/tariff/set HTTP/1.1
Accept: application/json
Content-Length: 163
Content-Type: application/json
Host: example.com

{
  "activeUsers": 50,
  "dueDate": "2016-07-13",
  "features": "whitelabel",
  "maxFileSize": 1073741824,
  "maxTotalSize": 104857600,
  "portalName": "example"
}
curl --request PUT \
  --url https://example.com/api/tariff/set \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{
  "activeUsers": 50,
  "dueDate": "2016-07-13",
  "features": "whitelabel",
  "maxFileSize": 1073741824,
  "maxTotalSize": 104857600,
  "portalName": "example"
}'

Responses

200

The description of the portal and the portal pricing plan

tariffobject
activeUsersinteger
dueDatestringformat: date
featuresstring
maxFileSizenumber
maxTotalSizenumber
tenantobject
createdstringformat: date-time
domainstring
languagestring
ownerIdstring
portalNamestring
statusstring
tenantIdinteger
timeZoneNamestring

400

Bad Request

errorenum of string
  • params - An error has been made in the method parameters specified in the request.
  • passPolicyError - The password specified in the request does not meet the requirements.
  • portalNameEmpty - The required parameter portalName, which must be present in the request, is not specified.
  • portalNameExist - Portal with the portal name specified in the request has already been registered.
  • portalNameIncorrect - Invalid characters in the portalName parameter.
  • portalNameNotFound - No portal with the portal name specified in the request has been registered.
  • portalsCountTooMuch - The limit for the number of portals has been reached.
  • recaptchaInvalid - Invalid reCAPTCHA value has been entered.
  • tooMuchAttempts - The limit for the number of request attempts has been reached.
  • tooShortError - The portalName specified in the request is too short.

Can be one of: params, passPolicyError, portalNameEmpty, portalNameExist, portalNameIncorrect, portalNameNotFound, portalsCountTooMuch, recaptchaInvalid, tooMuchAttempts, tooShortError.

403

Forbidden

errorenum of string
  • authorization - Authorization error, the possible reasons: an unknown authorization scheme is used, or the authorization key is missing, or the authorization key time is out, or a wrong key is used.

Can be one of: authorization.

500

Internal Server Error

errorenum of string
  • authorization - Internal server error when decoding the authorization key.
  • registerNewTenantError - An error occurred while registering a new portal.
  • error - An internal server error occurred.

Can be one of: authorization, registerNewTenantError, error.

Get Help

  • If you have any questions about ONLYOFFICE DocSpace, try the FAQ section first.
  • You can request a feature or report a bug by posting an issue on GitHub.
  • You can also ask our developers on ONLYOFFICE forum (registration required).