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

# Retrieve a charge filter

> This endpoint retrieves a specific filter for a charge.



## OpenAPI

````yaml GET /plans/{code}/charges/{charge_code}/filters/{filter_id}
openapi: 3.1.0
info:
  title: Lago API documentation
  description: >-
    Lago API allows your application to push customer information and metrics
    (events) from your application to the billing application.
  version: 1.45.2
  license:
    name: AGPLv3
    url: https://github.com/getlago/lago-openapi/blob/main/LICENSE
  contact:
    email: tech@getlago.com
servers:
  - url: https://api.getlago.com/api/v1
    description: US Lago cluster
  - url: https://api.eu.getlago.com/api/v1
    description: EU Lago cluster
security:
  - bearerAuth: []
tags:
  - name: activity_logs
    description: Everything about Activity logs
    externalDocs:
      description: Find out more
      url: https://getlago.com/docs/api-reference/audit-logs/activity-logs-object
  - name: analytics
    description: Everything about Analytics
  - name: api_logs
    description: Everything about API logs
    externalDocs:
      description: Find out more
      url: https://getlago.com/docs/api-reference/audit-logs/api-logs-object
  - name: billable_metrics
    description: Everything about Billable metric collection
    externalDocs:
      description: Find out more
      url: https://getlago.com/docs/api-reference/billable-metrics/object
  - name: features
    description: Everything about Feature collection
    externalDocs:
      description: Find out more
      url: >-
        https://getlago.com/docs/api-reference/entitlements/features/feature-object
  - name: entitlements
    description: Everything about Entitlement collection
    externalDocs:
      description: Find out more
      url: >-
        https://getlago.com/docs/api-reference/entitlements/plan-entitlements/plan-entitlement-object
  - name: billing_entities
    description: Everything about Billing Entities
    externalDocs:
      description: Find out more
      url: https://getlago.com/docs/api-reference/billing-entities/object
  - name: customers
    description: Everything about Customer collection
    externalDocs:
      description: Find out more
      url: https://getlago.com/docs/api-reference/customers/object
  - name: plans
    description: Everything about Plan collection
    externalDocs:
      description: Find out more
      url: https://getlago.com/docs/api-reference/plans/object
  - name: subscriptions
    description: Everything about Subscription collection
    externalDocs:
      description: Find out more
      url: https://getlago.com/docs/api-reference/subscriptions/subscription-object
  - name: events
    description: Everything about Event collection
    externalDocs:
      description: Find out more
      url: https://getlago.com/docs/api-reference/events/event-object
  - name: organizations
    description: Everything about Organization collection
    externalDocs:
      description: Find out more
      url: https://getlago.com/docs/api-reference/organizations/organization-object
  - name: taxes
    description: Everything about Tax collection
    externalDocs:
      description: Find out more
      url: https://getlago.com/docs/api-reference/taxes/tax-object
  - name: coupons
    description: Everything about Coupon collection
    externalDocs:
      description: Find out more
      url: https://getlago.com/docs/api-reference/coupons/coupon-object
  - name: add_ons
    description: Everything about Add-on collection
    externalDocs:
      description: Find out more
      url: https://getlago.com/docs/api-reference/add-ons/add-on-object
  - name: fees
    description: Everything about Fees
    externalDocs:
      description: Find out more
      url: >-
        https://getlago.com/docs/api-reference/invoices/invoice-object#fee-object
  - name: invoices
    description: Everything about Invoice collection
    externalDocs:
      description: Find out more
      url: https://getlago.com/docs/api-reference/invoices/invoice-object
  - name: wallets
    description: Everything about Wallet collection
    externalDocs:
      description: Find out more
      url: https://getlago.com/docs/api-reference/wallets/wallet-object
  - name: credit_notes
    description: Everything about Credit notes collection
    externalDocs:
      description: Find out more
      url: https://getlago.com/docs/api-reference/credit-notes/credit-note-object
  - name: webhooks
    description: Everything about Webhooks
    externalDocs:
      description: Find out more
      url: >-
        https://getlago.com/docs/api-reference/webhooks/format---signature#1-retrieve-the-public-key
  - name: webhook_endpoints
    description: Everything about Webhook Endpoints
    externalDocs:
      description: Find out more
      url: >-
        https://getlago.com/docs/api-reference/webhook-endpoints/webhook-endpoint-object
  - name: payment_receipts
    description: Everything about Payment receipts
    externalDocs:
      description: Find out more
      url: >-
        https://getlago.com/docs/api-reference/payment-receipts/payment-receipt-object
  - name: payment_requests
    description: Everything about PaymentRequests
    externalDocs:
      description: Find out more
      url: >-
        https://getlago.com/docs/api-reference/payment-requests/payment-request-object
  - name: payments
    description: Everything about Payments
    externalDocs:
      description: Find out more
      url: https://getlago.com/docs/api-reference/payments/payment-object
  - name: payment_methods
    description: Everything about Payment Methods
    externalDocs:
      description: Find out more
      url: >-
        https://getlago.com/docs/api-reference/payment-methods/payment-method-object
