> 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/signature/find.md).

# 계약서/전자서명 조회 API

계약서 및 전자계약에 대한 정보/현황을 조회할 수 있는 API입니다.

<br>

## `GET` kit-api/v1/contracts/find

Method: GET\
Endpoint: kit-api/v1/contracts/find

<br>

## Example

```
...kit-api/v1/contracts/find?uuid=ed976505-bcbd-47bd-913d-f4cde05dea7a
```

<br>

## Request Query

| Key                            | Description                         | Required             |
| ------------------------------ | ----------------------------------- | -------------------- |
| uuid                           | 계약서 식별값으로 정보를 조회하는 경우 사용            | 조건부 yes (둘 중에 하나 필수) |
| customKey                      | 별도 식별값으로 계약서(및 전자서명) 정보를 조회하는 경우 사용 | 조건부 yes (둘 중에 하나 필수) |
| includeParticipantRequirements | 전자서명 참여자의 첨부파일 조회하는 경우 사용           | no                   |

<br>

## Response

```json
{
  "ok": true, // api 성공 여부
  "message": undefined, // Error가 존재하면 message(string)로 전달
  "data": {
    // 계약 정보 (contract)
    "contract": {
      "id": "1", // 고유 id
      "uuid": "ed976505-bcbd-47bd-913d-f4cde05dea7a", // 문서 식별값(고유 식별 uuid) (uuid 값을 api에서 사용합니다)
      "concludedFile": "...concluded.pdf", // 체결된 계약 문서 url (nullable, 요청 후 10분만 유효합니다.)
      "title": "A컴퍼니 MOU", // 계약서 이름
      "customers": [
        {
          // contract에 연결된 고객 목록
          "id": 1,
          "title": "파트너 고객사",
          "customKey": "A5-k159402" // 고객에게 할당된 40자 이하의 식별 key
        }
      ], // 계약 연결 고객
      "file": "...contract.pdf", // 원본 계약 문서 url (요청 후 10분만 유효합니다.)
      "createdAt": "2024-07-05T00:00:00.000Z", // 생성일
      "updatedAt": "2024-07-05T00:00:00.000Z", // 수정일
      "customKey": "a4-k1234", // 커스텀 계약 ID - // 계약서 구분을 위한 key값을 사용한 경우, 해당 필드로 생성됨
      "status": "CREATED", // 계약 상태 (CREATED, CONCLUDED, DELETED)
      "type": "NEW", // 계약서 유형 - 재계약 여부 (NEW, RENEWAL)
      "wordFile": "...contract.docx", // 계약 문서 url (word 파일로 계약서를 등록한 경우, 원본 word)
      "contractDate": {
        "concludedDate": "2024-07-05T00:00:00.000Z", // 계약 체결일
        "startDate": "2024-07-05T00:00:00.000Z", // 계약 시작일
        "endDate": "2024-07-05T00:00:00.000Z" // 계약 종료일
      },
      "managerNames": ["이용우"], // 계약서 담당자 이름 목록
      "signature": {
        // 전자서명 정보
        "uuid": "57139f5c-37d0-4c30-bdb6-ef6106040756", // 전자서명 식별값
        "title": "A컴퍼니 MOU 전자서명", // 전자서명 제목
        "expiredDate": "2024-10-15T00:00:00.000Z", // 전자서명 만료일
        "status": "WAITING", // 전자서명 상태 (CREATED, WAITING, DONE, CANCELED)
        "createdAt": "2024-07-15T00:00:00.000Z", // 생성일
        "participants": [], // 전자서명 참여자 정보 (uuid, name, status, auth, send, email, phone, role, language, requirements(includeParticipantRequirements가 true인 경우에만 응답 결과에 포함))
        "objects": [
          {
            // 전자서명 입력값 정보
            "contents": "서울시 강남구 선릉로 551", // 내용
            "type": "TEXT", // 종류 (TEXT, SIGNATURE, CHECKBOX)
            "category": "DEFAULT", // 유형 (DEFAULT, INPUT)
            "name": "주소", // 이름
            "description": "상세 주소를 입력해 주세요." // 설명
          }
        ]
      }
    }
  }
}
```

<br>

| Status Code | Error Code                     | Description           |
| ----------- | ------------------------------ | --------------------- |
| 400         | INVALID\_CUSTOMER\_CUSTOM\_KEY | 규칙을 벗어난 customKey인 경우 |
| 404         | NOT\_FOUND\_CUSTOMER           | 존재하지 않는 고객인 경우        |

<br>
