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

# Get Invoices

> GetInvoices returns a paginated list of invoices for the given Organisation. The query parameters `from` and `to` can be used to filter the invoices returned. If no query parameters are provided, this endpoint will return the upcoming invoice. If to is not provided, it will default to the current date. If from is not provided, it will default to a calendar month before the current date.



## OpenAPI

````yaml /openapi/organisations-api-v1.yaml get /organisations/{organisation_id}/billing/invoices
openapi: 3.1.0
info:
  title: Organisations API
  description: >-
    The Organisations API provides users the ability to manage their
    organisations.
  version: v1
servers:
  - url: https://platform.versori.com/api/organisations/v1
    description: Production server
  - url: http://localhost:8081/v1
    description: Localhost
security: []
tags:
  - name: organisations
    description: >
      Organisations is the root-level entity for the Versori platform. All
      resources are scoped under an Organisation,

      each Organisation has an owner and can have multiple members.
  - name: signing-keys
    description: >
      Signing keys are used to sign JWTs which can be used to authenticate
      requests to the Versori platform.
paths:
  /organisations/{organisation_id}/billing/invoices:
    parameters:
      - $ref: '#/components/parameters/organisation_id'
      - $ref: '#/components/parameters/from'
      - $ref: '#/components/parameters/to'
    get:
      summary: Get Invoices
      description: >-
        GetInvoices returns a paginated list of invoices for the given
        Organisation. The query parameters `from` and `to` can be used to filter
        the invoices returned. If no query parameters are provided, this
        endpoint will return the upcoming invoice. If to is not provided, it
        will default to the current date. If from is not provided, it will
        default to a calendar month before the current date.
      operationId: GetInvoices
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Invoice'
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  parameters:
    organisation_id:
      name: organisation_id
      in: path
      x-go-name: OrganisationID
      required: true
      schema:
        type: string
    from:
      name: from
      in: query
      x-go-name: From
      schema:
        type: string
        format: date
    to:
      name: to
      in: query
      x-go-name: To
      schema:
        type: string
        format: date
  schemas:
    Invoice:
      type: object
      properties:
        invoiceStartDate:
          type: string
          format: date
        invoiceEndDate:
          type: string
          format: date
        totalAmount:
          $ref: '#/components/schemas/MonetaryValue'
        invoiceURL:
          type: string
          format: uri
        productBreakdowns:
          type: array
          items:
            $ref: '#/components/schemas/ProductBreakdown'
        usageStatistics:
          type: object
          x-go-type: map[string]int
          additionalProperties:
            type: integer
        metaData:
          type: object
          x-go-type: map[string]any
          additionalProperties:
            type: string
      required:
        - invoiceStartDate
        - invoiceEndDate
        - totalAmount
        - currencyCode
        - invoiceURL
    Error:
      type: object
      properties:
        code:
          type: string
          description: Code is a machine-readable error code.
        message:
          type: string
          description: Message is a human-readable error message.
        cause:
          type: string
          x-go-type-skip-optional-pointer: true
      required:
        - code
        - message
    MonetaryValue:
      type: object
      description: >-
        MonetaryValue is a monetary value, i.e. £12.50. It is represented as a
        whole number integral and a fractional part. The integral part is the
        whole number of pounds, dollars, ... and the fractional part is the
        number of pence, cents, ..., in the value. The isNegative property
        denotes if the value is negative.
      properties:
        isNegative:
          type: boolean
        currencyCode:
          type: string
          enum:
            - GBP
            - USD
            - EUR
          description: >-
            CurrencyCode is the ISO 4217 currency code for the currency used in
            the monetary value, i.e. "GBP".
        integral:
          description: >-
            Integral is the whole number part of the monetary value, i.e. 12 for
            £12.50.
          type: integer
          x-go-type: int64
        fractional:
          description: >-
            Fractional is the fractional part of the monetary value, i.e. 50 for
            £12.50.
          type: integer
          x-go-type: int64
      required:
        - integral
        - fractional
        - currencyCode
        - isNegative
    ProductBreakdown:
      type: object
      properties:
        productName:
          type: string
        quantity:
          type: integer
        total:
          $ref: '#/components/schemas/MonetaryValue'
      required:
        - productName
        - quantity
        - total

````