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

# List collection cases

> Retrieve collection cases with their customer, outstanding amount, days late and next step.



## OpenAPI

````yaml get /v1/collections/cases
openapi: 3.1.0
info:
  title: Hyperline API
  version: 0.0.0
servers:
  - url: https://api.hyperline.co
  - url: https://sandbox.api.hyperline.co
security: []
paths:
  /v1/collections/cases:
    get:
      tags:
        - Collections > Cases
      summary: List collection cases
      description: >-
        Retrieve collection cases with their customer, outstanding amount, days
        late and next step.
      operationId: listCollectionCases
      parameters:
        - schema:
            type:
              - number
              - 'null'
            minimum: 0
            maximum: 100
            default: 50
          required: false
          name: take
          in: query
        - schema:
            type:
              - number
              - 'null'
            minimum: 0
            default: 0
          required: false
          name: skip
          in: query
        - schema:
            type: string
            enum:
              - opened_at
              - next_action_at
              - amount_at_open
              - updated_at
            default: opened_at
            description: Field to sort the cases by.
          required: false
          description: Field to sort the cases by.
          name: sort
          in: query
        - schema:
            type: string
            enum:
              - asc
              - desc
            default: desc
            description: Sort order.
          required: false
          description: Sort order.
          name: order
          in: query
        - schema:
            type: string
          required: false
          name: id
          in: query
        - schema:
            type: string
          required: false
          name: id__not
          in: query
        - schema:
            type: string
          required: false
          name: id__equals
          in: query
        - schema:
            type: string
          required: false
          name: id__contains
          in: query
        - schema:
            type: string
          required: false
          name: id__startsWith
          in: query
        - schema:
            type: string
          required: false
          name: id__endWith
          in: query
        - schema:
            type: string
            description: >-
              Rows whose `id` is one of these values. Comma-separated, max 100
              values.
          required: false
          description: >-
            Rows whose `id` is one of these values. Comma-separated, max 100
            values.
          name: id__in
          in: query
        - schema:
            type: string
            description: >-
              Rows whose `id` is none of these values. Comma-separated, max 100
              values.
          required: false
          description: >-
            Rows whose `id` is none of these values. Comma-separated, max 100
            values.
          name: id__notIn
          in: query
        - schema:
            anyOf:
              - type: string
                enum:
                  - agent_working
                  - promised
                  - disputed
                  - paused
                  - closed
                  - open
              - type: string
                description: agent_working,promised
          required: false
          name: status
          in: query
        - schema:
            anyOf:
              - type: string
                enum:
                  - agent_working
                  - promised
                  - disputed
                  - paused
                  - closed
                  - open
              - type: string
                description: agent_working,promised
          required: false
          name: status__in
          in: query
        - schema:
            type: string
            description: >-
              Rows that do not match this `status` value. Values: agent_working,
              promised, disputed, paused, closed, open.
          required: false
          description: >-
            Rows that do not match this `status` value. Values: agent_working,
            promised, disputed, paused, closed, open.
          name: status__not
          in: query
        - schema:
            type: string
            description: >-
              Rows that match none of these `status` values. Comma-separated,
              max 100 values. Values: agent_working, promised, disputed, paused,
              closed, open.
          required: false
          description: >-
            Rows that match none of these `status` values. Comma-separated, max
            100 values. Values: agent_working, promised, disputed, paused,
            closed, open.
          name: status__notIn
          in: query
        - schema:
            type: string
          required: false
          name: owner_user_id
          in: query
        - schema:
            type: string
          required: false
          name: owner_user_id__not
          in: query
        - schema:
            type: string
          required: false
          name: owner_user_id__equals
          in: query
        - schema:
            type: string
          required: false
          name: owner_user_id__contains
          in: query
        - schema:
            type: string
          required: false
          name: owner_user_id__startsWith
          in: query
        - schema:
            type: string
          required: false
          name: owner_user_id__endWith
          in: query
        - schema:
            anyOf:
              - anyOf:
                  - type: boolean
                  - type: string
                    enum:
                      - 'true'
                      - 'false'
              - type: string
                enum:
                  - ''
          required: false
          name: owner_user_id__isNull
          in: query
        - schema:
            anyOf:
              - anyOf:
                  - type: boolean
                  - type: string
                    enum:
                      - 'true'
                      - 'false'
              - type: string
                enum:
                  - ''
          required: false
          name: owner_user_id__isNotNull
          in: query
        - schema:
            type: string
            description: >-
              Rows whose `owner_user_id` is one of these values.
              Comma-separated, max 100 values.
          required: false
          description: >-
            Rows whose `owner_user_id` is one of these values. Comma-separated,
            max 100 values.
          name: owner_user_id__in
          in: query
        - schema:
            type: string
            description: >-
              Rows whose `owner_user_id` is none of these values.
              Comma-separated, max 100 values. Rows where `owner_user_id` is
              empty are not returned; use `owner_user_id__isNull=true` to get
              them.
          required: false
          description: >-
            Rows whose `owner_user_id` is none of these values. Comma-separated,
            max 100 values. Rows where `owner_user_id` is empty are not
            returned; use `owner_user_id__isNull=true` to get them.
          name: owner_user_id__notIn
          in: query
        - schema:
            type: string
          required: false
          name: playbook_id
          in: query
        - schema:
            type: string
          required: false
          name: playbook_id__not
          in: query
        - schema:
            type: string
          required: false
          name: playbook_id__equals
          in: query
        - schema:
            type: string
          required: false
          name: playbook_id__contains
          in: query
        - schema:
            type: string
          required: false
          name: playbook_id__startsWith
          in: query
        - schema:
            type: string
          required: false
          name: playbook_id__endWith
          in: query
        - schema:
            type: string
            description: >-
              Rows whose `playbook_id` is one of these values. Comma-separated,
              max 100 values.
          required: false
          description: >-
            Rows whose `playbook_id` is one of these values. Comma-separated,
            max 100 values.
          name: playbook_id__in
          in: query
        - schema:
            type: string
            description: >-
              Rows whose `playbook_id` is none of these values. Comma-separated,
              max 100 values.
          required: false
          description: >-
            Rows whose `playbook_id` is none of these values. Comma-separated,
            max 100 values.
          name: playbook_id__notIn
          in: query
        - schema:
            type: string
          required: false
          name: customer_id
          in: query
        - schema:
            type: string
          required: false
          name: customer_id__not
          in: query
        - schema:
            type: string
          required: false
          name: customer_id__equals
          in: query
        - schema:
            type: string
          required: false
          name: customer_id__contains
          in: query
        - schema:
            type: string
          required: false
          name: customer_id__startsWith
          in: query
        - schema:
            type: string
          required: false
          name: customer_id__endWith
          in: query
        - schema:
            type: string
            description: >-
              Rows whose `customer_id` is one of these values. Comma-separated,
              max 100 values.
          required: false
          description: >-
            Rows whose `customer_id` is one of these values. Comma-separated,
            max 100 values.
          name: customer_id__in
          in: query
        - schema:
            type: string
            description: >-
              Rows whose `customer_id` is none of these values. Comma-separated,
              max 100 values.
          required: false
          description: >-
            Rows whose `customer_id` is none of these values. Comma-separated,
            max 100 values.
          name: customer_id__notIn
          in: query
        - schema:
            type: string
            description: 'Rows whose `needs_review` is this value: true or false.'
          required: false
          description: 'Rows whose `needs_review` is this value: true or false.'
          name: needs_review
          in: query
        - schema:
            type: string
            description: Rows whose `needs_review` is not this value.
          required: false
          description: Rows whose `needs_review` is not this value.
          name: needs_review__not
          in: query
        - schema:
            type: string
            format: date-time
          required: false
          name: opened_at
          in: query
        - schema:
            type: string
            format: date-time
          required: false
          name: opened_at__not
          in: query
        - schema:
            type: string
            format: date-time
          required: false
          name: opened_at__equals
          in: query
        - schema:
            type: string
            format: date-time
          required: false
          name: opened_at__lt
          in: query
        - schema:
            type: string
            format: date-time
          required: false
          name: opened_at__lte
          in: query
        - schema:
            type: string
            format: date-time
          required: false
          name: opened_at__gt
          in: query
        - schema:
            type: string
            format: date-time
          required: false
          name: opened_at__gte
          in: query
        - schema:
            type: string
            format: date-time
          required: false
          name: next_action_at
          in: query
        - schema:
            type: string
            format: date-time
          required: false
          name: next_action_at__not
          in: query
        - schema:
            type: string
            format: date-time
          required: false
          name: next_action_at__equals
          in: query
        - schema:
            type: string
            format: date-time
          required: false
          name: next_action_at__lt
          in: query
        - schema:
            type: string
            format: date-time
          required: false
          name: next_action_at__lte
          in: query
        - schema:
            type: string
            format: date-time
          required: false
          name: next_action_at__gt
          in: query
        - schema:
            type: string
            format: date-time
          required: false
          name: next_action_at__gte
          in: query
        - schema:
            anyOf:
              - anyOf:
                  - type: boolean
                  - type: string
                    enum:
                      - 'true'
                      - 'false'
              - type: string
                enum:
                  - ''
          required: false
          name: next_action_at__isNull
          in: query
        - schema:
            anyOf:
              - anyOf:
                  - type: boolean
                  - type: string
                    enum:
                      - 'true'
                      - 'false'
              - type: string
                enum:
                  - ''
          required: false
          name: next_action_at__isNotNull
          in: query
        - schema:
            type: string
          required: false
          name: search
          in: query
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedCollectionCase'
        '403':
          description: Collections is not enabled on the account
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                required:
                  - message
      security:
        - bearer: []
