POPBill Developers
SDK Reference
Java

Request for crawling

1. RequestJob - Request for data crawling

  • This API request data crawling for issued sales/purchase invoices from the NTS. (Maximum search scope : 3 months)
String requestJob(String CorpNum, QueryType queryType, String DType, String SDate, String EDate, String UserID) throws PopbillException
  • If you INSERT the crawled data in the internal DB on the regular basis, it is recommended to enter ‘S’ as the value of {Dtype}.
Parameters
Parameters
No.FieldTypeLengthMandatoryDescription
CorpNum String 10 Y Business registration number
10-digits except (‘-’)
queryType QueryType - Y Type of the e-Tax invoice
SELLsales
BUYpurchase
TRUSTEEconsigned
QueryType
No. Field Type Length Description
SELL enum - Sales
BUY enum - Purchase
TRUSTEE enum - Consignment
DType String 1 Y Date type in search criteria
Wdate of preparation
Idate of issuance
Sdate of filing (recommended)
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

HTTaxinvoiceJobState getJobState(String CorpNum, String JobID, String UserID) throws PopbillException
Parameters
Parameters
No.FieldTypeLengthMandatoryDescription
CorpNum String 10 Y Business registration number
10-digits except (‘-’)
JobID String 18 Y Request ID(JobID)
UserID String 50 N User’s POPBiLL ID
Return
HTTaxinvoiceJobState
No. Field Type Length Description
jobID String 18 Request ID(JobID)
jobState String 1 Crawling job status
1pending
2processing
3completed
queryType String 2 Type of the e-Tax invoice
매출sales
매입purchase
수탁consignment
queryDateType String 9 Types of dates
WriteDatedate of preparation
IssueDatedate of issuance
SendDatedate of filing
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 data crawling request
format : yyyyMMdd
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.
HTTaxinvoiceJobState[] listActiveJob(String CorpNum, String UserID) throws PopbillException
Parameters
Parameters
No.FieldTypeLengthMandatoryDescription
CorpNum String 10 Y Business registration number
10-digits except (‘-’)
UserID String 50 N User’s POPBiLL ID
Return
HTTaxinvoiceJobState
No. Field Type Length Description
jobID String 18 Request ID(JobID)
jobState String 1 Crawling job status
1pending
2processing
3completed
queryType String 2 Type of the e-Tax invoice
매출sales
매입purchase
수탁consignment
queryDateType String 9 Types of dates
WriteDatedate of preparation
IssueDatedate of issuance
SendDatedate of filing
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 data crawling request
format : yyyyMMdd
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