Skip to content

Latest commit

 

History

History
54 lines (37 loc) · 1.54 KB

README-en.md

File metadata and controls

54 lines (37 loc) · 1.54 KB

houjinbangou-api

Build Status

a Web-API wrapper for corporate number system in Japan. Written in Typescript.
Japanese: https://www.houjin-bangou.nta.go.jp/
Specification(written in ja): https://www.houjin-bangou.nta.go.jp/webapi/

Install

Node.js

npm i houjinbangou-api

Usage

Document:https://totechite.github.io/houjinbangou-api-wrapper/index.html

You must have an Application ID to use the service. Please proceed this form what request to publish of ID, if you don't have it.
https://www.houjin-bangou.nta.go.jp/webapi/riyo-todokede/

Here is a example code that making request to endpoints.

import { HoujinBangou } from "houjinbangou-api"

const APPLICATION_ID: string = "XXXXXXXXXX"
const HB = new HoujinBangou(APPLICATION_ID)

/* Request endpoints */
async function(){

    // /num
    let response_num = await HB.num({number: "5050005005266", type: "02"})

    // /diff
    let response_diff = await HB.diff({from: "2019-06-25", to: "2019-06-25", type: "02"})

    // /name
    let response_name = await HB.name({ name: "大学", type: "02", mode: "2" })

}

LICENSE

MIT license
http://opensource.org/licenses/mit-license.php