Request for crawling
1. RequestJob - Request for data crawling
- This API request data crawling for issued sales/purchase cash receipts from the NTS. (Maximum search scope : 3 months)
String requestJob(String CorpNum, QueryType queryType, String SDate, String EDate, String UserID) throws PopbillException
Parameters
Parameters
| No. | Field | Type | Length | Mandatory | Description | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| CorpNum | String | 10 | Y |
Business registration number
10-digits except (‘-’)
|
||||||||||||||||
| queryType | QueryType | - | Y |
Type of the cash receipt
매출sales
매입purchase
|
||||||||||||||||
|
QueryType
|
||||||||||||||||||||
| SDate | String | 8 | Y |
Start date of search scope
format : yyyyMMdd
|
||||||||||||||||
| EDate | String | 8 | Y |
End date of search scope
format : yyyyMMdd
|
||||||||||||||||
| UserID | String | 50 | N | User’s POPBiLL ID | ||||||||||||||||
Return
String - JobID for a request
Throws
PopbillException
| No. | Field | Type | Length | Description |
|---|---|---|---|---|
| code | long | - |
API response code
8 digits code that starts with (‘-’) [Error Code]
|
|
| message | String | - | Error message for any failed API process |
2. GetJobState - Check the data crawling status
- This API checks the status of a JobID that is returned via [RequestJob – Request for data crawling] API.
- When calling [Search – Check the result] or [Summary – Check the summarized information of the data crawling result] APIs, you must check the crawling status.
HTCashbillJobState getJobState(String CorpNum, String JobID, String UserID) throws PopbillException
Parameters
Parameters
| No. | Field | Type | Length | Mandatory | Description |
|---|---|---|---|---|---|
| CorpNum | String | 10 | Y |
Business registration number
10-digits except (‘-’)
|
|
| JobID | String | 18 | Y |
Request ID(JobID)
returned value of [RequestJob – Request for data crawling] API
|
|
| UserID | String | 50 | N | User’s POPBiLL ID |
Return
HTCashbillJobState
| No. | Field | Type | Length | Description |
|---|---|---|---|---|
| jobID | String | 18 | Request ID(JobID) | |
| jobState | String | 1 |
Crawling job status
1pending
2processing
3completed
|
|
| queryType | String | - |
Type of the cash receipt
매출sales
매입purchase
|
|
| queryDateType | String | 9 |
Types of dates from crawled data
TradeDatedate of trade
|
|
| queryStDate | String | 8 |
Start date of search scope
format : yyyyMMdd
|
|
| queryEnDate | String | 8 |
End date of search scope
format : yyyyMMdd
|
|
| errorCode | long | - |
Crawling result code
- succeeded : 1 - failed: 8 digits starting with (‘-’) [Error Code] |
|
| errorReason | String | - |
Error message
reason for crawling failure
|
|
| jobStartDT | String | 14 |
Start date and time of the crawling job
format : yyyyMMddHHmmss
|
|
| jobEndDT | String | 14 |
End date and time of the crawling job
format : yyyyMMddHHmmss
|
|
| collectCount | Integer | - | Number of crawled data | |
| regDT | String | 14 |
Date and time of crawling request
format : yyyyMMddHHmmss
|
Throws
PopbillException
| No. | Field | Type | Length | Description |
|---|---|---|---|---|
| code | long | - |
API response code
8 digits code that starts with (‘-’) [Error Code]
|
|
| message | String | - | Error message for any failed API process |
3. ListActiveJob - Check the list of active data crawling jobs
- This API checks the list of active data crawling jobs.
- JobID of each request is only valid for 1 hour.
HTCashbillJobState[] listActiveJob(String CorpNum, String UserID) throws PopbillException
Parameters
Parameters
| No. | Field | Type | Length | Mandatory | Description |
|---|---|---|---|---|---|
| CorpNum | String | 10 | Y |
Business registration number
10-digits except (‘-’)
|
|
| UserID | String | 50 | N | User’s POPBiLL ID |
Return
HTCashbillJobState
| No. | Field | Type | Length | Description |
|---|---|---|---|---|
| jobID | String | 18 | Request ID(JobID) | |
| jobState | String | 1 |
Crawling job status
1pending
2processing
3completed
|
|
| queryType | String | - |
Type of the cash receipt
매출sales
매입purchase
|
|
| queryDateType | String | 9 |
Types of dates from crawled data
TradeDatedate of trade
|
|
| queryStDate | String | 8 |
Start date of search scope
format : yyyyMMdd
|
|
| queryEnDate | String | 8 |
End date of search scope
format : yyyyMMdd
|
|
| errorCode | long | - |
Crawling result code
- succeeded : 1 - failed: 8 digits starting with (‘-’) [Error Code] |
|
| errorReason | String | - |
Error message
reason for crawling failure
|
|
| jobStartDT | String | 14 |
Start date and time of the crawling job
format : yyyyMMddHHmmss
|
|
| jobEndDT | String | 14 |
End date and time of the crawling job
format : yyyyMMddHHmmss
|
|
| collectCount | Integer | - | Number of crawled data | |
| regDT | String | 14 |
Date and time of crawling request
format : yyyyMMddHHmmss
|
Throws
PopbillException
| No. | Field | Type | Length | Description |
|---|---|---|---|---|
| code | long | - |
API response code
8 digits code that starts with (‘-’) [Error Code]
|
|
| message | String | - | Error message for any failed API process |

