跳到主要内容

getAccountingServicePrices

ServicePriceArrayWrapper getAccountingServicePrices(serviceName, active)

GET /api/2.0/portal/payment/accounting/prices/{serviceName}

Get the service prices from the accounting service

Returns the portal's automatic wallet top-up settings: whether it is switched on, the balance that triggers it, the balance it tops the wallet up to and the currency it charges in. Only a DocSpace administrator may read it, no billing customer is needed, and the call is read-only. A portal that has never configured it gets the defaults rather than an empty result, so enabled is the field that says whether anything happens at all. Two of the values are kept by the portal itself and cannot be set through this API: lowBalanceThreshold is the balance below which the portal warns its administrators by mail, and lowBalanceNotified says whether that warning has already gone out for the current dip. Change the rest with POST api/2.0/portal/payment/topupsettings.

Parameters​

NameInTypeDescriptionNotes
serviceNamepathStringThe service whose price list is read, named the way the billing catalogue names it, such as ai-tools or backup. Take the value from the serviceName field of GET api/2.0/portal/payment/walletservices; a name the accounting service does not price yields an empty list rather than an error.[required] [example: ai-tools] [minLength: 0] [maxLength: 255]
activequeryBooleanWhether the answer is narrowed to the prices in force at the moment of the call. Leaving it false also returns the retired and the not yet started ones, which is what pricing a movement recorded in the past needs.[optional] [example: false]

Responses​

Status codeDescriptionTypeResponse headers
200The list of the service pricesServicePriceArrayWrapperX-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
400The serviceName is longer than 255 characters--
403The caller is not a DocSpace administrator, or the portal has no billing service configured--
500The accounting service is not configured, answers the price request with an error or cannot be reached--
401UnauthorizedErrorApiResponse-
429Too Many Requests.ErrorApiResponseRetry-After
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​

ServicePriceArrayWrapper

Authorization​

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

HTTP request headers​

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