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

# List invoices

> The billing account's proformas and invoices, newest first. Needs
`billing.view`.



## OpenAPI

````yaml /api-reference/console/openapi.json get /invoices
openapi: 3.1.2
info:
  title: PerfGrid API
  version: 1.0.0
  description: >-
    The PerfGrid customer API. A member creates a token for one billing account
    under *API tokens* in the panel; it can do what both the token's permissions
    and the member's own permissions allow, the same as the panel.


    Send it as `Authorization: Bearer pgapi_...`. Each token may make 120
    requests a minute, of which 30 change something; a `429` response says when
    to try again (`Retry-After`). Ids are the ULIDs the API returns; amounts are
    decimal strings next to their currency; lists are newest first and paged
    with `cursor` (`meta.next_cursor`). Messages are in English, or Danish with
    `Accept-Language: da`.


    The same tokens work with the MCP server at `/mcp` for AI assistants.
servers:
  - url: https://console.perfgrid.com/api/v1
security:
  - http: []
tags:
  - name: Account
  - name: Invoices
  - name: Services
  - name: Domains
  - name: Support
paths:
  /invoices:
    get:
      tags:
        - Invoices
      summary: List invoices
      description: |-
        The billing account's proformas and invoices, newest first. Needs
        `billing.view`.
      operationId: v1.invoices.index
      parameters:
        - name: status
          in: query
          description: Only invoices with this status.
          schema:
            anyOf:
              - $ref: '#/components/schemas/InvoiceStatus'
              - type: 'null'
        - name: type
          in: query
          description: '`proforma` (no invoice number yet) or `invoice`.'
          schema:
            type:
              - string
              - 'null'
            enum:
              - proforma
              - invoice
              - null
      responses:
        '200':
          description: Paginated set of `InvoiceResource`
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/InvoiceResource'
                  links:
                    type: object
                    properties:
                      first:
                        type:
                          - string
                          - 'null'
                      last:
                        type:
                          - string
                          - 'null'
                      prev:
                        type:
                          - string
                          - 'null'
                      next:
                        type:
                          - string
                          - 'null'
                    required:
                      - first
                      - last
                      - prev
                      - next
                  meta:
                    type: object
                    properties:
                      path:
                        type:
                          - string
                          - 'null'
                        description: Base path for paginator generated URLs.
                      per_page:
                        type: integer
                        description: Number of items shown per page.
                        minimum: 0
                      next_cursor:
                        type:
                          - string
                          - 'null'
                        description: The "cursor" that points to the next set of items.
                      prev_cursor:
                        type:
                          - string
                          - 'null'
                        description: The "cursor" that points to the previous set of items.
                    required:
                      - path
                      - per_page
                      - next_cursor
                      - prev_cursor
                required:
                  - data
                  - links
                  - meta
        '403':
          $ref: '#/components/responses/AuthorizationException'
        '422':
          $ref: '#/components/responses/ValidationException'
