API reference
Search…
⌃K
Links

Introduction

A detailed list of all the resources on which you can do statistics using Commerce Layer Metrics API
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 (breakdown, date breakdown, stats, and search) on 3 specific resources (orders, returns, and carts — 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 read here 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 Getting started guide for all the information on how queries and filters work or any other instruction you need to use it.
Check Commerce Layer's changelog 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 Use cases 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 Commerce Layer you can sign up for free and try our core commerce API while reading the documentation.
For everything else, join us on Slack and feel free to ask any questions to the team or get involved in the conversation with the rest of our developers' community.
Last modified 1mo ago