> ## 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 invoices eligible for bill run

> List invoices eligible for bill run



## OpenAPI

````yaml get /invoices/bill_runs
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:
  /invoices/bill_runs:
    get:
      tags:
        - Invoices
      summary: List invoices eligible for bill run
      description: List invoices eligible for bill run
      operationId: listInvoicesForBillRun
      parameters:
        - $ref: '#/components/parameters/filter_next_page_token'
        - $ref: '#/components/parameters/filter_status'
        - $ref: '#/components/parameters/filter_owner_id'
        - $ref: '#/components/parameters/filter_customer_id'
        - $ref: '#/components/parameters/filter_page_size'
        - $ref: '#/components/parameters/filter_start_time'
        - $ref: '#/components/parameters/filter_end_time'
      responses:
        '200':
          $ref: '#/components/responses/ListInvoicesResponse'
        '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:
    filter_next_page_token:
      in: query
      description: Pagination token used as a marker to get records from next page.
      name: nextToken
      required: false
      schema:
        type: string
        example: >-
          eyJsYXN0SXRlbUlkIjogInN0cmluZyIsICJwYWdlU2l6ZSI6IDEyMywgInNvcnRPcmRlciI6ICJhc2MifQ==
    filter_status:
      in: query
      description: Filter option to filter by status.
      name: status
      required: false
      schema:
        type: string
      examples:
        processed:
          value: PROCESSED
        in_progress:
          value: IN_PROGRESS
    filter_owner_id:
      in: query
      description: Filter option to filter based on owner id.
      name: owner_id
      required: false
      schema:
        type: string
        example: ACC001
    filter_customer_id:
      in: query
      description: Filter option to filter based on customer id.
      name: customer_id
      required: false
      schema:
        type: string
        example: '1234'
    filter_page_size:
      in: query
      description: |-
        Maximum page size expected by client to return the record list. 

         NOTE: Max page size cannot be more than 50. Also 50 is the default page size if no value is provided.
      name: pageSize
      required: false
      schema:
        type: integer
        example: 10
    filter_start_time:
      in: query
      name: start_time
      description: Start time filter in epoch milli seconds
      required: false
      schema:
        type: integer
        format: int64
        example: 1650110402000
    filter_end_time:
      in: query
      name: end_time
      description: End time filter in epoch milli seconds
      required: false
      schema:
        type: integer
        format: int64
        example: 1650110402000
  responses:
    ListInvoicesResponse:
      description: Response for Get invoice requests
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ListInvoicesResponse'
          examples:
            ListInvoicesResponse:
              $ref: '#/components/examples/ListInvoicesResponse'
    ErrorResponse:
      description: Error response
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            ErrorResponse:
              summary: Error message
              value:
                message: <Reason message>
  schemas:
    ListInvoicesResponse:
      description: List invoices response
      type: object
      additionalProperties: false
      required:
        - data
      properties:
        data:
          type: array
          minItems: 0
          maxItems: 50
          items:
            $ref: '#/components/schemas/InvoiceSummary'
        nextToken:
          type: string
          maxLength: 500
          example: >-
            eyJsYXN0SXRlbUlkIjogInN0cmluZyIsICJwYWdlU2l6ZSI6IDEyMywgInNvcnRPcmRlciI6ICJhc2MifQ==
    ErrorResponse:
      type: object
      additionalProperties: false
      required:
        - message
      properties:
        message:
          type: string
          description: error description
          maxLength: 500
    InvoiceSummary:
      description: Structure of invoice response
      type: object
      additionalProperties: false
      required:
        - id
        - status
        - invoiceDate
        - updatedAt
        - invoiceClass
        - invoiceType
        - totalAmount
        - paidAmount
        - netTermDays
      properties:
        id:
          description: Identifier of invoice
          type: string
          maxLength: 50
        customerId:
          type: string
        ownerId:
          type: string
        pricePlanId:
          type: string
        status:
          $ref: '#/components/schemas/InvoicesStatus'
          example: DUE
        finalizingStatus:
          type: string
          enum:
            - FINALIZING
            - FINALIZED
        invoiceClass:
          $ref: '#/components/schemas/InvoicesClass'
          example: INVOICE
        invoiceType:
          $ref: '#/components/schemas/InvoicesType'
          example: STANDARD
        startDate:
          description: Start date of the invoice
          type: string
          format: date-time
          example: '2020-07-04T12:00:00.000Z'
        endDate:
          description: End date of the invoice
          type: string
          format: date-time
          example: '2020-07-04T12:00:00.000Z'
        endDateInclusive:
          description: Inclusive end date of the invoice
          type: string
          format: date-time
          example: '2020-07-03T11:59:59.999Z'
        invoiceDate:
          description: Invoice date of the invoice
          type: string
          format: date-time
          example: '2020-07-04T12:00:00.000Z'
        dueDate:
          description: Due date of the invoice
          type: string
          format: date-time
          example: '2020-07-04T12:00:00.000Z'
        generatedAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        sequenceId:
          type: string
          description: Sequence id of the invoice
        pdfUrl:
          description: Download URL of the pdf file corresponding to the invoice
          type: string
        totalAmount:
          type: number
        paidAmount:
          type: number
        invoiceDetails:
          $ref: '#/components/schemas/InvoiceDetails'
        netTermDays:
          type: integer
          description: >-
            Number of days from the invoice date after which an invoice is
            considered overdue.
    InvoicesStatus:
      description: Status of the invoice
      type: string
      enum:
        - DRAFT
        - DUE
        - PAID
        - VOID
        - UN_COLLECTIBLE
        - REFUND_INITIATED
        - REFUND_COMPLETED
        - MERGED
        - PARTIALLY_PAID
    InvoicesClass:
      description: Represents the class of entity( INVOICE/ORDER/BILLABLE)
      type: string
      enum:
        - INVOICE
        - ORDER
        - BILLABLE
    InvoicesType:
      description: Represents the type of entity(STANDARD/AD_HOC/COMPOSITE)
      type: string
      enum:
        - STANDARD
        - AD_HOC
        - CUSTOM
        - COMPOSITE
        - STANDARD_ADVANCED
        - ADHOC_ADVANCED
    InvoiceDetails:
      type: object
      additionalProperties: false
      properties:
        customer:
          type: object
          additionalProperties: false
          required:
            - name
            - primaryEmail
          properties:
            name:
              type: string
            primaryEmail:
              type: string
            billingAddress:
              type: string
            address:
              $ref: '#/components/schemas/Address'
        account:
          type: object
          additionalProperties: false
          required:
            - name
            - invoiceCurrency
            - address
            - primaryEmail
          properties:
            name:
              type: string
            invoiceCurrency:
              type: string
            address:
              $ref: '#/components/schemas/Address'
            primaryEmail:
              type: string
        pricePlanName:
          type: string
        invoiceGroup:
          type: object
          additionalProperties: false
          required:
            - id
            - name
            - dailyInvoiceConsolidation
            - invoiceCurrency
            - address
          properties:
            id:
              type: string
            name:
              type: string
            email:
              type: string
            dailyInvoiceConsolidation:
              type: boolean
            invoiceCurrency:
              type: string
            address:
              $ref: '#/components/schemas/Address'
        organization:
          type: object
          additionalProperties: false
          required:
            - businessName
            - address
            - primaryEmail
          properties:
            businessName:
              type: string
            address:
              $ref: '#/components/schemas/Address'
            primaryEmail:
              type: string
            metadata:
              type: object
              additionalProperties:
                type: string
        logoUrl:
          type: string
    Address:
      description: billing address of the customer
      type: object
      additionalProperties: false
      properties:
        phoneNumber:
          description: Contact number
          type: string
        line1:
          description: Address line 1 (eg. Street, PO Box, Company Name)
          type: string
        line2:
          description: Address line 2 (eg. apartment, suite, unit or building)
          type: string
        postalCode:
          description: ZIP or postal code
          type: string
        city:
          description: City, district, suburb, town or village
          type: string
        state:
          description: State, county, province or region
          type: string
        country:
          description: >-
            Two letter country code [ISO-3166-1
            Alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)
          type: string
  examples:
    ListInvoicesResponse:
      summary: A sample ListInvoicesResponse
      value:
        data:
          - id: inv.hkgkgyh.ghg
            customerId: 7VcRw9xZDIqsC5E
            ownerId: ACC001
            invoiceClass: INVOICE
            invoiceType: AD_HOC
            status: DUE
            finalizingStatus: FINALIZED
            totalAmount: 100
            paidAmount: 0
            startDate: '2020-07-04T12:00:00.000Z'
            endDate: '2020-07-04T12:00:00.000Z'
            invoiceDate: '2020-07-04T12:00:00.000Z'
            generatedAt: '2020-07-04T12:00:00.000Z'
            updatedAt: '2020-07-04T12:00:00.000Z'
        nextToken: >-
          eyJsYXN0SXRlbUlkIjogInN0cmluZyIsICJwYWdlU2l6ZSI6IDEyMywgInNvcnRPcmRlciI6ICJhc2MifQ==
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Bearer <credential>

````