ARR
GET https://api.chartmogul.com/v1/metrics/arr
Retrieves the Annualized Run Rate (ARR), for the specified time period.
curl -X GET "https://api.chartmogul.com/v1/metrics/arr" \
-u YOUR_API_KEY: \
-d start-date=2023-07-01 \
-d end-date=2023-08-31 \
-d interval=month \
-d geo=US \
-d plans=Silver%20Monthly
ChartMogul::Metrics.arr(
start_date: "2023-07-01",
end_date: "2023-08-31",
interval: "month",
geo: "US",
plans: "Silver Monthly",
)
ChartMogul.Metrics.arr(config, {
"start-date": "2023-07-01",
"end-date": "2023-08-31",
interval: "month",
geo: "US",
plans: "Silver Monthly",
});
ChartMogul\Metrics::arr([
"start-date" => "2023-07-01",
"end-date" => "2023-08-31",
"interval" => "month",
"geo" => "US",
"plans" => "Silver Monthly"
]);
api.MetricsRetrieveARR(&cm.MetricsFilter{
StartDate: "2023-07-01",
EndDate: "2023-08-31",
Interval: "month",
Geo: "US",
Plans: "Silver Monthly",
})
chartmogul.Metrics.arr(
config,
start_date="2023-07-01",
end_date="2023-08-31",
interval="month",
geo="US",
plans="Silver Monthly",
)
{
"entries": [
{
"date": "2023-07-31",
"arr": 135098976,
"percentage-change": 0.0
},
{
"date": "2023-08-31",
"arr": 122769816,
"percentage-change": -9.13
}
],
"summary": {
"current": 22265988,
"previous": 22352988,
"percentage-change": -0.39
}
}
#<ChartMogul::Metrics::ARRs:0x007fa4ec673778
@entries=[
#<ChartMogul::Metrics::ARR:0x007fa4ec673368
@date=2023-07-31,
@arr=135098976,
@percentage_change=0.0
>,
#<ChartMogul::Metrics::ARR:0x007fa4ec672e18
@date=2023-08-31,
@arr=122769816,
@percentage_change=-9.13
>
],
@summary=
#<ChartMogul::Summary:0x007fa4ec64bde0
@current=22265988,
@previous=22352988,
@percentage_change=-0.39
>
>
{
entries: [
{
date: "2023-07-31",
arr: 135098976,
"percentage-change": 0.0
},
{
date: "2023-08-31",
arr: 122769816,
"percentage-change": -9.13
}
],
summary: {
current: 22265988,
previous: 22352988,
"percentage-change": -0.39
}
}
ChartMogul\Metrics\ARRs::__set_state(array(
"entries" => Doctrine\Common\Collections\ArrayCollection::__set_state(array(
"elements" => array(
0 => ChartMogul\Metrics\ARR::__set_state(array(
"date" => "2023-07-31",
"arr" => 135098976,
"percentage_change" => 0.0
)),
1 => ChartMogul\Metrics\ARR::__set_state(array(
"date" => "2023-08-31",
"arr" => 122769816,
"percentage_change" => -9.13
))
)
)),
"summary" => ChartMogul\Summary::__set_state(array(
"current" => 22265988,
"previous" => 22352988,
"percentage_change" => -0.39
)),
));
(*chartmogul.ARRResult)(0xc0420b2f00)({
Entries: ([]*chartmogul.ARRMetrics) (len=2) {
(*chartmogul.ARRMetrics)(0xc0421da0a0)({
Date: (string) (len=10) "2023-07-31",
ARR: (float64) 135098976,
PercentageChange: (float64) 0
}),
(*chartmogul.ARRMetrics)(0xc0421da100)({
Date: (string) (len=10) "2023-08-31",
ARR: (float64) 122769816,
PercentageChange: (float64) -9.13
})
},
Summary: (*chartmogul.Summary)(0xc0421da140)({
Current: (float64) 22265988,
Previous: (float64) 22352988,
PercentageChange: (float64) -0.39
})
})
Metrics(
entries=[
<Metrics{
arr=135098976.0,
percentage_change=0.0,
date=datetime.date(2023, 7, 31)
}>,
<Metrics{
arr=122769816.0,
percentage_change=0.0,
date=datetime.date(2023, 8, 31)
}>
],
summary=<Summary{
current=22265988.0,
percentage_change=-0.39,
previous=22352988.0
}>
)
Query parameters
start-date
datetime required- The start date of the required period of data. An ISO-8601 formatted date, e.g.
2015-05-12
end-date
datetime required- The end date of the required period of data. An ISO-8601 formatted date, e.g.
2015-05-12
interval
string default: "month"- One of
day
,week
,month
(default), orquarter
geo
string- A comma-separated list of ISO 3166-1 Alpha-2 formatted country codes to filter the results to, e.g.
US,GB,DE
. plans
string- A comma-separated list of plan names (as configured in your ChartMogul account), UUIDs and external IDs to filter the results. Spaces in plan names must be URL-encoded (e.g.,
Silver%20plan,Gold%20plan,Enterprise%20plan
). Plan UUIDs are accepted with or without thepl_
prefix (e.g.,pl_ca7565ce-1973-9351-11ee-9f34ab5816d8,b35fdb9e-1ca2-11ee-90be-6f197565b760
). Plan names and IDs are case-sensitive. You can mix plan names, UUIDs and external IDs in a single string, (e.g.,Silver%20plan,pl_ca7565ce-1973-9351-11ee-9f34ab5816d8,gold_plan
).
Response
In the response, the entries
key contains an object for each interval, with the following data:
date
- the end date of each interval period.
arr
- the Annual Run Rate as at the end of each interval period. This is in your account's selected currency and is an integer number of cents. Divide it by 100 to obtain the actual value.
percentage-change
- The percentage change between the current ARR and ARR from the previous time interval. Will be set to 0.0 if this is the first entry in the response.
The summary
key contains the current ARR value, the value 30 days ago, and the percentage change between these two measures.