# 발신번호 관리

## 1. CheckSenderNumber - 발신번호 등록여부 확인

팩스 발신번호 등록여부를 확인합니다.

- 발신번호 상태가 ‘사용’인 경우에만 응답 객체 Response의 변수 ‘code’가 1로 반환됩니다.

```pb
function response checksendernumber (string corpnum, string sender, string userid) throws popbillexception
```

### 요청

**Parameters**

- corpnum `type: string` `length: 10` `required: Y` `description: 팝빌회원 사업자번호 ('-' 제외)`
- sender `type: string` `length: 20` `required: Y` `description: 확인할 발신번호`
- userid `type: string` `length: 50` `required: N` `description: 팝빌회원 아이디`

### 응답

**Response**

- code `type: long` `length: -` `description: API 처리에 대한 응답코드`
  - `1`: 성공
- message `type: string` `length: -` `description: API 처리에 대한 응답메시지`

### 예외

**PopbillException**

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

## 2. GetSenderNumberMgtURL - 발신번호 등록 팝업 URL

![발신번호 등록 팝업 URL 미리보기](https://developers.popbill.com/images/reference/fax/getSenderNumberMgtURL.png)

**발신번호를 등록하는 팝업 URL을 반환합니다.**

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

```pb
function string getSenderNumberMgtURL(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 처리 실패에 대한 오류메시지`

## 3. GetSenderNumberList - 발신번호 목록 확인

팝빌에 등록한 연동회원의 팩스 발신번호 목록을 확인합니다.

```pb
subroutine getsendernumberlist(string corpnum, ref sendernumber ref_list[]) throws popbillexception
```

### 요청

**Parameters**

- corpnum `type: string` `length: 10` `required: Y` `description: 팝빌회원 사업자번호 ('-' 제외)`
- ref\_list `type: ref SenderNumber[ ]` `length: -` `required: Y` `description: 서브루틴 반환 결과값`
  - number `type: string` `length: 20` `required: N` `description: 발신번호`
  - representYN `type: boolean` `length: -` `required: N` `description: 대표번호 지정여부`
    - `true`: 대표번호
    - `false`: 일반번호
  - state `type: integer` `length: 1` `required: N` `description: 상태`
    - `0`: 대기
    - `1`: 사용
    - `3`: 반려

### 응답

sendernumber\[ ] - 요청 파라미터의 `ref_list` 확인

### 예외

**PopbillException**

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