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

# List available expenses

> Gets a list of expense invoices imported into the system for your company.



## OpenAPI

````yaml /openapi/openapi.json get /expenses
openapi: 3.1.0
info:
  title: OpenAPI
  version: '1.0'
  summary: OpenApi
  contact:
    name: Altera Support
    url: https://altera.co
    email: wsparcie@altera.co
  description: ''
  license:
    url: https://altera.co/regulamin
    name: Terms of services for Altera.app
servers:
  - url: https://api.altera.co
    description: Production endpoint (proxied)
security:
  - Authorization: []
tags:
  - name: Configuration
  - name: Data export
  - name: Expenses
  - name: Sales
paths:
  /expenses:
    parameters: []
    get:
      tags:
        - Expenses
      summary: List available expenses
      description: >-
        Gets a list of expense invoices imported into the system for your
        company.
      operationId: get-expenses-list
      parameters:
        - schema:
            type: string
            default: '20'
            enum:
              - '10'
              - '20'
              - '50'
              - '100'
          in: query
          name: documentsPerPage
          description: Defines the amount of invoices polled per page
        - schema:
            type: string
          in: query
          name: pageNumber
          description: Defines the page we want to poll
        - schema:
            type: string
            enum:
              - INVOICE_NUMBER
              - ISSUE_DATE
              - SALE_DATE
              - DUE_DATE
              - AMOUNT_GROSS
              - CONTRACTOR_NAME
            example: ISSUE_DATE
          in: query
          name: sortBy
        - schema:
            type: string
            enum:
              - ASC
              - DESC
            example: DESC
          in: query
          name: order
        - schema:
            type: string
          in: query
          name: searchPhrase
          description: >-
            Freetext search over concatenated fields InvoiceNumber,
            ContractorName, ContractorTIN and ContractorCity
        - schema:
            type: string
          in: query
          name: contractorName
        - schema:
            type: array
            enum:
              - SALES
              - PRO_FORMA
              - INTERIM
              - INTERIM_FINAL
              - CORRECTION
            example: INTERIM
            uniqueItems: true
          in: query
          name: invoiceType
          style: pipeDelimited
        - schema:
            type: string
            enum:
              - PAID
              - UNPAID
              - OVERDUE
            example: OVERDUE
          in: query
          name: paymentStatus
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                x-examples:
                  Example 1:
                    result: OK
                    data:
                      expenses:
                        - modelType: PROCESSED_EXPENSE
                          readOnly: false
                          basicInformation:
                            invoiceId: 18
                            invoiceType: SALES
                            invoiceNumber: 2/1/2022
                            year: 2022
                            month: 6
                            invoiceNumberInPeriod: 2
                            statusId: SENT
                            isReceipt: false
                            isRelated: false
                            netPrice: 8500
                            grossPrice: 10455
                            currency: PLN
                            exchangeRate: 1
                            vatPLN: 1955
                            issueDate: '2022-06-16T00:00:00.000Z'
                            saleDate: '2022-06-27T00:00:00.000Z'
                            uploadDate: '2022-03-24T14:26:17.000Z'
                            relatedInvoicesIds: []
                            priceTypeId: NET
                            paymentGenerationStatus: ACCEPTED
                          contractor:
                            contractorName: Altera sp. z o.o.
                            contractorId: 25
                            taxIdentificationNumber: '7010978165'
                            country: PL
                            contractorType: COMPANY
                            contractorRegion: POLAND
                            defaultCurrency: PLN
                            city: Bydgoszcz
                            street: ul. Grunwaldzka
                            houseNumber: '4'
                            postCode: 85-236
                          buyer:
                            taxIdentificationNumber: '9671391067'
                            contractorName: ITKO Łukasz Kowalski
                          seller:
                            contractorName: Altera sp. z o.o.
                            contractorId: 25
                            taxIdentificationNumber: '7010978165'
                            country: PL
                            contractorType: COMPANY
                            contractorRegion: POLAND
                            defaultCurrency: PLN
                            city: Bydgoszcz
                            street: ul. Grunwaldzka
                            houseNumber: '4'
                            postCode: 85-236
                          payments:
                            paymentMethod: TRANSFER
                            dueDate: '2022-07-11T00:00:00.000Z'
                            isSplitPayment: false
                            isPaid: false
                            bankAccountNumber: PL78114020040000360280396856
                          invoicePosition: []
                          costCenterPerItem: false
                          additionalDetails: Usługi księgowe Koszty ogólne
                          accounting:
                            accountingDate: '2022-09-16T00:00:00.000Z'
                            receiptDate: '2022-09-23T00:00:00.000Z'
                            vatProcedures: []
                            registrationPlate: ''
                            isSubjectToVat: false
                            activeVat: false
                            bufferOnly: false
                      pagesAmount: '1'
                      sumGross: '10455.00'
                      sumNet: '8500.00'
                properties:
                  result:
                    type: string
                  data:
                    type: object
                    properties:
                      expenses:
                        type: array
                        items:
                          $ref: '#/components/schemas/Invoice'
                      pagesAmount:
                        type: string
                      sumGross:
                        type: string
                      sumNet:
                        type: string
              examples:
                Example 1:
                  value:
                    result: OK
                    data:
                      expenses:
                        - modelType: PROCESSED_EXPENSE
                          readOnly: false
                          basicInformation:
                            invoiceId: 18
                            invoiceType: SALES
                            invoiceNumber: 2/1/2022
                            year: 2022
                            month: 6
                            invoiceNumberInPeriod: 2
                            statusId: SENT
                            isReceipt: false
                            isRelated: false
                            netPrice: 8500
                            grossPrice: 10455
                            currency: PLN
                            exchangeRate: 1
                            vatPLN: 1955
                            issueDate: '2022-06-16T00:00:00.000Z'
                            saleDate: '2022-06-27T00:00:00.000Z'
                            uploadDate: '2022-03-24T14:26:17.000Z'
                            relatedInvoicesIds: []
                            priceTypeId: NET
                            paymentGenerationStatus: ACCEPTED
                          contractor:
                            contractorName: Altera sp. z o.o.
                            contractorId: 25
                            taxIdentificationNumber: '7010978165'
                            country: PL
                            contractorType: COMPANY
                            contractorRegion: POLAND
                            defaultCurrency: PLN
                            city: Bydgoszcz
                            street: ul. Grunwaldzka
                            houseNumber: '4'
                            postCode: 85-236
                          buyer:
                            taxIdentificationNumber: '9671391067'
                            contractorName: ITKO Łukasz Kowalski
                          seller:
                            contractorName: Altera sp. z o.o.
                            contractorId: 25
                            taxIdentificationNumber: '7010978165'
                            country: PL
                            contractorType: COMPANY
                            contractorRegion: POLAND
                            defaultCurrency: PLN
                            city: Bydgoszcz
                            street: ul. Grunwaldzka
                            houseNumber: '4'
                            postCode: 85-236
                          payments:
                            paymentMethod: TRANSFER
                            dueDate: '2022-07-11T00:00:00.000Z'
                            isSplitPayment: false
                            isPaid: false
                            bankAccountNumber: PL78114020040000360280396856
                          invoicePosition: []
                          costCenterPerItem: false
                          additionalDetails: Usługi księgowe Koszty ogólne
                          accounting:
                            accountingDate: '2022-09-16T00:00:00.000Z'
                            receiptDate: '2022-09-23T00:00:00.000Z'
                            vatProcedures: []
                            registrationPlate: ''
                            isSubjectToVat: false
                            activeVat: false
                            bufferOnly: false
                      pagesAmount: '1'
                      sumGross: '10455.000'
                      sumNet: '8500.00'
      security:
        - Authorization: []
