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

# Get end reasons

> Get a paginated list of the end reasons available on the tenant — the standard end reasons and the ones the tenant has created — sorted by how often they are used. Stop paging when a page comes back with fewer items than pageSize.

**Required scope:** `read:end-reasons`



## OpenAPI

````yaml GET /v1/{tenantId}/end-reasons
openapi: 3.1.0
info:
  title: Debbie API Docs
  description: >
    The Debbie API is a RESTful interface, allowing you to programmatically

    update, add and access your data in the platform. It provides predictable
    URLs

    for accessing resources, and uses built-in HTTP features to receive commands
    and

    return responses. This makes it easy to communicate with third party
    systems.


    ## Idempotency


    The Debbie API supports idempotency for non-idempotent requests through the
    optional `Idempotency-Key` header. 

    This ensures that retrying the same request multiple times will produce the
    same result, preventing duplicate operations.


    ### Using Idempotency Keys


    - Include an `Idempotency-Key` header with a unique string (we recommend
    UUIDs)  

    - Maximum key length is 64 characters

    - Keys are valid for 48 hours

    - Responses served from the idempotency cache include an
    `Idempotency-Cached` header


    ### Example

    ```http

    Idempotency-Key: 123e4567-e89b-12d3-a456-426614174000

    ```


    ### Error Cases

    - Invalid key format: 400 Bad Request

    - Reusing a key for a different request: 400 Bad Request


    ### Best Practices

    - Use a new key for each unique business transaction

    - Use the same key when retrying a failed request 

    - Store keys with request details for debugging
  contact:
    email: api-support@debbie.dk
  version: v0.1.0
servers:
  - url: https://api.debbiecollect.com
security:
  - bearerAuth: []
tags:
  - name: Authorization
    description: Endpoints for interacting with authorization
  - name: Cases
    description: Endpoints for interacting with cases
  - name: Customers
    description: Endpoints for interacting with customers
  - name: Creditors
    description: Endpoints for interacting with creditors
  - name: Ultimate creditors
    description: >-
      Endpoints for interacting with ultimate creditors. An ultimate creditor is
      the original creditor behind the creditor on a case — for example when a
      debt collection agency forwards cases on behalf of its own client. On
      cases with an ultimate creditor, the creditor template mentions (name,
      address and company identifier) use the details of the ultimate creditor.
  - name: Updates
    description: Endpoints for interacting with updates
  - name: Users
    description: Endpoints for interacting with updates
  - name: Files
    description: Endpoints for interacting with files
  - name: Case vouchers
    description: Endpoints for interacting with case vouchers
  - name: Voucher types
    description: The voucher types of the tenant, used to categorize case vouchers
  - name: Interactions
    description: >-
      Interactions are messages and notes on a case, for example an incoming
      message from a debtor.
  - name: Billing
    description: Endpoints for interacting with billing
  - name: Links
    description: Endpoints for generating links
  - name: Webhooks
    description: >-
      Debbie provides a range of webhooks. To try them out please visit Debbie
      Caseworker and navigate to Settings --> Developers --> Webhooks.
  - name: End reasons
    description: Endpoints for interacting with end reasons
  - name: Case groups
    description: Endpoints for interacting with case groups
externalDocs:
  description: Find out more about Debbie here
  url: https://debbiecollect.com
paths:
  /v1/{tenantId}/end-reasons:
    get:
      tags:
        - End reasons
      summary: Get end reasons
      description: >-
        Get a paginated list of the end reasons available on the tenant — the
        standard end reasons and the ones the tenant has created — sorted by how
        often they are used. Stop paging when a page comes back with fewer items
        than pageSize.


        **Required scope:** `read:end-reasons`
      operationId: get-end-reasons
      parameters:
        - in: path
          name: tenantId
          schema:
            type: string
            format: uuid
          required: true
          description: Id of the tenant the end reasons belong to
        - in: query
          name: page
          schema:
            type: integer
            minimum: 0
          example: 0
          description: Page to get. Starting from 0.
        - in: query
          name: pageSize
          schema:
            type: integer
            maximum: 500
          example: 100
          description: Number of items per page.
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  meta:
                    type: object
                    properties:
                      currentPage:
                        type: integer
                        example: 0
                      pageSize:
                        type: integer
                        example: 100
                  items:
                    type: array
                    items:
                      $ref: '#/components/schemas/EndReason'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '422':
          $ref: '#/components/responses/UnprocessableContent'
components:
  schemas:
    EndReason:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Id of the end reason
        tenantId:
          type:
            - string
            - 'null'
          format: uuid
          description: >-
            Id of the tenant that created the end reason. null for the standard
            end reasons shared by every tenant.
        handle:
          type: string
          description: Stable machine readable handle, e.g. PAID
        label:
          type: string
          description: Human readable label shown when ending a case
        category:
          type:
            - string
            - 'null'
          enum:
            - SUCCESS
            - UNRESOLVED
            - NOT_POSSIBLE
            - ERROR
            - null
          description: >-
            Category the end reason counts as in resolution statistics. null
            when uncategorized.
        proxyHandle:
          type:
            - string
            - 'null'
          description: >-
            Handle this end reason is reported as through the API, when the
            tenant has configured a proxy
        createdAt:
          type: string
          description: When the end reason was created
        createdBy:
          type:
            - object
            - 'null'
          properties:
            id:
              type:
                - string
                - 'null'
            type:
              type: string
          description: Who created the end reason. null for the standard end reasons.
  responses:
    UnauthorizedError:
      description: Access token missing or invalid
    UnprocessableContent:
      description: Unable to process the contained instructions.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Authentication can be done by using a bearer token in the Authorization
        header. This is done using the following format `Authorization: Bearer
        {token}`.

````