API リファレンス
マスタ照会
計算エンドポイントは company_id と payment_date から法令マスタのバージョンを自動解決しますが、現在どのバージョンが公開されているかを確認したい場合は、この2つの照会エンドポイントを使います。いずれもクエリパラメータ・リクエストボディは不要です。
GET /v1/masters/tax-tables
Section titled “GET /v1/masters/tax-tables”公開済みの所得税表(月次給与用・賞与用)のバージョン一覧を返します。
レスポンスフィールド(data の各要素)
Section titled “レスポンスフィールド(data の各要素)”| フィールド | 型 | 必須 | 説明 |
|---|---|---|---|
type | "income_tax_table" | 必須 | マスタ種別の固定値 |
id | string(1文字以上) | 必須 | マスタの識別子 |
version | string(1文字以上) | 必須 | バージョン。同じ payment_date に解決される計算リクエストの settings_snapshot.tax_table_version と対応します |
effective_from | string(ISO 8601日付) | 必須 | このバージョンの有効開始日 |
effective_to | string(ISO 8601日付) | null | 必須(値は null 可) | 有効終了日。null は「現在も有効・終了日未定」を意味します |
source_artifact_id | string(1文字以上) | null | 任意(値は null 可) | 取込元の法令マスタ生成物ID。自己申告など出典を持たないレコードでは null になります |
curl 実例
Section titled “curl 実例”curl https://api.payroll.basee.io/v1/masters/tax-tables \ -H "X-API-Key: <YOUR_API_KEY>"レスポンス実例(抜粋)
Section titled “レスポンス実例(抜粋)”以下は令和8年分の月次・賞与それぞれの源泉徴収税額表です(実際のレスポンスにはこの2件以外の行も含まれる場合があります)。
{ "data": [ { "type": "income_tax_table", "id": "nta-income-tax-monthly-2026", "version": "2026", "effective_from": "2026-01-01", "effective_to": "2026-12-31", "source_artifact_id": "nta-income-tax-monthly-2026:2026" }, { "type": "income_tax_table", "id": "nta-income-tax-bonus-2026", "version": "2026", "effective_from": "2026-01-01", "effective_to": "2026-12-31", "source_artifact_id": "nta-income-tax-bonus-2026:2026" } ]}GET /v1/masters/rate-tables
Section titled “GET /v1/masters/rate-tables”公開済みの社会保険料率表・厚生年金保険料率表・雇用保険料率表のバージョン一覧を返します。type の値によってフィールド構成が異なります(3種類のオブジェクト形状のいずれか)。
共通フィールド
Section titled “共通フィールド”| フィールド | 型 | 必須 | 説明 |
|---|---|---|---|
type | "social_insurance_rate_table" | "employees_pension_rate_table" | "employment_insurance_rate_table" | 必須 | マスタ種別 |
id | string(1文字以上) | 必須 | マスタの識別子 |
version | string(1文字以上) | 必須 | バージョン |
effective_from | string(ISO 8601日付) | 必須 | 有効開始日 |
effective_to | string(ISO 8601日付) | null | 必須(値は null 可) | 有効終了日。null は終了日未定 |
provider | string(1文字以上) | null | 必須(値は null 可) | 提供元(kyoukaikenpo / jps / mhlw など) |
type: "social_insurance_rate_table" の追加フィールド
Section titled “type: "social_insurance_rate_table" の追加フィールド”都道府県ごとの協会けんぽ料率、または会社が自己申告した独自料率です。source_artifact_id は持ちません。
| フィールド | 型 | 必須 | 説明 |
|---|---|---|---|
prefecture_code | string(1〜2文字) | null | 必須(値は null 可) | JIS都道府県コード(例: "13" = 東京都) |
prefecture_name | string(1〜64文字) | null | 必須(値は null 可) | 都道府県名(英語表記、例: "tokyo") |
health_insurance_employee_rate | string(小数、例: "0.04925") | 必須 | 健康保険料率(従業員負担分) |
care_insurance_employee_rate | string(小数、例: "0.0081") | 必須 | 介護保険料率(従業員負担分) |
childcare_support_contribution_employee_rate | string(小数) | null | 必須(値は null 可) | 子ども・子育て支援金の料率。従業員負担がない場合は null。制度開始前の 2026-03 以前の version では null |
health_insurance_standard_bonus_annual_cap | integer円(0以上) | 必須 | 健康保険の標準賞与額の年度累計上限 |
type: "employees_pension_rate_table" の追加フィールド
Section titled “type: "employees_pension_rate_table" の追加フィールド”| フィールド | 型 | 必須 | 説明 |
|---|---|---|---|
employees_pension_insurance_employee_rate | string(小数、例: "0.0915") | 必須 | 厚生年金保険料率(従業員負担分) |
employees_pension_standard_bonus_monthly_cap | integer円(0以上) | 必須 | 厚生年金の標準賞与額の同月上限 |
source_artifact_id | string(1文字以上) | null | 任意(値は null 可) | 取込元の法令マスタ生成物ID |
type: "employment_insurance_rate_table" の追加フィールド
Section titled “type: "employment_insurance_rate_table" の追加フィールド”source_artifact_id を持ちますが(社会保険料率表と異なり)常にキー自体は存在し、値のみ null になり得ます。
| フィールド | 型 | 必須 | 説明 |
|---|---|---|---|
employee_rate | string(小数、例: "0.005") | 必須 | 雇用保険料率(従業員負担分) |
source_artifact_id | string(1文字以上) | null | 必須(値は null 可) | 取込元の法令マスタ生成物ID |
curl 実例
Section titled “curl 実例”curl https://api.payroll.basee.io/v1/masters/rate-tables \ -H "X-API-Key: <YOUR_API_KEY>"レスポンス実例(抜粋)
Section titled “レスポンス実例(抜粋)”協会けんぽの都道府県別料率は47都道府県分の行が含まれます(以下は東京都の例のみを抜粋)。厚生年金・雇用保険はそれぞれ全国一律1行です。
{ "data": [ { "type": "social_insurance_rate_table", "id": "kyoukaikenpo-tokyo-social-insurance-2026-03", "version": "2026-03", "effective_from": "2026-03-01", "effective_to": null, "provider": "kyoukaikenpo", "prefecture_code": "13", "prefecture_name": "tokyo", "health_insurance_employee_rate": "0.04925000", "care_insurance_employee_rate": "0.00810000", "childcare_support_contribution_employee_rate": "0.00115000", "health_insurance_standard_bonus_annual_cap": 5730000 }, "... (残り46都道府県分の kyoukaikenpo-<prefecture>-social-insurance-2026-03 が続く)", { "type": "employees_pension_rate_table", "id": "jps-employees-pension-2026-04", "version": "2026-04", "effective_from": "2026-04-01", "effective_to": "2027-03-31", "provider": "jps", "employees_pension_insurance_employee_rate": "0.09150000", "employees_pension_standard_bonus_monthly_cap": 1500000, "source_artifact_id": "jps-employees-pension-2026-04:2026-04" }, { "type": "employment_insurance_rate_table", "id": "mhlw-employment-insurance-2026-04", "version": "2026-04", "effective_from": "2026-04-01", "effective_to": "2027-03-31", "provider": "mhlw", "employee_rate": "0.00500000", "source_artifact_id": "mhlw-employment-insurance-2026-04:2026-04" } ]}リクエストボディを持たないため、バリデーションエラー(422)はありません。
| ステータス | error.code | 説明 |
|---|---|---|
401 | unauthorized | X-API-Key ヘッダーが未指定、または無効です |
429 | rate_limit_exceeded | レート制限超過。Retry-After ヘッダーの秒数だけ待ってから再試行してください |
エラーコード一覧とレート制限の詳細は エラーとレート制限 を参照してください。
- マスタとバージョン解決 —
payment_dateによるバージョン自動解決の仕組み - 端数処理の規則
- 月例給与の計算