Daichodo

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_required until you upgrade — with the plan you need in details.required_plan. 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