Baremetrics Plans API

The Plans API from Baremetrics — 2 operation(s) for plans.

OpenAPI Specification

baremetrics-plans-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Baremetrics Annotations Plans API
  description: REST API for accessing subscription analytics data including MRR, ARR, churn rate, LTV, customer metrics, charges, subscriptions, plans, annotations, and revenue forecasting. Requires bearer token authentication using an API key from Baremetrics account settings.
  version: '1.0'
  contact:
    url: https://developers.baremetrics.com
servers:
- url: https://api.baremetrics.com
security:
- bearerAuth: []
tags:
- name: Plans
paths:
  /v1/{source_id}/plans:
    get:
      summary: List Plans
      description: Returns a list of plans for a given source.
      operationId: list-plans
      parameters:
      - name: source_id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: A list of plans
          content:
            application/json:
              schema:
                type: object
                properties:
                  plans:
                    type: array
                    items:
                      $ref: '#/components/schemas/Plan'
      tags:
      - Plans
  /v1/{source_id}/plans/{oid}:
    get:
      summary: Show Plan
      description: Returns a single plan by its OID.
      operationId: show-plan
      parameters:
      - name: source_id
        in: path
        required: true
        schema:
          type: string
      - name: oid
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: A plan object
          content:
            application/json:
              schema:
                type: object
                properties:
                  plan:
                    $ref: '#/components/schemas/Plan'
      tags:
      - Plans
components:
  schemas:
    Plan:
      type: object
      properties:
        oid:
          type: string
          description: Unique identifier for the plan in the source system.
        source_id:
          type: string
          description: The source identifier.
        source:
          type: string
          description: The source name.
        name:
          type: string
          description: Plan name.
        interval:
          type: string
          description: Billing interval (e.g. month, year).
        interval_count:
          type: integer
          description: Number of intervals between billings.
        trial_duration:
          type: integer
          description: Trial duration in days.
        trial_duration_unit:
          type: string
          description: Unit for trial duration.
        created:
          type: integer
          description: Unix timestamp when the plan was created.
        active_subscriptions:
          type: integer
          description: Number of active subscriptions on this plan.
        amount:
          type: integer
          description: Plan amount in cents.
        currency:
          type: string
          description: Currency code.
  securitySchemes:
    bearerAuth:
      type: apiKey
      in: header
      name: Authorization
      x-bearer-format: bearer
      x-default: APIKEY
x-readme:
  headers: []
  explorer-enabled: true
  proxy-enabled: false