Retrieve 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=2015-01-01 \
     -d end-date=2015-11-01 \
     -d interval=month
ChartMogul::Metrics.asp(start_date: '2015-01-01', end_date: '2015-11-01', interval: 'month')
ChartMogul.Metrics.asp(config, {
   'start-date': '2015-01-01',
   'end-date': '2015-11-01',
   'interval': 'month'
}, function (err, res) {
   // asynchronously called
});
<?php

ChartMogul\Metrics::asp([
    "start-date" => "2015-01-01",
    "end-date" => "2015-11-01",
    "interval" => "month",
]);
?>
api.MetricsRetrieveASP(&cm.MetricsFilter{
        StartDate: "2016-01-01",
        EndDate:   "2016-03-12",
        Interval:  "month",
    Geo:             "GB",
    Plans:       "PRO Plan",
    })
chartmogul.Metrics.asp(
    config,
    start_date="2016-01-01",
    end_date="2016-03-12",
    interval="month",
      geo="GB",
        plans="PRO Plan")
Result Format
{
  "entries":[
    {
      "date":"2015-01-31",
      "asp":10000
    },
    {
      "date":"2015-02-28",
      "asp":524000
    },
    {"...more...": "...entries..."}
  ],
  "summary":{
    "current":524000,
    "previous":524000,
    "percentage-change":0.0
  }
}
#<ChartMogul::Metrics::ASPs:0x007fa4ec501de0 
@entries=[
  #<ChartMogul::Metrics::ASP:0x007fa4ec501930 
  @date=2015-01-31, 
  @asp=10000
  >, 
  #<ChartMogul::Metrics::ASP:0x007fa4ec5013b8 
  @date=2015-02-28, 
  @asp=524000
  >,
  <...more entries...>
], 
@summary=
  #<ChartMogul::Summary:0x007fa4ec500e18
  @current=524000,
  @previous=524000,
  @percentage_change=0.0
  >
>
{
  "entries":[
    {
      "date":"2015-01-31",
      "asp":10000
    },
    {
      "date":"2015-02-28",
      "asp":524000
    },
    {"...more...": "...entries..."}
  ],
  "summary":{
    "current":524000,
    "previous":524000,
    "percentage-change":0.0
  }
}
<?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" => "2015-01-31",
         "asp" => 10000,
      )),
      1 => 
      ChartMogul\Metrics\ASP::__set_state(array(
         "date" => "2015-02-28",
         "asp" => 524000,
      )),
      2 => ...
  ))),
   "summary" => 
  ChartMogul\Summary::__set_state(array(
     "current" => 524000,
     "previous" => 524000,
     "percentage_change" => 0.0,
  )),
));
?>
(*chartmogul.ASPResult)(0xc0420b4f00)({
 Entries: ([]*chartmogul.ASPMetrics) (len=3) {
  (*chartmogul.ASPMetrics)(0xc042102860)({
   Date: (string) (len=10) "2016-01-31",
   ASP: (float64) 0
  }),
  (*chartmogul.ASPMetrics)(0xc0421028c0)({
   Date: (string) (len=10) "2016-02-29",
   ASP: (float64) 0
  }),
  (*chartmogul.ASPMetrics)(0xc0421028e0)({
   Date: (string) (len=10) "2016-03-12",
   ASP: (float64) 0
  })
 },
 Summary: (*chartmogul.Summary)(0xc042102900)({
  Current: (float64) 0,
  Previous: (float64) 0,
  PercentageChange: (float64) 0
 })
})
Metrics(entries=[
    <Metrics{
        asp=0.0,
        date=datetime.date(2016,
        1,
        31)}>,
    <Metrics{
        asp=0.0,
        date=datetime.date(2016,
        2,
        29)}>,
    <Metrics{
        asp=0.0,
        date=datetime.date(2016,
        3,
        12)}>],
summary=<Summary{
    current=0.0,
    percentage_change=0.0,
    previous=0.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.

The summary key contains the current ASP value, the value 30 days ago, and the percentage change between these two measures.

Language
Authentication
Basic
base64
: