跳到主要内容

createCustomerServiceUsageReport

DocumentBuilderTaskWrapper createCustomerServiceUsageReport(CustomerServiceUsageReportRequestDto)

POST /api/2.0/portal/payment/customer/usage/report

Start the service usage report

Queues the usage of the wallet services as an xlsx file and returns the task that will build it; the file is not ready when the response arrives. The portal needs a billing customer and the caller has to be a DocSpace administrator. The body takes the same filters as GET api/2.0/portal/payment/customer/usage - the service names, the date range, the participant, the operation status, the usage metadata and the ordering - and an empty body reports every service from the portal creation date to now; a service name this installation does not sell fails with 404. Poll GET api/2.0/portal/payment/customer/usage/report until isCompleted is true, then take the file from resultFileUrl or open resultFileId: the finished file is saved into the caller's own My documents section, where it counts against the portal storage like any other file. One service usage report per user is tracked at a time - a call made while the previous one is still running answers with that task - and DELETE api/2.0/portal/payment/customer/usage/report stops it. It is a different report from the operations one and does not interfere with it: per-movement history is POST api/2.0/portal/payment/customer/operationsreport.

Parameters​

NameInTypeDescriptionNotes
CustomerServiceUsageReportRequestDtobodyCustomerServiceUsageReportRequestDto[optional]

Responses​

Status codeDescriptionTypeResponse headers
200The queued task, to be polled until isCompleted is trueDocumentBuilderTaskWrapperX-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
403The caller is not a DocSpace administrator, or the portal has no billing service configured--
404This portal has no billing customer, or one of the names in serviceName is not a wallet service of this installation--
401UnauthorizedErrorApiResponse-
429Too Many Requests.ErrorApiResponseRetry-After
500Internal Server Error.ErrorApiResponse-
400Bad Request.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​

DocumentBuilderTaskWrapper

Authorization​

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

HTTP request headers​

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