# 사업자등록상태조회

## 1. CheckCorpNum - 단건 조회

사업자번호 1건에 대해 실시간으로 사업자등록상태를 확인합니다.

- 팝빌 서비스의 안정적인 제공을 위하여 동시호출이 제한될 수 있습니다.\
  동시에 100건 이상 요청하는 경우 대량 조회를 이용하시는 것을 권장합니다.

```javascript
closedownService.checkCorpNum(CorpNum, checkCorpNum, UserID, success, error)
```

### 요청

**Parameters**

- CorpNum `type: string` `length: 10` `required: Y` `description: 팝빌회원 사업자번호 ('-' 제외)`
- CheckCorpNum `type: String` `length: 10` `required: Y` `description: 조회할 사업자번호`
- UserID `type: string` `length: 50` `required: N` `description: 팝빌회원 아이디`
- success `type: function` `length: -` `required: Y` `description: 성공에 대한 콜백 함수`
- error `type: function` `length: -` `required: Y` `description: 실패에 대한 콜백 함수`

### 응답

**CorpState**

- corpNum `type: string` `length: 10` `description: 조회한 사업자번호`
- taxType `type: string` `length: 2` `description: 사업자 과세유형`
  - `null`: 확인실패
  - `10`: 일반과세자
  - `20`: 면세사업자
  - `30`: 간이과세자
  - `31`: 간이과세자 세금계산서 발급사업자
  - `40`: 비영리법인 또는 국가기관, 고유번호가 할당된 단체
- typeDate `type: string` `length: 10` `description: 과세유형 전환일자`
  - 형식 : yyyy-MM-dd
- state `type: string` `length: 1` `description: 휴폐업상태`
  - `null`: 확인실패
  - `0`: 미등록 - 등록되지 않은 사업자번호
  - `1`: 사업중
  - `2`: 폐업
  - `3`: 휴업
- stateDate `type: string` `length: 10` `description: 휴폐업일자`
  - 형식 : yyyy-MM-dd
- checkDate `type: string` `length: 10` `description: 국세청 확인일자`
  - 형식 : yyyy-MM-dd

### 예외

**PopbillException**

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

## 2. CheckCorpNums - 대량 조회

다수건의 사업자번호에 대해 실시간으로 사업자등록상태를 확인합니다. (최대 1,000건)

```javascript
closedownService.checkCorpNums(CorpNum, CorpNumList, UserID, success, error)
```

### 요청

**Parameters**

- CorpNum `type: string` `length: 10` `required: Y` `description: 팝빌회원 사업자번호 ('-' 제외)`
- CorpNumList `type: Array` `length: 1,000` `required: Y` `description: 사업자번호 목록`
  - 최대 : 1,000건
- UserID `type: string` `length: 50` `required: N` `description: 팝빌회원 아이디`
- success `type: function` `length: -` `required: Y` `description: 성공에 대한 콜백 함수`
- error `type: function` `length: -` `required: Y` `description: 실패에 대한 콜백 함수`

### 응답

**CorpState\[ ]**

- corpNum `type: string` `length: 10` `description: 조회한 사업자번호`
- taxType `type: string` `length: 2` `description: 사업자 과세유형`
  - `null`: 확인실패
  - `10`: 일반과세자
  - `20`: 면세사업자
  - `30`: 간이과세자
  - `31`: 간이과세자 세금계산서 발급사업자
  - `40`: 비영리법인 또는 국가기관, 고유번호가 할당된 단체
- typeDate `type: string` `length: 10` `description: 과세유형 전환일자`
  - 형식 : yyyy-MM-dd
- state `type: string` `length: 1` `description: 휴폐업상태`
  - `null`: 확인실패
  - `0`: 미등록 - 등록되지 않은 사업자번호
  - `1`: 사업중
  - `2`: 폐업
  - `3`: 휴업
- stateDate `type: string` `length: 10` `description: 휴폐업일자`
  - 형식 : yyyy-MM-dd
- checkDate `type: string` `length: 10` `description: 국세청 확인일자`
  - 형식 : yyyy-MM-dd

### 예외

**PopbillException**

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