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

# Get billing rule by token

> Return a BillingRule.



## OpenAPI

````yaml https://api.vantage.sh/v2/oas_v3.json get /billing_rules/{billing_rule_token}
openapi: 3.0.1
info:
  title: Vantage
  description: Vantage API
  termsOfService: https://www.vantage.sh/terms-of-use
  contact:
    name: Vantage Support
    url: https://www.vantage.sh
    email: support@vantage.sh
  version: 2.0.0
servers:
  - url: https://api.vantage.sh/v2
security:
  - oauth2:
      - read
tags:
  - name: AccessGrants
    description: Operations about AccessGrants
  - name: AnomalyAlerts
    description: Operations about AnomalyAlerts
  - name: AnomalyNotifications
    description: Operations about AnomalyNotifications
  - name: AuditLogs
    description: Operations about AuditLogs
  - name: BillingProfiles
    description: Operations about BillingProfiles
  - name: BillingRules
    description: Operations about BillingRules
  - name: BudgetAlerts
    description: Operations about BudgetAlerts
  - name: Budgets
    description: Operations about Budgets
  - name: BusinessMetrics
    description: Operations about BusinessMetrics
  - name: Canvases
    description: Operations about Canvases
  - name: CostAlertEvents
    description: Operations about CostAlertEvents
  - name: CostAlerts
    description: Operations about CostAlerts
  - name: CostProvider
    description: Operations about CostProviders
  - name: CostProviderAccounts
    description: Operations about CostProviderAccounts
  - name: Costs
    description: Operations about Costs
  - name: CostService
    description: Operations about CostServices
  - name: Dashboards
    description: Operations about Dashboards
  - name: DataExports
    description: Operations about DataExports
  - name: ExchangeRates
    description: Operations about ExchangeRates
  - name: FinancialCommitmentReports
    description: Operations about FinancialCommitmentReports
  - name: FinancialCommitments
    description: Operations about FinancialCommitments
  - name: Folders
    description: Operations about Folders
  - name: Integrations
    description: Operations about Integrations
  - name: Invoices
    description: Operations about Invoices
  - name: KubernetesEfficiencyReports
    description: Operations about KubernetesEfficiencyReports
  - name: ManagedAccounts
    description: Operations about ManagedAccounts
  - name: Me
    description: Operations about Mes
  - name: NetworkFlowReports
    description: Operations about NetworkFlowReports
  - name: OpenAPISpecification
    description: Operations about OpenAPISpecifications
  - name: Ping
    description: Operations about Pings
  - name: Prices
    description: Operations about Prices
  - name: Recommendations
    description: Operations about Recommendations
  - name: RecommendationViews
    description: Operations about RecommendationViews
  - name: ReportNotifications
    description: Operations about ReportNotifications
  - name: ResourceReports
    description: Operations about ResourceReports
  - name: Resources
    description: Operations about Resources
  - name: SavedFilters
    description: Operations about SavedFilters
  - name: Segments
    description: Operations about Segments
  - name: Tags
    description: Operations about Tags
  - name: Teams
    description: Operations about Teams
  - name: UnitCosts
    description: Operations about UnitCosts
  - name: UserFeedback
    description: Operations about UserFeedbacks
  - name: Users
    description: Operations about Users
  - name: VirtualTags
    description: Operations about VirtualTags
  - name: Workspaces
    description: Operations about Workspaces
paths:
  /billing_rules/{billing_rule_token}:
    get:
      tags:
        - BillingRules
      summary: Get billing rule by token
      description: Return a BillingRule.
      operationId: getBillingRule
      parameters:
        - name: billing_rule_token
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BillingRule'
              example:
                token: bllng_rule_a2708f17b2d3fb0e
                title: Exclude Reserved Instance Fees
                type: Exclusion
                created_by_token: usr_d253a52c80171514
                created_at: '2024-07-02T15:26:50Z'
                charge_type: Reserved Instance Fees
        '404':
          description: NotFound
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
      security:
        - oauth2:
            - read
components:
  schemas:
    BillingRule:
      required:
        - apply_to_all
        - created_at
        - created_by_token
        - title
        - token
        - type
      type: object
      properties:
        token:
          type: string
          nullable: false
        title:
          type: string
          description: The title of the BillingRule.
          nullable: false
          example: Credit for Unused EC2 Instances
        type:
          type: string
          description: The type of the BillingRule.
          nullable: false
          example: credit
        start_date:
          type: string
          description: The start date of the BillingRule.
          nullable: true
          example: '2024-06-28T00:00:00Z'
        end_date:
          type: string
          description: The end date of the BillingRule.
          nullable: true
          example: '2024-06-28T00:00:00Z'
        apply_to_all:
          type: boolean
          description: Whether the BillingRule applies to all future managed accounts.
          nullable: true
          example: true
        created_by_token:
          type: string
          description: The token of the Creator of the BillingRule.
          nullable: false
          example: usr_1234
        created_at:
          type: string
          description: >-
            The date and time, in UTC, the BillingRule was created. ISO 8601
            Formatted.
          nullable: false
          example: '2024-06-28T00:00:00Z'
        service:
          type: string
          description: The service for the BillingRule (Charge).
          nullable: true
          example: AWS Cloudfront
        category:
          type: string
          description: The category for the BillingRule (Charge).
          nullable: true
          example: MSP Fee
        percentage:
          type: string
          description: The percentage of the cost shown for the BillingRule (Adjustment).
          nullable: true
          example: '75.0'
        charge_type:
          type: string
          description: The charge type for the BillingRule.
          nullable: true
          example: RIFee
        sub_category:
          type: string
          description: The subcategory for the BillingRule (Charge).
          nullable: true
          example: One-time
        start_period:
          type: string
          description: The start period for the BillingRule (Charge).
          nullable: true
          example: '2024-05-01'
        amount:
          type: string
          description: The amount for the BillingRule (Charge).
          nullable: true
          example: '5000.25'
        sql_query:
          type: string
          description: The SQL query for the BillingRule (Custom).
          nullable: true
          example: UPDATE costs SET costs.amount = costs.amount * 0.95
      description: BillingRule model
    Errors:
      required:
        - errors
      type: object
      properties:
        links:
          $ref: '#/components/schemas/Links'
        errors:
          type: array
          nullable: false
          items:
            type: string
      description: Errors model
    Links:
      type: object
      properties:
        self:
          type: string
          description: The URL of the current page of results.
          nullable: true
        first:
          type: string
          description: The URL of the first page of results.
          nullable: true
        next:
          type: string
          description: The URL of the next page of results, if one exists.
          nullable: true
        last:
          type: string
          description: The URL of the last page of results, if one exists.
          nullable: true
        prev:
          type: string
          description: The URL of the previous page of results, if one exists.
          nullable: true
  securitySchemes:
    oauth2:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: https://console.vantage.sh/account/profile
          scopes:
            read: Grants read access
            write: Grants write access

````