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

# Get metrics

> Retrieve metrics for a specific company. Supports extensive filtering by category, date range, and cadence.

**Permissions:**
- User must be authenticated via OAuth.
- User must have access to the company.



## OpenAPI

````yaml get /metrics/
openapi: 3.0.1
info:
  title: Standard Metrics API Documentation
  description: >-
    Welcome to Standard Metric's API docs!


    To use our API you will need to make an OAuth appliction (or use an existing
    one) in the developer settings tab on your settings page and then exchange
    your client id and secret for an access token (via the `/o/token/` endpoint.
    This token can then be sent in the `Authorization` header to authenticate
    your requests to our api. See below for an example.


    All endpoints are paginated and will return a maximum of 100 results per
    page. See the endpoints below and example responses for more details on
    pagination parameters. A maximum of 120 requests per minute can be made to
    our API.


    Authentication example (with python):

    ```>>> import base64

    >>> import base64

    >>> client_id = "YOUR_CLIENT_ID"

    >>> client_secret = "YOUR_CLIENT_SECRET"

    >>> credential = f"{client_id}:{client_secret}"

    >>> base64.b64encode(credential.encode("utf-8"))

    b'ENCODED_CREDENTIAL'


    You can now exchange this credential for an access token, eg:


    curl -X POST \
        -H "Authorization: Basic ENCODED_CREDENTIAL" \
        -H "Cache-Control: no-cache" \
        -H "Content-Type: application/x-www-form-urlencoded" \
        "https://api.standardmetrics.io/o/token/" \
        -d "grant_type=client_credentials"

    You will receive the following response:


    {
        "access_token": "YOUR_ACCESS_TOKEN",
        "expires_in": 36000,
        "token_type": "Bearer",
        "scope": "read write"
    }


    Make sure not to forget to prepend "Bearer " to your access token in the
    Authorization header while making requests.
  version: '1.0'
servers:
  - url: https://api.standardmetrics.io/v1
security:
  - Bearer: []
paths:
  /metrics/:
    get:
      tags:
        - metrics
      summary: Get metrics
      description: >-
        Retrieve metrics for a specific company. Supports extensive filtering by
        category, date range, and cadence.


        **Permissions:**

        - User must be authenticated via OAuth.

        - User must have access to the company.
      operationId: metrics_list
      parameters:
        - name: page
          in: query
          description: A page number within the paginated result set.
          schema:
            type: integer
        - name: page_size
          in: query
          description: Number of results to return per page.
          schema:
            type: integer
        - name: company_slug
          in: query
          description: >-
            The slug that uniquely identifies the company whose metrics' to
            request. You can find the slug for a company by going to that
            company's portfolio page, and then the last portion of the URL will
            be the unique slug for said company. For example: in the url:
            `app.standardmetrics.io/venture/fund-slug/portfolio/example-slug/`,
            `example-slug` would the the slug. You can also make a request to
            the `/companies` endpoint to get a list of all your firm's companies
            and their slugs. Either the `company_slug` or `company_id` parameter
            must be passed to this endpoint.
          schema:
            type: string
        - name: company_id
          in: query
          description: >-
            The id for the company whose metrics' to request. You can get a
            company's id by making a request to the `/companies` endpoint.
            Either the `company_slug` or `company_id` parameter must be passed
            to this endpoint.
          schema:
            type: string
        - name: from
          in: query
          description: >-
            The from date (inclusive) from which to query metrics for as an ISO
            8601 formatted date
          schema:
            type: string
        - name: to
          in: query
          description: >-
            The to date (inclusive) from which to query metrics until as an ISO
            8601 formatted date
          schema:
            type: string
        - name: category
          in: query
          description: >-
            The category of metrics to request. If not specified, all metrics
            are returned. This parameter can be passed multiple times to filter
            by multiple categories. Custom metrics can be queried by using their
            display name (e.g., "Total Number of Customers"). To return only
            custom metrics, set category to "custom". 

             Available standard metric categories include: `accounts_payable`, `accounts_receivable`, `arr`, `assets`, `burn_per_fte`, `cash_flow_from_financing_activities`, `cash_flow_from_investing_activities`, `cash_flow_from_operating_activities`, `cash_in_bank`, `cash_payments`, `cash_receipts`, `churned_arr`, `contraction_arr`, `cost_of_goods_sold`, `current_assets`, `current_liabilities`, `custom`, `ebitda`, `equity`, `expansion_arr`, `fair_value`, `fully_diluted_shares`, `gross_irr`, `gross_margin`, `gross_profit`, `headcount`, `investment_amount`, `latest_price_per_share`, `liabilities`, `long_term_liabilities`, `moic`, `net_assets`, `net_burn`, `net_income`, `net_new_arr`, `net_operating_profit`, `net_other_income`, `net_profit`, `new_logo_arr`, `non_current_assets`, `operating_margin`, `other_non_current_assets`, `ownership`, `post_money_valuation`, `pre_money_valuation`, `property_plants_and_equipment`, `reactivation_arr`, `realized_value`, `revenue`, `revenue_growth`, `revenue_per_fte`, `runway`, `short_term_investments`, `total_change_in_cash`, `total_operating_expenses`, `total_shares_owned`
          schema:
            type: string
        - name: budget_id
          in: query
          description: >-
            A budget id for requesting budget metrics. See the `/budgets`
            endpoint for more information about how to get budget ids
          schema:
            type: string
        - name: updated_at_from
          in: query
          description: >-
            The from date (inclusive) from which to query updated_at as an ISO
            8601 formatted date
          schema:
            type: string
            format: date-time
        - name: updated_at_to
          in: query
          description: >-
            The to date (inclusive) from which to query updated_at as an ISO
            8601 formatted date
          schema:
            type: string
            format: date-time
        - name: include_deleted
          in: query
          description: Set to '1' if you want to include deleted metrics.
          schema:
            type: string
            enum:
              - '1'
        - name: include_budgets
          in: query
          description: Set to "1" if you want budget metrics to be returned as well.
          schema:
            type: string
            enum:
              - '1'
        - name: include_archived
          in: query
          description: >-
            Set to '0' to exclude archived metrics. Defaults to '1' (include
            archived).
          schema:
            type: string
            default: '1'
            enum:
              - '0'
              - '1'
        - name: cadence
          in: query
          description: >-
            The cadence type of the metrics to request. Cadence options include:
            `"point_in_time"`, `"month"`, `"quarter"`, `"year"`. The later three
            should only be set for cumulative categories.
          schema:
            type: string
        - name: custom_metric
          in: query
          description: >-
            The name of the custom metric to query. This field is only populated
            for metrics in the "custom" category. When filtering for specific
            metrics, using the `category` field is preferred.
          schema:
            type: string
        - name: sort_by
          in: query
          description: >-
            The field to sort your query by. Currently, `created_at` is the only
            supported field. To sort in descending order, prepend the field
            you're sorting by with a `-`. Ascending order is implied, but you
            can also prepend the field you're sorting by with `+` to sort in
            ascending order. E.g. to sort by created_at in ascending order use
            `"sort_by=-created_at"` and to sort by created_at in descending
            order use `"sort_by=+created_at"` or just `"sort_by=created_at"`.
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                required:
                  - count
                  - results
                type: object
                properties:
                  count:
                    type: integer
                  next:
                    type: string
                    format: uri
                    nullable: true
                  previous:
                    type: string
                    format: uri
                    nullable: true
                  results:
                    type: array
                    items:
                      $ref: '#/components/schemas/Datum'
components:
  schemas:
    Datum:
      required:
        - budget_id
        - category_id
        - company_id
        - created_at
        - currency
        - date
        - id
        - updated_at
      type: object
      properties:
        id:
          title: Id
          type: string
        value:
          title: Value
          type: string
          readOnly: true
        currency:
          title: Currency
          minLength: 1
          type: string
          nullable: true
        converted_value:
          title: Converted value
          type: string
          readOnly: true
        preferred_currency:
          title: Preferred currency
          type: string
          readOnly: true
        date:
          title: Date
          type: string
          format: date
        category:
          title: Category
          type: string
          readOnly: true
        category_type:
          title: Category type
          type: string
          readOnly: true
        category_id:
          title: Category id
          type: string
        cadence:
          title: Cadence
          type: string
          readOnly: true
        is_budget_metric:
          title: Is budget metric
          type: boolean
          readOnly: true
        budget_id:
          title: Budget id
          type: string
          nullable: true
        custom_metric:
          title: Custom metric
          minLength: 1
          type: string
          nullable: true
          readOnly: true
        fx_rate:
          title: Fx rate
          type: number
          nullable: true
          readOnly: true
        detailed_source:
          title: Detailed source
          type: string
          readOnly: true
        updated_at:
          title: Updated at
          type: string
          format: date-time
        created_at:
          title: Created at
          type: string
          format: date-time
        company_id:
          title: Company id
          type: string
        deleted_at:
          title: Deleted at
          type: string
          format: date-time
          nullable: true
          readOnly: true
        archived:
          title: Archived
          type: boolean
          readOnly: true
  securitySchemes:
    Bearer:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Your valid bearer token. All Auth tokens persist for all requests. Make
        sure to replace Client Credential `Basic` tokens with `Bearer` tokens
        after retrieving your bearer token. Go to the API Reference/Setup, User
        Guides/Initial Setup, or API Reference/Get API Access Token page to get
        your token.

````