> ## 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 rule logs

> List pricing rule logs



## OpenAPI

````yaml get /invoice/{invoice_id}/pricing_rules_logs
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:
  /invoice/{invoice_id}/pricing_rules_logs:
    get:
      tags:
        - Invoices
      summary: List pricing rule logs
      description: List pricing rule logs
      operationId: listPricingRuleLogs
      parameters:
        - $ref: '#/components/parameters/invoice_id'
      responses:
        '200':
          $ref: '#/components/responses/PricingRulesLogsPaginatedResponse'
        '400':
          $ref: '#/components/responses/ErrorResponse'
        '401':
          $ref: '#/components/responses/ErrorResponse'
        '403':
          $ref: '#/components/responses/ErrorResponse'
        '404':
          $ref: '#/components/responses/ErrorResponse'
        '429':
          $ref: '#/components/responses/ErrorResponse'
        default:
          $ref: '#/components/responses/ErrorResponse'
components:
  parameters:
    invoice_id:
      in: path
      name: invoice_id
      required: true
      schema:
        type: string
        example: ACC001
  responses:
    PricingRulesLogsPaginatedResponse:
      description: Response for list Invoice Pricing Rules Logs Request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PricingRulesLogsPaginatedResponse'
          examples:
            PricingRulesLogsPaginatedResponse:
              $ref: '#/components/examples/PricingRulesLogsPaginatedResponse'
    ErrorResponse:
      description: Error response
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            ErrorResponse:
              summary: Error message
              value:
                message: <Reason message>
  schemas:
    PricingRulesLogsPaginatedResponse:
      description: Pricing Rules Logs response
      type: object
      additionalProperties: false
      required:
        - data
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/PricingRulesLog'
    ErrorResponse:
      type: object
      additionalProperties: false
      required:
        - message
      properties:
        message:
          type: string
          description: error description
          maxLength: 500
    PricingRulesLog:
      description: Pricing Rules Logs
      type: object
      additionalProperties: false
      required:
        - id
        - order
        - changes
      properties:
        id:
          type: string
        type:
          type: string
          enum:
            - CONDITION_TRUE
            - CONDITION_FALSE
            - CONDITION_ERROR
            - COMPUTATION_ERROR
        order:
          type: integer
          format: int32
        changes:
          $ref: '#/components/schemas/PricingRuleChangesLog'
        rule:
          $ref: '#/components/schemas/PricingRuleInfo'
        variablesValue:
          type: object
          nullable: true
          additionalProperties:
            $ref: '#/components/schemas/PricingRulesValues'
    PricingRuleChangesLog:
      description: Pricing Rules Logs Changes
      type: object
      additionalProperties: false
      required:
        - key
        - oldRevenue
        - newRevenue
      properties:
        key:
          type: string
        keyName:
          type: string
        oldRevenue:
          type: number
        newRevenue:
          type: number
        oldUsage:
          type: number
        newUsage:
          type: number
        errorMessage:
          type: string
    PricingRuleInfo:
      description: Pricing Rule Info
      type: object
      additionalProperties: false
      required:
        - id
      properties:
        id:
          type: string
        name:
          type: string
        condition:
          type: string
        computation:
          type: string
    PricingRulesValues:
      title: PricingRulesValues
      type: object
      properties:
        name:
          type: string
        value:
          type: string
  examples:
    PricingRulesLogsPaginatedResponse:
      summary: A sample PricingRulesLogsPaginatedResponse
      value:
        data:
          - id: rule_log.21x6RLQxnpg.1DHMH
            ruleId: pp_rule.21wpdBGbhRI.L26uj
            order: 1
            changes:
              key: urc.um.21wpFfFWtw0.PDfXy
              oldUsage: 100
              newUsage: 200
              oldRevenue: 200
              newRevenue: 400
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Bearer <credential>

````