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

# Retrieve invoices

> Retrieve all invoices based on certain parameters. <h3>OAuth</h3>Required scopes: <code>invoices.readonly</code> or <code>invoices</code>



## OpenAPI

````yaml /assets/openapi.json get /billing/invoices/v1
openapi: 3.0.2
info:
  title: Spacebring
  version: 1.0.0
  termsOfService: https://www.spacebring.com/terms
servers:
  - url: https://api.spacebring.com
security: []
paths:
  /billing/invoices/v1:
    get:
      tags:
        - Billing
      summary: Retrieve invoices
      description: >-
        Retrieve all invoices based on certain parameters.
        <h3>OAuth</h3>Required scopes: <code>invoices.readonly</code> or
        <code>invoices</code>
      operationId: getInvoices
      parameters:
        - in: query
          name: companyRef
          required: false
          description: >-
            Deprecated. Use customerRef instead. UUID of the company whose
            invoices to list.
          schema:
            deprecated: true
            type: string
            format: uuid
        - in: query
          name: createDate[gte]
          required: false
          description: >-
            Filter invoices created on or after this date (ISO 8601). Use with
            createDate[lte] for a range.
          schema:
            type: string
        - in: query
          name: createDate[lte]
          required: false
          description: >-
            Filter invoices created on or before this date (ISO 8601). Use with
            createDate[gte] for a range.
          schema:
            type: string
        - in: query
          name: customerRef
          required: false
          description: UUID of the customer whose invoices to list.
          schema:
            type: string
            format: uuid
        - in: query
          name: issueDate[gte]
          required: false
          description: >-
            Filter invoices issued on or after this date (ISO 8601). Use with
            issueDate[lte] for a range.
          schema:
            type: string
        - in: query
          name: issueDate[lte]
          required: false
          description: >-
            Filter invoices issued on or before this date (ISO 8601). Use with
            issueDate[gte] for a range.
          schema:
            type: string
        - in: query
          name: limit
          required: false
          description: >-
            Maximum number of invoices per page. Defaults to 25 when omitted or
            invalid; values above 100 are capped at 100.
          schema:
            type: integer
            minimum: 1
            maximum: 100
        - in: query
          name: locationRef
          required: false
          description: UUID of the location whose invoices to list.
          schema:
            type: string
            format: uuid
        - in: query
          name: membershipRef
          required: false
          description: >-
            Deprecated. Use customerRef instead. UUID of the membership whose
            invoices to list.
          schema:
            deprecated: true
            type: string
            format: uuid
        - in: query
          name: nextPageToken
          required: false
          description: >-
            Pagination token from nextPageToken in a previous response. Keep the
            same filters when fetching the next page.
          schema:
            type: string
        - in: query
          name: q
          required: false
          description: >-
            Case-insensitive search by invoice code or number. Requires
            customerRef or locationRef.
          schema:
            type: string
        - in: query
          name: status
          required: false
          description: >-
            Filter by invoice status. Comma-separated values, e.g.
            `draft,issued`.


            Supported values:

            - **draft** — created but not sent

            - **issued** — sent to the customer but unpaid

            - **paid** — fully paid

            - **voided** — cancelled and no longer valid
          schema:
            type: string
        - in: header
          name: spacebring-network-id
          schema:
            type: string
            format: uuid
          required: false
          description: >-
            The id of the network. Required when using bearer token
            authentication
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/getInvoices'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/responseError'
      security:
        - BasicAuth: []
        - OAuth2:
            - invoices.readonly
            - invoices
