List Activities

Returns a list of activities for the specified time period.

Examples
curl -X GET "https://api.chartmogul.com/v1/activities" \
     -u YOUR_API_KEY:
# Available from chartmogul-ruby >= 2.0.0
ChartMogul::Metrics::Activity.all({'per-page': 2, 'start-date': '2023-02-21T09:28:10Z'})
ChartMogul.Metrics.Activity.all(config, {
 per_page: 1,
 start_date: "2023-02-21T09:28:10Z"
});
<?php

ChartMogul\Metrics\Activities::all(["start_date" => "2023-02-21T09:28:10Z"])
?>
api.MetricsListActivities(&cm.MetricsListActivitiesParams{StartDate: "2023-02-21T09:28:10Z", AnchorCursor: cm.AnchorCursor{PerPage: 5, StartAfter: "b45b1d3f-3823-424f-ab47-5a1d0c00a7f6"}})
chartmogul.Activity.all(
    config,
    per_page=1)
Result Format
{
  "entries":[
    {
      "description": "purchased the Silver plan",
      "activity-mrr-movement": 6000,
      "activity-mrr": 6000,
      "activity-arr": 72000,
      "date": "2023-02-21T09:28:10+00:00",
      "type": "new_biz",
      "currency": "USD",
      "subscription-external-id": "sub_0001",
      "plan-external-id": "silver",
      "customer-name": "Myriapod Labs",
      "customer-uuid": "cus_8bc55ab6-c3b5-11eb-ac45-2f9a49d75af7",
     "customer-external-id": "cus_0001",
      "billing-connector-uuid": "ds_99076cb8-97a1-11eb-8798-a73b507e7929",
      "uuid": "f1a49735-21c7-4e3f-9ddc-67927aaadcf4"
    },
    // ...and more
  ],
  "cursor":"AjMx90kC0yMVQwNNwoYToyNC4wMDAwMDAwMDBgks68k",
  "has_more":false,
  "per_page":200,  // deprecated
}
#<ChartMogul::Metrics::Activities:0x00007fec1a23db70
  @entries=[#<ChartMogul::Metrics::Activity:0x00007fec1a23d990
    @description="purchased the Silver plan",
    @type="new_biz",
    @date=2023-02-21 09:28:10 +0000,
    @activity_arr=72000,
    @activity_mrr=6000,
    @activity_mrr_movement=6000,
    @currency="USD",
    @subscription_external_id="sub_0001",
    @plan_external_id="silver",
    @customer_name="Myriapod Labs",
    @customer_uuid="cus_8bc55ab6-c3b5-11eb-ac45-2f9a49d75af7",
    @customer_external_id="cus_0001",
    @billing_connector_uuid="ds_99076cb8-97a1-11eb-8798-a73b507e7929",
    @uuid="f1a49735-21c7-4e3f-9ddc-67927aaadcf4">,
    # ...and more
  ],
	@cursor="AjMx90kC0yMVQwNNwoYToyNC4wMDAwMDAwMDBgks68k",
  @has_more=true,
  @per_page=2> # deprecated with version 4.0.0
{
  "entries":[
    {
      "description": "purchased the Silver plan",
      "activity-mrr-movement": 6000,
      "activity-mrr": 6000,
      "activity-arr": 72000,
      "date": "2023-02-21T09:28:10+00:00",
      "type": "new_biz",
      "currency": "USD",
      "subscription-external-id": "sub_0001",
      "plan-external-id": "silver",
      "customer-name": "Myriapod Labs",
      "customer-uuid": "cus_8bc55ab6-c3b5-11eb-ac45-2f9a49d75af7",
     "customer-external-id": "cus_0001",
      "billing-connector-uuid": "ds_99076cb8-97a1-11eb-8798-a73b507e7929",
      "uuid": "f1a49735-21c7-4e3f-9ddc-67927aaadcf4"
    },
    // ...and more
  ],
  "cursor":"AjMx90kC0yMVQwNNwoYToyNC4wMDAwMDAwMDBgks68k",
  "has_more":false,
  "per_page":200, // deprecated with version 3.0.0
}
<?php

