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

# List package purchases

> List purchases for a package.

<Warning>This endpoint is part of API v1, which is deprecated. Please use the [v2 API](/getting-started/introduction) instead.</Warning>

<Info>Replace `{your-subdomain}` with your workspace’s subdomain. <br /> Learn how to find your subdomain in [Workspace subdomain](/getting-started/workspace-subdomain).</Info>


## OpenAPI

````yaml bundled-v1/packages.yaml GET /packages/{package_id}/purchases
openapi: 3.0.3
info:
  title: NeetoCal Packages APIs
  version: 1.0.0
servers:
  - description: NeetoCal APIs
    url: https://{your-subdomain}.neetocal.com/api/external/v1
    variables:
      your-subdomain:
        default: spinkart
        description: >-
          Replace **spinkart** with your [workspace's
          subdomain](/getting-started/workspace-subdomain).
security: []
tags:
  - name: Packages
    description: APIs to manage packages of the workspace.
paths:
  /packages/{package_id}/purchases:
    get:
      tags:
        - Packages
      summary: List package purchases
      description: List purchases for a package.
      parameters:
        - $ref: '#/components/parameters/api_key_header'
        - in: path
          name: package_id
          description: >-
            Id of the package to retrieve purchases for. You can get
            `package_id` by listing all packages using our [List
            packages](/api-reference/packages/list) API. Here you will see id
            for each package.
          required: true
          schema:
            type: string
        - $ref: '#/components/parameters/page_number_param'
        - $ref: '#/components/parameters/page_size_param'
      responses:
        '200':
          description: OK - Request succeeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/purchase_list_response'
components:
  parameters:
    api_key_header:
      in: header
      name: X-Api-Key
      description: >-
        Use the X-Api-Key header to provide your workspace API key. Refer to
        [Authentication](/getting-started/authentication) for more information.
      required: true
      schema:
        type: string
    page_number_param:
      in: query
      name: page_number
      description: >-
        Retrieve paginated results by specifying the desired page number. If
        this parameter is absent, all results will be returned.
      required: false
      schema:
        type: integer
    page_size_param:
      in: query
      name: page_size
      description: >-
        Set the number of results returned in the response. Defaulting to 30
        when omitted.
      required: false
      schema:
        type: integer
  schemas:
    purchase_list_response:
      type: object
      properties:
        purchases:
          type: array
          items:
            $ref: '#/components/schemas/purchase'
          description: Array of purchases for the specified package.
        pagination:
          $ref: '#/components/schemas/pagination'
          description: >-
            Pagination information including total records, pages, and current
            page details.
    purchase:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the purchase.
          example: 1b217cc5-69b5-4fb1-a13c-c22f9c14e7f9
        name:
          type: string
          description: Name of the person who made the purchase.
          example: John Doe
        email:
          type: string
          format: email
          description: Email address of the person who made the purchase.
          example: john@example.com
        purchase_code:
          type: string
          description: Unique code associated with the purchase.
          example: PUR-123456
        duration_remaining:
          type: integer
          description: Remaining duration in seconds for the purchased package.
          example: 3600
        status:
          type: string
          description: Current status of the purchase.
          example: confirmed
        notes:
          type: string
          nullable: true
          description: Additional notes or comments about the purchase.
          example: Customer requested priority support
        package_id:
          type: string
          description: ID of the package that was purchased.
          example: aff17ff8-1bf8-4e77-a3c5-2f86104f9a20
        duration:
          type: integer
          description: Total duration in seconds of the purchased package.
          example: 7200
        created_at:
          type: string
          format: date-time
          description: Timestamp when the purchase was created.
          example: '2023-12-01T10:00:00Z'
        updated_at:
          type: string
          format: date-time
          description: Timestamp when the purchase was last updated.
          example: '2023-12-01T10:30:00Z'
    pagination:
      type: object
      properties:
        total_records:
          type: integer
          description: Total number of records.
        total_pages:
          type: integer
          description: Total number of pages available.
        current_page_number:
          type: integer
          description: Current page number.
        page_size:
          type: integer
          description: Number of records per page.

````