> ## 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 credit notes

> Retrieve all credit notes for a specific invoice or location. One of invoiceRef or locationRef is required. <h3>OAuth</h3>Required scopes: <code>invoices.readonly</code> or <code>invoices</code>



## OpenAPI

````yaml /assets/openapi.json get /billing/credit_notes/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/credit_notes/v1:
    get:
      tags:
        - Billing
      summary: Retrieve credit notes
      description: >-
        Retrieve all credit notes for a specific invoice or location. One of
        invoiceRef or locationRef is required. <h3>OAuth</h3>Required scopes:
        <code>invoices.readonly</code> or <code>invoices</code>
      operationId: getCreditNotes
      parameters:
        - in: query
          name: createDate[gte]
          required: false
          description: >-
            Filter credit notes 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 credit notes created on or before this date (ISO 8601). Use
            with createDate[gte] for a range.
          schema:
            type: string
        - in: query
          name: invoiceRef
          required: false
          description: UUID of the invoice whose credit notes to list.
          schema:
            type: string
            format: uuid
        - in: query
          name: limit
          required: false
          description: >-
            Maximum number of credit notes 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 credit notes to list.
          schema:
            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: status
          required: false
          description: >-
            Filter by credit note status. Comma-separated values, e.g.
            `issued,voided`.


            Supported values:

            - **issued** — active credit note

            - **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/getCreditNotes'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/responseError'
        '403':
          description: Forbidden - User lacks permissions
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/responseError'
        '404':
          description: Not Found - Invoice or location not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/responseError'
      security:
        - BasicAuth: []
        - OAuth2:
            - invoices.readonly
            - invoices
components:
  schemas:
    getCreditNotes:
      type: object
      properties:
        creditNotes:
          type: array
          items:
            type: object
            additionalProperties: false
            properties:
              baseAmounts:
                type: object
                properties:
                  currencyCode:
                    type: string
                    description: ISO currency code.
                  grossAmount:
                    type: number
                    deprecated: true
                    description: Deprecated.
                  postPaymentAmount:
                    type: number
                    description: Post-payment credit amount in major units.
                  prePaymentAmount:
                    type: number
                    description: Pre-payment credit amount in major units.
                  subtotalAmount:
                    type: number
                    description: Subtotal in major units.
                  subtotalAmountExcludingTax:
                    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 in major units.
                  totalExcludingTaxAmount:
                    type: number
                    description: Total excluding tax in major units.
                required:
                  - currencyCode
                  - grossAmount
                  - postPaymentAmount
                  - prePaymentAmount
                  - subtotalAmount
                  - subtotalAmountExcludingTax
                  - taxes
                  - totalAmount
                  - totalExcludingTaxAmount
                additionalProperties: false
                description: Amounts in the base currency.
              createDate:
                type: string
                format: date-time
                description: ISO timestamp of when the credit note was created.
              creditAmount:
                description: Amount credited to customer balance in major units.
                type: number
              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 credit note.
              effectiveDate:
                description: Effective date in YYYY-MM-DD format.
                type: string
              grossAmount:
                type: number
                deprecated: true
                description: Deprecated.
              id:
                type: string
                format: uuid
                description: Unique identifier of the credit note.
              internalNote:
                description: Internal memo (visible to admins only).
                type: string
              invoiceRef:
                type: string
                format: uuid
                description: ID of the invoice being credited.
              lines:
                type: array
                items:
                  type: object
                  properties:
                    baseAmounts:
                      type: object
                      properties:
                        currencyCode:
                          type: string
                          description: ISO currency code.
                        discountedAmount:
                          type: number
                          description: Discount deduction in major units.
                        tax:
                          description: Tax details.
                          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
                        totalAmount:
                          type: number
                          description: Total in major units.
                        totalExcludingTaxAmount:
                          type: number
                          description: Total excluding tax in major units.
                        unitAmount:
                          type: number
                          description: Unit price in major units.
                        unitExcludingTaxAmount:
                          type: number
                          description: Unit price excluding tax in major units.
                      required:
                        - currencyCode
                        - discountedAmount
                        - totalAmount
                        - totalExcludingTaxAmount
                      additionalProperties: false
                      description: Amounts in the base currency.
                    createDate:
                      type: string
                      format: date-time
                      description: ISO timestamp of line item creation.
                    currencyCode:
                      type: string
                      description: ISO currency code.
                    discountedAmount:
                      type: number
                      description: Discount deduction in major units.
                    discounts:
                      description: Applied discounts.
                      type: array
                      items:
                        type: object
                        properties:
                          coupon:
                            type: object
                            properties:
                              amountOff:
                                description: Fixed discount amount in major units.
                                type: number
                              currencyCode:
                                description: Currency code for amountOff.
                                type: string
                              duration:
                                description: Discount duration type.
                                type: string
                              durationInMonths:
                                description: Number of months the discount applies.
                                type: number
                              id:
                                description: Coupon ID.
                                type: string
                                format: uuid
                              percentOff:
                                description: Percentage discount.
                                type: number
                              type:
                                description: Coupon type.
                                type: string
                            additionalProperties: false
                            description: Coupon applied.
                          promocode:
                            description: Promocode applied.
                            type: object
                            properties:
                              code:
                                type: string
                              expiration:
                                type: string
                                format: date-time
                              id:
                                type: string
                                format: uuid
                              limitByFirstPurchase:
                                type: boolean
                            required:
                              - code
                              - id
                            additionalProperties: false
                          subscriptionId:
                            description: Associated subscription ID.
                            type: string
                            format: uuid
                        required:
                          - coupon
                        additionalProperties: false
                    id:
                      type: string
                      format: uuid
                      description: Unique identifier of the line item.
                    invoiceItemRef:
                      type: string
                      format: uuid
                      description: ID of the original invoice item.
                    invoiceRef:
                      type: string
                      format: uuid
                      description: ID of the invoice.
                    locationRef:
                      type: string
                      format: uuid
                      description: ID of the organization (location).
                    networkRef:
                      type: string
                      format: uuid
                      description: ID of the network.
                    quantity:
                      description: Quantity refunded.
                      type: number
                    tax:
                      description: Tax details.
                      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
                    totalAmount:
                      type: number
                      description: Total in major units.
                    totalExcludingTaxAmount:
                      type: number
                      description: Total excluding tax in major units.
                    unitAmount:
                      type: number
                      description: Unit price in major units.
                    unitExcludingTaxAmount:
                      type: number
                      description: Unit price excluding tax in major units.
                    updateDate:
                      type: string
                      format: date-time
                      description: ISO timestamp of last update.
                  required:
                    - baseAmounts
                    - createDate
                    - currencyCode
                    - discountedAmount
                    - id
                    - invoiceItemRef
                    - invoiceRef
                    - locationRef
                    - networkRef
                    - totalAmount
                    - totalExcludingTaxAmount
                    - updateDate
                  additionalProperties: false
                description: Credit note line items.
              locationRef:
                type: string
                format: uuid
                description: ID of the organization (location).
              networkRef:
                type: string
                format: uuid
                description: ID of the network.
              number:
                description: Credit note number.
                type: number
              outOfBandAmount:
                description: Out-of-band refund amount in major units.
                type: number
              pdfUrl:
                type: string
                description: URL to download the credit note PDF.
              postPaymentAmount:
                type: number
                description: Post-payment credit amount in major units.
              prePaymentAmount:
                type: number
                description: Pre-payment credit amount in major units.
              reason:
                type: string
                enum:
                  - duplicate
                  - orderChange
                  - productUnsatisfactory
                  - fraudulent
                  - other
                description: Reason for the credit note.
              refunds:
                description: Refunds associated with this credit note.
                type: array
                items:
                  type: object
                  properties:
                    amount:
                      type: number
                      description: Refund amount in major units.
                    currencyCode:
                      type: string
                      description: ISO currency code.
                    id:
                      type: string
                      format: uuid
                      description: Unique identifier of the refund.
                    method:
                      description: Refund payment method.
                      type: object
                      properties:
                        label:
                          description: Payment method label.
                          type: string
                        type:
                          type: string
                          enum:
                            - external
                            - paymentGateway
                          description: Payment method type.
                      required:
                        - type
                      additionalProperties: false
                    transactionRef:
                      type: string
                      format: uuid
                      description: ID of the transaction being refunded.
                  required:
                    - amount
                    - currencyCode
                    - id
                    - transactionRef
                  additionalProperties: false
              status:
                type: string
                enum:
                  - issued
                  - voided
                description: Credit note status.
              subtotalAmount:
                type: number
                description: Subtotal in major units.
              subtotalAmountExcludingTax:
                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.
              title:
                type: string
                description: Credit note title.
              totalAmount:
                type: number
                description: Total in major units.
              totalExcludingTaxAmount:
                type: number
                description: Total excluding tax in major units.
              type:
                type: string
                enum:
                  - prePayment
                  - postPayment
                  - mixed
                description: Credit note type.
              updateDate:
                type: string
                format: date-time
                description: ISO timestamp of last update.
              voidDate:
                description: ISO timestamp of when the credit note was voided.
                type: string
                format: date-time
            required:
              - baseAmounts
              - createDate
              - currencyCode
              - customer
              - grossAmount
              - id
              - invoiceRef
              - lines
              - locationRef
              - networkRef
              - pdfUrl
              - postPaymentAmount
              - prePaymentAmount
              - reason
              - status
              - subtotalAmount
              - subtotalAmountExcludingTax
              - taxes
              - title
              - totalAmount
              - totalExcludingTaxAmount
              - type
              - updateDate
          description: List of credit notes.
        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:
        - creditNotes
      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

````