---
title: "List punishments by user id"
method: GET
path: "/users/{id}/punishments"
tags: ["Penalty"]
---

# List punishments by user id

`GET /users/{id}/punishments`

## Path parameters

- `id` integer, required

## Response `200`

OK

- ModelsPunishment[]
  - `created_at` string — time when this punishment creates
  - `day` integer
  - `division` ModelsDivision
    - `description` string
    - `division_id` integer — / generated field
    - `hidden` boolean
    - `id` integer — / saved fields
    - `name` string — / base info
    - `pinned` ModelsHole[] — return pinned hole to frontend
      - `ai_summary_available` boolean — AI 摘要可用性，仅用于序列化
      - `division_id` integer — 所属 division 的 id
      - `favorite_count` integer
      - `floors` object — 返回给前端的楼层列表，包括首楼、尾楼和预加载的前 n 个楼层
        - `first_floor` ModelsFloor
          - `anonyname` string — a random username
          - `content` string — content of the floor, no more than 15000, should be sensitive checked, no more than 10000 in frontend
          - `deleted` boolean — whether the floor is deleted
          - `dislike` integer — dislike number
          - `disliked` boolean — whether the user has disliked the floor
          - `floor_id` integer — old version compatibility
          - `fold` string[] — fold reason, for v1
          - `fold_v2` string — fold reason
          - `hole_id` integer — the hole it belongs to
          - `id` integer — / saved fields
          - `is_actual_sensitive` boolean — manual sensitive check
          - `is_me` boolean — whether the user is the author of the floor
          - `is_sensitive` boolean — auto sensitive check
          - `like` integer — like number
          - `liked` boolean — whether the user has liked the floor
          - `mention` ModelsFloor[] — many to many mentions
          - `modified` integer — the modification times of floor.content
          - `ranking` integer — the ranking of this floor in the hole
          - `reply_to` integer — floor_id that it replies to, for dialog mode, in the same hole
          - `sensitive_detail` string — auto sensitive check detail
          - `special_tag` string — additional info, like "树洞管理团队"
          - `time_created` string
          - `time_updated` string
        - `last_floor` ModelsFloor
          - `anonyname` string — a random username
          - `content` string — content of the floor, no more than 15000, should be sensitive checked, no more than 10000 in frontend
          - `deleted` boolean — whether the floor is deleted
          - `dislike` integer — dislike number
          - `disliked` boolean — whether the user has disliked the floor
          - `floor_id` integer — old version compatibility
          - `fold` string[] — fold reason, for v1
          - `fold_v2` string — fold reason
          - `hole_id` integer — the hole it belongs to
          - `id` integer — / saved fields
          - `is_actual_sensitive` boolean — manual sensitive check
          - `is_me` boolean — whether the user is the author of the floor
          - `is_sensitive` boolean — auto sensitive check
          - `like` integer — like number
          - `liked` boolean — whether the user has liked the floor
          - `mention` ModelsFloor[] — many to many mentions
          - `modified` integer — the modification times of floor.content
          - `ranking` integer — the ranking of this floor in the hole
          - `reply_to` integer — floor_id that it replies to, for dialog mode, in the same hole
          - `sensitive_detail` string — auto sensitive check detail
          - `special_tag` string — additional info, like "树洞管理团队"
          - `time_created` string
          - `time_updated` string
        - `prefetch` ModelsFloor[] — 预加载的楼层
          - `anonyname` string — a random username
          - `content` string — content of the floor, no more than 15000, should be sensitive checked, no more than 10000 in frontend
          - `deleted` boolean — whether the floor is deleted
          - `dislike` integer — dislike number
          - `disliked` boolean — whether the user has disliked the floor
          - `floor_id` integer — old version compatibility
          - `fold` string[] — fold reason, for v1
          - `fold_v2` string — fold reason
          - `hole_id` integer — the hole it belongs to
          - `id` integer — / saved fields
          - `is_actual_sensitive` boolean — manual sensitive check
          - `is_me` boolean — whether the user is the author of the floor
          - `is_sensitive` boolean — auto sensitive check
          - `like` integer — like number
          - `liked` boolean — whether the user has liked the floor
          - `mention` ModelsFloor[] — many to many mentions
          - `modified` integer — the modification times of floor.content
          - `ranking` integer — the ranking of this floor in the hole
          - `reply_to` integer — floor_id that it replies to, for dialog mode, in the same hole
          - `sensitive_detail` string — auto sensitive check detail
          - `special_tag` string — additional info, like "树洞管理团队"
          - `time_created` string
          - `time_updated` string
      - `frozen` boolean — 冻结状态，仅管理员可见 true FrozenFrontend *bool `json:"frozen,omitempty" gorm:"-:all"` FrozenFrontend *bool `json:"frozen" gorm:"-:all"` Compatibility for Swift client
      - `good` boolean
      - `hidden` boolean — 是否隐藏，隐藏的洞用户不可见，管理员可见
      - `hole_id` integer — 兼容旧版 id
      - `id` integer — / saved fields
      - `locked` boolean — 锁定帖子，如果锁定则非管理员无法发帖，也无法修改已有发帖
      - `no_purge` boolean
      - `reply` integer — 回复量（即该洞下 floor 的数量 - 1）
      - `subscription_count` integer
      - `tags` ModelsTag[] — tag 列表；不超过 10 个
        - `id` integer — / saved fields
        - `name` string — / base info
        - `nsfw` boolean
        - `tag_id` integer — / generated field
        - `temperature` integer
      - `time_created` string
      - `time_deleted` GormDeletedAt
        - `time` string
        - `valid` boolean — Valid is true if Time is not NULL
      - `time_updated` string
      - `view` integer — 浏览量
    - `show_in_home_page` boolean
    - `time_created` string
    - `time_updated` string
  - `division_id` integer
  - `duration` integer
  - `end_time` string — end_time of this punishment
  - `floor` ModelsFloor
    - `anonyname` string — a random username
    - `content` string — content of the floor, no more than 15000, should be sensitive checked, no more than 10000 in frontend
    - `deleted` boolean — whether the floor is deleted
    - `dislike` integer — dislike number
    - `disliked` boolean — whether the user has disliked the floor
    - `floor_id` integer — old version compatibility
    - `fold` string[] — fold reason, for v1
    - `fold_v2` string — fold reason
    - `hole_id` integer — the hole it belongs to
    - `id` integer — / saved fields
    - `is_actual_sensitive` boolean — manual sensitive check
    - `is_me` boolean — whether the user is the author of the floor
    - `is_sensitive` boolean — auto sensitive check
    - `like` integer — like number
    - `liked` boolean — whether the user has liked the floor
    - `mention` ModelsFloor[] — many to many mentions
    - `modified` integer — the modification times of floor.content
    - `ranking` integer — the ranking of this floor in the hole
    - `reply_to` integer — floor_id that it replies to, for dialog mode, in the same hole
    - `sensitive_detail` string — auto sensitive check detail
    - `special_tag` string — additional info, like "树洞管理团队"
    - `time_created` string
    - `time_updated` string
  - `floor_id` integer — punished because of this floor
  - `id` integer
  - `made_by` integer — admin user_id who made this punish
  - `reason` string — reason
  - `start_time` string — start from end_time of previous punishment (punishment accumulation of different floors) if no previous punishment or previous punishment end time less than time.Now() (synced), set start time time.Now()
  - `updated_at` string
  - `user_id` integer — user punished

---

[API](https://skmtc.net/opentreehole/apis/open-tree-hole.md) · [All operations](https://skmtc.net/opentreehole/apis/open-tree-hole/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/opentreehole/open-tree-hole/revisions/a91f11ffe9a4/schema)
