# 회원 관리

## 1. CheckIsMember - 연동회원 가입여부 확인

사업자번호를 조회하여 연동회원 가입여부를 확인합니다.

```vb
Function CheckIsMember(CorpNum As String, LinkID As String) As PBResponse
```

### 요청

**Parameters**

- CorpNum `type: String` `length: 10` `required: Y` `description: 팝빌회원 사업자번호 ('-' 제외)`
- LinkID `type: String` `length: -` `required: Y` `description: 팝빌에서 발급한 링크아이디`

### 응답

**PBResponse**

- code `type: Long` `length: -` `description: API 처리에 대한 응답코드`
  - `0`: 미가입
  - `1`: 가입
- message `type: String` `length: -` `description: API 처리에 대한 응답메시지`

### 예외

**Err**

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

## 2. CheckID - 연동회원 아이디 중복 확인

사용하고자 하는 아이디의 중복여부를 확인합니다.

```vb
Function CheckID(IDString As String) As PBResponse
```

### 요청

**Parameters**

- IDString `type: String` `length: 50` `required: Y` `description: 중복여부를 확인할 아이디`

### 응답

**PBResponse**

- code `type: Long` `length: -` `description: API 처리에 대한 응답코드`
  - `0`: 미사용
  - `1`: 사용
- message `type: String` `length: -` `description: API 처리에 대한 응답메시지`

### 예외

**Err**

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

## 3. JoinMember - 연동회원 신규가입

프로그램 공급사의 고객사를 팝빌 연동회원으로 가입하는 API 입니다.

```vb
Function JoinMember(JoinInfo As PBJoinForm) As PBResponse
```

> 회원의 정보가 현행화 되지 않은 경우 연동회원 신규가입 API 사용이 제한될 수 있으니 유의하시기 바랍니다.

### 요청

**Parameters**

