Skip to main content

getCustomerInfo

CustomerInfoWrapper getCustomerInfo(refresh)

GET /api/2.0/portal/payment/customerinfo

Get the customer information

Returns the billing customer behind the portal: the e-mail its billing account is registered to, whether a payment method is stored for it, and the portal user who is the payer of that account. Only a DocSpace administrator may read it, and the call is read-only. The answer is empty in two ordinary cases - the installation has no billing service configured at all, and the portal has never been a customer - so an empty body is not an error. payer is filled in only when the billing e-mail belongs to a portal user; when it does not, the e-mail is still shown but the field stays empty, and that is what makes every payer-only operation of this group unreachable for everybody. refresh=true re-reads the customer from the billing provider instead of the cache, which is worth doing right after a payment method has been attached.

Parameters​

NameInTypeDescriptionNotes
refreshqueryBooleanWhether the answer is fetched from the billing service instead of the portal cache. The cached copy is what a start-up needs and costs nothing; asking for a fresh one makes a remote call, so use it right after a purchase or a top-up and not on every read.[optional] [example: true]

Responses​

Status codeDescriptionTypeResponse headers
200The billing customer with its payer, or an empty result when the portal has no customer or billing is not configuredCustomerInfoWrapperX-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
403The caller is not a DocSpace administrator--
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​

CustomerInfoWrapper

Authorization​

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

HTTP request headers​

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