{"openapi": "3.1.0", "info": {"title": "シルギア 法定耐用年数・償却率API", "version": "1.0.0", "description": "登録不要・無料の減価償却のAPI。減価償却資産の耐用年数等に関する省令の別表第一〜第六の法定耐用年数（全589項目）と、別表第七〜第十の償却率・改定償却率・保証率（耐用年数2〜100年）、別表第十一の残存割合、償却の方法・月割・中古資産の耐用年数の決まりを返します。省令の条文から作成し、照合した日を data_version で返します。説明: https://api.shirugear.com/taiyo/ 。v1 の中では項目を足すことはあっても、名前や意味は変えません（知らない項目は無視してください）。", "termsOfService": "https://api.shirugear.com/terms/", "contact": {"name": "アナライズギア株式会社（シルギア）", "url": "https://shirugear.com/contact"}}, "servers": [{"url": "https://api.shirugear.com"}], "paths": {"/taiyo/v1/assets.json": {"get": {"summary": "耐用年数表（別表第一〜第六の全項目）", "operationId": "getAssets", "responses": {"200": {"description": "耐用年数表", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Assets"}}}}, "400": {"description": "URLの形が違う", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "403": {"description": "日本国内以外から", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "404": {"description": "無いファイル", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "405": {"description": "GET/HEAD以外", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}}}, "/taiyo/v1/rates.json": {"get": {"summary": "償却率（2〜100年）・残存割合・決まり", "operationId": "getRates", "responses": {"200": {"description": "償却率", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Rates"}}}}, "400": {"description": "URLの形が違う", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "403": {"description": "日本国内以外から", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "404": {"description": "無いファイル", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "405": {"description": "GET/HEAD以外", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}}}, "/taiyo/v1/meta.json": {"get": {"summary": "データの版・省令の版・件数・出典", "operationId": "getMeta", "responses": {"200": {"description": "データの版", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Meta"}}}}, "400": {"description": "URLの形が違う", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "403": {"description": "日本国内以外から", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "404": {"description": "無いファイル", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "405": {"description": "GET/HEAD以外", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}}}}, "components": {"schemas": {"Asset": {"type": "object", "properties": {"id": {"type": "string", "description": "項目のID（別表の番号と path から作る10文字）"}, "table": {"type": "integer", "minimum": 1, "maximum": 6, "description": "別表の番号"}, "path": {"type": "array", "items": {"type": "string"}, "description": "省令の区分の並び（種類 › 構造又は用途 › 細目…）"}, "years": {"type": "integer", "description": "法定耐用年数（年）"}, "no": {"type": "integer", "description": "別表第二の設備の番号（1〜55）・別表第一の器具及び備品の項の番号（1〜12）"}}, "required": ["id", "table", "path", "years"]}, "Table": {"type": "object", "properties": {"table": {"type": "integer"}, "key": {"type": "string", "enum": ["tangible", "machinery", "intangible", "biological", "pollution", "research"]}, "label": {"type": "string"}, "name": {"type": "string"}, "count": {"type": "integer"}}, "required": ["table", "key", "label", "name", "count"]}, "Assets": {"type": "object", "properties": {"name": {"type": "string"}, "tables": {"type": "array", "items": {"$ref": "#/components/schemas/Table"}}, "items": {"type": "array", "items": {"$ref": "#/components/schemas/Asset"}}, "count": {"type": "integer"}, "data_version": {"type": "string"}}, "required": ["name", "tables", "items", "count", "data_version"]}, "Rate": {"type": "object", "properties": {"years": {"type": "integer", "minimum": 2, "maximum": 100}, "straight": {"type": "number", "description": "定額法の償却率（別表第八）"}, "declining_200": {"type": "object", "properties": {"rate": {"type": "number"}, "revised": {"type": ["number", "null"]}, "guarantee": {"type": ["number", "null"]}}, "required": ["rate", "revised", "guarantee"], "description": "200%定率法（別表第十・2012年4月1日以後の取得）"}, "declining_250": {"type": "object", "properties": {"rate": {"type": "number"}, "revised": {"type": ["number", "null"]}, "guarantee": {"type": ["number", "null"]}}, "required": ["rate", "revised", "guarantee"], "description": "250%定率法（別表第九・2007年4月1日〜2012年3月31日の取得）"}, "old_straight": {"type": "number", "description": "旧定額法の償却率（別表第七）"}, "old_declining": {"type": "number", "description": "旧定率法の償却率（別表第七）"}}, "required": ["years", "straight", "declining_200", "declining_250", "old_straight", "old_declining"]}, "Residual": {"type": "object", "properties": {"path": {"type": "array", "items": {"type": "string"}}, "ratio": {"type": "number", "description": "残存割合（0.1 は10%）"}}, "required": ["path", "ratio"]}, "Rules": {"type": "object", "description": "償却の方法・定額法・定率法・月割・端数・中古資産の決まり（文で説明）", "properties": {"methods": {"type": "object"}, "straight": {"type": "object"}, "declining": {"type": "object"}, "months": {"type": "object"}, "rounding": {"type": "string"}, "used": {"type": "object"}}, "required": ["methods", "straight", "declining", "months", "rounding", "used"]}, "Rates": {"type": "object", "properties": {"name": {"type": "string"}, "rates": {"type": "array", "items": {"$ref": "#/components/schemas/Rate"}}, "residual": {"type": "array", "items": {"$ref": "#/components/schemas/Residual"}}, "rules": {"$ref": "#/components/schemas/Rules"}, "data_version": {"type": "string"}}, "required": ["name", "rates", "residual", "rules", "data_version"]}, "Meta": {"type": "object", "properties": {"data_version": {"type": "string"}, "checked_at": {"type": "string"}, "files": {"type": "array", "items": {"type": "string"}}, "law": {"type": "object", "properties": {"title": {"type": "string"}, "enforced": {"type": "string"}, "last_amendment": {"type": "string"}}}, "counts": {"type": "object", "properties": {"assets": {"type": "integer"}, "rates": {"type": "integer"}}}, "scope": {"type": "string"}, "sources": {"type": "array", "items": {"type": "object", "properties": {"label": {"type": "string"}, "url": {"type": "string"}}, "required": ["label", "url"]}}}, "required": ["data_version", "checked_at", "files", "law", "counts", "scope", "sources"]}, "Error": {"type": "object", "properties": {"error": {"type": "object", "properties": {"status": {"type": "integer"}, "code": {"type": "string", "enum": ["invalid_request", "not_found", "region_not_allowed", "method_not_allowed"]}, "message": {"type": "string"}}, "required": ["status", "code", "message"]}}, "required": ["error"]}}}}
