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

# Get Pricing Modules

> Retrieve all pricing modules, or filter by pricing template code or specific pricing module ID. Use `exceptSubtree` to exclude a pricing module and its descendants when picking a parent to avoid circular references.



## OpenAPI

````yaml POST /billspree/tariffs/get-tariffs
openapi: 3.1.0
info:
  title: Billspree API
  description: REST API for Billspree — billing, AR management, and workspace operations.
  version: 1.0.0
servers:
  - url: https://{workspace}.spreesuite.com
    variables:
      workspace:
        default: your-workspace
        description: Your organization's subdomain (e.g. demo → demo.spreesuite.com)
security:
  - apiKeyAuth: []
paths:
  /billspree/tariffs/get-tariffs:
    post:
      tags:
        - Pricing Modules
      summary: Get Pricing Modules
      description: >-
        Retrieve all pricing modules, or filter by pricing template code or
        specific pricing module ID. Use `exceptSubtree` to exclude a pricing
        module and its descendants when picking a parent to avoid circular
        references.
      operationId: getTariffs
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetTariffsRequest'
            example:
              method: Retrieve
              action: Retrieve Plans
              apiVersion: v2
              serviceCode: null
              tariffID: null
              exceptSubtree: null
      responses:
        '200':
          description: Plans retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetTariffsResponse'
              example:
                success: true
                statusCode: 200
                message: Request Succeeded.
                error: null
                data:
                  tariffs:
                    - tariffID: 1
                      tariffCode: DemoPlan
                      uniqueLabel: DemoPlan
                      label: Demo Plan
                      description: null
                      serviceCode: DEMO-001
                      parentTariffCode: null
                      securityAttributes: []
                      connCount: 1
components:
  schemas:
    GetTariffsRequest:
      type: object
      required:
        - method
        - action
        - apiVersion
      properties:
        method:
          type: string
          description: Always `"Retrieve"`
          example: Retrieve
        action:
          type: string
          description: Always `"Retrieve Plans"`
          example: Retrieve Plans
        apiVersion:
          type: string
          description: Always `"v2"`
          example: v2
        serviceCode:
          type: string
          nullable: true
          description: >-
            Filter by pricing template code — `null` returns all plans across
            all templates
        tariffID:
          type: integer
          nullable: true
          description: Fetch a specific plan by its ID
        exceptSubtree:
          type: integer
          nullable: true
          description: >-
            Exclude a plan and all its descendants — used when selecting a
            parent plan to avoid circular references
    GetTariffsResponse:
      type: object
      properties:
        success:
          type: boolean
        statusCode:
          type: integer
        message:
          type: string
        error:
          nullable: true
        data:
          type: object
          properties:
            tariffs:
              type: array
              items:
                $ref: '#/components/schemas/TariffSummary'
    TariffSummary:
      type: object
      properties:
        tariffID:
          type: integer
          description: Internal unique ID of the plan
        tariffCode:
          type: string
          description: User-defined unique code for the plan
        uniqueLabel:
          type: string
          description: Workspace-wide unique label — used for plan linking across templates
        label:
          type: string
          description: Display name of the plan
        description:
          type: string
          nullable: true
          description: Description
        serviceCode:
          type: string
          description: The pricing template this plan belongs to
        parentTariffCode:
          type: string
          nullable: true
          description: Parent plan code if this plan inherits from another
        securityAttributes:
          type: array
          description: Access control attributes
          items: {}
        connCount:
          type: integer
          description: Number of active subscriptions on this plan
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        Auth token returned from the login endpoint. Send as: `Authorization:
        <token>` (no Bearer prefix)

````