# 알림톡 템플릿

## 1. GetATSTemplateMgtURL - 알림톡 템플릿 등록 팝업 URL

![알림톡 템플릿 등록 팝업 URL 미리보기](https://developers.popbill.com/images/reference/kakaotalk/getATSTemplateMgtURL.png)

**알림톡 템플릿을 등록하는 팝업 URL을 반환합니다.**

- 권장 사이즈 : width = 1,200px (최소 1,000px) / height = 800px
- 반환되는 URL은 30초 동안만 사용이 가능합니다.
- 반환되는 URL에서만 유효한 세션을 포함하고 있습니다.

```java
String getATSTemplateMgtURL(String CorpNum, String UserID) throws PopbillException
```

### 요청

**Parameters**

- CorpNum `type: String` `length: 10` `required: Y` `description: 팝빌회원 사업자번호 ('-' 제외)`
- UserID `type: String` `length: 50` `required: N` `description: 팝빌회원 아이디`

### 응답

String - 요청에 대한 응답 URL

### 예외

**PopbillException**

- code `type: long` `length: -` `description: API 처리 실패에 대한 오류코드`
  - 음의 정수 8자리 숫자값 [\[참고\] 오류코드](https://developers.popbill.com/error-code)
- message `type: String` `length: -` `description: API 처리 실패에 대한 오류메시지`

## 2. GetATSTemplate - 알림톡 템플릿 정보 확인

알림톡 템플릿 정보를 확인합니다.

```java
ATSTemplate getATSTemplate(String CorpNum, String TemplateCode, String UserID) throws PopbillException
```

### 요청

**Parameters**

- CorpNum `type: String` `length: 10` `required: Y` `description: 팝빌회원 사업자번호 ('-' 제외)`
- TemplateCode `type: String` `length: 12` `required: Y` `description: 템플릿 코드`
- UserID `type: String` `length: 50` `required: N` `description: 팝빌회원 아이디`

### 응답

**ATSTemplate**

- templateCode `type: String` `length: 12` `description: 템플릿 코드`
- templateName `type: String` `length: 20` `description: 템플릿 제목`
- template `type: String` `length: 1,300` `description: 템플릿 내용`
- emphasizeTitle `type: String` `length: 50` `description: 강조표기 타이틀`
- emphasizeSubtitle `type: String` `length: 50` `description: 강조표기 보조 문구`
- plusFriendID `type: String` `length: 30` `description: 검색용 아이디`
- ads `type: String` `length: 80` `description: 광고 메시지`
- appendix `type: String` `length: 500` `description: 부가 메시지`
- secureYN `type: Boolean` `length: -` `description: 보안템플릿 여부`
  - `true`: 보안템플릿
  - `false`: 일반템플릿
- state `type: String` `length: 1` `description: 템플릿 상태`
  - `0`: 임시저장
  - `2`: 심사중
  - `3`: 승인
  - `4`: 반려
  - `5`: 정지
  - `7`: 휴면
  - `8`: 삭제
- stateDT `type: String` `length: 14` `description: 템플릿 상태 일시`
  - 형식 : yyyyMMddHHmmss
- btns `type: List<KakaoButton>` `length: 5` `description: 버튼 목록`
  - n `type: String` `length: 14` `description: 버튼명`
  - t `type: String` `length: 2` `description: 버튼유형`
    - `WL`: 웹링크
    - `AL`: 앱링크
    - `TN`: 전화걸기
    - `DS`: 배송조회
    - `MD`: 메시지전달
    - `BK`: 봇키워드
    - `AC`: 채널추가
  - u1 `type: String` `length: 1,000` `description: 버튼링크`
    - {t} = "AL" 경우 iOS 앱링크 적용
    - {t} = "WL" 경우 Mobile 웹링크 적용
  - u2 `type: String` `length: 1,000` `description: 버튼링크`
    - {t} = "AL" 경우 Android 앱링크 적용
    - {t} = "WL" 경우 PC 웹링크 적용
  - tg `type: String` `length: 3` `description: 아웃 링크`
    - `out`: 디바이스 기본 브라우저
    - 기본값 : 카카오톡 인앱 브라우저 사용
  - telNum `type: String` `length: 14` `description: 전화걸기 번호`

### 예외

**PopbillException**

- code `type: long` `length: -` `description: API 처리 실패에 대한 오류코드`
  - 음의 정수 8자리 숫자값 [\[참고\] 오류코드](https://developers.popbill.com/error-code)
- message `type: String` `length: -` `description: API 처리 실패에 대한 오류메시지`

## 3. ListATSTemplate - 알림톡 템플릿 목록 확인

“승인” 상태의 알림톡 템플릿 목록을 확인합니다.

```java
ATSTemplate[] listATSTemplate(String CorpNum, String UserID) throws PopbillException
```

### 요청

**Parameters**

- CorpNum `type: String` `length: 10` `required: Y` `description: 팝빌회원 사업자번호 ('-' 제외)`
- UserID `type: String` `length: 50` `required: N` `description: 팝빌회원 아이디`

### 응답

**ATSTemplate\[ ]**

- templateCode `type: String` `length: 12` `description: 템플릿 코드`
- templateName `type: String` `length: 20` `description: 템플릿 제목`
- template `type: String` `length: 1,300` `description: 템플릿 내용`
- emphasizeTitle `type: String` `length: 50` `description: 강조표기 타이틀`
- emphasizeSubtitle `type: String` `length: 50` `description: 강조표기 보조 문구`
- plusFriendID `type: String` `length: 30` `description: 검색용 아이디`
- ads `type: String` `length: 80` `description: 광고 메시지`
- appendix `type: String` `length: 500` `description: 부가 메시지`
- secureYN `type: Boolean` `length: -` `description: 보안템플릿 여부`
  - `true`: 보안템플릿
  - `false`: 일반템플릿
- state `type: String` `length: 1` `description: 템플릿 상태`
  - `0`: 임시저장
  - `2`: 심사중
  - `3`: 승인
  - `4`: 반려
  - `5`: 정지
  - `7`: 휴면
  - `8`: 삭제
- stateDT `type: String` `length: 14` `description: 템플릿 상태 일시`
  - 형식 : yyyyMMddHHmmss
- btns `type: List<KakaoButton>` `length: 5` `description: 버튼 목록`
  - n `type: String` `length: 14` `description: 버튼명`
  - t `type: String` `length: 2` `description: 버튼유형`
    - `WL`: 웹링크
    - `AL`: 앱링크
    - `TN`: 전화걸기
    - `DS`: 배송조회
    - `MD`: 메시지전달
    - `BK`: 봇키워드
    - `AC`: 채널추가
  - u1 `type: String` `length: 1,000` `description: 버튼링크`
    - {t} = "AL" 경우 iOS 앱링크 적용
    - {t} = "WL" 경우 Mobile 웹링크 적용
  - u2 `type: String` `length: 1,000` `description: 버튼링크`
    - {t} = "AL" 경우 Android 앱링크 적용
    - {t} = "WL" 경우 PC 웹링크 적용
  - tg `type: String` `length: 3` `description: 아웃 링크`
    - `out`: 디바이스 기본 브라우저
    - 기본값 : 카카오톡 인앱 브라우저 사용
  - telNum `type: String` `length: 14` `description: 전화걸기 번호`

### 예외

**PopbillException**

- code `type: long` `length: -` `description: API 처리 실패에 대한 오류코드`
  - 음의 정수 8자리 숫자값 [\[참고\] 오류코드](https://developers.popbill.com/error-code)
- message `type: String` `length: -` `description: API 처리 실패에 대한 오류메시지`
