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

# List cases



## OpenAPI

````yaml https://api.prets.io/v1/openapi.json get /v1/cases
openapi: 3.1.0
info:
  title: Prets API
  version: 1.0.0
servers:
  - url: https://api.prets.app
security:
  - bearerAuth: []
paths:
  /v1/cases:
    get:
      summary: List cases
      parameters:
        - schema:
            type: string
            description: Opaque list Cursor from a previous links.next.cursor (API-0013)
          required: false
          description: Opaque list Cursor from a previous links.next.cursor (API-0013)
          name: cursor
          in: query
        - schema:
            type: integer
            exclusiveMinimum: 0
            maximum: 250
            description: >-
              Page-size hint for the first page (1–250). Frozen into the Cursor
              for the rest of the scroll; ignored when `cursor` is present.
          required: false
          description: >-
            Page-size hint for the first page (1–250). Frozen into the Cursor
            for the rest of the scroll; ignored when `cursor` is present.
          name: limit
          in: query
        - schema:
            anyOf:
              - type: string
              - type: array
                items:
                  type: string
            description: >-
              Repeated field names on the list item to expand. Allowlisted:
              none. Unknown names are invalid.
          required: false
          description: >-
            Repeated field names on the list item to expand. Allowlisted: none.
            Unknown names are invalid.
          name: expand
          in: query
        - schema:
            type: string
            enum:
              - open
              - closed
            description: Filter to open or closed Cases
            example: open
          required: false
          description: Filter to open or closed Cases
          name: state
          in: query
        - schema:
            type: string
            pattern: ^qot_[0-9A-HJKMNP-TV-Z]{26}$
            description: Restrict the list to Cases on this Quote
            example: qot_01ARZ3NDEKTSV4RRFFQ69G5AV
          required: false
          description: Restrict the list to Cases on this Quote
          name: quoteId
          in: query
        - schema:
            type: string
            format: date-time
            description: >-
              Return Cases whose `updatedAt` is at or after this instant
              (incremental sync)
            example: '2026-08-16T00:00:00.000Z'
          required: false
          description: >-
            Return Cases whose `updatedAt` is at or after this instant
            (incremental sync)
          name: updatedSince
          in: query
      responses:
        '200':
          description: Cases listed successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListCasesResponse'
        '400':
          description: Bad request — malformed cursor or expand
        '401':
          description: Unauthorized - authentication required
        '500':
          description: Internal server error
