Average Sale Price (ASP)

Retrieves the Average Sale Price (ASP), for the specified time period.

Examples
curl -X GET "https://api.chartmogul.com/v1/metrics/asp" \
     -u YOUR_API_KEY: \
     -d start-date=2023-07-31 \
     -d end-date=2023-08-31 \
     -d interval=month \
     -d geo=US \
     -d plans=Silver%20Monthly
ChartMogul::Metrics.asp(
  start_date: '2023-07-01',
  end_date: '2023-08-31',
  interval: 'month',
  geo: 'US',
  plans: 'Silver Monthly')
ChartMogul.Metrics.asp(config, {
   "start-date": "2023-07-31",
   "end-date": "2023-08-31",
   "interval": "month",
   "geo": "US",
   "plans": "Silver Monthly"
});
<?php

ChartMogul\Metrics::asp([
    "start-date" => "2023-07-31",
    "end-date" => "2023-08-31",
    "interval" => "month",
    "geo" => "US",
    "plans" => "Silver Monthly"
]);
?>
api.MetricsRetrieveASP(&cm.MetricsFilter{
		StartDate: "2023-07-31",
		EndDate:   "2023-08-31",
		Interval:  "month",
		Geo: "US",
		Plans: "Silver Monthly",
	})
chartmogul.Metrics.asp(
    config,
    start_date="2023-07-31",
    end_date="2023-08-31",
    interval="month",
    geo="US",
    plans="Silver Monthly")
Result Format
{
  "entries":[
    {
      "date":"2023-07-31",
      "asp":641,
       "percentage-change":0.0
    },
    {
      "date":"2023-08-31",
      "asp":539,
       "percentage-change":-15.91
    }
  ],
  "summary":{
    "current":539,
    "previous":500,
    "percentage-change":7.8
  }
}
#<ChartMogul::Metrics::ASPs:0x007fa4ec501de0 
@entries=[
  #<ChartMogul::Metrics::ASP:0x007fa4ec501930 
  @date=2023-07-31, 
  @asp=641,
  @percentage_change=0.0
  >, 
  #<ChartMogul::Metrics::ASP:0x007fa4ec5013b8 
  @date=2023-08-31, 
  @asp=539,
  @percentage_change=-15.91
  >,
  <...more entries...>
], 
@summary=
  #<ChartMogul::Summary:0x007fa4ec500e18
  @current=539,
  @previous=500,
  @percentage_change=7.8
  >
>
{
  "entries":[
    {
      "date":"2023-07-31",
      "asp":641,
       "percentage-change":0.0
    },
    {
      "date":"2023-08-31",
      "asp":539,
       "percentage-change":-15.91
    }
  ],
  "summary":{
    "current":539,
    "previous":500,
    "percentage-change":7.8
  }
}
<?php

ChartMogul\Metrics\ASPs::__set_state(array(
   "entries" => 
  Doctrine\Common\Collections\ArrayCollection::__set_state(array(
     "elements" => 
    array (
      0 => 
      ChartMogul\Metrics\ASP::__set_state(array(
         "date" => "2023-07-01",
         "asp" => 641,
         "percentage_change" => 0.0
      )),
      1 => 
      ChartMogul\Metrics\ASP::__set_state(array(
         "date" => "2023-08-31",
         "asp" => 539,
         "percentage_change" => -15.91
      ))
  ))),
   "summary" => 
  ChartMogul\Summary::__set_state(array(
     "current" => 539,
     "previous" => 500,
     "percentage_change" => 7.8
  )),
));
?>
(*chartmogul.ASPResult)(0xc0420b4f00)({
 Entries: ([]*chartmogul.ASPMetrics) (len=2) {
  (*chartmogul.ASPMetrics)(0xc042102860)({
   Date: (string) (len=10) "2023-07-01",
   ASP: (float64) 641,
   PercentageChange: (float64) 0.0
  }),
  (*chartmogul.ASPMetrics)(0xc0421028c0)({
   Date: (string) (len=10) "2023-08-31",
   ASP: (float64) 539,
   PercentageChange: (float64) -15.91
  })
 },
 Summary: (*chartmogul.Summary)(0xc042102900)({
  Current: (float64) 539,
  Previous: (float64) 500,
  PercentageChange: (float64) 7.8
 })
})
Metrics(entries=[
    <Metrics{
        asp=641.0,
        percentage_change=0.0,
        date=datetime.date(2023, 7, 1)}>,
    <Metrics{
        asp=539.0,
        percentage_change=-15.91,
        date=datetime.date(2023, 8, 31)}>],
summary=<Summary{
    current=539.0,
    percentage_change=7.8,
    previous=500.0}>)

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

  • date - The date of the end of the interval
  • asp - The ASP as at the end of the 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 ASP and ASP 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 ASP value, the value 30 days ago, and the percentage change between these two measures.

Language
Authorization
Basic
base64
: