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

# List all plans

> Returns a paginated list of published plans. This will fetch the plan and the associated bricks for that plan.



## OpenAPI

````yaml https://api.salesbricks.com/api/v2/openapi.yaml get /plans
openapi: 3.0.3
info:
  title: Salesbricks REST API
  version: 2.0.0
  description: API reference for external integrations
servers:
  - url: https://api.salesbricks.com/api/v2
    description: Production
  - url: https://api.staging.salesbricks.com/api/v2
    description: Staging
security:
  - ApiKeyAuth: []
tags:
  - name: Subscriptions
    description: >-
      Operations related to subscription management, including creation,
      updates, and retrieving subscription details. Subscriptions can be
      upgraded to add / remove add-ons by using the POST
      /subscriptions/{subscription_id}/upgrade endpoint and can be recasted for
      replacing the current agreement using the POST
      /subscriptions/{subscription_id}/recast endpoint
  - name: Customers
    description: >-
      Operations related to customer management, including creation, updates,
      and managing customer person objects.
  - name: Invoices
    description: Operations related to subscription's invoicing details.
  - name: Plans
    description: >-
      Operations related to listing and getting plan details including bricks in
      the plan.
  - name: Payment Methods
    description: Operations related to subscription's payment method.
paths:
  /plans:
    get:
      tags:
        - Plans
      summary: List all plans
      description: >-
        Returns a paginated list of published plans. This will fetch the plan
        and the associated bricks for that plan.
      operationId: listPlans
      parameters:
        - in: query
          name: currency
          schema:
            type: string
            enum:
              - AUD
              - CAD
              - EUR
              - GBP
              - INR
              - USD
          description: 'Currency for pricing tiers (default: USD)'
        - name: limit
          required: false
          in: query
          description: Number of results to return per page.
          schema:
            type: integer
        - name: offset
          required: false
          in: query
          description: The initial index from which to return the results.
          schema:
            type: integer
        - in: query
          name: ordering
          schema:
            type: string
            enum:
              - '-created_at'
              - created_at
          description: Order results by field (prefix with '-' for descending order)
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedPlanList'
          description: ''
components:
  schemas:
    PaginatedPlanList:
      type: object
      required:
        - count
        - results
      properties:
        count:
          type: integer
          example: 123
        next:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?offset=400&limit=100
        previous:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?offset=200&limit=100
        results:
          type: array
          items:
            $ref: '#/components/schemas/Plan'
    Plan:
      type: object
      properties:
        plan_id:
          type: string
          format: uuid
          description: Unique identifier for the plan
        plan_name:
          type: string
          description: Name of the plan
        description:
          type: string
          nullable: true
          description: Description of the plan
        code:
          type: string
          nullable: true
          description: Code for the plan
        bricks:
          type: array
          items:
            $ref: '#/components/schemas/Brick'
          readOnly: true
          description: Bricks for the plan
      required:
        - bricks
        - code
        - description
        - plan_id
        - plan_name
    Brick:
      type: object
      properties:
        brick_id:
          type: string
          format: uuid
          description: Unique identifier for the brick
        brick_name:
          type: string
          description: Name of the brick
        brick_type:
          enum:
            - SUBSCRIPTION
            - ONE_TIME
            - MILESTONE
            - USAGE
          type: string
          x-spec-enum-id: c660eeda64fa22f1
          description: |-
            Type of the brick

            * `SUBSCRIPTION` - Subscription
            * `ONE_TIME` - One-timePurchase
            * `MILESTONE` - Milestone
            * `USAGE` - Usage
        included_units:
          type: integer
          description: Number of included units in pricing
        min_units:
          type: integer
          description: Minimum units required
        tiers:
          type: array
          items:
            $ref: '#/components/schemas/TierBound'
          description: Tier breakpoints for tiered/volume discount pricing
        blocks:
          type: array
          items:
            $ref: '#/components/schemas/BlockBound'
          description: Block ranges for block pricing
      required:
        - brick_id
        - brick_name
        - brick_type
    TierBound:
      type: object
      properties:
        from:
          type: integer
          description: Start of the tier range
      required:
        - from
    BlockBound:
      type: object
      properties:
        from:
          type: integer
          description: Start of the block range
        to:
          type: integer
          description: End of the block range
      required:
        - from
        - to
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-SALESBRICKS-KEY
      description: API key for authentication

````

## Related topics

- [Creating a Plan](/quickstart-guide/products-plans-bricks/creating-a-plan.md)
- [Role-based access control (RBAC)](/settings/team/rbac.md)
- [BrIQ AI Assistant](/documentation/briq.md)
