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

# List pricing rules of a account schedule

> List pricing rules of a account schedule



## OpenAPI

````yaml get /v2/schedules/{schedule_id}/pricing_rules
openapi: 3.0.3
info:
  version: '1.0'
  title: Togai Apis
  contact:
    email: engg@togai.com
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  description: APIs for Togai App
servers:
  - description: Api endpoint
    url: https://api.togai.com/
  - description: Sandbox api endpoint
    url: https://sandbox-api.togai.com/
security:
  - bearerAuth: []
tags:
  - name: Customers
    description: Customer level calls
  - name: Accounts
    description: Account level calls
  - name: Event Schemas
    description: Event Schema level calls
  - name: Usage Meters
    description: Usage Meter level calls
  - name: Price Plans
    description: (DEPRECATED) Price Plan level calls
  - name: PricePlanV2
    description: Price Plan V2 level calls
  - name: Schedules
    description: Account Schedule level calls
  - name: Pricing Rules
    description: Pricing Rules level calls
  - name: Settings
    description: Settings
  - name: Price Experimentation
    description: Price Experimentation apis
  - name: InvoiceGroups
    description: Invoice Group level calls
  - name: Organization
    description: Organization level calls
  - name: FileStorage
    description: File Storage level calls
  - name: Aliases
    description: Alias level calls
  - name: Reports
    description: Report level calls
  - name: ReportTemplates
    description: Report Template level calls
  - name: Customer Portal
    description: Portal level calls
  - name: Alerts
    description: Alert level calls
  - name: Event Management
    description: APIs for getting events ingested in Togai
    externalDocs:
      description: docs
      url: https://togai.com/docs/billing/events
  - name: Metrics
    description: APIs for getting Togai metrics
    externalDocs:
      description: docs
      url: https://togai.com/docs/metrics
  - name: Licenses
    description: APIs for getting or updating license records in Togai
  - name: Entitlements
    description: APIs related to entitlements
  - name: Invoices
    description: Invoices API
  - name: Credits
    description: Credits API
  - name: Wallet
    description: Wallet API
  - name: InvoiceTemplates
    description: InvoiceTemplates API
  - name: InvoiceSequence
    description: InvoiceSequence API
  - name: Payments
    description: Payments API
  - name: Authentication
    description: Authentication API
externalDocs:
  description: Find out more about Togai
  url: https://docs.togai.com/docs
paths:
  /v2/schedules/{schedule_id}/pricing_rules:
    get:
      tags:
        - Schedules
      summary: List pricing rules of a account schedule
      description: List pricing rules of a account schedule
      operationId: listPricingRules
      parameters:
        - $ref: '#/components/parameters/schedule_id'
        - $ref: '#/components/parameters/rate_card_mode'
      responses:
        '200':
          $ref: '#/components/responses/PricingRulesPaginatedResponse'
        default:
          $ref: '#/components/responses/ErrorResponse'
components:
  parameters:
    schedule_id:
      in: path
      name: schedule_id
      required: true
      schema:
        type: string
        example: sch.20aUyEZSuYq.SoGbS
    rate_card_mode:
      in: query
      name: mode
      required: true
      description: |
        Possible values:
        1. ACTIVE - Get the active rate card
        2. DRAFT - Get the draft rate card
      schema:
        type: string
  responses:
    PricingRulesPaginatedResponse:
      description: Response for create/list pricing rules request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PricingRulesPaginatedResponse'
          examples:
            PricingRulesPaginatedResponse:
              $ref: '#/components/examples/PricingRulesPaginatedResponse'
    ErrorResponse:
      description: Error response
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            ErrorResponse:
              summary: Error message
              value:
                message: <Reason message>
  schemas:
    PricingRulesPaginatedResponse:
      type: object
      required:
        - data
      additionalProperties: false
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/PricingRule'
    ErrorResponse:
      type: object
      additionalProperties: false
      required:
        - message
      properties:
        message:
          type: string
          description: error description
          maxLength: 500
    PricingRule:
      type: object
      description: Represents pricing rules of a price plan. i.e, price plan bound by time.
      additionalProperties: false
      required:
        - id
        - name
        - version
        - order
        - computation
        - action
      properties:
        id:
          type: string
        name:
          type: string
        version:
          type: integer
          format: int32
          minimum: 1
        invoiceTiming:
          $ref: '#/components/schemas/PricingRuleTiming'
        order:
          type: integer
          format: int32
          minimum: 1
        condition:
          description: >-
            JSON logic condition deciding whether to compute this pricing rule
            or not
          type: string
        computation:
          description: JSON logic to be computed
          type: string
        action:
          $ref: '#/components/schemas/PricingRuleAction'
          description: JSON logic to be computed
          title: action
    PricingRuleTiming:
      type: string
      enum:
        - IN_ADVANCE
        - IN_ARREARS
      x-enum-varnames:
        - IN_ADVANCE
        - IN_ARREARS
      description: >
        If IN_ADVANCE, the rule will be applied on rate cards with invoice
        timing IN_ADVANCE .

        If IN_ARREARS, the rule will be applied on rate cards with invoice
        timing IN_ARREARS .
    PricingRuleAction:
      type: object
      additionalProperties: false
      required:
        - type
      properties:
        type:
          type: string
          enum:
            - ADD
            - UPDATE
        target:
          type: string
        id:
          type: string
        description:
          type: string
        metadata:
          type: object
          additionalProperties:
            type: string
  examples:
    PricingRulesPaginatedResponse:
      value:
        data:
          - id: um.1zYnCiM9Bpg.lv25y
            name: Rule 1
            version: 1
            order: 1
            computation: >
              {"+": [{"var": "revenue.urc.um.21lmjsfcXPs.d929R"}, {"var":
              "usage.urc.um.21lmjObpMV6.9XeFl"}]}
            condition: >
              {">": [{"+": [{"var": "revenue.urc.um.21lmjObpMV6.9XeFl"}, {"var":
              "usage.urc.um.21lmjObpMV6.9XeFl"}]}, 100]}
            action:
              type: UPDATE
              target: revenue.ff.addon.21ERXMFJ83s.9EM5S
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Bearer <credential>

````