Skip to content

Instantly share code, notes, and snippets.

@imrehg
Last active August 29, 2015 14:19
Show Gist options
  • Save imrehg/4fa9959b746264edcd1d to your computer and use it in GitHub Desktop.
Save imrehg/4fa9959b746264edcd1d to your computer and use it in GitHub Desktop.
Example query and results from the Taiwanese electronic invoice API
# API from this doc: https://www.einvoice.nat.gov.tw/home/DownLoad%3Bjsessionid%3DjMPySdkKYmK77tnL1pPVr7NKsL1Mnb0NnQz24yccnMMQTTfLc1ll!814221976%3FfileName%3Df1371195138997.pdf
# using credentials from the EasyWallet Android app
# note: date is in Taiwanese years (ie. Year 104 is equal to 2015, 103 would be 2014, and so on)
# for invTerm the full date is yyyMM format, where MM is the even month of the period: eg. for 2015 Jan-Feb it is 10402
curl -k -i "https://www.einvoice.nat.gov.tw/PB2CAPIVAN/invapp/InvApp?version=0.2&action=QryWinningList&invTerm=10402&uuid=UFm4wEDPmJq73JQPR9qvLM6lV3F114rj&appID=EINV2201306253437"
{
"fifthPrizeAmt":"0001000",
"firstPrizeAmt":"0200000",
"firstPrizeNo1":"63856949",
"firstPrizeNo10":"",
"firstPrizeNo2":"39459262",
"firstPrizeNo3":"61944942",
"firstPrizeNo4":"",
"firstPrizeNo5":"",
"firstPrizeNo6":"",
"firstPrizeNo7":"",
"firstPrizeNo8":"",
"firstPrizeNo9":"",
"fourthPrizeAmt":"0004000",
"invoYm":"10402",
"secondPrizeAmt":"0040000",
"sixthPrizeAmt":"0000200",
"sixthPrizeNo1":"022",
"sixthPrizeNo2":"355",
"sixthPrizeNo3":"038",
"sixthPrizeNo4":"",
"sixthPrizeNo5":"",
"sixthPrizeNo6":"",
"spcPrizeAmt":"2000000",
"spcPrizeNo":"50887710",
"spcPrizeNo2":"",
"spcPrizeNo3":"",
"superPrizeAmt":"10000000",
"superPrizeNo":"60538935",
"thirdPrizeAmt":"0010000",
"timeStamp":{
"date":25,
"day":3,
"hours":14,
"minutes":35,
"month":2,
"seconds":32,
"time":1427265332000,
"timezoneOffset":-480,
"year":115
},
"updateDate":"1040325",
"v":"0",
"code":"200",
"msg":"查詢成功"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment