> ## Documentation Index
> Fetch the complete documentation index at: https://docs.datalyr.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get certified commerce metrics

> Returns policy-governed revenue, ad spend, profit, margin, ROAS, MER, and completeness statuses.



## OpenAPI

````yaml /api-reference/read-api.yaml get /commerce-metrics
openapi: 3.1.0
info:
  title: Datalyr Read API
  version: 1.0.0
  description: Read analytics and workspace data from Datalyr.
servers:
  - url: https://api.datalyr.com/v1
security:
  - bearerAuth: []
tags:
  - name: Analytics
  - name: Events and users
  - name: Attribution and revenue
  - name: Workspace
paths:
  /commerce-metrics:
    get:
      tags:
        - Attribution and revenue
      summary: Get certified commerce metrics
      description: >-
        Returns policy-governed revenue, ad spend, profit, margin, ROAS, MER,
        and completeness statuses.
      operationId: get-commerce-metrics
      parameters:
        - $ref: '#/components/parameters/commerceStartDate'
        - $ref: '#/components/parameters/commerceEndDate'
      responses:
        '200':
          $ref: '#/components/responses/Success'
        '400':
          $ref: '#/components/responses/Error'
        '503':
          $ref: '#/components/responses/Error'
components:
  parameters:
    commerceStartDate:
      name: start_date
      in: query
      required: true
      description: Inclusive exact UTC hour instant, such as 2026-07-01T00:00:00Z.
      schema:
        type: string
        format: date-time
    commerceEndDate:
      name: end_date
      in: query
      required: true
      description: >-
        Exclusive exact UTC hour instant. Must not be in the future and the
        interval cannot exceed 366 days.
      schema:
        type: string
        format: date-time
  responses:
    Success:
      description: Successful response.
      content:
        application/json:
          schema:
            type: object
            additionalProperties: true
    Error:
      description: Error response.
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Datalyr Agent key (dk_agent_…)

````