> For the complete documentation index, see [llms.txt](https://api-kit.prix.im/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://api-kit.prix.im/platform/search-custom-table.md).

# 커스텀테이블 목록 조회 API

커스텀테이블 목록과 각 테이블의 컬럼 정의를 조회할 수 있는 API를 제공합니다.

타임시트, 연차/휴가 등 비즈니스별로 구성한 커스텀테이블 목록과 각 테이블의 컬럼 정의를 조회할 수 있는 API입니다.

* 테이블은 프릭스 어드민에서 설정한 `slug` 또는 테이블 `uuid`로 식별합니다. slug는 프릭스 팀에 요청해 설정할 수 있습니다.
* 테이블과 컬럼은 API 권한이 연결된 멤버가 속한 팀의 조회 권한 범위로 반환됩니다.

<br>

## `GET` kit-api/v1/custom-tables

Method: GET\
Endpoint: kit-api/v1/custom-tables

<br>

## Example

```
...kit-api/v1/custom-tables
```

<br>

## Response

```json
{
  "ok": true, // api 성공
  "data": {
    "customTables": [
      {
        "uuid": "706a317d-5fbb-4870-930b-eade57f4f955", // 테이블 식별값
        "slug": "timesheet", // 테이블 slug (설정되지 않았으면 null)
        "title": "타임시트", // 테이블명
        "option": {
          "hasUsers": true, // 담당자 컬럼 사용 여부
          "hasCustomers": false, // 고객 컬럼 사용 여부
          "hasDeals": true // 프로젝트 컬럼 사용 여부
        },
        "columns": [
          // 컬럼 정의 (order 순)
          { "id": 101, "name": "근무일", "slug": "work-date", "type": "DATE", "required": true, "order": 1 },
          {
            "id": 102,
            "name": "업무 구분",
            "slug": "work-type",
            "type": "TAG",
            "required": false,
            "order": 2,
            "tags": [{ "id": 5, "name": "자문" }, { "id": 6, "name": "소송" }] // TAG 타입만: 선택 가능한 태그 목록
          },
          { "id": 103, "name": "시간(분)", "slug": "minutes", "type": "NUMBER", "required": true, "order": 3 },
          {
            "id": 104,
            "name": "관련 안건",
            "slug": "matter",
            "type": "RELATION",
            "required": false,
            "order": 4,
            "relation": {
              // RELATION 타입만: 참조 대상 정보
              "targetEntityType": "CUSTOM_TABLE", // CUSTOM_TABLE, CUSTOMER
              "customTableSlug": "matters", // 대상이 커스텀테이블일 때 (없으면 null)
              "customTableUuid": "a3c1..." // 대상이 커스텀테이블일 때 (없으면 null)
            }
          },
          { "id": 105, "name": "안건 담당자", "slug": "matter-owner", "type": "LOOKUP", "required": false, "order": 5 }
        ]
      }
    ]
  }
}
```

<br>

```json
{
  "ok": false, // api 실패
  "message": "error message", // Error가 존재하면 message(string)로 전달
  "errorCode": "ERROR_CODE"
}
```

<br>
