> 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-document.md).

# 영업문서 목록 조회 API

플랫폼 서비스에서 특정 비즈니스의 영업문서 목록을 조회할 수 있는 API를 제공합니다.

<br>

## `GET` kit-api/v1/documents

Method: GET\
Endpoint: kit-api/v1/documents

<br>

## Example

```
...kit-api/v1/documents?offset=0&limit=10&documentType=ESTIMATE&customerIds=8,9
```

<br>

## Request Query

| Key          | Description                 | Required |
| ------------ | --------------------------- | -------- |
| limit        | 목록 개수 (default 10, max 100) | no       |
| offset       | 스킵할 목록 개수                   | no       |
| documentType | 검색할 영업문서 종류(인보이스, 견적서)      | yes      |
| customerIds  | 검색할 영업문서에 연결된 고객 id 목록      | no       |

<br>

## Response

```json
{
  "ok": true,
  "data": {
    "total": 2,
    "documents": [
      {
        "uuid": "ecd7d29c-6aab-481f-8939-e3ca3e1a37cf",
        "title": "견적서 제목",
        "status": "CREATED", // 영업문서 상태 (CREATED, SENT, APPROVED, DELETED)
        "createdAt": "2024-07-05T00:00:00.000Z", // 생성일
        "updatedAt": "2024-10-15T00:00:00.000Z", // 변경일
        "documentType": "ESTIMATE" // 영업문서 타입 (ESTIMATE, INVOICE)
      }
    ]
  }
}
```

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

<br>

## Error Codes

| Status Code | Error Code               | Description           |
| ----------- | ------------------------ | --------------------- |
| 403         | DOCUMENT\_ACCESS\_DENIED | 조회할 수 없는 영업문서가 포함된 경우 |

<br>