components:
  schemas:
    ListCasesResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Case'
        hasMore:
          type: boolean
          description: True when another page exists; always equals links.next != null
        links:
          $ref: '#/components/schemas/ListLinks'
      required:
        - data
        - hasMore
        - links
      description: Paginated list of cases (house List envelope)
    Case:
      anyOf:
        - $ref: '#/components/schemas/CaseOpenWaiting'
        - $ref: '#/components/schemas/CaseOpenIdle'
        - $ref: '#/components/schemas/CaseClosed'
      description: >-
        Quote support Case. Conversation lives on `/messages`; this resource is
        metadata and lifecycle only.
    ListLinks:
      type: object
      properties:
        next:
          type:
            - object
            - 'null'
          properties:
            href:
              type: string
              description: >-
                Relative URI-reference to the next page (also advertised on the
                Link header)
            cursor:
              type: string
              description: >-
                Opaque Cursor to pass as the cursor query param on the next
                request
          required:
            - href
            - cursor
          description: Next page link, or null when done
      required:
        - next
    CaseOpenWaiting:
      type: object
      properties:
        caseId:
          type: string
          pattern: ^cas_[0-9A-HJKMNP-TV-Z]{26}$
          description: Platform case id (`cas_{ULID}`)
          example: cas_01ARZ3NDEKTSV4RRFFQ69G5AV
        quote:
          $ref: '#/components/schemas/QuoteRef'
        type:
          type: string
          enum:
            - general
            - merchant_feedback
            - prets_feedback
          description: Merchant-facing case category
          example: merchant_feedback
        requestType:
          type: string
          enum:
            - Cancel Application
            - Reschedule Meeting
            - Contact Customer
            - Application Final
            - Other
            - Customer Unreachable
            - Quote Under Consideration
            - Customer No Show & Unreachable
            - Customer No Show & VM
            - Cancellation Offer Requested
            - Schedule Installation
            - General Question
            - Compliance/Risk
            - Documents Requested
          description: The specific request; present on feedback cases
          example: Reschedule Meeting
        subject:
          type: string
          description: Case subject
          example: Customer wants a later install date
        description:
          type: string
          description: >-
            Read-only mirror of the opening request. The conversation lives on
            `/messages`.
          example: The customer asked to move the appointment.
        stage:
          type: string
          description: >-
            Informational Salesforce stage string. Not a published enum — switch
            on `state` and `waitingOn`.
          example: Prets Action
        createdAt:
          type: string
          format: date-time
          description: When the case was created (ISO 8601)
          example: '2026-08-14T09:12:04.000Z'
        createdBy:
          type: string
          description: Name of the portal user who created the case
          example: Jane Advisor
        updatedAt:
          type: string
          format: date-time
          description: When the case was last modified (ISO 8601)
          example: '2026-08-16T11:03:22.000Z'
        state:
          type: string
          enum:
            - open
          description: The Case is still in play
          example: open
        waitingOn:
          type: string
          enum:
            - merchant
            - prets
          description: Party that must act next
          example: prets
        waitingSince:
          type: string
          format: date-time
          description: >-
            When `waitingOn` last changed. Present only when `waitingOn` is not
            `none`.
          example: '2026-08-14T09:12:04.000Z'
      required:
        - caseId
        - quote
        - type
        - subject
        - stage
        - createdAt
        - updatedAt
        - state
        - waitingOn
        - waitingSince
      additionalProperties: false
      description: Open Case whose next action sits with the merchant or Prets
    CaseOpenIdle:
      type: object
      properties:
        caseId:
          type: string
          pattern: ^cas_[0-9A-HJKMNP-TV-Z]{26}$
          description: Platform case id (`cas_{ULID}`)
          example: cas_01ARZ3NDEKTSV4RRFFQ69G5AV
        quote:
          $ref: '#/components/schemas/QuoteRef'
        type:
          type: string
          enum:
            - general
            - merchant_feedback
            - prets_feedback
          description: Merchant-facing case category
          example: merchant_feedback
        requestType:
          type: string
          enum:
            - Cancel Application
            - Reschedule Meeting
            - Contact Customer
            - Application Final
            - Other
            - Customer Unreachable
            - Quote Under Consideration
            - Customer No Show & Unreachable
            - Customer No Show & VM
            - Cancellation Offer Requested
            - Schedule Installation
            - General Question
            - Compliance/Risk
            - Documents Requested
          description: The specific request; present on feedback cases
          example: Reschedule Meeting
        subject:
          type: string
          description: Case subject
          example: Customer wants a later install date
        description:
          type: string
          description: >-
            Read-only mirror of the opening request. The conversation lives on
            `/messages`.
          example: The customer asked to move the appointment.
        stage:
          type: string
          description: >-
            Informational Salesforce stage string. Not a published enum — switch
            on `state` and `waitingOn`.
          example: Prets Action
        createdAt:
          type: string
          format: date-time
          description: When the case was created (ISO 8601)
          example: '2026-08-14T09:12:04.000Z'
        createdBy:
          type: string
          description: Name of the portal user who created the case
          example: Jane Advisor
        updatedAt:
          type: string
          format: date-time
          description: When the case was last modified (ISO 8601)
          example: '2026-08-16T11:03:22.000Z'
        state:
          type: string
          enum:
            - open
          description: The Case is still in play
          example: open
        waitingOn:
          type: string
          enum:
            - none
          description: No party is waiting — typical of New before the first handoff
          example: none
      required:
        - caseId
        - quote
        - type
        - subject
        - stage
        - createdAt
        - updatedAt
        - state
        - waitingOn
      additionalProperties: false
      description: Open Case that is not waiting on merchant or Prets
    CaseClosed:
      type: object
      properties:
        caseId:
          type: string
          pattern: ^cas_[0-9A-HJKMNP-TV-Z]{26}$
          description: Platform case id (`cas_{ULID}`)
          example: cas_01ARZ3NDEKTSV4RRFFQ69G5AV
        quote:
          $ref: '#/components/schemas/QuoteRef'
        type:
          type: string
          enum:
            - general
            - merchant_feedback
            - prets_feedback
          description: Merchant-facing case category
          example: merchant_feedback
        requestType:
          type: string
          enum:
            - Cancel Application
            - Reschedule Meeting
            - Contact Customer
            - Application Final
            - Other
            - Customer Unreachable
            - Quote Under Consideration
            - Customer No Show & Unreachable
            - Customer No Show & VM
            - Cancellation Offer Requested
            - Schedule Installation
            - General Question
            - Compliance/Risk
            - Documents Requested
          description: The specific request; present on feedback cases
          example: Reschedule Meeting
        subject:
          type: string
          description: Case subject
          example: Customer wants a later install date
        description:
          type: string
          description: >-
            Read-only mirror of the opening request. The conversation lives on
            `/messages`.
          example: The customer asked to move the appointment.
        stage:
          type: string
          description: >-
            Informational Salesforce stage string. Not a published enum — switch
            on `state` and `waitingOn`.
          example: Prets Action
        createdAt:
          type: string
          format: date-time
          description: When the case was created (ISO 8601)
          example: '2026-08-14T09:12:04.000Z'
        createdBy:
          type: string
          description: Name of the portal user who created the case
          example: Jane Advisor
        updatedAt:
          type: string
          format: date-time
          description: When the case was last modified (ISO 8601)
          example: '2026-08-16T11:03:22.000Z'
        state:
          type: string
          enum:
            - closed
          description: The Case has been closed
          example: closed
        waitingOn:
          type: string
          enum:
            - none
          description: Closed Cases always project `none` rather than dropping the field
          example: none
        closeReason:
          type: string
          enum:
            - resolved
            - dismissed
            - withdrawn
          description: Why the Case was closed, when one was given
          example: dismissed
        closedAt:
          type: string
          format: date-time
          description: When the Case was closed (ISO 8601)
          example: '2026-08-05T15:41:10.000Z'
      required:
        - caseId
        - quote
        - type
        - subject
        - stage
        - createdAt
        - updatedAt
        - state
        - waitingOn
      additionalProperties: false
      description: Closed Case. `waitingOn` is `none`; `waitingSince` is omitted.
    QuoteRef:
      type: object
      properties:
        quoteId:
          type: string
          pattern: ^qot_[0-9A-HJKMNP-TV-Z]{26}$
          description: Quote this resource is linked to
          example: qot_01ARZ3NDEKTSV4RRFFQ69G5AV
      required:
        - quoteId
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````