Quickstart
About three minutes from nothing to a verified registration number.
1. Create an API key
Sign in to the dashboard and create one under API keys. It is shown once, at creation, and cannot be retrieved afterwards — store it then.
dc_live_…— production. Reads the live register.dc_test_…— test. Reads a frozen snapshot.
Test keys reading frozen data is deliberate. If they read live data, the registration number in this quickstart would eventually lapse, and your own test suite would break on a Tuesday because the register moved rather than because your code did. See Authentication.
2. Your first request
curl https://api.daichodo.com/v1/invoice-issuers/T8000000000001 \
-H "Authorization: Bearer dc_ test_ ..."
{
"registration_ number": "T8000000000001",
"corporate_ number": "8000000000001",
"kind": "corporate",
"country": "domestic",
"name": "株式会社ダイチョウドウ・テスト",
"kana": "カブシキガイシャダイチョウドウテスト",
"address": "東京都千代田区丸の内一丁目1番1号",
"registration_ date": "2023-10-01",
"update_ date": "2023-10-01",
"disposal_ date": null,
"expire_ date": null
}
A null disposal_date (取消年月日, revoked) and expire_date (失効年月日,
lapsed) mean the registration is currently valid. Note which is which: a
revocation is the NTA withdrawing the registration, an expiry is the issuer
letting it lapse.
3. Ask whether it was valid on the invoice date
The question that actually comes up is not "is this valid now" but "was it valid on the date of this invoice". Current state cannot answer that.
This one is on the Standard plan. The key you just created is on the free
plan, so this call returns 403 plan_
until you upgrade — with the plan you need in details.required_. Steps 1
and 2 work on a free key.
curl "https://api.daichodo.com/v1/invoice-issuers/T8000000000001/validity?on=2024-06-30" \
-H "Authorization: Bearer dc_ test_ ..."
{
"registration_ number": "T8000000000001",
"on": "2024-06-30",
"valid": true,
"reason": "valid",
"registered_ on": "2023-10-01",
"ended_ on": null
}
This is answerable because Daichodo keeps every published diff. The NTA can answer it for one entity on request; this endpoint answers it from our own change log, so it does not depend on the source being reachable.
4. Use an SDK
npm install daichodo
import { getInvoiceIssuer } from 'daichodo';
const { data, error } = await getInvoiceIssuer({
auth: () => process.env.DAICHODO_ API_ KEY,
path: { registration_ number: 'T8000000000001' },
});
if (error) throw new Error(error.message);
console.log(data.name);
pip install daichodo
from daichodo import AuthenticatedClient
from daichodo.api.registry import get_ invoice_ issuer
client = AuthenticatedClient(
base_ url="https://api.daichodo.com",
token="dc_ test_ ...",
)
issuer = get_ invoice_ issuer.sync(
client=client, registration_ number="T8000000000001"
)
Both are generated from the OpenAPI schema. Neither is hand-written.
Where to go next
- Change-detection webhooks — get told when a registration changes
- Validating numbers — check digits, free and unmetered
- Errors — the error shape and what to do about it