cURL
curl -X GET \
/analytics/subscription-revenue \
--header "Authorization: Bearer <token>"import requests
url = "https://coreapi.io/analytics/subscription-revenue"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://coreapi.io/analytics/subscription-revenue', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://coreapi.io/analytics/subscription-revenue",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"data": [
{
"date": "2023-09-10 00:00:00",
"currency_code": "EUR",
"revenue": "1000.00",
"churn_revenue": "300.00",
"expansion_revenue": "150.00",
"new_revenue": "300.00"
}
],
"meta": {
"pagination": {
"totalItems": 123,
"itemsPerPage": 123,
"currentPage": 123,
"lastPage": 123,
"pageTotalItems": 123
}
}
}Analytics
Get series data for subscription
Get series data for subscription analytics, including MRR, new-MRR, expansion-MRR, churn-MRR. The result has one data-point for each currency and date combination. The data-point contains the MRR, new-MRR, expansion-MRR, and churn-MRR for the given currency and date.
Required permissions:analytics:readGET
/
analytics
/
subscription-revenue
cURL
curl -X GET \
/analytics/subscription-revenue \
--header "Authorization: Bearer <token>"import requests
url = "https://coreapi.io/analytics/subscription-revenue"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://coreapi.io/analytics/subscription-revenue', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://coreapi.io/analytics/subscription-revenue",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"data": [
{
"date": "2023-09-10 00:00:00",
"currency_code": "EUR",
"revenue": "1000.00",
"churn_revenue": "300.00",
"expansion_revenue": "150.00",
"new_revenue": "300.00"
}
],
"meta": {
"pagination": {
"totalItems": 123,
"itemsPerPage": 123,
"currentPage": 123,
"lastPage": 123,
"pageTotalItems": 123
}
}
}War diese Seite hilfreich?