Commerce Layer analysis API

Operations with analysis resource

Operations 1

POST /analysis/fbt Query fbt on analysis #

Documentation

Specifications

Schemas & Data

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/commerce-layer-analysis-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no email required.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

commerce-layer-analysis-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Commerce Layer Metrics Analysis API
  version: 3.1.21
  contact:
    name: API Support
    url: https://commercelayer.io
    email: support@commercelayer.io
  description: Headless Commerce for Global Brands.
servers:
- url: https://{your-domain}.commercelayer.io/metrics
  description: Commerce Layer Metrics API
- url: https://docs.commercelayer.io/metrics-api
  description: API reference
security:
- bearerAuth: []
tags:
- name: analysis
  description: Operations with analysis resource
paths:
  /analysis/fbt:
    post:
      operationId: POST/analysis/fbt
      summary: Query fbt on analysis
      description: Get fbt results from analysis
      tags:
      - analysis
      requestBody:
        required: true
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/analysis_fbt_request'
      responses:
        '200':
          description: The fbt result from analysis
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      item_id:
                        type: string
                      value:
                        type: number
                        example: 8
                      type:
                        type: string
                      name:
                        type: string
                  meta:
                    type: object
                    properties:
                      type:
                        type: string
                        description: Action name
                      trace_id:
                        type: string
                        description: Request ID
                      mode:
                        type: string
                        description: Filter mode
                      organization_id:
                        type: string
                        description: Organization ID from request
                      market_ids:
                        type: array
                        items:
                          type: string
                        description: Markets IDs from the organization
                      payload:
                        type: object
                        properties:
                          filter:
                            $ref: '#/components/schemas/analysis_fbt_filter'
                          fbt:
                            $ref: '#/components/schemas/analysis_fbt_request/properties/fbt'
components:
  schemas:
    analysis_fbt_filter:
      type: object
      properties:
        line_items:
          type: object
          properties:
            item_ids:
              description: The ID of the associated item.
              type: object
              properties:
                in:
                  type: array
                  minItems: 1
                  items:
                    type: string
                  description: To include, array of item_ids
    analysis_fbt_request:
      type: object
      properties:
        filter:
          $ref: '#/components/schemas/analysis_fbt_filter'
        fbt:
          type: object
          properties: {}
        meta:
          type: object
          properties:
            payload:
              type: boolean
              description: Set to true if you want to receive how the payload has been made
      required:
      - filter
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT