Skip to main content
POST
/
companies
/
{company_id}
/
report
/
cached_metrics
Get Metrics Data
curl --request POST \
  --url https://api.maplebilling.com/api/v1/companies/{company_id}/report/cached_metrics \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "frequency": "DAY",
  "grouping": "NONE",
  "metric": "ACTIVE_SUBS",
  "period": {
    "end_date": "2023-11-07T05:31:56Z",
    "start_date": "2023-11-07T05:31:56Z"
  }
}'
[
  {
    "metrics": [
      {
        "grouping": {},
        "period": {
          "end_date": "2023-11-07T05:31:56Z",
          "start_date": "2023-11-07T05:31:56Z"
        },
        "value": "<any>"
      }
    ]
  }
]

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

Idempotency-Key
string

The idempotency key that will be used to ensure the request is only performed once

Path Parameters

company_id
string
required

The company ID with the prefix 'cmp_'.

Body

application/json
frequency
enum<string>
required
Available options:
DAY,
WEEK,
MONTH,
QUARTER
metric
enum<string>
required

The metric chart type

Available options:
ACTIVE_SUBS,
NEW_SUBS,
CHURNED_SUBS,
ACTIVE_TRIALS,
NEW_TRIALS,
CHURNED_TRIALS,
CONVERTED_TRIALS,
ACTIVE_CUSTOMERS,
NEW_CUSTOMERS,
CHURNED_CUSTOMERS,
NET_REVENUE,
TOTAL_REVENUE,
TOTAL_INVOICED_REVENUE,
MRR,
ARR,
MRR_GROWTH,
FEES,
UPGRADES,
DOWNGRADES,
USER_CHURN,
REVENUE_CHURN,
NET_REVENUE_CHURN,
ARPU,
LTV,
ARPL,
OTHER_REVENUE,
LICENSES,
HISTORICAL_ARPU,
APPLICATION_FEES_CONNECTED_ACCOUNTS,
REVENUE_CONNECTED_ACCOUNTS,
DISCOUNTS_REDEEMED,
FAILED_CHARGES,
REFUNDS,
NEW_REFUNDS,
REACTIVATIONS
period
object
required

The period with a start and end date range

grouping
enum<string>
default:NONE
Available options:
NONE,
PRODUCT,
PRICING,
PRODUCT_TAGS,
PRICING_TAGS

Response

200 - application/json

OK

metrics
object[]
I