components:
  schemas:
    PaginatedCollectionCase:
      type: object
      properties:
        meta:
          type: object
          properties:
            total:
              type: number
              description: Total of existing items.
              example: 1
            taken:
              type: number
              description: Number of items returned.
              example: 1
            skipped:
              type: number
              description: Number of items skipped.
              example: 0
          required:
            - total
            - taken
            - skipped
        data:
          type: array
          items:
            $ref: '#/components/schemas/CollectionCase'
          description: List of CollectionCase.
      required:
        - meta
        - data
    CollectionCase:
      type: object
      properties:
        id:
          type: string
          description: Collection case ID.
          example: ccs_3GeHvsTaFsPgMf
        customer:
          type:
            - object
            - 'null'
          properties:
            id:
              type: string
              description: Customer ID.
              example: cus_Typ0px2W0aiEtl
            name:
              type: string
              description: Name of the customer.
          required:
            - id
            - name
          description: Customer the case recovers.
        playbook_id:
          type: string
          description: ID of the playbook running the case.
          example: cpb_2bHxVsTaFsPgMf
        status:
          type: string
          enum:
            - agent_working
            - promised
            - disputed
            - paused
            - closed
          description: Status of the case.
        close_reason:
          type:
            - string
            - 'null'
          enum:
            - paid
            - settled
            - written_off
            - merged
          description: Why the case was closed. `null` while the case is open.
        owner_user_id:
          type:
            - string
            - 'null'
          description: ID of the user who owns the case.
          example: usr_8eKnRm5bWdVQk3
        needs_review:
          type: boolean
          description: Whether the case waits for a person.
        sender_id:
          type:
            - string
            - 'null'
          description: ID of the sender profile the case emails are sent as.
        agent_paused_reason:
          type:
            - string
            - 'null'
          description: Why the agent is paused on the case.
        agent_status:
          type: string
          enum:
            - idle
            - thinking
          description: >-
            `thinking` while an agent run is requested or running on the case,
            else `idle`.
        agent_run_reason:
          type:
            - string
            - 'null'
          enum:
            - case_opened
            - step_due
            - email_received
            - silence_checkpoint
            - partial_payment
            - payment_unmatched
            - promise_due
            - promise_broken
            - installment_missed
            - manual
            - user_instruction
            - proposal_rejected
            - proposals_decided
            - case_closed
          description: Why the agent is thinking. `null` when the agent is idle.
        escalation:
          type:
            - object
            - 'null'
          properties:
            reason:
              type: string
              description: Why the agent escalated.
            suggestion:
              type:
                - string
                - 'null'
              description: What the agent suggests doing.
            escalated_at:
              type: string
              format: date-time
              description: Escalation date.
              example: '2024-12-20T16:04:11Z'
          required:
            - reason
            - suggestion
            - escalated_at
          description: Set while the agent waits for a person to answer it on the case.
        currency:
          type: string
          enum:
            - EUR
            - AED
            - AFN
            - XCD
            - ALL
            - AMD
            - AOA
            - ARS
            - USD
            - AUD
            - AWG
            - AZN
            - BAM
            - BBD
            - BDT
            - BGN
            - BHD
            - BIF
            - XOF
            - BMD
            - BND
            - BOB
            - BRL
            - BSD
            - BTN
            - NOK
            - BWP
            - BYR
            - BZD
            - CAD
            - CDF
            - XAF
            - CHF
            - NZD
            - CLP
            - CNY
            - COP
            - CRC
            - CUP
            - CVE
            - ANG
            - CZK
            - DJF
            - DKK
            - DOP
            - DZD
            - EGP
            - MAD
            - ERN
            - ETB
            - FJD
            - FKP
            - GBP
            - GEL
            - GHS
            - GIP
            - GMD
            - GNF
            - GTQ
            - GYD
            - HKD
            - HNL
            - HRK
            - HTG
            - HUF
            - IDR
            - ILS
            - INR
            - IQD
            - IRR
            - ISK
            - JMD
            - JOD
            - JPY
            - KES
            - KGS
            - KHR
            - KMF
            - KPW
            - KRW
            - KWD
            - KYD
            - KZT
            - LAK
            - LBP
            - LKR
            - LRD
            - LSL
            - LYD
            - MDL
            - MGA
            - MKD
            - MMK
            - MNT
            - MOP
            - MRO
            - MUR
            - MVR
            - MWK
            - MXN
            - MYR
            - MZN
            - NAD
            - XPF
            - NGN
            - NIO
            - NPR
            - OMR
            - PAB
            - PEN
            - PGK
            - PHP
            - PKR
            - PLN
            - PYG
            - QAR
            - RON
            - RSD
            - RUB
            - RWF
            - SAR
            - SBD
            - SCR
            - SDG
            - SEK
            - SGD
            - SHP
            - SLL
            - SOS
            - SRD
            - SSP
            - STD
            - SYP
            - SZL
            - THB
            - TJS
            - TMT
            - TND
            - TOP
            - TRY
            - TTD
            - TWD
            - TZS
            - UAH
            - UGX
            - UYU
            - UZS
            - VEF
            - VND
            - VUV
            - WST
            - YER
            - ZAR
            - ZMW
            - ZWL
          description: Currency of the case.
          example: EUR
        amount_at_open:
          type: string
          pattern: ^\d+(\.\d+)?$
          description: >-
            Late balance when the case opened, in major units, as a decimal
            string.
          example: '1250.00'
        outstanding_amount:
          type: string
          pattern: ^\d+(\.\d+)?$
          description: >-
            Amount the case invoices still owe in the case currency, in major
            units, as a decimal string.
          example: '1250.00'
        other_currency_invoice_count:
          type: integer
          description: >-
            Number of case invoices in another currency, left out of
            `outstanding_amount`.
        days_late:
          type: integer
          description: Days past the due date of the oldest case invoice.
          example: 21
        invoice_count:
          type: integer
          description: Number of invoices in the case.
          example: 2
        next_action_at:
          type:
            - string
            - 'null'
          format: date-time
          description: Date of the next recovery step.
          example: '2024-12-20T16:04:11Z'
        next_step:
          type:
            - object
            - 'null'
          properties:
            id:
              type: string
              description: Case step ID.
            kind:
              type: string
              enum:
                - email
                - task
                - call
                - escalate
                - pause_service
              description: Kind of the step.
          required:
            - id
            - kind
          description: Next recovery step of the case.
        opened_at:
          type: string
          format: date-time
          description: Opening date.
          example: '2024-12-20T16:04:11Z'
        closed_at:
          type:
            - string
            - 'null'
          format: date-time
          description: Closing date.
          example: '2024-12-20T16:04:11Z'
        updated_at:
          type: string
          format: date-time
          description: Last update date.
          example: '2024-12-20T16:04:11Z'
      required:
        - id
        - customer
        - playbook_id
        - status
        - close_reason
        - owner_user_id
        - needs_review
        - sender_id
        - agent_paused_reason
        - agent_status
        - agent_run_reason
        - escalation
        - currency
        - amount_at_open
        - outstanding_amount
        - other_currency_invoice_count
        - days_late
        - invoice_count
        - next_action_at
        - next_step
        - opened_at
        - closed_at
        - updated_at
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      bearerFormat: JWT

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.