components:
  schemas:
    Invoice:
      type: object
      x-examples:
        Example 1:
          modelType: INVOICE
          readOnly: false
          basicInformation:
            invoiceId: 118584
            invoiceType: PRO_FORMA
            invoiceFormat: PRO %N/%M/%Y
            invoiceNumber: PRO 2/12/2022
            year: 2022
            month: 12
            invoiceNumberInPeriod: 2
            statusId: SENT
            isReceipt: false
            isRelated: false
            netPrice: 5760
            grossPrice: 7084.8
            currency: PLN
            exchangeRate: 1.43
            vatPLN: 1324.8
            issueDate: '2022-12-27T00:00:00.000Z'
            saleDate: '2022-12-27T00:00:00.000Z'
            uploadDate: '2022-12-27T08:52:22.000Z'
            relatedInvoicesIds: []
            priceTypeId: NET
          buyer:
            contractorName: American Water Works Company, Inc.
            contractorId: 106
            taxIdentificationNumber: '3748414103'
            country: PL
            contractorType: COMPANY
            contractorRegion: POLAND
            defaultCurrency: PLN
            city: Norton Canes
            street: Dezsez View
            houseNumber: '396'
            flatNumber: '154'
            postCode: 97-135
            email: went@able.com,fv@altera.co
            phoneNumber: '420577850'
            areaNumber: ''
          seller:
            taxIdentificationNumber: '1397887352'
            contractorName: Express Scripts Inc.
          payments:
            paymentMethod: TRANSFER
            dueDate: '2023-01-26T00:00:00.000Z'
            isSplitPayment: false
            isPaid: false
            paidAmount: 0
            bankAccountNumber: 29 1111 1111 1111 1111 1111 1111
          invoicePosition:
            - invoiceProductId: 57822
              positionType: SERVICE
              productPosition: 0
              productCategory: Facebook
              productCategoryId: 808
              productName: Facebook Ads
              unit: szt.
              unitNetPrice: 480
              unitGrossPrice: 590.4
              quantity: 12
              discount: 0
              vat: 23%
              priceNet: 5760
              netPrice: '5760'
              vatAmt: 1324.8
              priceGross: 7084.8
              grossPrice: '7084.8'
              gtu: '-'
      title: Invoice
      properties:
        modelType:
          type: string
        readOnly:
          type: boolean
        basicInformation:
          type: object
          properties:
            invoiceId:
              type: integer
            invoiceType:
              type: string
              enum:
                - SALES
                - PRO_FORMA
                - INTERIM
                - INTERIM_FINAL
                - CORRECTION
              example: SALES
            invoiceFormat:
              type: string
            invoiceNumber:
              type: string
            year:
              type: integer
            month:
              type: integer
            invoiceNumberInPeriod:
              type: integer
            statusId:
              type: string
            isReceipt:
              type: boolean
            isRelated:
              type: boolean
            netPrice:
              type: integer
            grossPrice:
              type: number
            currency:
              type: string
            exchangeRate:
              type: number
            vatPLN:
              type: number
            issueDate:
              type: string
            saleDate:
              type: string
            uploadDate:
              type: string
            relatedInvoicesIds:
              type: array
              items:
                type: object
            priceTypeId:
              type: string
          required:
            - invoiceId
            - invoiceType
            - invoiceFormat
            - year
            - month
        contractor:
          type: object
          x-stoplight:
            id: 3h79oxtj5267w
          properties:
            contractorName:
              type: string
            contractorId:
              type: integer
            taxIdentificationNumber:
              type: string
            country:
              type: string
            contractorType:
              type: string
            contractorRegion:
              type: string
            defaultCurrency:
              type: string
            city:
              type: string
            street:
              type: string
            houseNumber:
              type: string
            flatNumber:
              type: string
            postCode:
              type: string
            email:
              type: string
            phoneNumber:
              type: string
            areaNumber:
              type: string
        seller:
          type: object
          properties:
            taxIdentificationNumber:
              type: string
            contractorName:
              type: string
        payments:
          type: object
          properties:
            paymentMethod:
              type: string
            dueDate:
              type: string
            isSplitPayment:
              type: boolean
            isPaid:
              type: boolean
            paidAmount:
              type: integer
            bankAccountNumber:
              type: string
        ksef:
          type: object
          properties:
            ksefId:
              type: string
            ksefSubmissionDate:
              type: string
            ksefStatus:
              type: string
              enum:
                - ACCEPTED
                - PENDING
                - ERROR
            ksefErrorMessage:
              type: string
            ksefRetryCount:
              type: integer
            ksefSourceXmlKey:
              type: string
        offlineMode:
          type: boolean
        offlineModeReason:
          type: string
        invoicePosition:
          type: array
          items:
            type: object
            properties:
              invoiceProductId:
                type: integer
              positionType:
                type: string
              productPosition:
                type: integer
              productCategory:
                type: string
              productCategoryId:
                type: integer
              productName:
                type: string
              unit:
                type: string
              unitNetPrice:
                type: integer
              unitGrossPrice:
                type: number
              quantity:
                type: integer
              discount:
                type: integer
              vat:
                type: string
              priceNet:
                type: integer
              netPrice:
                type: string
              vatAmt:
                type: number
              priceGross:
                type: number
              grossPrice:
                type: string
              gtu:
                type: string
      description: Invoice model for objects returned from server
  securitySchemes:
    Authorization:
      name: Authorization
      type: apiKey
      in: header
      description: OpenApi Key created within Altera.app for a certain company

````