components:
  schemas:
    InvoiceStatus:
      type: string
      description: >
        Where an invoice is in its life. `unpaid` and `canceled` invoices are
        proformas, without an invoice number; a `paid` one is a numbered VAT
        invoice. A `held` one is a proforma paid in full whose reverse-charge
        VAT invoice waits for the EU's VIES service to confirm the VAT number
        again: settled, but not issued yet. A paid invoice stays `paid` when it
        is credited: its credit notes say how much.
      enum:
        - unpaid
        - paid
        - canceled
        - held
      title: InvoiceStatus
    InvoiceResource:
      type: object
      properties:
        id:
          type: string
        type:
          type: string
          enum:
            - invoice
            - proforma
        status:
          type: string
          enum:
            - unpaid
            - paid
            - canceled
            - held
        is_overdue:
          type: boolean
        reference:
          type: string
        number:
          type:
            - string
            - 'null'
        proforma_number:
          type: string
        currency:
          type: string
        net:
          type:
            - string
            - 'null'
        credit:
          type:
            - string
            - 'null'
        subtotal:
          type:
            - string
            - 'null'
        tax:
          type:
            - string
            - 'null'
        total:
          type:
            - string
            - 'null'
        paid:
          type:
            - string
            - 'null'
        amount_due:
          type:
            - string
            - 'null'
        payment_in_progress:
          type: boolean
        issue_date:
          type:
            - string
            - 'null'
        due_date:
          type:
            - string
            - 'null'
        tax_point_date:
          type:
            - string
            - 'null'
        paid_at:
          type:
            - string
            - 'null'
        canceled_at:
          type:
            - string
            - 'null'
        eur:
          type:
            - object
            - 'null'
          properties:
            rate:
              type:
                - string
                - 'null'
            rate_date:
              type:
                - string
                - 'null'
            subtotal:
              type:
                - string
                - 'null'
            tax:
              type:
                - string
                - 'null'
            total:
              type:
                - string
                - 'null'
          required:
            - rate
            - rate_date
            - subtotal
            - tax
            - total
        notes:
          type:
            - string
            - 'null'
        lines:
          type: array
          items:
            type: object
            properties:
              description:
                type: string
              details:
                type:
                  - string
                  - 'null'
              period_start:
                type:
                  - string
                  - 'null'
              period_end:
                type:
                  - string
                  - 'null'
              quantity:
                type: string
              unit_price:
                type:
                  - string
                  - 'null'
              discount:
                type:
                  - string
                  - 'null'
              net:
                type:
                  - string
                  - 'null'
              tax_scheme:
                type: string
                enum:
                  - domestic
                  - oss
                  - reverse_charge
                  - outside_eu
              tax_country:
                type:
                  - string
                  - 'null'
              tax_rate:
                type: string
            required:
              - description
              - details
              - period_start
              - period_end
              - quantity
              - unit_price
              - discount
              - net
              - tax_scheme
              - tax_country
              - tax_rate
        tax_totals:
          type: array
          items:
            type: object
            properties:
              tax_scheme:
                type: string
                enum:
                  - domestic
                  - oss
                  - reverse_charge
                  - outside_eu
              tax_country:
                type:
                  - string
                  - 'null'
              tax_rate:
                type: string
              taxable:
                type:
                  - string
                  - 'null'
              tax:
                type:
                  - string
                  - 'null'
            required:
              - tax_scheme
              - tax_country
              - tax_rate
              - taxable
              - tax
        payments:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              method:
                type: string
                enum:
                  - bank_transfer
                  - card
                  - ideal
                  - other
              amount:
                type:
                  - string
                  - 'null'
              paid_at:
                type:
                  - string
                  - 'null'
            required:
              - id
              - method
              - amount
              - paid_at
        credit_notes:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              number:
                type: string
              total:
                type:
                  - string
                  - 'null'
              issue_date:
                type:
                  - string
                  - 'null'
            required:
              - id
              - number
              - total
              - issue_date
        links:
          type: object
          properties:
            pdf:
              type: string
          required:
            - pdf
      required:
        - id
        - type
        - status
        - is_overdue
        - reference
        - number
        - proforma_number
        - currency
        - net
        - credit
        - subtotal
        - tax
        - total
        - paid
        - amount_due
        - payment_in_progress
        - issue_date
        - due_date
        - tax_point_date
        - paid_at
        - canceled_at
        - eur
        - notes
        - links
      title: InvoiceResource
  responses:
    AuthorizationException:
      description: Authorization error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    ValidationException:
      description: Validation error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Errors overview.
              errors:
                type: object
                description: A detailed description of each field that failed validation.
                additionalProperties:
                  type: array
                  items:
                    type: string
            required:
              - message
              - errors
  securitySchemes:
    http:
      type: http
      description: >-
        An API token from *API tokens* in the console, sent as `Authorization:
        Bearer pgapi_...`. It works for one billing account, and its permissions
        decide which endpoints it may call.
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.