- JoinInfo `type: PBJoinForm` `length: -` `required: Y` `description: 연동회원 객체정보`
  - ID `type: String` `length: 50` `required: Y` `description: 아이디`
    - 6자 이상 50자 이하
  - Password `type: String` `length: 20` `required: Y` `description: 비밀번호`
    - 8자 이상 20자 이하
    - 영문, 숫자, 특수문자(\~!@#$%^&\*()\_+) 포함
  - LinkID `type: String` `length: 20` `required: Y` `description: 파트너 링크아이디`
    - 팝빌에서 발급한 링크아이디
  - CorpNum `type: String` `length: 10` `required: Y` `description: 사업자번호 ('-' 제외)`
  - CEOName `type: String` `length: 100` `required: Y` `description: 대표자 성명`
  - CorpName `type: String` `length: 200` `required: Y` `description: 회사명`
  - Addr `type: String` `length: 300` `required: Y` `description: 사업장 주소`
  - BizType `type: String` `length: 100` `required: Y` `description: 업태`
  - BizClass `type: String` `length: 100` `required: Y` `description: 종목`
  - ContactName `type: String` `length: 100` `required: Y` `description: 담당자 성명`
  - ContactEmail `type: String` `length: 100` `required: Y` `description: 담당자 메일`
  - ContactTEL `type: String` `length: 20` `required: Y` `description: 담당자 휴대폰`

### 응답

**PBResponse**

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

### 예외

**Err**

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

## 4. GetCorpInfo - 회사정보 확인

연동회원의 회사정보를 확인합니다.

```vb
Function GetCorpInfo(CorpNum As String, Optional UserID As String = "") As PBCorpInfo
```

### 요청

**Parameters**

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

### 응답

**PBCorpInfo**

- ceoname `type: String` `length: 100` `description: 대표자 성명`
- corpName `type: String` `length: 200` `description: 회사명`
- addr `type: String` `length: 300` `description: 주소`
- bizType `type: String` `length: 100` `description: 업태`
- bizClass `type: String` `length: 100` `description: 종목`

### 예외

**Err**

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

## 5. UpdateCorpInfo - 회사정보 수정

연동회원의 회사정보를 수정합니다.

```vb
Function UpdateCorpInfo(CorpNum As String, CorpInfo As PBCorpInfo, Optional UserID As String = "") As PBResponse
```

### 요청

**Parameters**

- CorpNum `type: String` `length: 10` `required: Y` `description: 팝빌회원 사업자번호 ('-' 제외)`
- CorpInfo `type: PBCorpInfo` `length: -` `required: Y` `description: 회사 객체정보`
  - ceoname `type: String` `length: 100` `required: Y` `description: 대표자 성명`
  - corpName `type: String` `length: 200` `required: Y` `description: 회사명`
  - addr `type: String` `length: 300` `required: Y` `description: 주소`
  - bizType `type: String` `length: 100` `required: Y` `description: 업태`
  - bizClass `type: String` `length: 100` `required: Y` `description: 종목`
- UserID `type: String` `length: 50` `required: N` `description: 팝빌회원 아이디`

### 응답

**PBResponse**

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

### 예외

**Err**

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

## 6. RegistContact - 담당자 추가

연동회원에 담당자를 추가합니다.

```vb
Function RegistContact(CorpNum As String, ContactInfo As PBContactInfo, Optional UserID As String = "") As PBResponse
```

### 요청

**Parameters**

- CorpNum `type: String` `length: 10` `required: Y` `description: 팝빌회원 사업자번호 ('-' 제외)`
- ContactInfo `type: PBContactInfo` `length: -` `required: Y` `description: 담당자 객체정보`
  - id `type: String` `length: 50` `required: Y` `description: 아이디`
    - 6자 이상 50자 이하
  - password `type: String` `length: 20` `required: 조건부` `description: 비밀번호`
    - 8자 이상 20자 이하
    - 영문, 숫자, 특수문자(\~!@#$%^&\*()\_+) 포함
    - 함수 [\[RegistContact - 담당자 추가\]](https://developers.popbill.com/reference/taxinvoice/vba/common-api/member#RegistContact)호출을 위한 필수값
  - personName `type: String` `length: 100` `required: Y` `description: 담당자 성명`
  - tel `type: String` `length: 20` `required: Y` `description: 담당자 휴대폰`
  - email `type: String` `length: 100` `required: Y` `description: 담당자 메일`
  - searchRole `type: Integer` `length: 1` `required: N` `description: 권한`
    - `1`: 개인권한
    - `2`: 읽기권한
    - `3`: 회사권한 : 기본값
- UserID `type: String` `length: 50` `required: N` `description: 팝빌회원 아이디`

### 응답

**PBResponse**

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

### 예외

**Err**

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

## 7. GetContactInfo - 담당자 정보 확인

연동회원에 추가된 담당자 정보를 확인합니다.

```vb
Function GetContactInfo(CorpNum As String, ContactID As String, Optional UserID As String = "") As PBContactInfo
```

### 요청

**Parameters**

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

### 응답

**PBContactInfo**

- id `type: String` `length: 50` `description: 아이디`
- personName `type: String` `length: 100` `description: 담당자 성명`
- tel `type: String` `length: 20` `description: 담당자 휴대폰`
- email `type: String` `length: 100` `description: 담당자 메일`
- regDT `type: String` `length: 14` `description: 등록일시`
  - 형식 : yyyyMMddHHmmss
- searchRole `type: Integer` `length: 1` `description: 권한`
  - `1`: 개인권한
  - `2`: 읽기권한
  - `3`: 회사권한
- mgrYN `type: Boolean` `length: -` `description: 역할`
  - `True`: 관리자
  - `False`: 담당자
  - 팝빌 사이트 \[ 마이페이지 > 회사정보 > 담당자 관리 ] 메뉴에서 수정 가능
- state `type: Integer` `length: 1` `description: 계정상태`
  - `1`: 사용중

### 예외

**Err**

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

## 8. ListContact - 담당자 목록 확인

연동회원에 추가된 담당자 목록을 확인합니다.

```vb
Function ListContact(CorpNum As String, Optional UserID As String = "") As Collection
```

### 요청

**Parameters**

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

### 응답

**Collection of PBContactInfo**

- id `type: String` `length: 50` `description: 아이디`
- personName `type: String` `length: 100` `description: 담당자 성명`
- tel `type: String` `length: 20` `description: 담당자 휴대폰`
- email `type: String` `length: 100` `description: 담당자 메일`
- regDT `type: String` `length: 14` `description: 등록일시`
  - 형식 : yyyyMMddHHmmss
- searchRole `type: Integer` `length: 1` `description: 권한`
  - `1`: 개인권한
  - `2`: 읽기권한
  - `3`: 회사권한
- mgrYN `type: Boolean` `length: -` `description: 역할`
  - `True`: 관리자
  - `False`: 담당자
  - 팝빌 사이트 \[ 마이페이지 > 회사정보 > 담당자 관리 ] 메뉴에서 수정 가능
- state `type: Integer` `length: 1` `description: 계정상태`
  - `1`: 사용중

### 예외

**Err**

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

## 9. UpdateContact - 담당자 정보 수정

연동회원에 추가된 담당자 정보를 수정합니다.

```vb
Function UpdateContact(CorpNum As String, ContactInfo As PBContactInfo, UserID As String) As PBResponse
```

### 요청

**Parameters**

- CorpNum `type: String` `length: 10` `required: Y` `description: 팝빌회원 사업자번호 ('-' 제외)`
- ContactInfo `type: PBContactInfo` `length: -` `required: Y` `description: 담당자 객체정보`
  - id `type: String` `length: 50` `required: Y` `description: 아이디`
    - 6자 이상 50자 이하
  - password `type: String` `length: 20` `required: 조건부` `description: 비밀번호`
    - 8자 이상 20자 이하
    - 영문, 숫자, 특수문자(\~!@#$%^&\*()\_+) 포함
    - 함수 [\[RegistContact - 담당자 추가\]](https://developers.popbill.com/reference/taxinvoice/vba/common-api/member#RegistContact)호출을 위한 필수값
  - personName `type: String` `length: 100` `required: Y` `description: 담당자 성명`
  - tel `type: String` `length: 20` `required: Y` `description: 담당자 휴대폰`
  - email `type: String` `length: 100` `required: Y` `description: 담당자 메일`
  - searchRole `type: Integer` `length: 1` `required: N` `description: 권한`
    - `1`: 개인권한
    - `2`: 읽기권한
    - `3`: 회사권한 : 기본값
- UserID `type: String` `length: 50` `required: Y` `description: 팝빌회원 아이디`

### 응답

**PBResponse**

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

### 예외

**Err**

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

## 10. GetAccessURL - 팝빌 로그인 팝업 URL

![팝빌 로그인 팝업 URL 미리보기](https://developers.popbill.com/images/reference/member/getAccessURL.png)

**팝빌 회원 로그인 상태의 팝업 URL을 반환합니다.**

- 권장 사이즈 : width = 1,280px (최소 1,000px) / height = 800px
- 반환되는 URL은 30초 동안만 사용이 가능합니다.
- 반환되는 URL은 팝빌회원의 로그인 세션을 포함하고 있으니 사용에 유의하여 주시기 바랍니다.

```vb
Function GetAccessURL(CorpNum As String, UserID As String) As String
```

### 요청

**Parameters**

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

### 응답

String - 요청에 대한 응답 URL

### 예외

**Err**

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