# 사업자등록상태조회

## 1. Checkcorpnum - 단건 조회

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

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

```pb
function corpstate checkcorpnum(string userCorpnum, string checkCorpNum) throws popbillexception
```

### 요청

**Parameters**

- userCorpnum `type: string` `length: 10` `required: Y` `description: 팝빌회원 사업자번호 ('-' 제외)`
- CheckCorpNum `type: String` `length: 10` `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: long` `length: -` `description: API 처리 실패에 대한 오류코드`
  - 음의 정수 8자리 숫자값 [\[참고\] 오류코드](https://developers.popbill.com/error-code)
- message `type: string` `length: -` `description: API 처리 실패에 대한 오류메시지`

## 2. Checkcorpnums - 대량 조회

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

```pb
subroutine checkcorpnums(string corpnum, ref string corpnumlist[ ], ref corpstate ref_returnlist[ ]) throws popbillexception
```

### 요청

**Parameters**

- corpnum `type: string` `length: 10` `required: Y` `description: 팝빌회원 사업자번호 ('-' 제외)`
- corpnumlist `type: string[ ]` `length: -` `required: Y` `description: 사업자번호 목록`
  - 최대 : 1,000건
- ref\_returnlist `type: ref CorpState[ ]` `length: -` `required: Y` `description: 서브루틴 반환 결과값`
  - corpnum `type: string` `length: 10` `required: N` `description: 조회한 사업자번호`
  - taxType `type: string` `length: 2` `required: N` `description: 사업자 과세유형`
    - `null`: 확인실패
    - `10`: 일반과세자
    - `20`: 면세사업자
    - `30`: 간이과세자
    - `31`: 간이과세자 세금계산서 발급사업자
    - `40`: 비영리법인 또는 국가기관, 고유번호가 할당된 단체
  - typeDate `type: string` `length: 10` `required: N` `description: 과세유형 전환일자`
    - 형식 : yyyy-MM-dd
  - state `type: string` `length: 1` `required: N` `description: 휴폐업상태`
    - `null`: 확인실패
    - `0`: 미등록 - 등록되지 않은 사업자번호
    - `1`: 사업중
    - `2`: 폐업
    - `3`: 휴업
  - stateDate `type: string` `length: 10` `required: N` `description: 휴폐업일자`
    - 형식 : yyyy-MM-dd
  - checkDate `type: string` `length: 10` `required: N` `description: 국세청 확인일자`
    - 형식 : yyyy-MM-dd

### 응답

corpstate\[ ] - 요청 파라미터의 `ref_returnlist` 확인

### 예외

**PopbillException**

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