externalDocs:
  description: Lago Github
  url: https://github.com/getlago
paths:
  /plans/{code}/charges/{charge_code}/filters/{filter_id}:
    parameters:
      - $ref: '#/components/parameters/plan_code'
      - $ref: '#/components/parameters/charge_code'
      - $ref: '#/components/parameters/charge_filter_id'
    get:
      tags:
        - plans
      summary: Retrieve a charge filter
      description: This endpoint retrieves a specific filter for a charge.
      operationId: findPlanChargeFilter
      responses:
        '200':
          description: Charge filter
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChargeFilterResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  parameters:
    plan_code:
      name: code
      in: path
      description: Code of the existing plan.
      required: true
      schema:
        type: string
        example: startup
    charge_code:
      name: charge_code
      in: path
      description: Code of the existing charge.
      required: true
      schema:
        type: string
        example: api_requests_charge
    charge_filter_id:
      name: filter_id
      in: path
      description: Unique identifier of the charge filter.
      required: true
      schema:
        type: string
        format: uuid
        example: 1a901a90-1a90-1a90-1a90-1a901a901a90
  schemas:
    ChargeFilterResponse:
      type: object
      required:
        - filter
      properties:
        filter:
          $ref: '#/components/schemas/ChargeFilterFullObject'
    ChargeFilterFullObject:
      type: object
      description: >-
        Charge filter values used to apply differentiated pricing based on
        additional event properties.
      required:
        - lago_id
        - charge_code
        - invoice_display_name
        - properties
        - values
      properties:
        lago_id:
          type: string
          format: uuid
          description: Unique identifier of the charge filter, created by Lago.
          example: 1a901a90-1a90-1a90-1a90-1a901a901a90
        charge_code:
          type: string
          description: Unique code identifying the charge this filter belongs to.
          example: api_requests_charge
        invoice_display_name:
          type:
            - string
            - 'null'
          description: >-
            Specifies the name that will be displayed on an invoice. If no value
            is set for this field, the values of the filter will be used as the
            default display name.
          example: AWS
        properties:
          $ref: '#/components/schemas/ChargeProperties'
          description: List of all thresholds utilized for calculating the charge.
        values:
          type: object
          description: >-
            List of possible filter values. The key and values must match one of
            the billable metric filters.
          additionalProperties:
            type: array
            items:
              type: string
          example:
            region:
              - us-east-1
    ApiErrorUnauthorized:
      type: object
      required:
        - status
        - error
      properties:
        status:
          type: integer
          format: int32
          example: 401
        error:
          type: string
          example: Unauthorized
    ApiErrorNotFound:
      type: object
      required:
        - status
        - error
        - code
      properties:
        status:
          type: integer
          format: int32
          example: 404
        error:
          type: string
          example: Not Found
        code:
          type: string
          example: object_not_found
    ChargeProperties:
      type: object
      properties:
        grouped_by:
          type: array
          description: >-
            The list of event properties that are used to group the events on
            the invoice for a `standard` charge model.

            **DEPRECATED** Replaced by `pricing_group_keys`.
          items:
            type: string
          example:
            - agent_name
          deprecated: true
        pricing_group_keys:
          type: array
          description: >-
            The list of event properties that are used to group the events on
            the invoice.
          items:
            type: string
          example:
            - agent_name
        graduated_ranges:
          type: array
          description: >-
            Graduated ranges, sorted from bottom to top tiers, used for a
            `graduated` charge model.
          items:
            type: object
            required:
              - from_value
              - to_value
              - flat_amount
              - per_unit_amount
            properties:
              from_value:
                type: integer
                description: >-
                  Specifies the lower value of a tier for a `graduated` charge
                  model. It must be either 0 or the previous range's `to_value +
                  1` to maintain the proper sequence of values.
                example: 0
              to_value:
                type:
                  - integer
                  - 'null'
                description: >-
                  Specifies the highest value of a tier for a `graduated` charge
                  model.

                  - This value must be higher than the from_value of the same
                  tier.

                  - This value must be null for the last tier.
                example: 10
              flat_amount:
                type: string
                pattern: ^[0-9]+.?[0-9]*$
                description: >-
                  The flat amount for a whole tier, excluding tax, for a
                  `graduated` charge model. It is expressed as a decimal value.
                example: '10'
              per_unit_amount:
                type: string
                pattern: ^[0-9]+.?[0-9]*$
                description: >-
                  The unit price, excluding tax, for a specific tier of a
                  `graduated` charge model. It is expressed as a decimal value.
                example: '0.5'
        graduated_percentage_ranges:
          type: array
          description: >-
            Graduated percentage ranges, sorted from bottom to top tiers, used
            for a `graduated_percentage` charge model.
          items:
            type: object
            required:
              - from_value
              - to_value
              - rate
              - flat_amount
            properties:
              from_value:
                type: integer
                description: >-
                  Specifies the lower value of a tier for a
                  `graduated_percentage` charge model. It must be either 0 or
                  the previous range's `to_value + 1` to maintain the proper
                  sequence of values.
                example: 0
              to_value:
                type:
                  - integer
                  - 'null'
                description: >-
                  Specifies the highest value of a tier for a
                  `graduated_percentage` charge model.

                  - This value must be higher than the from_value of the same
                  tier.

                  - This value must be null for the last tier.
                example: 10
              rate:
                type: string
                format: ^[0-9]+.?[0-9]*$
                description: >-
                  The percentage rate that is applied to the amount of each
                  transaction in the tier for a `graduated_percentage` charge
                  model. It is expressed as a decimal value.
                example: '1'
              flat_amount:
                type: string
                format: ^[0-9]+.?[0-9]*$
                description: >-
                  The flat amount for a whole tier, excluding tax, for a
                  `graduated_percentage` charge model. It is expressed as a
                  decimal value.
                example: '10'
        amount:
          type: string
          pattern: ^[0-9]+.?[0-9]*$
          description: >-
            - The unit price, excluding tax, for a `standard` charge model. It
            is expressed as a decimal value.

            - The amount, excluding tax, for a complete set of units in a
            `package` charge model. It is expressed as a decimal value.
          example: '30'
        free_units:
          type: integer
          description: >-
            The quantity of units that are provided free of charge for each
            billing period in a `package` charge model. This field specifies the
            number of units that customers can use without incurring any
            additional cost during each billing cycle.
          example: 100
        package_size:
          type: integer
          description: >-
            The quantity of units included in each pack or set for a `package`
            charge model. It indicates the number of units that are bundled
            together as a single package or set within the pricing structure.
          example: 1000
        rate:
          type: string
          pattern: ^[0-9]+.?[0-9]*$
          description: >-
            The percentage rate that is applied to the amount of each
            transaction for a `percentage` charge model. It is expressed as a
            decimal value.
          example: '1'
        fixed_amount:
          type: string
          pattern: ^[0-9]+.?[0-9]*$
          description: >-
            The fixed fee that is applied to each transaction for a `percentage`
            charge model. It is expressed as a decimal value.
          example: '0.5'
        free_units_per_events:
          type:
            - integer
            - 'null'
          description: >-
            The count of transactions that are not impacted by the `percentage`
            rate and fixed fee in a percentage charge model. This field
            indicates the number of transactions that are exempt from the
            calculation of charges based on the specified percentage rate and
            fixed fee.
          example: 5
        free_units_per_total_aggregation:
          type:
            - string
            - 'null'
          pattern: ^[0-9]+.?[0-9]*$
          description: >-
            The transaction amount that is not impacted by the `percentage` rate
            and fixed fee in a percentage charge model. This field indicates the
            portion of the transaction amount that is exempt from the
            calculation of charges based on the specified percentage rate and
            fixed fee.
          example: '500'
        per_transaction_max_amount:
          type:
            - string
            - 'null'
          format: ^[0-9]+.?[0-9]*$
          description: >-
            Specifies the maximum allowable spending for a single transaction.
            Working as a transaction cap.
          example: '3.75'
        per_transaction_min_amount:
          type:
            - string
            - 'null'
          format: ^[0-9]+.?[0-9]*$
          description: >-
            Specifies the minimum allowable spending for a single transaction.
            Working as a transaction floor.
          example: '1.75'
        volume_ranges:
          type: array
          description: >-
            Volume ranges, sorted from bottom to top tiers, used for a `volume`
            charge model.
          items:
            type: object
            required:
              - from_value
              - to_value
              - flat_amount
              - per_unit_amount
            properties:
              from_value:
                type: integer
                description: >-
                  Specifies the lower value of a tier for a `volume` charge
                  model. It must be either 0 or the previous range's `to_value +
                  1` to maintain the proper sequence of values.
                example: 0
              to_value:
                type:
                  - integer
                  - 'null'
                description: >-
                  Specifies the highest value of a tier for a `volume` charge
                  model.

                  - This value must be higher than the `from_value` of the same
                  tier.

                  - This value must be `null` for the last tier.
                example: 10
              flat_amount:
                type: string
                pattern: ^[0-9]+.?[0-9]*$
                description: >-
                  The flat amount for a whole tier, excluding tax, for a
                  `volume` charge model. It is expressed as a decimal value.
                example: '10'
              per_unit_amount:
                type: string
                pattern: ^[0-9]+.?[0-9]*$
                description: >-
                  The unit price, excluding tax, for a specific tier of a
                  `volume` charge model. It is expressed as a decimal value.
                example: '0.5'
  responses:
    Unauthorized:
      description: Unauthorized error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorUnauthorized'
    NotFound:
      description: Not Found error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorNotFound'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````