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

# Get Purchases

> Get a list of purchases from a connected account



## OpenAPI

````yaml get /purchases
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers: []
security: []
paths:
  /purchases:
    get:
      tags:
        - purchases
      summary: Get Purchases
      description: Get a list of purchases from a connected account
      operationId: get_purchases_purchases_get
      parameters:
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 50
            minimum: 1
            description: The maximum number of purchases to return
            examples:
              - 10
            default: 10
            title: Limit
          description: The maximum number of purchases to return
        - name: starting_after
          in: query
          required: false
          schema:
            type: string
            description: >-
              The purchase id of the last purchase you processed. The next
              purchase returned will be the next oldest purchase.
            examples:
              - 01J51S0JYV6N7K1030CV1ZJH30
            title: Starting After
          description: >-
            The purchase id of the last purchase you processed. The next
            purchase returned will be the next oldest purchase.
        - name: x-api-key
          in: header
          required: true
          schema:
            type: string
            description: The client's API key secret value
            title: X-Api-Key
          description: The client's API key secret value
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetPurchasesResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    GetPurchasesResponse:
      properties:
        has_more:
          type: boolean
          title: Has More
          description: Whether there are more purchases available to fetch
          examples:
            - true
        purchases:
          items:
            $ref: '#/components/schemas/PurchaseSummary'
          type: array
          title: Purchases
          description: >-
            The list of purchases for the connection sorted in descending order
            by purchase date
          examples:
            - - date: '2024-01-01T00:00:00Z'
                purchase_id: 01J51S0JYV6N7K1030CV1ZKSJH
                total: '9.34'
      type: object
      required:
        - has_more
        - purchases
      title: GetPurchasesResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    PurchaseSummary:
      properties:
        purchase_id:
          type: string
          title: Purchase Id
          description: The unique identifier for the purchase
          examples:
            - 01J51S0JYV6N7K1030CV1ZKSCF
        date:
          type: string
          title: Date
          description: The date and time of the purchase
          examples:
            - '2024-01-01T00:00:00Z'
        total:
          type: string
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Total
          description: The total amount of the purchase
          examples:
            - '9.34'
      type: object
      required:
        - purchase_id
        - date
        - total
      title: PurchaseSummary
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      description: A connection-specific token with access scope
      scheme: bearer

````