ChartMogul\Metrics\Activities::__set_state(array(
   "entries" =>
  Doctrine\Common\Collections\ArrayCollection::__set_state(array(
     "elements" =>
    array (
      ChartMogul\Metrics\Activity::__set_state(array(
	      "description" => "purchased the Silver plan"
        "type" => "new_biz"
        "date" => "2023-02-21T09:28:10+00:00"
        "activity-arr" => 72000
        "activity-mrr" => 6000
        "activity-mrr-movement" => 6000
        "currency" => "USD"
        "subscription-external-id" => "sub_0001"
        "plan-external-id" => "silver"
        "customer-name" => "Myriapod Labs"
        "customer-uuid" => "cus_8bc55ab6-c3b5-11eb-ac45-2f9a49d75af7"
        "customer-external-id" => "cus_0001"
        "billing-connector-uuid" => "ds_99076cb8-97a1-11eb-8798-a73b507e7929"
        "uuid" => "f1a49735-21c7-4e3f-9ddc-67927aaadcf4"
      ))
    ),
    // ...and more
  )),
   "cursor" => "AjMx90kC0yMVQwNNwoYToyNC4wMDAwMDAwMDBgks68k",
   "has_more" => false,
   "per_page" => 200, # deprecated with version 6.0.0
))
?>
(*chartmogul.MetricsActivities)(0xc042042f30)({
 Entries: ([]*chartmogul.MetricsActivity) (len=1) {
  (*chartmogul.MetricsActivity)(0xc0421ae1c0)({
   ID: (uint64) 8913316,
   Date: (string) (len=25) "2023-02-21T09:28:10+00:00",
   ActivityArr: (float64) 72000,
   ActivityMrr: (float64) 6000,
   ActivityMrrMovement: (float64) 6000,
   Currency: (string) (len=3) "USD",
   CurrencySign: (string) (len=1) "$",
   Description: (string) (len=57) "purchased the Silver plan",
   Type: (string) (len=7) "new_biz",
    SubscriptionExternalId: (string) (len=8) "sub_0001"
  }),
  // ...and more
 },
 Cursor: (string) (len=44) "AjMx90kC0yMVQwNNwoYToyNC4wMDAwMDAwMDBgks68k",
 HasMore: (bool) false,
 PerPage: (uint32) 1 // deprecated with version v4
})
Activities(entries=[
  <Activity{
    activity_arr=72000.0,
    activity_mrr=6000.0,
    activity_mrr_movement=6000.0,
    billing_connector_uuid='ds_99076cb8-97a1-11eb-8798-a73b507e7929',
    currency='USD',
    customer_external_id='cus_0001',
    customer_name='Myriapod Labs',
    customer_uuid='cus_8bc55ab6-c3b5-11eb-ac45-2f9a49d75af7',
    date=datetime.datetime(2023, 2, 21, 9, 28, 10, tzinfo=datetime.timezone(datetime.timedelta(0), '+0000')),
    description='purchased the Silver plan',
    plan_external_id='silver',
    subscription_external_id='sub_0001',
    type='new_biz',
    uuid='f1a49735-21c7-4e3f-9ddc-67927aaadcf4'}
  >,
  # ...and more
  ],
cursor='AjMx90kC0yMVQwNNwoYToyNC4wMDAwMDAwMDBgks68k',
has_more=True,
per_page=1) # deprecated with version 4.0.0

In the response, entries contains an object for each activity, with the following data:

  • activity-arr - The new ARR after the activity has occurred.
  • activity-mrr - The new MRR after the activity has occurred.
  • activity-mrr-movement - The change in MRR as a result of the activity. May
    be a positive or negative number. All amounts are expressed as an integer number
    of cents in your account currency. Divide by 100 to obtain the actual amount.
  • currency - the code representing your account currency, e.g. USD or EUR
  • date - The timestamp of when the activity occurred.
  • description - a description of the activity.
  • type - The type of the activity. One of new_biz, churn, expansion,
    contraction or reactivation.
  • subscription-external-id - The unique external identifier for the activity's subscription on the activity date. This is usually the subscription identifier from your billing system.
  • plan-external-id - External identifier of the plan related to the activity.
  • customer-name - Name of the customer who was responsible for the activity.
  • customer-uuid - ChartMogul generated uuid for the customer who was responsible for the activity.
  • customer-external-id - The unique external identifier for the customer who was responsible for the activity, if any.
  • billing-connector-uuid - ChartMogul generated uuid for the billing system in use.
  • uuid - The UUID of the activity object generated by ChartMogul.

The other keys represent pagination attributes:

  • cursor - A value that should be used in the next API request to fetch the next page of activities. Request for next page should be initiated only if has_more is set to true indicating that there are more activities to list.
  • has_more - One of true or false depending on whether there are more pages with results for this request.
  • per_page - DEPRECATED The number of results in this response. The maximum value allowed is 200.

Pagination
DEPRECATED - start-after is the pagination param you can use to request more result entries. start-after should be sent in the API request and its value is ChartMogul UUID of the last activity entry object on current list. It defines your spot in the list. For instance, if you made an API request and received 100 entries, ending with an activity with uuid abcde, your subsequent API call to get more activity entries should include start-after=abcde in query params in order to fetch the next page of the list.

Language
Authorization
Basic
base64
: