> ## 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 transactions

> Retrieve credits transactions. <h3>OAuth</h3>Required scopes: <code>transactions.readonly</code> or <code>transactions</code>



## OpenAPI

````yaml /assets/openapi.json get /transactions/credits/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:
  /transactions/credits/v1:
    get:
      tags:
        - Transactions
      summary: Retrieve credit transactions
      description: >-
        Retrieve credits transactions. <h3>OAuth</h3>Required scopes:
        <code>transactions.readonly</code> or <code>transactions</code>
      operationId: getCreditsTransactions
      parameters:
        - 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
        - in: query
          name: limit
          schema:
            type: integer
            format: int64
            minimum: 1
            maximum: 100
            default: 25
          description: The number of items to return
        - in: query
          name: nextPageToken
          schema:
            $ref: '#/components/schemas/nextPageToken'
          description: Token to retrieve the next page of results.
        - in: query
          name: createDate
          description: The date filter of items.
          schema:
            type: object
            properties:
              lte:
                format: date-time
                type: string
                description: >-
                  Get transactions with less createDate. Example:
                  createDate[lte]=2021-05-21T10:00:00Z
              gte:
                format: date-time
                type: string
                description: >-
                  Get transactions with greater createDate. Example:
                  createDate[gte]=2021-05-21T10:00:00Z
        - in: query
          name: locationRef
          schema:
            type: string
            format: uuid
          description: The id of the location to get transactions for
        - in: query
          name: membershipRef
          schema:
            type: string
            format: uuid
          description: The id of the membership to get transactions for
        - in: query
          name: companyRef
          schema:
            type: string
            format: uuid
          description: The id of the company to get transactions for
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  transactions:
                    type: array
                    items:
                      $ref: '#/components/schemas/transactionCreditsExpanded'
                  nextPageToken:
                    $ref: '#/components/schemas/nextPageToken'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/responseError'
      security:
        - BasicAuth: []
        - OAuth2:
            - transactions
components:
  schemas:
    nextPageToken:
      type: string
      description: >-
        Opaque cursor token for retrieving the next page of results. Pass this
        value as the `nextPageToken` query parameter in your next request.
    transactionCreditsExpanded:
      type: object
      properties:
        amount:
          type: number
        booking:
          type: object
          properties:
            id:
              type: string
              format: uuid
            resource:
              type: object
              properties:
                id:
                  type: string
                  format: uuid
                title:
                  type: string
        company:
          $ref: '#/components/schemas/company'
        companyRef:
          type: string
          format: uuid
        createDate:
          $ref: '#/components/schemas/dateSchema'
        description:
          type: string
          description: The memo of the transaction.
        id:
          type: string
          format: uuid
        expiringAmount:
          type: number
        locationRef:
          type: string
          format: uuid
        membershipRefCreator:
          type: string
          format: uuid
        membershipRef:
          type: string
          format: uuid
        order:
          type: object
          properties:
            id:
              type: string
              format: uuid
            option:
              type: object
              properties:
                id:
                  type: string
                  format: uuid
                name:
                  type: string
            product:
              type: object
              properties:
                id:
                  type: string
                  format: uuid
                title:
                  type: string
        permanentAmount:
          type: number
        refund:
          type: object
          properties:
            amount:
              type: number
            createDate:
              $ref: '#/components/schemas/dateSchema'
        status:
          type: string
          enum:
            - canceled
            - failed
            - succeeded
        ticket:
          type: object
          properties:
            createDate:
              $ref: '#/components/schemas/dateSchema'
            event:
              type: object
              properties:
                endDate:
                  $ref: '#/components/schemas/dateSchema'
                id:
                  type: string
                  format: uuid
                startDate:
                  $ref: '#/components/schemas/dateSchema'
                title:
                  type: string
            id:
              type: string
              format: uuid
        type:
          type: string
          enum:
            - booking
            - chargeExpiringCredits
            - chargePermanentCredits
            - creditPackage
            - eventTicket
            - order
            - refund
            - subscriptionExpiration
            - subscriptionRenewal
            - transferExpiringCredits
            - transferPermanentCredits
        userCreator:
          $ref: '#/components/schemas/user'
        userOwner:
          $ref: '#/components/schemas/user'
        userRefCreator:
          type: string
          format: uuid
        userRefOwner:
          type: string
          format: uuid
    responseError:
      type: object
      properties:
        message:
          type: string
        type:
          type: string
    company:
      type: object
      properties:
        billingAddress:
          type: string
        businessAddress:
          type: object
          properties:
            city:
              type: string
            countryCode:
              type: string
            line1:
              type: string
            line2:
              type: string
            postalCode:
              type: string
            state:
              type: string
        createDate:
          $ref: '#/components/schemas/dateSchema'
        credits:
          type: object
          properties:
            expiring:
              type: number
            permanent:
              type: number
        dayPasses:
          type: object
          properties:
            expiring:
              type: number
        deleteDate:
          $ref: '#/components/schemas/dateSchema'
        id:
          type: string
        legalName:
          type: string
        locationRef:
          type: string
          format: uuid
        metadata:
          $ref: '#/components/schemas/metadata'
        notes:
          type: string
        subscriptionRef:
          type: string
          format: uuid
        taxId:
          type: string
        title:
          type: string
    dateSchema:
      format: date-time
      type: string
      description: The date and time in ISO 8601 format, e.g. 2021-05-21T10:00:00Z
    user:
      type: object
      properties:
        about:
          type: string
        email:
          type: string
        id:
          type: string
          format: uuid
        name:
          type: string
        phoneNumber:
          type: string
        photoUrl:
          type: string
        surname:
          type: string
    metadata:
      type: object
      description: Use to attach key-value data to the object. Available only for admins.
  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 invoices
            invoices: Read and write 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

````