Skip to main content

Get analytics for shipping estimates

Path Parameters
account_idstringrequired

The account identifier the analytics belongs to.

Query Parameters
fromstringdate

The start date of the custom date range. Defaults to 30 days ago if not specified.


throughstringdate

The to (inclusive) date of the custom date range. Defaults to the current date if not specified.


intervalenum

The time interval over which metrics should be aggregated. Defaults to day if not specified.

Enum:
  • day
  • month
Returns
emission_timeseriesarray of objectrequired

Timeseries containing the total emissions (tCO₂e) for the various shipping methods. Each element refers to a particular timeframe as seen on date.


carbon_intensity_timeseriesarray of objectrequired

Timeseries containing the mean value of the carbon intensities (gCO₂e/tkm) for shipping estimates. The value represents the emission per tonnes transported per kilometer traveled.


carbon_intensity_totalnumberrequired

Total carbon intensity for the returned timeframe.


namestringrequired

The account's name.


typeenumrequired

The account's type.

Enum:
  • live
  • test

logostringrequired

The account's logo URL.

  • GET /analytics/shipping/public/{account_id}
  • curl 'https://api.lune.co/v1/analytics/shipping/public/ljmkOq7vXd239gAE9WALWQ8ZGVD5ExNz' \
      -H 'Authorization: Bearer <API_KEY>'
  • Response
  • {
      "emission_timeseries": [
        [
          {
            "date": "2022-06-25",
            "air": 231,
            "sea": 127,
            "road": 730,
            "rail": 52,
            "inland_waterway": 0,
            "logistic_site": 2
          },
          {
            "date": "2022-06-27",
            "air": 500,
            "sea": 321,
            "road": 338,
            "rail": 17,
            "inland_waterway": 49,
            "logistic_site": 8
          }
        ]
      ],
      "carbon_intensity_timeseries": [
        [
          {
            "date": "2022-06-25",
            "average": 500
          },
          {
            "date": "2022-06-26",
            "average": 550
          },
          {
            "date": "2022-06-27",
            "average": 800
          }
        ]
      ],
      "carbon_intensity_total": 1,
      "name": "name",
      "type": "live",
      "logo": "https://client-assets.lune.co/XheugMiTUHynItnaYSvCF.png"
    }