components:
  schemas:
    getInvoices:
      type: object
      properties:
        invoices:
          type: array
          items:
            type: object
            additionalProperties: false
            properties:
              amount:
                deprecated: true
                description: Deprecated. Use totalAmount instead.
                type: number
              amountDue:
                type: number
                description: Amount due in major units (from base or alt currency).
              amountPaid:
                type: number
                description: Total amount paid in major units.
              amountRemaining:
                type: number
                description: Amount remaining to be paid in major units.
              appliedBalance:
                type: number
                description: Applied customer balance offset in major units.
              autoChargeFailed:
                description: Whether the last auto-charge attempt failed.
                type: boolean
              autoCreateDate:
                description: Date of scheduled automatic invoice creation.
                type: string
                format: date-time
              baseAmounts:
                type: object
                properties:
                  amountDue:
                    type: number
                    description: Amount due in major units.
                  appliedBalance:
                    type: number
                    description: Applied customer balance offset in major units.
                  currencyCode:
                    type: string
                    description: ISO currency code.
                  postPaymentCreditNotesAmount:
                    type: number
                    description: Post-payment credit notes amount in major units.
                  prePaymentCreditNotesAmount:
                    type: number
                    description: Pre-payment credit notes amount in major units.
                  subtotalAmount:
                    type: number
                    description: Subtotal amount in major units.
                  subtotalExcludingTaxAmount:
                    type: number
                    description: Subtotal excluding tax in major units.
                  taxes:
                    type: array
                    items:
                      type: object
                      properties:
                        amount:
                          type: number
                          description: Tax amount in major units.
                        inclusive:
                          type: boolean
                          description: Whether tax is included in the price.
                        rate:
                          type: number
                          description: Tax rate as a decimal.
                        taxableAmount:
                          type: number
                          description: Amount subject to tax in major units.
                      required:
                        - amount
                        - inclusive
                        - rate
                        - taxableAmount
                      additionalProperties: false
                    description: Tax breakdown.
                  totalAmount:
                    type: number
                    description: Total amount in major units.
                  totalExcludingTaxAmount:
                    type: number
                    description: Total amount excluding tax in major units.
                required:
                  - amountDue
                  - appliedBalance
                  - currencyCode
                  - postPaymentCreditNotesAmount
                  - prePaymentCreditNotesAmount
                  - subtotalAmount
                  - subtotalExcludingTaxAmount
                  - taxes
                  - totalAmount
                  - totalExcludingTaxAmount
                additionalProperties: false
                description: Amounts in the base currency.
              company:
                deprecated: true
                description: Deprecated. Use customer instead.
              companyRef:
                description: ID of the associated company.
                type: string
                format: uuid
              createDate:
                type: string
                format: date-time
                description: ISO timestamp of when the invoice was created.
              currencyCode:
                type: string
                description: ISO currency code (from base or alt currency).
              customer:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                    description: ID of the company or membership.
                  logo:
                    description: Company logo.
                    type: object
                    properties:
                      key:
                        type: string
                      url:
                        type: string
                    required:
                      - key
                      - url
                    additionalProperties: false
                  title:
                    description: Company name.
                    type: string
                  type:
                    type: string
                    enum:
                      - company
                      - user
                    description: Whether the customer is a company or a user.
                  user:
                    description: User details for membership customers.
                    type: object
                    properties:
                      about:
                        description: User bio.
                        nullable: true
                        type: string
                      email:
                        description: User email address.
                        nullable: true
                        type: string
                      id:
                        type: string
                        format: uuid
                        description: User ID.
                      name:
                        description: First name.
                        nullable: true
                        type: string
                      phoneNumber:
                        description: Phone number.
                        nullable: true
                        type: string
                      photoUrl:
                        description: Profile photo URL.
                        nullable: true
                        type: string
                      surname:
                        description: Last name.
                        nullable: true
                        type: string
                    required:
                      - id
                    additionalProperties: false
                required:
                  - id
                  - type
                additionalProperties: false
                description: Customer associated with this invoice.
              customerAddress:
                description: Customer billing address.
                type: object
                properties:
                  city:
                    type: string
                  countryCode:
                    nullable: true
                    type: string
                  line1:
                    type: string
                  line2:
                    type: string
                  postalCode:
                    type: string
                  state:
                    type: string
                required:
                  - city
                  - countryCode
                  - line1
                  - line2
                  - postalCode
                  - state
                additionalProperties: false
              customerName:
                description: Customer legal name.
                type: string
              customerTaxId:
                description: Customer tax ID.
                type: string
              dueDate:
                description: Payment due date.
                type: string
                format: date-time
              dueDays:
                description: Number of days until payment is due.
                type: integer
                minimum: -9007199254740991
                maximum: 9007199254740991
              dueType:
                description: How the due date is calculated.
                type: string
                enum:
                  - date
                  - days
                  - default
              id:
                description: Unique identifier of the invoice.
                type: string
                format: uuid
              internalNote:
                description: Internal memo (visible to admins only).
                type: string
              issueDate:
                description: ISO timestamp of when the invoice was issued.
                type: string
                format: date-time
              items:
                deprecated: true
                description: Deprecated. Invoice line items.
                type: array
                items: {}
              itemsCount:
                type: integer
                minimum: -9007199254740991
                maximum: 9007199254740991
                description: Number of line items on this invoice.
              locationRef:
                type: string
                format: uuid
                description: ID of the organization (location).
              membershipRef:
                description: ID of the associated membership.
                type: string
                format: uuid
              memo:
                deprecated: true
                description: Deprecated. Use internalNote instead.
                type: string
              netAmount:
                deprecated: true
                description: Deprecated. Use totalExcludingTaxAmount instead.
                type: number
              number:
                deprecated: true
                description: Deprecated. Use title instead.
                type: string
              paymentMethod:
                description: Auto-charge payment method, if configured.
                type: object
                properties:
                  cardMask:
                    type: string
                  label:
                    type: string
                  mask:
                    type: string
                additionalProperties: false
              payments:
                type: array
                items:
                  type: object
                  additionalProperties: false
                  properties:
                    createDate:
                      type: string
                      format: date-time
                      description: ISO timestamp of the payment.
                    dispute:
                      description: Payment dispute details.
                      type: object
                      properties:
                        createDate:
                          type: string
                          format: date-time
                          description: ISO timestamp of when the dispute was opened.
                      required:
                        - createDate
                      additionalProperties: false
                    method:
                      type: object
                      properties:
                        external:
                          description: Present when type is external.
                          type: object
                          properties: {}
                          additionalProperties: false
                        paymentGateway:
                          description: Present when type is paymentGateway.
                          type: object
                          properties:
                            gateway:
                              type: string
                              description: Payment gateway identifier.
                            label:
                              description: Display label for the payment gateway.
                              type: string
                            mask:
                              description: Masked card or account identifier.
                              type: string
                            title:
                              description: Display title for the payment gateway.
                              type: string
                          required:
                            - gateway
                          additionalProperties: false
                        type:
                          type: string
                          enum:
                            - external
                            - paymentGateway
                          description: Payment method type.
                      required:
                        - type
                      additionalProperties: false
                      description: Payment method used.
                    price:
                      type: object
                      properties:
                        money:
                          type: object
                          properties:
                            currencyCode:
                              type: string
                              description: ISO currency code.
                            grossAmount:
                              type: number
                              description: Payment amount in major units.
                          required:
                            - currencyCode
                            - grossAmount
                          additionalProperties: false
                        type:
                          type: string
                          enum:
                            - money
                      required:
                        - money
                        - type
                      additionalProperties: false
                      description: Payment price details.
                    refundable:
                      type: boolean
                      description: Whether this payment can be refunded.
                    refunds:
                      description: Refunds issued against this payment.
                      type: object
                      properties:
                        money:
                          type: array
                          items:
                            type: object
                            properties:
                              createDate:
                                type: string
                                format: date-time
                              currencyCode:
                                type: string
                              grossAmount:
                                type: number
                              id:
                                type: string
                                format: uuid
                            required:
                              - createDate
                              - currencyCode
                              - grossAmount
                              - id
                            additionalProperties: false
                        type:
                          type: string
                          enum:
                            - money
                      required:
                        - type
                      additionalProperties: false
                    status:
                      type: string
                      enum:
                        - canceled
                        - failed
                        - pending
                        - processing
                        - succeeded
                      description: Payment status.
                    surcharge:
                      description: Payment surcharge details.
                      type: object
                      properties:
                        money:
                          type: object
                          properties:
                            amount:
                              type: number
                              description: Surcharge amount in major units.
                            currencyCode:
                              type: string
                              description: ISO currency code.
                            percentage:
                              description: Surcharge percentage.
                              type: number
                            rate:
                              description: Surcharge rate.
                              type: number
                          required:
                            - amount
                            - currencyCode
                          additionalProperties: false
                        type:
                          type: string
                          enum:
                            - money
                      required:
                        - money
                        - type
                      additionalProperties: false
                    transactionRef:
                      type: string
                      format: uuid
                      description: ID of the associated transaction.
                  required:
                    - createDate
                    - method
                    - price
                    - refundable
                    - status
                    - transactionRef
                description: Payment records for this invoice.
              pdfUrl:
                description: URL to download the invoice PDF (issued invoices only).
                type: string
              postPaymentCreation:
                type: boolean
                description: Whether this invoice was created post-payment.
              postPaymentCreditAmount:
                deprecated: true
                description: >-
                  Deprecated. Use baseAmounts.postPaymentCreditNotesAmount
                  instead.
                type: number
              postPaymentCreditNotesAmount:
                type: number
                description: Post-payment credit notes amount in major units.
              prePaymentCreditAmount:
                deprecated: true
                description: >-
                  Deprecated. Use baseAmounts.prePaymentCreditNotesAmount
                  instead.
                type: number
              prePaymentCreditNotesAmount:
                type: number
                description: Pre-payment credit notes amount in major units.
              receiptPdfUrl:
                description: URL to download the receipt PDF (paid invoices only).
                type: string
              startingBalance:
                description: Customer balance at draft creation.
                type: number
              status:
                type: string
                enum:
                  - draft
                  - issued
                  - paid
                  - voided
                description: Invoice status.
              subscriptionRef:
                description: ID of the associated subscription.
                type: string
                format: uuid
              subtotalAmount:
                type: number
                description: Subtotal amount in major units.
              subtotalExcludingTaxAmount:
                type: number
                description: Subtotal excluding tax in major units.
              taxAmount:
                deprecated: true
                description: Deprecated. Use baseAmounts.taxes instead.
                type: number
              taxes:
                type: array
                items:
                  type: object
                  properties:
                    amount:
                      type: number
                      description: Tax amount in major units.
                    inclusive:
                      type: boolean
                      description: Whether tax is included in the price.
                    rate:
                      type: number
                      description: Tax rate as a decimal.
                    taxableAmount:
                      type: number
                      description: Amount subject to tax in major units.
                  required:
                    - amount
                    - inclusive
                    - rate
                    - taxableAmount
                  additionalProperties: false
                description: Tax breakdown.
              timezoneId:
                type: string
                description: Timezone of the invoice.
              title:
                type: string
                description: Invoice title.
              totalAmount:
                type: number
                description: Total amount in major units.
              totalExcludingTaxAmount:
                type: number
                description: Total amount excluding tax in major units.
              transaction:
                deprecated: true
                description: Deprecated. Use payments instead.
                type: object
                properties:
                  amount:
                    type: number
                  createDate:
                    type: string
                    format: date-time
                  id:
                    type: string
                    format: uuid
                  paymentMethod:
                    type: object
                    properties:
                      label:
                        type: string
                      type:
                        type: string
                    required:
                      - type
                    additionalProperties: false
                  refund:
                    type: object
                    properties:
                      amount:
                        type: number
                      createDate:
                        type: string
                        format: date-time
                    required:
                      - amount
                      - createDate
                    additionalProperties: false
                  refunds:
                    type: array
                    items:
                      type: object
                      properties:
                        amount:
                          type: number
                        createDate:
                          type: string
                          format: date-time
                        currencyCode:
                          type: string
                        id:
                          type: string
                          format: uuid
                      required:
                        - amount
                        - createDate
                        - currencyCode
                        - id
                      additionalProperties: false
                  status:
                    type: string
                    enum:
                      - canceled
                      - failed
                      - pending
                      - processing
                      - succeeded
                required:
                  - amount
                  - createDate
                  - id
                  - status
                additionalProperties: false
              user:
                deprecated: true
                description: Deprecated. Use customer.user instead.
              voidDate:
                description: ISO timestamp of when the invoice was voided.
                type: string
                format: date-time
            required:
              - amountDue
              - amountPaid
              - amountRemaining
              - appliedBalance
              - baseAmounts
              - createDate
              - currencyCode
              - customer
              - itemsCount
              - locationRef
              - payments
              - postPaymentCreation
              - postPaymentCreditNotesAmount
              - prePaymentCreditNotesAmount
              - status
              - subtotalAmount
              - subtotalExcludingTaxAmount
              - taxes
              - timezoneId
              - title
              - totalAmount
              - totalExcludingTaxAmount
          description: List of invoices.
        nextPageToken:
          description: Pagination token to fetch the next page of results.
          type: string
        searchQueryNext:
          description: >-
            Search query parameters for the next page of results. Includes all
            filters used to fetch the current page.
          type: string
      required:
        - invoices
      additionalProperties: false
    responseError:
      type: object
      properties:
        message:
          type: string
        type:
          type: string
  securitySchemes:
    BasicAuth:
      type: http
      description: >-
        See our [authentication
        documentation](https://www.spacebring.com/docs/api-reference/authentication#basic-authentication)
        for how to authorize your requests
      scheme: basic
    OAuth2:
      type: oauth2
      description: >-
        See our [authentication
        documentation](https://www.spacebring.com/docs/api-reference/authentication#oauth2)
        for how to authorize your requests
      flows:
        authorizationCode:
          authorizationUrl: https://api.spacebring.com/oauth2/authorize
          tokenUrl: https://api.spacebring.com/oauth2/token
          refreshUrl: https://api.spacebring.com/oauth2/token
          scopes:
            benefits.readonly: Read benefits and applications
            benefits: Read and write benefits and applications
            community.readonly: Read community companies and memberships
            community: Read and write community companies and memberships
            events.readonly: Read events and tickets
            events: Read and write events and tickets
            feed.readonly: Read feed posts
            feed: Read and write feed posts
            invoices.readonly: Read contracts, credit notes, discounts and invoices
            invoices: Read and write contract, credit notes, discounts and invoices
            locations.readonly: Read locations
            locations: Read and write locations
            plans.readonly: Read plans
            plans: Read and write plans
            resources.readonly: Read resources and bookings
            resources: Read and write resources and bookings
            subscriptions.readonly: Read subscriptions
            subscriptions: Read and write subscriptions
            shop.readonly: Read products and orders
            shop: Read and write products and orders
            support.readonly: Read support tickets
            support: Read and write support tickets
            transactions.readonly: Read transactions
            transactions: Read and write transactions
            visitors.readonly: Read visitors
            visitors: Read and write visitors

````