Enabled resource errors field for orders and carts —
Check the use case
LogoLogo
Metrics APIOther APIsChangelog
API reference
API reference
  • Introduction
  • Resources
    • Orders
      • Breakdown
      • Date breakdown
      • Stats
      • Search
      • Filters
      • Examples
    • Returns
      • Breakdown
      • Date breakdown
      • Stats
      • Search
      • Filters
      • Examples
    • Carts
      • Breakdown
      • Date breakdown
      • Stats
      • Search
      • Filters
      • Examples
  • Getting started
    • API specification
    • Queries
    • Filters
    • Analysis
    • Errors
    • Use cases
On this page
  • How it works
  • More to read

Introduction

A detailed list of all the resources on which you can do statistics using Commerce Layer Metrics API

NextOrders

Last updated 2 months ago

Commerce Layer Metrics API lets you extract and aggregate relevant metric data from your organizations. It enables you to perform 4 different types of queries (, , , and ) on 3 specific resources (, , and — more to come) by exposing 12 endpoints you can easily build starting from the base endpoint, according to the following format:

https://{{your_domain}}.commercelayer.io/metrics/{{resource_name}}/{{query_type}}

Commerce Layer Metrics API is currently released in open beta. Please to get all the information about the API specification and latest version.

This guide is a detailed reference where you can explore the comprehensive lists of the available fields and attributes of the resources in question, along with all the available values for the query keys and filter operators.

How it works

For each single resource you can find:

  • All the order resource's fields and attributes that are accessible through the Metrics API.

  • For each type of query, the allowed values for the query keys and query operators.

  • For each type of query, the filterable fields and the allowed values for the filter operators.

  • For each type of query, some basic examples to help you get started.

More to read

See the Metrics API guide for all the information on how and work or any other instruction you need to use it (a useful list of data analysis included).

Check Commerce Layer's to stay up-to-date with any changes, new features, and general improvements about the Metric API itself or any other Commerce Layer's app and open-source project.

Read the section for more examples of which queries and filters to use to get the most common metrics from your ecommerce data history.

If you're new to you can and try our Core commerce API while reading the .

For everything else, and feel free to ask any questions to the team or get involved in the conversation with the rest of our developers' community.

Commerce Layer
sign up for free
documentation
join us on Discord
orders
returns
carts
Orders
Returns
Carts
changelog
Getting started
breakdown
date breakdown
stats
search
read here
queries
filters
helper endpoints
Use cases