# 전자서명 템플릿 등록/편집 페이지 API

전자서명 템플릿은 기본적으로 프릭스 서비스를 통해 등록할 수 있지만, API를 통해서 페이지를 조회하여 사용할 수도 있습니다.

API 응답으로 전자서명 템플릿을 등록 및 편집할 수 있는 페이지의 url을 내려주며, 해당 경로를 새 창이나 새 탭으로 띄워서 템플릿을 등록/편집할 수 있습니다.

* 계약 문서를 등록하고 전자서명 정보(서명 참여자 역할 및 서명 위치)와 변경될 입력값에 대한 내용을 입력하면 전자서명 템플릿이 등록됩니다.
* 추후 등록한 전자서명 템플릿을 이용하여 간편하게 서명을 요청할 수 있습니다.

<br>

## `GET` kit-api/v1/signature-templates/form-url

Method: GET\
Endpoint: kit-api/v1/signature-templates/form-url

<br>

## Example

```
...kit-api/v1/signature-templates/form-url
```

<br>

## Request Query

| Key            | Description                                                          | Required |
| -------------- | -------------------------------------------------------------------- | -------- |
| successUrl     | 템플릿 등록을 완료한 이후 이동되는 url (encode된 url값 사용)                            | no       |
| templateId     | 편집할 템플릿의 id를 등록하여 편집 페이지 호출                                          | no       |
| tagIds         | 템플릿 생성 시 태그 input의 기본값 (쉼표로 구분: ex. tagIds=2,3)                      | no       |
| slug           | 템플릿 생성 시 slug input의 기본값 (string)                                    | no       |
| disabledInputs | 템플릿 생성 시 숨기고 싶은 input 목록 (쉼표로 구분: ex. disabledInputs=PERMISSION,TAG) | no       |

## Request Query : disabledInputs

disabledInputs으로 전달할 수 있는 value 목록 (쉼표로 구분)

| Key        | Description | Required |
| ---------- | ----------- | -------- |
| PERMISSION | 권한 인풋       | no       |
| TAG        | 태그 인풋       | no       |

<br>

## Response

```json
{
  "ok": true, // api 성공 여부
  "message": undefined, // Error가 존재하면 message(string)로 전달
  "data": {
    "url": "https://www.prix.im/..." // 전자서명 템플릿을 등록/편집할 수 있는 페이지 주소
  }
}
```

<br>

| Status Code | Error Code                                 | Description                             |
| ----------- | ------------------------------------------ | --------------------------------------- |
| 401         | INVALID\_BUSINESS                          | 전자서명 템플릿에 권한이 없는 경우                     |
| 404         | NOT\_FOUND\_SIGNATURE\_TEMPLATE            | 전자서명 템플릿이 존재하지 않는 경우                    |
| 404         | NOT\_FOUND\_BUSINESS\_TAG                  | 비즈니스에 등록하지 않은 태그가 포함되어 있는 경우            |
| 400         | SIGNATURE\_TEMPLATE\_SLUG\_ALREADY\_EXISTS | 이미 존재하는 템플릿 slug인 경우 (템플릿 간 slug 중복 불가) |

<br>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://api-kit.prix.im/signature-template/form.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
