diff --git a/aspida.config.js b/aspida.config.js new file mode 100644 index 0000000..ff9afee --- /dev/null +++ b/aspida.config.js @@ -0,0 +1,15 @@ +module.exports = [ + { input: 'samples/swagger' }, + { input: 'samples/simple', openapi: { outputFile: 'samples/simple-openapi.json' } }, + { input: 'samples/strapi' }, + { input: 'samples/freee' }, + { input: 'samples/openapi' }, + { input: 'samples/externals' }, + { input: 'samples/nullable-object' }, + { input: 'samples/array-one-of' }, + { input: 'samples/request-bodies' }, + { input: 'samples/responses' }, + { input: 'samples/path' }, + { input: 'samples/headers' }, + { input: 'samples/allOf-required' }, +]; diff --git a/package-lock.json b/package-lock.json index df33611..73eeae0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,17 +9,14 @@ "version": "0.0.0", "license": "MIT", "dependencies": { - "@apidevtools/swagger-parser": "^10.1.0", "aspida": "^1.14.0", - "js-yaml": "^4.1.0", "openapi-types": "^12.1.3", - "swagger2openapi": "^7.0.8" + "typescript-json-schema": "^0.64.0" }, "bin": { "aspida2openapi": "bin/index.js" }, "devDependencies": { - "@types/js-yaml": "^4.0.9", "@types/minimist": "^1.2.5", "eslint": "^9.9.0", "eslint-config-flat-gitignore": "^0.1.8", @@ -45,64 +42,24 @@ "node": ">=6.0.0" } }, - "node_modules/@apidevtools/json-schema-ref-parser": { - "version": "9.0.6", - "resolved": "https://registry.npmjs.org/@apidevtools/json-schema-ref-parser/-/json-schema-ref-parser-9.0.6.tgz", - "integrity": "sha512-M3YgsLjI0lZxvrpeGVk9Ap032W6TPQkH6pRAZz81Ac3WUNF79VQooAFnp8umjvVzUmD93NkogxEwbSce7qMsUg==", - "dependencies": { - "@jsdevtools/ono": "^7.1.3", - "call-me-maybe": "^1.0.1", - "js-yaml": "^3.13.1" - } - }, - "node_modules/@apidevtools/json-schema-ref-parser/node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "node_modules/@cspotcode/source-map-support": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", "dependencies": { - "sprintf-js": "~1.0.2" - } - }, - "node_modules/@apidevtools/json-schema-ref-parser/node_modules/js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" + "@jridgewell/trace-mapping": "0.3.9" }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/@apidevtools/openapi-schemas": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@apidevtools/openapi-schemas/-/openapi-schemas-2.1.0.tgz", - "integrity": "sha512-Zc1AlqrJlX3SlpupFGpiLi2EbteyP7fXmUOGup6/DnkRgjP9bgMM/ag+n91rsv0U1Gpz0H3VILA/o3bW7Ua6BQ==", "engines": { - "node": ">=10" + "node": ">=12" } }, - "node_modules/@apidevtools/swagger-methods": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/@apidevtools/swagger-methods/-/swagger-methods-3.0.2.tgz", - "integrity": "sha512-QAkD5kK2b1WfjDS/UQn/qQkbwF31uqRjPTrsCs5ZG9BQGAkjwvqGFjjPqAuzac/IYzpPtRzjCP1WrTuAIjMrXg==" - }, - "node_modules/@apidevtools/swagger-parser": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/@apidevtools/swagger-parser/-/swagger-parser-10.1.0.tgz", - "integrity": "sha512-9Kt7EuS/7WbMAUv2gSziqjvxwDbFSg3Xeyfuj5laUODX8o/k/CpsAKiQ8W7/R88eXFTMbJYg6+7uAmOWNKmwnw==", + "node_modules/@cspotcode/source-map-support/node_modules/@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", "dependencies": { - "@apidevtools/json-schema-ref-parser": "9.0.6", - "@apidevtools/openapi-schemas": "^2.1.0", - "@apidevtools/swagger-methods": "^3.0.2", - "@jsdevtools/ono": "^7.1.3", - "ajv": "^8.6.3", - "ajv-draft-04": "^1.0.0", - "call-me-maybe": "^1.0.1" - }, - "peerDependencies": { - "openapi-types": ">=7" + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" } }, "node_modules/@esbuild/aix-ppc64": { @@ -586,11 +543,6 @@ "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, - "node_modules/@exodus/schemasafe": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@exodus/schemasafe/-/schemasafe-1.1.1.tgz", - "integrity": "sha512-Pd7+aGvWIaTDL5ecV4ZBEtBrjXnk8/ly5xyHbikxVhgcq7qhihzHWHbcYmFupQBT2A5ggNZGvT7Bpj0M6AKHjA==" - }, "node_modules/@humanwhocodes/module-importer": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", @@ -635,7 +587,6 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", - "dev": true, "engines": { "node": ">=6.0.0" } @@ -652,8 +603,7 @@ "node_modules/@jridgewell/sourcemap-codec": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", - "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", - "dev": true + "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==" }, "node_modules/@jridgewell/trace-mapping": { "version": "0.3.25", @@ -665,11 +615,6 @@ "@jridgewell/sourcemap-codec": "^1.4.14" } }, - "node_modules/@jsdevtools/ono": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/@jsdevtools/ono/-/ono-7.1.3.tgz", - "integrity": "sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg==" - }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -913,17 +858,36 @@ "win32" ] }, + "node_modules/@tsconfig/node10": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.11.tgz", + "integrity": "sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==" + }, + "node_modules/@tsconfig/node12": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", + "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==" + }, + "node_modules/@tsconfig/node14": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", + "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==" + }, + "node_modules/@tsconfig/node16": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", + "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==" + }, "node_modules/@types/estree": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", "dev": true }, - "node_modules/@types/js-yaml": { - "version": "4.0.9", - "resolved": "https://registry.npmjs.org/@types/js-yaml/-/js-yaml-4.0.9.tgz", - "integrity": "sha512-k4MGaQl5TGo/iipqb2UDG2UwjXziSWkh0uysQelTlJpX1qGlpUZYm8PnO4DxG1qBomtJUdYJ6qR6xdIah10JLg==", - "dev": true + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==" }, "node_modules/@types/minimist": { "version": "1.2.5", @@ -931,12 +895,13 @@ "integrity": "sha512-hov8bUuiLiyFPGyFPE1lwWhmzYbirOXQNNo40+y3zow8aFVTeyn3VWL0VFFfdNddA8S4Vf0Tc062rzyNr7Paag==" }, "node_modules/@types/node": { - "version": "20.4.6", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.4.6.tgz", - "integrity": "sha512-q0RkvNgMweWWIvSMDiXhflGUKMdIxBo2M2tYM/0kEGDueQByFzK4KZAgu5YHGFNxziTlppNpTIBcqHQAxlfHdA==", - "dev": true, - "optional": true, - "peer": true + "version": "22.3.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.3.0.tgz", + "integrity": "sha512-nrWpWVaDZuaVc5X84xJ0vNrLvomM205oQyLsRt7OHNZbSHslcWsvgFR7O7hire2ZonjLrWBbedmotmIlJDVd6g==", + "peer": true, + "dependencies": { + "undici-types": "~6.18.2" + } }, "node_modules/@typescript-eslint/eslint-plugin": { "version": "8.1.0", @@ -1241,7 +1206,6 @@ "version": "8.12.1", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz", "integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==", - "dev": true, "bin": { "acorn": "bin/acorn" }, @@ -1258,32 +1222,15 @@ "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, - "node_modules/ajv": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", - "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", + "node_modules/acorn-walk": { + "version": "8.3.3", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.3.tgz", + "integrity": "sha512-MxXdReSRhGO7VlFe1bRG/oI7/mdLV9B9JJT0N8vZOhF7gFRR5l3M8W9G8JxmKV+JC5mGqJ0QvqfSOLsCPa4nUw==", "dependencies": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" + "acorn": "^8.11.0" }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/ajv-draft-04": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/ajv-draft-04/-/ajv-draft-04-1.0.0.tgz", - "integrity": "sha512-mv00Te6nmYbRp5DCwclxtt7yV/joXJPGS7nM+97GdxvuttCOfgI3K4U25zboyeX0O+myI8ERluxQe5wljMmVIw==", - "peerDependencies": { - "ajv": "^8.5.0" - }, - "peerDependenciesMeta": { - "ajv": { - "optional": true - } + "engines": { + "node": ">=0.4.0" } }, "node_modules/ansi-regex": { @@ -1320,10 +1267,16 @@ "node": ">= 8" } }, + "node_modules/arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==" + }, "node_modules/argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true }, "node_modules/array-union": { "version": "2.1.0", @@ -1365,8 +1318,7 @@ "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" }, "node_modules/binary-extensions": { "version": "2.2.0", @@ -1380,7 +1332,6 @@ "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -1406,11 +1357,6 @@ "node": ">=8" } }, - "node_modules/call-me-maybe": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.2.tgz", - "integrity": "sha512-HpX65o1Hnr9HH25ojC1YGs7HCQLq0GCOibSaWER0eNpgJ/Z1MZv2mTc7+xh6WOPxbRVcmgbv4hGU+uSQ/2xFZQ==" - }, "node_modules/callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -1530,8 +1476,12 @@ "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" + }, + "node_modules/create-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", + "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==" }, "node_modules/cross-spawn": { "version": "7.0.3", @@ -1587,6 +1537,14 @@ "node": ">=0.4.0" } }, + "node_modules/diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "engines": { + "node": ">=0.3.1" + } + }, "node_modules/dir-glob": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", @@ -1604,11 +1562,6 @@ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" }, - "node_modules/es6-promise": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-3.3.1.tgz", - "integrity": "sha512-SOp9Phqvqn7jtEUxPWdWfWoLmyt2VaJ6MpvP9Comy1MceMXqE6bxvaTu4iaxpYYPzhny28Lc+M87/c2cPK6lDg==" - }, "node_modules/esbuild": { "version": "0.21.5", "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.21.5.tgz", @@ -1830,18 +1783,6 @@ "url": "https://opencollective.com/eslint" } }, - "node_modules/esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/esquery": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", @@ -1896,7 +1837,8 @@ "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true }, "node_modules/fast-glob": { "version": "3.3.2", @@ -1926,11 +1868,6 @@ "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", "dev": true }, - "node_modules/fast-safe-stringify": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz", - "integrity": "sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==" - }, "node_modules/fastq": { "version": "1.17.1", "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", @@ -2023,6 +1960,11 @@ "node": ">= 6" } }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" + }, "node_modules/fsevents": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", @@ -2053,6 +1995,26 @@ "node": "*" } }, + "node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/glob-parent": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", @@ -2111,11 +2073,6 @@ "node": ">=8" } }, - "node_modules/http2-client": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/http2-client/-/http2-client-1.3.5.tgz", - "integrity": "sha512-EC2utToWl4RKfs5zd36Mxq7nzHHBuomZboI0yYL6Y0RmBgT7Sgkq4rQ0ezFTYoIsSs7Tm9SJe+o2FcAg6GBhGA==" - }, "node_modules/ignore": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", @@ -2150,6 +2107,21 @@ "node": ">=0.8.19" } }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, "node_modules/is-binary-path": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", @@ -2215,6 +2187,7 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, "dependencies": { "argparse": "^2.0.1" }, @@ -2228,11 +2201,6 @@ "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", "dev": true }, - "node_modules/json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" - }, "node_modules/json-stable-stringify-without-jsonify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", @@ -2300,6 +2268,11 @@ "@jridgewell/sourcemap-codec": "^1.5.0" } }, + "node_modules/make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==" + }, "node_modules/merge-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", @@ -2351,7 +2324,6 @@ "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, "dependencies": { "brace-expansion": "^1.1.7" }, @@ -2397,44 +2369,6 @@ "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", "dev": true }, - "node_modules/node-fetch": { - "version": "2.6.12", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.12.tgz", - "integrity": "sha512-C/fGU2E8ToujUivIO0H+tpQ6HWo4eEmchoPIoXtxCrVghxdKq+QOHqEZW7tuP3KlV3bC8FRMO5nMCC7Zm1VP6g==", - "dependencies": { - "whatwg-url": "^5.0.0" - }, - "engines": { - "node": "4.x || >=6.0.0" - }, - "peerDependencies": { - "encoding": "^0.1.0" - }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } - } - }, - "node_modules/node-fetch-h2": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/node-fetch-h2/-/node-fetch-h2-2.3.0.tgz", - "integrity": "sha512-ofRW94Ab0T4AOh5Fk8t0h8OBWrmjb0SSB20xh1H8YnPV9EJ+f5AMoYSUQ2zgJ4Iq2HAK0I2l5/Nequ8YzFS3Hg==", - "dependencies": { - "http2-client": "^1.2.5" - }, - "engines": { - "node": "4.x || >=6.0.0" - } - }, - "node_modules/node-readfiles": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/node-readfiles/-/node-readfiles-0.2.0.tgz", - "integrity": "sha512-SU00ZarexNlE4Rjdm83vglt5Y9yiQ+XI1XpflWlb7q7UTN1JUItm69xMeiQCTxtTfnzt+83T8Cx+vI2ED++VDA==", - "dependencies": { - "es6-promise": "^3.2.1" - } - }, "node_modules/normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", @@ -2443,69 +2377,12 @@ "node": ">=0.10.0" } }, - "node_modules/oas-kit-common": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/oas-kit-common/-/oas-kit-common-1.0.8.tgz", - "integrity": "sha512-pJTS2+T0oGIwgjGpw7sIRU8RQMcUoKCDWFLdBqKB2BNmGpbBMH2sdqAaOXUg8OzonZHU0L7vfJu1mJFEiYDWOQ==", - "dependencies": { - "fast-safe-stringify": "^2.0.7" - } - }, - "node_modules/oas-linter": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/oas-linter/-/oas-linter-3.2.2.tgz", - "integrity": "sha512-KEGjPDVoU5K6swgo9hJVA/qYGlwfbFx+Kg2QB/kd7rzV5N8N5Mg6PlsoCMohVnQmo+pzJap/F610qTodKzecGQ==", - "dependencies": { - "@exodus/schemasafe": "^1.0.0-rc.2", - "should": "^13.2.1", - "yaml": "^1.10.0" - }, - "funding": { - "url": "https://github.com/Mermade/oas-kit?sponsor=1" - } - }, - "node_modules/oas-resolver": { - "version": "2.5.6", - "resolved": "https://registry.npmjs.org/oas-resolver/-/oas-resolver-2.5.6.tgz", - "integrity": "sha512-Yx5PWQNZomfEhPPOphFbZKi9W93CocQj18NlD2Pa4GWZzdZpSJvYwoiuurRI7m3SpcChrnO08hkuQDL3FGsVFQ==", + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", "dependencies": { - "node-fetch-h2": "^2.3.0", - "oas-kit-common": "^1.0.8", - "reftools": "^1.1.9", - "yaml": "^1.10.0", - "yargs": "^17.0.1" - }, - "bin": { - "resolve": "resolve.js" - }, - "funding": { - "url": "https://github.com/Mermade/oas-kit?sponsor=1" - } - }, - "node_modules/oas-schema-walker": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/oas-schema-walker/-/oas-schema-walker-1.1.5.tgz", - "integrity": "sha512-2yucenq1a9YPmeNExoUa9Qwrt9RFkjqaMAA1X+U7sbb0AqBeTIdMHky9SQQ6iN94bO5NW0W4TRYXerG+BdAvAQ==", - "funding": { - "url": "https://github.com/Mermade/oas-kit?sponsor=1" - } - }, - "node_modules/oas-validator": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/oas-validator/-/oas-validator-5.0.8.tgz", - "integrity": "sha512-cu20/HE5N5HKqVygs3dt94eYJfBi0TsZvPVXDhbXQHiEityDN+RROTleefoKRKKJ9dFAF2JBkDHgvWj0sjKGmw==", - "dependencies": { - "call-me-maybe": "^1.0.1", - "oas-kit-common": "^1.0.8", - "oas-linter": "^3.2.2", - "oas-resolver": "^2.5.6", - "oas-schema-walker": "^1.1.5", - "reftools": "^1.1.9", - "should": "^13.2.1", - "yaml": "^1.10.0" - }, - "funding": { - "url": "https://github.com/Mermade/oas-kit?sponsor=1" + "wrappy": "1" } }, "node_modules/openapi-types": { @@ -2581,6 +2458,11 @@ "node": ">=14" } }, + "node_modules/path-equal": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/path-equal/-/path-equal-1.2.5.tgz", + "integrity": "sha512-i73IctDr3F2W+bsOWDyyVm/lqsXO47aY9nsFZUjTT/aljSbkxHxxCoyZ9UUrM8jK0JVod+An+rl48RCsvWM+9g==" + }, "node_modules/path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", @@ -2590,6 +2472,14 @@ "node": ">=8" } }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/path-key": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", @@ -2716,6 +2606,7 @@ "version": "2.3.0", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", + "dev": true, "engines": { "node": ">=6" } @@ -2751,14 +2642,6 @@ "node": ">=8.10.0" } }, - "node_modules/reftools": { - "version": "1.1.9", - "resolved": "https://registry.npmjs.org/reftools/-/reftools-1.1.9.tgz", - "integrity": "sha512-OVede/NQE13xBQ+ob5CKd5KyeJYU2YInb1bmV4nRoOfquZPkAkxuOXicSe1PvqIuZZ4kD13sPKBbR7UFDmli6w==", - "funding": { - "url": "https://github.com/Mermade/oas-kit?sponsor=1" - } - }, "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -2767,14 +2650,6 @@ "node": ">=0.10.0" } }, - "node_modules/require-from-string": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", - "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/resolve-from": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", @@ -2852,6 +2727,14 @@ "queue-microtask": "^1.2.2" } }, + "node_modules/safe-stable-stringify": { + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/safe-stable-stringify/-/safe-stable-stringify-2.4.3.tgz", + "integrity": "sha512-e2bDA2WJT0wxseVd4lsDP4+3ONX6HpMXQa1ZhFQ7SU+GjvORCmShbCMltrtIDfkYhVHrOcPtj+KhmDBdPdZD1g==", + "engines": { + "node": ">=10" + } + }, "node_modules/semver": { "version": "7.6.3", "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", @@ -2885,54 +2768,6 @@ "node": ">=8" } }, - "node_modules/should": { - "version": "13.2.3", - "resolved": "https://registry.npmjs.org/should/-/should-13.2.3.tgz", - "integrity": "sha512-ggLesLtu2xp+ZxI+ysJTmNjh2U0TsC+rQ/pfED9bUZZ4DKefP27D+7YJVVTvKsmjLpIi9jAa7itwDGkDDmt1GQ==", - "dependencies": { - "should-equal": "^2.0.0", - "should-format": "^3.0.3", - "should-type": "^1.4.0", - "should-type-adaptors": "^1.0.1", - "should-util": "^1.0.0" - } - }, - "node_modules/should-equal": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/should-equal/-/should-equal-2.0.0.tgz", - "integrity": "sha512-ZP36TMrK9euEuWQYBig9W55WPC7uo37qzAEmbjHz4gfyuXrEUgF8cUvQVO+w+d3OMfPvSRQJ22lSm8MQJ43LTA==", - "dependencies": { - "should-type": "^1.4.0" - } - }, - "node_modules/should-format": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/should-format/-/should-format-3.0.3.tgz", - "integrity": "sha512-hZ58adtulAk0gKtua7QxevgUaXTTXxIi8t41L3zo9AHvjXO1/7sdLECuHeIN2SRtYXpNkmhoUP2pdeWgricQ+Q==", - "dependencies": { - "should-type": "^1.3.0", - "should-type-adaptors": "^1.0.1" - } - }, - "node_modules/should-type": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/should-type/-/should-type-1.4.0.tgz", - "integrity": "sha512-MdAsTu3n25yDbIe1NeN69G4n6mUnJGtSJHygX3+oN0ZbO3DTiATnf7XnYJdGT42JCXurTb1JI0qOBR65shvhPQ==" - }, - "node_modules/should-type-adaptors": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/should-type-adaptors/-/should-type-adaptors-1.1.0.tgz", - "integrity": "sha512-JA4hdoLnN+kebEp2Vs8eBe9g7uy0zbRo+RMcU0EsNy+R+k049Ki+N5tT5Jagst2g7EAja+euFuoXFCa8vIklfA==", - "dependencies": { - "should-type": "^1.3.0", - "should-util": "^1.0.0" - } - }, - "node_modules/should-util": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/should-util/-/should-util-1.0.1.tgz", - "integrity": "sha512-oXF8tfxx5cDk8r2kYqlkUJzZpDBqVY/II2WhvU0n9Y3XYvAYRmeaf1PvvIvTgPnv4KJ+ES5M0PyDq5Jp+Ygy2g==" - }, "node_modules/siginfo": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz", @@ -2957,11 +2792,6 @@ "node": ">=0.10.0" } }, - "node_modules/sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==" - }, "node_modules/stackback": { "version": "0.0.2", "resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz", @@ -3022,32 +2852,6 @@ "node": ">=8" } }, - "node_modules/swagger2openapi": { - "version": "7.0.8", - "resolved": "https://registry.npmjs.org/swagger2openapi/-/swagger2openapi-7.0.8.tgz", - "integrity": "sha512-upi/0ZGkYgEcLeGieoz8gT74oWHA0E7JivX7aN9mAf+Tc7BQoRBvnIGHoPDw+f9TXTW4s6kGYCZJtauP6OYp7g==", - "dependencies": { - "call-me-maybe": "^1.0.1", - "node-fetch": "^2.6.1", - "node-fetch-h2": "^2.3.0", - "node-readfiles": "^0.2.0", - "oas-kit-common": "^1.0.8", - "oas-resolver": "^2.5.6", - "oas-schema-walker": "^1.1.5", - "oas-validator": "^5.0.8", - "reftools": "^1.1.9", - "yaml": "^1.10.0", - "yargs": "^17.0.1" - }, - "bin": { - "boast": "boast.js", - "oas-validate": "oas-validate.js", - "swagger2openapi": "swagger2openapi.js" - }, - "funding": { - "url": "https://github.com/Mermade/oas-kit?sponsor=1" - } - }, "node_modules/text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", @@ -3098,11 +2902,6 @@ "node": ">=8.0" } }, - "node_modules/tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" - }, "node_modules/ts-api-utils": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.3.0.tgz", @@ -3115,6 +2914,48 @@ "typescript": ">=4.2.0" } }, + "node_modules/ts-node": { + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", + "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", + "dependencies": { + "@cspotcode/source-map-support": "^0.8.0", + "@tsconfig/node10": "^1.0.7", + "@tsconfig/node12": "^1.0.7", + "@tsconfig/node14": "^1.0.0", + "@tsconfig/node16": "^1.0.2", + "acorn": "^8.4.1", + "acorn-walk": "^8.1.1", + "arg": "^4.1.0", + "create-require": "^1.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "v8-compile-cache-lib": "^3.0.1", + "yn": "3.1.1" + }, + "bin": { + "ts-node": "dist/bin.js", + "ts-node-cwd": "dist/bin-cwd.js", + "ts-node-esm": "dist/bin-esm.js", + "ts-node-script": "dist/bin-script.js", + "ts-node-transpile-only": "dist/bin-transpile.js", + "ts-script": "dist/bin-script-deprecated.js" + }, + "peerDependencies": { + "@swc/core": ">=1.2.50", + "@swc/wasm": ">=1.2.50", + "@types/node": "*", + "typescript": ">=2.7" + }, + "peerDependenciesMeta": { + "@swc/core": { + "optional": true + }, + "@swc/wasm": { + "optional": true + } + } + }, "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", @@ -3131,7 +2972,6 @@ "version": "5.5.4", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.4.tgz", "integrity": "sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==", - "dev": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -3163,15 +3003,84 @@ } } }, + "node_modules/typescript-json-schema": { + "version": "0.64.0", + "resolved": "https://registry.npmjs.org/typescript-json-schema/-/typescript-json-schema-0.64.0.tgz", + "integrity": "sha512-Sew8llkYSzpxaMoGjpjD6NMFCr6DoWFHLs7Bz1LU48pzzi8ok8W+GZs9cG87IMBpC0UI7qwBMUI2um0LGxxLOg==", + "dependencies": { + "@types/json-schema": "^7.0.9", + "@types/node": "^16.9.2", + "glob": "^7.1.7", + "path-equal": "^1.2.5", + "safe-stable-stringify": "^2.2.0", + "ts-node": "^10.9.1", + "typescript": "~5.1.0", + "yargs": "^17.1.1" + }, + "bin": { + "typescript-json-schema": "bin/typescript-json-schema" + } + }, + "node_modules/typescript-json-schema/node_modules/@types/node": { + "version": "16.18.105", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.105.tgz", + "integrity": "sha512-w2d0Z9yMk07uH3+Cx0N8lqFyi3yjXZxlbYappPj+AsOlT02OyxyiuNoNHdGt6EuiSm8Wtgp2YV7vWg+GMFrvFA==" + }, + "node_modules/typescript-json-schema/node_modules/typescript": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.1.6.tgz", + "integrity": "sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/undici-types": { + "version": "6.18.2", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.18.2.tgz", + "integrity": "sha512-5ruQbENj95yDYJNS3TvcaxPMshV7aizdv/hWYjGIKoANWKjhWNBsr2YEuYZKodQulB1b8l7ILOuDQep3afowQQ==", + "peer": true + }, "node_modules/uri-js": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, "dependencies": { "punycode": "^2.1.0" } }, - "node_modules/vite": { + "node_modules/v8-compile-cache-lib": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", + "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==" + }, + "node_modules/vite-node": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-2.0.5.tgz", + "integrity": "sha512-LdsW4pxj0Ot69FAoXZ1yTnA9bjGohr2yNBU7QKRxpz8ITSkhuDl6h3zS/tvgz4qrNjeRnvrWeXQ8ZF7Um4W00Q==", + "dev": true, + "dependencies": { + "cac": "^6.7.14", + "debug": "^4.3.5", + "pathe": "^1.1.2", + "tinyrainbow": "^1.2.0", + "vite": "^5.0.0" + }, + "bin": { + "vite-node": "vite-node.mjs" + }, + "engines": { + "node": "^18.0.0 || >=20.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/vite-node/node_modules/vite": { "version": "5.4.0", "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.0.tgz", "integrity": "sha512-5xokfMX0PIiwCMCMb9ZJcMyh5wbBun0zUzKib+L65vAZ8GY9ePZMXxFrHbr/Kyll2+LSCY7xtERPpxkBDKngwg==", @@ -3230,28 +3139,6 @@ } } }, - "node_modules/vite-node": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-2.0.5.tgz", - "integrity": "sha512-LdsW4pxj0Ot69FAoXZ1yTnA9bjGohr2yNBU7QKRxpz8ITSkhuDl6h3zS/tvgz4qrNjeRnvrWeXQ8ZF7Um4W00Q==", - "dev": true, - "dependencies": { - "cac": "^6.7.14", - "debug": "^4.3.5", - "pathe": "^1.1.2", - "tinyrainbow": "^1.2.0", - "vite": "^5.0.0" - }, - "bin": { - "vite-node": "vite-node.mjs" - }, - "engines": { - "node": "^18.0.0 || >=20.0.0" - }, - "funding": { - "url": "https://opencollective.com/vitest" - } - }, "node_modules/vitest": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/vitest/-/vitest-2.0.5.tgz", @@ -3450,18 +3337,63 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" - }, - "node_modules/whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "node_modules/vitest/node_modules/vite": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.0.tgz", + "integrity": "sha512-5xokfMX0PIiwCMCMb9ZJcMyh5wbBun0zUzKib+L65vAZ8GY9ePZMXxFrHbr/Kyll2+LSCY7xtERPpxkBDKngwg==", + "dev": true, "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" + "esbuild": "^0.21.3", + "postcss": "^8.4.40", + "rollup": "^4.13.0" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^18.0.0 || >=20.0.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^18.0.0 || >=20.0.0", + "less": "*", + "lightningcss": "^1.21.0", + "sass": "*", + "sass-embedded": "*", + "stylus": "*", + "sugarss": "*", + "terser": "^5.4.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + } } }, "node_modules/which": { @@ -3520,6 +3452,11 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" + }, "node_modules/y18n": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", @@ -3528,14 +3465,6 @@ "node": ">=10" } }, - "node_modules/yaml": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", - "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", - "engines": { - "node": ">= 6" - } - }, "node_modules/yargs": { "version": "17.7.2", "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", @@ -3561,6 +3490,14 @@ "node": ">=12" } }, + "node_modules/yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", + "engines": { + "node": ">=6" + } + }, "node_modules/yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", diff --git a/package.json b/package.json index 93603fe..22450a4 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "main": "dist/index.js", "bin": "bin/index.js", "scripts": { - "dev": "npm run build && node samples/rimraf.js && node bin/index.js", + "dev": "npm run build && node bin/index.js", "build": "npm run rimraf && tsc", "rimraf": "node -e \"require('fs').existsSync('dist') && require('fs').rmSync('dist', { recursive: true })\"", "lint": "eslint . && prettier --check \"./**/*.ts\"", @@ -31,14 +31,11 @@ "swagger" ], "dependencies": { - "@apidevtools/swagger-parser": "^10.1.0", "aspida": "^1.14.0", - "js-yaml": "^4.1.0", "openapi-types": "^12.1.3", - "swagger2openapi": "^7.0.8" + "typescript-json-schema": "^0.64.0" }, "devDependencies": { - "@types/js-yaml": "^4.0.9", "@types/minimist": "^1.2.5", "eslint": "^9.9.0", "eslint-config-flat-gitignore": "^0.1.8", diff --git a/samples/allOf-required.json b/samples/allOf-required.json new file mode 100644 index 0000000..ad89c7a --- /dev/null +++ b/samples/allOf-required.json @@ -0,0 +1,45 @@ +{ + "openapi": "3.1.0", + "info": { + "title": "aspida to OpenAPI", + "version": "v0.0" + }, + "servers": [ + { + "url": "/api" + } + ], + "paths": { + "samples/allOf-required/path": { + "get": { + "tags": [ + "path" + ], + "parameters": [], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "取得成功", + "type": "object", + "properties": { + "req_property": { + "description": "required property in response", + "type": "string" + }, + "unreq_property": { + "description": "unrequired property in response", + "type": "string" + } + } + } + } + } + } + } + } + } + }, + "components": {} +} \ No newline at end of file diff --git a/samples/allOf-required/@types/index.ts b/samples/allOf-required/@types/index.ts new file mode 100644 index 0000000..982f885 --- /dev/null +++ b/samples/allOf-required/@types/index.ts @@ -0,0 +1,9 @@ +/* eslint-disable */ +export type ResponseSchema = BaseSchema + +export type BaseSchema = { + /** required property in response */ + req_property?: string | undefined; + /** unrequired property in response */ + unreq_property?: string | undefined; +} diff --git a/samples/allOf-required/path/index.ts b/samples/allOf-required/path/index.ts new file mode 100644 index 0000000..854ac0f --- /dev/null +++ b/samples/allOf-required/path/index.ts @@ -0,0 +1,11 @@ +/* eslint-disable */ +import type { DefineMethods } from 'aspida'; +import type * as Types from '../@types'; + +export type Methods = DefineMethods<{ + get: { + status: 200; + /** 取得成功 */ + resBody: Types.ResponseSchema; + }; +}>; diff --git a/samples/array-one-of.json b/samples/array-one-of.json new file mode 100644 index 0000000..76988ca --- /dev/null +++ b/samples/array-one-of.json @@ -0,0 +1,78 @@ +{ + "openapi": "3.1.0", + "info": { + "title": "aspida to OpenAPI", + "version": "v0.0" + }, + "servers": [ + { + "url": "/api" + } + ], + "paths": { + "samples/array-one-of/user": { + "get": { + "tags": [ + "user" + ], + "parameters": [], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "sample", + "type": "object", + "properties": { + "user": { + "anyOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "roles": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "name": { + "type": "string" + } + } + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "authority": { + "type": "string" + } + } + } + ] + } + } + } + }, + { + "type": "null" + } + ] + } + } + } + } + } + } + } + } + } + }, + "components": {} +} \ No newline at end of file diff --git a/samples/array-one-of/@types/index.ts b/samples/array-one-of/@types/index.ts new file mode 100644 index 0000000..c5fa4ae --- /dev/null +++ b/samples/array-one-of/@types/index.ts @@ -0,0 +1,14 @@ +/* eslint-disable */ +export type User = { + id?: string | undefined; + roles?: (RoleA | RoleB)[] | undefined; +} + +export type RoleA = { + name?: string | undefined; +} + +export type RoleB = { + name?: string | undefined; + authority?: string | undefined; +} diff --git a/samples/array-one-of/user/index.ts b/samples/array-one-of/user/index.ts new file mode 100644 index 0000000..ab13dc1 --- /dev/null +++ b/samples/array-one-of/user/index.ts @@ -0,0 +1,14 @@ +/* eslint-disable */ +import type { DefineMethods } from 'aspida'; +import type * as Types from '../@types'; + +export type Methods = DefineMethods<{ + get: { + status: 200; + + /** sample */ + resBody: { + user?: Types.User | null | undefined; + }; + }; +}>; diff --git a/samples/externals.json b/samples/externals.json new file mode 100644 index 0000000..7e90b66 --- /dev/null +++ b/samples/externals.json @@ -0,0 +1,1002 @@ +{ + "openapi": "3.1.0", + "info": { + "title": "aspida to OpenAPI", + "version": "v0.0" + }, + "servers": [ + { + "url": "/api" + } + ], + "paths": { + "samples/externals/users/{user_id}/orders/{order_id}": { + "get": { + "tags": [ + "users" + ], + "parameters": [ + { + "name": "user_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "order_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "Ok", + "type": "object", + "properties": { + "id": { + "description": "Unique id of the order", + "type": "string" + }, + "offer_id": { + "description": "Id of the purchased offer", + "type": "string" + }, + "product_id": { + "description": "Id of the subscribed product this order relates to", + "type": "string" + }, + "identifier": { + "description": "user identifer (e.g. phone number) associated to the order", + "type": "string" + }, + "creation_date": { + "description": "Time when the order was created, in ISO-8601 extended local date format. Time-offset from UTC may be used to match local OB time.", + "type": "string" + }, + "type": { + "description": "type of the order", + "enum": [ + "purchase", + "unsubscription", + "update" + ], + "type": "string" + }, + "status": { + "$ref": "#/components/schemas/OrderStatus" + }, + "error": { + "description": "Information related to an error when trying to purchase an offer", + "type": "object", + "properties": { + "code": { + "description": "Error code produces when trying to purchase an offer", + "type": "string" + }, + "description": { + "description": "Message information related to the error when trying to purchase an offer. User Friendly field.", + "type": "string" + } + }, + "required": [ + "code", + "description" + ] + } + }, + "required": [ + "creation_date", + "id", + "status", + "type" + ] + } + } + } + } + } + } + }, + "samples/externals/users/{user_id}/orders": { + "get": { + "tags": [ + "users" + ], + "parameters": [ + { + "name": "user_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "identifier", + "in": "query", + "required": false, + "schema": { + "description": "The user identifier (e.g. phone number) to filter the results", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "Ok", + "type": "array", + "items": { + "description": "Information related to an order", + "type": "object", + "properties": { + "id": { + "description": "Unique id of the order", + "type": "string" + }, + "offer_id": { + "description": "Id of the purchased offer", + "type": "string" + }, + "product_id": { + "description": "Id of the subscribed product this order relates to", + "type": "string" + }, + "identifier": { + "description": "user identifer (e.g. phone number) associated to the order", + "type": "string" + }, + "creation_date": { + "description": "Time when the order was created, in ISO-8601 extended local date format. Time-offset from UTC may be used to match local OB time.", + "type": "string" + }, + "type": { + "description": "type of the order", + "enum": [ + "purchase", + "unsubscription", + "update" + ], + "type": "string" + }, + "status": { + "$ref": "#/components/schemas/OrderStatus" + }, + "error": { + "description": "Information related to an error when trying to purchase an offer", + "type": "object", + "properties": { + "code": { + "description": "Error code produces when trying to purchase an offer", + "type": "string" + }, + "description": { + "description": "Message information related to the error when trying to purchase an offer. User Friendly field.", + "type": "string" + } + }, + "required": [ + "code", + "description" + ] + } + }, + "required": [ + "creation_date", + "id", + "status", + "type" + ] + } + } + } + } + } + } + } + }, + "samples/externals/users/{user_id}/orders/purchase/invoice": { + "post": { + "tags": [ + "users" + ], + "parameters": [ + { + "name": "user_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "description": "Body to create a purchase order", + "type": "object", + "properties": { + "offer_id": { + "description": "Id of the offer related to the new order", + "type": "string" + }, + "identifier": { + "description": "user identifer (e.g. phone number) associated to the order", + "type": "string" + } + }, + "required": [ + "offer_id" + ] + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "description": "Created", + "type": "object", + "properties": { + "id": { + "description": "Unique id of the order", + "type": "string" + }, + "offer_id": { + "description": "Id of the purchased offer", + "type": "string" + }, + "product_id": { + "description": "Id of the subscribed product this order relates to", + "type": "string" + }, + "identifier": { + "description": "user identifer (e.g. phone number) associated to the order", + "type": "string" + }, + "creation_date": { + "description": "Time when the order was created, in ISO-8601 extended local date format. Time-offset from UTC may be used to match local OB time.", + "type": "string" + }, + "type": { + "description": "type of the order", + "enum": [ + "purchase", + "unsubscription", + "update" + ], + "type": "string" + }, + "status": { + "$ref": "#/components/schemas/OrderStatus" + }, + "error": { + "description": "Information related to an error when trying to purchase an offer", + "type": "object", + "properties": { + "code": { + "description": "Error code produces when trying to purchase an offer", + "type": "string" + }, + "description": { + "description": "Message information related to the error when trying to purchase an offer. User Friendly field.", + "type": "string" + } + }, + "required": [ + "code", + "description" + ] + } + }, + "required": [ + "creation_date", + "id", + "status", + "type" + ] + } + } + } + } + } + } + }, + "samples/externals/users/{user_id}/orders/purchase/wallet": { + "post": { + "tags": [ + "users" + ], + "parameters": [ + { + "name": "user_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "description": "Body to create a purchase order", + "type": "object", + "properties": { + "offer_id": { + "description": "Id of the offer related to the new order", + "type": "string" + }, + "identifier": { + "description": "user identifer (e.g. phone number) associated to the order", + "type": "string" + }, + "wallet_type": { + "$ref": "#/components/schemas/WalletType" + } + }, + "required": [ + "offer_id", + "wallet_type" + ] + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "description": "Created", + "type": "object", + "properties": { + "id": { + "description": "Unique id of the order", + "type": "string" + }, + "offer_id": { + "description": "Id of the purchased offer", + "type": "string" + }, + "product_id": { + "description": "Id of the subscribed product this order relates to", + "type": "string" + }, + "identifier": { + "description": "user identifer (e.g. phone number) associated to the order", + "type": "string" + }, + "creation_date": { + "description": "Time when the order was created, in ISO-8601 extended local date format. Time-offset from UTC may be used to match local OB time.", + "type": "string" + }, + "type": { + "description": "type of the order", + "enum": [ + "purchase", + "unsubscription", + "update" + ], + "type": "string" + }, + "status": { + "$ref": "#/components/schemas/OrderStatus" + }, + "error": { + "description": "Information related to an error when trying to purchase an offer", + "type": "object", + "properties": { + "code": { + "description": "Error code produces when trying to purchase an offer", + "type": "string" + }, + "description": { + "description": "Message information related to the error when trying to purchase an offer. User Friendly field.", + "type": "string" + } + }, + "required": [ + "code", + "description" + ] + } + }, + "required": [ + "creation_date", + "id", + "status", + "type" + ] + } + } + } + } + } + } + }, + "samples/externals/users/{user_id}/orders/unsubscribe": { + "post": { + "tags": [ + "users" + ], + "parameters": [ + { + "name": "user_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "description": "Body to create a purchase order", + "type": "object", + "properties": { + "product_id": { + "description": "Id of the product to be unsubscribed", + "type": "string" + } + }, + "required": [ + "product_id" + ] + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "description": "Created", + "type": "object", + "properties": { + "id": { + "description": "Unique id of the order", + "type": "string" + }, + "offer_id": { + "description": "Id of the purchased offer", + "type": "string" + }, + "product_id": { + "description": "Id of the subscribed product this order relates to", + "type": "string" + }, + "identifier": { + "description": "user identifer (e.g. phone number) associated to the order", + "type": "string" + }, + "creation_date": { + "description": "Time when the order was created, in ISO-8601 extended local date format. Time-offset from UTC may be used to match local OB time.", + "type": "string" + }, + "type": { + "description": "type of the order", + "enum": [ + "purchase", + "unsubscription", + "update" + ], + "type": "string" + }, + "status": { + "$ref": "#/components/schemas/OrderStatus" + }, + "error": { + "description": "Information related to an error when trying to purchase an offer", + "type": "object", + "properties": { + "code": { + "description": "Error code produces when trying to purchase an offer", + "type": "string" + }, + "description": { + "description": "Message information related to the error when trying to purchase an offer. User Friendly field.", + "type": "string" + } + }, + "required": [ + "code", + "description" + ] + } + }, + "required": [ + "creation_date", + "id", + "status", + "type" + ] + } + } + } + } + } + } + }, + "samples/externals/users/{user_id}/orders/update/renew": { + "post": { + "tags": [ + "users" + ], + "parameters": [ + { + "name": "user_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "description": "Body to create a update order", + "type": "object", + "properties": { + "product_id": { + "description": "Id of the product to be updated", + "type": "string" + }, + "renew": { + "description": "True to indicate that product renovation config should be activated, false to do the opposite", + "type": "boolean" + } + }, + "required": [ + "product_id", + "renew" + ] + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "description": "Created", + "type": "object", + "properties": { + "id": { + "description": "Unique id of the order", + "type": "string" + }, + "offer_id": { + "description": "Id of the purchased offer", + "type": "string" + }, + "product_id": { + "description": "Id of the subscribed product this order relates to", + "type": "string" + }, + "identifier": { + "description": "user identifer (e.g. phone number) associated to the order", + "type": "string" + }, + "creation_date": { + "description": "Time when the order was created, in ISO-8601 extended local date format. Time-offset from UTC may be used to match local OB time.", + "type": "string" + }, + "type": { + "description": "type of the order", + "enum": [ + "purchase", + "unsubscription", + "update" + ], + "type": "string" + }, + "status": { + "$ref": "#/components/schemas/OrderStatus" + }, + "error": { + "description": "Information related to an error when trying to purchase an offer", + "type": "object", + "properties": { + "code": { + "description": "Error code produces when trying to purchase an offer", + "type": "string" + }, + "description": { + "description": "Message information related to the error when trying to purchase an offer. User Friendly field.", + "type": "string" + } + }, + "required": [ + "code", + "description" + ] + } + }, + "required": [ + "creation_date", + "id", + "status", + "type" + ] + } + } + } + } + } + } + }, + "samples/externals/users/{user_id}/phone-numbers/{phone_number}/orders": { + "get": { + "tags": [ + "users" + ], + "parameters": [ + { + "name": "user_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "phone_number", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "Ok", + "type": "array", + "items": { + "description": "Information related to an order", + "type": "object", + "properties": { + "id": { + "description": "Unique id of the order", + "type": "string" + }, + "offer_id": { + "description": "Id of the purchased offer", + "type": "string" + }, + "product_id": { + "description": "Id of the subscribed product this order relates to", + "type": "string" + }, + "identifier": { + "description": "user identifer (e.g. phone number) associated to the order", + "type": "string" + }, + "creation_date": { + "description": "Time when the order was created, in ISO-8601 extended local date format. Time-offset from UTC may be used to match local OB time.", + "type": "string" + }, + "type": { + "description": "type of the order", + "enum": [ + "purchase", + "unsubscription", + "update" + ], + "type": "string" + }, + "status": { + "$ref": "#/components/schemas/OrderStatus" + }, + "error": { + "description": "Information related to an error when trying to purchase an offer", + "type": "object", + "properties": { + "code": { + "description": "Error code produces when trying to purchase an offer", + "type": "string" + }, + "description": { + "description": "Message information related to the error when trying to purchase an offer. User Friendly field.", + "type": "string" + } + }, + "required": [ + "code", + "description" + ] + } + }, + "required": [ + "creation_date", + "id", + "status", + "type" + ] + } + } + } + } + } + } + } + }, + "samples/externals/users/{user_id}/phone-numbers/{phone_number}/orders/purchase/invoice": { + "post": { + "tags": [ + "users" + ], + "parameters": [ + { + "name": "user_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "phone_number", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "description": "Body to create a purchase order", + "type": "object", + "properties": { + "offer_id": { + "description": "Id of the offer related to the new order", + "type": "string" + } + }, + "required": [ + "offer_id" + ] + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "description": "Created", + "type": "object", + "properties": { + "id": { + "description": "Unique id of the order", + "type": "string" + }, + "offer_id": { + "description": "Id of the purchased offer", + "type": "string" + }, + "product_id": { + "description": "Id of the subscribed product this order relates to", + "type": "string" + }, + "identifier": { + "description": "user identifer (e.g. phone number) associated to the order", + "type": "string" + }, + "creation_date": { + "description": "Time when the order was created, in ISO-8601 extended local date format. Time-offset from UTC may be used to match local OB time.", + "type": "string" + }, + "type": { + "description": "type of the order", + "enum": [ + "purchase", + "unsubscription", + "update" + ], + "type": "string" + }, + "status": { + "$ref": "#/components/schemas/OrderStatus" + }, + "error": { + "description": "Information related to an error when trying to purchase an offer", + "type": "object", + "properties": { + "code": { + "description": "Error code produces when trying to purchase an offer", + "type": "string" + }, + "description": { + "description": "Message information related to the error when trying to purchase an offer. User Friendly field.", + "type": "string" + } + }, + "required": [ + "code", + "description" + ] + } + }, + "required": [ + "creation_date", + "id", + "status", + "type" + ] + } + } + } + } + } + } + }, + "samples/externals/users/{user_id}/phone-numbers/{phone_number}/orders/purchase/wallet": { + "post": { + "tags": [ + "users" + ], + "parameters": [ + { + "name": "user_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "phone_number", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "description": "Body to create a purchase order", + "type": "object", + "properties": { + "offer_id": { + "description": "Id of the offer related to the new order", + "type": "string" + }, + "wallet_type": { + "$ref": "#/components/schemas/WalletType" + } + }, + "required": [ + "offer_id", + "wallet_type" + ] + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "description": "Created", + "type": "object", + "properties": { + "id": { + "description": "Unique id of the order", + "type": "string" + }, + "offer_id": { + "description": "Id of the purchased offer", + "type": "string" + }, + "product_id": { + "description": "Id of the subscribed product this order relates to", + "type": "string" + }, + "identifier": { + "description": "user identifer (e.g. phone number) associated to the order", + "type": "string" + }, + "creation_date": { + "description": "Time when the order was created, in ISO-8601 extended local date format. Time-offset from UTC may be used to match local OB time.", + "type": "string" + }, + "type": { + "description": "type of the order", + "enum": [ + "purchase", + "unsubscription", + "update" + ], + "type": "string" + }, + "status": { + "$ref": "#/components/schemas/OrderStatus" + }, + "error": { + "description": "Information related to an error when trying to purchase an offer", + "type": "object", + "properties": { + "code": { + "description": "Error code produces when trying to purchase an offer", + "type": "string" + }, + "description": { + "description": "Message information related to the error when trying to purchase an offer. User Friendly field.", + "type": "string" + } + }, + "required": [ + "code", + "description" + ] + } + }, + "required": [ + "creation_date", + "id", + "status", + "type" + ] + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "OrderStatus": { + "enum": [ + "confirmed", + "pending", + "rejected" + ], + "type": "string" + }, + "WalletType": { + "description": "type of the wallet", + "enum": [ + "additional_services", + "communications", + "general" + ], + "type": "string" + } + } + } +} \ No newline at end of file diff --git a/samples/externals/@types/index.ts b/samples/externals/@types/index.ts new file mode 100644 index 0000000..525310a --- /dev/null +++ b/samples/externals/@types/index.ts @@ -0,0 +1,344 @@ +/* eslint-disable */ +export type UserId = { + /** + * id of the user for which the methods apply. + * This value should be changed to the special keyword 'me' to simplify calls when access using OAuth2 with three-legged authentication + */ + user_id: string; +} + +export type PhoneNumber = { + /** The phone number to which the order refers to. 'E164 with +'' format. */ + phone_number: string; +} + +export type Identifier = { + /** The user identifier (e.g. phone number) to filter the results */ + identifier?: string | undefined; +} + +export type OfferId = { + /** Id of the offer */ + offer_id: string; +} + +export type OrderId = { + /** Id of the purchase order */ + order_id: string; +} + +export type CategoriesId = { + /** List of wanted category ids separated by commas */ + 'categories.id'?: string | undefined; +} + +export type Status = { + /** The status of the subscribed product used to filter the results */ + status?: string | undefined; +} + +export type Offers = Offer[] + +/** Offer object */ +export type Offer = { + /** Unique id of the offer */ + id: string; + /** Name of the offer. User Friendly field. */ + name: string; + /** List of user identifiers (e.g. phone_numbers) that can be used to subscribe to the offer */ + identifiers?: string[] | undefined; + /** Description of the offer. User Friendly field. */ + description: string; + /** List of categories for which the offer applies */ + categories: OfferCategory[]; + /** Time when the offer will be available to the user, in ISO-8601 extended local date format. Time-offset from UTC may be used to match local OB time. */ + start_date?: string | undefined; + /** Time when the offer will expire for the user, in ISO-8601 extended local date format. Time-offset from UTC may be used to match local OB time. */ + end_date?: string | undefined; + /** List of prices for this offer */ + prices: Price[]; + product: OfferedProduct; +} + +/** category of offer */ +export type OfferCategory = { + /** Name of the category. */ + name: string; + /** short description of the category. User Friendly field. */ + description?: string | undefined; + id: 'promotion' | 'bundle' | 'sms' | 'voice' | 'data' | 'value_added_service' | 'app' | 'iptv' | 'device' | 'recurring' | 'bolt-on' | 'dth'; +} + +/** Object that model a product definition */ +export type Product = { + /** Name to be displayed when referring to this product. User Friendly field. */ + display_name: string; + product_type: ProductType; + descriptions?: Descriptions | undefined; + subscription_type?: SubscriptionType | undefined; + quota?: Quotas | undefined; + connection?: Connection | undefined; + packages?: Packages | undefined; + /** list of freely defined strings that tag the product based on some criteria */ + tags?: string[] | undefined; +} + +/** Specifies how the service is paid (prepaid, postpaid, etc) */ +export type SubscriptionType = 'prepaid' | 'postpaid' | 'control' + +/** The type of the product */ +export type ProductType = 'mobile' | 'landline' | 'internet' | 'iptv' | 'bundle' | 'device' | 'voucher' | 'value_added_service' | 'bolt-on' | 'dth' + +/** Object that models an offered product */ +export type OfferedProduct = Product & { + /** Array of products objects. Only applies for product bundle */ + sub_products?: OfferedProduct[] | undefined; +} + +/** Object that models a subscribed product */ +export type SubscribedProduct = Product & { + /** Unique identifier of the product */ + id: string; + /** Process state of the product */ + status: 'active' | 'activating' | 'suspended'; + /** List of user identifiers (e.g. phone_numbers) associated to this specific product instance. */ + identifiers: string[]; + /** Time when the product was subscribed, in ISO-8601 extended local date format. Time-offset from UTC may be used to match local OB time. */ + start_date: string; + /** Time when the product will finalize, in ISO-8601 extended local date format. Time-offset from UTC may be used to match local OB time. */ + end_date?: string | undefined; + /** List of prices for this subscribed product */ + prices?: Price[] | undefined; + /** Array of products objects. Only applies for product bundle */ + sub_products?: SubscribedProduct[] | undefined; +} + +/** It applies for product_type mobile, value_added_service and bolt-on, and provides information on available data, voice and sms quota */ +export type Quotas = { + /** list of data quotas associated to this product */ + data?: DataQuota[] | undefined; + /** list of voice quotas associated to this product */ + voice?: VoiceQuota[] | undefined; + /** list of SMS quotas associated to this product */ + sms?: SmsQuota[] | undefined; +} + +export type CommonQuota = { + /** max units allowed by current quota. -1 is interpreted as there is no limit */ + max: number; + time_bands?: TimeBand[] | undefined; + origins?: Origin[] | undefined; +} + +/** Data quota information */ +export type DataQuota = CommonQuota & { + /** Unit used on the quota */ + unit: 'byte' | 'kilobyte' | 'megabyte' | 'gigabyte'; +} + +/** Voice quota information */ +export type VoiceQuota = CommonQuota & { + /** Unit used on the quota */ + unit: 'second' | 'minute' | 'hour'; + destinations?: Destination[] | undefined; +} + +/** SMS quota information */ +export type SmsQuota = CommonQuota & { + /** Unit used on the quota */ + unit: 'message'; + destinations?: Destination[] | undefined; +} + +/** Timebands when the quota applies */ +export type TimeBand = 'day' | 'night' | 'morning' | 'evening' | 'weekends' | 'workdays' | 'all' + +/** Destinations for which the quota applies */ +export type Destination = 'telefonica' | 'non-telefonica' | 'rural' | 'local' | 'regional' | 'national' | 'international' | 'mobile' | 'landline' | 'any' + +/** Origin for which the quota applies */ +export type Origin = 'home' | 'roaming' | 'EU' + +/** It applies only for product_type internet and provides information on connections characteristics */ +export type Connection = { + /** Connection type */ + type: 'fiber' | 'dsl' | 'unknown'; + /** Uplink speed in megabits per second */ + uplink_mbps: number; + /** Downlink speed in megabits per second */ + downlink_mbps: number; +} + +/** Package information */ +export type Package = { + /** Name of the package. User Friendly field. */ + name: string; + /** Unique package identifier */ + package_id: string; +} + +/** It applies only for product_type iptv and dth; provides information on available TV packages */ +export type Packages = Package[] + +/** Information about the product for displaying purposes. */ +export type Description = { + /** Text with information about the product. User Friendly field. */ + text: string; + /** HTTPS URL */ + url?: string | undefined; + /** + * Category of the description. This field is used to provide further info about displaying of the description text: + * - 'general': Default value for any description without specific category. + * - 'dates': Information about dates, related with the life-cycle of the product (e.g: contractual information about renowation conditions) + * - 'promotion': Information about product acquisition conditions, such as if special price is being applied and for how long, or if data quota is duplicated during first three months. + */ + category?: 'general' | 'dates' | 'promotion' | undefined; +} + +export type Descriptions = Description[] + +/** Price information */ +export type Price = { + /** Description of the price. User Friendly field. */ + description: string; + /** Type of the price */ + type: 'recurring' | 'usage' | 'one-off'; + /** + * Period between charge of the price. Applies when type equals recurring. + * Additional to pre-defined values of daily, weekly, monthly, yearly, any indication of number of days or hours is possible, with format {x}-days or {x}-hours (e.g.: 7-days or 24-hours). + */ + recurring_period?: string | undefined; + /** + * Period for which the product will be subscribed. It does not mean that offer is available for indicated period, it means that the product will be acquired and will last for indicated period. Applies when type equals one-off or usage. For backwards compatibility, in case of recurring prices, recurring_period param is used instead. + * Additional to pre-defined values of day, week, month, year, any indication of number of days or hours is possible, with format {x}-days or {x}-hours (e.g.: 7-days or 24-hours). + */ + period_duration?: string | undefined; + amount: External1_MoneyAmount; + /** porcentage factor of the taxes applied */ + tax: number; +} + +/** List of orders */ +export type Orders = Order[] + +/** Information related to an order */ +export type Order = { + /** Unique id of the order */ + id: string; + /** Id of the purchased offer */ + offer_id?: string | undefined; + /** Id of the subscribed product this order relates to */ + product_id?: string | undefined; + /** user identifer (e.g. phone number) associated to the order */ + identifier?: string | undefined; + /** Time when the order was created, in ISO-8601 extended local date format. Time-offset from UTC may be used to match local OB time. */ + creation_date: string; + /** type of the order */ + type: 'purchase' | 'unsubscription' | 'update'; + status: OrderStatus; + error?: OrderError | undefined; +} + +export type OrderStatus = 'pending' | 'confirmed' | 'rejected' + +/** Information related to an error when trying to purchase an offer */ +export type OrderError = { + /** Error code produces when trying to purchase an offer */ + code: string; + /** Message information related to the error when trying to purchase an offer. User Friendly field. */ + description: string; +} + +/** Information of what offer has to be used to create the order */ +export type CreatePurchaseOrderInvoice = { + /** Id of the offer related to the new order */ + offer_id: string; + /** user identifer (e.g. phone number) associated to the order */ + identifier?: string | undefined; +} + +/** Information of what offer has to be used to create the order */ +export type CreatePurchaseOrderWallet = { + /** Id of the offer related to the new order */ + offer_id: string; + /** user identifer (e.g. phone number) associated to the order */ + identifier?: string | undefined; + wallet_type: WalletType; +} + +/** Information of what offer has to be used to create the order using invoice has payment method */ +export type CreatePurchaseOrderByPhoneNumberInvoice = { + /** Id of the offer related to the new order */ + offer_id: string; +} + +/** Information of what offer has to be used to create the order using wallet as payment method */ +export type CreatePurchaseOrderByPhoneNumberWallet = { + /** Id of the offer related to the new order */ + offer_id: string; + wallet_type: WalletType; +} + +/** type of the wallet */ +export type WalletType = 'general' | 'communications' | 'additional_services' + +/** Information to create a product unsubscribe order */ +export type CreateUnsubscribeOrder = { + /** Id of the product to be unsubscribed */ + product_id: string; +} + +/** Information to create an order to set renew config of a product. */ +export type CreateUpdateRenewOrder = { + /** Id of the product to be updated */ + product_id: string; + /** True to indicate that product renovation config should be activated, false to do the opposite */ + renew: boolean; +} + +export type External0_ModelError = { + /** A human readable description of what the event represent */ + message: string; +} + +export type External1_QuotaCategory = 'general' | 'promotion' | 'voucher' | 'application' | 'pay_per_use' + +export type External0_InvalidArgument = { + /** Client specified an invalid argument, request body or query param. */ + code: 'INVALID_ARGUMENT'; +} & External0_ModelError + +export type External0_PermissionDenied = { + /** Client does not have sufficient permissions to perform this action. */ + code: 'PERMISSION_DENIED'; +} & External0_ModelError + +export type External0_NotFound = { + /** The specified resource is not found */ + code: 'NOT_FOUND'; +} & External0_ModelError + +export type External0_AlreadyExists = { + /** The resource that a client tried to create already exists. */ + code: 'ALREADY_EXISTS'; +} & External0_ModelError + +export type External0_Internal = { + /** Unknown server error.Typically a server bug. */ + code: 'INTERNAL'; +} & External0_ModelError + +export type External0_Timeout = { + /** Request timeout exceeded */ + code: 'TIMEOUT'; +} & External0_ModelError + +/** Money amount */ +export type External1_MoneyAmount = { + /** Amount value */ + value: number; + /** Currency code in which the amount is expressed. ISO 4217 */ + currency: string; + /** true if the amount includes government taxes */ + tax_included?: boolean | undefined; +} diff --git a/samples/externals/users/_user_id@string/orders/_order_id@string/index.ts b/samples/externals/users/_user_id@string/orders/_order_id@string/index.ts new file mode 100644 index 0000000..aa1af54 --- /dev/null +++ b/samples/externals/users/_user_id@string/orders/_order_id@string/index.ts @@ -0,0 +1,17 @@ +/* eslint-disable */ +import type { DefineMethods } from 'aspida'; +import type * as Types from '../../../../@types'; + +export type Methods = DefineMethods<{ + /** Get info of an order by order_id */ + get: { + status: 200; + /** Ok */ + resBody: Types.Order; + + resHeaders: { + /** Correlation id for the different services */ + 'x-correlator': string; + }; + }; +}>; diff --git a/samples/externals/users/_user_id@string/orders/index.ts b/samples/externals/users/_user_id@string/orders/index.ts new file mode 100644 index 0000000..3770415 --- /dev/null +++ b/samples/externals/users/_user_id@string/orders/index.ts @@ -0,0 +1,18 @@ +/* eslint-disable */ +import type { DefineMethods } from 'aspida'; +import type * as Types from '../../../@types'; + +export type Methods = DefineMethods<{ + /** List orders for a user */ + get: { + query?: Types.Identifier | undefined; + status: 200; + /** Ok */ + resBody: Types.Orders; + + resHeaders: { + /** Correlation id for the different services */ + 'x-correlator': string; + }; + }; +}>; diff --git a/samples/externals/users/_user_id@string/orders/purchase/invoice/index.ts b/samples/externals/users/_user_id@string/orders/purchase/invoice/index.ts new file mode 100644 index 0000000..e0d68d4 --- /dev/null +++ b/samples/externals/users/_user_id@string/orders/purchase/invoice/index.ts @@ -0,0 +1,20 @@ +/* eslint-disable */ +import type { DefineMethods } from 'aspida'; +import type * as Types from '../../../../../@types'; + +export type Methods = DefineMethods<{ + /** Creates an purchase order for an offer by its offer_id and using invoice as payment method */ + post: { + status: 201; + /** Created */ + resBody: Types.Order; + + resHeaders: { + /** Correlation id for the different services */ + 'x-correlator': string; + }; + + /** Body to create a purchase order */ + reqBody: Types.CreatePurchaseOrderInvoice; + }; +}>; diff --git a/samples/externals/users/_user_id@string/orders/purchase/wallet/index.ts b/samples/externals/users/_user_id@string/orders/purchase/wallet/index.ts new file mode 100644 index 0000000..ebddaed --- /dev/null +++ b/samples/externals/users/_user_id@string/orders/purchase/wallet/index.ts @@ -0,0 +1,20 @@ +/* eslint-disable */ +import type { DefineMethods } from 'aspida'; +import type * as Types from '../../../../../@types'; + +export type Methods = DefineMethods<{ + /** Creates an purchase order for an offer by its offer_id using wallet as payment method */ + post: { + status: 201; + /** Created */ + resBody: Types.Order; + + resHeaders: { + /** Correlation id for the different services */ + 'x-correlator': string; + }; + + /** Body to create a purchase order */ + reqBody: Types.CreatePurchaseOrderWallet; + }; +}>; diff --git a/samples/externals/users/_user_id@string/orders/unsubscribe/index.ts b/samples/externals/users/_user_id@string/orders/unsubscribe/index.ts new file mode 100644 index 0000000..fa43f03 --- /dev/null +++ b/samples/externals/users/_user_id@string/orders/unsubscribe/index.ts @@ -0,0 +1,20 @@ +/* eslint-disable */ +import type { DefineMethods } from 'aspida'; +import type * as Types from '../../../../@types'; + +export type Methods = DefineMethods<{ + /** Creates an unsubscribe order for a product_id */ + post: { + status: 201; + /** Created */ + resBody: Types.Order; + + resHeaders: { + /** Correlation id for the different services */ + 'x-correlator': string; + }; + + /** Body to create a purchase order */ + reqBody: Types.CreateUnsubscribeOrder; + }; +}>; diff --git a/samples/externals/users/_user_id@string/orders/update/renew/index.ts b/samples/externals/users/_user_id@string/orders/update/renew/index.ts new file mode 100644 index 0000000..5671d1e --- /dev/null +++ b/samples/externals/users/_user_id@string/orders/update/renew/index.ts @@ -0,0 +1,20 @@ +/* eslint-disable */ +import type { DefineMethods } from 'aspida'; +import type * as Types from '../../../../../@types'; + +export type Methods = DefineMethods<{ + /** Creates an update order for a product_id */ + post: { + status: 201; + /** Created */ + resBody: Types.Order; + + resHeaders: { + /** Correlation id for the different services */ + 'x-correlator': string; + }; + + /** Body to create a update order */ + reqBody: Types.CreateUpdateRenewOrder; + }; +}>; diff --git a/samples/externals/users/_user_id@string/phone-numbers/_phone_number@string/orders/index.ts b/samples/externals/users/_user_id@string/phone-numbers/_phone_number@string/orders/index.ts new file mode 100644 index 0000000..8f5022e --- /dev/null +++ b/samples/externals/users/_user_id@string/phone-numbers/_phone_number@string/orders/index.ts @@ -0,0 +1,17 @@ +/* eslint-disable */ +import type { DefineMethods } from 'aspida'; +import type * as Types from '../../../../../@types'; + +export type Methods = DefineMethods<{ + /** List orders for a phone number */ + get: { + status: 200; + /** Ok */ + resBody: Types.Orders; + + resHeaders: { + /** Correlation id for the different services */ + 'x-correlator': string; + }; + }; +}>; diff --git a/samples/externals/users/_user_id@string/phone-numbers/_phone_number@string/orders/purchase/invoice/index.ts b/samples/externals/users/_user_id@string/phone-numbers/_phone_number@string/orders/purchase/invoice/index.ts new file mode 100644 index 0000000..5b7f10b --- /dev/null +++ b/samples/externals/users/_user_id@string/phone-numbers/_phone_number@string/orders/purchase/invoice/index.ts @@ -0,0 +1,20 @@ +/* eslint-disable */ +import type { DefineMethods } from 'aspida'; +import type * as Types from '../../../../../../../@types'; + +export type Methods = DefineMethods<{ + /** Creates an purchase order for an offer by its offer_id using invoice has payment method */ + post: { + status: 201; + /** Created */ + resBody: Types.Order; + + resHeaders: { + /** Correlation id for the different services */ + 'x-correlator': string; + }; + + /** Body to create a purchase order */ + reqBody: Types.CreatePurchaseOrderByPhoneNumberInvoice; + }; +}>; diff --git a/samples/externals/users/_user_id@string/phone-numbers/_phone_number@string/orders/purchase/wallet/index.ts b/samples/externals/users/_user_id@string/phone-numbers/_phone_number@string/orders/purchase/wallet/index.ts new file mode 100644 index 0000000..d9356d6 --- /dev/null +++ b/samples/externals/users/_user_id@string/phone-numbers/_phone_number@string/orders/purchase/wallet/index.ts @@ -0,0 +1,20 @@ +/* eslint-disable */ +import type { DefineMethods } from 'aspida'; +import type * as Types from '../../../../../../../@types'; + +export type Methods = DefineMethods<{ + /** Creates an purchase order for an offer by its offer_id using a wallet has payment method */ + post: { + status: 201; + /** Created */ + resBody: Types.Order; + + resHeaders: { + /** Correlation id for the different services */ + 'x-correlator': string; + }; + + /** Body to create a purchase order */ + reqBody: Types.CreatePurchaseOrderByPhoneNumberWallet; + }; +}>; diff --git a/samples/freee.json b/samples/freee.json new file mode 100644 index 0000000..ccd6e98 --- /dev/null +++ b/samples/freee.json @@ -0,0 +1,26452 @@ +{ + "openapi": "3.1.0", + "info": { + "title": "aspida to OpenAPI", + "version": "v0.0" + }, + "servers": [ + { + "url": "/api" + } + ], + "paths": { + "samples/freee/api/1/account_items/{id}": { + "get": { + "tags": [ + "api", + "1", + "account_items" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "number" + } + }, + { + "name": "company_id", + "in": "query", + "required": true, + "schema": { + "description": "事業所ID", + "type": "number" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "account_item": { + "type": "object", + "properties": { + "id": { + "description": "勘定科目ID", + "type": "number" + }, + "name": { + "description": "勘定科目名 (30文字以内)", + "type": "string" + }, + "company_id": { + "description": "事業所ID", + "type": "number" + }, + "tax_code": { + "description": "税区分コード", + "type": "number" + }, + "account_category": { + "description": "勘定科目カテゴリー", + "type": "string" + }, + "account_category_id": { + "description": "勘定科目のカテゴリーID", + "type": "number" + }, + "shortcut": { + "description": "ショートカット1 (20文字以内)", + "type": "string" + }, + "shortcut_num": { + "description": "ショートカット2(勘定科目コード) (20文字以内)", + "type": "string" + }, + "corresponding_type_expense": { + "description": "支出取引相手勘定科目種別", + "type": "number" + }, + "corresponding_type_income": { + "description": "収入取引相手勘定科目種別", + "type": "number" + }, + "searchable": { + "description": "検索可能:2, 検索不可:3", + "type": "number" + }, + "accumulated_dep_account_item_name": { + "description": "減価償却累計額勘定科目", + "type": "string" + }, + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "品目ID", + "type": "number" + }, + "name": { + "description": "品目", + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + } + }, + "partners": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "取引先ID", + "type": "number" + }, + "name": { + "description": "取引先", + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + } + }, + "available": { + "description": "勘定科目の使用設定(true: 使用する、false: 使用しない)", + "type": "boolean" + }, + "walletable_id": { + "description": "口座ID", + "type": [ + "null", + "number" + ] + }, + "group_name": { + "description": "決算書表示名(小カテゴリー)", + "type": [ + "null", + "string" + ] + }, + "corresponding_income_name": { + "description": "収入取引相手勘定科目名", + "type": [ + "null", + "string" + ] + }, + "corresponding_income_id": { + "description": "収入取引相手勘定科目ID", + "type": [ + "null", + "number" + ] + }, + "corresponding_expense_name": { + "description": "支出取引相手勘定科目名", + "type": [ + "null", + "string" + ] + }, + "corresponding_expense_id": { + "description": "支出取引相手勘定科目ID", + "type": [ + "null", + "number" + ] + } + }, + "required": [ + "account_category", + "account_category_id", + "available", + "company_id", + "corresponding_type_expense", + "corresponding_type_income", + "id", + "name", + "searchable", + "tax_code", + "walletable_id" + ] + } + }, + "required": [ + "account_item" + ] + } + } + } + } + } + }, + "put": { + "tags": [ + "api", + "1", + "account_items" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "number" + } + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "description": "勘定科目の更新", + "type": "object", + "properties": { + "company_id": { + "description": "事業所ID", + "type": "number" + }, + "account_item": { + "type": "object", + "properties": { + "name": { + "description": "勘定科目名 (30文字以内)", + "type": "string" + }, + "shortcut": { + "description": "ショートカット1 (20文字以内)", + "type": "string" + }, + "shortcut_num": { + "description": "ショートカット2(勘定科目コード)(20文字以内)", + "type": "string" + }, + "tax_name": { + "description": "税区分", + "type": "string" + }, + "group_name": { + "description": "決算書表示名(小カテゴリー)", + "type": "string" + }, + "account_category": { + "description": "勘定科目カテゴリー", + "type": "string" + }, + "corresponding_income_name": { + "description": "収入取引相手勘定科目名", + "type": "string" + }, + "corresponding_expense_name": { + "description": "支出取引相手勘定科目名", + "type": "string" + }, + "accumulated_dep_account_item_name": { + "description": "減価償却累計額勘定科目", + "type": "string" + }, + "searchable": { + "description": "検索可能:2, 検索不可:3(登録時未指定の場合は2で登録されます。更新時未指定の場合はsearchableは変更されません。)", + "type": "number" + }, + "items": { + "description": "品目", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + } + } + } + }, + "partners": { + "description": "取引先", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + } + } + } + } + }, + "required": [ + "account_category", + "corresponding_expense_name", + "corresponding_income_name", + "group_name", + "name", + "tax_name" + ] + } + }, + "required": [ + "account_item", + "company_id" + ] + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "account_item": { + "type": "object", + "properties": { + "id": { + "description": "勘定科目ID", + "type": "number" + }, + "name": { + "description": "勘定科目名 (30文字以内)", + "type": "string" + }, + "company_id": { + "description": "事業所ID", + "type": "number" + }, + "tax_code": { + "description": "税区分コード", + "type": "number" + }, + "account_category": { + "description": "勘定科目カテゴリー", + "type": "string" + }, + "account_category_id": { + "description": "勘定科目のカテゴリーID", + "type": "number" + }, + "shortcut": { + "description": "ショートカット1 (20文字以内)", + "type": "string" + }, + "shortcut_num": { + "description": "ショートカット2(勘定科目コード) (20文字以内)", + "type": "string" + }, + "corresponding_type_expense": { + "description": "支出取引相手勘定科目種別", + "type": "number" + }, + "corresponding_type_income": { + "description": "収入取引相手勘定科目種別", + "type": "number" + }, + "searchable": { + "description": "検索可能:2, 検索不可:3", + "type": "number" + }, + "accumulated_dep_account_item_name": { + "description": "減価償却累計額勘定科目", + "type": "string" + }, + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "品目ID", + "type": "number" + }, + "name": { + "description": "品目", + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + } + }, + "partners": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "取引先ID", + "type": "number" + }, + "name": { + "description": "取引先", + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + } + }, + "available": { + "description": "勘定科目の使用設定(true: 使用する、false: 使用しない)", + "type": "boolean" + }, + "walletable_id": { + "description": "口座ID", + "type": [ + "null", + "number" + ] + }, + "group_name": { + "description": "決算書表示名(小カテゴリー)", + "type": [ + "null", + "string" + ] + }, + "corresponding_income_name": { + "description": "収入取引相手勘定科目名", + "type": [ + "null", + "string" + ] + }, + "corresponding_income_id": { + "description": "収入取引相手勘定科目ID", + "type": [ + "null", + "number" + ] + }, + "corresponding_expense_name": { + "description": "支出取引相手勘定科目名", + "type": [ + "null", + "string" + ] + }, + "corresponding_expense_id": { + "description": "支出取引相手勘定科目ID", + "type": [ + "null", + "number" + ] + } + }, + "required": [ + "account_category", + "account_category_id", + "available", + "company_id", + "corresponding_type_expense", + "corresponding_type_income", + "id", + "name", + "searchable", + "tax_code", + "walletable_id" + ] + } + }, + "required": [ + "account_item" + ] + } + } + } + } + } + }, + "delete": { + "tags": [ + "api", + "1", + "account_items" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "number" + } + }, + { + "name": "company_id", + "in": "query", + "required": true, + "schema": { + "description": "事業所ID", + "type": "number" + } + } + ] + } + }, + "samples/freee/api/1/account_items": { + "get": { + "tags": [ + "api", + "1", + "account_items" + ], + "parameters": [ + { + "name": "company_id", + "in": "query", + "required": true, + "schema": { + "description": "事業所ID", + "type": "number" + } + }, + { + "name": "base_date", + "in": "query", + "required": false, + "schema": { + "description": "基準日:指定した場合、勘定科目に紐づく税区分(default_tax_code)が、基準日の税率に基づいて返ります。", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "account_items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "勘定科目ID", + "type": "number" + }, + "name": { + "description": "勘定科目名 (30文字以内)", + "type": "string" + }, + "shortcut": { + "description": "ショートカット1 (20文字以内)", + "type": [ + "null", + "string" + ] + }, + "shortcut_num": { + "description": "ショートカット2(勘定科目コード) (20文字以内)", + "type": [ + "null", + "string" + ] + }, + "default_tax_id": { + "description": "デフォルト設定がされている税区分ID", + "type": "number" + }, + "default_tax_code": { + "description": "デフォルト設定がされている税区分コード", + "type": "number" + }, + "account_category": { + "description": "勘定科目カテゴリー", + "type": "string" + }, + "account_category_id": { + "description": "勘定科目のカテゴリーID", + "type": "number" + }, + "categories": { + "type": "array", + "items": { + "type": "string" + } + }, + "available": { + "description": "勘定科目の使用設定(true: 使用する、false: 使用しない)", + "type": "boolean" + }, + "walletable_id": { + "description": "口座ID", + "type": [ + "null", + "number" + ] + }, + "group_name": { + "description": "決算書表示名(小カテゴリー)", + "type": [ + "null", + "string" + ] + }, + "corresponding_income_name": { + "description": "収入取引相手勘定科目名", + "type": [ + "null", + "string" + ] + }, + "corresponding_income_id": { + "description": "収入取引相手勘定科目ID", + "type": [ + "null", + "number" + ] + }, + "corresponding_expense_name": { + "description": "支出取引相手勘定科目名", + "type": [ + "null", + "string" + ] + }, + "corresponding_expense_id": { + "description": "支出取引相手勘定科目ID", + "type": [ + "null", + "number" + ] + } + }, + "required": [ + "account_category", + "account_category_id", + "available", + "categories", + "default_tax_code", + "id", + "name", + "walletable_id" + ] + } + } + }, + "required": [ + "account_items" + ] + } + } + } + } + } + }, + "post": { + "tags": [ + "api", + "1", + "account_items" + ], + "parameters": [], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "description": "勘定科目の作成", + "type": "object", + "properties": { + "company_id": { + "description": "事業所ID", + "type": "number" + }, + "account_item": { + "type": "object", + "properties": { + "name": { + "description": "勘定科目名 (30文字以内)", + "type": "string" + }, + "shortcut": { + "description": "ショートカット1 (20文字以内)", + "type": "string" + }, + "shortcut_num": { + "description": "ショートカット2(勘定科目コード)(20文字以内)", + "type": "string" + }, + "tax_name": { + "description": "税区分", + "type": "string" + }, + "group_name": { + "description": "決算書表示名(小カテゴリー)", + "type": "string" + }, + "account_category": { + "description": "勘定科目カテゴリー", + "type": "string" + }, + "corresponding_income_name": { + "description": "収入取引相手勘定科目名", + "type": "string" + }, + "corresponding_expense_name": { + "description": "支出取引相手勘定科目名", + "type": "string" + }, + "accumulated_dep_account_item_name": { + "description": "減価償却累計額勘定科目", + "type": "string" + }, + "searchable": { + "description": "検索可能:2, 検索不可:3(登録時未指定の場合は2で登録されます。更新時未指定の場合はsearchableは変更されません。)", + "type": "number" + }, + "items": { + "description": "品目", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + } + } + } + }, + "partners": { + "description": "取引先", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + } + } + } + } + }, + "required": [ + "account_category", + "corresponding_expense_name", + "corresponding_income_name", + "group_name", + "name", + "tax_name" + ] + } + }, + "required": [ + "account_item", + "company_id" + ] + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "account_item": { + "type": "object", + "properties": { + "id": { + "description": "勘定科目ID", + "type": "number" + }, + "name": { + "description": "勘定科目名 (30文字以内)", + "type": "string" + }, + "company_id": { + "description": "事業所ID", + "type": "number" + }, + "tax_code": { + "description": "税区分コード", + "type": "number" + }, + "account_category": { + "description": "勘定科目カテゴリー", + "type": "string" + }, + "account_category_id": { + "description": "勘定科目のカテゴリーID", + "type": "number" + }, + "shortcut": { + "description": "ショートカット1 (20文字以内)", + "type": "string" + }, + "shortcut_num": { + "description": "ショートカット2(勘定科目コード) (20文字以内)", + "type": "string" + }, + "corresponding_type_expense": { + "description": "支出取引相手勘定科目種別", + "type": "number" + }, + "corresponding_type_income": { + "description": "収入取引相手勘定科目種別", + "type": "number" + }, + "searchable": { + "description": "検索可能:2, 検索不可:3", + "type": "number" + }, + "accumulated_dep_account_item_name": { + "description": "減価償却累計額勘定科目", + "type": "string" + }, + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "品目ID", + "type": "number" + }, + "name": { + "description": "品目", + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + } + }, + "partners": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "取引先ID", + "type": "number" + }, + "name": { + "description": "取引先", + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + } + }, + "available": { + "description": "勘定科目の使用設定(true: 使用する、false: 使用しない)", + "type": "boolean" + }, + "walletable_id": { + "description": "口座ID", + "type": [ + "null", + "number" + ] + }, + "group_name": { + "description": "決算書表示名(小カテゴリー)", + "type": [ + "null", + "string" + ] + }, + "corresponding_income_name": { + "description": "収入取引相手勘定科目名", + "type": [ + "null", + "string" + ] + }, + "corresponding_income_id": { + "description": "収入取引相手勘定科目ID", + "type": [ + "null", + "number" + ] + }, + "corresponding_expense_name": { + "description": "支出取引相手勘定科目名", + "type": [ + "null", + "string" + ] + }, + "corresponding_expense_id": { + "description": "支出取引相手勘定科目ID", + "type": [ + "null", + "number" + ] + } + }, + "required": [ + "account_category", + "account_category_id", + "available", + "company_id", + "corresponding_type_expense", + "corresponding_type_income", + "id", + "name", + "searchable", + "tax_code", + "walletable_id" + ] + } + }, + "required": [ + "account_item" + ] + } + } + } + } + } + } + }, + "samples/freee/api/1/banks/{id}": { + "get": { + "tags": [ + "api", + "1", + "banks" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "number" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "bank": { + "type": "object", + "properties": { + "id": { + "description": "連携サービスID", + "type": "number" + }, + "name": { + "description": "連携サービス名", + "type": "string" + }, + "type": { + "description": "連携サービス種別: (銀行口座: bank_account, クレジットカード: credit_card, 現金: wallet)", + "enum": [ + "bank_account", + "credit_card", + "wallet" + ], + "type": "string" + }, + "name_kana": { + "description": "連携サービス名(カナ)", + "type": [ + "null", + "string" + ] + } + }, + "required": [ + "id" + ] + } + }, + "required": [ + "bank" + ] + } + } + } + } + } + } + }, + "samples/freee/api/1/banks": { + "get": { + "tags": [ + "api", + "1", + "banks" + ], + "parameters": [ + { + "name": "offset", + "in": "query", + "required": false, + "schema": { + "description": "取得レコードのオフセット (デフォルト: 0)", + "type": "number" + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "description": "取得レコードの件数 (デフォルト: 20, 最小: 1, 最大: 500)", + "type": "number" + } + }, + { + "name": "type", + "in": "query", + "required": false, + "schema": { + "description": "サービス種別", + "enum": [ + "bank", + "credit_card", + "wallet" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "banks": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "連携サービスID", + "type": "number" + }, + "name": { + "description": "連携サービス名", + "type": "string" + }, + "type": { + "description": "連携サービス種別: (銀行口座: bank_account, クレジットカード: credit_card, 現金: wallet)", + "enum": [ + "bank_account", + "credit_card", + "wallet" + ], + "type": "string" + }, + "name_kana": { + "description": "連携サービス名(カナ)", + "type": [ + "null", + "string" + ] + } + }, + "required": [ + "id" + ] + } + } + }, + "required": [ + "banks" + ] + } + } + } + } + } + } + }, + "samples/freee/api/1/companies/{id}": { + "get": { + "tags": [ + "api", + "1", + "companies" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "number" + } + }, + { + "name": "details", + "in": "query", + "required": false, + "schema": { + "description": "取得情報に勘定科目・税区分コード・税区分・品目・取引先・部門・メモタグ・口座の一覧を含める", + "const": true, + "type": "boolean" + } + }, + { + "name": "account_items", + "in": "query", + "required": false, + "schema": { + "description": "取得情報に勘定科目一覧を含める", + "const": true, + "type": "boolean" + } + }, + { + "name": "taxes", + "in": "query", + "required": false, + "schema": { + "description": "取得情報に税区分コード・税区分一覧を含める", + "const": true, + "type": "boolean" + } + }, + { + "name": "items", + "in": "query", + "required": false, + "schema": { + "description": "取得情報に品目一覧を含める", + "const": true, + "type": "boolean" + } + }, + { + "name": "partners", + "in": "query", + "required": false, + "schema": { + "description": "取得情報に取引先一覧を含める", + "const": true, + "type": "boolean" + } + }, + { + "name": "sections", + "in": "query", + "required": false, + "schema": { + "description": "取得情報に部門一覧を含める", + "const": true, + "type": "boolean" + } + }, + { + "name": "tags", + "in": "query", + "required": false, + "schema": { + "description": "取得情報にメモタグ一覧を含める", + "const": true, + "type": "boolean" + } + }, + { + "name": "walletables", + "in": "query", + "required": false, + "schema": { + "description": "取得情報に口座一覧を含める", + "const": true, + "type": "boolean" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "company": { + "type": "object", + "properties": { + "id": { + "description": "事業所ID", + "type": "number" + }, + "name": { + "description": "事業所の正式名称 (100文字以内)", + "type": [ + "null", + "string" + ] + }, + "name_kana": { + "description": "正式名称フリガナ (100文字以内)", + "type": [ + "null", + "string" + ] + }, + "display_name": { + "description": "事業所名", + "type": "string" + }, + "tax_at_source_calc_type": { + "description": "源泉徴収税計算(0: 消費税を含める、1: 消費税を含めない)", + "type": "number" + }, + "contact_name": { + "description": "担当者名 (50文字以内)", + "type": [ + "null", + "string" + ] + }, + "head_count": { + "description": "従業員数(0: 経営者のみ、1: 2~5人、2: 6~10人、3: 11~20人、4: 21~30人、5: 31~40人、6: 41~100人、7: 100人以上", + "type": [ + "null", + "number" + ] + }, + "corporate_number": { + "description": "法人番号 (半角数字13桁、法人のみ)", + "type": "string" + }, + "txn_number_format": { + "description": "仕訳番号形式(not_used: 使用しない、digits: 数字(例:5091824)、alnum: 英数字(例:59J0P))", + "enum": [ + "alnum", + "digits", + "not_used" + ], + "type": "string" + }, + "default_wallet_account_id": { + "description": "決済口座のデフォルト", + "type": "number" + }, + "private_settlement": { + "description": "プライベート資金/役員資金(false: 使用しない、true: 使用する)", + "type": "boolean" + }, + "minus_format": { + "description": "マイナスの表示方法(0: -、 1: △)", + "type": "number" + }, + "role": { + "description": "ユーザーの権限", + "enum": [ + "admin", + "read_only", + "self_only", + "simple_accounting" + ], + "type": "string" + }, + "phone1": { + "description": "電話番号1", + "type": "string" + }, + "phone2": { + "description": "電話番号2", + "type": [ + "null", + "string" + ] + }, + "fax": { + "description": "FAX", + "type": [ + "null", + "string" + ] + }, + "zipcode": { + "description": "郵便番号", + "type": "string" + }, + "prefecture_code": { + "description": "都道府県コード(0: 北海道、1:青森、2:岩手、3:宮城、4:秋田、5:山形、6:福島、7:茨城、8:栃木、9:群馬、10:埼玉、11:千葉、12:東京、13:神奈川、14:新潟、15:富山、16:石川、17:福井、18:山梨、19:長野、20:岐阜、21:静岡、22:愛知、23:三重、24:滋賀、25:京都、26:大阪、27:兵庫、28:奈良、29:和歌山、30:鳥取、31:島根、32:岡山、33:広島、34:山口、35:徳島、36:香川、37:愛媛、38:高知、39:福岡、40:佐賀、41:長崎、42:熊本、43:大分、44:宮崎、45:鹿児島、46:沖縄", + "type": "number" + }, + "street_name1": { + "description": "市区町村・番地", + "type": "string" + }, + "street_name2": { + "description": "建物名・部屋番号など", + "type": "string" + }, + "invoice_layout": { + "description": "レイアウト(0: レイアウト1, 1:レイアウト2, 3:封筒1, 4:レイアウト3(繰越金額欄あり), 5: 封筒2(繰越金額欄あり))", + "type": "number" + }, + "invoice_style": { + "description": "スタイル(0: クラシック, 1: モダン)", + "type": "number" + }, + "amount_fraction": { + "description": "金額端数処理方法(0: 切り捨て、1: 切り上げ、2: 四捨五入)", + "type": "number" + }, + "industry_class": { + "description": "種別(agriculture_forestry_fisheries_ore: 農林水産業/鉱業、construction: 建設、manufacturing_processing: 製造/加工、it: IT、transportation_logistics: 運輸/物流、retail_wholesale: 小売/卸売、finance_insurance: 金融/保険、real_estate_rental: 不動産/レンタル、profession: 士業/学術/専門技術サービス、design_production: デザイン/制作、food: 飲食、leisure_entertainment: レジャー/娯楽、lifestyle: 生活関連サービス、education: 教育/学習支援、medical_welfare: 医療/福祉、other_services: その他サービス、other: その他)", + "enum": [ + "", + "agriculture_forestry_fisheries_ore", + "construction", + "design_production", + "education", + "finance_insurance", + "food", + "it", + "lifestyle", + "manufacturing_processing", + "medical_welfare", + "other", + "other_services", + "profession", + "real_estate_rental", + "retail_wholesale", + "transportation_logistics" + ], + "type": "string" + }, + "industry_code": { + "description": "コード(transport_delivery: 輸送業/配送業、delivery: バイク便等の配達業、other_transportation_logistics: その他の運輸業、物流業)", + "enum": [ + "", + "delivery", + "other_transportation_logistics", + "transport_delivery" + ], + "type": "string" + }, + "workflow_setting": { + "description": "仕訳承認フロー(enable: 有効、 disable: 無効)", + "enum": [ + "disable", + "enable" + ], + "type": "string" + }, + "use_partner_code": { + "description": "取引先コードの利用設定(true: 有効、 false: 無効)", + "type": "boolean" + }, + "fiscal_years": { + "type": "array", + "items": { + "type": "object", + "properties": { + "use_industry_template": { + "description": "製造業向け機能(true: 使用する、false: 使用しない)", + "type": "boolean" + }, + "indirect_write_off_method": { + "description": "固定資産の控除法(false: 減価償却累計額でまとめる、true: 独立間接控除方式)", + "type": "boolean" + }, + "start_date": { + "description": "期首日", + "type": "string" + }, + "end_date": { + "description": "期末日", + "type": "string" + }, + "depreciation_record_method": { + "description": "月次償却(0: しない、1: する)", + "type": "number" + }, + "tax_method": { + "description": "課税区分(0: 免税、1: 簡易課税、2: 本則課税(個別対応方式)、3: 本則課税(一括比例配分方式)、4: 本則課税(全額控除))", + "type": "number" + }, + "sales_tax_business_code": { + "description": "簡易課税用事業区分(0: 第一種:卸売業、1: 第二種:小売業、2: 第三種:農林水産業、工業、建設業、製造業など、3: 第四種:飲食店業など、4: 第五種:金融・保険業、運輸通信業、サービス業など、5: 第六種:不動産業など", + "type": "number" + }, + "tax_fraction": { + "description": "消費税端数処理方法(0: 切り捨て、1: 切り上げ、2: 四捨五入)", + "type": "number" + }, + "tax_account_method": { + "description": "消費税経理処理方法(0: 税込経理、1: 旧税抜経理、2: 税抜経理)", + "type": "number" + }, + "return_code": { + "description": "不動産所得使用区分(0: 一般、1: 一般/不動産) ※個人事業主のみ設定可能", + "type": "number" + } + }, + "required": [ + "depreciation_record_method", + "indirect_write_off_method", + "return_code", + "sales_tax_business_code", + "tax_account_method", + "tax_fraction", + "tax_method", + "use_industry_template" + ] + } + } + }, + "required": [ + "amount_fraction", + "contact_name", + "corporate_number", + "display_name", + "fax", + "fiscal_years", + "head_count", + "id", + "industry_class", + "industry_code", + "invoice_layout", + "invoice_style", + "minus_format", + "name", + "name_kana", + "phone1", + "phone2", + "prefecture_code", + "private_settlement", + "role", + "street_name1", + "street_name2", + "tax_at_source_calc_type", + "txn_number_format", + "use_partner_code", + "workflow_setting", + "zipcode" + ] + } + }, + "required": [ + "company" + ] + } + } + } + } + } + }, + "put": { + "tags": [ + "api", + "1", + "companies" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "number" + } + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "事業所の正式名称 (100文字以内)", + "type": "string" + }, + "name_kana": { + "description": "正式名称フリガナ (100文字以内)", + "type": "string" + }, + "contact_name": { + "description": "担当者名 (50文字以内)", + "type": "string" + }, + "address_attributes": { + "type": "object", + "properties": { + "zipcode": { + "description": "郵便番号", + "type": "string" + }, + "prefecture_code": { + "description": "都道府県コード(0: 北海道、1:青森、2:岩手、3:宮城、4:秋田、5:山形、6:福島、7:茨城、8:栃木、9:群馬、10:埼玉、11:千葉、12:東京、13:神奈川、14:新潟、15:富山、16:石川、17:福井、18:山梨、19:長野、20:岐阜、21:静岡、22:愛知、23:三重、24:滋賀、25:京都、26:大阪、27:兵庫、28:奈良、29:和歌山、30:鳥取、31:島根、32:岡山、33:広島、34:山口、35:徳島、36:香川、37:愛媛、38:高知、39:福岡、40:佐賀、41:長崎、42:熊本、43:大分、44:宮崎、45:鹿児島、46:沖縄", + "type": "number" + }, + "street_name1": { + "description": "市区町村・番地", + "type": "string" + }, + "street_name2": { + "description": "建物名・部屋番号など", + "type": "string" + } + } + }, + "phone1": { + "description": "電話番号1", + "type": "string" + }, + "phone2": { + "description": "電話番号2", + "type": "string" + }, + "fax": { + "description": "FAX", + "type": "string" + }, + "sales_information_attributes": { + "type": "object", + "properties": { + "industry_class": { + "description": "種別(agriculture_forestry_fisheries_ore: 農林水産業/鉱業、construction: 建設、manufacturing_processing: 製造/加工、it: IT、transportation_logistics: 運輸/物流、retail_wholesale: 小売/卸売、finance_insurance: 金融/保険、real_estate_rental: 不動産/レンタル、profession: 士業/学術/専門技術サービス、design_production: デザイン/制作、food: 飲食、leisure_entertainment: レジャー/娯楽、lifestyle: 生活関連サービス、education: 教育/学習支援、medical_welfare: 医療/福祉、other_services: その他サービス、other: その他)Available values : agriculture_forestry_fisheries_ore, construction, manufacturing_processing, it, transportation_logistics, retail_wholesale, finance_insurance, real_estate_rental, profession, design_production, food, leisure_entertainment, lifestyle, education, medical_welfare, other_services, other", + "enum": [ + "agriculture_forestry_fisheries_ore", + "construction", + "design_production", + "education", + "finance_insurance", + "food", + "it", + "leisure_entertainment", + "lifestyle", + "manufacturing_processing", + "medical_welfare", + "other", + "other_services", + "profession", + "real_estate_rental", + "retail_wholesale", + "transportation_logistics" + ], + "type": "string" + }, + "industry_code": { + "description": "業種(agriculture: 農業, forestry: 林業, fishing_industry: 漁業、水産養殖業, mining: 鉱業、採石業、砂利採取業, civil_contractors: 土木工事業, pavement: 舗装工事業, carpenter: とび、大工、左官等の建設工事業, renovation: リフォーム工事業, electrical_plumbing: 電気、管工事等の設備工事業, grocery: 食料品の製造加工業, machinery_manufacturing: 機械器具の製造加工業, printing: 印刷業, other_manufacturing: その他の製造加工業, software_development: 受託:ソフトウェア、アプリ開発業, system_development: 受託:システム開発業, survey_analysis: 受託:調査、分析等の情報処理業, server_management: 受託:サーバー運営管理, website_production: 受託:ウェブサイト制作, online_service_management: オンラインサービス運営業, online_advertising_agency: オンライン広告代理店業, online_advertising_planning_production: オンライン広告企画・制作業, online_media_management: オンラインメディア運営業, portal_site_management: ポータルサイト運営業, other_it_services: その他、IT サービス業, transport_delivery: 輸送業、配送業, delivery: バイク便等の配達業, other_transportation_logistics: その他の運輸業、物流業, other_wholesale: 卸売業:その他, clothing_wholesale_fiber: 卸売業:衣類卸売/繊維, food_wholesale: 卸売業:飲食料品, entrusted_development_wholesale: 卸売業:機械器具, online_shop: 小売業:無店舗 オンラインショップ, fashion_grocery_store: 小売業:店舗あり ファッション、雑貨, food_store: 小売業:店舗あり 生鮮食品、飲食料品, entrusted_store: 小売業:店舗あり 機械、器具, other_store: 小売業:店舗あり その他, financial_instruments_exchange: 金融業:金融商品取引, commodity_futures_investment_advisor: 金融業:商品先物取引、商品投資顧問, other_financial: 金融業:その他, brokerage_insurance: 保険業:仲介、代理, other_insurance: 保険業:その他, real_estate_developer: 不動産業:ディベロッパー, real_estate_brokerage: 不動産業:売買、仲介, rent_coin_parking_management: 不動産業:賃貸、コインパーキング、管理, rental_office_co_working_space: 不動産業:レンタルオフィス、コワーキングスペース, rental_lease: レンタル業、リース業, cpa_tax_accountant: 士業:公認会計士事務所、税理士事務所, law_office: 士業:法律事務所, judicial_and_administrative_scrivener: 士業:司法書士事務所/行政書士事務所, labor_consultant: 士業:社会保険労務士事務所, other_profession: 士業:その他, business_consultant: 経営コンサルタント, academic_research_development: 学術・開発研究機関, advertising_agency: 広告代理店, advertising_planning_production: 広告企画/制作, design_development: ソフトウェア、アプリ開発業(受託), apparel_industry_design: 服飾デザイン業、工業デザイン業, website_design: ウェブサイト制作(受託), advertising_planning_design: 広告企画/制作業, other_design: その他、デザイン/制作, restaurants_coffee_shops: レストラン、喫茶店等の飲食店業, sale_of_lunch: 弁当の販売業, bread_confectionery_manufacture_sale: パン、菓子等の製造販売業, delivery_catering_mobile_catering: デリバリー業、ケータリング業、移動販売業, hotel_inn: 宿泊業:ホテル、旅館, homestay: 宿泊業:民泊, travel_agency: 旅行代理店業, leisure_sports_facility_management: レジャー、スポーツ等の施設運営業, show_event_management: ショー、イベント等の興行、イベント運営業, barber: ビューティ、ヘルスケア業:床屋、理容室, beauty_salon: ビューティ、ヘルスケア業:美容室, spa_sand_bath_sauna: ビューティ、ヘルスケア業:スパ、砂風呂、サウナ等, este_ail_salon: ビューティ、ヘルスケア業:その他、エステサロン、ネイルサロン等, bridal_planning_introduce_wedding: 冠婚葬祭業:ブライダルプランニング、結婚式場紹介等, memorial_ceremony_funeral: 冠婚葬祭業:メモリアルセレモニー、葬儀等, moving: 引っ越し業, courier_industry: 宅配業, house_maid_cleaning_agency: 家事代行サービス業:無店舗 ハウスメイド、掃除代行等, re_tailoring_clothes: 家事代行サービス業:店舗あり 衣類修理、衣類仕立て直し等, training_institute_management: 研修所等の施設運営業, tutoring_school: 学習塾、進学塾等の教育・学習支援業, music_calligraphy_abacus_classroom: 音楽教室、書道教室、そろばん教室等のの教育・学習支援業, english_school: 英会話スクール等の語学学習支援業, tennis_yoga_judo_school: テニススクール、ヨガ教室、柔道場等のスポーツ指導、支援業, culture_school: その他、カルチャースクール等の教育・学習支援業, seminar_planning_management: セミナー等の企画、運営業, hospital_clinic: 医療業:病院、一般診療所、クリニック等, dental_clinic: 医療業:歯科診療所, other_medical_services: 医療業:その他、医療サービス等, nursery: 福祉業:保育所等、児童向け施設型サービス, nursing_home: 福祉業:老人ホーム等、老人向け施設型サービス, rehabilitation_support_services: 福祉業:療育支援サービス等、障害者等向け施設型サービス, other_welfare: 福祉業:その他、施設型福祉サービス, visit_welfare_service: 福祉業:訪問型福祉サービス, recruitment_temporary_staffing: 人材紹介業、人材派遣業, life_related_recruitment_temporary_staffing: 生活関連サービスの人材紹介業、人材派遣業, car_maintenance_car_repair: 自動車整備業、自動車修理業, machinery_equipment_maintenance_repair: 機械機器類の整備業、修理業, cleaning_maintenance_building_management: 清掃業、メンテナンス業、建物管理業, security: 警備業, other_services: その他のサービス業, npo: NPO, general_incorporated_association: 一般社団法人, general_incorporated_foundation: 一般財団法人, other_association: その他組織)", + "enum": [ + "academic_research_development", + "advertising_agency", + "advertising_planning_design", + "advertising_planning_production", + "agriculture", + "apparel_industry_design", + "barber", + "beauty_salon", + "bread_confectionery_manufacture_sale", + "bridal_planning_introduce_wedding", + "brokerage_insurance", + "business_consultant", + "car_maintenance_car_repair", + "carpenter", + "civil_contractors", + "cleaning_maintenance_building_management", + "clothing_wholesale_fiber", + "commodity_futures_investment_advisor", + "courier_industry", + "cpa_tax_accountant", + "culture_school", + "delivery", + "delivery_catering_mobile_catering", + "dental_clinic", + "design_development", + "electrical_plumbing", + "english_school", + "entrusted_development_wholesale", + "entrusted_store", + "este_ail_salon", + "fashion_grocery_store", + "financial_instruments_exchange", + "fishing_industry", + "food_store", + "food_wholesale", + "forestry", + "general_incorporated_association", + "general_incorporated_foundation", + "grocery", + "homestay", + "hospital_clinic", + "hotel_inn", + "house_maid_cleaning_agency", + "judicial_and_administrative_scrivener", + "labor_consultant", + "law_office", + "leisure_sports_facility_management", + "life_related_recruitment_temporary_staffing", + "machinery_equipment_maintenance_repair", + "machinery_manufacturing", + "memorial_ceremony_funeral", + "mining", + "moving", + "music_calligraphy_abacus_classroom", + "npo", + "nursery", + "nursing_home", + "online_advertising_agency", + "online_advertising_planning_production", + "online_media_management", + "online_service_management", + "online_shop", + "other_association", + "other_design", + "other_financial", + "other_insurance", + "other_it_services", + "other_manufacturing", + "other_medical_services", + "other_profession", + "other_services", + "other_store", + "other_transportation_logistics", + "other_welfare", + "other_wholesale", + "pavement", + "portal_site_management", + "printing", + "re_tailoring_clothes", + "real_estate_brokerage", + "real_estate_developer", + "recruitment_temporary_staffing", + "rehabilitation_support_services", + "renovation", + "rent_coin_parking_management", + "rental_lease", + "rental_office_co_working_space", + "restaurants_coffee_shops", + "sale_of_lunch", + "security", + "seminar_planning_management", + "server_management", + "show_event_management", + "software_development", + "spa_sand_bath_sauna", + "survey_analysis", + "system_development", + "tennis_yoga_judo_school", + "training_institute_management", + "transport_delivery", + "travel_agency", + "tutoring_school", + "visit_welfare_service", + "website_design", + "website_production" + ], + "type": "string" + } + } + }, + "head_count": { + "description": "従業員数(0: 経営者のみ、1: 2~5人、2: 6~10人、3: 11~20人、13: 21~50人、14: 51~100人、15: 101~300人、18: 301~500人、16: 501~1,000人、17: 1,001人以上", + "enum": [ + 0, + 1, + 13, + 14, + 15, + 16, + 17, + 18, + 2, + 3 + ], + "type": "number" + }, + "corporate_number": { + "description": "法人番号 (半角数字13桁、法人のみ)", + "type": "string" + }, + "fiscal_years_attributes": { + "type": "object", + "properties": { + "use_industry_template": { + "description": "製造業向け機能(0: 使用しない、1: 使用する)", + "type": "number" + }, + "indirect_write_off_method": { + "description": "固定資産の控除法(0: 直接控除法、1: 間接控除法)", + "type": "number" + }, + "indirect_write_off_method_type": { + "description": "間接控除時の累計額(0: 共通、1: 資産分類別)", + "type": "number" + }, + "start_date": { + "description": "期首日", + "type": "string" + }, + "end_date": { + "description": "期末日(決算日��", + "type": "string" + }, + "accounting_period": { + "description": "期", + "type": "number" + }, + "depreciation_fraction": { + "description": "減価償却端数処理法(法人のみ)(0: 切り捨て、1: 切り上げ)", + "type": "number" + }, + "return_code": { + "description": "不動産所得使用区分(個人事業主のみ)(0: 使用しない、3: 使用する)", + "type": "number" + }, + "tax_fraction": { + "description": "消費税端数処理方法(0: 切り上げ、1: 切り捨て, 2: 四捨五入)", + "type": "number" + } + } + }, + "doc_template": { + "type": "object", + "properties": { + "invoice_layout": { + "description": "レイアウト(0: レイアウト1, 1:レイアウト2, 3:封筒1, 4:レイアウト3(繰越金額欄あり), 5: 封筒2(繰越金額欄あり))", + "type": "number" + }, + "invoice_style": { + "description": "スタイル(0: クラシック, 1: モダン)", + "type": "number" + }, + "amount_fraction": { + "description": "金額端数処理方法(0: 切り上げ、1: 切り捨て, 2: 四捨五入)", + "type": "number" + } + } + }, + "txn_number_format": { + "description": "仕訳番号形式(not_used: 使用しない、digits: 数字(例:5091824)、alnum: 英数字(例:59J0P))Available values : not_used, digits, alnum", + "enum": [ + "alnum", + "digits", + "not_used" + ], + "type": "string" + }, + "private_settlement": { + "description": "プライベート資金/役員資金(0: 使用しない、1: 使用する)", + "type": "number" + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "company": { + "type": "object", + "properties": { + "id": { + "description": "事業所ID", + "type": "number" + }, + "name": { + "description": "事業所の正式名称 (100文字以内)", + "type": [ + "null", + "string" + ] + }, + "name_kana": { + "description": "正式名称フリガナ (100文字以内)", + "type": [ + "null", + "string" + ] + }, + "display_name": { + "description": "事業所名", + "type": "string" + }, + "tax_at_source_calc_type": { + "description": "源泉徴収税計算(0: 消費税を含める、1: 消費税を含めない)", + "type": "number" + }, + "contact_name": { + "description": "担当者名 (50文字以内)", + "type": [ + "null", + "string" + ] + }, + "head_count": { + "description": "従業員数(0: 経営者のみ、1: 2~5人、2: 6~10人、3: 11~20人、4: 21~30人、5: 31~40人、6: 41~100人、7: 100人以上", + "type": [ + "null", + "number" + ] + }, + "corporate_number": { + "description": "法人番号 (半角数字13桁、法人のみ)", + "type": "string" + }, + "txn_number_format": { + "description": "仕訳番号形式(not_used: 使用しない、digits: 数字(例:5091824)、alnum: 英数字(例:59J0P))", + "enum": [ + "alnum", + "digits", + "not_used" + ], + "type": "string" + }, + "default_wallet_account_id": { + "description": "決済口座のデフォルト", + "type": "number" + }, + "private_settlement": { + "description": "プライベート資金/役員資金(false: 使用しない、true: 使用する)", + "type": "boolean" + }, + "minus_format": { + "description": "マイナスの表示方法(0: -、 1: △)", + "type": "number" + }, + "role": { + "description": "ユーザーの権限", + "enum": [ + "admin", + "read_only", + "self_only", + "simple_accounting" + ], + "type": "string" + }, + "phone1": { + "description": "電話番号1", + "type": "string" + }, + "phone2": { + "description": "電話番号2", + "type": [ + "null", + "string" + ] + }, + "fax": { + "description": "FAX", + "type": [ + "null", + "string" + ] + }, + "zipcode": { + "description": "郵便番号", + "type": "string" + }, + "prefecture_code": { + "description": "都道府県コード(0: 北海道、1:青森、2:岩手、3:宮城、4:秋田、5:山形、6:福島、7:茨城、8:栃木、9:群馬、10:埼玉、11:千葉、12:東京、13:神奈川、14:新潟、15:富山、16:石川、17:福井、18:山梨、19:長野、20:岐阜、21:静岡、22:愛知、23:三重、24:滋賀、25:京都、26:大阪、27:兵庫、28:奈良、29:和歌山、30:鳥取、31:島根、32:岡山、33:広島、34:山口、35:徳島、36:香川、37:愛媛、38:高知、39:福岡、40:佐賀、41:長崎、42:熊本、43:大分、44:宮崎、45:鹿児島、46:沖縄", + "type": "number" + }, + "street_name1": { + "description": "市区町村・番地", + "type": "string" + }, + "street_name2": { + "description": "建物名・部屋番号など", + "type": "string" + }, + "invoice_layout": { + "description": "レイアウト(0: レイアウト1, 1:レイアウト2, 3:封筒1, 4:レイアウト3(繰越金額欄あり), 5: 封筒2(繰越金額欄あり))", + "type": "number" + }, + "invoice_style": { + "description": "スタイル(0: クラシック, 1: モダン)", + "type": "number" + }, + "amount_fraction": { + "description": "金額端数処理方法(0: 切り捨て、1: 切り上げ、2: 四捨五入)", + "type": "number" + }, + "industry_class": { + "description": "種別(agriculture_forestry_fisheries_ore: 農林水産業/鉱業、construction: 建設、manufacturing_processing: 製造/加工、it: IT、transportation_logistics: 運輸/物流、retail_wholesale: 小売/卸売、finance_insurance: 金融/保険、real_estate_rental: 不動産/レンタル、profession: 士業/学術/専門技術サービス、design_production: デザイン/制作、food: 飲食、leisure_entertainment: レジャー/娯楽、lifestyle: 生活関連サービス、education: 教育/学習支援、medical_welfare: 医療/福祉、other_services: その他サービス、other: その他)", + "enum": [ + "", + "agriculture_forestry_fisheries_ore", + "construction", + "design_production", + "education", + "finance_insurance", + "food", + "it", + "lifestyle", + "manufacturing_processing", + "medical_welfare", + "other", + "other_services", + "profession", + "real_estate_rental", + "retail_wholesale", + "transportation_logistics" + ], + "type": "string" + }, + "industry_code": { + "description": "コード(transport_delivery: 輸送業/配送業、delivery: バイク便等の配達業、other_transportation_logistics: その他の運輸業、物流業)", + "enum": [ + "", + "delivery", + "other_transportation_logistics", + "transport_delivery" + ], + "type": "string" + }, + "workflow_setting": { + "description": "仕訳承認フロー(enable: 有効、 disable: 無効)", + "enum": [ + "disable", + "enable" + ], + "type": "string" + }, + "fiscal_years": { + "type": "array", + "items": { + "type": "object", + "properties": { + "use_industry_template": { + "description": "製造業向け機能(true: 使用する、false: 使用しない)", + "type": "boolean" + }, + "indirect_write_off_method": { + "description": "固定資産の控除法(false: 減価償却累計額でまとめる、true: 独立間接控除方式)", + "type": "boolean" + }, + "start_date": { + "description": "期首日", + "type": "string" + }, + "end_date": { + "description": "期末日", + "type": "string" + }, + "depreciation_record_method": { + "description": "月次償却(0: しない、1: する)", + "type": "number" + }, + "tax_method": { + "description": "課税区分(0: 免税、1: 簡易課税、2: 本則課税(個別対応方式)、3: 本則課税(一括比例配分方式)、4: 本則課税(全額控除))", + "type": "number" + }, + "sales_tax_business_code": { + "description": "簡易課税用事業区分(0: 第一種:卸売業、1: 第二種:小売業、2: 第三種:農林水産業、工業、建設業、製造業など、3: 第四種:飲食店業など、4: 第五種:金融・保険業、運輸通信業、サービス業など、5: 第六種:不動産業など", + "type": "number" + }, + "tax_fraction": { + "description": "消費税端数処理方法(0: 切り捨て、1: 切り上げ、2: 四捨五入)", + "type": "number" + }, + "tax_account_method": { + "description": "消費税経理処理方法(0: 税込経理、1: 旧税抜経理、2: 税抜経理)", + "type": "number" + }, + "return_code": { + "description": "不動産所得使用区分(0: 一般、1: 一般/不動産) ※個人事業主のみ設定可能", + "type": "number" + } + }, + "required": [ + "depreciation_record_method", + "indirect_write_off_method", + "return_code", + "sales_tax_business_code", + "tax_account_method", + "tax_fraction", + "tax_method", + "use_industry_template" + ] + } + } + }, + "required": [ + "amount_fraction", + "contact_name", + "corporate_number", + "display_name", + "fax", + "head_count", + "id", + "industry_class", + "industry_code", + "invoice_layout", + "invoice_style", + "minus_format", + "name", + "name_kana", + "phone1", + "phone2", + "prefecture_code", + "private_settlement", + "role", + "street_name1", + "street_name2", + "tax_at_source_calc_type", + "txn_number_format", + "workflow_setting", + "zipcode" + ] + } + }, + "required": [ + "company" + ] + } + } + } + } + } + } + }, + "samples/freee/api/1/companies": { + "get": { + "tags": [ + "api", + "1", + "companies" + ], + "parameters": [], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "companies": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "事業所ID", + "type": "number" + }, + "name": { + "description": "事業所名", + "type": [ + "null", + "string" + ] + }, + "name_kana": { + "description": "事業所名(カナ)", + "type": [ + "null", + "string" + ] + }, + "display_name": { + "description": "事業所名", + "type": [ + "null", + "string" + ] + }, + "role": { + "description": "ユーザーの権限", + "enum": [ + "admin", + "read_only", + "self_only", + "simple_accounting" + ], + "type": "string" + } + }, + "required": [ + "display_name", + "id", + "name", + "name_kana", + "role" + ] + } + } + }, + "required": [ + "companies" + ] + } + } + } + } + } + } + }, + "samples/freee/api/1/deals/{id}": { + "get": { + "tags": [ + "api", + "1", + "deals" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "number" + } + }, + { + "name": "company_id", + "in": "query", + "required": true, + "schema": { + "description": "事業所ID", + "type": "number" + } + }, + { + "name": "accruals", + "in": "query", + "required": false, + "schema": { + "description": "取引の債権債務行の表示(without: 表示しない(デフォルト), with: 表示する)", + "enum": [ + "with", + "without" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "deal": { + "type": "object", + "properties": { + "id": { + "description": "取引ID", + "type": "number" + }, + "company_id": { + "description": "事業所ID", + "type": "number" + }, + "issue_date": { + "description": "発生日 (yyyy-mm-dd)", + "type": "string" + }, + "due_date": { + "description": "支払期日 (yyyy-mm-dd)", + "type": "string" + }, + "amount": { + "description": "金額", + "type": "number" + }, + "due_amount": { + "description": "支払金額", + "type": "number" + }, + "type": { + "description": "収支区分 (収入: income, 支出: expense)", + "enum": [ + "expense", + "income" + ], + "type": "string" + }, + "partner_id": { + "description": "取引先ID", + "type": "number" + }, + "partner_code": { + "description": "取引先コード", + "type": [ + "null", + "string" + ] + }, + "ref_number": { + "description": "管理番号", + "type": "string" + }, + "status": { + "description": "決済状況 (未決済: unsettled, 完了: settled)", + "enum": [ + "settled", + "unsettled" + ], + "type": "string" + }, + "details": { + "description": "取引の明細行", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "取引行ID", + "type": "number" + }, + "account_item_id": { + "description": "勘定科目ID", + "type": "number" + }, + "tax_id": { + "description": "税区分ID(廃止予定)", + "type": "number" + }, + "tax_code": { + "description": "税区分コード", + "type": "number" + }, + "item_id": { + "description": "品目ID", + "type": [ + "null", + "number" + ] + }, + "section_id": { + "description": "部門ID", + "type": [ + "null", + "number" + ] + }, + "tag_ids": { + "description": "メモタグID", + "type": "array", + "items": { + "type": "number" + } + }, + "segment_1_tag_id": { + "description": "セグメント1ID", + "type": [ + "null", + "number" + ] + }, + "segment_2_tag_id": { + "description": "セグメント2ID", + "type": [ + "null", + "number" + ] + }, + "segment_3_tag_id": { + "description": "セグメント3ID", + "type": [ + "null", + "number" + ] + }, + "amount": { + "description": "取引金額", + "type": "number" + }, + "vat": { + "description": "消費税額", + "type": "number" + }, + "description": { + "description": "備考", + "type": "string" + }, + "entry_side": { + "description": "貸借(貸方: credit, 借方: debit)", + "enum": [ + "credit", + "debit" + ], + "type": "string" + } + }, + "required": [ + "account_item_id", + "amount", + "entry_side", + "id", + "tax_code", + "vat" + ] + } + }, + "renews": { + "description": "取引の+更新行", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "+更新行ID", + "type": "number" + }, + "update_date": { + "description": "更新日 (yyyy-mm-dd)", + "type": "string" + }, + "renew_target_id": { + "description": "+更新の対象行ID", + "type": "number" + }, + "renew_target_type": { + "description": "+更���の対象行タイプ", + "enum": [ + "accrual", + "detail", + "renew" + ], + "type": "string" + }, + "details": { + "description": "+更新の明細行一覧(配列)", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "+更新の明細行ID", + "type": "number" + }, + "entry_side": { + "description": "貸借(貸方: credit, 借方: debit)", + "enum": [ + "credit", + "debit" + ], + "type": "string" + }, + "account_item_id": { + "description": "勘定科目ID", + "type": "number" + }, + "tax_code": { + "description": "税区分コード", + "type": "number" + }, + "item_id": { + "description": "品目ID", + "type": [ + "null", + "number" + ] + }, + "section_id": { + "description": "部門ID", + "type": [ + "null", + "number" + ] + }, + "tag_ids": { + "type": "array", + "items": { + "type": "number" + } + }, + "segment_1_tag_id": { + "description": "セグメント1ID", + "type": [ + "null", + "number" + ] + }, + "segment_2_tag_id": { + "description": "セグメント2ID", + "type": [ + "null", + "number" + ] + }, + "segment_3_tag_id": { + "description": "セグメント3ID", + "type": [ + "null", + "number" + ] + }, + "amount": { + "description": "金額(税込で指定してください)", + "type": "number" + }, + "vat": { + "description": "消費税額(指定しない場合は自動で計算されます)", + "type": "number" + }, + "description": { + "description": "備考", + "type": [ + "null", + "string" + ] + } + }, + "required": [ + "account_item_id", + "amount", + "entry_side", + "id", + "tag_ids", + "tax_code", + "vat" + ] + } + } + }, + "required": [ + "details", + "id", + "renew_target_id", + "renew_target_type", + "update_date" + ] + } + }, + "payments": { + "description": "取引の支払行", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "取引行ID", + "type": "number" + }, + "date": { + "description": "支払日", + "type": "string" + }, + "from_walletable_type": { + "description": "口座区分 (銀行口座: bank_account, クレジットカード: credit_card, 現金: wallet, プライベート資金(法人の場合は役員借入金もしくは役員借入金、個人の場合は事業主貸もしくは事業主借): private_account_item)", + "enum": [ + "bank_account", + "credit_card", + "private_account_item", + "wallet" + ], + "type": "string" + }, + "from_walletable_id": { + "description": "口座ID(from_walletable_typeがprivate_account_itemの場合は勘定科目ID)", + "type": "number" + }, + "amount": { + "description": "支払金額", + "type": "number" + } + }, + "required": [ + "amount", + "date", + "id" + ] + } + }, + "receipts": { + "description": "証憑ファイル", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "証憑ID", + "type": "number" + }, + "status": { + "description": "ステータス(unconfirmed:確認待ち、confirmed:確認済み、deleted:削除済み、ignored:無視)", + "enum": [ + "confirmed", + "deleted", + "ignored", + "unconfirmed" + ], + "type": "string" + }, + "description": { + "description": "メモ", + "type": "string" + }, + "mime_type": { + "description": "MIMEタイプ", + "type": "string" + }, + "issue_date": { + "description": "発生日", + "type": "string" + }, + "origin": { + "description": "アップロード元種別", + "enum": [ + "dropbox", + "mail", + "mobile_album", + "mobile_camera", + "public_api", + "safety_contact_file", + "scannable", + "scansnap", + "unknown", + "web" + ], + "type": "string" + }, + "created_at": { + "description": "作成日時(ISO8601形式)", + "type": "string" + }, + "file_src": { + "description": "ファイルのダウンロードURL(freeeにログインした状態でのみ閲覧可能です。)", + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "id": { + "description": "ユーザID", + "type": "number" + }, + "email": { + "description": "メールアドレス", + "type": "string" + }, + "display_name": { + "description": "表示名", + "type": [ + "null", + "string" + ] + } + }, + "required": [ + "email", + "id" + ] + } + }, + "required": [ + "created_at", + "file_src", + "id", + "mime_type", + "origin", + "status", + "user" + ] + } + } + }, + "required": [ + "amount", + "company_id", + "id", + "issue_date", + "partner_id", + "status" + ] + } + }, + "required": [ + "deal" + ] + } + } + } + } + } + }, + "put": { + "tags": [ + "api", + "1", + "deals" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "number" + } + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "description": "取引(収入/支出)の更新", + "type": "object", + "properties": { + "issue_date": { + "description": "発生日 (yyyy-mm-dd)", + "type": "string" + }, + "type": { + "description": "収支区分 (収入: income, 支出: expense)", + "enum": [ + "expense", + "income" + ], + "type": "string" + }, + "company_id": { + "description": "事業所ID", + "type": "number" + }, + "due_date": { + "description": "支払期日(yyyy-mm-dd)", + "type": "string" + }, + "partner_id": { + "description": "取引先ID", + "type": "number" + }, + "partner_code": { + "description": "取引先コード", + "type": "string" + }, + "ref_number": { + "description": "管理番号", + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "取引行ID: 既存取引行を更新する場合に指定します。IDを指定しない取引行は、新規行として扱われ追加されます。また、detailsに含まれない既存の取引行は削除されます。更新後も残したい行は、必ず取引行IDを指定してdetailsに含めてください。", + "type": "number" + }, + "tax_code": { + "description": "税区分コード", + "type": "number" + }, + "tax_id": { + "description": "税区分ID(廃止予定。上記tax_codeを使用してください。tax_code, tax_idはどちらかの指定が必須です。)", + "type": "number" + }, + "account_item_id": { + "description": "勘定科目ID", + "type": "number" + }, + "amount": { + "description": "取引金額(税込で指定してください)", + "type": "number" + }, + "item_id": { + "description": "品目ID", + "type": "number" + }, + "section_id": { + "description": "部門ID", + "type": "number" + }, + "tag_ids": { + "description": "メモタグID", + "type": "array", + "items": { + "type": "number" + } + }, + "segment_1_tag_id": { + "description": "セグメント1ID", + "type": "number" + }, + "segment_2_tag_id": { + "description": "セグメント2ID", + "type": "number" + }, + "segment_3_tag_id": { + "description": "セグメント3ID", + "type": "number" + }, + "description": { + "description": "備考", + "type": "string" + }, + "vat": { + "description": "消費税額(指定しない場合は自動で計算されます)", + "type": "number" + } + }, + "required": [ + "account_item_id", + "amount" + ] + } + }, + "receipt_ids": { + "description": "証憑ファイルID(配列)", + "anyOf": [ + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "company_id", + "details", + "issue_date", + "type" + ] + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "deal": { + "type": "object", + "properties": { + "id": { + "description": "取引ID", + "type": "number" + }, + "company_id": { + "description": "事業所ID", + "type": "number" + }, + "issue_date": { + "description": "発生日 (yyyy-mm-dd)", + "type": "string" + }, + "due_date": { + "description": "支払期日 (yyyy-mm-dd)", + "type": "string" + }, + "amount": { + "description": "金額", + "type": "number" + }, + "due_amount": { + "description": "支払金額", + "type": "number" + }, + "type": { + "description": "収支区分 (収入: income, 支出: expense)", + "enum": [ + "expense", + "income" + ], + "type": "string" + }, + "partner_id": { + "description": "取引先ID", + "type": "number" + }, + "partner_code": { + "description": "取引先コード", + "type": [ + "null", + "string" + ] + }, + "ref_number": { + "description": "管理番号", + "type": "string" + }, + "status": { + "description": "決済状況 (未決済: unsettled, 完了: settled)", + "enum": [ + "settled", + "unsettled" + ], + "type": "string" + }, + "details": { + "description": "取引の明細行", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "取引行ID", + "type": "number" + }, + "account_item_id": { + "description": "勘定科目ID", + "type": "number" + }, + "tax_id": { + "description": "税区分ID(廃止予定)", + "type": "number" + }, + "tax_code": { + "description": "税区分コード", + "type": "number" + }, + "item_id": { + "description": "品目ID", + "type": [ + "null", + "number" + ] + }, + "section_id": { + "description": "部門ID", + "type": [ + "null", + "number" + ] + }, + "tag_ids": { + "description": "メモタグID", + "type": "array", + "items": { + "type": "number" + } + }, + "segment_1_tag_id": { + "description": "セグメント1ID", + "type": [ + "null", + "number" + ] + }, + "segment_2_tag_id": { + "description": "セグメント2ID", + "type": [ + "null", + "number" + ] + }, + "segment_3_tag_id": { + "description": "セグメント3ID", + "type": [ + "null", + "number" + ] + }, + "amount": { + "description": "取引金額", + "type": "number" + }, + "vat": { + "description": "消費税額", + "type": "number" + }, + "description": { + "description": "備考", + "type": "string" + }, + "entry_side": { + "description": "貸借(貸方: credit, 借方: debit)", + "enum": [ + "credit", + "debit" + ], + "type": "string" + } + }, + "required": [ + "account_item_id", + "amount", + "entry_side", + "id", + "tax_code", + "vat" + ] + } + }, + "renews": { + "description": "取引の+更新行", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "+更新行ID", + "type": "number" + }, + "update_date": { + "description": "更新日 (yyyy-mm-dd)", + "type": "string" + }, + "renew_target_id": { + "description": "+更新の対象行ID", + "type": "number" + }, + "renew_target_type": { + "description": "+更���の対象行タイプ", + "enum": [ + "accrual", + "detail", + "renew" + ], + "type": "string" + }, + "details": { + "description": "+更新の明細行一覧(配列)", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "+更新の明細行ID", + "type": "number" + }, + "entry_side": { + "description": "貸借(貸方: credit, 借方: debit)", + "enum": [ + "credit", + "debit" + ], + "type": "string" + }, + "account_item_id": { + "description": "勘定科目ID", + "type": "number" + }, + "tax_code": { + "description": "税区分コード", + "type": "number" + }, + "item_id": { + "description": "品目ID", + "type": [ + "null", + "number" + ] + }, + "section_id": { + "description": "部門ID", + "type": [ + "null", + "number" + ] + }, + "tag_ids": { + "type": "array", + "items": { + "type": "number" + } + }, + "segment_1_tag_id": { + "description": "セグメント1ID", + "type": [ + "null", + "number" + ] + }, + "segment_2_tag_id": { + "description": "セグメント2ID", + "type": [ + "null", + "number" + ] + }, + "segment_3_tag_id": { + "description": "セグメント3ID", + "type": [ + "null", + "number" + ] + }, + "amount": { + "description": "金額(税込で指定してください)", + "type": "number" + }, + "vat": { + "description": "消費税額(指定しない場合は自動で計算されます)", + "type": "number" + }, + "description": { + "description": "備考", + "type": [ + "null", + "string" + ] + } + }, + "required": [ + "account_item_id", + "amount", + "entry_side", + "id", + "tag_ids", + "tax_code", + "vat" + ] + } + } + }, + "required": [ + "details", + "id", + "renew_target_id", + "renew_target_type", + "update_date" + ] + } + }, + "payments": { + "description": "取引の支払行", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "取引行ID", + "type": "number" + }, + "date": { + "description": "支払日", + "type": "string" + }, + "from_walletable_type": { + "description": "口座区分 (銀行口座: bank_account, クレジットカード: credit_card, 現金: wallet, プライベート資金(法人の場合は役員借入金もしくは役員借入金、個人の場合は事業主貸もしくは事業主借): private_account_item)", + "enum": [ + "bank_account", + "credit_card", + "private_account_item", + "wallet" + ], + "type": "string" + }, + "from_walletable_id": { + "description": "口座ID(from_walletable_typeがprivate_account_itemの場合は勘定科目ID)", + "type": "number" + }, + "amount": { + "description": "支払金額", + "type": "number" + } + }, + "required": [ + "amount", + "date", + "id" + ] + } + }, + "receipts": { + "description": "証憑ファイル", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "証憑ID", + "type": "number" + }, + "status": { + "description": "ステータス(unconfirmed:確認待ち、confirmed:確認済み、deleted:削除済み、ignored:無視)", + "enum": [ + "confirmed", + "deleted", + "ignored", + "unconfirmed" + ], + "type": "string" + }, + "description": { + "description": "メモ", + "type": "string" + }, + "mime_type": { + "description": "MIMEタイプ", + "type": "string" + }, + "issue_date": { + "description": "発生日", + "type": "string" + }, + "origin": { + "description": "アップロード元種別", + "enum": [ + "dropbox", + "mail", + "mobile_album", + "mobile_camera", + "public_api", + "safety_contact_file", + "scannable", + "scansnap", + "unknown", + "web" + ], + "type": "string" + }, + "created_at": { + "description": "作成日時(ISO8601形式)", + "type": "string" + }, + "file_src": { + "description": "ファイルのダウンロードURL(freeeにログインした状態でのみ閲覧可能です。)", + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "id": { + "description": "ユーザID", + "type": "number" + }, + "email": { + "description": "メールアドレス", + "type": "string" + }, + "display_name": { + "description": "表示名", + "type": [ + "null", + "string" + ] + } + }, + "required": [ + "email", + "id" + ] + } + }, + "required": [ + "created_at", + "file_src", + "id", + "mime_type", + "origin", + "status", + "user" + ] + } + } + }, + "required": [ + "amount", + "company_id", + "id", + "issue_date", + "partner_id", + "status" + ] + } + }, + "required": [ + "deal" + ] + } + } + } + } + } + }, + "delete": { + "tags": [ + "api", + "1", + "deals" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "number" + } + }, + { + "name": "company_id", + "in": "query", + "required": true, + "schema": { + "description": "事業所ID", + "type": "number" + } + } + ] + } + }, + "samples/freee/api/1/deals/{id}/payments/{payment_id}": { + "put": { + "tags": [ + "api", + "1", + "deals" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "number" + } + }, + { + "name": "payment_id", + "in": "path", + "required": true, + "schema": { + "type": "number" + } + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "description": "取引(収入/支出)の支払行更新", + "type": "object", + "properties": { + "company_id": { + "description": "事業所ID", + "type": "number" + }, + "date": { + "description": "支払日", + "type": "string" + }, + "from_walletable_type": { + "description": "口座区分 (銀行口座: bank_account, クレジットカード: credit_card, 現金: wallet, プライベート資金(法人の場合は役員借入金もしくは役員借入金、個人の場合は事業主貸もしくは事業主借): private_account_item):payments指定時は必須", + "enum": [ + "bank_account", + "credit_card", + "private_account_item", + "wallet" + ], + "type": "string" + }, + "from_walletable_id": { + "description": "口座ID(from_walletable_typeがprivate_account_itemの場合は勘定科目ID):payments指定時は必須", + "type": "number" + }, + "amount": { + "description": "金額", + "type": "number" + } + }, + "required": [ + "amount", + "company_id", + "date", + "from_walletable_id", + "from_walletable_type" + ] + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "deal": { + "type": "object", + "properties": { + "id": { + "description": "取引ID", + "type": "number" + }, + "company_id": { + "description": "事業所ID", + "type": "number" + }, + "issue_date": { + "description": "発生日 (yyyy-mm-dd)", + "type": "string" + }, + "due_date": { + "description": "支払期日 (yyyy-mm-dd)", + "type": "string" + }, + "amount": { + "description": "金額", + "type": "number" + }, + "due_amount": { + "description": "支払金額", + "type": "number" + }, + "type": { + "description": "収支区分 (収入: income, 支出: expense)", + "enum": [ + "expense", + "income" + ], + "type": "string" + }, + "partner_id": { + "description": "取引先ID", + "type": "number" + }, + "partner_code": { + "description": "取引先コード", + "type": [ + "null", + "string" + ] + }, + "ref_number": { + "description": "管理番号", + "type": "string" + }, + "status": { + "description": "決済状況 (未決済: unsettled, 完了: settled)", + "enum": [ + "settled", + "unsettled" + ], + "type": "string" + }, + "details": { + "description": "取引の明細行", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "取引行ID", + "type": "number" + }, + "account_item_id": { + "description": "勘定科目ID", + "type": "number" + }, + "tax_id": { + "description": "税区分ID(廃止予定)", + "type": "number" + }, + "tax_code": { + "description": "税区分コード", + "type": "number" + }, + "item_id": { + "description": "品目ID", + "type": [ + "null", + "number" + ] + }, + "section_id": { + "description": "部門ID", + "type": [ + "null", + "number" + ] + }, + "tag_ids": { + "description": "メモタグID", + "type": "array", + "items": { + "type": "number" + } + }, + "segment_1_tag_id": { + "description": "セグメント1ID", + "type": [ + "null", + "number" + ] + }, + "segment_2_tag_id": { + "description": "セグメント2ID", + "type": [ + "null", + "number" + ] + }, + "segment_3_tag_id": { + "description": "セグメント3ID", + "type": [ + "null", + "number" + ] + }, + "amount": { + "description": "取引金額", + "type": "number" + }, + "vat": { + "description": "消費税額", + "type": "number" + }, + "description": { + "description": "備考", + "type": "string" + }, + "entry_side": { + "description": "貸借(貸方: credit, 借方: debit)", + "enum": [ + "credit", + "debit" + ], + "type": "string" + } + }, + "required": [ + "account_item_id", + "amount", + "entry_side", + "id", + "tax_code", + "vat" + ] + } + }, + "renews": { + "description": "取引の+更新行", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "+更新行ID", + "type": "number" + }, + "update_date": { + "description": "更新日 (yyyy-mm-dd)", + "type": "string" + }, + "renew_target_id": { + "description": "+更新の対象行ID", + "type": "number" + }, + "renew_target_type": { + "description": "+更���の対象行タイプ", + "enum": [ + "accrual", + "detail", + "renew" + ], + "type": "string" + }, + "details": { + "description": "+更新の明細行一覧(配列)", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "+更新の明細行ID", + "type": "number" + }, + "entry_side": { + "description": "貸借(貸方: credit, 借方: debit)", + "enum": [ + "credit", + "debit" + ], + "type": "string" + }, + "account_item_id": { + "description": "勘定科目ID", + "type": "number" + }, + "tax_code": { + "description": "税区分コード", + "type": "number" + }, + "item_id": { + "description": "品目ID", + "type": [ + "null", + "number" + ] + }, + "section_id": { + "description": "部門ID", + "type": [ + "null", + "number" + ] + }, + "tag_ids": { + "type": "array", + "items": { + "type": "number" + } + }, + "segment_1_tag_id": { + "description": "セグメント1ID", + "type": [ + "null", + "number" + ] + }, + "segment_2_tag_id": { + "description": "セグメント2ID", + "type": [ + "null", + "number" + ] + }, + "segment_3_tag_id": { + "description": "セグメント3ID", + "type": [ + "null", + "number" + ] + }, + "amount": { + "description": "金額(税込で指定してください)", + "type": "number" + }, + "vat": { + "description": "消費税額(指定しない場合は自動で計算されます)", + "type": "number" + }, + "description": { + "description": "備考", + "type": [ + "null", + "string" + ] + } + }, + "required": [ + "account_item_id", + "amount", + "entry_side", + "id", + "tag_ids", + "tax_code", + "vat" + ] + } + } + }, + "required": [ + "details", + "id", + "renew_target_id", + "renew_target_type", + "update_date" + ] + } + }, + "payments": { + "description": "取引の支払行", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "取引行ID", + "type": "number" + }, + "date": { + "description": "支払日", + "type": "string" + }, + "from_walletable_type": { + "description": "口座区分 (銀行口座: bank_account, クレジットカード: credit_card, 現金: wallet, プライベート資金(法人の場合は役員借入金もしくは役員借入金、個人の場合は事業主貸もしくは事業主借): private_account_item)", + "enum": [ + "bank_account", + "credit_card", + "private_account_item", + "wallet" + ], + "type": "string" + }, + "from_walletable_id": { + "description": "口座ID(from_walletable_typeがprivate_account_itemの場合は勘定科目ID)", + "type": "number" + }, + "amount": { + "description": "支払金額", + "type": "number" + } + }, + "required": [ + "amount", + "date", + "id" + ] + } + }, + "receipts": { + "description": "証憑ファイル", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "証憑ID", + "type": "number" + }, + "status": { + "description": "ステータス(unconfirmed:確認待ち、confirmed:確認済み、deleted:削除済み、ignored:無視)", + "enum": [ + "confirmed", + "deleted", + "ignored", + "unconfirmed" + ], + "type": "string" + }, + "description": { + "description": "メモ", + "type": "string" + }, + "mime_type": { + "description": "MIMEタイプ", + "type": "string" + }, + "issue_date": { + "description": "発生日", + "type": "string" + }, + "origin": { + "description": "アップロード元種別", + "enum": [ + "dropbox", + "mail", + "mobile_album", + "mobile_camera", + "public_api", + "safety_contact_file", + "scannable", + "scansnap", + "unknown", + "web" + ], + "type": "string" + }, + "created_at": { + "description": "作成日時(ISO8601形式)", + "type": "string" + }, + "file_src": { + "description": "ファイルのダウンロードURL(freeeにログインした状態でのみ閲覧可能です。)", + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "id": { + "description": "ユーザID", + "type": "number" + }, + "email": { + "description": "メールアドレス", + "type": "string" + }, + "display_name": { + "description": "表示名", + "type": [ + "null", + "string" + ] + } + }, + "required": [ + "email", + "id" + ] + } + }, + "required": [ + "created_at", + "file_src", + "id", + "mime_type", + "origin", + "status", + "user" + ] + } + } + }, + "required": [ + "amount", + "company_id", + "id", + "issue_date", + "partner_id", + "status" + ] + } + }, + "required": [ + "deal" + ] + } + } + } + } + } + }, + "delete": { + "tags": [ + "api", + "1", + "deals" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "number" + } + }, + { + "name": "payment_id", + "in": "path", + "required": true, + "schema": { + "type": "number" + } + }, + { + "name": "company_id", + "in": "query", + "required": true, + "schema": { + "description": "事業所ID", + "type": "number" + } + } + ] + } + }, + "samples/freee/api/1/deals/{id}/payments": { + "post": { + "tags": [ + "api", + "1", + "deals" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "number" + } + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "description": "取引(収入/支出)の支払行作成", + "type": "object", + "properties": { + "company_id": { + "description": "事業所ID", + "type": "number" + }, + "date": { + "description": "支払日", + "type": "string" + }, + "from_walletable_type": { + "description": "口座区分 (銀行口座: bank_account, クレジットカード: credit_card, 現金: wallet, プライベート資金(法人の場合は役員借入金もしくは役員借入金、個人の場合は事業主貸もしくは事業主借): private_account_item):payments指定時は必須", + "enum": [ + "bank_account", + "credit_card", + "private_account_item", + "wallet" + ], + "type": "string" + }, + "from_walletable_id": { + "description": "口座ID(from_walletable_typeがprivate_account_itemの場合は勘定科目ID):payments指定時は必須", + "type": "number" + }, + "amount": { + "description": "金額", + "type": "number" + } + }, + "required": [ + "amount", + "company_id", + "date", + "from_walletable_id", + "from_walletable_type" + ] + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "deal": { + "type": "object", + "properties": { + "id": { + "description": "取引ID", + "type": "number" + }, + "company_id": { + "description": "事業所ID", + "type": "number" + }, + "issue_date": { + "description": "発生日 (yyyy-mm-dd)", + "type": "string" + }, + "due_date": { + "description": "支払期日 (yyyy-mm-dd)", + "type": "string" + }, + "amount": { + "description": "金額", + "type": "number" + }, + "due_amount": { + "description": "支払金額", + "type": "number" + }, + "type": { + "description": "収支区分 (収入: income, 支出: expense)", + "enum": [ + "expense", + "income" + ], + "type": "string" + }, + "partner_id": { + "description": "取引先ID", + "type": "number" + }, + "partner_code": { + "description": "取引先コード", + "type": [ + "null", + "string" + ] + }, + "ref_number": { + "description": "管理番号", + "type": "string" + }, + "status": { + "description": "決済状況 (未決済: unsettled, 完了: settled)", + "enum": [ + "settled", + "unsettled" + ], + "type": "string" + }, + "details": { + "description": "取引の明細行", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "取引行ID", + "type": "number" + }, + "account_item_id": { + "description": "勘定科目ID", + "type": "number" + }, + "tax_id": { + "description": "税区分ID(廃止予定)", + "type": "number" + }, + "tax_code": { + "description": "税区分コード", + "type": "number" + }, + "item_id": { + "description": "品目ID", + "type": [ + "null", + "number" + ] + }, + "section_id": { + "description": "部門ID", + "type": [ + "null", + "number" + ] + }, + "tag_ids": { + "description": "メモタグID", + "type": "array", + "items": { + "type": "number" + } + }, + "segment_1_tag_id": { + "description": "セグメント1ID", + "type": [ + "null", + "number" + ] + }, + "segment_2_tag_id": { + "description": "セグメント2ID", + "type": [ + "null", + "number" + ] + }, + "segment_3_tag_id": { + "description": "セグメント3ID", + "type": [ + "null", + "number" + ] + }, + "amount": { + "description": "取引金額", + "type": "number" + }, + "vat": { + "description": "消費税額", + "type": "number" + }, + "description": { + "description": "備考", + "type": "string" + }, + "entry_side": { + "description": "貸借(貸方: credit, 借方: debit)", + "enum": [ + "credit", + "debit" + ], + "type": "string" + } + }, + "required": [ + "account_item_id", + "amount", + "entry_side", + "id", + "tax_code", + "vat" + ] + } + }, + "renews": { + "description": "取引の+更新行", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "+更新行ID", + "type": "number" + }, + "update_date": { + "description": "更新日 (yyyy-mm-dd)", + "type": "string" + }, + "renew_target_id": { + "description": "+更新の対象行ID", + "type": "number" + }, + "renew_target_type": { + "description": "+更���の対象行タイプ", + "enum": [ + "accrual", + "detail", + "renew" + ], + "type": "string" + }, + "details": { + "description": "+更新の明細行一覧(配列)", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "+更新の明細行ID", + "type": "number" + }, + "entry_side": { + "description": "貸借(貸方: credit, 借方: debit)", + "enum": [ + "credit", + "debit" + ], + "type": "string" + }, + "account_item_id": { + "description": "勘定科目ID", + "type": "number" + }, + "tax_code": { + "description": "税区分コード", + "type": "number" + }, + "item_id": { + "description": "品目ID", + "type": [ + "null", + "number" + ] + }, + "section_id": { + "description": "部門ID", + "type": [ + "null", + "number" + ] + }, + "tag_ids": { + "type": "array", + "items": { + "type": "number" + } + }, + "segment_1_tag_id": { + "description": "セグメント1ID", + "type": [ + "null", + "number" + ] + }, + "segment_2_tag_id": { + "description": "セグメント2ID", + "type": [ + "null", + "number" + ] + }, + "segment_3_tag_id": { + "description": "セグメント3ID", + "type": [ + "null", + "number" + ] + }, + "amount": { + "description": "金額(税込で指定してください)", + "type": "number" + }, + "vat": { + "description": "消費税額(指定しない場合は自動で計算されます)", + "type": "number" + }, + "description": { + "description": "備考", + "type": [ + "null", + "string" + ] + } + }, + "required": [ + "account_item_id", + "amount", + "entry_side", + "id", + "tag_ids", + "tax_code", + "vat" + ] + } + } + }, + "required": [ + "details", + "id", + "renew_target_id", + "renew_target_type", + "update_date" + ] + } + }, + "payments": { + "description": "取引の支払行", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "取引行ID", + "type": "number" + }, + "date": { + "description": "支払日", + "type": "string" + }, + "from_walletable_type": { + "description": "口座区分 (銀行口座: bank_account, クレジットカード: credit_card, 現金: wallet, プライベート資金(法人の場合は役員借入金もしくは役員借入金、個人の場合は事業主貸もしくは事業主借): private_account_item)", + "enum": [ + "bank_account", + "credit_card", + "private_account_item", + "wallet" + ], + "type": "string" + }, + "from_walletable_id": { + "description": "口座ID(from_walletable_typeがprivate_account_itemの場合は勘定科目ID)", + "type": "number" + }, + "amount": { + "description": "支払金額", + "type": "number" + } + }, + "required": [ + "amount", + "date", + "id" + ] + } + }, + "receipts": { + "description": "証憑ファイル", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "証憑ID", + "type": "number" + }, + "status": { + "description": "ステータス(unconfirmed:確認待ち、confirmed:確認済み、deleted:削除済み、ignored:無視)", + "enum": [ + "confirmed", + "deleted", + "ignored", + "unconfirmed" + ], + "type": "string" + }, + "description": { + "description": "メモ", + "type": "string" + }, + "mime_type": { + "description": "MIMEタイプ", + "type": "string" + }, + "issue_date": { + "description": "発生日", + "type": "string" + }, + "origin": { + "description": "アップロード元種別", + "enum": [ + "dropbox", + "mail", + "mobile_album", + "mobile_camera", + "public_api", + "safety_contact_file", + "scannable", + "scansnap", + "unknown", + "web" + ], + "type": "string" + }, + "created_at": { + "description": "作成日時(ISO8601形式)", + "type": "string" + }, + "file_src": { + "description": "ファイルのダウンロードURL(freeeにログインした状態でのみ閲覧可能です。)", + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "id": { + "description": "ユーザID", + "type": "number" + }, + "email": { + "description": "メールアドレス", + "type": "string" + }, + "display_name": { + "description": "表示名", + "type": [ + "null", + "string" + ] + } + }, + "required": [ + "email", + "id" + ] + } + }, + "required": [ + "created_at", + "file_src", + "id", + "mime_type", + "origin", + "status", + "user" + ] + } + } + }, + "required": [ + "amount", + "company_id", + "id", + "issue_date", + "partner_id", + "status" + ] + } + }, + "required": [ + "deal" + ] + } + } + } + } + } + } + }, + "samples/freee/api/1/deals/{id}/renews/{renew_id}": { + "put": { + "tags": [ + "api", + "1", + "deals" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "number" + } + }, + { + "name": "renew_id", + "in": "path", + "required": true, + "schema": { + "type": "number" + } + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "description": "+更新の更新情報", + "type": "object", + "properties": { + "company_id": { + "description": "事業所ID", + "type": "number" + }, + "update_date": { + "description": "更新日 (yyyy-mm-dd)", + "type": "string" + }, + "details": { + "description": "+更新の明細行", + "type": "array", + "items": { + "type": "object", + "properties": { + "account_item_id": { + "description": "勘定科目ID", + "type": "number" + }, + "tax_code": { + "description": "税区分コード", + "type": "number" + }, + "amount": { + "description": "取引金額(税込で指定してください)", + "type": "number" + }, + "vat": { + "description": "消費税額(指定しない場合は自動で計算されます)", + "type": "number" + }, + "item_id": { + "description": "品目ID", + "type": "number" + }, + "section_id": { + "description": "部門ID", + "type": "number" + }, + "tag_ids": { + "description": "メモタグID", + "type": "array", + "items": { + "type": "number" + } + }, + "segment_1_tag_id": { + "description": "セグメント1ID", + "type": "number" + }, + "segment_2_tag_id": { + "description": "セグメント2ID", + "type": "number" + }, + "segment_3_tag_id": { + "description": "セグメント3ID", + "type": "number" + }, + "description": { + "description": "備考", + "type": "string" + } + }, + "required": [ + "account_item_id", + "amount", + "tax_code" + ] + } + } + }, + "required": [ + "company_id", + "details", + "update_date" + ] + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "deal": { + "type": "object", + "properties": { + "id": { + "description": "取引ID", + "type": "number" + }, + "company_id": { + "description": "事業所ID", + "type": "number" + }, + "issue_date": { + "description": "発生日 (yyyy-mm-dd)", + "type": "string" + }, + "due_date": { + "description": "支払期日 (yyyy-mm-dd)", + "type": "string" + }, + "amount": { + "description": "金額", + "type": "number" + }, + "due_amount": { + "description": "支払金額", + "type": "number" + }, + "type": { + "description": "収支区分 (収入: income, 支出: expense)", + "enum": [ + "expense", + "income" + ], + "type": "string" + }, + "partner_id": { + "description": "取引先ID", + "type": "number" + }, + "partner_code": { + "description": "取引先コード", + "type": [ + "null", + "string" + ] + }, + "ref_number": { + "description": "管理番号", + "type": "string" + }, + "status": { + "description": "決済状況 (未決済: unsettled, 完了: settled)", + "enum": [ + "settled", + "unsettled" + ], + "type": "string" + }, + "details": { + "description": "取引の明細行", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "取引行ID", + "type": "number" + }, + "account_item_id": { + "description": "勘定科目ID", + "type": "number" + }, + "tax_id": { + "description": "税区分ID(廃止予定)", + "type": "number" + }, + "tax_code": { + "description": "税区分コード", + "type": "number" + }, + "item_id": { + "description": "品目ID", + "type": [ + "null", + "number" + ] + }, + "section_id": { + "description": "部門ID", + "type": [ + "null", + "number" + ] + }, + "tag_ids": { + "description": "メモタグID", + "type": "array", + "items": { + "type": "number" + } + }, + "segment_1_tag_id": { + "description": "セグメント1ID", + "type": [ + "null", + "number" + ] + }, + "segment_2_tag_id": { + "description": "セグメント2ID", + "type": [ + "null", + "number" + ] + }, + "segment_3_tag_id": { + "description": "セグメント3ID", + "type": [ + "null", + "number" + ] + }, + "amount": { + "description": "取引金額", + "type": "number" + }, + "vat": { + "description": "消費税額", + "type": "number" + }, + "description": { + "description": "備考", + "type": "string" + }, + "entry_side": { + "description": "貸借(貸方: credit, 借方: debit)", + "enum": [ + "credit", + "debit" + ], + "type": "string" + } + }, + "required": [ + "account_item_id", + "amount", + "entry_side", + "id", + "tax_code", + "vat" + ] + } + }, + "renews": { + "description": "取引の+更新行", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "+更新行ID", + "type": "number" + }, + "update_date": { + "description": "更新日 (yyyy-mm-dd)", + "type": "string" + }, + "renew_target_id": { + "description": "+更新の対象行ID", + "type": "number" + }, + "renew_target_type": { + "description": "+更���の対象行タイプ", + "enum": [ + "accrual", + "detail", + "renew" + ], + "type": "string" + }, + "details": { + "description": "+更新の明細行一覧(配列)", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "+更新の明細行ID", + "type": "number" + }, + "entry_side": { + "description": "貸借(貸方: credit, 借方: debit)", + "enum": [ + "credit", + "debit" + ], + "type": "string" + }, + "account_item_id": { + "description": "勘定科目ID", + "type": "number" + }, + "tax_code": { + "description": "税区分コード", + "type": "number" + }, + "item_id": { + "description": "品目ID", + "type": [ + "null", + "number" + ] + }, + "section_id": { + "description": "部門ID", + "type": [ + "null", + "number" + ] + }, + "tag_ids": { + "type": "array", + "items": { + "type": "number" + } + }, + "segment_1_tag_id": { + "description": "セグメント1ID", + "type": [ + "null", + "number" + ] + }, + "segment_2_tag_id": { + "description": "セグメント2ID", + "type": [ + "null", + "number" + ] + }, + "segment_3_tag_id": { + "description": "セグメント3ID", + "type": [ + "null", + "number" + ] + }, + "amount": { + "description": "金額(税込で指定してください)", + "type": "number" + }, + "vat": { + "description": "消費税額(指定しない場合は自動で計算されます)", + "type": "number" + }, + "description": { + "description": "備考", + "type": [ + "null", + "string" + ] + } + }, + "required": [ + "account_item_id", + "amount", + "entry_side", + "id", + "tag_ids", + "tax_code", + "vat" + ] + } + } + }, + "required": [ + "details", + "id", + "renew_target_id", + "renew_target_type", + "update_date" + ] + } + }, + "payments": { + "description": "取引の支払行", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "取引行ID", + "type": "number" + }, + "date": { + "description": "支払日", + "type": "string" + }, + "from_walletable_type": { + "description": "口座区分 (銀行口座: bank_account, クレジットカード: credit_card, 現金: wallet, プライベート資金(法人の場合は役員借入金もしくは役員借入金、個人の場合は事業主貸もしくは事業主借): private_account_item)", + "enum": [ + "bank_account", + "credit_card", + "private_account_item", + "wallet" + ], + "type": "string" + }, + "from_walletable_id": { + "description": "口座ID(from_walletable_typeがprivate_account_itemの場合は勘定科目ID)", + "type": "number" + }, + "amount": { + "description": "支払金額", + "type": "number" + } + }, + "required": [ + "amount", + "date", + "id" + ] + } + }, + "receipts": { + "description": "証憑ファイル", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "証憑ID", + "type": "number" + }, + "status": { + "description": "ステータス(unconfirmed:確認待ち、confirmed:確認済み、deleted:削除済み、ignored:無視)", + "enum": [ + "confirmed", + "deleted", + "ignored", + "unconfirmed" + ], + "type": "string" + }, + "description": { + "description": "メモ", + "type": "string" + }, + "mime_type": { + "description": "MIMEタイプ", + "type": "string" + }, + "issue_date": { + "description": "発生日", + "type": "string" + }, + "origin": { + "description": "アップロード元種別", + "enum": [ + "dropbox", + "mail", + "mobile_album", + "mobile_camera", + "public_api", + "safety_contact_file", + "scannable", + "scansnap", + "unknown", + "web" + ], + "type": "string" + }, + "created_at": { + "description": "作成日時(ISO8601形式)", + "type": "string" + }, + "file_src": { + "description": "ファイルのダウンロードURL(freeeにログインした状態でのみ閲覧可能です。)", + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "id": { + "description": "ユーザID", + "type": "number" + }, + "email": { + "description": "メールアドレス", + "type": "string" + }, + "display_name": { + "description": "表示名", + "type": [ + "null", + "string" + ] + } + }, + "required": [ + "email", + "id" + ] + } + }, + "required": [ + "created_at", + "file_src", + "id", + "mime_type", + "origin", + "status", + "user" + ] + } + } + }, + "required": [ + "amount", + "company_id", + "id", + "issue_date", + "partner_id", + "status" + ] + } + }, + "required": [ + "deal" + ] + } + } + } + } + } + }, + "delete": { + "tags": [ + "api", + "1", + "deals" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "number" + } + }, + { + "name": "renew_id", + "in": "path", + "required": true, + "schema": { + "type": "number" + } + }, + { + "name": "company_id", + "in": "query", + "required": true, + "schema": { + "description": "事業所ID", + "type": "number" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "deal": { + "type": "object", + "properties": { + "id": { + "description": "取引ID", + "type": "number" + }, + "company_id": { + "description": "事業所ID", + "type": "number" + }, + "issue_date": { + "description": "発生日 (yyyy-mm-dd)", + "type": "string" + }, + "due_date": { + "description": "支払期日 (yyyy-mm-dd)", + "type": "string" + }, + "amount": { + "description": "金額", + "type": "number" + }, + "due_amount": { + "description": "支払金額", + "type": "number" + }, + "type": { + "description": "収支区分 (収入: income, 支出: expense)", + "enum": [ + "expense", + "income" + ], + "type": "string" + }, + "partner_id": { + "description": "取引先ID", + "type": "number" + }, + "partner_code": { + "description": "取引先コード", + "type": [ + "null", + "string" + ] + }, + "ref_number": { + "description": "管理番号", + "type": "string" + }, + "status": { + "description": "決済状況 (未決済: unsettled, 完了: settled)", + "enum": [ + "settled", + "unsettled" + ], + "type": "string" + }, + "details": { + "description": "取引の明細行", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "取引行ID", + "type": "number" + }, + "account_item_id": { + "description": "勘定科目ID", + "type": "number" + }, + "tax_id": { + "description": "税区分ID(廃止予定)", + "type": "number" + }, + "tax_code": { + "description": "税区分コード", + "type": "number" + }, + "item_id": { + "description": "品目ID", + "type": [ + "null", + "number" + ] + }, + "section_id": { + "description": "部門ID", + "type": [ + "null", + "number" + ] + }, + "tag_ids": { + "description": "メモタグID", + "type": "array", + "items": { + "type": "number" + } + }, + "segment_1_tag_id": { + "description": "セグメント1ID", + "type": [ + "null", + "number" + ] + }, + "segment_2_tag_id": { + "description": "セグメント2ID", + "type": [ + "null", + "number" + ] + }, + "segment_3_tag_id": { + "description": "セグメント3ID", + "type": [ + "null", + "number" + ] + }, + "amount": { + "description": "取引金額", + "type": "number" + }, + "vat": { + "description": "消費税額", + "type": "number" + }, + "description": { + "description": "備考", + "type": "string" + }, + "entry_side": { + "description": "貸借(貸方: credit, 借方: debit)", + "enum": [ + "credit", + "debit" + ], + "type": "string" + } + }, + "required": [ + "account_item_id", + "amount", + "entry_side", + "id", + "tax_code", + "vat" + ] + } + }, + "renews": { + "description": "取引の+更新行", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "+更新行ID", + "type": "number" + }, + "update_date": { + "description": "更新日 (yyyy-mm-dd)", + "type": "string" + }, + "renew_target_id": { + "description": "+更新の対象行ID", + "type": "number" + }, + "renew_target_type": { + "description": "+更���の対象行タイプ", + "enum": [ + "accrual", + "detail", + "renew" + ], + "type": "string" + }, + "details": { + "description": "+更新の明細行一覧(配列)", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "+更新の明細行ID", + "type": "number" + }, + "entry_side": { + "description": "貸借(貸方: credit, 借方: debit)", + "enum": [ + "credit", + "debit" + ], + "type": "string" + }, + "account_item_id": { + "description": "勘定科目ID", + "type": "number" + }, + "tax_code": { + "description": "税区分コード", + "type": "number" + }, + "item_id": { + "description": "品目ID", + "type": [ + "null", + "number" + ] + }, + "section_id": { + "description": "部門ID", + "type": [ + "null", + "number" + ] + }, + "tag_ids": { + "type": "array", + "items": { + "type": "number" + } + }, + "segment_1_tag_id": { + "description": "セグメント1ID", + "type": [ + "null", + "number" + ] + }, + "segment_2_tag_id": { + "description": "セグメント2ID", + "type": [ + "null", + "number" + ] + }, + "segment_3_tag_id": { + "description": "セグメント3ID", + "type": [ + "null", + "number" + ] + }, + "amount": { + "description": "金額(税込で指定してください)", + "type": "number" + }, + "vat": { + "description": "消費税額(指定しない場合は自動で計算されます)", + "type": "number" + }, + "description": { + "description": "備考", + "type": [ + "null", + "string" + ] + } + }, + "required": [ + "account_item_id", + "amount", + "entry_side", + "id", + "tag_ids", + "tax_code", + "vat" + ] + } + } + }, + "required": [ + "details", + "id", + "renew_target_id", + "renew_target_type", + "update_date" + ] + } + }, + "payments": { + "description": "取引の支払行", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "取引行ID", + "type": "number" + }, + "date": { + "description": "支払日", + "type": "string" + }, + "from_walletable_type": { + "description": "口座区分 (銀行口座: bank_account, クレジットカード: credit_card, 現金: wallet, プライベート資金(法人の場合は役員借入金もしくは役員借入金、個人の場合は事業主貸もしくは事業主借): private_account_item)", + "enum": [ + "bank_account", + "credit_card", + "private_account_item", + "wallet" + ], + "type": "string" + }, + "from_walletable_id": { + "description": "口座ID(from_walletable_typeがprivate_account_itemの場合は勘定科目ID)", + "type": "number" + }, + "amount": { + "description": "支払金額", + "type": "number" + } + }, + "required": [ + "amount", + "date", + "id" + ] + } + }, + "receipts": { + "description": "証憑ファイル", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "証憑ID", + "type": "number" + }, + "status": { + "description": "ステータス(unconfirmed:確認待ち、confirmed:確認済み、deleted:削除済み、ignored:無視)", + "enum": [ + "confirmed", + "deleted", + "ignored", + "unconfirmed" + ], + "type": "string" + }, + "description": { + "description": "メモ", + "type": "string" + }, + "mime_type": { + "description": "MIMEタイプ", + "type": "string" + }, + "issue_date": { + "description": "発生日", + "type": "string" + }, + "origin": { + "description": "アップロード元種別", + "enum": [ + "dropbox", + "mail", + "mobile_album", + "mobile_camera", + "public_api", + "safety_contact_file", + "scannable", + "scansnap", + "unknown", + "web" + ], + "type": "string" + }, + "created_at": { + "description": "作成日時(ISO8601形式)", + "type": "string" + }, + "file_src": { + "description": "ファイルのダウンロードURL(freeeにログインした状態でのみ閲覧可能です。)", + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "id": { + "description": "ユーザID", + "type": "number" + }, + "email": { + "description": "メールアドレス", + "type": "string" + }, + "display_name": { + "description": "表示名", + "type": [ + "null", + "string" + ] + } + }, + "required": [ + "email", + "id" + ] + } + }, + "required": [ + "created_at", + "file_src", + "id", + "mime_type", + "origin", + "status", + "user" + ] + } + } + }, + "required": [ + "amount", + "company_id", + "id", + "issue_date", + "partner_id", + "status" + ] + } + }, + "required": [ + "deal" + ] + } + } + } + } + } + } + }, + "samples/freee/api/1/deals/{id}/renews": { + "post": { + "tags": [ + "api", + "1", + "deals" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "number" + } + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "description": "取引(収入/支出)に対する+更新の情報", + "type": "object", + "properties": { + "company_id": { + "description": "事業所ID", + "type": "number" + }, + "update_date": { + "description": "更新日 (yyyy-mm-dd)", + "type": "string" + }, + "renew_target_id": { + "description": "+更新対象行ID (details(取引の明細行), accruals(債権債務行), renewsのdetails(+更新の明細行)のIDを指定)", + "type": "number" + }, + "details": { + "description": "+更新の明細行", + "type": "array", + "items": { + "type": "object", + "properties": { + "account_item_id": { + "description": "勘定科目ID", + "type": "number" + }, + "tax_code": { + "description": "税区分コード", + "type": "number" + }, + "amount": { + "description": "取引金額(税込で指定してください)", + "type": "number" + }, + "vat": { + "description": "消費税額(指定しない場合は自動で計算されます)", + "type": "number" + }, + "item_id": { + "description": "品目ID", + "type": "number" + }, + "section_id": { + "description": "部門ID", + "type": "number" + }, + "tag_ids": { + "description": "メモタグID", + "type": "array", + "items": { + "type": "number" + } + }, + "segment_1_tag_id": { + "description": "セグメント1ID", + "type": "number" + }, + "segment_2_tag_id": { + "description": "セグメント2ID", + "type": "number" + }, + "segment_3_tag_id": { + "description": "セグメント3ID", + "type": "number" + }, + "description": { + "description": "備考", + "type": "string" + } + }, + "required": [ + "account_item_id", + "amount", + "tax_code" + ] + } + } + }, + "required": [ + "company_id", + "details", + "renew_target_id", + "update_date" + ] + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "deal": { + "type": "object", + "properties": { + "id": { + "description": "取引ID", + "type": "number" + }, + "company_id": { + "description": "事業所ID", + "type": "number" + }, + "issue_date": { + "description": "発生日 (yyyy-mm-dd)", + "type": "string" + }, + "due_date": { + "description": "支払期日 (yyyy-mm-dd)", + "type": "string" + }, + "amount": { + "description": "金額", + "type": "number" + }, + "due_amount": { + "description": "支払金額", + "type": "number" + }, + "type": { + "description": "収支区分 (収入: income, 支出: expense)", + "enum": [ + "expense", + "income" + ], + "type": "string" + }, + "partner_id": { + "description": "取引先ID", + "type": "number" + }, + "partner_code": { + "description": "取引先コード", + "type": [ + "null", + "string" + ] + }, + "ref_number": { + "description": "管理番号", + "type": "string" + }, + "status": { + "description": "決済状況 (未決済: unsettled, 完了: settled)", + "enum": [ + "settled", + "unsettled" + ], + "type": "string" + }, + "details": { + "description": "取引の明細行", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "取引行ID", + "type": "number" + }, + "account_item_id": { + "description": "勘定科目ID", + "type": "number" + }, + "tax_id": { + "description": "税区分ID(廃止予定)", + "type": "number" + }, + "tax_code": { + "description": "税区分コード", + "type": "number" + }, + "item_id": { + "description": "品目ID", + "type": [ + "null", + "number" + ] + }, + "section_id": { + "description": "部門ID", + "type": [ + "null", + "number" + ] + }, + "tag_ids": { + "description": "メモタグID", + "type": "array", + "items": { + "type": "number" + } + }, + "segment_1_tag_id": { + "description": "セグメント1ID", + "type": [ + "null", + "number" + ] + }, + "segment_2_tag_id": { + "description": "セグメント2ID", + "type": [ + "null", + "number" + ] + }, + "segment_3_tag_id": { + "description": "セグメント3ID", + "type": [ + "null", + "number" + ] + }, + "amount": { + "description": "取引金額", + "type": "number" + }, + "vat": { + "description": "消費税額", + "type": "number" + }, + "description": { + "description": "備考", + "type": "string" + }, + "entry_side": { + "description": "貸借(貸方: credit, 借方: debit)", + "enum": [ + "credit", + "debit" + ], + "type": "string" + } + }, + "required": [ + "account_item_id", + "amount", + "entry_side", + "id", + "tax_code", + "vat" + ] + } + }, + "renews": { + "description": "取引の+更新行", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "+更新行ID", + "type": "number" + }, + "update_date": { + "description": "更新日 (yyyy-mm-dd)", + "type": "string" + }, + "renew_target_id": { + "description": "+更新の対象行ID", + "type": "number" + }, + "renew_target_type": { + "description": "+更���の対象行タイプ", + "enum": [ + "accrual", + "detail", + "renew" + ], + "type": "string" + }, + "details": { + "description": "+更新の明細行一覧(配列)", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "+更新の明細行ID", + "type": "number" + }, + "entry_side": { + "description": "貸借(貸方: credit, 借方: debit)", + "enum": [ + "credit", + "debit" + ], + "type": "string" + }, + "account_item_id": { + "description": "勘定科目ID", + "type": "number" + }, + "tax_code": { + "description": "税区分コード", + "type": "number" + }, + "item_id": { + "description": "品目ID", + "type": [ + "null", + "number" + ] + }, + "section_id": { + "description": "部門ID", + "type": [ + "null", + "number" + ] + }, + "tag_ids": { + "type": "array", + "items": { + "type": "number" + } + }, + "segment_1_tag_id": { + "description": "セグメント1ID", + "type": [ + "null", + "number" + ] + }, + "segment_2_tag_id": { + "description": "セグメント2ID", + "type": [ + "null", + "number" + ] + }, + "segment_3_tag_id": { + "description": "セグメント3ID", + "type": [ + "null", + "number" + ] + }, + "amount": { + "description": "金額(税込で指定してください)", + "type": "number" + }, + "vat": { + "description": "消費税額(指定しない場合は自動で計算されます)", + "type": "number" + }, + "description": { + "description": "備考", + "type": [ + "null", + "string" + ] + } + }, + "required": [ + "account_item_id", + "amount", + "entry_side", + "id", + "tag_ids", + "tax_code", + "vat" + ] + } + } + }, + "required": [ + "details", + "id", + "renew_target_id", + "renew_target_type", + "update_date" + ] + } + }, + "payments": { + "description": "取引の支払行", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "取引行ID", + "type": "number" + }, + "date": { + "description": "支払日", + "type": "string" + }, + "from_walletable_type": { + "description": "口座区分 (銀行口座: bank_account, クレジットカード: credit_card, 現金: wallet, プライベート資金(法人の場合は役員借入金もしくは役員借入金、個人の場合は事業主貸もしくは事業主借): private_account_item)", + "enum": [ + "bank_account", + "credit_card", + "private_account_item", + "wallet" + ], + "type": "string" + }, + "from_walletable_id": { + "description": "口座ID(from_walletable_typeがprivate_account_itemの場合は勘定科目ID)", + "type": "number" + }, + "amount": { + "description": "支払金額", + "type": "number" + } + }, + "required": [ + "amount", + "date", + "id" + ] + } + }, + "receipts": { + "description": "証憑ファイル", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "証憑ID", + "type": "number" + }, + "status": { + "description": "ステータス(unconfirmed:確認待ち、confirmed:確認済み、deleted:削除済み、ignored:無視)", + "enum": [ + "confirmed", + "deleted", + "ignored", + "unconfirmed" + ], + "type": "string" + }, + "description": { + "description": "メモ", + "type": "string" + }, + "mime_type": { + "description": "MIMEタイプ", + "type": "string" + }, + "issue_date": { + "description": "発生日", + "type": "string" + }, + "origin": { + "description": "アップロード元種別", + "enum": [ + "dropbox", + "mail", + "mobile_album", + "mobile_camera", + "public_api", + "safety_contact_file", + "scannable", + "scansnap", + "unknown", + "web" + ], + "type": "string" + }, + "created_at": { + "description": "作成日時(ISO8601形式)", + "type": "string" + }, + "file_src": { + "description": "ファイルのダウンロードURL(freeeにログインした状態でのみ閲覧可能です。)", + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "id": { + "description": "ユーザID", + "type": "number" + }, + "email": { + "description": "メールアドレス", + "type": "string" + }, + "display_name": { + "description": "表示名", + "type": [ + "null", + "string" + ] + } + }, + "required": [ + "email", + "id" + ] + } + }, + "required": [ + "created_at", + "file_src", + "id", + "mime_type", + "origin", + "status", + "user" + ] + } + } + }, + "required": [ + "amount", + "company_id", + "id", + "issue_date", + "partner_id", + "status" + ] + } + }, + "required": [ + "deal" + ] + } + } + } + } + } + } + }, + "samples/freee/api/1/deals": { + "get": { + "tags": [ + "api", + "1", + "deals" + ], + "parameters": [ + { + "name": "company_id", + "in": "query", + "required": true, + "schema": { + "description": "事業所ID", + "type": "number" + } + }, + { + "name": "partner_id", + "in": "query", + "required": false, + "schema": { + "description": "取引先IDで絞込", + "type": "number" + } + }, + { + "name": "account_item_id", + "in": "query", + "required": false, + "schema": { + "description": "勘定科目IDで絞込", + "type": "number" + } + }, + { + "name": "partner_code", + "in": "query", + "required": false, + "schema": { + "description": "取引先コードで絞込", + "type": "string" + } + }, + { + "name": "status", + "in": "query", + "required": false, + "schema": { + "description": "決済状況で絞込 (未決済: unsettled, 完了: settled)", + "enum": [ + "settled", + "unsettled" + ], + "type": "string" + } + }, + { + "name": "type", + "in": "query", + "required": false, + "schema": { + "description": "収支区分 (収入: income, 支出: expense)", + "enum": [ + "expense", + "income" + ], + "type": "string" + } + }, + { + "name": "start_issue_date", + "in": "query", + "required": false, + "schema": { + "description": "発生日で絞込:開始日(yyyy-mm-dd)", + "type": "string" + } + }, + { + "name": "end_issue_date", + "in": "query", + "required": false, + "schema": { + "description": "発生日で絞込:終了日(yyyy-mm-dd)", + "type": "string" + } + }, + { + "name": "start_due_date", + "in": "query", + "required": false, + "schema": { + "description": "支払期日で絞込:開始日(yyyy-mm-dd)", + "type": "string" + } + }, + { + "name": "end_due_date", + "in": "query", + "required": false, + "schema": { + "description": "支払期日で絞込:終了日(yyyy-mm-dd)", + "type": "string" + } + }, + { + "name": "start_renew_date", + "in": "query", + "required": false, + "schema": { + "description": "+更新日で絞込:開始日(yyyy-mm-dd)", + "type": "string" + } + }, + { + "name": "end_renew_date", + "in": "query", + "required": false, + "schema": { + "description": "+更新日で絞込:終了日(yyyy-mm-dd)", + "type": "string" + } + }, + { + "name": "offset", + "in": "query", + "required": false, + "schema": { + "description": "取得レコードのオフセット (デフォルト: 0)", + "type": "number" + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "description": "取得レコードの件数 (デフォルト: 20, 最大: 100)", + "type": "number" + } + }, + { + "name": "registered_from", + "in": "query", + "required": false, + "schema": { + "description": "取引登録元アプリで絞込(me: 本APIを叩くアプリ自身から登録した取引のみ)", + "const": "me", + "type": "string" + } + }, + { + "name": "accruals", + "in": "query", + "required": false, + "schema": { + "description": "取引の債権債務行の表示(without: 表示しない(デフォルト), with: 表示する)", + "enum": [ + "with", + "without" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "deals": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "取引ID", + "type": "number" + }, + "company_id": { + "description": "事業所ID", + "type": "number" + }, + "issue_date": { + "description": "発生日 (yyyy-mm-dd)", + "type": "string" + }, + "due_date": { + "description": "支払期日 (yyyy-mm-dd)", + "type": "string" + }, + "amount": { + "description": "金額", + "type": "number" + }, + "due_amount": { + "description": "支払金額", + "type": "number" + }, + "type": { + "description": "収支区分 (収入: income, 支出: expense)", + "enum": [ + "expense", + "income" + ], + "type": "string" + }, + "partner_id": { + "description": "取引先ID", + "type": "number" + }, + "partner_code": { + "description": "取引先コード", + "type": [ + "null", + "string" + ] + }, + "ref_number": { + "description": "管理番号", + "type": "string" + }, + "status": { + "description": "決済状況 (未決済: unsettled, 完了: settled)", + "enum": [ + "settled", + "unsettled" + ], + "type": "string" + }, + "details": { + "description": "取引の明細行", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "取引行ID", + "type": "number" + }, + "account_item_id": { + "description": "勘定科目ID", + "type": "number" + }, + "tax_id": { + "description": "税区分ID(廃止予定)", + "type": "number" + }, + "tax_code": { + "description": "税区分コード", + "type": "number" + }, + "item_id": { + "description": "品目ID", + "type": [ + "null", + "number" + ] + }, + "section_id": { + "description": "部門ID", + "type": [ + "null", + "number" + ] + }, + "tag_ids": { + "description": "メモタグID", + "type": "array", + "items": { + "type": "number" + } + }, + "segment_1_tag_id": { + "description": "セグメント1ID", + "type": [ + "null", + "number" + ] + }, + "segment_2_tag_id": { + "description": "セグメント2ID", + "type": [ + "null", + "number" + ] + }, + "segment_3_tag_id": { + "description": "セグメント3ID", + "type": [ + "null", + "number" + ] + }, + "amount": { + "description": "取引金額", + "type": "number" + }, + "vat": { + "description": "消費税額", + "type": "number" + }, + "description": { + "description": "備考", + "type": "string" + }, + "entry_side": { + "description": "貸借(貸方: credit, 借方: debit)", + "enum": [ + "credit", + "debit" + ], + "type": "string" + } + }, + "required": [ + "account_item_id", + "amount", + "entry_side", + "id", + "tax_code", + "vat" + ] + } + }, + "renews": { + "description": "取引の+更新行", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "+更新行ID", + "type": "number" + }, + "update_date": { + "description": "更新日 (yyyy-mm-dd)", + "type": "string" + }, + "renew_target_id": { + "description": "+更新の対象行ID", + "type": "number" + }, + "renew_target_type": { + "description": "+更���の対象行タイプ", + "enum": [ + "accrual", + "detail", + "renew" + ], + "type": "string" + }, + "details": { + "description": "+更新の明細行一覧(配列)", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "+更新の明細行ID", + "type": "number" + }, + "entry_side": { + "description": "貸借(貸方: credit, 借方: debit)", + "enum": [ + "credit", + "debit" + ], + "type": "string" + }, + "account_item_id": { + "description": "勘定科目ID", + "type": "number" + }, + "tax_code": { + "description": "税区分コード", + "type": "number" + }, + "item_id": { + "description": "品目ID", + "type": [ + "null", + "number" + ] + }, + "section_id": { + "description": "部門ID", + "type": [ + "null", + "number" + ] + }, + "tag_ids": { + "type": "array", + "items": { + "type": "number" + } + }, + "segment_1_tag_id": { + "description": "セグメント1ID", + "type": [ + "null", + "number" + ] + }, + "segment_2_tag_id": { + "description": "セグメント2ID", + "type": [ + "null", + "number" + ] + }, + "segment_3_tag_id": { + "description": "セグメント3ID", + "type": [ + "null", + "number" + ] + }, + "amount": { + "description": "金額(税込で指定してください)", + "type": "number" + }, + "vat": { + "description": "消費税額(指定しない場合は自動で計算されます)", + "type": "number" + }, + "description": { + "description": "備考", + "type": [ + "null", + "string" + ] + } + }, + "required": [ + "account_item_id", + "amount", + "entry_side", + "id", + "tag_ids", + "tax_code", + "vat" + ] + } + } + }, + "required": [ + "details", + "id", + "renew_target_id", + "renew_target_type", + "update_date" + ] + } + }, + "payments": { + "description": "取引の支払行", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "取引行ID", + "type": "number" + }, + "date": { + "description": "支払日", + "type": "string" + }, + "from_walletable_type": { + "description": "口座区分 (銀行口座: bank_account, クレジットカード: credit_card, 現金: wallet, プライベート資金(法人の場合は役員借入金もしくは役員借入金、個人の場合は事業主貸もしくは事業主借): private_account_item)", + "enum": [ + "bank_account", + "credit_card", + "private_account_item", + "wallet" + ], + "type": "string" + }, + "from_walletable_id": { + "description": "口座ID(from_walletable_typeがprivate_account_itemの場合は勘定科目ID)", + "type": "number" + }, + "amount": { + "description": "支払金額", + "type": "number" + } + }, + "required": [ + "amount", + "date", + "id" + ] + } + }, + "receipts": { + "description": "証憑ファイル", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "証憑ID", + "type": "number" + }, + "status": { + "description": "ステータス(unconfirmed:確認待ち、confirmed:確認済み、deleted:削除済み、ignored:無視)", + "enum": [ + "confirmed", + "deleted", + "ignored", + "unconfirmed" + ], + "type": "string" + }, + "description": { + "description": "メモ", + "type": "string" + }, + "mime_type": { + "description": "MIMEタイプ", + "type": "string" + }, + "issue_date": { + "description": "発生日", + "type": "string" + }, + "origin": { + "description": "アップロード元種別", + "enum": [ + "dropbox", + "mail", + "mobile_album", + "mobile_camera", + "public_api", + "safety_contact_file", + "scannable", + "scansnap", + "unknown", + "web" + ], + "type": "string" + }, + "created_at": { + "description": "作成日時(ISO8601形式)", + "type": "string" + }, + "file_src": { + "description": "ファイルのダウンロードURL(freeeにログインした状態でのみ閲覧可能です。)", + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "id": { + "description": "ユーザID", + "type": "number" + }, + "email": { + "description": "メールアドレス", + "type": "string" + }, + "display_name": { + "description": "表示名", + "type": [ + "null", + "string" + ] + } + }, + "required": [ + "email", + "id" + ] + } + }, + "required": [ + "created_at", + "file_src", + "id", + "mime_type", + "origin", + "status", + "user" + ] + } + } + }, + "required": [ + "amount", + "company_id", + "id", + "issue_date", + "partner_id", + "status" + ] + } + }, + "meta": { + "type": "object", + "properties": { + "total_count": { + "description": "検索条件に合致する取引の総数", + "type": "number" + } + }, + "required": [ + "total_count" + ] + } + }, + "required": [ + "deals", + "meta" + ] + } + } + } + } + } + }, + "post": { + "tags": [ + "api", + "1", + "deals" + ], + "parameters": [], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "description": "取引(収入/支出)の作成", + "type": "object", + "properties": { + "issue_date": { + "description": "発生日 (yyyy-mm-dd)", + "type": "string" + }, + "type": { + "description": "収支区分 (収入: income, 支出: expense)", + "enum": [ + "expense", + "income" + ], + "type": "string" + }, + "company_id": { + "description": "事業所ID", + "type": "number" + }, + "due_date": { + "description": "支払期日(yyyy-mm-dd)", + "type": "string" + }, + "partner_id": { + "description": "取引先ID", + "type": "number" + }, + "partner_code": { + "description": "取引先コード", + "type": "string" + }, + "ref_number": { + "description": "管理番号", + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "properties": { + "tax_code": { + "description": "税区分コード", + "type": "number" + }, + "tax_id": { + "description": "税区分ID(廃止予定。上記tax_codeを使用してください。tax_code, tax_idはどちらかの指定が必須です。)", + "type": "number" + }, + "account_item_id": { + "description": "勘定科目ID", + "type": "number" + }, + "amount": { + "description": "取引金額(税込で指定してください)", + "type": "number" + }, + "item_id": { + "description": "品目ID", + "type": "number" + }, + "section_id": { + "description": "部門ID", + "type": "number" + }, + "tag_ids": { + "description": "メモタグID", + "type": "array", + "items": { + "type": "number" + } + }, + "segment_1_tag_id": { + "description": "セグメント1ID", + "type": "number" + }, + "segment_2_tag_id": { + "description": "セグメント2ID", + "type": "number" + }, + "segment_3_tag_id": { + "description": "セグメント3ID", + "type": "number" + }, + "description": { + "description": "備考", + "type": "string" + }, + "vat": { + "description": "消費税額(指定しない場合は自動で計算されます)", + "type": "number" + } + }, + "required": [ + "account_item_id", + "amount" + ] + } + }, + "payments": { + "description": "支払行一覧(配列):未指定の場合、未決済の取引を作成します。", + "type": "array", + "items": { + "type": "object", + "properties": { + "amount": { + "description": "支払金額:payments指定時は必須", + "type": "number" + }, + "from_walletable_id": { + "description": "口座ID(from_walletable_typeがprivate_account_itemの場合は勘定科目ID):payments指定時は必須", + "type": "number" + }, + "from_walletable_type": { + "description": "口座区分 (銀行口座: bank_account, クレジットカード: credit_card, 現金: wallet, プライベート資金(法人の場合は役員借入金もしくは役員借入金、個人の場合は事業主貸もしくは事業主借): private_account_item):payments指定時は必須", + "enum": [ + "bank_account", + "credit_card", + "private_account_item", + "wallet" + ], + "type": "string" + }, + "date": { + "description": "支払日:payments指定時は必須", + "type": "string" + } + }, + "required": [ + "amount", + "date", + "from_walletable_id", + "from_walletable_type" + ] + } + }, + "receipt_ids": { + "description": "証憑ファイルID(配列)", + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "company_id", + "details", + "issue_date", + "type" + ] + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "deal": { + "type": "object", + "properties": { + "id": { + "description": "取引ID", + "type": "number" + }, + "company_id": { + "description": "事業所ID", + "type": "number" + }, + "issue_date": { + "description": "発生日 (yyyy-mm-dd)", + "type": "string" + }, + "due_date": { + "description": "支払期日 (yyyy-mm-dd)", + "type": "string" + }, + "amount": { + "description": "金額", + "type": "number" + }, + "due_amount": { + "description": "支払金額", + "type": "number" + }, + "type": { + "description": "収支区分 (収入: income, 支出: expense)", + "enum": [ + "expense", + "income" + ], + "type": "string" + }, + "partner_id": { + "description": "取引先ID", + "type": "number" + }, + "partner_code": { + "description": "取引先コード", + "type": [ + "null", + "string" + ] + }, + "ref_number": { + "description": "管理番号", + "type": "string" + }, + "status": { + "description": "決済状況 (未決済: unsettled, 完了: settled)", + "enum": [ + "settled", + "unsettled" + ], + "type": "string" + }, + "details": { + "description": "取引の明細行", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "取引行ID", + "type": "number" + }, + "account_item_id": { + "description": "勘定科目ID", + "type": "number" + }, + "tax_id": { + "description": "税区分ID(廃止予定)", + "type": "number" + }, + "tax_code": { + "description": "税区分コード", + "type": "number" + }, + "item_id": { + "description": "品目ID", + "type": [ + "null", + "number" + ] + }, + "section_id": { + "description": "部門ID", + "type": [ + "null", + "number" + ] + }, + "tag_ids": { + "description": "メモタグID", + "type": "array", + "items": { + "type": "number" + } + }, + "segment_1_tag_id": { + "description": "セグメント1ID", + "type": [ + "null", + "number" + ] + }, + "segment_2_tag_id": { + "description": "セグメント2ID", + "type": [ + "null", + "number" + ] + }, + "segment_3_tag_id": { + "description": "セグメント3ID", + "type": [ + "null", + "number" + ] + }, + "amount": { + "description": "取引金額", + "type": "number" + }, + "vat": { + "description": "消費税額", + "type": "number" + }, + "description": { + "description": "備考", + "type": "string" + }, + "entry_side": { + "description": "貸借(貸方: credit, 借方: debit)", + "enum": [ + "credit", + "debit" + ], + "type": "string" + } + }, + "required": [ + "account_item_id", + "amount", + "entry_side", + "id", + "tax_code", + "vat" + ] + } + }, + "payments": { + "description": "取引の支払行", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "取引行ID", + "type": "number" + }, + "date": { + "description": "支払日", + "type": "string" + }, + "from_walletable_type": { + "description": "口座区分 (銀行口座: bank_account, クレジットカード: credit_card, 現金: wallet, プライベート資金(法人の場合は役員借入金もしくは役員借入金、個人の場合は事業主貸もしくは事業主借): private_account_item)", + "enum": [ + "bank_account", + "credit_card", + "private_account_item", + "wallet" + ], + "type": "string" + }, + "from_walletable_id": { + "description": "口座ID(from_walletable_typeがprivate_account_itemの場合は勘定科目ID)", + "type": "number" + }, + "amount": { + "description": "支払金額", + "type": "number" + } + }, + "required": [ + "amount", + "date", + "id" + ] + } + } + }, + "required": [ + "amount", + "company_id", + "id", + "issue_date", + "partner_id", + "status" + ] + } + }, + "required": [ + "deal" + ] + } + } + } + } + } + } + }, + "samples/freee/api/1/expense_application_line_templates/{id}": { + "get": { + "tags": [ + "api", + "1", + "expense_application_line_templates" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "number" + } + }, + { + "name": "company_id", + "in": "query", + "required": true, + "schema": { + "description": "事業所ID", + "type": "number" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "expense_application_line_template": { + "type": "object", + "properties": { + "id": { + "description": "経費科目ID", + "type": "number" + }, + "name": { + "description": "経費科目名", + "type": "string" + }, + "account_item_id": { + "description": "勘定科目ID", + "type": "number" + }, + "account_item_name": { + "description": "勘定科目名", + "type": "string" + }, + "tax_code": { + "description": "税区分コード", + "type": "number" + }, + "tax_name": { + "description": "税区分名", + "type": "string" + }, + "description": { + "description": "経費科目の説明", + "type": "string" + }, + "line_description": { + "description": "内容の補足", + "type": "string" + } + }, + "required": [ + "account_item_name", + "id", + "name", + "tax_name" + ] + } + }, + "required": [ + "expense_application_line_template" + ] + } + } + } + } + } + }, + "put": { + "tags": [ + "api", + "1", + "expense_application_line_templates" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "number" + } + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "description": "経費科目の更新", + "type": "object", + "properties": { + "company_id": { + "description": "事業所ID", + "type": "number" + }, + "name": { + "description": "経費科目名 (100文字以内)", + "type": "string" + }, + "account_items_id": { + "description": "勘定科目ID", + "type": "number" + }, + "item_id": { + "description": "品目ID", + "type": "number" + }, + "tax_code": { + "description": "税区分コード(税区分のdisplay_categoryがtax_5: 5%表示の税区分, tax_r8: 軽減税率8%表示の税区分に該当するtax_codeのみ利用可能です。税区分のdisplay_categoryは /taxes/companies/{:company_id}のAPIから取得可能です。)", + "type": "number" + }, + "description": { + "description": "経費科目の説明 (1000文字以内)", + "type": "string" + }, + "line_description": { + "description": "内容の補足 (1000文字以内)", + "type": "string" + } + }, + "required": [ + "company_id", + "name", + "tax_code" + ] + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "expense_application_line_template": { + "type": "object", + "properties": { + "id": { + "description": "経費科目ID", + "type": "number" + }, + "name": { + "description": "経費科目名", + "type": "string" + }, + "account_item_id": { + "description": "勘定科目ID", + "type": "number" + }, + "account_item_name": { + "description": "勘定科目名", + "type": "string" + }, + "tax_code": { + "description": "税区分コード", + "type": "number" + }, + "tax_name": { + "description": "税区分名", + "type": "string" + }, + "description": { + "description": "経費科目の説明", + "type": "string" + }, + "line_description": { + "description": "内容の補足", + "type": "string" + } + }, + "required": [ + "account_item_name", + "id", + "name", + "tax_name" + ] + } + }, + "required": [ + "expense_application_line_template" + ] + } + } + } + } + } + }, + "delete": { + "tags": [ + "api", + "1", + "expense_application_line_templates" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "number" + } + }, + { + "name": "company_id", + "in": "query", + "required": true, + "schema": { + "description": "事業所ID", + "type": "number" + } + } + ] + } + }, + "samples/freee/api/1/expense_application_line_templates": { + "get": { + "tags": [ + "api", + "1", + "expense_application_line_templates" + ], + "parameters": [ + { + "name": "company_id", + "in": "query", + "required": true, + "schema": { + "description": "事業所ID", + "type": "number" + } + }, + { + "name": "offset", + "in": "query", + "required": false, + "schema": { + "description": "取得レコードのオフセット (デフォルト: 0)", + "type": "number" + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "description": "取得レコードの件数 (デフォルト: 20, 最小: 1, 最大: 100)", + "type": "number" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "expense_application_line_templates": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "経費科目ID", + "type": "number" + }, + "name": { + "description": "経費科目名", + "type": "string" + }, + "account_item_id": { + "description": "勘定科目ID", + "type": "number" + }, + "account_item_name": { + "description": "勘定科目名", + "type": "string" + }, + "tax_code": { + "description": "税区分コード", + "type": "number" + }, + "tax_name": { + "description": "税区分名", + "type": "string" + }, + "description": { + "description": "経費科目の説明", + "type": "string" + }, + "line_description": { + "description": "内容の補足", + "type": "string" + } + }, + "required": [ + "account_item_name", + "id", + "name", + "tax_name" + ] + } + } + }, + "required": [ + "expense_application_line_templates" + ] + } + } + } + } + } + }, + "post": { + "tags": [ + "api", + "1", + "expense_application_line_templates" + ], + "parameters": [], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "description": "経費科目の作成", + "type": "object", + "properties": { + "company_id": { + "description": "事業所ID", + "type": "number" + }, + "name": { + "description": "経費科目名 (100文字以内)", + "type": "string" + }, + "account_items_id": { + "description": "勘定科目ID", + "type": "number" + }, + "item_id": { + "description": "品目ID", + "type": "number" + }, + "tax_code": { + "description": "税区分コード(税区分のdisplay_categoryがtax_5: 5%表示の税区分, tax_r8: 軽減税率8%表示の税区分に該当するtax_codeのみ利用可能です。税区分のdisplay_categoryは /taxes/companies/{:company_id}のAPIから取得可能です。)", + "type": "number" + }, + "description": { + "description": "経費科目の説明 (1000文字以内)", + "type": "string" + }, + "line_description": { + "description": "内容の補足 (1000文字以内)", + "type": "string" + } + }, + "required": [ + "company_id", + "name", + "tax_code" + ] + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "expense_application_line_template": { + "type": "object", + "properties": { + "id": { + "description": "経費科目ID", + "type": "number" + }, + "name": { + "description": "経費科目名", + "type": "string" + }, + "account_item_id": { + "description": "勘定科目ID", + "type": "number" + }, + "account_item_name": { + "description": "勘定科目名", + "type": "string" + }, + "tax_code": { + "description": "税区分コード", + "type": "number" + }, + "tax_name": { + "description": "税区分名", + "type": "string" + }, + "description": { + "description": "経費科目の説明", + "type": "string" + }, + "line_description": { + "description": "内容の補足", + "type": "string" + } + }, + "required": [ + "account_item_name", + "id", + "name", + "tax_name" + ] + } + }, + "required": [ + "expense_application_line_template" + ] + } + } + } + } + } + } + }, + "samples/freee/api/1/expense_applications/{id}": { + "get": { + "tags": [ + "api", + "1", + "expense_applications" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "number" + } + }, + { + "name": "company_id", + "in": "query", + "required": true, + "schema": { + "description": "事業所ID", + "type": "number" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "expense_application": { + "type": "object", + "properties": { + "id": { + "description": "経費申請ID", + "type": "number" + }, + "company_id": { + "description": "事業所ID", + "type": "number" + }, + "title": { + "description": "申請タイトル", + "type": "string" + }, + "issue_date": { + "description": "申請日 (yyyy-mm-dd)", + "type": [ + "null", + "string" + ] + }, + "description": { + "description": "備考", + "type": "string" + }, + "editable_on_web": { + "description": "会計freeeのWeb画面から申請内容を編集可能:falseの場合、Web上からの項目行の追加/削除・金額の編集が出来なくなります。APIでの編集は可能です。", + "type": "boolean" + }, + "total_amount": { + "description": "合計金額", + "type": "number" + }, + "status": { + "description": "申請ステータス(draft:下書き, in_progress:申請中, approved:承認済, rejected:却下, feedback:差戻し)", + "enum": [ + "approved", + "draft", + "feedback", + "in_progress", + "rejected" + ], + "type": "string" + }, + "section_id": { + "description": "部門ID", + "type": [ + "null", + "number" + ] + }, + "tag_ids": { + "description": "メモタグID", + "type": "array", + "items": { + "type": "number" + } + }, + "expense_application_lines": { + "description": "経費申請の項目行一覧(配列)", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "経費申請の項目行ID", + "type": "number" + }, + "transaction_date": { + "description": "日付 (yyyy-mm-dd)", + "type": "string" + }, + "description": { + "description": "内容", + "type": "string" + }, + "amount": { + "description": "金額", + "type": "number" + }, + "expense_application_line_template_id": { + "description": "経費科目ID", + "type": "number" + }, + "receipt_id": { + "description": "証憑ID", + "type": "number" + } + }, + "required": [ + "id" + ] + } + }, + "deal_id": { + "description": "取引ID (申請ステータス:statusがapprovedで、取引が存在する時のみdeal_idが表示されます)", + "type": [ + "null", + "number" + ] + }, + "deal_status": { + "description": "取引ステータス (申請ステータス:statusがapprovedで、取引が存在する時のみdeal_statusが表示されます settled:精算済み, unsettled:清算待ち)", + "anyOf": [ + { + "enum": [ + "settled", + "unsettled" + ], + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "company_id", + "deal_id", + "deal_status", + "editable_on_web", + "expense_application_lines", + "id", + "issue_date", + "status", + "title" + ] + } + }, + "required": [ + "expense_application" + ] + } + } + } + } + } + }, + "put": { + "tags": [ + "api", + "1", + "expense_applications" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "number" + } + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "description": "経費申請の更新", + "type": "object", + "properties": { + "company_id": { + "description": "事業所ID", + "type": "number" + }, + "title": { + "description": "申請タイトル (250文字以内)", + "type": "string" + }, + "issue_date": { + "description": "申請日 (yyyy-mm-dd)", + "type": "string" + }, + "description": { + "description": "備考 (10000文字以内)", + "type": "string" + }, + "editable_on_web": { + "description": "会計freeeのWeb画面から申請内容を編集可能:falseの場合、Web上からの項目行の追加/削除・金額の編集が出来なくなります。APIでの編集は可能です。", + "type": "boolean" + }, + "section_id": { + "description": "部門ID", + "type": "number" + }, + "tag_ids": { + "description": "メモタグID", + "type": "array", + "items": { + "type": "number" + } + }, + "expense_application_lines": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "経費申請の項目行ID: 既存項目行を更新する場合に指定します。IDを指定しない項目行は、新規行として扱われ追加されます。また、expense_application_linesに含まれない既存の項目行は削除されます。更新後も残したい行は、必ず経費申請の項目行IDを指定してexpense_application_linesに含めてください。", + "type": "number" + }, + "transaction_date": { + "description": "日付 (yyyy-mm-dd)", + "type": "string" + }, + "description": { + "description": "内容 (250文字以内)", + "type": "string" + }, + "amount": { + "description": "金額", + "type": "number" + }, + "expense_application_line_template_id": { + "description": "経費科目ID", + "type": "number" + }, + "receipt_id": { + "description": "証憑ID", + "type": "number" + } + } + } + } + }, + "required": [ + "company_id", + "expense_application_lines", + "issue_date", + "title" + ] + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "expense_application": { + "type": "object", + "properties": { + "id": { + "description": "経費申請ID", + "type": "number" + }, + "company_id": { + "description": "事業所ID", + "type": "number" + }, + "title": { + "description": "申請タイトル", + "type": "string" + }, + "issue_date": { + "description": "申請日 (yyyy-mm-dd)", + "type": [ + "null", + "string" + ] + }, + "description": { + "description": "備考", + "type": "string" + }, + "editable_on_web": { + "description": "会計freeeのWeb画面から申請内容を編集可能:falseの場合、Web上からの項目行の追加/削除・金額の編集が出来なくなります。APIでの編集は可能です。", + "type": "boolean" + }, + "total_amount": { + "description": "合計金額", + "type": "number" + }, + "status": { + "description": "申請ステータス(draft:下書き, in_progress:申請中, approved:承認済, rejected:却下, feedback:差戻し)", + "enum": [ + "approved", + "draft", + "feedback", + "in_progress", + "rejected" + ], + "type": "string" + }, + "section_id": { + "description": "部門ID", + "type": [ + "null", + "number" + ] + }, + "tag_ids": { + "description": "メモタグID", + "type": "array", + "items": { + "type": "number" + } + }, + "expense_application_lines": { + "description": "経費申請の項目行一覧(配列)", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "経費申請の項目行ID", + "type": "number" + }, + "transaction_date": { + "description": "日付 (yyyy-mm-dd)", + "type": "string" + }, + "description": { + "description": "内容", + "type": "string" + }, + "amount": { + "description": "金額", + "type": "number" + }, + "expense_application_line_template_id": { + "description": "経費科目ID", + "type": "number" + }, + "receipt_id": { + "description": "証憑ID", + "type": "number" + } + }, + "required": [ + "id" + ] + } + }, + "deal_id": { + "description": "取引ID (申請ステータス:statusがapprovedで、取引が存在する時のみdeal_idが表示されます)", + "type": [ + "null", + "number" + ] + }, + "deal_status": { + "description": "取引ステータス (申請ステータス:statusがapprovedで、取引が存在する時のみdeal_statusが表示されます settled:精算済み, unsettled:清算待ち)", + "anyOf": [ + { + "enum": [ + "settled", + "unsettled" + ], + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "company_id", + "deal_id", + "deal_status", + "editable_on_web", + "expense_application_lines", + "id", + "issue_date", + "status", + "title" + ] + } + }, + "required": [ + "expense_application" + ] + } + } + } + } + } + }, + "delete": { + "tags": [ + "api", + "1", + "expense_applications" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "number" + } + }, + { + "name": "company_id", + "in": "query", + "required": true, + "schema": { + "description": "事業所ID", + "type": "number" + } + } + ] + } + }, + "samples/freee/api/1/expense_applications": { + "get": { + "tags": [ + "api", + "1", + "expense_applications" + ], + "parameters": [ + { + "name": "company_id", + "in": "query", + "required": true, + "schema": { + "description": "事業所ID", + "type": "number" + } + }, + { + "name": "offset", + "in": "query", + "required": false, + "schema": { + "description": "取得レコードのオフセット (デフォルト: 0)", + "type": "number" + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "description": "取得レコードの件数 (デフォルト: 50, 最小: 1, 最大: 500)", + "type": "number" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "expense_applications": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "経費申請ID", + "type": "number" + }, + "company_id": { + "description": "事業所ID", + "type": "number" + }, + "title": { + "description": "申請タイトル", + "type": "string" + }, + "issue_date": { + "description": "申請日 (yyyy-mm-dd)", + "type": [ + "null", + "string" + ] + }, + "description": { + "description": "備考", + "type": "string" + }, + "editable_on_web": { + "description": "会計freeeのWeb画面から申請内容を編集可能:falseの場合、Web上からの項目行の追加/削除・金額の編集が出来なくなります。APIでの編集は可能です。", + "type": "boolean" + }, + "total_amount": { + "description": "合計金額", + "type": "number" + }, + "status": { + "description": "申請ステータス(draft:下書き, in_progress:申請中, approved:承認済, rejected:却下, feedback:差戻し)", + "enum": [ + "approved", + "draft", + "feedback", + "in_progress", + "rejected" + ], + "type": "string" + }, + "section_id": { + "description": "部門ID", + "type": [ + "null", + "number" + ] + }, + "tag_ids": { + "description": "メモタグID", + "type": "array", + "items": { + "type": "number" + } + }, + "expense_application_lines": { + "description": "経費申請の項目行一覧(配列)", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "経費申請の項目行ID", + "type": "number" + }, + "transaction_date": { + "description": "日付 (yyyy-mm-dd)", + "type": "string" + }, + "description": { + "description": "内容", + "type": "string" + }, + "amount": { + "description": "金額", + "type": "number" + }, + "expense_application_line_template_id": { + "description": "経費科目ID", + "type": "number" + }, + "receipt_id": { + "description": "証憑ID", + "type": "number" + } + }, + "required": [ + "id" + ] + } + }, + "deal_id": { + "description": "取引ID (申請ステータス:statusがapprovedで、取引が存在する時のみdeal_idが表示されます)", + "type": [ + "null", + "number" + ] + }, + "deal_status": { + "description": "取引ステータス (申請ステータス:statusがapprovedで、取引が存在する時のみdeal_statusが表示されます settled:精算済み, unsettled:清算待ち)", + "anyOf": [ + { + "enum": [ + "settled", + "unsettled" + ], + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "company_id", + "deal_id", + "deal_status", + "editable_on_web", + "expense_application_lines", + "id", + "issue_date", + "status", + "title" + ] + } + } + }, + "required": [ + "expense_applications" + ] + } + } + } + } + } + }, + "post": { + "tags": [ + "api", + "1", + "expense_applications" + ], + "parameters": [], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "description": "経費申請の作成", + "type": "object", + "properties": { + "company_id": { + "description": "事業所ID", + "type": "number" + }, + "title": { + "description": "申請タイトル (250文字以内)", + "type": "string" + }, + "issue_date": { + "description": "申請日 (yyyy-mm-dd)", + "type": "string" + }, + "description": { + "description": "備考 (10000文字以内)", + "type": "string" + }, + "editable_on_web": { + "description": "会計freeeのWeb画面から申請内容を編集可能(デフォルト: false):falseの場合、Web上からの項目行の追加/削除・金額の編集が出来なくなります。APIでの編集は可能です。", + "type": "boolean" + }, + "section_id": { + "description": "部門ID", + "type": "number" + }, + "tag_ids": { + "description": "メモタグID", + "type": "array", + "items": { + "type": "number" + } + }, + "expense_application_lines": { + "type": "array", + "items": { + "type": "object", + "properties": { + "transaction_date": { + "description": "日付 (yyyy-mm-dd)", + "type": "string" + }, + "description": { + "description": "内容 (250文字以内)", + "type": "string" + }, + "amount": { + "description": "金額", + "type": "number" + }, + "expense_application_line_template_id": { + "description": "経費科目ID", + "type": "number" + }, + "receipt_id": { + "description": "証憑ID", + "type": "number" + } + } + } + } + }, + "required": [ + "company_id", + "expense_application_lines", + "issue_date", + "title" + ] + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "expense_application": { + "type": "object", + "properties": { + "id": { + "description": "経費申請ID", + "type": "number" + }, + "company_id": { + "description": "事業所ID", + "type": "number" + }, + "title": { + "description": "申請タイトル", + "type": "string" + }, + "issue_date": { + "description": "申請日 (yyyy-mm-dd)", + "type": [ + "null", + "string" + ] + }, + "description": { + "description": "備考", + "type": "string" + }, + "editable_on_web": { + "description": "会計freeeのWeb画面から申請内容を編集可能:falseの場合、Web上からの項目行の追加/削除・金額の編集が出来なくなります。APIでの編集は可能です。", + "type": "boolean" + }, + "total_amount": { + "description": "合計金額", + "type": "number" + }, + "status": { + "description": "申請ステータス(draft:下書き, in_progress:申請中, approved:承認済, rejected:却下, feedback:差戻し)", + "enum": [ + "approved", + "draft", + "feedback", + "in_progress", + "rejected" + ], + "type": "string" + }, + "section_id": { + "description": "部門ID", + "type": [ + "null", + "number" + ] + }, + "tag_ids": { + "description": "メモタグID", + "type": "array", + "items": { + "type": "number" + } + }, + "expense_application_lines": { + "description": "経費申請の項目行一覧(配列)", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "経費申請の項目行ID", + "type": "number" + }, + "transaction_date": { + "description": "日付 (yyyy-mm-dd)", + "type": "string" + }, + "description": { + "description": "内容", + "type": "string" + }, + "amount": { + "description": "金額", + "type": "number" + }, + "expense_application_line_template_id": { + "description": "経費科目ID", + "type": "number" + }, + "receipt_id": { + "description": "証憑ID", + "type": "number" + } + }, + "required": [ + "id" + ] + } + }, + "deal_id": { + "description": "取引ID (申請ステータス:statusがapprovedで、取引が存在する時のみdeal_idが表示されます)", + "type": [ + "null", + "number" + ] + }, + "deal_status": { + "description": "取引ステータス (申請ステータス:statusがapprovedで、取引が存在する時のみdeal_statusが表示されます settled:精算済み, unsettled:清算待ち)", + "anyOf": [ + { + "enum": [ + "settled", + "unsettled" + ], + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "company_id", + "deal_id", + "deal_status", + "editable_on_web", + "expense_application_lines", + "id", + "issue_date", + "status", + "title" + ] + } + }, + "required": [ + "expense_application" + ] + } + } + } + } + } + } + }, + "samples/freee/api/1/forms/selectables": { + "get": { + "tags": [ + "api", + "1", + "forms", + "selectables" + ], + "parameters": [ + { + "name": "company_id", + "in": "query", + "required": true, + "schema": { + "description": "事業所ID", + "type": "number" + } + }, + { + "name": "includes", + "in": "query", + "required": false, + "schema": { + "description": "取得する項目(項目: account_item)", + "const": "account_item", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "account_categories": { + "type": "array", + "items": { + "type": "object", + "properties": { + "balance": { + "description": "収支", + "enum": [ + "expense", + "income" + ], + "type": "string" + }, + "org_code": { + "description": "事業形態(個人事業主: personal、法人: corporate)", + "enum": [ + "corporate", + "personal" + ], + "type": "string" + }, + "role": { + "description": "カテゴリーコード", + "type": "string" + }, + "title": { + "description": "カテゴリー名", + "type": "string" + }, + "desc": { + "description": "カテゴリーの説明", + "type": "string" + }, + "account_items": { + "description": "勘定科目の一覧", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "勘定科目ID", + "type": "number" + }, + "name": { + "description": "勘定科目", + "type": "string" + }, + "desc": { + "description": "勘定科目の説明", + "type": "string" + }, + "help": { + "description": "勘定科目の説明(詳細)", + "type": "string" + }, + "shortcut": { + "description": "ショートカット", + "type": "string" + }, + "default_tax": { + "type": "object", + "properties": { + "tax_rate_5": { + "type": "object", + "properties": { + "id": { + "description": "税区分ID", + "type": "number" + }, + "name": { + "description": "税区分", + "type": "string" + } + } + }, + "tax_rate_8": { + "type": "object", + "properties": { + "id": { + "description": "税区分ID", + "type": "number" + }, + "name": { + "description": "税区分", + "type": "string" + } + } + } + } + } + }, + "required": [ + "id" + ] + } + } + }, + "required": [ + "account_items", + "balance", + "org_code", + "role", + "title" + ] + } + }, + "account_groups": { + "description": "決算書表示名(小カテゴリー)", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "決算書表示名(小カテゴリー)ID", + "type": "number" + }, + "name": { + "description": "決算書表示名", + "type": "string" + }, + "account_structure_id": { + "description": "年度ID", + "type": "number" + }, + "account_category_id": { + "description": "勘定科目カテゴリーID", + "type": "number" + }, + "detail_type": { + "description": "詳細パラメータの種類", + "type": "number" + }, + "index": { + "description": "並び順", + "type": "number" + }, + "created_at": { + "description": "作成日時", + "type": "string" + }, + "updated_at": { + "description": "更新日時", + "type": "string" + } + }, + "required": [ + "account_category_id", + "account_structure_id", + "id", + "index", + "name" + ] + } + } + } + } + } + } + } + } + } + }, + "samples/freee/api/1/invoices/{id}": { + "get": { + "tags": [ + "api", + "1", + "invoices" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "number" + } + }, + { + "name": "company_id", + "in": "query", + "required": true, + "schema": { + "description": "事業所ID", + "type": "number" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "invoice": { + "type": "object", + "properties": { + "id": { + "description": "請求書ID", + "type": "number" + }, + "company_id": { + "description": "事業所ID", + "type": "number" + }, + "issue_date": { + "description": "請求日 (yyyy-mm-dd)", + "type": "string" + }, + "partner_id": { + "description": "取引先ID", + "type": [ + "null", + "number" + ] + }, + "partner_code": { + "description": "取引先コード", + "type": [ + "null", + "string" + ] + }, + "invoice_number": { + "description": "請求書番号", + "type": "string" + }, + "title": { + "description": "タイトル", + "type": [ + "null", + "string" + ] + }, + "due_date": { + "description": "期日 (yyyy-mm-dd)", + "type": [ + "null", + "string" + ] + }, + "total_amount": { + "description": "合計金額", + "type": "number" + }, + "total_vat": { + "description": "合計金額", + "type": "number" + }, + "sub_total": { + "description": "小計", + "type": "number" + }, + "booking_date": { + "description": "売上計上日", + "type": [ + "null", + "string" + ] + }, + "description": { + "description": "概要", + "type": [ + "null", + "string" + ] + }, + "invoice_status": { + "description": "請求書ステータス (draft: 下書き, applying: 申請中, remanded: 差し戻し, rejected: 却下, approved: 承認済み, issued: 発行済み)", + "enum": [ + "applying", + "approved", + "draft", + "issued", + "rejected", + "remanded" + ], + "type": "string" + }, + "payment_status": { + "description": "入金ステータス (unsettled: 入金待ち, settled: 入金済み)", + "enum": [ + "", + "settled", + "unsettled" + ], + "type": "string" + }, + "payment_date": { + "description": "入金日", + "type": [ + "null", + "string" + ] + }, + "web_published_at": { + "description": "Web共有日時(最新)", + "type": [ + "null", + "string" + ] + }, + "web_downloaded_at": { + "description": "Web共有ダウンロード日時(最新)", + "type": [ + "null", + "string" + ] + }, + "web_confirmed_at": { + "description": "Web共有取引先確認日時(最新)", + "type": [ + "null", + "string" + ] + }, + "mail_sent_at": { + "description": "メール送信日時(最新)", + "type": [ + "null", + "string" + ] + }, + "posting_status": { + "description": "郵送ステータス(unrequested: リクエスト前, preview_registered: プレビュー登録, preview_failed: プレビュー登録失敗, ordered: 注文中, order_failed: 注文失敗, printing: 印刷中, canceled: キャンセル, posted: 投函済み)", + "enum": [ + "", + "canceled", + "order_failed", + "ordered", + "posted", + "preview_failed", + "preview_registered", + "printing", + "unrequested" + ], + "type": "string" + }, + "partner_name": { + "description": "取引先名", + "type": [ + "null", + "string" + ] + }, + "partner_long_name": { + "description": "取引先正式名称", + "type": [ + "null", + "string" + ] + }, + "partner_title": { + "description": "敬称(御中、様、(空白)の3つから選択)", + "type": [ + "null", + "string" + ] + }, + "partner_zipcode": { + "description": "郵便番号", + "type": [ + "null", + "string" + ] + }, + "partner_prefecture_code": { + "description": "都道府県コード(0:北海道、1:青森、2:岩手、3:宮城、4:秋田、5:山形、6:福島、7:茨城、8:栃木、9:群馬、10:埼玉、11:千葉、12:東京、13:神奈川、14:新潟、15:富山、16:石川、17:福井、18:山梨、19:長野、20:岐阜、21:静岡、22:愛知、23:三重、24:滋賀、25:京都、26:大阪、27:兵庫、28:奈良、29:和歌山、30:鳥取、31:島根、32:岡山、33:広島、34:山口、35:徳島、36:香川、37:愛媛、38:高知、39:福岡、40:佐賀、41:長崎、42:熊本、43:大分、44:宮崎、45:鹿児島、46:沖縄", + "type": [ + "null", + "number" + ] + }, + "partner_prefecture_name": { + "description": "都道府県", + "type": [ + "null", + "string" + ] + }, + "partner_address1": { + "description": "市区町村・番地", + "type": [ + "null", + "string" + ] + }, + "partner_address2": { + "description": "建物名・部屋番号など", + "type": [ + "null", + "string" + ] + }, + "partner_contact_info": { + "description": "取引先担当者名", + "type": [ + "null", + "string" + ] + }, + "company_name": { + "description": "事業所名", + "type": "string" + }, + "company_zipcode": { + "description": "郵便番号", + "type": [ + "null", + "string" + ] + }, + "company_prefecture_code": { + "description": "都道府県コード(0:北海道、1:青森、2:岩手、3:宮城、4:秋田、5:山形、6:福島、7:茨城、8:栃木、9:群馬、10:埼玉、11:千葉、12:東京、13:神奈川、14:新潟、15:富山、16:石川、17:福井、18:山梨、19:長野、20:岐阜、21:静岡、22:愛知、23:三重、24:滋賀、25:京都、26:大阪、27:兵庫、28:奈良、29:和歌山、30:鳥取、31:島根、32:岡山、33:広島、34:山口、35:徳島、36:香川、37:愛媛、38:高知、39:福岡、40:佐賀、41:長崎、42:熊本、43:大分、44:宮崎、45:鹿児島、46:沖縄", + "type": [ + "null", + "number" + ] + }, + "company_prefecture_name": { + "description": "都道府県", + "type": [ + "null", + "string" + ] + }, + "company_address1": { + "description": "市区町村・番地", + "type": [ + "null", + "string" + ] + }, + "company_address2": { + "description": "建物名・部屋番号など", + "type": [ + "null", + "string" + ] + }, + "company_contact_info": { + "description": "事業所担当者名", + "type": [ + "null", + "string" + ] + }, + "payment_type": { + "description": "支払方法 (振込: transfer, 引き落とし: direct_debit)", + "enum": [ + "", + "direct_debit", + "transfer" + ], + "type": "string" + }, + "payment_bank_info": { + "description": "支払口座", + "type": [ + "null", + "string" + ] + }, + "message": { + "description": "メッセージ", + "type": [ + "null", + "string" + ] + }, + "notes": { + "description": "備考", + "type": [ + "null", + "string" + ] + }, + "invoice_layout": { + "description": "レイアウト(default_classic: レイアウト1/クラシック, standard_classic: レイアウト2/クラシック, envelope_classic: 封筒1/クラシック, carried_forward_standard_classic: レイアウト3(繰越金額欄あり)/クラシック, carried_forward_envelope_classic: 封筒2(繰越金額欄あり)/クラシック, default_modern: レイアウト1/モダン, standard_modern: レイアウト2/モダン, envelope_modern: 封筒/モダン)", + "enum": [ + "carried_forward_envelope_classic", + "carried_forward_standard_classic", + "default_classic", + "default_modern", + "envelope_classic", + "envelope_modern", + "standard_classic", + "standard_modern" + ], + "type": "string" + }, + "tax_entry_method": { + "description": "請求書の消費税計算方法(inclusive: 内税, exclusive: 外税)", + "enum": [ + "", + "exclusive", + "inclusive" + ], + "type": "string" + }, + "deal_id": { + "description": "取引ID (invoice_statusがissuedの時のみIDが表示されます)", + "type": [ + "null", + "number" + ] + }, + "invoice_contents": { + "description": "請求内容", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "請求内容ID", + "type": "number" + }, + "order": { + "description": "順序", + "type": "number" + }, + "type": { + "description": "行の種類", + "enum": [ + "discount", + "normal", + "text" + ], + "type": "string" + }, + "qty": { + "description": "数量", + "type": "number" + }, + "unit": { + "description": "単位", + "type": [ + "null", + "string" + ] + }, + "unit_price": { + "description": "単価", + "type": "number" + }, + "amount": { + "description": "金額", + "type": "number" + }, + "vat": { + "description": "消費税額", + "type": "number" + }, + "reduced_vat": { + "description": "軽減税率税区分(true: 対象、false: 対象外)", + "type": "boolean" + }, + "description": { + "description": "備考", + "type": [ + "null", + "string" + ] + }, + "account_item_id": { + "description": "勘定科目ID", + "type": [ + "null", + "number" + ] + }, + "account_item_name": { + "description": "勘定科目名", + "type": [ + "null", + "string" + ] + }, + "tax_code": { + "description": "税区分コード", + "type": [ + "null", + "number" + ] + }, + "item_id": { + "description": "品目ID", + "type": [ + "null", + "number" + ] + }, + "item_name": { + "description": "品目", + "type": [ + "null", + "string" + ] + }, + "section_id": { + "description": "部門ID", + "type": [ + "null", + "number" + ] + }, + "section_name": { + "description": "部門", + "type": [ + "null", + "string" + ] + }, + "tag_ids": { + "type": "array", + "items": { + "type": "number" + } + }, + "tag_names": { + "type": "array", + "items": { + "type": "string" + } + }, + "segment_1_tag_id": { + "description": "セグメント1ID", + "type": [ + "null", + "number" + ] + }, + "segment_1_tag_name": { + "description": "セグメント1ID", + "type": [ + "null", + "string" + ] + }, + "segment_2_tag_id": { + "description": "セグメント2ID", + "type": [ + "null", + "number" + ] + }, + "segment_2_tag_name": { + "description": "セグメント2", + "type": [ + "null", + "string" + ] + }, + "segment_3_tag_id": { + "description": "セグメント3ID", + "type": [ + "null", + "number" + ] + }, + "segment_3_tag_name": { + "description": "セグメント3", + "type": [ + "null", + "string" + ] + } + }, + "required": [ + "account_item_id", + "account_item_name", + "amount", + "description", + "id", + "item_id", + "item_name", + "order", + "qty", + "reduced_vat", + "section_id", + "section_name", + "tag_ids", + "tag_names", + "tax_code", + "type", + "unit", + "unit_price", + "vat" + ] + } + }, + "total_amount_per_vat_rate": { + "type": "object", + "properties": { + "vat_5": { + "description": "税率5%の税込み金額合計", + "type": "number" + }, + "vat_8": { + "description": "税率8%の税込み金額合計", + "type": "number" + }, + "reduced_vat_8": { + "description": "軽減税率8%の税込み金額合計", + "type": "number" + }, + "vat_10": { + "description": "税率10%の税込み金額合計", + "type": "number" + } + }, + "required": [ + "reduced_vat_8", + "vat_10", + "vat_5", + "vat_8" + ] + } + }, + "required": [ + "company_id", + "company_name", + "id", + "invoice_layout", + "invoice_number", + "invoice_status", + "issue_date", + "partner_id", + "payment_type", + "posting_status", + "tax_entry_method", + "total_amount", + "total_amount_per_vat_rate" + ] + } + }, + "required": [ + "invoice" + ] + } + } + } + } + } + }, + "put": { + "tags": [ + "api", + "1", + "invoices" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "number" + } + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "description": "請求書の更新", + "type": "object", + "properties": { + "company_id": { + "description": "事業所ID", + "type": "number" + }, + "issue_date": { + "description": "請求日 (yyyy-mm-dd)", + "type": "string" + }, + "partner_id": { + "description": "取引先ID", + "type": [ + "null", + "number" + ] + }, + "partner_code": { + "description": "取引先コード", + "type": [ + "null", + "string" + ] + }, + "invoice_number": { + "description": "請求書番号 (デフォルト: 自動採番されます)", + "type": "string" + }, + "title": { + "description": "タイトル (デフォルト: 請求書)", + "type": "string" + }, + "due_date": { + "description": "期日 (yyyy-mm-dd)", + "type": "string" + }, + "booking_date": { + "description": "売上計上日", + "type": "string" + }, + "description": { + "description": "概要", + "type": "string" + }, + "invoice_status": { + "description": "請求書ステータス (draft: 下書き (デフォルト), issue: 発行(請求先ワークフローを利用している場合は承認済の請求書にのみ指定できます))", + "enum": [ + "draft", + "issue" + ], + "type": "string" + }, + "partner_name": { + "description": "請求書に表示する取引先名(未指定の場合は取引先の名称をそのまま利用します)", + "type": [ + "null", + "string" + ] + }, + "partner_title": { + "description": "敬称(御中、様、(空白)の3つから選択)", + "type": [ + "null", + "string" + ] + }, + "partner_contact_info": { + "description": "取引先担当者名", + "type": [ + "null", + "string" + ] + }, + "partner_zipcode": { + "description": "取引先郵便番号 (デフォルトはpartner_idもしくははpartner_codeで指定された取引先設定情報が補完されます)", + "type": [ + "null", + "string" + ] + }, + "partner_prefecture_code": { + "description": "取引先都道府県コード(0:北海道、1:青森、2:岩手、3:宮城、4:秋田、5:山形、6:福島、7:茨城、8:栃木、9:群馬、10:埼玉、11:千葉、12:東京、13:神奈川、14:新潟、15:富山、16:石川、17:福井、18:山梨、19:長野、20:岐阜、21:静岡、22:愛知、23:三重、24:滋賀、25:京都、26:大阪、27:兵庫、28:奈良、29:和歌山、30:鳥取、31:島根、32:岡山、33:広島、34:山口、35:徳島、36:香川、37:愛媛、38:高知、39:福岡、40:佐賀、41:長崎、42:熊本、43:大分、44:宮崎、45:鹿児島、46:沖縄) (デフォルトはpartner_idもしくははpartner_codeで指定された取引先設定情報が補完されます)", + "type": [ + "null", + "number" + ] + }, + "partner_address1": { + "description": "取引先市区町村・番地 (デフォルトはpartner_idもしくははpartner_codeで指定された取引先設定情報が補完されます)", + "type": [ + "null", + "string" + ] + }, + "partner_address2": { + "description": "取引先建物名・部屋番号など (デフォルトはpartner_idもしくははpartner_codeで指定された取引先設定情報が補完されます)", + "type": [ + "null", + "string" + ] + }, + "company_name": { + "description": "事業所名 (デフォルトは事業所設定情報が補完されます)", + "type": "string" + }, + "company_zipcode": { + "description": "郵便番号 (デフォルトは事業所設定情報が補完されます)", + "type": "string" + }, + "company_prefecture_code": { + "description": "都道府県コード(0:北海道、1:青森、2:岩手、3:宮城、4:秋田、5:山形、6:福島、7:茨城、8:栃木、9:群馬、10:埼玉、11:千葉、12:東京、13:神奈川、14:新潟、15:富山、16:石川、17:福井、18:山梨、19:長野、20:岐阜、21:静岡、22:愛知、23:三重、24:滋賀、25:京都、26:大阪、27:兵庫、28:奈良、29:和歌山、30:鳥取、31:島根、32:岡山、33:広島、34:山口、35:徳島、36:香川、37:愛媛、38:高知、39:福岡、40:佐賀、41:長崎、42:熊本、43:大分、44:宮崎、45:鹿児島、46:沖縄) (デフォルトは事業所設定情報が補完されます)", + "type": "number" + }, + "company_address1": { + "description": "市区町村・番地 (デフォルトは事業所設定情報が補完されます)", + "type": "string" + }, + "company_address2": { + "description": "建物名・部屋番号など (デフォルトは事業所設定情報が補完されます)", + "type": "string" + }, + "company_contact_info": { + "description": "事業所担当者名 (デフォルトは事業所設定情報が補完されます)", + "type": "string" + }, + "payment_type": { + "description": "支払方法 (振込: transfer, 引き落とし: direct_debit)", + "enum": [ + "direct_debit", + "transfer" + ], + "type": "string" + }, + "payment_bank_info": { + "description": "支払口座", + "type": "string" + }, + "use_virtual_transfer_account": { + "description": "振込専用口座の利用(利用しない: not_use(デフォルト), 利用する: use)", + "enum": [ + "not_use", + "use" + ], + "type": "string" + }, + "message": { + "description": "メッセージ (デフォルト: 下記の通りご請求申し上げます。)", + "type": "string" + }, + "notes": { + "description": "備考", + "type": "string" + }, + "invoice_layout": { + "description": "レイアウト(default_classic: レイアウト1/クラシック (デフォルト), standard_classic: レイアウト2/クラシック, envelope_classic: 封筒1/クラシック, carried_forward_standard_classic: レイアウト3(繰越金額欄あり)/クラシック, carried_forward_envelope_classic: 封筒2(繰越金額欄あり)/クラシック, default_modern: レイアウト1/モダン, standard_modern: レイアウト2/モダン, envelope_modern: 封筒/モダン)", + "enum": [ + "carried_forward_envelope_classic", + "carried_forward_standard_classic", + "default_classic", + "default_modern", + "envelope_classic", + "envelope_modern", + "standard_classic", + "standard_modern" + ], + "type": "string" + }, + "tax_entry_method": { + "description": "請求書の消費税計算方法(inclusive: 内税表示, exclusive: 外税表示 (デフォルト))", + "enum": [ + "exclusive", + "inclusive" + ], + "type": "string" + }, + "invoice_contents": { + "description": "請求内容", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "請求内容ID", + "type": "number" + }, + "order": { + "description": "順序", + "type": "number" + }, + "type": { + "description": "行の種類", + "enum": [ + "discount", + "normal", + "text" + ], + "type": "string" + }, + "qty": { + "description": "数量", + "type": "number" + }, + "unit": { + "description": "単位", + "type": "string" + }, + "unit_price": { + "description": "単価 (tax_entry_method: inclusiveの場合は税込価格、tax_entry_method: exclusiveの場合は税抜価格となります)", + "type": "number" + }, + "vat": { + "description": "消費税額", + "type": [ + "null", + "number" + ] + }, + "description": { + "description": "備考", + "type": "string" + }, + "account_item_id": { + "description": "勘定科目ID", + "type": "number" + }, + "tax_code": { + "description": "税区分ID", + "type": "number" + }, + "item_id": { + "description": "品目ID", + "type": "number" + }, + "section_id": { + "description": "部門ID", + "type": "number" + }, + "tag_ids": { + "type": "array", + "items": { + "type": "number" + } + }, + "segment_1_tag_id": { + "description": "セグメント1ID", + "type": "number" + }, + "segment_2_tag_id": { + "description": "セグメント2ID", + "type": "number" + }, + "segment_3_tag_id": { + "description": "セグメント3ID", + "type": "number" + } + }, + "required": [ + "order", + "type" + ] + } + } + }, + "required": [ + "company_id" + ] + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "invoice": { + "type": "object", + "properties": { + "id": { + "description": "請求書ID", + "type": "number" + }, + "company_id": { + "description": "事業所ID", + "type": "number" + }, + "issue_date": { + "description": "請求日 (yyyy-mm-dd)", + "type": "string" + }, + "partner_id": { + "description": "取引先ID", + "type": [ + "null", + "number" + ] + }, + "partner_code": { + "description": "取引先コード", + "type": [ + "null", + "string" + ] + }, + "invoice_number": { + "description": "請求書番号", + "type": "string" + }, + "title": { + "description": "タイトル", + "type": [ + "null", + "string" + ] + }, + "due_date": { + "description": "期日 (yyyy-mm-dd)", + "type": [ + "null", + "string" + ] + }, + "total_amount": { + "description": "合計金額", + "type": "number" + }, + "total_vat": { + "description": "合計金額", + "type": "number" + }, + "sub_total": { + "description": "小計", + "type": "number" + }, + "booking_date": { + "description": "売上計上日", + "type": [ + "null", + "string" + ] + }, + "description": { + "description": "概要", + "type": [ + "null", + "string" + ] + }, + "invoice_status": { + "description": "請求書ステータス (draft: 下書き, applying: 申請中, remanded: 差し戻し, rejected: 却下, approved: 承認済み, issued: 発行済み)", + "enum": [ + "applying", + "approved", + "draft", + "issued", + "rejected", + "remanded" + ], + "type": "string" + }, + "payment_status": { + "description": "入金ステータス (unsettled: 入金待ち, settled: 入金済み)", + "enum": [ + "", + "settled", + "unsettled" + ], + "type": "string" + }, + "payment_date": { + "description": "入金日", + "type": [ + "null", + "string" + ] + }, + "web_published_at": { + "description": "Web共有日時(最新)", + "type": [ + "null", + "string" + ] + }, + "web_downloaded_at": { + "description": "Web共有ダウンロード日時(最新)", + "type": [ + "null", + "string" + ] + }, + "web_confirmed_at": { + "description": "Web共有取引先確認日時(最新)", + "type": [ + "null", + "string" + ] + }, + "mail_sent_at": { + "description": "メール送信日時(最新)", + "type": [ + "null", + "string" + ] + }, + "posting_status": { + "description": "郵送ステータス(unrequested: リクエスト前, preview_registered: プレビュー登録, preview_failed: プレビュー登録失敗, ordered: 注文中, order_failed: 注文失敗, printing: 印刷中, canceled: キャンセル, posted: 投函済み)", + "enum": [ + "", + "canceled", + "order_failed", + "ordered", + "posted", + "preview_failed", + "preview_registered", + "printing", + "unrequested" + ], + "type": "string" + }, + "partner_name": { + "description": "取引先名", + "type": [ + "null", + "string" + ] + }, + "partner_long_name": { + "description": "取引先正式名称", + "type": [ + "null", + "string" + ] + }, + "partner_title": { + "description": "敬称(御中、様、(空白)の3つから選択)", + "type": [ + "null", + "string" + ] + }, + "partner_zipcode": { + "description": "郵便番号", + "type": [ + "null", + "string" + ] + }, + "partner_prefecture_code": { + "description": "都道府県コード(0:北海道、1:青森、2:岩手、3:宮城、4:秋田、5:山形、6:福島、7:茨城、8:栃木、9:群馬、10:埼玉、11:千葉、12:東京、13:神奈川、14:新潟、15:富山、16:石川、17:福井、18:山梨、19:長野、20:岐阜、21:静岡、22:愛知、23:三重、24:滋賀、25:京都、26:大阪、27:兵庫、28:奈良、29:和歌山、30:鳥取、31:島根、32:岡山、33:広島、34:山口、35:徳島、36:香川、37:愛媛、38:高知、39:福岡、40:佐賀、41:長崎、42:熊本、43:大分、44:宮崎、45:鹿児島、46:沖縄", + "type": [ + "null", + "number" + ] + }, + "partner_prefecture_name": { + "description": "都道府県", + "type": [ + "null", + "string" + ] + }, + "partner_address1": { + "description": "市区町村・番地", + "type": [ + "null", + "string" + ] + }, + "partner_address2": { + "description": "建物名・部屋番号など", + "type": [ + "null", + "string" + ] + }, + "partner_contact_info": { + "description": "取引先担当者名", + "type": [ + "null", + "string" + ] + }, + "company_name": { + "description": "事業所名", + "type": "string" + }, + "company_zipcode": { + "description": "郵便番号", + "type": [ + "null", + "string" + ] + }, + "company_prefecture_code": { + "description": "都道府県コード(0:北海道、1:青森、2:岩手、3:宮城、4:秋田、5:山形、6:福島、7:茨城、8:栃木、9:群馬、10:埼玉、11:千葉、12:東京、13:神奈川、14:新潟、15:富山、16:石川、17:福井、18:山梨、19:長野、20:岐阜、21:静岡、22:愛知、23:三重、24:滋賀、25:京都、26:大阪、27:兵庫、28:奈良、29:和歌山、30:鳥取、31:島根、32:岡山、33:広島、34:山口、35:徳島、36:香川、37:愛媛、38:高知、39:福岡、40:佐賀、41:長崎、42:熊本、43:大分、44:宮崎、45:鹿児島、46:沖縄", + "type": [ + "null", + "number" + ] + }, + "company_prefecture_name": { + "description": "都道府県", + "type": [ + "null", + "string" + ] + }, + "company_address1": { + "description": "市区町村・番地", + "type": [ + "null", + "string" + ] + }, + "company_address2": { + "description": "建物名・部屋番号など", + "type": [ + "null", + "string" + ] + }, + "company_contact_info": { + "description": "事業所担当者名", + "type": [ + "null", + "string" + ] + }, + "payment_type": { + "description": "支払方法 (振込: transfer, 引き落とし: direct_debit)", + "enum": [ + "", + "direct_debit", + "transfer" + ], + "type": "string" + }, + "payment_bank_info": { + "description": "支払口座", + "type": [ + "null", + "string" + ] + }, + "message": { + "description": "メッセージ", + "type": [ + "null", + "string" + ] + }, + "notes": { + "description": "備考", + "type": [ + "null", + "string" + ] + }, + "invoice_layout": { + "description": "レイアウト(default_classic: レイアウト1/クラシック, standard_classic: レイアウト2/クラシック, envelope_classic: 封筒1/クラシック, carried_forward_standard_classic: レイアウト3(繰越金額欄あり)/クラシック, carried_forward_envelope_classic: 封筒2(繰越金額欄あり)/クラシック, default_modern: レイアウト1/モダン, standard_modern: レイアウト2/モダン, envelope_modern: 封筒/モダン)", + "enum": [ + "carried_forward_envelope_classic", + "carried_forward_standard_classic", + "default_classic", + "default_modern", + "envelope_classic", + "envelope_modern", + "standard_classic", + "standard_modern" + ], + "type": "string" + }, + "tax_entry_method": { + "description": "請求書の消費税計算方法(inclusive: 内税, exclusive: 外税)", + "enum": [ + "", + "exclusive", + "inclusive" + ], + "type": "string" + }, + "deal_id": { + "description": "取引ID (invoice_statusがissuedの時のみIDが表示されます)", + "type": [ + "null", + "number" + ] + }, + "invoice_contents": { + "description": "請求内容", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "請求内容ID", + "type": "number" + }, + "order": { + "description": "順序", + "type": "number" + }, + "type": { + "description": "行の種類", + "enum": [ + "discount", + "normal", + "text" + ], + "type": "string" + }, + "qty": { + "description": "数量", + "type": "number" + }, + "unit": { + "description": "単位", + "type": [ + "null", + "string" + ] + }, + "unit_price": { + "description": "単価", + "type": "number" + }, + "amount": { + "description": "金額", + "type": "number" + }, + "vat": { + "description": "消費税額", + "type": "number" + }, + "reduced_vat": { + "description": "軽減税率税区分(true: 対象、false: 対象外)", + "type": "boolean" + }, + "description": { + "description": "備考", + "type": [ + "null", + "string" + ] + }, + "account_item_id": { + "description": "勘定科目ID", + "type": [ + "null", + "number" + ] + }, + "account_item_name": { + "description": "勘定科目名", + "type": [ + "null", + "string" + ] + }, + "tax_code": { + "description": "税区分コード", + "type": [ + "null", + "number" + ] + }, + "item_id": { + "description": "品目ID", + "type": [ + "null", + "number" + ] + }, + "item_name": { + "description": "品目", + "type": [ + "null", + "string" + ] + }, + "section_id": { + "description": "部門ID", + "type": [ + "null", + "number" + ] + }, + "section_name": { + "description": "部門", + "type": [ + "null", + "string" + ] + }, + "tag_ids": { + "type": "array", + "items": { + "type": "number" + } + }, + "tag_names": { + "type": "array", + "items": { + "type": "string" + } + }, + "segment_1_tag_id": { + "description": "セグメント1ID", + "type": [ + "null", + "number" + ] + }, + "segment_1_tag_name": { + "description": "セグメント1ID", + "type": [ + "null", + "string" + ] + }, + "segment_2_tag_id": { + "description": "セグメント2ID", + "type": [ + "null", + "number" + ] + }, + "segment_2_tag_name": { + "description": "セグメント2", + "type": [ + "null", + "string" + ] + }, + "segment_3_tag_id": { + "description": "セグメント3ID", + "type": [ + "null", + "number" + ] + }, + "segment_3_tag_name": { + "description": "セグメント3", + "type": [ + "null", + "string" + ] + } + }, + "required": [ + "account_item_id", + "account_item_name", + "amount", + "description", + "id", + "item_id", + "item_name", + "order", + "qty", + "reduced_vat", + "section_id", + "section_name", + "tag_ids", + "tag_names", + "tax_code", + "type", + "unit", + "unit_price", + "vat" + ] + } + }, + "total_amount_per_vat_rate": { + "type": "object", + "properties": { + "vat_5": { + "description": "税率5%の税込み金額合計", + "type": "number" + }, + "vat_8": { + "description": "税率8%の税込み金額合計", + "type": "number" + }, + "reduced_vat_8": { + "description": "軽減税率8%の税込み金額合計", + "type": "number" + }, + "vat_10": { + "description": "税率10%の税込み金額合計", + "type": "number" + } + }, + "required": [ + "reduced_vat_8", + "vat_10", + "vat_5", + "vat_8" + ] + } + }, + "required": [ + "company_id", + "company_name", + "id", + "invoice_layout", + "invoice_number", + "invoice_status", + "issue_date", + "partner_id", + "payment_type", + "posting_status", + "tax_entry_method", + "total_amount", + "total_amount_per_vat_rate" + ] + } + }, + "required": [ + "invoice" + ] + } + } + } + } + } + }, + "delete": { + "tags": [ + "api", + "1", + "invoices" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "number" + } + }, + { + "name": "company_id", + "in": "query", + "required": true, + "schema": { + "description": "事業所ID", + "type": "number" + } + } + ] + } + }, + "samples/freee/api/1/invoices": { + "get": { + "tags": [ + "api", + "1", + "invoices" + ], + "parameters": [ + { + "name": "company_id", + "in": "query", + "required": true, + "schema": { + "description": "事業所ID", + "type": "number" + } + }, + { + "name": "partner_id", + "in": "query", + "required": false, + "schema": { + "description": "取引先IDで絞込", + "type": "number" + } + }, + { + "name": "partner_code", + "in": "query", + "required": false, + "schema": { + "description": "取引先コードで絞込", + "type": "string" + } + }, + { + "name": "issue_date_start", + "in": "query", + "required": false, + "schema": { + "description": "請求日の開始日(yyyy-mm-dd)", + "type": "string" + } + }, + { + "name": "issue_date_end", + "in": "query", + "required": false, + "schema": { + "description": "請求日の終了日(yyyy-mm-dd)", + "type": "string" + } + }, + { + "name": "due_date_start", + "in": "query", + "required": false, + "schema": { + "description": "期日の開始日(yyyy-mm-dd)", + "type": "string" + } + }, + { + "name": "due_date_end", + "in": "query", + "required": false, + "schema": { + "description": "期日の終了日(yyyy-mm-dd)", + "type": "string" + } + }, + { + "name": "invoice_number", + "in": "query", + "required": false, + "schema": { + "description": "請求書番号", + "type": "string" + } + }, + { + "name": "description", + "in": "query", + "required": false, + "schema": { + "description": "概要", + "type": "string" + } + }, + { + "name": "invoice_status", + "in": "query", + "required": false, + "schema": { + "description": "請求書ステータス (draft: 下書き, applying: 申請中, remanded: 差し戻し, rejected: 却下, approved: 承認済み, issued: 発行済み, unsubmitted: 送付待ち)", + "enum": [ + "applying", + "approved", + "draft", + "issued", + "rejected", + "remanded", + "unsubmitted" + ], + "type": "string" + } + }, + { + "name": "payment_status", + "in": "query", + "required": false, + "schema": { + "description": "入金ステータス (unsettled: 入金待ち, settled: 入金済み)", + "enum": [ + "settled", + "unsettled" + ], + "type": "string" + } + }, + { + "name": "offset", + "in": "query", + "required": false, + "schema": { + "description": "取得レコードのオフセット (デフォルト: 0)", + "type": "number" + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "description": "取得レコードの件数 (デフォルト: 20, 最大: 100)", + "type": "number" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "invoices": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "請求書ID", + "type": "number" + }, + "company_id": { + "description": "事業所ID", + "type": "number" + }, + "issue_date": { + "description": "請求日 (yyyy-mm-dd)", + "type": "string" + }, + "partner_id": { + "description": "取引先ID", + "type": [ + "null", + "number" + ] + }, + "partner_code": { + "description": "取引先コード", + "type": [ + "null", + "string" + ] + }, + "invoice_number": { + "description": "請求書番号", + "type": "string" + }, + "title": { + "description": "タイトル", + "type": [ + "null", + "string" + ] + }, + "due_date": { + "description": "期日 (yyyy-mm-dd)", + "type": [ + "null", + "string" + ] + }, + "total_amount": { + "description": "合計金額", + "type": "number" + }, + "total_vat": { + "description": "合計金額", + "type": "number" + }, + "sub_total": { + "description": "小計", + "type": "number" + }, + "booking_date": { + "description": "売上計上日", + "type": [ + "null", + "string" + ] + }, + "description": { + "description": "概要", + "type": [ + "null", + "string" + ] + }, + "invoice_status": { + "description": "請求書ステータス (draft: 下書き, applying: 申請中, remanded: 差し戻し, rejected: 却下, approved: 承認済み, issued: 発行済み)", + "enum": [ + "applying", + "approved", + "draft", + "issued", + "rejected", + "remanded" + ], + "type": "string" + }, + "payment_status": { + "description": "入金ステータス (unsettled: 入金待ち, settled: 入金済み)", + "enum": [ + "", + "settled", + "unsettled" + ], + "type": "string" + }, + "payment_date": { + "description": "入金日", + "type": [ + "null", + "string" + ] + }, + "web_published_at": { + "description": "Web共有日時(最新)", + "type": [ + "null", + "string" + ] + }, + "web_downloaded_at": { + "description": "Web共有ダウンロード日時(最新)", + "type": [ + "null", + "string" + ] + }, + "web_confirmed_at": { + "description": "Web共有取引先確認日時(最新)", + "type": [ + "null", + "string" + ] + }, + "mail_sent_at": { + "description": "メール送信日時(最新)", + "type": [ + "null", + "string" + ] + }, + "posting_status": { + "description": "郵送ステータス(unrequested: リクエスト前, preview_registered: プレビュー登録, preview_failed: プレビュー登録失敗, ordered: 注文中, order_failed: 注文失敗, printing: 印刷中, canceled: キャンセル, posted: 投函済み)", + "enum": [ + "", + "canceled", + "order_failed", + "ordered", + "posted", + "preview_failed", + "preview_registered", + "printing", + "unrequested" + ], + "type": "string" + }, + "partner_name": { + "description": "取引先名", + "type": [ + "null", + "string" + ] + }, + "partner_long_name": { + "description": "取引先正式名称", + "type": [ + "null", + "string" + ] + }, + "partner_title": { + "description": "敬称(御中、様、(空白)の3つから選択)", + "type": [ + "null", + "string" + ] + }, + "partner_zipcode": { + "description": "郵便番号", + "type": [ + "null", + "string" + ] + }, + "partner_prefecture_code": { + "description": "都道府県コード(0:北海道、1:青森、2:岩手、3:宮城、4:秋田、5:山形、6:福島、7:茨城、8:栃木、9:群馬、10:埼玉、11:千葉、12:東京、13:神奈川、14:新潟、15:富山、16:石川、17:福井、18:山梨、19:長野、20:岐阜、21:静岡、22:愛知、23:三重、24:滋賀、25:京都、26:大阪、27:兵庫、28:奈良、29:和歌山、30:鳥取、31:島根、32:岡山、33:広島、34:山口、35:徳島、36:香川、37:愛媛、38:高知、39:福岡、40:佐賀、41:長崎、42:熊本、43:大分、44:宮崎、45:鹿児島、46:沖縄", + "type": [ + "null", + "number" + ] + }, + "partner_prefecture_name": { + "description": "都道府県", + "type": [ + "null", + "string" + ] + }, + "partner_address1": { + "description": "市区町村・番地", + "type": [ + "null", + "string" + ] + }, + "partner_address2": { + "description": "建物名・部屋番号など", + "type": [ + "null", + "string" + ] + }, + "partner_contact_info": { + "description": "取引先担当者名", + "type": [ + "null", + "string" + ] + }, + "company_name": { + "description": "事業所名", + "type": "string" + }, + "company_zipcode": { + "description": "郵便番号", + "type": [ + "null", + "string" + ] + }, + "company_prefecture_code": { + "description": "都道府県コード(0:北海道、1:青森、2:岩手、3:宮城、4:秋田、5:山形、6:福島、7:茨城、8:栃木、9:群馬、10:埼玉、11:千葉、12:東京、13:神奈川、14:新潟、15:富山、16:石川、17:福井、18:山梨、19:長野、20:岐阜、21:静岡、22:愛知、23:三重、24:滋賀、25:京都、26:大阪、27:兵庫、28:奈良、29:和歌山、30:鳥取、31:島根、32:岡山、33:広島、34:山口、35:徳島、36:香川、37:愛媛、38:高知、39:福岡、40:佐賀、41:長崎、42:熊本、43:大分、44:宮崎、45:鹿児島、46:沖縄", + "type": [ + "null", + "number" + ] + }, + "company_prefecture_name": { + "description": "都道府県", + "type": [ + "null", + "string" + ] + }, + "company_address1": { + "description": "市区町村・番地", + "type": [ + "null", + "string" + ] + }, + "company_address2": { + "description": "建物名・部屋番号など", + "type": [ + "null", + "string" + ] + }, + "company_contact_info": { + "description": "事業所担当者名", + "type": [ + "null", + "string" + ] + }, + "payment_type": { + "description": "支払方法 (振込: transfer, 引き落とし: direct_debit)", + "enum": [ + "", + "direct_debit", + "transfer" + ], + "type": "string" + }, + "payment_bank_info": { + "description": "支払口座", + "type": [ + "null", + "string" + ] + }, + "message": { + "description": "メッセージ", + "type": [ + "null", + "string" + ] + }, + "notes": { + "description": "備考", + "type": [ + "null", + "string" + ] + }, + "invoice_layout": { + "description": "レイアウト(default_classic: レイアウト1/クラシック, standard_classic: レイアウト2/クラシック, envelope_classic: 封筒1/クラシック, carried_forward_standard_classic: レイアウト3(繰越金額欄あり)/クラシック, carried_forward_envelope_classic: 封筒2(繰越金額欄あり)/クラシック, default_modern: レイアウト1/モダン, standard_modern: レイアウト2/モダン, envelope_modern: 封筒/モダン)", + "enum": [ + "carried_forward_envelope_classic", + "carried_forward_standard_classic", + "default_classic", + "default_modern", + "envelope_classic", + "envelope_modern", + "standard_classic", + "standard_modern" + ], + "type": "string" + }, + "tax_entry_method": { + "description": "請求書の消費税計算方法(inclusive: 内税, exclusive: 外税)", + "enum": [ + "", + "exclusive", + "inclusive" + ], + "type": "string" + }, + "deal_id": { + "description": "取引ID (invoice_statusがissuedの時のみIDが表示されます)", + "type": [ + "null", + "number" + ] + }, + "invoice_contents": { + "description": "請求内容", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "請求内容ID", + "type": "number" + }, + "order": { + "description": "順序", + "type": "number" + }, + "type": { + "description": "行の種類", + "enum": [ + "discount", + "normal", + "text" + ], + "type": "string" + }, + "qty": { + "description": "数量", + "type": "number" + }, + "unit": { + "description": "単位", + "type": [ + "null", + "string" + ] + }, + "unit_price": { + "description": "単価", + "type": "number" + }, + "amount": { + "description": "金額", + "type": "number" + }, + "vat": { + "description": "消費税額", + "type": "number" + }, + "reduced_vat": { + "description": "軽減税率税区分(true: 対象、false: 対象外)", + "type": "boolean" + }, + "description": { + "description": "備考", + "type": [ + "null", + "string" + ] + }, + "account_item_id": { + "description": "勘定科目ID", + "type": [ + "null", + "number" + ] + }, + "account_item_name": { + "description": "勘定科目名", + "type": [ + "null", + "string" + ] + }, + "tax_code": { + "description": "税区分コード", + "type": [ + "null", + "number" + ] + }, + "item_id": { + "description": "品目ID", + "type": [ + "null", + "number" + ] + }, + "item_name": { + "description": "品目", + "type": [ + "null", + "string" + ] + }, + "section_id": { + "description": "部門ID", + "type": [ + "null", + "number" + ] + }, + "section_name": { + "description": "部門", + "type": [ + "null", + "string" + ] + }, + "tag_ids": { + "type": "array", + "items": { + "type": "number" + } + }, + "tag_names": { + "type": "array", + "items": { + "type": "string" + } + }, + "segment_1_tag_id": { + "description": "セグメント1ID", + "type": [ + "null", + "number" + ] + }, + "segment_1_tag_name": { + "description": "セグメント1ID", + "type": [ + "null", + "string" + ] + }, + "segment_2_tag_id": { + "description": "セグメント2ID", + "type": [ + "null", + "number" + ] + }, + "segment_2_tag_name": { + "description": "セグメント2", + "type": [ + "null", + "string" + ] + }, + "segment_3_tag_id": { + "description": "セグメント3ID", + "type": [ + "null", + "number" + ] + }, + "segment_3_tag_name": { + "description": "セグメント3", + "type": [ + "null", + "string" + ] + } + }, + "required": [ + "account_item_id", + "account_item_name", + "amount", + "description", + "id", + "item_id", + "item_name", + "order", + "qty", + "reduced_vat", + "section_id", + "section_name", + "tag_ids", + "tag_names", + "tax_code", + "type", + "unit", + "unit_price", + "vat" + ] + } + }, + "total_amount_per_vat_rate": { + "type": "object", + "properties": { + "vat_5": { + "description": "税率5%の税込み金額合計", + "type": "number" + }, + "vat_8": { + "description": "税率8%の税込み金額合計", + "type": "number" + }, + "reduced_vat_8": { + "description": "軽減税率8%の税込み金額合計", + "type": "number" + }, + "vat_10": { + "description": "税率10%の税込み金額合計", + "type": "number" + } + }, + "required": [ + "reduced_vat_8", + "vat_10", + "vat_5", + "vat_8" + ] + } + }, + "required": [ + "company_id", + "company_name", + "id", + "invoice_layout", + "invoice_number", + "invoice_status", + "issue_date", + "partner_id", + "payment_type", + "posting_status", + "tax_entry_method", + "total_amount", + "total_amount_per_vat_rate" + ] + } + } + }, + "required": [ + "invoices" + ] + } + } + } + } + } + }, + "post": { + "tags": [ + "api", + "1", + "invoices" + ], + "parameters": [], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "description": "請求書の作成", + "type": "object", + "properties": { + "company_id": { + "description": "事業所ID", + "type": "number" + }, + "issue_date": { + "description": "請求日 (yyyy-mm-dd)", + "type": "string" + }, + "partner_id": { + "description": "取引先ID", + "type": [ + "null", + "number" + ] + }, + "partner_code": { + "description": "取引先コード", + "type": [ + "null", + "string" + ] + }, + "invoice_number": { + "description": "請求書番号 (デフォルト: 自動採番されます)", + "type": "string" + }, + "title": { + "description": "タイトル (デフォルト: 請求書)", + "type": "string" + }, + "due_date": { + "description": "期日 (yyyy-mm-dd)", + "type": "string" + }, + "booking_date": { + "description": "売上計上日", + "type": "string" + }, + "description": { + "description": "概要", + "type": "string" + }, + "invoice_status": { + "description": "請求書ステータス (draft: 下書き (デフォルト), issue: 発行(請求先ワークフローを利用している場合は指定できません))", + "enum": [ + "draft", + "issue" + ], + "type": "string" + }, + "partner_name": { + "description": "請求書に表示する取引先名(未指定の場合は取引先の名称をそのまま利用します)", + "type": [ + "null", + "string" + ] + }, + "partner_title": { + "description": "敬称(御中、様、(空白)の3つから選択)", + "type": [ + "null", + "string" + ] + }, + "partner_contact_info": { + "description": "取引先担当者名", + "type": [ + "null", + "string" + ] + }, + "partner_zipcode": { + "description": "取引先郵便番号 (デフォルトはpartner_idもしくははpartner_codeで指定された取引先設定情報が補完されます)", + "type": [ + "null", + "string" + ] + }, + "partner_prefecture_code": { + "description": "取引先都道府県コード(0:北海道、1:青森、2:岩手、3:宮城、4:秋田、5:山形、6:福島、7:茨城、8:栃木、9:群馬、10:埼玉、11:千葉、12:東京、13:神奈川、14:新潟、15:富山、16:石川、17:福井、18:山梨、19:長野、20:岐阜、21:静岡、22:愛知、23:三重、24:滋賀、25:京都、26:大阪、27:兵庫、28:奈良、29:和歌山、30:鳥取、31:島根、32:岡山、33:広島、34:山口、35:徳島、36:香川、37:愛媛、38:高知、39:福岡、40:佐賀、41:長崎、42:熊本、43:大分、44:宮崎、45:鹿児島、46:沖縄) (デフォルトはpartner_idもしくははpartner_codeで指定された取引先設定情報が補完されます)", + "type": [ + "null", + "number" + ] + }, + "partner_address1": { + "description": "取引先市区町村・番地 (デフォルトはpartner_idもしくははpartner_codeで指定された取引先設定情報が補完されます)", + "type": [ + "null", + "string" + ] + }, + "partner_address2": { + "description": "取引先建物名・部屋番号など (デフォルトはpartner_idもしくははpartner_codeで指定された取引先設定情報が補完されます)", + "type": [ + "null", + "string" + ] + }, + "company_name": { + "description": "事業所名 (デフォルトは事業所設定情報が補完されます)", + "type": "string" + }, + "company_zipcode": { + "description": "郵便番号 (デフォルトは事業所設定情報が補完されます)", + "type": "string" + }, + "company_prefecture_code": { + "description": "都道府県コード(0:北海道、1:青森、2:岩手、3:宮城、4:秋田、5:山形、6:福島、7:茨城、8:栃木、9:群馬、10:埼玉、11:千葉、12:東京、13:神奈川、14:新潟、15:富山、16:石川、17:福井、18:山梨、19:長野、20:岐阜、21:静岡、22:愛知、23:三重、24:滋賀、25:京都、26:大阪、27:兵庫、28:奈良、29:和歌山、30:鳥取、31:島根、32:岡山、33:広島、34:山口、35:徳島、36:香川、37:愛媛、38:高知、39:福岡、40:佐賀、41:長崎、42:熊本、43:大分、44:宮崎、45:鹿児島、46:沖縄) (デフォルトは事業所設定情報が補完されます)", + "type": "number" + }, + "company_address1": { + "description": "市区町村・番地 (デフォルトは事業所設定情報が補完されます)", + "type": "string" + }, + "company_address2": { + "description": "建物名・部屋番号など (デフォルトは事業所設定情報が補完されます)", + "type": "string" + }, + "company_contact_info": { + "description": "事業所担当者名 (デフォルトは事業所設定情報が補完されます)", + "type": "string" + }, + "payment_type": { + "description": "支払方法 (振込: transfer, 引き落とし: direct_debit)", + "enum": [ + "direct_debit", + "transfer" + ], + "type": "string" + }, + "payment_bank_info": { + "description": "支払口座", + "type": "string" + }, + "use_virtual_transfer_account": { + "description": "振込専用口座の利用(利用しない: not_use(デフォルト), 利用する: use)", + "enum": [ + "not_use", + "use" + ], + "type": "string" + }, + "message": { + "description": "メッセージ (デフォルト: 下記の通りご請求申し上げます。)", + "type": "string" + }, + "notes": { + "description": "備考", + "type": "string" + }, + "invoice_layout": { + "description": "レイアウト(default_classic: レイアウト1/クラシック (デフォルト), standard_classic: レイアウト2/クラシック, envelope_classic: 封筒1/クラシック, carried_forward_standard_classic: レイアウト3(繰越金額欄あり)/クラシック, carried_forward_envelope_classic: 封筒2(繰越金額欄あり)/クラシック, default_modern: レイアウト1/モダン, standard_modern: レイアウト2/モダン, envelope_modern: 封筒/モダン)", + "enum": [ + "carried_forward_envelope_classic", + "carried_forward_standard_classic", + "default_classic", + "default_modern", + "envelope_classic", + "envelope_modern", + "standard_classic", + "standard_modern" + ], + "type": "string" + }, + "tax_entry_method": { + "description": "請求書の消費税計算方法(inclusive: 内税表示, exclusive: 外税表示 (デフォルト))", + "enum": [ + "exclusive", + "inclusive" + ], + "type": "string" + }, + "invoice_contents": { + "description": "請求内容", + "type": "array", + "items": { + "type": "object", + "properties": { + "order": { + "description": "順序", + "type": "number" + }, + "type": { + "description": "行の種類", + "enum": [ + "discount", + "normal", + "text" + ], + "type": "string" + }, + "qty": { + "description": "数量", + "type": "number" + }, + "unit": { + "description": "単位", + "type": "string" + }, + "unit_price": { + "description": "単価 (tax_entry_method: inclusiveの場合は税込価格、tax_entry_method: exclusiveの場合は税抜価格となります)", + "type": "number" + }, + "vat": { + "description": "消費税額", + "type": [ + "null", + "number" + ] + }, + "description": { + "description": "備考", + "type": "string" + }, + "account_item_id": { + "description": "勘定科目ID", + "type": "number" + }, + "tax_code": { + "description": "税区分ID", + "type": "number" + }, + "item_id": { + "description": "品目ID", + "type": "number" + }, + "section_id": { + "description": "部門ID", + "type": "number" + }, + "tag_ids": { + "type": "array", + "items": { + "type": "number" + } + }, + "segment_1_tag_id": { + "description": "セグメント1ID", + "type": "number" + }, + "segment_2_tag_id": { + "description": "セグメント2ID", + "type": "number" + }, + "segment_3_tag_id": { + "description": "セグメント3ID", + "type": "number" + } + }, + "required": [ + "order", + "type" + ] + } + } + }, + "required": [ + "company_id" + ] + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "invoice": { + "type": "object", + "properties": { + "id": { + "description": "請求書ID", + "type": "number" + }, + "company_id": { + "description": "事業所ID", + "type": "number" + }, + "issue_date": { + "description": "請求日 (yyyy-mm-dd)", + "type": "string" + }, + "partner_id": { + "description": "取引先ID", + "type": [ + "null", + "number" + ] + }, + "partner_code": { + "description": "取引先コード", + "type": [ + "null", + "string" + ] + }, + "invoice_number": { + "description": "請求書番号", + "type": "string" + }, + "title": { + "description": "タイトル", + "type": [ + "null", + "string" + ] + }, + "due_date": { + "description": "期日 (yyyy-mm-dd)", + "type": [ + "null", + "string" + ] + }, + "total_amount": { + "description": "合計金額", + "type": "number" + }, + "total_vat": { + "description": "合計金額", + "type": "number" + }, + "sub_total": { + "description": "小計", + "type": "number" + }, + "booking_date": { + "description": "売上計上日", + "type": [ + "null", + "string" + ] + }, + "description": { + "description": "概要", + "type": [ + "null", + "string" + ] + }, + "invoice_status": { + "description": "請求書ステータス (draft: 下書き, applying: 申請中, remanded: 差し戻し, rejected: 却下, approved: 承認済み, issued: 発行済み)", + "enum": [ + "applying", + "approved", + "draft", + "issued", + "rejected", + "remanded" + ], + "type": "string" + }, + "payment_status": { + "description": "入金ステータス (unsettled: 入金待ち, settled: 入金済み)", + "enum": [ + "", + "settled", + "unsettled" + ], + "type": "string" + }, + "payment_date": { + "description": "入金日", + "type": [ + "null", + "string" + ] + }, + "web_published_at": { + "description": "Web共有日時(最新)", + "type": [ + "null", + "string" + ] + }, + "web_downloaded_at": { + "description": "Web共有ダウンロード日時(最新)", + "type": [ + "null", + "string" + ] + }, + "web_confirmed_at": { + "description": "Web共有取引先確認日時(最新)", + "type": [ + "null", + "string" + ] + }, + "mail_sent_at": { + "description": "メール送信日時(最新)", + "type": [ + "null", + "string" + ] + }, + "posting_status": { + "description": "郵送ステータス(unrequested: リクエスト前, preview_registered: プレビュー登録, preview_failed: プレビュー登録失敗, ordered: 注文中, order_failed: 注文失敗, printing: 印刷中, canceled: キャンセル, posted: 投函済み)", + "enum": [ + "", + "canceled", + "order_failed", + "ordered", + "posted", + "preview_failed", + "preview_registered", + "printing", + "unrequested" + ], + "type": "string" + }, + "partner_name": { + "description": "取引先名", + "type": [ + "null", + "string" + ] + }, + "partner_long_name": { + "description": "取引先正式名称", + "type": [ + "null", + "string" + ] + }, + "partner_title": { + "description": "敬称(御中、様、(空白)の3つから選択)", + "type": [ + "null", + "string" + ] + }, + "partner_zipcode": { + "description": "郵便番号", + "type": [ + "null", + "string" + ] + }, + "partner_prefecture_code": { + "description": "都道府県コード(0:北海道、1:青森、2:岩手、3:宮城、4:秋田、5:山形、6:福島、7:茨城、8:栃木、9:群馬、10:埼玉、11:千葉、12:東京、13:神奈川、14:新潟、15:富山、16:石川、17:福井、18:山梨、19:長野、20:岐阜、21:静岡、22:愛知、23:三重、24:滋賀、25:京都、26:大阪、27:兵庫、28:奈良、29:和歌山、30:鳥取、31:島根、32:岡山、33:広島、34:山口、35:徳島、36:香川、37:愛媛、38:高知、39:福岡、40:佐賀、41:長崎、42:熊本、43:大分、44:宮崎、45:鹿児島、46:沖縄", + "type": [ + "null", + "number" + ] + }, + "partner_prefecture_name": { + "description": "都道府県", + "type": [ + "null", + "string" + ] + }, + "partner_address1": { + "description": "市区町村・番地", + "type": [ + "null", + "string" + ] + }, + "partner_address2": { + "description": "建物名・部屋番号など", + "type": [ + "null", + "string" + ] + }, + "partner_contact_info": { + "description": "取引先担当者名", + "type": [ + "null", + "string" + ] + }, + "company_name": { + "description": "事業所名", + "type": "string" + }, + "company_zipcode": { + "description": "郵便番号", + "type": [ + "null", + "string" + ] + }, + "company_prefecture_code": { + "description": "都道府県コード(0:北海道、1:青森、2:岩手、3:宮城、4:秋田、5:山形、6:福島、7:茨城、8:栃木、9:群馬、10:埼玉、11:千葉、12:東京、13:神奈川、14:新潟、15:富山、16:石川、17:福井、18:山梨、19:長野、20:岐阜、21:静岡、22:愛知、23:三重、24:滋賀、25:京都、26:大阪、27:兵庫、28:奈良、29:和歌山、30:鳥取、31:島根、32:岡山、33:広島、34:山口、35:徳島、36:香川、37:愛媛、38:高知、39:福岡、40:佐賀、41:長崎、42:熊本、43:大分、44:宮崎、45:鹿児島、46:沖縄", + "type": [ + "null", + "number" + ] + }, + "company_prefecture_name": { + "description": "都道府県", + "type": [ + "null", + "string" + ] + }, + "company_address1": { + "description": "市区町村・番地", + "type": [ + "null", + "string" + ] + }, + "company_address2": { + "description": "建物名・部屋番号など", + "type": [ + "null", + "string" + ] + }, + "company_contact_info": { + "description": "事業所担当者名", + "type": [ + "null", + "string" + ] + }, + "payment_type": { + "description": "支払方法 (振込: transfer, 引き落とし: direct_debit)", + "enum": [ + "", + "direct_debit", + "transfer" + ], + "type": "string" + }, + "payment_bank_info": { + "description": "支払口座", + "type": [ + "null", + "string" + ] + }, + "message": { + "description": "メッセージ", + "type": [ + "null", + "string" + ] + }, + "notes": { + "description": "備考", + "type": [ + "null", + "string" + ] + }, + "invoice_layout": { + "description": "レイアウト(default_classic: レイアウト1/クラシック, standard_classic: レイアウト2/クラシック, envelope_classic: 封筒1/クラシック, carried_forward_standard_classic: レイアウト3(繰越金額欄あり)/クラシック, carried_forward_envelope_classic: 封筒2(繰越金額欄あり)/クラシック, default_modern: レイアウト1/モダン, standard_modern: レイアウト2/モダン, envelope_modern: 封筒/モダン)", + "enum": [ + "carried_forward_envelope_classic", + "carried_forward_standard_classic", + "default_classic", + "default_modern", + "envelope_classic", + "envelope_modern", + "standard_classic", + "standard_modern" + ], + "type": "string" + }, + "tax_entry_method": { + "description": "請求書の消費税計算方法(inclusive: 内税, exclusive: 外税)", + "enum": [ + "", + "exclusive", + "inclusive" + ], + "type": "string" + }, + "deal_id": { + "description": "取引ID (invoice_statusがissuedの時のみIDが表示されます)", + "type": [ + "null", + "number" + ] + }, + "invoice_contents": { + "description": "請求内容", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "請求内容ID", + "type": "number" + }, + "order": { + "description": "順序", + "type": "number" + }, + "type": { + "description": "行の種類", + "enum": [ + "discount", + "normal", + "text" + ], + "type": "string" + }, + "qty": { + "description": "数量", + "type": "number" + }, + "unit": { + "description": "単位", + "type": [ + "null", + "string" + ] + }, + "unit_price": { + "description": "単価", + "type": "number" + }, + "amount": { + "description": "金額", + "type": "number" + }, + "vat": { + "description": "消費税額", + "type": "number" + }, + "reduced_vat": { + "description": "軽減税率税区分(true: 対象、false: 対象外)", + "type": "boolean" + }, + "description": { + "description": "備考", + "type": [ + "null", + "string" + ] + }, + "account_item_id": { + "description": "勘定科目ID", + "type": [ + "null", + "number" + ] + }, + "account_item_name": { + "description": "勘定科目名", + "type": [ + "null", + "string" + ] + }, + "tax_code": { + "description": "税区分コード", + "type": [ + "null", + "number" + ] + }, + "item_id": { + "description": "品目ID", + "type": [ + "null", + "number" + ] + }, + "item_name": { + "description": "品目", + "type": [ + "null", + "string" + ] + }, + "section_id": { + "description": "部門ID", + "type": [ + "null", + "number" + ] + }, + "section_name": { + "description": "部門", + "type": [ + "null", + "string" + ] + }, + "tag_ids": { + "type": "array", + "items": { + "type": "number" + } + }, + "tag_names": { + "type": "array", + "items": { + "type": "string" + } + }, + "segment_1_tag_id": { + "description": "セグメント1ID", + "type": [ + "null", + "number" + ] + }, + "segment_1_tag_name": { + "description": "セグメント1ID", + "type": [ + "null", + "string" + ] + }, + "segment_2_tag_id": { + "description": "セグメント2ID", + "type": [ + "null", + "number" + ] + }, + "segment_2_tag_name": { + "description": "セグメント2", + "type": [ + "null", + "string" + ] + }, + "segment_3_tag_id": { + "description": "セグメント3ID", + "type": [ + "null", + "number" + ] + }, + "segment_3_tag_name": { + "description": "セグメント3", + "type": [ + "null", + "string" + ] + } + }, + "required": [ + "account_item_id", + "account_item_name", + "amount", + "description", + "id", + "item_id", + "item_name", + "order", + "qty", + "reduced_vat", + "section_id", + "section_name", + "tag_ids", + "tag_names", + "tax_code", + "type", + "unit", + "unit_price", + "vat" + ] + } + }, + "total_amount_per_vat_rate": { + "type": "object", + "properties": { + "vat_5": { + "description": "税率5%の税込み金額合計", + "type": "number" + }, + "vat_8": { + "description": "税率8%の税込み金額合計", + "type": "number" + }, + "reduced_vat_8": { + "description": "軽減税率8%の税込み金額合計", + "type": "number" + }, + "vat_10": { + "description": "税率10%の税込み金額合計", + "type": "number" + } + }, + "required": [ + "reduced_vat_8", + "vat_10", + "vat_5", + "vat_8" + ] + } + }, + "required": [ + "company_id", + "company_name", + "id", + "invoice_layout", + "invoice_number", + "invoice_status", + "issue_date", + "partner_id", + "payment_type", + "posting_status", + "tax_entry_method", + "total_amount", + "total_amount_per_vat_rate" + ] + } + }, + "required": [ + "invoice" + ] + } + } + } + } + } + } + }, + "samples/freee/api/1/items/{id}": { + "get": { + "tags": [ + "api", + "1", + "items" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "number" + } + }, + { + "name": "company_id", + "in": "query", + "required": true, + "schema": { + "description": "事業所ID", + "type": "number" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "item": { + "type": "object", + "properties": { + "id": { + "description": "品目ID", + "type": "number" + }, + "company_id": { + "description": "事業所ID", + "type": "number" + }, + "name": { + "description": "品目名 (30文字以内)", + "type": "string" + }, + "shortcut1": { + "description": "ショートカット1 (20文字以内)", + "type": [ + "null", + "string" + ] + }, + "shortcut2": { + "description": "ショートカット2 (20文字以内)", + "type": [ + "null", + "string" + ] + } + }, + "required": [ + "company_id", + "id", + "name" + ] + } + }, + "required": [ + "item" + ] + } + } + } + } + } + }, + "put": { + "tags": [ + "api", + "1", + "items" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "number" + } + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "description": "品目の更新", + "type": "object", + "properties": { + "company_id": { + "description": "事業所ID", + "type": "number" + }, + "name": { + "description": "品目名 (30文字以内)", + "type": "string" + }, + "shortcut1": { + "description": "ショートカット1 (20文字以内)", + "type": "string" + }, + "shortcut2": { + "description": "ショートカット2 (20文字以内)", + "type": "string" + } + }, + "required": [ + "company_id", + "name" + ] + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "item": { + "type": "object", + "properties": { + "id": { + "description": "品目ID", + "type": "number" + }, + "company_id": { + "description": "事業所ID", + "type": "number" + }, + "name": { + "description": "品目名 (30文字以内)", + "type": "string" + }, + "shortcut1": { + "description": "ショートカット1 (20文字以内)", + "type": [ + "null", + "string" + ] + }, + "shortcut2": { + "description": "ショートカット2 (20文字以内)", + "type": [ + "null", + "string" + ] + } + }, + "required": [ + "company_id", + "id", + "name" + ] + } + }, + "required": [ + "item" + ] + } + } + } + } + } + }, + "delete": { + "tags": [ + "api", + "1", + "items" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "number" + } + }, + { + "name": "company_id", + "in": "query", + "required": true, + "schema": { + "description": "事業所ID", + "type": "number" + } + } + ] + } + }, + "samples/freee/api/1/items": { + "get": { + "tags": [ + "api", + "1", + "items" + ], + "parameters": [ + { + "name": "company_id", + "in": "query", + "required": true, + "schema": { + "description": "事業所ID", + "type": "number" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "品目ID", + "type": "number" + }, + "company_id": { + "description": "事業所ID", + "type": "number" + }, + "name": { + "description": "品目名 (30文字以内)", + "type": "string" + }, + "shortcut1": { + "description": "ショートカット1 (20文字以内)", + "type": [ + "null", + "string" + ] + }, + "shortcut2": { + "description": "ショートカット2 (20文字以内)", + "type": [ + "null", + "string" + ] + } + }, + "required": [ + "company_id", + "id", + "name" + ] + } + } + }, + "required": [ + "items" + ] + } + } + } + } + } + }, + "post": { + "tags": [ + "api", + "1", + "items" + ], + "parameters": [], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "description": "品目の作成", + "type": "object", + "properties": { + "company_id": { + "description": "事業所ID", + "type": "number" + }, + "name": { + "description": "品目名 (30文字以内)", + "type": "string" + }, + "shortcut1": { + "description": "ショートカット1 (20文字以内)", + "type": "string" + }, + "shortcut2": { + "description": "ショートカット2 (20文字以内)", + "type": "string" + } + }, + "required": [ + "company_id", + "name" + ] + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "item": { + "type": "object", + "properties": { + "id": { + "description": "品目ID", + "type": "number" + }, + "company_id": { + "description": "事業所ID", + "type": "number" + }, + "name": { + "description": "品目名 (30文字以内)", + "type": "string" + }, + "shortcut1": { + "description": "ショートカット1 (20文字以内)", + "type": [ + "null", + "string" + ] + }, + "shortcut2": { + "description": "ショートカット2 (20文字以内)", + "type": [ + "null", + "string" + ] + } + }, + "required": [ + "company_id", + "id", + "name" + ] + } + }, + "required": [ + "item" + ] + } + } + } + } + } + } + }, + "samples/freee/api/1/journals": { + "get": { + "tags": [ + "api", + "1", + "journals" + ], + "parameters": [ + { + "name": "download_type", + "in": "query", + "required": true, + "schema": { + "description": "ダウンロード形式", + "enum": [ + "csv", + "generic", + "pdf", + "yayoi" + ], + "type": "string" + } + }, + { + "name": "company_id", + "in": "query", + "required": true, + "schema": { + "description": "事業所ID", + "type": "number" + } + }, + { + "name": "visible_tags", + "in": "query", + "required": false, + "schema": { + "description": "補助科目やコメントとして出力する項目", + "type": "array", + "items": { + "enum": [ + "all", + "description", + "item", + "partner", + "section", + "tag", + "wallet_txn_description" + ], + "type": "string" + } + } + }, + { + "name": "start_date", + "in": "query", + "required": false, + "schema": { + "description": "取得開始日 (yyyy-mm-dd)", + "type": "string" + } + }, + { + "name": "end_date", + "in": "query", + "required": false, + "schema": { + "description": "取得終了日 (yyyy-mm-dd)", + "type": "string" + } + } + ], + "responses": { + "202": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "journals": { + "type": "object", + "properties": { + "id": { + "description": "受け付けID", + "type": "number" + }, + "messages": { + "description": "受け付けメッセージ", + "type": "string" + }, + "company_id": { + "description": "事業所ID", + "type": "number" + }, + "download_type": { + "description": "ダウンロード形式", + "enum": [ + "csv", + "generic", + "pdf" + ], + "type": "string" + }, + "start_date": { + "description": "取得開始日 (yyyy-mm-dd)", + "type": "string" + }, + "end_date": { + "description": "取得終了日 (yyyy-mm-dd)", + "type": "string" + }, + "visible_tags": { + "type": "array", + "items": { + "enum": [ + "all", + "description", + "item", + "partner", + "section", + "tag", + "wallet_txn_description" + ], + "type": "string" + } + }, + "status_url": { + "description": "ステータス確認用URL", + "type": "string" + } + }, + "required": [ + "company_id", + "id" + ] + } + }, + "required": [ + "journals" + ] + } + } + } + } + } + } + }, + "samples/freee/api/1/journals/reports/{id}/download": { + "get": { + "tags": [ + "api", + "1", + "journals", + "reports" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "number" + } + }, + { + "name": "company_id", + "in": "query", + "required": true, + "schema": { + "description": "事業所ID", + "type": "number" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Blob" + } + } + } + } + } + } + }, + "samples/freee/api/1/journals/reports/{id}/status": { + "get": { + "tags": [ + "api", + "1", + "journals", + "reports" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "number" + } + }, + { + "name": "company_id", + "in": "query", + "required": true, + "schema": { + "description": "事業所ID", + "type": "number" + } + }, + { + "name": "visible_tags", + "in": "query", + "required": false, + "schema": { + "description": "補助科目やコメントとして出力する項目", + "type": "array", + "items": { + "enum": [ + "all", + "description", + "item", + "partner", + "section", + "tag", + "wallet_txn_description" + ], + "type": "string" + } + } + }, + { + "name": "start_date", + "in": "query", + "required": false, + "schema": { + "description": "取得開始日 (yyyy-mm-dd)", + "type": "string" + } + }, + { + "name": "end_date", + "in": "query", + "required": false, + "schema": { + "description": "取得終了日 (yyyy-mm-dd)", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "journals": { + "type": "object", + "properties": { + "id": { + "description": "受け付けID", + "type": "number" + }, + "company_id": { + "description": "事業所ID", + "type": "number" + }, + "download_type": { + "description": "ダウンロード形式", + "enum": [ + "csv", + "generic", + "pdf" + ], + "type": "string" + }, + "status": { + "description": "事業所ID", + "enum": [ + "enqueued", + "failed", + "uploaded", + "working" + ], + "type": "string" + }, + "start_date": { + "description": "取得開始日 (yyyy-mm-dd)", + "type": "string" + }, + "end_date": { + "description": "取得終了日 (yyyy-mm-dd)", + "type": "string" + }, + "visible_tags": { + "type": "array", + "items": { + "enum": [ + "all", + "description", + "item", + "partner", + "section", + "tag", + "wallet_txn_description" + ], + "type": "string" + } + }, + "download_url": { + "description": "ダウンロードURL", + "type": "string" + } + }, + "required": [ + "company_id", + "download_type", + "end_date", + "id", + "start_date", + "status", + "visible_tags" + ] + } + }, + "required": [ + "journals" + ] + } + } + } + } + } + } + }, + "samples/freee/api/1/manual_journals/{id}": { + "get": { + "tags": [ + "api", + "1", + "manual_journals" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "number" + } + }, + { + "name": "company_id", + "in": "query", + "required": true, + "schema": { + "description": "事業所ID", + "type": "number" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "manual_journal": { + "type": "object", + "properties": { + "id": { + "description": "振替伝票ID", + "type": "number" + }, + "company_id": { + "description": "事業所ID", + "type": "number" + }, + "issue_date": { + "description": "発生日 (yyyy-mm-dd)", + "type": "string" + }, + "adjustment": { + "description": "決算整理仕訳フラグ(falseまたは未指定の場合: 日常仕訳)", + "type": "boolean" + }, + "txn_number": { + "description": "仕訳番号", + "type": [ + "null", + "string" + ] + }, + "details": { + "description": "貸借行一覧(配列): 貸借合わせて100行まで登録できます。", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "貸借行ID", + "type": "number" + }, + "entry_side": { + "description": "貸借(貸方: credit, 借方: debit)", + "enum": [ + "credit", + "debit" + ], + "type": "string" + }, + "account_item_id": { + "description": "勘定科目ID", + "type": "number" + }, + "tax_code": { + "description": "税区分ID", + "type": "number" + }, + "partner_id": { + "description": "取引先ID", + "type": [ + "null", + "number" + ] + }, + "partner_name": { + "description": "取引先名", + "type": [ + "null", + "string" + ] + }, + "partner_code": { + "description": "取引先コード", + "type": [ + "null", + "string" + ] + }, + "partner_long_name": { + "description": "正式名称(255文字以内)", + "type": [ + "null", + "string" + ] + }, + "item_id": { + "description": "品目ID", + "type": [ + "null", + "number" + ] + }, + "item_name": { + "description": "品目", + "type": [ + "null", + "string" + ] + }, + "section_id": { + "description": "部門ID", + "type": [ + "null", + "number" + ] + }, + "section_name": { + "description": "部門", + "type": [ + "null", + "string" + ] + }, + "tag_ids": { + "type": "array", + "items": { + "type": "number" + } + }, + "tag_names": { + "type": "array", + "items": { + "type": "string" + } + }, + "segment_1_tag_id": { + "description": "セグメント1ID", + "type": "number" + }, + "segment_1_tag_name": { + "description": "セグメント1ID", + "type": "number" + }, + "segment_2_tag_id": { + "description": "セグメント2ID", + "type": "number" + }, + "segment_2_tag_name": { + "description": "セグメント2", + "type": "number" + }, + "segment_3_tag_id": { + "description": "セグメント3ID", + "type": "number" + }, + "segment_3_tag_name": { + "description": "セグメント3", + "type": "number" + }, + "amount": { + "description": "金額(税込で指定してください)", + "type": "number" + }, + "vat": { + "description": "消費税額(指定しない場合は自動で計算されます)", + "type": "number" + }, + "description": { + "description": "備考", + "type": "string" + } + }, + "required": [ + "account_item_id", + "amount", + "description", + "entry_side", + "id", + "item_id", + "item_name", + "partner_id", + "partner_long_name", + "partner_name", + "section_id", + "section_name", + "tag_ids", + "tag_names", + "tax_code", + "vat" + ] + } + } + }, + "required": [ + "adjustment", + "company_id", + "details", + "id", + "issue_date", + "txn_number" + ] + } + }, + "required": [ + "manual_journal" + ] + } + } + } + } + } + }, + "put": { + "tags": [ + "api", + "1", + "manual_journals" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "number" + } + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "description": "振替伝票の更新", + "type": "object", + "properties": { + "company_id": { + "description": "事業所ID", + "type": "number" + }, + "issue_date": { + "description": "発生日 (yyyy-mm-dd)", + "type": "string" + }, + "adjustment": { + "description": "決算整理仕訳フラグ(falseまたは未指定の場合: 日常仕訳)", + "type": "boolean" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "貸借行ID: 既存貸借行を更新または削除する場合に指定します。IDを指定しない貸借行は、新規行として扱われ追加されます。", + "type": "number" + }, + "entry_side": { + "description": "貸借(貸方: credit, 借方: debit)", + "enum": [ + "credit", + "debit" + ], + "type": "string" + }, + "tax_code": { + "description": "税区分コード", + "type": "number" + }, + "account_item_id": { + "description": "勘定科目ID", + "type": "number" + }, + "amount": { + "description": "取引金額(税込で指定してください)", + "type": "number" + }, + "vat": { + "description": "消費税額(指定しない場合は自動で計算されます)", + "type": "number" + }, + "partner_id": { + "description": "取引先ID", + "type": "number" + }, + "partner_code": { + "description": "取引先コード", + "type": "string" + }, + "item_id": { + "description": "品目ID", + "type": "number" + }, + "section_id": { + "description": "部門ID", + "type": "number" + }, + "tag_ids": { + "description": "メモタグID", + "type": "array", + "items": { + "type": "number" + } + }, + "segment_1_tag_id": { + "description": "セグメント1ID", + "type": "number" + }, + "segment_2_tag_id": { + "description": "セグメント2ID", + "type": "number" + }, + "segment_3_tag_id": { + "description": "セグメント3ID", + "type": "number" + }, + "description": { + "description": "備考", + "type": "string" + } + }, + "required": [ + "account_item_id", + "amount", + "entry_side", + "tax_code" + ] + } + } + }, + "required": [ + "company_id", + "details", + "issue_date" + ] + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "manual_journal": { + "type": "object", + "properties": { + "id": { + "description": "振替伝票ID", + "type": "number" + }, + "company_id": { + "description": "事業所ID", + "type": "number" + }, + "issue_date": { + "description": "発生日 (yyyy-mm-dd)", + "type": "string" + }, + "adjustment": { + "description": "決算整理仕訳フラグ(falseまたは未指定の場合: 日常仕訳)", + "type": "boolean" + }, + "txn_number": { + "description": "仕訳番号", + "type": [ + "null", + "string" + ] + }, + "details": { + "description": "貸借行一覧(配列): 貸借合わせて100行まで登録できます。", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "貸借行ID", + "type": "number" + }, + "entry_side": { + "description": "貸借(貸方: credit, 借方: debit)", + "enum": [ + "credit", + "debit" + ], + "type": "string" + }, + "account_item_id": { + "description": "勘定科目ID", + "type": "number" + }, + "tax_code": { + "description": "税区分ID", + "type": "number" + }, + "partner_id": { + "description": "取引先ID", + "type": [ + "null", + "number" + ] + }, + "partner_name": { + "description": "取引先名", + "type": [ + "null", + "string" + ] + }, + "partner_code": { + "description": "取引先コード", + "type": [ + "null", + "string" + ] + }, + "partner_long_name": { + "description": "正式名称(255文字以内)", + "type": [ + "null", + "string" + ] + }, + "item_id": { + "description": "品目ID", + "type": [ + "null", + "number" + ] + }, + "item_name": { + "description": "品目", + "type": [ + "null", + "string" + ] + }, + "section_id": { + "description": "部門ID", + "type": [ + "null", + "number" + ] + }, + "section_name": { + "description": "部門", + "type": [ + "null", + "string" + ] + }, + "tag_ids": { + "type": "array", + "items": { + "type": "number" + } + }, + "tag_names": { + "type": "array", + "items": { + "type": "string" + } + }, + "segment_1_tag_id": { + "description": "セグメント1ID", + "type": "number" + }, + "segment_1_tag_name": { + "description": "セグメント1ID", + "type": "number" + }, + "segment_2_tag_id": { + "description": "セグメント2ID", + "type": "number" + }, + "segment_2_tag_name": { + "description": "セグメント2", + "type": "number" + }, + "segment_3_tag_id": { + "description": "セグメント3ID", + "type": "number" + }, + "segment_3_tag_name": { + "description": "セグメント3", + "type": "number" + }, + "amount": { + "description": "金額(税込で指定してください)", + "type": "number" + }, + "vat": { + "description": "消費税額(指定しない場合は自動で計算されます)", + "type": "number" + }, + "description": { + "description": "備考", + "type": "string" + } + }, + "required": [ + "account_item_id", + "amount", + "description", + "entry_side", + "id", + "item_id", + "item_name", + "partner_id", + "partner_long_name", + "partner_name", + "section_id", + "section_name", + "tag_ids", + "tag_names", + "tax_code", + "vat" + ] + } + } + }, + "required": [ + "adjustment", + "company_id", + "details", + "id", + "issue_date", + "txn_number" + ] + } + }, + "required": [ + "manual_journal" + ] + } + } + } + } + } + }, + "delete": { + "tags": [ + "api", + "1", + "manual_journals" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "number" + } + }, + { + "name": "company_id", + "in": "query", + "required": true, + "schema": { + "description": "事業所ID", + "type": "number" + } + } + ] + } + }, + "samples/freee/api/1/manual_journals": { + "get": { + "tags": [ + "api", + "1", + "manual_journals" + ], + "parameters": [ + { + "name": "company_id", + "in": "query", + "required": true, + "schema": { + "description": "事業所ID", + "type": "number" + } + }, + { + "name": "start_issue_date", + "in": "query", + "required": false, + "schema": { + "description": "発生日で絞込:開始日(yyyy-mm-dd)", + "type": "string" + } + }, + { + "name": "end_issue_date", + "in": "query", + "required": false, + "schema": { + "description": "発生日で絞込:終了日(yyyy-mm-dd)", + "type": "string" + } + }, + { + "name": "entry_side", + "in": "query", + "required": false, + "schema": { + "description": "貸借で絞込 (貸方: credit, 借方: debit)", + "enum": [ + "credit", + "debit" + ], + "type": "string" + } + }, + { + "name": "account_item_id", + "in": "query", + "required": false, + "schema": { + "description": "勘定科目IDで絞込", + "type": "number" + } + }, + { + "name": "min_amount", + "in": "query", + "required": false, + "schema": { + "description": "金額で絞込:下限", + "type": "number" + } + }, + { + "name": "max_amount", + "in": "query", + "required": false, + "schema": { + "description": "金額で絞込:上限", + "type": "number" + } + }, + { + "name": "partner_id", + "in": "query", + "required": false, + "schema": { + "description": "取引先IDで絞込(0を指定すると、取引先が未選択の貸借行を絞り込めます)", + "type": "number" + } + }, + { + "name": "partner_code", + "in": "query", + "required": false, + "schema": { + "description": "取引先コードで絞込", + "type": "string" + } + }, + { + "name": "item_id", + "in": "query", + "required": false, + "schema": { + "description": "品目IDで絞込(0を指定すると、品目が未選択の貸借行を絞り込めます)", + "type": "number" + } + }, + { + "name": "section_id", + "in": "query", + "required": false, + "schema": { + "description": "部門IDで絞込(0を指定すると、部門が未選択の貸借行を絞り込めます)", + "type": "number" + } + }, + { + "name": "segment_1_tag_id", + "in": "query", + "required": false, + "schema": { + "description": "セグメント1IDで絞り込み(0を指定すると、セグメント1が未選択の貸借行を絞り込めます)", + "type": "number" + } + }, + { + "name": "segment_2_tag_id", + "in": "query", + "required": false, + "schema": { + "description": "セグメント2IDで絞り込み(0を指定すると、セグメント2が未選択の貸借行を絞り込めます)", + "type": "number" + } + }, + { + "name": "segment_3_tag_id", + "in": "query", + "required": false, + "schema": { + "description": "セグメント3IDで絞り込み(0を指定すると、セグメント3が未選択の貸借行を絞り込めます)", + "type": "number" + } + }, + { + "name": "comment_status", + "in": "query", + "required": false, + "schema": { + "description": "コメント状態で絞込(自分宛のコメント: posted_with_mention, 自分宛のコメント-未解決: raised_with_mention, 自分宛のコメント-解決済: resolved_with_mention, コメントあり: posted, 未解決: raised, 解決済: resolved, コメントなし: none)", + "enum": [ + "none", + "posted", + "posted_with_mention", + "raised", + "raised_with_mention", + "resolved", + "resolved_with_mention" + ], + "type": "string" + } + }, + { + "name": "comment_important", + "in": "query", + "required": false, + "schema": { + "description": "重要コメント付きの振替伝票を絞込", + "type": "boolean" + } + }, + { + "name": "adjustment", + "in": "query", + "required": false, + "schema": { + "description": "決算整理仕訳で絞込(決算整理仕訳のみ: only, 決算整理仕訳以外: without)", + "enum": [ + "only", + "without" + ], + "type": "string" + } + }, + { + "name": "txn_number", + "in": "query", + "required": false, + "schema": { + "description": "仕訳番号で絞込(事業所の仕訳番号形式が有効な場合のみ)", + "type": "string" + } + }, + { + "name": "offset", + "in": "query", + "required": false, + "schema": { + "description": "取得レコードのオフセット (デフォルト: 0)", + "type": "number" + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "description": "取得レコードの件数 (デフォルト: 20, 最小: 1, 最大: 500)", + "type": "number" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "manual_journals": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "振替伝票ID", + "type": "number" + }, + "company_id": { + "description": "事業所ID", + "type": "number" + }, + "issue_date": { + "description": "発生日 (yyyy-mm-dd)", + "type": "string" + }, + "adjustment": { + "description": "決算整理仕訳フラグ(falseまたは未指定の場合: 日常仕訳)", + "type": "boolean" + }, + "txn_number": { + "description": "仕訳番号", + "type": [ + "null", + "string" + ] + }, + "details": { + "description": "貸借行一覧(配列): 貸借合わせて100行まで登録できます。", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "貸借行ID", + "type": "number" + }, + "entry_side": { + "description": "貸借(貸方: credit, 借方: debit)", + "enum": [ + "credit", + "debit" + ], + "type": "string" + }, + "account_item_id": { + "description": "勘定科目ID", + "type": "number" + }, + "tax_code": { + "description": "税区分ID", + "type": "number" + }, + "partner_id": { + "description": "取引先ID", + "type": [ + "null", + "number" + ] + }, + "partner_name": { + "description": "取引先名", + "type": [ + "null", + "string" + ] + }, + "partner_code": { + "description": "取引先コード", + "type": [ + "null", + "string" + ] + }, + "partner_long_name": { + "description": "正式名称(255文字以内)", + "type": [ + "null", + "string" + ] + }, + "item_id": { + "description": "品目ID", + "type": [ + "null", + "number" + ] + }, + "item_name": { + "description": "品目", + "type": [ + "null", + "string" + ] + }, + "section_id": { + "description": "部門ID", + "type": [ + "null", + "number" + ] + }, + "section_name": { + "description": "部門", + "type": [ + "null", + "string" + ] + }, + "tag_ids": { + "type": "array", + "items": { + "type": "number" + } + }, + "tag_names": { + "type": "array", + "items": { + "type": "string" + } + }, + "segment_1_tag_id": { + "description": "セグメント1ID", + "type": "number" + }, + "segment_1_tag_name": { + "description": "セグメント1ID", + "type": "number" + }, + "segment_2_tag_id": { + "description": "セグメント2ID", + "type": "number" + }, + "segment_2_tag_name": { + "description": "セグメント2", + "type": "number" + }, + "segment_3_tag_id": { + "description": "セグメント3ID", + "type": "number" + }, + "segment_3_tag_name": { + "description": "セグメント3", + "type": "number" + }, + "amount": { + "description": "金額(税込で指定してください)", + "type": "number" + }, + "vat": { + "description": "消費税額(指定しない場合は自動で計算されます)", + "type": "number" + }, + "description": { + "description": "備考", + "type": "string" + } + }, + "required": [ + "account_item_id", + "amount", + "description", + "entry_side", + "id", + "item_id", + "item_name", + "partner_id", + "partner_long_name", + "partner_name", + "section_id", + "section_name", + "tag_ids", + "tag_names", + "tax_code", + "vat" + ] + } + } + }, + "required": [ + "adjustment", + "company_id", + "details", + "id", + "issue_date", + "txn_number" + ] + } + } + }, + "required": [ + "manual_journals" + ] + } + } + } + } + } + }, + "post": { + "tags": [ + "api", + "1", + "manual_journals" + ], + "parameters": [], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "description": "振替伝票の作成", + "type": "object", + "properties": { + "company_id": { + "description": "事業所ID", + "type": "number" + }, + "issue_date": { + "description": "発生日 (yyyy-mm-dd)", + "type": "string" + }, + "adjustment": { + "description": "決算整理仕訳フラグ(falseまたは未指定の場合: 日常仕訳)", + "type": "boolean" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "properties": { + "entry_side": { + "description": "貸借(貸方: credit, 借方: debit)", + "enum": [ + "credit", + "debit" + ], + "type": "string" + }, + "tax_code": { + "description": "税区分コード", + "type": "number" + }, + "account_item_id": { + "description": "勘定科目ID", + "type": "number" + }, + "amount": { + "description": "取引金額(税込で指定してください)", + "type": "number" + }, + "vat": { + "description": "消費税額(指定しない場合は自動で計算されます)", + "type": "number" + }, + "partner_id": { + "description": "取引先ID", + "type": "number" + }, + "partner_code": { + "description": "取引先コード", + "type": "string" + }, + "item_id": { + "description": "品目ID", + "type": "number" + }, + "section_id": { + "description": "部門ID", + "type": "number" + }, + "tag_ids": { + "description": "メモタグID", + "type": "array", + "items": { + "type": "number" + } + }, + "segment_1_tag_id": { + "description": "セグメント1ID", + "type": "number" + }, + "segment_2_tag_id": { + "description": "セグメント2ID", + "type": "number" + }, + "segment_3_tag_id": { + "description": "セグメント3ID", + "type": "number" + }, + "description": { + "description": "備考", + "type": "string" + } + }, + "required": [ + "account_item_id", + "amount", + "entry_side", + "tax_code" + ] + } + } + }, + "required": [ + "company_id", + "details", + "issue_date" + ] + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "manual_journal": { + "type": "object", + "properties": { + "id": { + "description": "振替伝票ID", + "type": "number" + }, + "company_id": { + "description": "事業所ID", + "type": "number" + }, + "issue_date": { + "description": "発生日 (yyyy-mm-dd)", + "type": "string" + }, + "adjustment": { + "description": "決算整理仕訳フラグ(falseまたは未指定の場合: 日常仕訳)", + "type": "boolean" + }, + "txn_number": { + "description": "仕訳番号", + "type": [ + "null", + "string" + ] + }, + "details": { + "description": "貸借行一覧(配列): 貸借合わせて100行まで登録できます。", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "貸借行ID", + "type": "number" + }, + "entry_side": { + "description": "貸借(貸方: credit, 借方: debit)", + "enum": [ + "credit", + "debit" + ], + "type": "string" + }, + "account_item_id": { + "description": "勘定科目ID", + "type": "number" + }, + "tax_code": { + "description": "税区分ID", + "type": "number" + }, + "partner_id": { + "description": "取引先ID", + "type": [ + "null", + "number" + ] + }, + "partner_name": { + "description": "取引先名", + "type": [ + "null", + "string" + ] + }, + "partner_code": { + "description": "取引先コード", + "type": [ + "null", + "string" + ] + }, + "partner_long_name": { + "description": "正式名称(255文字以内)", + "type": [ + "null", + "string" + ] + }, + "item_id": { + "description": "品目ID", + "type": [ + "null", + "number" + ] + }, + "item_name": { + "description": "品目", + "type": [ + "null", + "string" + ] + }, + "section_id": { + "description": "部門ID", + "type": [ + "null", + "number" + ] + }, + "section_name": { + "description": "部門", + "type": [ + "null", + "string" + ] + }, + "tag_ids": { + "type": "array", + "items": { + "type": "number" + } + }, + "tag_names": { + "type": "array", + "items": { + "type": "string" + } + }, + "segment_1_tag_id": { + "description": "セグメント1ID", + "type": "number" + }, + "segment_1_tag_name": { + "description": "セグメント1ID", + "type": "number" + }, + "segment_2_tag_id": { + "description": "セグメント2ID", + "type": "number" + }, + "segment_2_tag_name": { + "description": "セグメント2", + "type": "number" + }, + "segment_3_tag_id": { + "description": "セグメント3ID", + "type": "number" + }, + "segment_3_tag_name": { + "description": "セグメント3", + "type": "number" + }, + "amount": { + "description": "金額(税込で指定してください)", + "type": "number" + }, + "vat": { + "description": "消費税額(指定しない場合は自動で計算されます)", + "type": "number" + }, + "description": { + "description": "備考", + "type": "string" + } + }, + "required": [ + "account_item_id", + "amount", + "description", + "entry_side", + "id", + "item_id", + "item_name", + "partner_id", + "partner_long_name", + "partner_name", + "section_id", + "section_name", + "tag_ids", + "tag_names", + "tax_code", + "vat" + ] + } + } + }, + "required": [ + "adjustment", + "company_id", + "details", + "id", + "issue_date", + "txn_number" + ] + } + }, + "required": [ + "manual_journal" + ] + } + } + } + } + } + } + }, + "samples/freee/api/1/partners/{id}": { + "get": { + "tags": [ + "api", + "1", + "partners" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "number" + } + }, + { + "name": "company_id", + "in": "query", + "required": true, + "schema": { + "description": "事業所ID", + "type": "number" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "partner": { + "type": "object", + "properties": { + "id": { + "description": "取引先ID", + "type": "number" + }, + "code": { + "description": "取引先コード", + "type": [ + "null", + "string" + ] + }, + "company_id": { + "description": "事業所ID", + "type": "number" + }, + "name": { + "description": "取引先名", + "type": "string" + }, + "shortcut1": { + "description": "ショートカット1 (20文字以内)", + "type": [ + "null", + "string" + ] + }, + "shortcut2": { + "description": "ショートカット2 (20文字以内)", + "type": [ + "null", + "string" + ] + }, + "long_name": { + "description": "正式名称(255文字以内)", + "type": [ + "null", + "string" + ] + }, + "name_kana": { + "description": "カナ名称(255文字以内)", + "type": [ + "null", + "string" + ] + }, + "default_title": { + "description": "敬称(御中、様、(空白)の3つから選択)", + "type": [ + "null", + "string" + ] + }, + "phone": { + "description": "電話番号", + "type": [ + "null", + "string" + ] + }, + "contact_name": { + "description": "担当者 氏名", + "type": [ + "null", + "string" + ] + }, + "email": { + "description": "担当者 メールアドレス", + "type": [ + "null", + "string" + ] + }, + "payer_walletable_id": { + "description": "振込元口座ID(一括振込ファイル用):(未設定の場合は、nullです。)", + "type": [ + "null", + "number" + ] + }, + "transfer_fee_handling_side": { + "description": "振込手数料負担(一括振込ファイル用): (振込元(当方): payer, 振込先(先方): payee)", + "enum": [ + "payee", + "payer" + ], + "type": "string" + }, + "address_attributes[zipcode]": { + "description": "郵便番号", + "type": [ + "null", + "string" + ] + }, + "address_attributes[prefecture_code]": { + "description": "都道府県コード(0:北海道、1:青森、2:岩手、3:宮城、4:秋田、5:山形、6:福島、7:茨城、8:栃木、9:群馬、10:埼玉、11:千葉、12:東京、13:神奈川、14:新潟、15:富山、16:石川、17:福井、18:山梨、19:長野、20:岐阜、21:静岡、22:愛知、23:三重、24:滋賀、25:京都、26:大阪、27:兵庫、28:奈良、29:和歌山、30:鳥取、31:島根、32:岡山、33:広島、34:山口、35:徳島、36:香川、37:愛媛、38:高知、39:福岡、40:佐賀、41:長崎、42:熊本、43:大分、44:宮崎、45:鹿児島、46:沖縄", + "type": "number" + }, + "address_attributes[street_name1]": { + "description": "市区町村・番地", + "type": [ + "null", + "string" + ] + }, + "address_attributes[street_name2]": { + "description": "建物名・部屋番号など", + "type": [ + "null", + "string" + ] + }, + "partner_doc_setting_attributes[sending_method]": { + "description": "請求書送付方法(email:メール、posting:郵送、email_and_posting:メールと郵送)", + "anyOf": [ + { + "enum": [ + "email", + "email_and_posting", + "posting" + ], + "type": "string" + }, + { + "type": "null" + } + ] + }, + "partner_bank_account_attributes[bank_name]": { + "description": "銀行名", + "type": [ + "null", + "string" + ] + }, + "partner_bank_account_attributes[bank_name_kana]": { + "description": "銀行名(カナ)", + "type": [ + "null", + "string" + ] + }, + "partner_bank_account_attributes[bank_code]": { + "description": "銀行番号", + "type": [ + "null", + "string" + ] + }, + "partner_bank_account_attributes[branch_name]": { + "description": "支店名", + "type": [ + "null", + "string" + ] + }, + "partner_bank_account_attributes[branch_kana]": { + "description": "支店名(カナ)", + "type": [ + "null", + "string" + ] + }, + "partner_bank_account_attributes[branch_code]": { + "description": "受取人名(カナ)", + "type": [ + "null", + "string" + ] + }, + "partner_bank_account_attributes[account_type]": { + "description": "口座種別(ordinary:普通、checking:当座、earmarked:納税準備預金、savings:貯蓄、other:その他)", + "anyOf": [ + { + "enum": [ + "checking", + "earmarked", + "ordinary", + "other", + "savings" + ], + "type": "string" + }, + { + "type": "null" + } + ] + }, + "partner_bank_account_attributes[account_number]": { + "description": "口座番号", + "type": [ + "null", + "string" + ] + }, + "partner_bank_account_attributes[account_name]": { + "description": "受取人名(カナ)", + "type": [ + "null", + "string" + ] + }, + "partner_bank_account_attributes[long_account_name]": { + "description": "受取人名", + "type": [ + "null", + "string" + ] + }, + "payment_term_attributes[cutoff_day]": { + "description": "締め日(29, 30, 31日の末日を指定する場合は、32。)", + "type": [ + "null", + "number" + ] + }, + "payment_term_attributes[additional_months]": { + "description": "支払月", + "type": [ + "null", + "number" + ] + }, + "payment_term_attributes[fixed_day]": { + "description": "支払日(29, 30, 31日の末日を指定する場合は、32。)", + "type": [ + "null", + "number" + ] + }, + "invoice_payment_term_attributes[cutoff_day]": { + "description": "締め日(29, 30, 31日の末日を指定する場合は、32。)", + "type": [ + "null", + "number" + ] + }, + "invoice_payment_term_attributes[additional_months]": { + "description": "支払月", + "type": [ + "null", + "number" + ] + }, + "invoice_payment_term_attributes[fixed_day]": { + "description": "支払日(29, 30, 31日の末日を指定する場合は、32。)", + "type": [ + "null", + "number" + ] + } + }, + "required": [ + "code", + "company_id", + "id", + "name" + ] + } + }, + "required": [ + "partner" + ] + } + } + } + } + } + }, + "put": { + "tags": [ + "api", + "1", + "partners" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "number" + } + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "description": "取引先の更新", + "type": "object", + "properties": { + "company_id": { + "description": "事業所ID", + "type": "number" + }, + "name": { + "description": "取引先名 (255文字以内)", + "type": "string" + }, + "shortcut1": { + "description": "ショートカット1 (255文字以内)", + "type": "string" + }, + "shortcut2": { + "description": "ショートカット2 (255文字以内)", + "type": "string" + }, + "long_name": { + "description": "正式名称(255文字以内)", + "type": "string" + }, + "name_kana": { + "description": "カナ名称(255文字以内)", + "type": "string" + }, + "default_title": { + "description": "敬称(御中、様、(空白)の3つから選択)", + "type": "string" + }, + "phone": { + "description": "電話番号", + "type": "string" + }, + "contact_name": { + "description": "担当者 氏名 (255文字以内)", + "type": "string" + }, + "email": { + "description": "担当者 メールアドレス (255文字以内)", + "type": "string" + }, + "payer_walletable_id": { + "description": "振込元口座ID(一括振込ファイル用):(walletableのtypeが'bank_account'のidのみ指定できます。また、未設定にする場合は、nullを指定してください。)", + "type": [ + "null", + "number" + ] + }, + "transfer_fee_handling_side": { + "description": "振込手数料負担(一括振込ファイル用): (振込元(当方): payer, 振込先(先方): payee)", + "enum": [ + "payee", + "payer" + ], + "type": "string" + }, + "address_attributes": { + "type": "object", + "properties": { + "zipcode": { + "description": "郵便番号(8文字以内)", + "type": "string" + }, + "prefecture_code": { + "description": "都道府県コード(0: 北海道、1:青森、2:岩手、3:宮城、4:秋田、5:山形、6:福島、7:茨城、8:栃木、9:群馬、10:埼玉、11:千葉、12:東京、13:神奈川、14:新潟、15:富山、16:石川、17:福井、18:山梨、19:長野、20:岐阜、21:静岡、22:愛知、23:三重、24:滋賀、25:京都、26:大阪、27:兵庫、28:奈良、29:和歌山、30:鳥取、31:島根、32:岡山、33:広島、34:山口、35:徳島、36:香川、37:愛媛、38:高知、39:福岡、40:佐賀、41:長崎、42:熊本、43:大分、44:宮崎、45:鹿児島、46:沖縄", + "type": "number" + }, + "street_name1": { + "description": "市区町村・番地(255文字以内)", + "type": "string" + }, + "street_name2": { + "description": "建物名・部屋番号など(255文字以内)", + "type": "string" + } + } + }, + "partner_doc_setting_attributes": { + "type": "object", + "properties": { + "sending_method": { + "description": "請求書送付方法(email:メール、posting:郵送、email_and_posting:メールと郵送)", + "enum": [ + "email", + "email_and_posting", + "posting" + ], + "type": "string" + } + } + }, + "partner_bank_account_attributes": { + "type": "object", + "properties": { + "bank_name": { + "description": "銀行名", + "type": "string" + }, + "bank_name_kana": { + "description": "銀行名(カナ)", + "type": "string" + }, + "bank_code": { + "description": "銀行番号", + "type": "string" + }, + "branch_name": { + "description": "支店名", + "type": "string" + }, + "branch_kana": { + "description": "支店名(カナ)", + "type": "string" + }, + "branch_code": { + "description": "支店番号", + "type": "string" + }, + "account_type": { + "description": "口座種別(ordinary:普通、checking:当座、earmarked:納税準備預金、savings:貯蓄、other:その他)", + "type": "string" + }, + "account_number": { + "description": "口座番号", + "type": "string" + }, + "long_account_name": { + "description": "受取人名", + "type": "string" + }, + "account_name": { + "description": "受取人名(カナ)", + "type": "string" + } + } + }, + "payment_term_attributes": { + "type": "object", + "properties": { + "cutoff_day": { + "description": "締め日(29, 30, 31日の末日を指定する場合は、32を指定してください。)", + "type": "number" + }, + "additional_months": { + "description": "支払月", + "type": "number" + }, + "fixed_day": { + "description": "支払日(29, 30, 31日の末日を指定する場合は、32を指定してください。)", + "type": "number" + } + } + }, + "invoice_payment_term_attributes": { + "type": "object", + "properties": { + "cutoff_day": { + "description": "締め日(29, 30, 31日の末日を指定する場合は、32を指定してください。)", + "type": "number" + }, + "additional_months": { + "description": "支払月", + "type": "number" + }, + "fixed_day": { + "description": "支払日(29, 30, 31日の末日を指定する場合は、32を指定してください。)", + "type": "number" + } + } + } + }, + "required": [ + "company_id", + "name" + ] + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "partner": { + "type": "object", + "properties": { + "id": { + "description": "取引先ID", + "type": "number" + }, + "code": { + "description": "取引先コード", + "type": [ + "null", + "string" + ] + }, + "company_id": { + "description": "事業所ID", + "type": "number" + }, + "name": { + "description": "取引先名", + "type": "string" + }, + "shortcut1": { + "description": "ショートカット1 (20文字以内)", + "type": [ + "null", + "string" + ] + }, + "shortcut2": { + "description": "ショートカット2 (20文字以内)", + "type": [ + "null", + "string" + ] + }, + "long_name": { + "description": "正式名称(255文字以内)", + "type": [ + "null", + "string" + ] + }, + "name_kana": { + "description": "カナ名称(255文字以内)", + "type": [ + "null", + "string" + ] + }, + "default_title": { + "description": "敬称(御中、様、(空白)の3つから選択)", + "type": [ + "null", + "string" + ] + }, + "phone": { + "description": "電話番号", + "type": [ + "null", + "string" + ] + }, + "contact_name": { + "description": "担当者 氏名", + "type": [ + "null", + "string" + ] + }, + "email": { + "description": "担当者 メールアドレス", + "type": [ + "null", + "string" + ] + }, + "payer_walletable_id": { + "description": "振込元口座ID(一括振込ファイル用):(未設定の場合は、nullです。)", + "type": [ + "null", + "number" + ] + }, + "transfer_fee_handling_side": { + "description": "振込手数料負担(一括振込ファイル用): (振込元(当方): payer, 振込先(先方): payee)", + "enum": [ + "payee", + "payer" + ], + "type": "string" + }, + "address_attributes[zipcode]": { + "description": "郵便番号", + "type": [ + "null", + "string" + ] + }, + "address_attributes[prefecture_code]": { + "description": "都道府県コード(0:北海道、1:青森、2:岩手、3:宮城、4:秋田、5:山形、6:福島、7:茨城、8:栃木、9:群馬、10:埼玉、11:千葉、12:東京、13:神奈川、14:新潟、15:富山、16:石川、17:福井、18:山梨、19:長野、20:岐阜、21:静岡、22:愛知、23:三重、24:滋賀、25:京都、26:大阪、27:兵庫、28:奈良、29:和歌山、30:鳥取、31:島根、32:岡山、33:広島、34:山口、35:徳島、36:香川、37:愛媛、38:高知、39:福岡、40:佐賀、41:長崎、42:熊本、43:大分、44:宮崎、45:鹿児島、46:沖縄", + "type": "number" + }, + "address_attributes[street_name1]": { + "description": "市区町村・番地", + "type": [ + "null", + "string" + ] + }, + "address_attributes[street_name2]": { + "description": "建物名・部屋番号など", + "type": [ + "null", + "string" + ] + }, + "partner_doc_setting_attributes[sending_method]": { + "description": "請求書送付方法(email:メール、posting:郵送、email_and_posting:メールと郵送)", + "anyOf": [ + { + "enum": [ + "email", + "email_and_posting", + "posting" + ], + "type": "string" + }, + { + "type": "null" + } + ] + }, + "partner_bank_account_attributes[bank_name]": { + "description": "銀行名", + "type": [ + "null", + "string" + ] + }, + "partner_bank_account_attributes[bank_name_kana]": { + "description": "銀行名(カナ)", + "type": [ + "null", + "string" + ] + }, + "partner_bank_account_attributes[bank_code]": { + "description": "銀行番号", + "type": [ + "null", + "string" + ] + }, + "partner_bank_account_attributes[branch_name]": { + "description": "支店名", + "type": [ + "null", + "string" + ] + }, + "partner_bank_account_attributes[branch_kana]": { + "description": "支店名(カナ)", + "type": [ + "null", + "string" + ] + }, + "partner_bank_account_attributes[branch_code]": { + "description": "受取人名(カナ)", + "type": [ + "null", + "string" + ] + }, + "partner_bank_account_attributes[account_type]": { + "description": "口座種別(ordinary:普通、checking:当座、earmarked:納税準備預金、savings:貯蓄、other:その他)", + "anyOf": [ + { + "enum": [ + "checking", + "earmarked", + "ordinary", + "other", + "savings" + ], + "type": "string" + }, + { + "type": "null" + } + ] + }, + "partner_bank_account_attributes[account_number]": { + "description": "口座番号", + "type": [ + "null", + "string" + ] + }, + "partner_bank_account_attributes[account_name]": { + "description": "受取人名(カナ)", + "type": [ + "null", + "string" + ] + }, + "partner_bank_account_attributes[long_account_name]": { + "description": "受取人名", + "type": [ + "null", + "string" + ] + }, + "payment_term_attributes[cutoff_day]": { + "description": "締め日(29, 30, 31日の末日を指定する場合は、32。)", + "type": [ + "null", + "number" + ] + }, + "payment_term_attributes[additional_months]": { + "description": "支払月", + "type": [ + "null", + "number" + ] + }, + "payment_term_attributes[fixed_day]": { + "description": "支払日(29, 30, 31日の末日を指定する場合は、32。)", + "type": [ + "null", + "number" + ] + }, + "invoice_payment_term_attributes[cutoff_day]": { + "description": "締め日(29, 30, 31日の末日を指定する場合は、32。)", + "type": [ + "null", + "number" + ] + }, + "invoice_payment_term_attributes[additional_months]": { + "description": "支払月", + "type": [ + "null", + "number" + ] + }, + "invoice_payment_term_attributes[fixed_day]": { + "description": "支払日(29, 30, 31日の末日を指定する場合は、32。)", + "type": [ + "null", + "number" + ] + } + }, + "required": [ + "code", + "company_id", + "id", + "name" + ] + } + }, + "required": [ + "partner" + ] + } + } + } + } + } + }, + "delete": { + "tags": [ + "api", + "1", + "partners" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "number" + } + }, + { + "name": "company_id", + "in": "query", + "required": true, + "schema": { + "description": "事業所ID", + "type": "number" + } + } + ] + } + }, + "samples/freee/api/1/partners/code/{code}": { + "put": { + "tags": [ + "api", + "1", + "partners", + "code" + ], + "parameters": [ + { + "name": "code", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "description": "取引先の更新", + "type": "object", + "properties": { + "company_id": { + "description": "事業所ID", + "type": "number" + }, + "name": { + "description": "取引先名 (255文字以内)", + "type": "string" + }, + "shortcut1": { + "description": "ショートカット1 (255文字以内)", + "type": "string" + }, + "shortcut2": { + "description": "ショートカット2 (255文字以内)", + "type": "string" + }, + "long_name": { + "description": "正式名称(255文字以内)", + "type": "string" + }, + "name_kana": { + "description": "カナ名称(255文字以内)", + "type": "string" + }, + "default_title": { + "description": "敬称(御中、様、(空白)の3つから選択)", + "type": "string" + }, + "phone": { + "description": "電話番号", + "type": "string" + }, + "contact_name": { + "description": "担当者 氏名 (255文字以内)", + "type": "string" + }, + "email": { + "description": "担当者 メールアドレス (255文字以内)", + "type": "string" + }, + "payer_walletable_id": { + "description": "振込元口座ID(一括振込ファイル用):(walletableのtypeが'bank_account'のidのみ指定できます。また、未設定にする場合は、nullを指定してください。)", + "type": [ + "null", + "number" + ] + }, + "transfer_fee_handling_side": { + "description": "振込手数料負担(一括振込ファイル用): (振込元(当方): payer, 振込先(先方): payee)", + "enum": [ + "payee", + "payer" + ], + "type": "string" + }, + "address_attributes": { + "type": "object", + "properties": { + "zipcode": { + "description": "郵便番号(8文字以内)", + "type": "string" + }, + "prefecture_code": { + "description": "都道府県コード(0: 北海道、1:青森、2:岩手、3:宮城、4:秋田、5:山形、6:福島、7:茨城、8:栃木、9:群馬、10:埼玉、11:千葉、12:東京、13:神奈川、14:新潟、15:富山、16:石川、17:福井、18:山梨、19:長野、20:岐阜、21:静岡、22:愛知、23:三重、24:滋賀、25:京都、26:大阪、27:兵庫、28:奈良、29:和歌山、30:鳥取、31:島根、32:岡山、33:広島、34:山口、35:徳島、36:香川、37:愛媛、38:高知、39:福岡、40:佐賀、41:長崎、42:熊本、43:大分、44:宮崎、45:鹿児島、46:沖縄", + "type": "number" + }, + "street_name1": { + "description": "市区町村・番地(255文字以内)", + "type": "string" + }, + "street_name2": { + "description": "建物名・部屋番号など(255文字以内)", + "type": "string" + } + } + }, + "partner_doc_setting_attributes": { + "type": "object", + "properties": { + "sending_method": { + "description": "請求書送付方法(email:メール、posting:郵送、email_and_posting:メールと郵送)", + "enum": [ + "email", + "email_and_posting", + "posting" + ], + "type": "string" + } + } + }, + "partner_bank_account_attributes": { + "type": "object", + "properties": { + "bank_name": { + "description": "銀行名", + "type": "string" + }, + "bank_name_kana": { + "description": "銀行名(カナ)", + "type": "string" + }, + "bank_code": { + "description": "銀行番号", + "type": "string" + }, + "branch_name": { + "description": "支店名", + "type": "string" + }, + "branch_kana": { + "description": "支店名(カナ)", + "type": "string" + }, + "branch_code": { + "description": "支店番号", + "type": "string" + }, + "account_type": { + "description": "口座種別(ordinary:普通、checking:当座、earmarked:納税準備預金、savings:貯蓄、other:その他)", + "type": "string" + }, + "account_number": { + "description": "口座番号", + "type": "string" + }, + "long_account_name": { + "description": "受取人名", + "type": "string" + }, + "account_name": { + "description": "受取人名(カナ)", + "type": "string" + } + } + }, + "payment_term_attributes": { + "type": "object", + "properties": { + "cutoff_day": { + "description": "締め日(29, 30, 31日の末日を指定する場合は、32を指定してください。)", + "type": "number" + }, + "additional_months": { + "description": "支払月", + "type": "number" + }, + "fixed_day": { + "description": "支払日(29, 30, 31日の末日を指定する場合は、32を指定してください。)", + "type": "number" + } + } + }, + "invoice_payment_term_attributes": { + "type": "object", + "properties": { + "cutoff_day": { + "description": "締め日(29, 30, 31日の末日を指定する場合は、32を指定してください。)", + "type": "number" + }, + "additional_months": { + "description": "支払月", + "type": "number" + }, + "fixed_day": { + "description": "支払日(29, 30, 31日の末日を指定する場合は、32を指定してください。)", + "type": "number" + } + } + } + }, + "required": [ + "company_id", + "name" + ] + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "partner": { + "type": "object", + "properties": { + "id": { + "description": "取引先ID", + "type": "number" + }, + "code": { + "description": "取引先コード", + "type": [ + "null", + "string" + ] + }, + "company_id": { + "description": "事業所ID", + "type": "number" + }, + "name": { + "description": "取引先名", + "type": "string" + }, + "shortcut1": { + "description": "ショートカット1 (20文字以内)", + "type": [ + "null", + "string" + ] + }, + "shortcut2": { + "description": "ショートカット2 (20文字以内)", + "type": [ + "null", + "string" + ] + }, + "long_name": { + "description": "正式名称(255文字以内)", + "type": [ + "null", + "string" + ] + }, + "name_kana": { + "description": "カナ名称(255文字以内)", + "type": [ + "null", + "string" + ] + }, + "default_title": { + "description": "敬称(御中、様、(空白)の3つから選択)", + "type": [ + "null", + "string" + ] + }, + "phone": { + "description": "電話番号", + "type": [ + "null", + "string" + ] + }, + "contact_name": { + "description": "担当者 氏名", + "type": [ + "null", + "string" + ] + }, + "email": { + "description": "担当者 メールアドレス", + "type": [ + "null", + "string" + ] + }, + "payer_walletable_id": { + "description": "振込元口座ID(一括振込ファイル用):(未設定の場合は、nullです。)", + "type": [ + "null", + "number" + ] + }, + "transfer_fee_handling_side": { + "description": "振込手数料負担(一括振込ファイル用): (振込元(当方): payer, 振込先(先方): payee)", + "enum": [ + "payee", + "payer" + ], + "type": "string" + }, + "address_attributes[zipcode]": { + "description": "郵便番号", + "type": [ + "null", + "string" + ] + }, + "address_attributes[prefecture_code]": { + "description": "都道府県コード(0:北海道、1:青森、2:岩手、3:宮城、4:秋田、5:山形、6:福島、7:茨城、8:栃木、9:群馬、10:埼玉、11:千葉、12:東京、13:神奈川、14:新潟、15:富山、16:石川、17:福井、18:山梨、19:長野、20:岐阜、21:静岡、22:愛知、23:三重、24:滋賀、25:京都、26:大阪、27:兵庫、28:奈良、29:和歌山、30:鳥取、31:島根、32:岡山、33:広島、34:山口、35:徳島、36:香川、37:愛媛、38:高知、39:福岡、40:佐賀、41:長崎、42:熊本、43:大分、44:宮崎、45:鹿児島、46:沖縄", + "type": "number" + }, + "address_attributes[street_name1]": { + "description": "市区町村・番地", + "type": [ + "null", + "string" + ] + }, + "address_attributes[street_name2]": { + "description": "建物名・部屋番号など", + "type": [ + "null", + "string" + ] + }, + "partner_doc_setting_attributes[sending_method]": { + "description": "請求書送付方法(email:メール、posting:郵送、email_and_posting:メールと郵送)", + "anyOf": [ + { + "enum": [ + "email", + "email_and_posting", + "posting" + ], + "type": "string" + }, + { + "type": "null" + } + ] + }, + "partner_bank_account_attributes[bank_name]": { + "description": "銀行名", + "type": [ + "null", + "string" + ] + }, + "partner_bank_account_attributes[bank_name_kana]": { + "description": "銀行名(カナ)", + "type": [ + "null", + "string" + ] + }, + "partner_bank_account_attributes[bank_code]": { + "description": "銀行番号", + "type": [ + "null", + "string" + ] + }, + "partner_bank_account_attributes[branch_name]": { + "description": "支店名", + "type": [ + "null", + "string" + ] + }, + "partner_bank_account_attributes[branch_kana]": { + "description": "支店名(カナ)", + "type": [ + "null", + "string" + ] + }, + "partner_bank_account_attributes[branch_code]": { + "description": "受取人名(カナ)", + "type": [ + "null", + "string" + ] + }, + "partner_bank_account_attributes[account_type]": { + "description": "口座種別(ordinary:普通、checking:当座、earmarked:納税準備預金、savings:貯蓄、other:その他)", + "anyOf": [ + { + "enum": [ + "checking", + "earmarked", + "ordinary", + "other", + "savings" + ], + "type": "string" + }, + { + "type": "null" + } + ] + }, + "partner_bank_account_attributes[account_number]": { + "description": "口座番号", + "type": [ + "null", + "string" + ] + }, + "partner_bank_account_attributes[account_name]": { + "description": "受取人名(カナ)", + "type": [ + "null", + "string" + ] + }, + "partner_bank_account_attributes[long_account_name]": { + "description": "受取人名", + "type": [ + "null", + "string" + ] + }, + "payment_term_attributes[cutoff_day]": { + "description": "締め日(29, 30, 31日の末日を指定する場合は、32。)", + "type": [ + "null", + "number" + ] + }, + "payment_term_attributes[additional_months]": { + "description": "支払月", + "type": [ + "null", + "number" + ] + }, + "payment_term_attributes[fixed_day]": { + "description": "支払日(29, 30, 31日の末日を指定する場合は、32。)", + "type": [ + "null", + "number" + ] + }, + "invoice_payment_term_attributes[cutoff_day]": { + "description": "締め日(29, 30, 31日の末日を指定する場合は、32。)", + "type": [ + "null", + "number" + ] + }, + "invoice_payment_term_attributes[additional_months]": { + "description": "支払月", + "type": [ + "null", + "number" + ] + }, + "invoice_payment_term_attributes[fixed_day]": { + "description": "支払日(29, 30, 31日の末日を指定する場合は、32。)", + "type": [ + "null", + "number" + ] + } + }, + "required": [ + "code", + "company_id", + "id", + "name" + ] + } + }, + "required": [ + "partner" + ] + } + } + } + } + } + } + }, + "samples/freee/api/1/partners": { + "get": { + "tags": [ + "api", + "1", + "partners" + ], + "parameters": [ + { + "name": "company_id", + "in": "query", + "required": true, + "schema": { + "description": "事業所ID", + "type": "number" + } + }, + { + "name": "offset", + "in": "query", + "required": false, + "schema": { + "description": "取得レコードのオフセット (デフォルト: 0)", + "type": "number" + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "description": "取得レコードの件数 (デフォルト: 50, 最小: 1, 最大: 3000)", + "type": "number" + } + }, + { + "name": "keyword", + "in": "query", + "required": false, + "schema": { + "description": "検索キーワード:取引先名・正式名称・カナ名称に対するあいまい検索で一致、またはショートカットキー1・2のいずれかに完全一致", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "partners": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "取引先ID", + "type": "number" + }, + "code": { + "description": "取引先コード", + "type": [ + "null", + "string" + ] + }, + "company_id": { + "description": "事業所ID", + "type": "number" + }, + "name": { + "description": "取引先名", + "type": "string" + }, + "shortcut1": { + "description": "ショートカット1 (20文字以内)", + "type": [ + "null", + "string" + ] + }, + "shortcut2": { + "description": "ショートカット2 (20文字以内)", + "type": [ + "null", + "string" + ] + }, + "long_name": { + "description": "正式名称(255文字以内)", + "type": [ + "null", + "string" + ] + }, + "name_kana": { + "description": "カナ名称(255文字以内)", + "type": [ + "null", + "string" + ] + }, + "default_title": { + "description": "敬称(御中、様、(空白)の3つから選択)", + "type": [ + "null", + "string" + ] + }, + "phone": { + "description": "電話番号", + "type": [ + "null", + "string" + ] + }, + "contact_name": { + "description": "担当者 氏名", + "type": [ + "null", + "string" + ] + }, + "email": { + "description": "担当者 メールアドレス", + "type": [ + "null", + "string" + ] + }, + "payer_walletable_id": { + "description": "振込元口座ID(一括振込ファイル用):(未設定の場合は、nullです。)", + "type": [ + "null", + "number" + ] + }, + "transfer_fee_handling_side": { + "description": "振込手数料負担(一括振込ファイル用): (振込元(当方): payer, 振込先(先方): payee)", + "enum": [ + "payee", + "payer" + ], + "type": "string" + }, + "address_attributes[zipcode]": { + "description": "郵便番号", + "type": [ + "null", + "string" + ] + }, + "address_attributes[prefecture_code]": { + "description": "都道府県コード(0:北海道、1:青森、2:岩手、3:宮城、4:秋田、5:山形、6:福島、7:茨城、8:栃木、9:群馬、10:埼玉、11:千葉、12:東京、13:神奈川、14:新潟、15:富山、16:石川、17:福井、18:山梨、19:長野、20:岐阜、21:静岡、22:愛知、23:三重、24:滋賀、25:京都、26:大阪、27:兵庫、28:奈良、29:和歌山、30:鳥取、31:島根、32:岡山、33:広島、34:山口、35:徳島、36:香川、37:愛媛、38:高知、39:福岡、40:佐賀、41:長崎、42:熊本、43:大分、44:宮崎、45:鹿児島、46:沖縄", + "type": "number" + }, + "address_attributes[street_name1]": { + "description": "市区町村・番地", + "type": [ + "null", + "string" + ] + }, + "address_attributes[street_name2]": { + "description": "建物名・部屋番号など", + "type": [ + "null", + "string" + ] + }, + "partner_doc_setting_attributes[sending_method]": { + "description": "請求書送付方法(mail:メール、posting:郵送、mail_and_posting:メールと郵送)", + "anyOf": [ + { + "enum": [ + "mail", + "main_and_posting", + "posting" + ], + "type": "string" + }, + { + "type": "null" + } + ] + }, + "partner_bank_account_attributes[bank_name]": { + "description": "銀行名", + "type": [ + "null", + "string" + ] + }, + "partner_bank_account_attributes[bank_name_kana]": { + "description": "銀行名(カナ)", + "type": [ + "null", + "string" + ] + }, + "partner_bank_account_attributes[bank_code]": { + "description": "銀行番号", + "type": [ + "null", + "string" + ] + }, + "partner_bank_account_attributes[branch_name]": { + "description": "支店名", + "type": [ + "null", + "string" + ] + }, + "partner_bank_account_attributes[branch_kana]": { + "description": "支店名(カナ)", + "type": [ + "null", + "string" + ] + }, + "partner_bank_account_attributes[branch_code]": { + "description": "受取人名(カナ)", + "type": [ + "null", + "string" + ] + }, + "partner_bank_account_attributes[account_type]": { + "description": "口座種別(ordinary:普通、checking:当座、earmarked:納税準備預金、savings:貯蓄、other:その他)", + "anyOf": [ + { + "enum": [ + "checking", + "earmarked", + "ordinary", + "other", + "savings" + ], + "type": "string" + }, + { + "type": "null" + } + ] + }, + "partner_bank_account_attributes[account_number]": { + "description": "口座番号", + "type": [ + "null", + "string" + ] + }, + "partner_bank_account_attributes[account_name]": { + "description": "受取人名(カナ)", + "type": [ + "null", + "string" + ] + }, + "partner_bank_account_attributes[long_account_name]": { + "description": "受取人名", + "type": [ + "null", + "string" + ] + } + }, + "required": [ + "code", + "company_id", + "id", + "name" + ] + } + } + }, + "required": [ + "partners" + ] + } + } + } + } + } + }, + "post": { + "tags": [ + "api", + "1", + "partners" + ], + "parameters": [], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "description": "取引先の作成", + "type": "object", + "properties": { + "company_id": { + "description": "事業所ID", + "type": "number" + }, + "name": { + "description": "取引先名 (255文字以内)", + "type": "string" + }, + "code": { + "description": "取引先コード", + "type": "string" + }, + "shortcut1": { + "description": "ショートカット1 (255文字以内)", + "type": "string" + }, + "shortcut2": { + "description": "ショートカット2 (255文字以内)", + "type": "string" + }, + "long_name": { + "description": "正式名称(255文字以内)", + "type": "string" + }, + "name_kana": { + "description": "カナ名称(255文字以内)", + "type": "string" + }, + "default_title": { + "description": "敬称(御中、様、(空白)の3つから選択)", + "type": "string" + }, + "phone": { + "description": "電話番号", + "type": "string" + }, + "contact_name": { + "description": "担当者 氏名 (255文字以内)", + "type": "string" + }, + "email": { + "description": "担当者 メールアドレス (255文字以内)", + "type": "string" + }, + "payer_walletable_id": { + "description": "振込元口座ID(一括振込ファイル用):(walletableのtypeが'bank_account'のidのみ指定できます。また、未設定にする場合は、nullを指定してください。)", + "type": [ + "null", + "number" + ] + }, + "transfer_fee_handling_side": { + "description": "振込手数料負担(一括振込ファイル用): (振込元(当方): payer, 振込先(先方): payee)", + "enum": [ + "payee", + "payer" + ], + "type": "string" + }, + "address_attributes": { + "type": "object", + "properties": { + "zipcode": { + "description": "郵便番号(8文字以内)", + "type": "string" + }, + "prefecture_code": { + "description": "都道府県コード(0: 北海道、1:青森、2:岩手、3:宮城、4:秋田、5:山形、6:福島、7:茨城、8:栃木、9:群馬、10:埼玉、11:千葉、12:東京、13:神奈川、14:新潟、15:富山、16:石川、17:福井、18:山梨、19:長野、20:岐阜、21:静岡、22:愛知、23:三重、24:滋賀、25:京都、26:大阪、27:兵庫、28:奈良、29:和歌山、30:鳥取、31:島根、32:岡山、33:広島、34:山口、35:徳島、36:香川、37:愛媛、38:高知、39:福岡、40:佐賀、41:長崎、42:熊本、43:大分、44:宮崎、45:鹿児島、46:沖縄", + "type": "number" + }, + "street_name1": { + "description": "市区町村・番地(255文字以内)", + "type": "string" + }, + "street_name2": { + "description": "建物名・部屋番号など(255文字以内)", + "type": "string" + } + } + }, + "partner_doc_setting_attributes": { + "type": "object", + "properties": { + "sending_method": { + "description": "請求書送付方法(email:メール、posting:郵送、email_and_posting:メールと郵送)", + "enum": [ + "email", + "email_and_posting", + "posting" + ], + "type": "string" + } + } + }, + "partner_bank_account_attributes": { + "type": "object", + "properties": { + "bank_name": { + "description": "銀行名", + "type": "string" + }, + "bank_name_kana": { + "description": "銀行名(カナ)", + "type": "string" + }, + "bank_code": { + "description": "銀行番号", + "type": "string" + }, + "branch_name": { + "description": "支店名", + "type": "string" + }, + "branch_kana": { + "description": "支店名(カナ)", + "type": "string" + }, + "branch_code": { + "description": "支店番号", + "type": "string" + }, + "account_type": { + "description": "口座種別(ordinary:普通、checking:当座、earmarked:納税準備預金、savings:貯蓄、other:その他)", + "type": "string" + }, + "account_number": { + "description": "口座番号", + "type": "string" + }, + "long_account_name": { + "description": "受取人名", + "type": "string" + }, + "account_name": { + "description": "受取人名(カナ)", + "type": "string" + } + } + }, + "payment_term_attributes": { + "type": "object", + "properties": { + "cutoff_day": { + "description": "締め日(29, 30, 31日の末日を指定する場合は、32を指定してください。)", + "type": "number" + }, + "additional_months": { + "description": "支払月", + "type": "number" + }, + "fixed_day": { + "description": "支払日(29, 30, 31日の末日を指定する場合は、32を指定してください。)", + "type": "number" + } + } + }, + "invoice_payment_term_attributes": { + "type": "object", + "properties": { + "cutoff_day": { + "description": "締め日(29, 30, 31日の末日を指定する場合は、32を指定してください。)", + "type": "number" + }, + "additional_months": { + "description": "支払月", + "type": "number" + }, + "fixed_day": { + "description": "支払日(29, 30, 31日の末日を指定する場合は、32を指定してください。)", + "type": "number" + } + } + } + }, + "required": [ + "company_id", + "name" + ] + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "partner": { + "type": "object", + "properties": { + "id": { + "description": "取引先ID", + "type": "number" + }, + "code": { + "description": "取引先コード", + "type": [ + "null", + "string" + ] + }, + "company_id": { + "description": "事業所ID", + "type": "number" + }, + "name": { + "description": "取引先名", + "type": "string" + }, + "shortcut1": { + "description": "ショートカット1 (20文字以内)", + "type": [ + "null", + "string" + ] + }, + "shortcut2": { + "description": "ショートカット2 (20文字以内)", + "type": [ + "null", + "string" + ] + }, + "long_name": { + "description": "正式名称(255文字以内)", + "type": [ + "null", + "string" + ] + }, + "name_kana": { + "description": "カナ名称(255文字以内)", + "type": [ + "null", + "string" + ] + }, + "default_title": { + "description": "敬称(御中、様、(空白)の3つから選択)", + "type": [ + "null", + "string" + ] + }, + "phone": { + "description": "電話番号", + "type": [ + "null", + "string" + ] + }, + "contact_name": { + "description": "担当者 氏名", + "type": [ + "null", + "string" + ] + }, + "email": { + "description": "担当者 メールアドレス", + "type": [ + "null", + "string" + ] + }, + "payer_walletable_id": { + "description": "振込元口座ID(一括振込ファイル用):(未設定の場合は、nullです。)", + "type": [ + "null", + "number" + ] + }, + "transfer_fee_handling_side": { + "description": "振込手数料負担(一括振込ファイル用): (振込元(当方): payer, 振込先(先方): payee)", + "enum": [ + "payee", + "payer" + ], + "type": "string" + }, + "address_attributes[zipcode]": { + "description": "郵便番号", + "type": [ + "null", + "string" + ] + }, + "address_attributes[prefecture_code]": { + "description": "都道府県コード(0:北海道、1:青森、2:岩手、3:宮城、4:秋田、5:山形、6:福島、7:茨城、8:栃木、9:群馬、10:埼玉、11:千葉、12:東京、13:神奈川、14:新潟、15:富山、16:石川、17:福井、18:山梨、19:長野、20:岐阜、21:静岡、22:愛知、23:三重、24:滋賀、25:京都、26:大阪、27:兵庫、28:奈良、29:和歌山、30:鳥取、31:島根、32:岡山、33:広島、34:山口、35:徳島、36:香川、37:愛媛、38:高知、39:福岡、40:佐賀、41:長崎、42:熊本、43:大分、44:宮崎、45:鹿児島、46:沖縄", + "type": "number" + }, + "address_attributes[street_name1]": { + "description": "市区町村・番地", + "type": [ + "null", + "string" + ] + }, + "address_attributes[street_name2]": { + "description": "建物名・部屋番号など", + "type": [ + "null", + "string" + ] + }, + "partner_doc_setting_attributes[sending_method]": { + "description": "請求書送付方法(email:メール、posting:郵送、email_and_posting:メールと郵送)", + "anyOf": [ + { + "enum": [ + "email", + "email_and_posting", + "posting" + ], + "type": "string" + }, + { + "type": "null" + } + ] + }, + "partner_bank_account_attributes[bank_name]": { + "description": "銀行名", + "type": [ + "null", + "string" + ] + }, + "partner_bank_account_attributes[bank_name_kana]": { + "description": "銀行名(カナ)", + "type": [ + "null", + "string" + ] + }, + "partner_bank_account_attributes[bank_code]": { + "description": "銀行番号", + "type": [ + "null", + "string" + ] + }, + "partner_bank_account_attributes[branch_name]": { + "description": "支店名", + "type": [ + "null", + "string" + ] + }, + "partner_bank_account_attributes[branch_kana]": { + "description": "支店名(カナ)", + "type": [ + "null", + "string" + ] + }, + "partner_bank_account_attributes[branch_code]": { + "description": "受取人名(カナ)", + "type": [ + "null", + "string" + ] + }, + "partner_bank_account_attributes[account_type]": { + "description": "口座種別(ordinary:普通、checking:当座、earmarked:納税準備預金、savings:貯蓄、other:その他)", + "anyOf": [ + { + "enum": [ + "checking", + "earmarked", + "ordinary", + "other", + "savings" + ], + "type": "string" + }, + { + "type": "null" + } + ] + }, + "partner_bank_account_attributes[account_number]": { + "description": "口座番号", + "type": [ + "null", + "string" + ] + }, + "partner_bank_account_attributes[account_name]": { + "description": "受取人名(カナ)", + "type": [ + "null", + "string" + ] + }, + "partner_bank_account_attributes[long_account_name]": { + "description": "受取人名", + "type": [ + "null", + "string" + ] + }, + "payment_term_attributes[cutoff_day]": { + "description": "締め日(29, 30, 31日の末日を指定する場合は、32。)", + "type": [ + "null", + "number" + ] + }, + "payment_term_attributes[additional_months]": { + "description": "支払月", + "type": [ + "null", + "number" + ] + }, + "payment_term_attributes[fixed_day]": { + "description": "支払日(29, 30, 31日の末日を指定する場合は、32。)", + "type": [ + "null", + "number" + ] + }, + "invoice_payment_term_attributes[cutoff_day]": { + "description": "締め日(29, 30, 31日の末日を指定する場合は、32。)", + "type": [ + "null", + "number" + ] + }, + "invoice_payment_term_attributes[additional_months]": { + "description": "支払月", + "type": [ + "null", + "number" + ] + }, + "invoice_payment_term_attributes[fixed_day]": { + "description": "支払日(29, 30, 31日の末日を指定する場合は、32。)", + "type": [ + "null", + "number" + ] + } + }, + "required": [ + "code", + "company_id", + "id", + "name" + ] + } + }, + "required": [ + "partner" + ] + } + } + } + } + } + } + }, + "samples/freee/api/1/quotations/{id}": { + "get": { + "tags": [ + "api", + "1", + "quotations" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "number" + } + }, + { + "name": "company_id", + "in": "query", + "required": true, + "schema": { + "description": "事業所ID", + "type": "number" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "quotation": { + "type": "object", + "properties": { + "id": { + "description": "見積書ID", + "type": "number" + }, + "company_id": { + "description": "事業所ID", + "type": "number" + }, + "issue_date": { + "description": "見積日 (yyyy-mm-dd)", + "type": "string" + }, + "partner_id": { + "description": "取引先ID", + "type": [ + "null", + "number" + ] + }, + "partner_code": { + "description": "取引先コード", + "type": [ + "null", + "string" + ] + }, + "quotation_number": { + "description": "見積書番号", + "type": "string" + }, + "title": { + "description": "タイトル", + "type": [ + "null", + "string" + ] + }, + "total_amount": { + "description": "合計金額", + "type": "number" + }, + "total_vat": { + "description": "消費税", + "type": "number" + }, + "sub_total": { + "description": "小計", + "type": "number" + }, + "description": { + "description": "概要", + "type": [ + "null", + "string" + ] + }, + "quotation_status": { + "description": "見積書ステータス (unsubmitted: 送付待ち, submitted: 送付済み, all: 全て)", + "enum": [ + "all", + "submitted", + "unsubmitted" + ], + "type": "string" + }, + "web_published_at": { + "description": "Web共有日時(最新)", + "type": [ + "null", + "string" + ] + }, + "web_downloaded_at": { + "description": "Web共有ダウンロード日時(最新)", + "type": [ + "null", + "string" + ] + }, + "web_confirmed_at": { + "description": "Web共有取引先確認日時(最新)", + "type": [ + "null", + "string" + ] + }, + "mail_sent_at": { + "description": "メール送信日時(最新)", + "type": [ + "null", + "string" + ] + }, + "partner_name": { + "description": "取引先名", + "type": [ + "null", + "string" + ] + }, + "partner_display_name": { + "description": "取引先正式名称", + "type": [ + "null", + "string" + ] + }, + "partner_title": { + "description": "敬称(御中、様、(空白)の3つから選択)", + "anyOf": [ + { + "enum": [ + "(空白)", + "御中", + "様" + ], + "type": "string" + }, + { + "type": "null" + } + ] + }, + "partner_zipcode": { + "description": "郵便番号", + "type": [ + "null", + "string" + ] + }, + "partner_prefecture_code": { + "description": "都道府県コード(0:北海道、1:青森、2:岩手、3:宮城、4:秋田、5:山形、6:福島、7:茨城、8:栃木、9:群馬、10:埼玉、11:千葉、12:東京、13:神奈川、14:新潟、15:富山、16:石川、17:福井、18:山梨、19:長野、20:岐阜、21:静岡、22:愛知、23:三重、24:滋賀、25:京都、26:大阪、27:兵庫、28:奈良、29:和歌山、30:鳥取、31:島根、32:岡山、33:広島、34:山口、35:徳島、36:香川、37:愛媛、38:高知、39:福岡、40:佐賀、41:長崎、42:熊本、43:大分、44:宮崎、45:鹿児島、46:沖縄", + "type": [ + "null", + "number" + ] + }, + "partner_prefecture_name": { + "description": "都道府県", + "type": [ + "null", + "string" + ] + }, + "partner_address1": { + "description": "市区町村・番地", + "type": [ + "null", + "string" + ] + }, + "partner_address2": { + "description": "建物名・部屋番号など", + "type": [ + "null", + "string" + ] + }, + "partner_contact_info": { + "description": "取引先担当者名", + "type": [ + "null", + "string" + ] + }, + "company_name": { + "description": "事業所名", + "type": "string" + }, + "company_zipcode": { + "description": "郵便番号", + "type": [ + "null", + "string" + ] + }, + "company_prefecture_code": { + "description": "都道府県コード(0:北海道、1:青森、2:岩手、3:宮城、4:秋田、5:山形、6:福島、7:茨城、8:栃木、9:群馬、10:埼玉、11:千葉、12:東京、13:神奈川、14:新潟、15:富山、16:石川、17:福井、18:山梨、19:長野、20:岐阜、21:静岡、22:愛知、23:三重、24:滋賀、25:京都、26:大阪、27:兵庫、28:奈良、29:和歌山、30:鳥取、31:島根、32:岡山、33:広島、34:山口、35:徳島、36:香川、37:愛媛、38:高知、39:福岡、40:佐賀、41:長崎、42:熊本、43:大分、44:宮崎、45:鹿児島、46:沖縄", + "type": [ + "null", + "number" + ] + }, + "company_prefecture_name": { + "description": "都道府県", + "type": [ + "null", + "string" + ] + }, + "company_address1": { + "description": "市区町村・番地", + "type": [ + "null", + "string" + ] + }, + "company_address2": { + "description": "建物名・部屋番号など", + "type": [ + "null", + "string" + ] + }, + "company_contact_info": { + "description": "事業所担当者名", + "type": [ + "null", + "string" + ] + }, + "message": { + "description": "メッセージ", + "type": [ + "null", + "string" + ] + }, + "notes": { + "description": "備考", + "type": [ + "null", + "string" + ] + }, + "quotation_layout": { + "description": "レイアウト(default_classic: レイアウト1/クラシック, standard_classic: レイアウト2/クラシック, envelope_classic: 封筒1/クラシック, carried_forward_standard_classic: レイアウト3(繰越金額欄あり)/クラシック, carried_forward_envelope_classic: 封筒2(繰越金額欄あり)/クラシック, default_modern: レイアウト1/モダン, standard_modern: レイアウト2/モダン, envelope_modern: 封筒/モダン)", + "enum": [ + "carried_forward_envelope_classic", + "carried_forward_standard_classic", + "default_classic", + "default_modern", + "envelope_classic", + "envelope_modern", + "standard_classic", + "standard_modern" + ], + "type": "string" + }, + "tax_entry_method": { + "description": "見積書の消費税計算方法(inclusive: 内税, exclusive: 外税)", + "enum": [ + "", + "exclusive", + "inclusive" + ], + "type": "string" + }, + "quotation_contents": { + "description": "見積内容", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "見積内容ID", + "type": "number" + }, + "order": { + "description": "順序", + "type": "number" + }, + "type": { + "description": "行の種類", + "enum": [ + "discount", + "normal", + "text" + ], + "type": "string" + }, + "qty": { + "description": "数量", + "type": "number" + }, + "unit": { + "description": "単位", + "type": [ + "null", + "string" + ] + }, + "unit_price": { + "description": "単価", + "type": "number" + }, + "amount": { + "description": "金額", + "type": "number" + }, + "vat": { + "description": "消費税額", + "type": "number" + }, + "reduced_vat": { + "description": "軽減税率税区分(true: 対象、false: 対象外)", + "type": "boolean" + }, + "description": { + "description": "備考", + "type": [ + "null", + "string" + ] + }, + "account_item_id": { + "description": "勘定科目ID", + "type": [ + "null", + "number" + ] + }, + "account_item_name": { + "description": "勘定科目名", + "type": [ + "null", + "string" + ] + }, + "tax_code": { + "description": "税区分コード", + "type": [ + "null", + "number" + ] + }, + "item_id": { + "description": "品目ID", + "type": [ + "null", + "number" + ] + }, + "item_name": { + "description": "品目", + "type": [ + "null", + "string" + ] + }, + "section_id": { + "description": "部門ID", + "type": [ + "null", + "number" + ] + }, + "section_name": { + "description": "部門", + "type": [ + "null", + "string" + ] + }, + "tag_ids": { + "type": "array", + "items": { + "type": "number" + } + }, + "tag_names": { + "type": "array", + "items": { + "type": "string" + } + }, + "segment_1_tag_id": { + "description": "セグメント1ID", + "type": [ + "null", + "number" + ] + }, + "segment_1_tag_name": { + "description": "セグメント1ID", + "type": [ + "null", + "string" + ] + }, + "segment_2_tag_id": { + "description": "セグメント2ID", + "type": [ + "null", + "number" + ] + }, + "segment_2_tag_name": { + "description": "セグメント2", + "type": [ + "null", + "string" + ] + }, + "segment_3_tag_id": { + "description": "セグメント3ID", + "type": [ + "null", + "number" + ] + }, + "segment_3_tag_name": { + "description": "セグメント3", + "type": [ + "null", + "string" + ] + } + }, + "required": [ + "account_item_id", + "account_item_name", + "amount", + "description", + "id", + "item_id", + "item_name", + "order", + "qty", + "reduced_vat", + "section_id", + "section_name", + "tag_ids", + "tag_names", + "tax_code", + "type", + "unit", + "unit_price", + "vat" + ] + } + }, + "total_amount_per_vat_rate": { + "type": "object", + "properties": { + "vat_5": { + "description": "税率5%の税込み金額合計", + "type": "number" + }, + "vat_8": { + "description": "税率8%の税込み金額合計", + "type": "number" + }, + "reduced_vat_8": { + "description": "軽減税率8%の税込み金額合計", + "type": "number" + }, + "vat_10": { + "description": "税率10%の税込み金額合計", + "type": "number" + } + }, + "required": [ + "reduced_vat_8", + "vat_10", + "vat_5", + "vat_8" + ] + } + }, + "required": [ + "company_id", + "company_name", + "id", + "issue_date", + "partner_id", + "partner_title", + "quotation_layout", + "quotation_number", + "quotation_status", + "tax_entry_method", + "total_amount", + "total_amount_per_vat_rate" + ] + } + }, + "required": [ + "quotation" + ] + } + } + } + } + } + }, + "put": { + "tags": [ + "api", + "1", + "quotations" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "number" + } + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "description": "見積書の更新", + "type": "object", + "properties": { + "company_id": { + "description": "事業所ID", + "type": "number" + }, + "issue_date": { + "description": "見積日 (yyyy-mm-dd)", + "type": "string" + }, + "partner_id": { + "description": "取引先ID", + "type": [ + "null", + "number" + ] + }, + "partner_code": { + "description": "取引先コード", + "type": [ + "null", + "string" + ] + }, + "quotation_number": { + "description": "見積書番号 (デフォルト: 自動採番されます)", + "type": "string" + }, + "title": { + "description": "タイトル (デフォルト: 見積書)", + "type": "string" + }, + "description": { + "description": "概要", + "type": "string" + }, + "quotation_status": { + "description": "見積書ステータス (unsubmitted: 送付待ち, submitted: 送付済み)", + "enum": [ + "submitted", + "unsubmitted" + ], + "type": "string" + }, + "partner_display_name": { + "description": "見積書に表示する取引先名", + "type": "string" + }, + "partner_title": { + "description": "敬称(御中、様、(空白)の3つから選択)", + "type": "string" + }, + "partner_contact_info": { + "description": "取引先担当者名", + "type": [ + "null", + "string" + ] + }, + "partner_zipcode": { + "description": "取引先郵便番号 (デフォルトはpartner_idもしくははpartner_codeで指定された取引先設定情報が補完されます)", + "type": [ + "null", + "string" + ] + }, + "partner_prefecture_code": { + "description": "取引先都道府県コード(0:北海道、1:青森、2:岩手、3:宮城、4:秋田、5:山形、6:福島、7:茨城、8:栃木、9:群馬、10:埼玉、11:千葉、12:東京、13:神奈川、14:新潟、15:富山、16:石川、17:福井、18:山梨、19:長野、20:岐阜、21:静岡、22:愛知、23:三重、24:滋賀、25:京都、26:大阪、27:兵庫、28:奈良、29:和歌山、30:鳥取、31:島根、32:岡山、33:広島、34:山口、35:徳島、36:香川、37:愛媛、38:高知、39:福岡、40:佐賀、41:長崎、42:熊本、43:大分、44:宮崎、45:鹿児島、46:沖縄) (デフォルトはpartner_idもしくはpartner_codeで指定された取引先設定情報が補完されます)", + "type": [ + "null", + "number" + ] + }, + "partner_address1": { + "description": "取引先市区町村・番地 (デフォルトはpartner_idもしくははpartner_codeで指定された取引先設定情報が補完されます)", + "type": [ + "null", + "string" + ] + }, + "partner_address2": { + "description": "取引先建物名・部屋番号など (デフォルトはpartner_idもしくははpartner_codeで指定された取引先設定情報が補完されます)", + "type": [ + "null", + "string" + ] + }, + "company_name": { + "description": "事業所名 (デフォルトは事業所設定情報が補完されます)", + "type": "string" + }, + "company_zipcode": { + "description": "郵便番号 (デフォルトは事業所設定情報が補完されます)", + "type": "string" + }, + "company_prefecture_code": { + "description": "都道府県コード(0:北海道、1:青森、2:岩手、3:宮城、4:秋田、5:山形、6:福島、7:茨城、8:栃木、9:群馬、10:埼玉、11:千葉、12:東京、13:神奈川、14:新潟、15:富山、16:石川、17:福井、18:山梨、19:長野、20:岐阜、21:静岡、22:愛知、23:三重、24:滋賀、25:京都、26:大阪、27:兵庫、28:奈良、29:和歌山、30:鳥取、31:島根、32:岡山、33:広島、34:山口、35:徳島、36:香川、37:愛媛、38:高知、39:福岡、40:佐賀、41:長崎、42:熊本、43:大分、44:宮崎、45:鹿児島、46:沖縄) (デフォルトは事業所設定情報が補完されます)", + "type": "number" + }, + "company_address1": { + "description": "市区町村・番地 (デフォルトは事業所設定情報が補完されます)", + "type": "string" + }, + "company_address2": { + "description": "建物名・部屋番号など (デフォルトは事業所設定情報が補完されます)", + "type": "string" + }, + "company_contact_info": { + "description": "事業所担当者名 (デフォルトは事業所設定情報が補完されます)", + "type": "string" + }, + "message": { + "description": "メッセージ (デフォルト: 下記の通り御見積申し上げます。)", + "type": "string" + }, + "notes": { + "description": "備考", + "type": "string" + }, + "quotation_layout": { + "description": "レイアウト(default_classic: レイアウト1/クラシック (デフォルト), standard_classic: レイアウト2/クラシック, envelope_classic: 封筒1/クラシック, default_modern: レイアウト1/モダン, standard_modern: レイアウト2/モダン, envelope_modern: 封筒/モダン)", + "enum": [ + "default_classic", + "default_modern", + "envelope_classic", + "envelope_modern", + "standard_classic", + "standard_modern" + ], + "type": "string" + }, + "tax_entry_method": { + "description": "見積書の消費税計算方法(inclusive: 内税表示, exclusive: 外税表示 (デフォルト))", + "enum": [ + "exclusive", + "inclusive" + ], + "type": "string" + }, + "quotation_contents": { + "description": "見積内容", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "見積内容ID", + "type": "number" + }, + "order": { + "description": "順序", + "type": "number" + }, + "type": { + "description": "行の種類", + "enum": [ + "discount", + "normal", + "text" + ], + "type": "string" + }, + "qty": { + "description": "数量", + "type": "number" + }, + "unit": { + "description": "単位", + "type": "string" + }, + "unit_price": { + "description": "単価 (tax_entry_method: inclusiveの場合は税込価格、tax_entry_method: exclusiveの場合は税抜価格となります)", + "type": "number" + }, + "vat": { + "description": "消費税額", + "type": [ + "null", + "number" + ] + }, + "description": { + "description": "備考", + "type": "string" + }, + "account_item_id": { + "description": "勘定科目ID", + "type": "number" + }, + "tax_code": { + "description": "税区分ID", + "type": "number" + }, + "item_id": { + "description": "品目ID", + "type": "number" + }, + "section_id": { + "description": "部門ID", + "type": "number" + }, + "tag_ids": { + "type": "array", + "items": { + "type": "number" + } + }, + "segment_1_tag_id": { + "description": "セグメント1ID", + "type": "number" + }, + "segment_2_tag_id": { + "description": "セグメント2ID", + "type": "number" + }, + "segment_3_tag_id": { + "description": "セグメント3ID", + "type": "number" + } + }, + "required": [ + "order", + "type" + ] + } + } + }, + "required": [ + "company_id", + "partner_display_name", + "partner_title" + ] + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "quotation": { + "type": "object", + "properties": { + "id": { + "description": "見積書ID", + "type": "number" + }, + "company_id": { + "description": "事業所ID", + "type": "number" + }, + "issue_date": { + "description": "見積日 (yyyy-mm-dd)", + "type": "string" + }, + "partner_id": { + "description": "取引先ID", + "type": [ + "null", + "number" + ] + }, + "partner_code": { + "description": "取引先コード", + "type": [ + "null", + "string" + ] + }, + "quotation_number": { + "description": "見積書番号", + "type": "string" + }, + "title": { + "description": "タイトル", + "type": [ + "null", + "string" + ] + }, + "total_amount": { + "description": "合計金額", + "type": "number" + }, + "total_vat": { + "description": "消費税", + "type": "number" + }, + "sub_total": { + "description": "小計", + "type": "number" + }, + "description": { + "description": "概要", + "type": [ + "null", + "string" + ] + }, + "quotation_status": { + "description": "見積書ステータス (unsubmitted: 送付待ち, submitted: 送付済み, all: 全て)", + "enum": [ + "all", + "submitted", + "unsubmitted" + ], + "type": "string" + }, + "web_published_at": { + "description": "Web共有日時(最新)", + "type": [ + "null", + "string" + ] + }, + "web_downloaded_at": { + "description": "Web共有ダウンロード日時(最新)", + "type": [ + "null", + "string" + ] + }, + "web_confirmed_at": { + "description": "Web共有取引先確認日時(最新)", + "type": [ + "null", + "string" + ] + }, + "mail_sent_at": { + "description": "メール送信日時(最新)", + "type": [ + "null", + "string" + ] + }, + "partner_name": { + "description": "取引先名", + "type": [ + "null", + "string" + ] + }, + "partner_display_name": { + "description": "取引先正式名称", + "type": [ + "null", + "string" + ] + }, + "partner_title": { + "description": "敬称(御中、様、(空白)の3つから選択)", + "anyOf": [ + { + "enum": [ + "(空白)", + "御中", + "様" + ], + "type": "string" + }, + { + "type": "null" + } + ] + }, + "partner_zipcode": { + "description": "郵便番号", + "type": [ + "null", + "string" + ] + }, + "partner_prefecture_code": { + "description": "都道府県コード(0:北海道、1:青森、2:岩手、3:宮城、4:秋田、5:山形、6:福島、7:茨城、8:栃木、9:群馬、10:埼玉、11:千葉、12:東京、13:神奈川、14:新潟、15:富山、16:石川、17:福井、18:山梨、19:長野、20:岐阜、21:静岡、22:愛知、23:三重、24:滋賀、25:京都、26:大阪、27:兵庫、28:奈良、29:和歌山、30:鳥取、31:島根、32:岡山、33:広島、34:山口、35:徳島、36:香川、37:愛媛、38:高知、39:福岡、40:佐賀、41:長崎、42:熊本、43:大分、44:宮崎、45:鹿児島、46:沖縄", + "type": [ + "null", + "number" + ] + }, + "partner_prefecture_name": { + "description": "都道府県", + "type": [ + "null", + "string" + ] + }, + "partner_address1": { + "description": "市区町村・番地", + "type": [ + "null", + "string" + ] + }, + "partner_address2": { + "description": "建物名・部屋番号など", + "type": [ + "null", + "string" + ] + }, + "partner_contact_info": { + "description": "取引先担当者名", + "type": [ + "null", + "string" + ] + }, + "company_name": { + "description": "事業所名", + "type": "string" + }, + "company_zipcode": { + "description": "郵便番号", + "type": [ + "null", + "string" + ] + }, + "company_prefecture_code": { + "description": "都道府県コード(0:北海道、1:青森、2:岩手、3:宮城、4:秋田、5:山形、6:福島、7:茨城、8:栃木、9:群馬、10:埼玉、11:千葉、12:東京、13:神奈川、14:新潟、15:富山、16:石川、17:福井、18:山梨、19:長野、20:岐阜、21:静岡、22:愛知、23:三重、24:滋賀、25:京都、26:大阪、27:兵庫、28:奈良、29:和歌山、30:鳥取、31:島根、32:岡山、33:広島、34:山口、35:徳島、36:香川、37:愛媛、38:高知、39:福岡、40:佐賀、41:長崎、42:熊本、43:大分、44:宮崎、45:鹿児島、46:沖縄", + "type": [ + "null", + "number" + ] + }, + "company_prefecture_name": { + "description": "都道府県", + "type": [ + "null", + "string" + ] + }, + "company_address1": { + "description": "市区町村・番地", + "type": [ + "null", + "string" + ] + }, + "company_address2": { + "description": "建物名・部屋番号など", + "type": [ + "null", + "string" + ] + }, + "company_contact_info": { + "description": "事業所担当者名", + "type": [ + "null", + "string" + ] + }, + "message": { + "description": "メッセージ", + "type": [ + "null", + "string" + ] + }, + "notes": { + "description": "備考", + "type": [ + "null", + "string" + ] + }, + "quotation_layout": { + "description": "レイアウト(default_classic: レイアウト1/クラシック, standard_classic: レイアウト2/クラシック, envelope_classic: 封筒1/クラシック, carried_forward_standard_classic: レイアウト3(繰越金額欄あり)/クラシック, carried_forward_envelope_classic: 封筒2(繰越金額欄あり)/クラシック, default_modern: レイアウト1/モダン, standard_modern: レイアウト2/モダン, envelope_modern: 封筒/モダン)", + "enum": [ + "carried_forward_envelope_classic", + "carried_forward_standard_classic", + "default_classic", + "default_modern", + "envelope_classic", + "envelope_modern", + "standard_classic", + "standard_modern" + ], + "type": "string" + }, + "tax_entry_method": { + "description": "見積書の消費税計算方法(inclusive: 内税, exclusive: 外税)", + "enum": [ + "", + "exclusive", + "inclusive" + ], + "type": "string" + }, + "quotation_contents": { + "description": "見積内容", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "見積内容ID", + "type": "number" + }, + "order": { + "description": "順序", + "type": "number" + }, + "type": { + "description": "行の種類", + "enum": [ + "discount", + "normal", + "text" + ], + "type": "string" + }, + "qty": { + "description": "数量", + "type": "number" + }, + "unit": { + "description": "単位", + "type": [ + "null", + "string" + ] + }, + "unit_price": { + "description": "単価", + "type": "number" + }, + "amount": { + "description": "金額", + "type": "number" + }, + "vat": { + "description": "消費税額", + "type": "number" + }, + "reduced_vat": { + "description": "軽減税率税区分(true: 対象、false: 対象外)", + "type": "boolean" + }, + "description": { + "description": "備考", + "type": [ + "null", + "string" + ] + }, + "account_item_id": { + "description": "勘定科目ID", + "type": [ + "null", + "number" + ] + }, + "account_item_name": { + "description": "勘定科目名", + "type": [ + "null", + "string" + ] + }, + "tax_code": { + "description": "税区分コード", + "type": [ + "null", + "number" + ] + }, + "item_id": { + "description": "品目ID", + "type": [ + "null", + "number" + ] + }, + "item_name": { + "description": "品目", + "type": [ + "null", + "string" + ] + }, + "section_id": { + "description": "部門ID", + "type": [ + "null", + "number" + ] + }, + "section_name": { + "description": "部門", + "type": [ + "null", + "string" + ] + }, + "tag_ids": { + "type": "array", + "items": { + "type": "number" + } + }, + "tag_names": { + "type": "array", + "items": { + "type": "string" + } + }, + "segment_1_tag_id": { + "description": "セグメント1ID", + "type": [ + "null", + "number" + ] + }, + "segment_1_tag_name": { + "description": "セグメント1ID", + "type": [ + "null", + "string" + ] + }, + "segment_2_tag_id": { + "description": "セグメント2ID", + "type": [ + "null", + "number" + ] + }, + "segment_2_tag_name": { + "description": "セグメント2", + "type": [ + "null", + "string" + ] + }, + "segment_3_tag_id": { + "description": "セグメント3ID", + "type": [ + "null", + "number" + ] + }, + "segment_3_tag_name": { + "description": "セグメント3", + "type": [ + "null", + "string" + ] + } + }, + "required": [ + "account_item_id", + "account_item_name", + "amount", + "description", + "id", + "item_id", + "item_name", + "order", + "qty", + "reduced_vat", + "section_id", + "section_name", + "tag_ids", + "tag_names", + "tax_code", + "type", + "unit", + "unit_price", + "vat" + ] + } + }, + "total_amount_per_vat_rate": { + "type": "object", + "properties": { + "vat_5": { + "description": "税率5%の税込み金額合計", + "type": "number" + }, + "vat_8": { + "description": "税率8%の税込み金額合計", + "type": "number" + }, + "reduced_vat_8": { + "description": "軽減税率8%の税込み金額合計", + "type": "number" + }, + "vat_10": { + "description": "税率10%の税込み金額合計", + "type": "number" + } + }, + "required": [ + "reduced_vat_8", + "vat_10", + "vat_5", + "vat_8" + ] + } + }, + "required": [ + "company_id", + "company_name", + "id", + "issue_date", + "partner_id", + "partner_title", + "quotation_layout", + "quotation_number", + "quotation_status", + "tax_entry_method", + "total_amount", + "total_amount_per_vat_rate" + ] + } + }, + "required": [ + "quotation" + ] + } + } + } + } + } + }, + "delete": { + "tags": [ + "api", + "1", + "quotations" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "number" + } + }, + { + "name": "company_id", + "in": "query", + "required": true, + "schema": { + "description": "事業所ID", + "type": "number" + } + } + ] + } + }, + "samples/freee/api/1/quotations": { + "get": { + "tags": [ + "api", + "1", + "quotations" + ], + "parameters": [ + { + "name": "company_id", + "in": "query", + "required": true, + "schema": { + "description": "事業所ID", + "type": "number" + } + }, + { + "name": "partner_id", + "in": "query", + "required": false, + "schema": { + "description": "取引先IDで絞込", + "type": "number" + } + }, + { + "name": "partner_code", + "in": "query", + "required": false, + "schema": { + "description": "取引先コードで絞込", + "type": "string" + } + }, + { + "name": "start_issue_date", + "in": "query", + "required": false, + "schema": { + "description": "見積日の開始日(yyyy-mm-dd)", + "type": "string" + } + }, + { + "name": "end_issue_date", + "in": "query", + "required": false, + "schema": { + "description": "見積日の終了日(yyyy-mm-dd)", + "type": "string" + } + }, + { + "name": "quotation_number", + "in": "query", + "required": false, + "schema": { + "description": "見積書番号", + "type": "string" + } + }, + { + "name": "description", + "in": "query", + "required": false, + "schema": { + "description": "概要", + "type": "string" + } + }, + { + "name": "quotation_status", + "in": "query", + "required": false, + "schema": { + "description": "見積書ステータス (unsubmitted: 送付待ち, submitted: 送付済み, all: 全て)", + "enum": [ + "all", + "submitted", + "unsubmitted" + ], + "type": "string" + } + }, + { + "name": "offset", + "in": "query", + "required": false, + "schema": { + "description": "取得レコードのオフセット (デフォルト: 0)", + "type": "number" + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "description": "取得レコードの件数 (デフォルト: 20, 最大: 100)", + "type": "number" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "quotations": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "見積書ID", + "type": "number" + }, + "company_id": { + "description": "事業所ID", + "type": "number" + }, + "issue_date": { + "description": "見積日 (yyyy-mm-dd)", + "type": "string" + }, + "partner_id": { + "description": "取引先ID", + "type": [ + "null", + "number" + ] + }, + "partner_code": { + "description": "取引先コード", + "type": [ + "null", + "string" + ] + }, + "quotation_number": { + "description": "見積書番号", + "type": "string" + }, + "title": { + "description": "タイトル", + "type": [ + "null", + "string" + ] + }, + "total_amount": { + "description": "合計金額", + "type": "number" + }, + "total_vat": { + "description": "消費税", + "type": "number" + }, + "sub_total": { + "description": "小計", + "type": "number" + }, + "description": { + "description": "概要", + "type": [ + "null", + "string" + ] + }, + "quotation_status": { + "description": "見積書ステータス (unsubmitted: 送付待ち, submitted: 送付済み, all: 全て)", + "enum": [ + "all", + "submitted", + "unsubmitted" + ], + "type": "string" + }, + "web_published_at": { + "description": "Web共有日時(最新)", + "type": [ + "null", + "string" + ] + }, + "web_downloaded_at": { + "description": "Web共有ダウンロード日時(最新)", + "type": [ + "null", + "string" + ] + }, + "web_confirmed_at": { + "description": "Web共有取引先確認日時(最新)", + "type": [ + "null", + "string" + ] + }, + "mail_sent_at": { + "description": "メール送信日時(最新)", + "type": [ + "null", + "string" + ] + }, + "partner_name": { + "description": "取引先名", + "type": [ + "null", + "string" + ] + }, + "partner_display_name": { + "description": "取引先正式名称", + "type": [ + "null", + "string" + ] + }, + "partner_title": { + "description": "敬称(御中、様、(空白)の3つから選択)", + "anyOf": [ + { + "enum": [ + "(空白)", + "御中", + "様" + ], + "type": "string" + }, + { + "type": "null" + } + ] + }, + "partner_zipcode": { + "description": "郵便番号", + "type": [ + "null", + "string" + ] + }, + "partner_prefecture_code": { + "description": "都道府県コード(0:北海道、1:青森、2:岩手、3:宮城、4:秋田、5:山形、6:福島、7:茨城、8:栃木、9:群馬、10:埼玉、11:千葉、12:東京、13:神奈川、14:新潟、15:富山、16:石川、17:福井、18:山梨、19:長野、20:岐阜、21:静岡、22:愛知、23:三重、24:滋賀、25:京都、26:大阪、27:兵庫、28:奈良、29:和歌山、30:鳥取、31:島根、32:岡山、33:広島、34:山口、35:徳島、36:香川、37:愛媛、38:高知、39:福岡、40:佐賀、41:長崎、42:熊本、43:大分、44:宮崎、45:鹿児島、46:沖縄", + "type": [ + "null", + "number" + ] + }, + "partner_prefecture_name": { + "description": "都道府県", + "type": [ + "null", + "string" + ] + }, + "partner_address1": { + "description": "市区町村・番地", + "type": [ + "null", + "string" + ] + }, + "partner_address2": { + "description": "建物名・部屋番号など", + "type": [ + "null", + "string" + ] + }, + "partner_contact_info": { + "description": "取引先担当者名", + "type": [ + "null", + "string" + ] + }, + "company_name": { + "description": "事業所名", + "type": "string" + }, + "company_zipcode": { + "description": "郵便番号", + "type": [ + "null", + "string" + ] + }, + "company_prefecture_code": { + "description": "都道府県コード(0:北海道、1:青森、2:岩手、3:宮城、4:秋田、5:山形、6:福島、7:茨城、8:栃木、9:群馬、10:埼玉、11:千葉、12:東京、13:神奈川、14:新潟、15:富山、16:石川、17:福井、18:山梨、19:長野、20:岐阜、21:静岡、22:愛知、23:三重、24:滋賀、25:京都、26:大阪、27:兵庫、28:奈良、29:和歌山、30:鳥取、31:島根、32:岡山、33:広島、34:山口、35:徳島、36:香川、37:愛媛、38:高知、39:福岡、40:佐賀、41:長崎、42:熊本、43:大分、44:宮崎、45:鹿児島、46:沖縄", + "type": [ + "null", + "number" + ] + }, + "company_prefecture_name": { + "description": "都道府県", + "type": [ + "null", + "string" + ] + }, + "company_address1": { + "description": "市区町村・番地", + "type": [ + "null", + "string" + ] + }, + "company_address2": { + "description": "建物名・部屋番号など", + "type": [ + "null", + "string" + ] + }, + "company_contact_info": { + "description": "事業所担当者名", + "type": [ + "null", + "string" + ] + }, + "message": { + "description": "メッセージ", + "type": [ + "null", + "string" + ] + }, + "notes": { + "description": "備考", + "type": [ + "null", + "string" + ] + }, + "quotation_layout": { + "description": "レイアウト(default_classic: レイアウト1/クラシック, standard_classic: レイアウト2/クラシック, envelope_classic: 封筒1/クラシック, carried_forward_standard_classic: レイアウト3(繰越金額欄あり)/クラシック, carried_forward_envelope_classic: 封筒2(繰越金額欄あり)/クラシック, default_modern: レイアウト1/モダン, standard_modern: レイアウト2/モダン, envelope_modern: 封筒/モダン)", + "enum": [ + "carried_forward_envelope_classic", + "carried_forward_standard_classic", + "default_classic", + "default_modern", + "envelope_classic", + "envelope_modern", + "standard_classic", + "standard_modern" + ], + "type": "string" + }, + "tax_entry_method": { + "description": "見積書の消費税計算方法(inclusive: 内税, exclusive: 外税)", + "enum": [ + "", + "exclusive", + "inclusive" + ], + "type": "string" + }, + "quotation_contents": { + "description": "見積内容", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "見積内容ID", + "type": "number" + }, + "order": { + "description": "順序", + "type": "number" + }, + "type": { + "description": "行の種類", + "enum": [ + "discount", + "normal", + "text" + ], + "type": "string" + }, + "qty": { + "description": "数量", + "type": "number" + }, + "unit": { + "description": "単位", + "type": [ + "null", + "string" + ] + }, + "unit_price": { + "description": "単価", + "type": "number" + }, + "amount": { + "description": "金額", + "type": "number" + }, + "vat": { + "description": "消費税額", + "type": "number" + }, + "reduced_vat": { + "description": "軽減税率税区分(true: 対象、false: 対象外)", + "type": "boolean" + }, + "description": { + "description": "備考", + "type": [ + "null", + "string" + ] + }, + "account_item_id": { + "description": "勘定科目ID", + "type": [ + "null", + "number" + ] + }, + "account_item_name": { + "description": "勘定科目名", + "type": [ + "null", + "string" + ] + }, + "tax_code": { + "description": "税区分コード", + "type": [ + "null", + "number" + ] + }, + "item_id": { + "description": "品目ID", + "type": [ + "null", + "number" + ] + }, + "item_name": { + "description": "品目", + "type": [ + "null", + "string" + ] + }, + "section_id": { + "description": "部門ID", + "type": [ + "null", + "number" + ] + }, + "section_name": { + "description": "部門", + "type": [ + "null", + "string" + ] + }, + "tag_ids": { + "type": "array", + "items": { + "type": "number" + } + }, + "tag_names": { + "type": "array", + "items": { + "type": "string" + } + }, + "segment_1_tag_id": { + "description": "セグメント1ID", + "type": [ + "null", + "number" + ] + }, + "segment_1_tag_name": { + "description": "セグメント1ID", + "type": [ + "null", + "string" + ] + }, + "segment_2_tag_id": { + "description": "セグメント2ID", + "type": [ + "null", + "number" + ] + }, + "segment_2_tag_name": { + "description": "セグメント2", + "type": [ + "null", + "string" + ] + }, + "segment_3_tag_id": { + "description": "セグメント3ID", + "type": [ + "null", + "number" + ] + }, + "segment_3_tag_name": { + "description": "セグメント3", + "type": [ + "null", + "string" + ] + } + }, + "required": [ + "account_item_id", + "account_item_name", + "amount", + "description", + "id", + "item_id", + "item_name", + "order", + "qty", + "reduced_vat", + "section_id", + "section_name", + "tag_ids", + "tag_names", + "tax_code", + "type", + "unit", + "unit_price", + "vat" + ] + } + }, + "total_amount_per_vat_rate": { + "type": "object", + "properties": { + "vat_5": { + "description": "税率5%の税込み金額合計", + "type": "number" + }, + "vat_8": { + "description": "税率8%の税込み金額合計", + "type": "number" + }, + "reduced_vat_8": { + "description": "軽減税率8%の税込み金額合計", + "type": "number" + }, + "vat_10": { + "description": "税率10%の税込み金額合計", + "type": "number" + } + }, + "required": [ + "reduced_vat_8", + "vat_10", + "vat_5", + "vat_8" + ] + } + }, + "required": [ + "company_id", + "company_name", + "id", + "issue_date", + "partner_id", + "partner_title", + "quotation_layout", + "quotation_number", + "quotation_status", + "tax_entry_method", + "total_amount", + "total_amount_per_vat_rate" + ] + } + } + }, + "required": [ + "quotations" + ] + } + } + } + } + } + }, + "post": { + "tags": [ + "api", + "1", + "quotations" + ], + "parameters": [], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "description": "見積書の作成", + "type": "object", + "properties": { + "company_id": { + "description": "事業所ID", + "type": "number" + }, + "issue_date": { + "description": "見積日 (yyyy-mm-dd)", + "type": "string" + }, + "partner_id": { + "description": "取引先ID", + "type": [ + "null", + "number" + ] + }, + "partner_code": { + "description": "取引先コード", + "type": [ + "null", + "string" + ] + }, + "quotation_number": { + "description": "見積書番号 (デフォルト: 自動採番されます)", + "type": "string" + }, + "title": { + "description": "タイトル (デフォルト: 見積書)", + "type": "string" + }, + "description": { + "description": "概要", + "type": "string" + }, + "quotation_status": { + "description": "見積書ステータス (unsubmitted: 送付待ち, submitted: 送付済み)", + "enum": [ + "submitted", + "unsubmitted" + ], + "type": "string" + }, + "partner_display_name": { + "description": "見積書に表示する取引先名", + "type": "string" + }, + "partner_title": { + "description": "敬称(御中、様、(空白)の3つから選択)", + "type": "string" + }, + "partner_contact_info": { + "description": "取引先担当者名", + "type": [ + "null", + "string" + ] + }, + "partner_zipcode": { + "description": "取引先郵便番号 (デフォルトはpartner_idもしくははpartner_codeで指定された取引先設定情報が補完されます)", + "type": [ + "null", + "string" + ] + }, + "partner_prefecture_code": { + "description": "取引先都道府県コード(0:北海道、1:青森、2:岩手、3:宮城、4:秋田、5:山形、6:福島、7:茨城、8:栃木、9:群馬、10:埼玉、11:千葉、12:東京、13:神奈川、14:新潟、15:富山、16:石川、17:福井、18:山梨、19:長野、20:岐阜、21:静岡、22:愛知、23:三重、24:滋賀、25:京都、26:大阪、27:兵庫、28:奈良、29:和歌山、30:鳥取、31:島根、32:岡山、33:広島、34:山口、35:徳島、36:香川、37:愛媛、38:高知、39:福岡、40:佐賀、41:長崎、42:熊本、43:大分、44:宮崎、45:鹿児島、46:沖縄) (デフォルトはpartner_idもしくはpartner_codeで指定された取引先設定情報が補完されます)", + "type": [ + "null", + "number" + ] + }, + "partner_address1": { + "description": "取引先市区町村・番地 (デフォルトはpartner_idもしくははpartner_codeで指定された取引先設定情報が補完されます)", + "type": [ + "null", + "string" + ] + }, + "partner_address2": { + "description": "取引先建物名・部屋番号など (デフォルトはpartner_idもしくははpartner_codeで指定された取引先設定情報が補完されます)", + "type": [ + "null", + "string" + ] + }, + "company_name": { + "description": "事業所名 (デフォルトは事業所設定情報が補完されます)", + "type": "string" + }, + "company_zipcode": { + "description": "郵便番号 (デフォルトは事業所設定情報が補完されます)", + "type": "string" + }, + "company_prefecture_code": { + "description": "都道府県コード(0:北海道、1:青森、2:岩手、3:宮城、4:秋田、5:山形、6:福島、7:茨城、8:栃木、9:群馬、10:埼玉、11:千葉、12:東京、13:神奈川、14:新潟、15:富山、16:石川、17:福井、18:山梨、19:長野、20:岐阜、21:静岡、22:愛知、23:三重、24:滋賀、25:京都、26:大阪、27:兵庫、28:奈良、29:和歌山、30:鳥取、31:島根、32:岡山、33:広島、34:山口、35:徳島、36:香川、37:愛媛、38:高知、39:福岡、40:佐賀、41:長崎、42:熊本、43:大分、44:宮崎、45:鹿児島、46:沖縄) (デフォルトは事業所設定情報が補完されます)", + "type": "number" + }, + "company_address1": { + "description": "市区町村・番地 (デフォルトは事業所設定情報が補完されます)", + "type": "string" + }, + "company_address2": { + "description": "建物名・部屋番号など (デフォルトは事業所設定情報が補完されます)", + "type": "string" + }, + "company_contact_info": { + "description": "事業所担当者名 (デフォルトは事業所設定情報が補完されます)", + "type": "string" + }, + "message": { + "description": "メッセージ (デフォルト: 下記の通り御見積申し上げます。)", + "type": "string" + }, + "notes": { + "description": "備考", + "type": "string" + }, + "quotation_layout": { + "description": "レイアウト(default_classic: レイアウト1/クラシック (デフォルト), standard_classic: レイアウト2/クラシック, envelope_classic: 封筒1/クラシック, default_modern: レイアウト1/モダン, standard_modern: レイアウト2/モダン, envelope_modern: 封筒/モダン)", + "enum": [ + "default_classic", + "default_modern", + "envelope_classic", + "envelope_modern", + "standard_classic", + "standard_modern" + ], + "type": "string" + }, + "tax_entry_method": { + "description": "見積書の消費税計算方法(inclusive: 内税表示, exclusive: 外税表示 (デフォルト))", + "enum": [ + "exclusive", + "inclusive" + ], + "type": "string" + }, + "quotation_contents": { + "description": "見積内容", + "type": "array", + "items": { + "type": "object", + "properties": { + "order": { + "description": "順序", + "type": "number" + }, + "type": { + "description": "行の種類", + "enum": [ + "discount", + "normal", + "text" + ], + "type": "string" + }, + "qty": { + "description": "数量", + "type": "number" + }, + "unit": { + "description": "単位", + "type": "string" + }, + "unit_price": { + "description": "単価 (tax_entry_method: inclusiveの場合は税込価格、tax_entry_method: exclusiveの場合は税抜価格となります)", + "type": "number" + }, + "vat": { + "description": "消費税額", + "type": [ + "null", + "number" + ] + }, + "description": { + "description": "備考", + "type": "string" + }, + "account_item_id": { + "description": "勘定科目ID", + "type": "number" + }, + "tax_code": { + "description": "税区分ID", + "type": "number" + }, + "item_id": { + "description": "品目ID", + "type": "number" + }, + "section_id": { + "description": "部門ID", + "type": "number" + }, + "tag_ids": { + "type": "array", + "items": { + "type": "number" + } + }, + "segment_1_tag_id": { + "description": "セグメント1ID", + "type": "number" + }, + "segment_2_tag_id": { + "description": "セグメント2ID", + "type": "number" + }, + "segment_3_tag_id": { + "description": "セグメント3ID", + "type": "number" + } + }, + "required": [ + "order", + "type" + ] + } + } + }, + "required": [ + "company_id", + "partner_display_name", + "partner_title" + ] + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "quotation": { + "type": "object", + "properties": { + "id": { + "description": "見積書ID", + "type": "number" + }, + "company_id": { + "description": "事業所ID", + "type": "number" + }, + "issue_date": { + "description": "見積日 (yyyy-mm-dd)", + "type": "string" + }, + "partner_id": { + "description": "取引先ID", + "type": [ + "null", + "number" + ] + }, + "partner_code": { + "description": "取引先コード", + "type": [ + "null", + "string" + ] + }, + "quotation_number": { + "description": "見積書番号", + "type": "string" + }, + "title": { + "description": "タイトル", + "type": [ + "null", + "string" + ] + }, + "total_amount": { + "description": "合計金額", + "type": "number" + }, + "total_vat": { + "description": "消費税", + "type": "number" + }, + "sub_total": { + "description": "小計", + "type": "number" + }, + "description": { + "description": "概要", + "type": [ + "null", + "string" + ] + }, + "quotation_status": { + "description": "見積書ステータス (unsubmitted: 送付待ち, submitted: 送付済み, all: 全て)", + "enum": [ + "all", + "submitted", + "unsubmitted" + ], + "type": "string" + }, + "web_published_at": { + "description": "Web共有日時(最新)", + "type": [ + "null", + "string" + ] + }, + "web_downloaded_at": { + "description": "Web共有ダウンロード日時(最新)", + "type": [ + "null", + "string" + ] + }, + "web_confirmed_at": { + "description": "Web共有取引先確認日時(最新)", + "type": [ + "null", + "string" + ] + }, + "mail_sent_at": { + "description": "メール送信日時(最新)", + "type": [ + "null", + "string" + ] + }, + "partner_name": { + "description": "取引先名", + "type": [ + "null", + "string" + ] + }, + "partner_display_name": { + "description": "取引先正式名称", + "type": [ + "null", + "string" + ] + }, + "partner_title": { + "description": "敬称(御中、様、(空白)の3つから選択)", + "anyOf": [ + { + "enum": [ + "(空白)", + "御中", + "様" + ], + "type": "string" + }, + { + "type": "null" + } + ] + }, + "partner_zipcode": { + "description": "郵便番号", + "type": [ + "null", + "string" + ] + }, + "partner_prefecture_code": { + "description": "都道府県コード(0:北海道、1:青森、2:岩手、3:宮城、4:秋田、5:山形、6:福島、7:茨城、8:栃木、9:群馬、10:埼玉、11:千葉、12:東京、13:神奈川、14:新潟、15:富山、16:石川、17:福井、18:山梨、19:長野、20:岐阜、21:静岡、22:愛知、23:三重、24:滋賀、25:京都、26:大阪、27:兵庫、28:奈良、29:和歌山、30:鳥取、31:島根、32:岡山、33:広島、34:山口、35:徳島、36:香川、37:愛媛、38:高知、39:福岡、40:佐賀、41:長崎、42:熊本、43:大分、44:宮崎、45:鹿児島、46:沖縄", + "type": [ + "null", + "number" + ] + }, + "partner_prefecture_name": { + "description": "都道府県", + "type": [ + "null", + "string" + ] + }, + "partner_address1": { + "description": "市区町村・番地", + "type": [ + "null", + "string" + ] + }, + "partner_address2": { + "description": "建物名・部屋番号など", + "type": [ + "null", + "string" + ] + }, + "partner_contact_info": { + "description": "取引先担当者名", + "type": [ + "null", + "string" + ] + }, + "company_name": { + "description": "事業所名", + "type": "string" + }, + "company_zipcode": { + "description": "郵便番号", + "type": [ + "null", + "string" + ] + }, + "company_prefecture_code": { + "description": "都道府県コード(0:北海道、1:青森、2:岩手、3:宮城、4:秋田、5:山形、6:福島、7:茨城、8:栃木、9:群馬、10:埼玉、11:千葉、12:東京、13:神奈川、14:新潟、15:富山、16:石川、17:福井、18:山梨、19:長野、20:岐阜、21:静岡、22:愛知、23:三重、24:滋賀、25:京都、26:大阪、27:兵庫、28:奈良、29:和歌山、30:鳥取、31:島根、32:岡山、33:広島、34:山口、35:徳島、36:香川、37:愛媛、38:高知、39:福岡、40:佐賀、41:長崎、42:熊本、43:大分、44:宮崎、45:鹿児島、46:沖縄", + "type": [ + "null", + "number" + ] + }, + "company_prefecture_name": { + "description": "都道府県", + "type": [ + "null", + "string" + ] + }, + "company_address1": { + "description": "市区町村・番地", + "type": [ + "null", + "string" + ] + }, + "company_address2": { + "description": "建物名・部屋番号など", + "type": [ + "null", + "string" + ] + }, + "company_contact_info": { + "description": "事業所担当者名", + "type": [ + "null", + "string" + ] + }, + "message": { + "description": "メッセージ", + "type": [ + "null", + "string" + ] + }, + "notes": { + "description": "備考", + "type": [ + "null", + "string" + ] + }, + "quotation_layout": { + "description": "レイアウト(default_classic: レイアウト1/クラシック, standard_classic: レイアウト2/クラシック, envelope_classic: 封筒1/クラシック, carried_forward_standard_classic: レイアウト3(繰越金額欄あり)/クラシック, carried_forward_envelope_classic: 封筒2(繰越金額欄あり)/クラシック, default_modern: レイアウト1/モダン, standard_modern: レイアウト2/モダン, envelope_modern: 封筒/モダン)", + "enum": [ + "carried_forward_envelope_classic", + "carried_forward_standard_classic", + "default_classic", + "default_modern", + "envelope_classic", + "envelope_modern", + "standard_classic", + "standard_modern" + ], + "type": "string" + }, + "tax_entry_method": { + "description": "見積書の消費税計算方法(inclusive: 内税, exclusive: 外税)", + "enum": [ + "", + "exclusive", + "inclusive" + ], + "type": "string" + }, + "quotation_contents": { + "description": "見積内容", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "見積内容ID", + "type": "number" + }, + "order": { + "description": "順序", + "type": "number" + }, + "type": { + "description": "行の種類", + "enum": [ + "discount", + "normal", + "text" + ], + "type": "string" + }, + "qty": { + "description": "数量", + "type": "number" + }, + "unit": { + "description": "単位", + "type": [ + "null", + "string" + ] + }, + "unit_price": { + "description": "単価", + "type": "number" + }, + "amount": { + "description": "金額", + "type": "number" + }, + "vat": { + "description": "消費税額", + "type": "number" + }, + "reduced_vat": { + "description": "軽減税率税区分(true: 対象、false: 対象外)", + "type": "boolean" + }, + "description": { + "description": "備考", + "type": [ + "null", + "string" + ] + }, + "account_item_id": { + "description": "勘定科目ID", + "type": [ + "null", + "number" + ] + }, + "account_item_name": { + "description": "勘定科目名", + "type": [ + "null", + "string" + ] + }, + "tax_code": { + "description": "税区分コード", + "type": [ + "null", + "number" + ] + }, + "item_id": { + "description": "品目ID", + "type": [ + "null", + "number" + ] + }, + "item_name": { + "description": "品目", + "type": [ + "null", + "string" + ] + }, + "section_id": { + "description": "部門ID", + "type": [ + "null", + "number" + ] + }, + "section_name": { + "description": "部門", + "type": [ + "null", + "string" + ] + }, + "tag_ids": { + "type": "array", + "items": { + "type": "number" + } + }, + "tag_names": { + "type": "array", + "items": { + "type": "string" + } + }, + "segment_1_tag_id": { + "description": "セグメント1ID", + "type": [ + "null", + "number" + ] + }, + "segment_1_tag_name": { + "description": "セグメント1ID", + "type": [ + "null", + "string" + ] + }, + "segment_2_tag_id": { + "description": "セグメント2ID", + "type": [ + "null", + "number" + ] + }, + "segment_2_tag_name": { + "description": "セグメント2", + "type": [ + "null", + "string" + ] + }, + "segment_3_tag_id": { + "description": "セグメント3ID", + "type": [ + "null", + "number" + ] + }, + "segment_3_tag_name": { + "description": "セグメント3", + "type": [ + "null", + "string" + ] + } + }, + "required": [ + "account_item_id", + "account_item_name", + "amount", + "description", + "id", + "item_id", + "item_name", + "order", + "qty", + "reduced_vat", + "section_id", + "section_name", + "tag_ids", + "tag_names", + "tax_code", + "type", + "unit", + "unit_price", + "vat" + ] + } + }, + "total_amount_per_vat_rate": { + "type": "object", + "properties": { + "vat_5": { + "description": "税率5%の税込み金額合計", + "type": "number" + }, + "vat_8": { + "description": "税率8%の税込み金額合計", + "type": "number" + }, + "reduced_vat_8": { + "description": "軽減税率8%の税込み金額合計", + "type": "number" + }, + "vat_10": { + "description": "税率10%の税込み金額合計", + "type": "number" + } + }, + "required": [ + "reduced_vat_8", + "vat_10", + "vat_5", + "vat_8" + ] + } + }, + "required": [ + "company_id", + "company_name", + "id", + "issue_date", + "partner_id", + "partner_title", + "quotation_layout", + "quotation_number", + "quotation_status", + "tax_entry_method", + "total_amount", + "total_amount_per_vat_rate" + ] + } + }, + "required": [ + "quotation" + ] + } + } + } + } + } + } + }, + "samples/freee/api/1/receipts/{id}": { + "get": { + "tags": [ + "api", + "1", + "receipts" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "number" + } + }, + { + "name": "company_id", + "in": "query", + "required": true, + "schema": { + "description": "事業所ID", + "type": "number" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "receipt": { + "type": "object", + "properties": { + "id": { + "description": "証憑ID", + "type": "number" + }, + "status": { + "description": "ステータス(unconfirmed:確認待ち、confirmed:確認済み、deleted:削除済み、ignored:無視)", + "enum": [ + "confirmed", + "deleted", + "ignored", + "unconfirmed" + ], + "type": "string" + }, + "description": { + "description": "メモ", + "type": "string" + }, + "mime_type": { + "description": "MIMEタイプ", + "type": "string" + }, + "issue_date": { + "description": "発生日", + "type": "string" + }, + "origin": { + "description": "アップロード元種別", + "enum": [ + "dropbox", + "mail", + "mobile_album", + "mobile_camera", + "public_api", + "safety_contact_file", + "scannable", + "scansnap", + "unknown", + "web" + ], + "type": "string" + }, + "created_at": { + "description": "作成日時(ISO8601形式)", + "type": "string" + }, + "file_src": { + "description": "ファイルのダウンロードURL(freeeにログインした状態でのみ閲覧可能です。)", + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "id": { + "description": "ユーザID", + "type": "number" + }, + "email": { + "description": "メールアドレス", + "type": "string" + }, + "display_name": { + "description": "表示名", + "type": [ + "null", + "string" + ] + } + }, + "required": [ + "email", + "id" + ] + } + }, + "required": [ + "created_at", + "file_src", + "id", + "mime_type", + "origin", + "status", + "user" + ] + } + }, + "required": [ + "receipt" + ] + } + } + } + } + } + }, + "put": { + "tags": [ + "api", + "1", + "receipts" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "number" + } + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "description": "経費申請の更新", + "type": "object", + "properties": { + "company_id": { + "description": "事業所ID", + "type": "number" + }, + "description": { + "description": "メモ (255文字以内)", + "type": "string" + }, + "issue_date": { + "description": "取引日 (yyyy-mm-dd)", + "type": "string" + } + }, + "required": [ + "company_id", + "issue_date" + ] + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "receipt": { + "type": "object", + "properties": { + "id": { + "description": "証憑ID", + "type": "number" + }, + "status": { + "description": "ステータス(unconfirmed:確認待ち、confirmed:確認済み、deleted:削除済み、ignored:無視)", + "enum": [ + "confirmed", + "deleted", + "ignored", + "unconfirmed" + ], + "type": "string" + }, + "description": { + "description": "メモ", + "type": "string" + }, + "mime_type": { + "description": "MIMEタイプ", + "type": "string" + }, + "issue_date": { + "description": "発生日", + "type": "string" + }, + "origin": { + "description": "アップロード元種別", + "enum": [ + "dropbox", + "mail", + "mobile_album", + "mobile_camera", + "public_api", + "safety_contact_file", + "scannable", + "scansnap", + "unknown", + "web" + ], + "type": "string" + }, + "created_at": { + "description": "作成日時(ISO8601形式)", + "type": "string" + }, + "file_src": { + "description": "ファイルのダウンロードURL(freeeにログインした状態でのみ閲覧可能です。)", + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "id": { + "description": "ユーザID", + "type": "number" + }, + "email": { + "description": "メールアドレス", + "type": "string" + }, + "display_name": { + "description": "表示名", + "type": [ + "null", + "string" + ] + } + }, + "required": [ + "email", + "id" + ] + } + }, + "required": [ + "created_at", + "file_src", + "id", + "mime_type", + "origin", + "status", + "user" + ] + } + }, + "required": [ + "receipt" + ] + } + } + } + } + } + }, + "delete": { + "tags": [ + "api", + "1", + "receipts" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "number" + } + }, + { + "name": "company_id", + "in": "query", + "required": true, + "schema": { + "description": "事業所ID", + "type": "number" + } + } + ] + } + }, + "samples/freee/api/1/receipts": { + "get": { + "tags": [ + "api", + "1", + "receipts" + ], + "parameters": [ + { + "name": "company_id", + "in": "query", + "required": true, + "schema": { + "description": "事業所ID", + "type": "number" + } + }, + { + "name": "start_date", + "in": "query", + "required": true, + "schema": { + "description": "アップロード日 (yyyy-mm-dd)", + "type": "string" + } + }, + { + "name": "end_date", + "in": "query", + "required": true, + "schema": { + "description": "アップロード日 (yyyy-mm-dd)", + "type": "string" + } + }, + { + "name": "user_name", + "in": "query", + "required": false, + "schema": { + "description": "アップロードしたユーザー名、メールアドレス", + "type": "string" + } + }, + { + "name": "number", + "in": "query", + "required": false, + "schema": { + "description": "アップロードファイルNo", + "type": "number" + } + }, + { + "name": "comment_type", + "in": "query", + "required": false, + "schema": { + "description": "posted:コメントあり, raised:未解決, resolved:解決済", + "enum": [ + "posted", + "raised", + "resolved" + ], + "type": "string" + } + }, + { + "name": "comment_important", + "in": "query", + "required": false, + "schema": { + "description": "trueの時、重要コメント付きが対象", + "type": "boolean" + } + }, + { + "name": "category", + "in": "query", + "required": false, + "schema": { + "description": "all:すべて、without_deal:未登録、with_expense_application_line:経費申請中, with_deal:登録済み、ignored:無視", + "enum": [ + "all", + "ignored", + "with_deal", + "with_expense_application_line", + "without_deal" + ], + "type": "string" + } + }, + { + "name": "offset", + "in": "query", + "required": false, + "schema": { + "description": "取得レコードのオフセット (デフォルト: 0)", + "type": "number" + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "description": "取得レコードの件数 (デフォルト: 50, 最小: 1, 最大: 3000)", + "type": "number" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "receipts": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "証憑ID", + "type": "number" + }, + "status": { + "description": "ステータス(unconfirmed:確認待ち、confirmed:確認済み、deleted:削除済み、ignored:無視)", + "enum": [ + "confirmed", + "deleted", + "ignored", + "unconfirmed" + ], + "type": "string" + }, + "description": { + "description": "メモ", + "type": "string" + }, + "mime_type": { + "description": "MIMEタイプ", + "type": "string" + }, + "issue_date": { + "description": "発生日", + "type": "string" + }, + "origin": { + "description": "アップロード元種別", + "enum": [ + "dropbox", + "mail", + "mobile_album", + "mobile_camera", + "public_api", + "safety_contact_file", + "scannable", + "scansnap", + "unknown", + "web" + ], + "type": "string" + }, + "created_at": { + "description": "作成日時(ISO8601形式)", + "type": "string" + }, + "file_src": { + "description": "ファイルのダウンロードURL(freeeにログインした状態でのみ閲覧可能です。)", + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "id": { + "description": "ユーザID", + "type": "number" + }, + "email": { + "description": "メールアドレス", + "type": "string" + }, + "display_name": { + "description": "表示名", + "type": [ + "null", + "string" + ] + } + }, + "required": [ + "email", + "id" + ] + } + }, + "required": [ + "created_at", + "file_src", + "id", + "mime_type", + "origin", + "status", + "user" + ] + } + } + }, + "required": [ + "receipts" + ] + } + } + } + } + } + }, + "post": { + "tags": [ + "api", + "1", + "receipts" + ], + "parameters": [], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "company_id": { + "description": "事業所ID", + "type": "number" + }, + "description": { + "description": "メモ (255文字以内)", + "type": "string" + }, + "issue_date": { + "description": "取引日 (yyyy-mm-dd)", + "type": "string" + }, + "receipt": { + "description": "証憑ファイル", + "anyOf": [ + { + "$ref": "#/components/schemas/File" + }, + { + "$ref": "#/components/schemas/ReadStream" + } + ] + } + }, + "required": [ + "company_id", + "receipt" + ] + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "receipt": { + "type": "object", + "properties": { + "id": { + "description": "証憑ID", + "type": "number" + }, + "status": { + "description": "ステータス(unconfirmed:確認待ち、confirmed:確認済み、deleted:削除済み、ignored:無視)", + "enum": [ + "confirmed", + "deleted", + "ignored", + "unconfirmed" + ], + "type": "string" + }, + "description": { + "description": "メモ", + "type": "string" + }, + "mime_type": { + "description": "MIMEタイプ", + "type": "string" + }, + "issue_date": { + "description": "発生日", + "type": "string" + }, + "origin": { + "description": "アップロード元種別", + "enum": [ + "dropbox", + "mail", + "mobile_album", + "mobile_camera", + "public_api", + "safety_contact_file", + "scannable", + "scansnap", + "unknown", + "web" + ], + "type": "string" + }, + "created_at": { + "description": "作成日時(ISO8601形式)", + "type": "string" + }, + "file_src": { + "description": "ファイルのダウンロードURL(freeeにログインした状態でのみ閲覧可能です。)", + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "id": { + "description": "ユーザID", + "type": "number" + }, + "email": { + "description": "メールアドレス", + "type": "string" + }, + "display_name": { + "description": "表示名", + "type": [ + "null", + "string" + ] + } + }, + "required": [ + "email", + "id" + ] + } + }, + "required": [ + "created_at", + "file_src", + "id", + "mime_type", + "origin", + "status", + "user" + ] + } + }, + "required": [ + "receipt" + ] + } + } + } + } + } + } + }, + "samples/freee/api/1/reports/trial_bs": { + "get": { + "tags": [ + "api", + "1", + "reports", + "trial_bs" + ], + "parameters": [ + { + "name": "company_id", + "in": "query", + "required": true, + "schema": { + "description": "事業所ID", + "type": "number" + } + }, + { + "name": "fiscal_year", + "in": "query", + "required": false, + "schema": { + "description": "会計年度", + "type": "number" + } + }, + { + "name": "start_month", + "in": "query", + "required": false, + "schema": { + "description": "発生月で絞込:開始会計月(mm)", + "type": "number" + } + }, + { + "name": "end_month", + "in": "query", + "required": false, + "schema": { + "description": "発生月で絞込:終了会計月(mm)", + "type": "number" + } + }, + { + "name": "start_date", + "in": "query", + "required": false, + "schema": { + "description": "発生日で絞込:開始日(yyyy-mm-dd)", + "type": "string" + } + }, + { + "name": "end_date", + "in": "query", + "required": false, + "schema": { + "description": "発生日で絞込:終了日(yyyy-mm-dd)", + "type": "string" + } + }, + { + "name": "account_item_display_type", + "in": "query", + "required": false, + "schema": { + "description": "勘定科目の表示(勘定科目: account_item, 決算書表示:group)", + "enum": [ + "account_item", + "group" + ], + "type": "string" + } + }, + { + "name": "breakdown_display_type", + "in": "query", + "required": false, + "schema": { + "description": "内訳の表示(取引先: partner, 品目: item, 勘定科目: account_item) ※勘定科目はaccount_item_display_typeが「group」の時のみ指定できます", + "enum": [ + "account_item", + "item", + "partner" + ], + "type": "string" + } + }, + { + "name": "partner_id", + "in": "query", + "required": false, + "schema": { + "description": "取引先IDで絞込(0を指定すると、取引先が未選択で絞り込めます)", + "type": "number" + } + }, + { + "name": "partner_code", + "in": "query", + "required": false, + "schema": { + "description": "取引先コードで絞込(事業所設定で取引先コードの利用を有効にしている場合のみ利用可能です)", + "type": "string" + } + }, + { + "name": "item_id", + "in": "query", + "required": false, + "schema": { + "description": "品目IDで絞込(0を指定すると、品目が未選択で絞り込めます)", + "type": "number" + } + }, + { + "name": "adjustment", + "in": "query", + "required": false, + "schema": { + "description": "決算整理仕訳で絞込(決算整理仕訳のみ: only, 決算整理仕訳以外: without)", + "enum": [ + "only", + "without" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "trial_bs": { + "type": "object", + "properties": { + "company_id": { + "description": "事業所ID", + "type": "number" + }, + "up_to_date": { + "description": "集計結果が最新かどうか", + "type": "boolean" + }, + "fiscal_year": { + "description": "会計年度(条件に指定した時、または条件に月、日条件がない時のみ含まれる)", + "type": "number" + }, + "start_month": { + "description": "発生月で絞込:開始会計月(mm)(条件に指定した時のみ含まれる)", + "type": "number" + }, + "end_month": { + "description": "発生月で絞込:終了会計月(mm)(条件に指定した時のみ含まれる)", + "type": "number" + }, + "start_date": { + "description": "発生日で絞込:開始日(yyyy-mm-dd)(条件に指定した時のみ含まれる)", + "type": "string" + }, + "end_date": { + "description": "発生日で絞込:終了日(yyyy-mm-dd)(条件に指定した時のみ含まれる)", + "type": "string" + }, + "account_item_display_type": { + "description": "勘定科目の表示(勘定科目: account_item, 決算書表示:group)(条件に指定した時のみ含まれる)", + "enum": [ + "account_item", + "group" + ], + "type": "string" + }, + "breakdown_display_type": { + "description": "内訳の表示(取引先: partner, 品目: item, 勘定科目: account_item)(条件に指定した時のみ含まれる)", + "enum": [ + "account_item", + "item", + "partner" + ], + "type": "string" + }, + "partner_id": { + "description": "取引先ID(条件に指定した時のみ含まれる)", + "type": "number" + }, + "partner_code": { + "description": "取引先コード(条件に指定した時のみ含まれる)", + "type": "string" + }, + "item_id": { + "description": "品目ID(条件に指定した時のみ含まれる)", + "type": "number" + }, + "adjustment": { + "description": "決算整理仕訳のみ: only, 決算整理仕訳以外: without(条件に指定した時のみ含まれる)", + "enum": [ + "only", + "without" + ], + "type": "string" + }, + "created_at": { + "description": "作成日時", + "type": "string" + }, + "balances": { + "type": "array", + "items": { + "type": "object", + "properties": { + "account_item_id": { + "description": "勘定科目ID(勘定科目の時のみ含まれる)", + "type": "number" + }, + "account_item_name": { + "description": "勘定科目名(勘定科目の時のみ含まれる)", + "type": "string" + }, + "partners": { + "description": "breakdown_display_type:partner, account_item_display_type:account_item指定時のみ含まれる", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "取引先ID", + "type": "number" + }, + "name": { + "description": "取引先名", + "type": "string" + }, + "opening_balance": { + "description": "期首残高", + "type": "number" + }, + "debit_amount": { + "description": "借方金額", + "type": "number" + }, + "credit_amount": { + "description": "貸方金額", + "type": "number" + }, + "closing_balance": { + "description": "期末残高", + "type": "number" + }, + "composition_ratio": { + "description": "構成比", + "type": "number" + } + }, + "required": [ + "id" + ] + } + }, + "items": { + "description": "breakdown_display_type:item, account_item_display_type:account_item指定時のみ含まれる", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "品目ID", + "type": "number" + }, + "name": { + "description": "品目", + "type": "string" + }, + "opening_balance": { + "description": "期首残高", + "type": "number" + }, + "debit_amount": { + "description": "借方金額", + "type": "number" + }, + "credit_amount": { + "description": "貸方金額", + "type": "number" + }, + "closing_balance": { + "description": "期末残高", + "type": "number" + }, + "composition_ratio": { + "description": "構成比", + "type": "number" + } + }, + "required": [ + "id" + ] + } + }, + "account_category_id": { + "description": "勘定科目カテゴリーID(勘定科目カテゴリーの時のみ含まれる)", + "type": "number" + }, + "account_category_name": { + "description": "勘定科目カテゴリー名(勘定科目カテゴリーの時のみ含まれる)", + "type": "string" + }, + "total_line": { + "description": "合計行(勘定科目カテゴリー名の時のみ含まれる)", + "type": "boolean" + }, + "hierarchy_level": { + "description": "階層レベル", + "type": "number" + }, + "parent_account_category_id": { + "description": "上位科目カテゴリーID(上層が存在する場合含まれる)", + "type": "number" + }, + "parent_account_category_name": { + "description": "上位勘定科目カテゴリー名(上層が存在する場合含まれる)", + "type": "string" + }, + "opening_balance": { + "description": "期首残高", + "type": "number" + }, + "debit_amount": { + "description": "借方金額", + "type": "number" + }, + "credit_amount": { + "description": "貸方金額", + "type": "number" + }, + "closing_balance": { + "description": "期末残高", + "type": "number" + }, + "composition_ratio": { + "description": "構成比", + "type": "number" + } + } + } + } + }, + "required": [ + "balances", + "company_id", + "up_to_date" + ] + } + }, + "required": [ + "trial_bs" + ] + } + } + } + } + } + } + }, + "samples/freee/api/1/reports/trial_bs_three_years": { + "get": { + "tags": [ + "api", + "1", + "reports", + "trial_bs_three_years" + ], + "parameters": [ + { + "name": "company_id", + "in": "query", + "required": true, + "schema": { + "description": "事業所ID", + "type": "number" + } + }, + { + "name": "fiscal_year", + "in": "query", + "required": false, + "schema": { + "description": "会計年度", + "type": "number" + } + }, + { + "name": "start_month", + "in": "query", + "required": false, + "schema": { + "description": "発生月で絞込:開始会計月(mm)", + "type": "number" + } + }, + { + "name": "end_month", + "in": "query", + "required": false, + "schema": { + "description": "発生月で絞込:終了会計月(mm)", + "type": "number" + } + }, + { + "name": "start_date", + "in": "query", + "required": false, + "schema": { + "description": "発生日で絞込:開始日(yyyy-mm-dd)", + "type": "string" + } + }, + { + "name": "end_date", + "in": "query", + "required": false, + "schema": { + "description": "発生日で絞込:終了日(yyyy-mm-dd)", + "type": "string" + } + }, + { + "name": "account_item_display_type", + "in": "query", + "required": false, + "schema": { + "description": "勘定科目の表示(勘定科目: account_item, 決算書表示:group)", + "enum": [ + "account_item", + "group" + ], + "type": "string" + } + }, + { + "name": "breakdown_display_type", + "in": "query", + "required": false, + "schema": { + "description": "内訳の表示(取引先: partner, 品目: item, 勘定科目: account_item) ※勘定科目はaccount_item_display_typeが「group」の時のみ指定できます", + "enum": [ + "account_item", + "item", + "partner" + ], + "type": "string" + } + }, + { + "name": "partner_id", + "in": "query", + "required": false, + "schema": { + "description": "取引先IDで絞込(0を指定すると、取引先が未選択で絞り込めます)", + "type": "number" + } + }, + { + "name": "partner_code", + "in": "query", + "required": false, + "schema": { + "description": "取引先コードで絞込(事業所設定で取引先コードの利用を有効にしている場合のみ利用可能です)", + "type": "string" + } + }, + { + "name": "item_id", + "in": "query", + "required": false, + "schema": { + "description": "品目IDで絞込(0を指定すると、品目が未選択で絞り込めます)", + "type": "number" + } + }, + { + "name": "adjustment", + "in": "query", + "required": false, + "schema": { + "description": "決算整理仕訳で絞込(決算整理仕訳のみ: only, 決算整理仕訳以外: without)", + "enum": [ + "only", + "without" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "trial_bs_three_years": { + "type": "object", + "properties": { + "company_id": { + "description": "事業所ID", + "type": "number" + }, + "up_to_date": { + "description": "集計結果が最新かどうか", + "type": "boolean" + }, + "fiscal_year": { + "description": "会計年度(条件に指定した時、または条件に月、日条件がない時のみ含まれる)", + "type": "number" + }, + "start_month": { + "description": "発生月で絞込:開始会計月(mm)(条件に指定した時のみ含まれる)", + "type": "number" + }, + "end_month": { + "description": "発生月で絞込:終了会計月(mm)(条件に指定した時のみ含まれる)", + "type": "number" + }, + "start_date": { + "description": "発生日で絞込:開始日(yyyy-mm-dd)(条件に指定した時のみ含まれる)", + "type": "string" + }, + "end_date": { + "description": "発生日で絞込:終了日(yyyy-mm-dd)(条件に指定した時のみ含まれる)", + "type": "string" + }, + "account_item_display_type": { + "description": "勘定科目の表示(勘定科目: account_item, 決算書表示:group)(条件に指定した時のみ含まれる)", + "enum": [ + "account_item", + "group" + ], + "type": "string" + }, + "breakdown_display_type": { + "description": "内訳の表示(取引先: partner, 品目: item, 勘定科目: account_item)(条件に指定した時のみ含まれる)", + "enum": [ + "account_item", + "item", + "partner" + ], + "type": "string" + }, + "partner_id": { + "description": "取引先ID(条件に指定した時のみ含まれる)", + "type": "number" + }, + "partner_code": { + "description": "取引先コード(条件に指定した時のみ含まれる)", + "type": "string" + }, + "item_id": { + "description": "品目ID(条件に指定した時のみ含まれる)", + "type": "number" + }, + "adjustment": { + "description": "決算整理仕訳のみ: only, 決算整理仕訳以外: without(条件に指定した時のみ含まれる)", + "enum": [ + "only", + "without" + ], + "type": "string" + }, + "created_at": { + "description": "作成日時", + "type": "string" + }, + "balances": { + "type": "array", + "items": { + "type": "object", + "properties": { + "account_item_id": { + "description": "勘定科目ID(勘定科目の時のみ含まれる)", + "type": "number" + }, + "account_item_name": { + "description": "勘定科目名(勘定科目の時のみ含まれる)", + "type": "string" + }, + "partners": { + "description": "breakdown_display_type:partner, account_item_display_type:account_item指定時のみ含まれる", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "取引先ID", + "type": "number" + }, + "name": { + "description": "取引先名", + "type": "string" + }, + "two_years_before_closing_balance": { + "description": "前々年度期末残高", + "type": "number" + }, + "last_year_closing_balance": { + "description": "前年度期末残高", + "type": "number" + }, + "closing_balance": { + "description": "期末残高", + "type": "number" + }, + "year_on_year": { + "description": "前年比", + "type": "number" + } + }, + "required": [ + "id" + ] + } + }, + "items": { + "description": "breakdown_display_type:item, account_item_display_type:account_item指定時のみ含まれる", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "品目ID", + "type": "number" + }, + "name": { + "description": "品目", + "type": "string" + }, + "two_years_before_closing_balance": { + "description": "前々年度期末残高", + "type": "number" + }, + "last_year_closing_balance": { + "description": "前年度期末残高", + "type": "number" + }, + "closing_balance": { + "description": "期末残高", + "type": "number" + }, + "year_on_year": { + "description": "前年比", + "type": "number" + } + }, + "required": [ + "id" + ] + } + }, + "account_category_id": { + "description": "勘定科目カテゴリーID(勘定科目カテゴリーの時のみ含まれる)", + "type": "number" + }, + "account_category_name": { + "description": "勘定科目カテゴリー名(勘定科目カテゴリーの時のみ含まれる)", + "type": "string" + }, + "total_line": { + "description": "合計行(勘定科目カテゴリー名の時のみ含まれる)", + "type": "boolean" + }, + "hierarchy_level": { + "description": "階層レベル", + "type": "number" + }, + "parent_account_category_id": { + "description": "上位科目カテゴリーID(上層が存在する場合含まれる)", + "type": "number" + }, + "parent_account_category_name": { + "description": "上位勘定科目カテゴリー名(上層が存在する場合含まれる)", + "type": "string" + }, + "two_years_before_closing_balance": { + "description": "前々年度期末残高", + "type": "number" + }, + "last_year_closing_balance": { + "description": "前年度期末残高", + "type": "number" + }, + "closing_balance": { + "description": "期末残高", + "type": "number" + }, + "year_on_year": { + "description": "前年比", + "type": "number" + } + } + } + } + }, + "required": [ + "balances", + "company_id", + "up_to_date" + ] + } + }, + "required": [ + "trial_bs_three_years" + ] + } + } + } + } + } + } + }, + "samples/freee/api/1/reports/trial_bs_two_years": { + "get": { + "tags": [ + "api", + "1", + "reports", + "trial_bs_two_years" + ], + "parameters": [ + { + "name": "company_id", + "in": "query", + "required": true, + "schema": { + "description": "事業所ID", + "type": "number" + } + }, + { + "name": "fiscal_year", + "in": "query", + "required": false, + "schema": { + "description": "会計年度", + "type": "number" + } + }, + { + "name": "start_month", + "in": "query", + "required": false, + "schema": { + "description": "発生月で絞込:開始会計月(mm)", + "type": "number" + } + }, + { + "name": "end_month", + "in": "query", + "required": false, + "schema": { + "description": "発生月で絞込:終了会計月(mm)", + "type": "number" + } + }, + { + "name": "start_date", + "in": "query", + "required": false, + "schema": { + "description": "発生日で絞込:開始日(yyyy-mm-dd)", + "type": "string" + } + }, + { + "name": "end_date", + "in": "query", + "required": false, + "schema": { + "description": "発生日で絞込:終了日(yyyy-mm-dd)", + "type": "string" + } + }, + { + "name": "account_item_display_type", + "in": "query", + "required": false, + "schema": { + "description": "勘定科目の表示(勘定科目: account_item, 決算書表示:group)", + "enum": [ + "account_item", + "group" + ], + "type": "string" + } + }, + { + "name": "breakdown_display_type", + "in": "query", + "required": false, + "schema": { + "description": "内訳の表示(取引先: partner, 品目: item, 勘定科目: account_item) ※勘定科目はaccount_item_display_typeが「group」の時のみ指定できます", + "enum": [ + "account_item", + "item", + "partner" + ], + "type": "string" + } + }, + { + "name": "partner_id", + "in": "query", + "required": false, + "schema": { + "description": "取引先IDで絞込(0を指定すると、取引先が未選択で絞り込めます)", + "type": "number" + } + }, + { + "name": "partner_code", + "in": "query", + "required": false, + "schema": { + "description": "取引先コードで絞込(事業所設定で取引先コードの利用を有効にしている場合のみ利用可能です)", + "type": "string" + } + }, + { + "name": "item_id", + "in": "query", + "required": false, + "schema": { + "description": "品目IDで絞込(0を指定すると、品目が未選択で絞り込めます)", + "type": "number" + } + }, + { + "name": "adjustment", + "in": "query", + "required": false, + "schema": { + "description": "決算整理仕訳で絞込(決算整理仕訳のみ: only, 決算整理仕訳以外: without)", + "enum": [ + "only", + "without" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "trial_bs_two_years": { + "type": "object", + "properties": { + "company_id": { + "description": "事業所ID", + "type": "number" + }, + "up_to_date": { + "description": "集計結果が最新かどうか", + "type": "boolean" + }, + "fiscal_year": { + "description": "会計年度(条件に指定した時、または条件に月、日条件がない時のみ含まれる)", + "type": "number" + }, + "start_month": { + "description": "発生月で絞込:開始会計月(mm)(条件に指定した時のみ含まれる)", + "type": "number" + }, + "end_month": { + "description": "発生月で絞込:終了会計月(mm)(条件に指定した時のみ含まれる)", + "type": "number" + }, + "start_date": { + "description": "発生日で絞込:開始日(yyyy-mm-dd)(条件に指定した時のみ含まれる)", + "type": "string" + }, + "end_date": { + "description": "発生日で絞込:終了日(yyyy-mm-dd)(条件に指定した時のみ含まれる)", + "type": "string" + }, + "account_item_display_type": { + "description": "勘定科目の表示(勘定科目: account_item, 決算書表示:group)(条件に指定した時のみ含まれる)", + "enum": [ + "account_item", + "group" + ], + "type": "string" + }, + "breakdown_display_type": { + "description": "内訳の表示(取引先: partner, 品目: item, 勘定科目: account_item)(条件に指定した時のみ含まれる)", + "enum": [ + "account_item", + "item", + "partner" + ], + "type": "string" + }, + "partner_id": { + "description": "取引先ID(条件に指定した時のみ含まれる)", + "type": "number" + }, + "partner_code": { + "description": "取引先コード(条件に指定した時のみ含まれる)", + "type": "string" + }, + "item_id": { + "description": "品目ID(条件に指定した時のみ含まれる)", + "type": "number" + }, + "adjustment": { + "description": "決算整理仕訳のみ: only, 決算整理仕訳以外: without(条件に指定した時のみ含まれる)", + "enum": [ + "only", + "without" + ], + "type": "string" + }, + "created_at": { + "description": "作成日時", + "type": "string" + }, + "balances": { + "type": "array", + "items": { + "type": "object", + "properties": { + "account_item_id": { + "description": "勘定科目ID(勘定科目の時のみ含まれる)", + "type": "number" + }, + "account_item_name": { + "description": "勘定科目名(勘定科目の時のみ含まれる)", + "type": "string" + }, + "partners": { + "description": "breakdown_display_type:partner, account_item_display_type:account_item指定時のみ含まれる", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "取引先ID", + "type": "number" + }, + "name": { + "description": "取引先名", + "type": "string" + }, + "last_year_closing_balance": { + "description": "前年度期末残高", + "type": "number" + }, + "closing_balance": { + "description": "期末残高", + "type": "number" + }, + "year_on_year": { + "description": "前年比", + "type": "number" + } + }, + "required": [ + "id" + ] + } + }, + "items": { + "description": "breakdown_display_type:item, account_item_display_type:account_item指定時のみ含まれる", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "品目ID", + "type": "number" + }, + "name": { + "description": "品目", + "type": "string" + }, + "last_year_closing_balance": { + "description": "前年度期末残高", + "type": "number" + }, + "closing_balance": { + "description": "期末残高", + "type": "number" + }, + "year_on_year": { + "description": "前年比", + "type": "number" + } + }, + "required": [ + "id" + ] + } + }, + "account_category_id": { + "description": "勘定科目カテゴリーID(勘定科目カテゴリーの時のみ含まれる)", + "type": "number" + }, + "account_category_name": { + "description": "勘定科目カテゴリー名(勘定科目カテゴリーの時のみ含まれる)", + "type": "string" + }, + "total_line": { + "description": "合計行(勘定科目カテゴリー名の時のみ含まれる)", + "type": "boolean" + }, + "hierarchy_level": { + "description": "階層レベル", + "type": "number" + }, + "parent_account_category_id": { + "description": "上位科目カテゴリーID(上層が存在する場合含まれる)", + "type": "number" + }, + "parent_account_category_name": { + "description": "上位勘定科目カテゴリー名(上層が存在する場合含まれる)", + "type": "string" + }, + "last_year_closing_balance": { + "description": "前年度期末残高", + "type": "number" + }, + "closing_balance": { + "description": "期末残高", + "type": "number" + }, + "year_on_year": { + "description": "前年比", + "type": "number" + } + } + } + } + }, + "required": [ + "balances", + "company_id", + "up_to_date" + ] + } + }, + "required": [ + "trial_bs_two_years" + ] + } + } + } + } + } + } + }, + "samples/freee/api/1/reports/trial_pl": { + "get": { + "tags": [ + "api", + "1", + "reports", + "trial_pl" + ], + "parameters": [ + { + "name": "company_id", + "in": "query", + "required": true, + "schema": { + "description": "事業所ID", + "type": "number" + } + }, + { + "name": "fiscal_year", + "in": "query", + "required": false, + "schema": { + "description": "会計年度", + "type": "number" + } + }, + { + "name": "start_month", + "in": "query", + "required": false, + "schema": { + "description": "発生月で絞込:開始会計月(mm)", + "type": "number" + } + }, + { + "name": "end_month", + "in": "query", + "required": false, + "schema": { + "description": "発生月で絞込:終了会計月(mm)", + "type": "number" + } + }, + { + "name": "start_date", + "in": "query", + "required": false, + "schema": { + "description": "発生日で絞込:開始日(yyyy-mm-dd)", + "type": "string" + } + }, + { + "name": "end_date", + "in": "query", + "required": false, + "schema": { + "description": "発生日で絞込:終了日(yyyy-mm-dd)", + "type": "string" + } + }, + { + "name": "account_item_display_type", + "in": "query", + "required": false, + "schema": { + "description": "勘定科目の表示(勘定科目: account_item, 決算書表示:group)", + "enum": [ + "account_item", + "group" + ], + "type": "string" + } + }, + { + "name": "breakdown_display_type", + "in": "query", + "required": false, + "schema": { + "description": "内訳の表示(取引先: partner, 品目: item, 部門: section, 勘定科目: account_item) ※勘定科目はaccount_item_display_typeが「group」の時のみ指定できます", + "enum": [ + "account_item", + "item", + "partner", + "section" + ], + "type": "string" + } + }, + { + "name": "partner_id", + "in": "query", + "required": false, + "schema": { + "description": "取引先IDで絞込(0を指定すると、取引先が未選択で絞り込めます)", + "type": "number" + } + }, + { + "name": "partner_code", + "in": "query", + "required": false, + "schema": { + "description": "取引先コードで絞込(事業所設定で取引先コードの利用を有効にしている場合のみ利用可能です)", + "type": "string" + } + }, + { + "name": "item_id", + "in": "query", + "required": false, + "schema": { + "description": "品目IDで絞込(0を指定すると、品目が未選択で絞り込めます)", + "type": "number" + } + }, + { + "name": "section_id", + "in": "query", + "required": false, + "schema": { + "description": "部門IDで絞込(0を指定すると、部門が未選択で絞り込めます)", + "type": "number" + } + }, + { + "name": "adjustment", + "in": "query", + "required": false, + "schema": { + "description": "決算整理仕訳で絞込(決算整理仕訳のみ: only, 決算整理仕訳以外: without)", + "enum": [ + "only", + "without" + ], + "type": "string" + } + }, + { + "name": "cost_allocation", + "in": "query", + "required": false, + "schema": { + "description": "配賦仕訳で絞込(配賦仕訳のみ:only,配賦仕訳以外:without)", + "enum": [ + "not_include", + "only" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "trial_pl": { + "type": "object", + "properties": { + "company_id": { + "description": "事業所ID", + "type": "number" + }, + "up_to_date": { + "description": "集計結果が最新かどうか", + "type": "boolean" + }, + "fiscal_year": { + "description": "会計年度(条件に指定した時、または条件に月、日条件がない時のみ含まれる)", + "type": "number" + }, + "start_month": { + "description": "発生月で絞込:開始会計月(mm)(条件に指定した時のみ含まれる)", + "type": "number" + }, + "end_month": { + "description": "発生月で絞込:終了会計月(mm)(条件に指定した時のみ含まれる)", + "type": "number" + }, + "start_date": { + "description": "発生日で絞込:開始日(yyyy-mm-dd)(条件に指定した時のみ含まれる)", + "type": "string" + }, + "end_date": { + "description": "発生日で絞込:終了日(yyyy-mm-dd)(条件に指定した時のみ含まれる)", + "type": "string" + }, + "account_item_display_type": { + "description": "勘定科目の表示(勘定科目: account_item, 決算書表示:group)(条件に指定した時のみ含まれる)", + "enum": [ + "account_item", + "group" + ], + "type": "string" + }, + "breakdown_display_type": { + "description": "内訳の表示(取引先: partner, 品目: item, 部門: section, 勘定科目: account_item)(条件に指定した時のみ含まれる)", + "enum": [ + "account_item", + "item", + "partner", + "section" + ], + "type": "string" + }, + "partner_id": { + "description": "取引先ID(条件に指定した時のみ含まれる)", + "type": "number" + }, + "partner_code": { + "description": "取引先コード(条件に指定した時のみ含まれる)", + "type": "string" + }, + "item_id": { + "description": "品目ID(条件に指定した時のみ含まれる)", + "type": "number" + }, + "section_id": { + "description": "部門ID(条件に指定した時のみ含まれる)", + "type": "number" + }, + "adjustment": { + "description": "決算整理仕訳のみ: only, 決算整理仕訳以外: without(条件に指定した時のみ含まれる)", + "enum": [ + "only", + "without" + ], + "type": "string" + }, + "cost_allocation": { + "description": "配賦仕訳のみ:only,配賦仕訳以外:without(条件に指定した時のみ含まれる)", + "enum": [ + "only", + "without" + ], + "type": "string" + }, + "created_at": { + "description": "作成日時", + "type": "string" + }, + "balances": { + "type": "array", + "items": { + "type": "object", + "properties": { + "account_item_id": { + "description": "勘定科目ID(勘定科目の時のみ含まれる)", + "type": "number" + }, + "account_item_name": { + "description": "勘定科目名(勘定科目の時のみ含まれる)", + "type": "string" + }, + "partners": { + "description": "breakdown_display_type:partner, account_item_display_type:account_item指定時のみ含まれる", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "取引先ID", + "type": "number" + }, + "name": { + "description": "取引先名", + "type": "string" + }, + "opening_balance": { + "description": "期首残高", + "type": "number" + }, + "debit_amount": { + "description": "借方金額", + "type": "number" + }, + "credit_amount": { + "description": "貸方金額", + "type": "number" + }, + "closing_balance": { + "description": "期末残高", + "type": "number" + }, + "composition_ratio": { + "description": "構成比", + "type": "number" + } + }, + "required": [ + "id" + ] + } + }, + "items": { + "description": "breakdown_display_type:item, account_item_display_type:account_item指定時のみ含まれる", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "品目ID", + "type": "number" + }, + "name": { + "description": "品目", + "type": "string" + }, + "opening_balance": { + "description": "期首残高", + "type": "number" + }, + "debit_amount": { + "description": "借方金額", + "type": "number" + }, + "credit_amount": { + "description": "貸方金額", + "type": "number" + }, + "closing_balance": { + "description": "期末残高", + "type": "number" + }, + "composition_ratio": { + "description": "構成比", + "type": "number" + } + }, + "required": [ + "id" + ] + } + }, + "sections": { + "description": "breakdown_display_type:section, account_item_display_type:account_item指定時のみ含まれる", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "部門ID", + "type": "number" + }, + "name": { + "description": "部門名", + "type": "string" + }, + "opening_balance": { + "description": "期首残高", + "type": "number" + }, + "debit_amount": { + "description": "借方金額", + "type": "number" + }, + "credit_amount": { + "description": "貸方金額", + "type": "number" + }, + "closing_balance": { + "description": "期末残高", + "type": "number" + }, + "composition_ratio": { + "description": "構成比", + "type": "number" + } + }, + "required": [ + "id" + ] + } + }, + "account_category_id": { + "description": "勘定科目カテゴリーID(勘定科目カテゴリーの時のみ含まれる)", + "type": "number" + }, + "account_category_name": { + "description": "勘定科目カテゴリー名(勘定科目カテゴリーの時のみ含まれる)", + "type": "string" + }, + "total_line": { + "description": "合計行(勘定科目カテゴリー名の時のみ含まれる)", + "type": "boolean" + }, + "hierarchy_level": { + "description": "階層レベル", + "type": "number" + }, + "parent_account_category_id": { + "description": "上位科目カテゴリーID(上層が存在する場合含まれる)", + "type": "number" + }, + "parent_account_category_name": { + "description": "上位勘定科目カテゴリー名(上層が存在する場合含まれる)", + "type": "string" + }, + "opening_balance": { + "description": "期首残高", + "type": "number" + }, + "debit_amount": { + "description": "借方金額", + "type": "number" + }, + "credit_amount": { + "description": "貸方金額", + "type": "number" + }, + "closing_balance": { + "description": "期末残高", + "type": "number" + }, + "composition_ratio": { + "description": "構成比", + "type": "number" + } + } + } + } + }, + "required": [ + "balances", + "company_id", + "up_to_date" + ] + } + }, + "required": [ + "trial_pl" + ] + } + } + } + } + } + } + }, + "samples/freee/api/1/reports/trial_pl_sections": { + "get": { + "tags": [ + "api", + "1", + "reports", + "trial_pl_sections" + ], + "parameters": [ + { + "name": "company_id", + "in": "query", + "required": true, + "schema": { + "description": "事業所ID", + "type": "number" + } + }, + { + "name": "section_ids", + "in": "query", + "required": true, + "schema": { + "description": "出力する部門の指定(半角数字のidを半角カンマ区切りスペースなしで指定してください)", + "type": "string" + } + }, + { + "name": "fiscal_year", + "in": "query", + "required": false, + "schema": { + "description": "会計年度", + "type": "number" + } + }, + { + "name": "start_month", + "in": "query", + "required": false, + "schema": { + "description": "発生月で絞込:開始会計月(mm)", + "type": "number" + } + }, + { + "name": "end_month", + "in": "query", + "required": false, + "schema": { + "description": "発生月で絞込:終了会計月(mm)", + "type": "number" + } + }, + { + "name": "start_date", + "in": "query", + "required": false, + "schema": { + "description": "発生日で絞込:開始日(yyyy-mm-dd)", + "type": "string" + } + }, + { + "name": "end_date", + "in": "query", + "required": false, + "schema": { + "description": "発生日で絞込:終了日(yyyy-mm-dd)", + "type": "string" + } + }, + { + "name": "account_item_display_type", + "in": "query", + "required": false, + "schema": { + "description": "勘定科目の表示(勘定科目: account_item, 決算書表示:group)", + "enum": [ + "account_item", + "group" + ], + "type": "string" + } + }, + { + "name": "breakdown_display_type", + "in": "query", + "required": false, + "schema": { + "description": "内訳の表示(取引先: partner, 品目: item, 部門: section, 勘定科目: account_item) ※勘定科目はaccount_item_display_typeが「group」の時のみ指定できます", + "enum": [ + "account_item", + "item", + "partner", + "section" + ], + "type": "string" + } + }, + { + "name": "partner_id", + "in": "query", + "required": false, + "schema": { + "description": "取引先IDで絞込(0を指定すると、取引先が未選択で絞り込めます)", + "type": "number" + } + }, + { + "name": "partner_code", + "in": "query", + "required": false, + "schema": { + "description": "取引先コードで絞込(事業所設定で取引先コードの利用を有効にしている場合のみ利用可能です)", + "type": "string" + } + }, + { + "name": "item_id", + "in": "query", + "required": false, + "schema": { + "description": "品目IDで絞込(0を指定すると、品目が未選択で絞り込めます)", + "type": "number" + } + }, + { + "name": "adjustment", + "in": "query", + "required": false, + "schema": { + "description": "決算整理仕訳で絞込(決算整理仕訳のみ: only, 決算整理仕訳以外: without)", + "enum": [ + "only", + "without" + ], + "type": "string" + } + }, + { + "name": "cost_allocation", + "in": "query", + "required": false, + "schema": { + "description": "配賦仕訳で絞込(配賦仕訳のみ:only,配賦仕訳以外:without)", + "enum": [ + "not_include", + "only" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "trial_pl_sections": { + "type": "object", + "properties": { + "company_id": { + "description": "事業所ID", + "type": "number" + }, + "up_to_date": { + "description": "集計結果が最新かどうか", + "type": "boolean" + }, + "section_ids": { + "description": "出力する部門の指定", + "type": "string" + }, + "fiscal_year": { + "description": "会計年度(条件に指定した時、または条件に月、日条件がない時のみ含まれる)", + "type": "number" + }, + "start_month": { + "description": "発生月で絞込:開始会計月(mm)(条件に指定した時のみ含まれる)", + "type": "number" + }, + "end_month": { + "description": "発生月で絞込:終了会計月(mm)(条件に指定した時のみ含まれる)", + "type": "number" + }, + "start_date": { + "description": "発生日で絞込:開始日(yyyy-mm-dd)(条件に指定した時のみ含まれる)", + "type": "string" + }, + "end_date": { + "description": "発生日で絞込:終了日(yyyy-mm-dd)(条件に指定した時のみ含まれる)", + "type": "string" + }, + "account_item_display_type": { + "description": "勘定科目の表示(勘定科目: account_item, 決算書表示:group)(条件に指定した時のみ含まれる)", + "enum": [ + "account_item", + "group" + ], + "type": "string" + }, + "breakdown_display_type": { + "description": "内訳の表示(取引先: partner, 品目: item, 勘定科目: account_item)(条件に指定した時のみ含まれる)", + "enum": [ + "account_item", + "item", + "partner" + ], + "type": "string" + }, + "partner_id": { + "description": "取引先ID(条件に指定した時のみ含まれる)", + "type": "number" + }, + "partner_code": { + "description": "取引先コード(条件に指定した時のみ含まれる)", + "type": "string" + }, + "item_id": { + "description": "品目ID(条件に指定した時のみ含まれる)", + "type": "number" + }, + "adjustment": { + "description": "決算整理仕訳のみ: only, 決算整理仕訳以外: without(条件に指定した時のみ含まれる)", + "enum": [ + "only", + "without" + ], + "type": "string" + }, + "cost_allocation": { + "description": "配賦仕訳のみ:only,配賦仕訳以外:without(条件に指定した時のみ含まれる)", + "enum": [ + "only", + "without" + ], + "type": "string" + }, + "created_at": { + "description": "作成日時", + "type": "string" + }, + "balances": { + "type": "array", + "items": { + "type": "object", + "properties": { + "account_item_id": { + "description": "勘定科目ID(勘定科目の時のみ含まれる)", + "type": "number" + }, + "account_item_name": { + "description": "勘定科目名(勘定科目の時のみ含まれる)", + "type": "string" + }, + "sections": { + "description": "部門(勘定科目の時のみ含まれる)", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "部門ID", + "type": "number" + }, + "name": { + "description": "部門名", + "type": "string" + }, + "closing_balance": { + "description": "期末残高", + "type": "number" + }, + "partners": { + "description": "breakdown_display_type:partner, account_item_display_type:account_item指定時のみ含まれる", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "取引先ID", + "type": "number" + }, + "name": { + "description": "取引先名", + "type": "string" + }, + "closing_balance": { + "description": "期末残高", + "type": "number" + } + }, + "required": [ + "id" + ] + } + }, + "items": { + "description": "breakdown_display_type:item, account_item_display_type:account_item指定時のみ含まれる", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "品目ID", + "type": "number" + }, + "name": { + "description": "品目", + "type": "string" + }, + "closing_balance": { + "description": "期末残高", + "type": "number" + } + }, + "required": [ + "id" + ] + } + } + }, + "required": [ + "id" + ] + } + }, + "account_category_id": { + "description": "勘定科目カテゴリーID(勘定科目カテゴリーの時のみ含まれる)", + "type": "number" + }, + "account_category_name": { + "description": "勘定科目カテゴリー名(勘定科目カテゴリーの時のみ含まれる)", + "type": "string" + }, + "total_line": { + "description": "合計行(勘定科目カテゴリー名の時のみ含まれる)", + "type": "boolean" + }, + "hierarchy_level": { + "description": "階層レベル", + "type": "number" + }, + "parent_account_category_id": { + "description": "上位科目カテゴリーID(上層が存在する場合含まれる)", + "type": "number" + }, + "parent_account_category_name": { + "description": "上位勘定科目カテゴリー名(上層が存在する場合含まれる)", + "type": "string" + }, + "closing_balance": { + "description": "期末残高", + "type": "number" + } + } + } + } + }, + "required": [ + "balances", + "company_id", + "section_ids", + "up_to_date" + ] + } + }, + "required": [ + "trial_pl_sections" + ] + } + } + } + } + } + } + }, + "samples/freee/api/1/reports/trial_pl_three_years": { + "get": { + "tags": [ + "api", + "1", + "reports", + "trial_pl_three_years" + ], + "parameters": [ + { + "name": "company_id", + "in": "query", + "required": true, + "schema": { + "description": "事業所ID", + "type": "number" + } + }, + { + "name": "fiscal_year", + "in": "query", + "required": false, + "schema": { + "description": "会計年度", + "type": "number" + } + }, + { + "name": "start_month", + "in": "query", + "required": false, + "schema": { + "description": "発生月で絞込:開始会計月(mm)", + "type": "number" + } + }, + { + "name": "end_month", + "in": "query", + "required": false, + "schema": { + "description": "発生月で絞込:終了会計月(mm)", + "type": "number" + } + }, + { + "name": "start_date", + "in": "query", + "required": false, + "schema": { + "description": "発生日で絞込:開始日(yyyy-mm-dd)", + "type": "string" + } + }, + { + "name": "end_date", + "in": "query", + "required": false, + "schema": { + "description": "発生日で絞込:終了日(yyyy-mm-dd)", + "type": "string" + } + }, + { + "name": "account_item_display_type", + "in": "query", + "required": false, + "schema": { + "description": "勘定科目の表示(勘定科目: account_item, 決算書表示:group)", + "enum": [ + "account_item", + "group" + ], + "type": "string" + } + }, + { + "name": "breakdown_display_type", + "in": "query", + "required": false, + "schema": { + "description": "内訳の表示(取引先: partner, 品目: item, 部門: section, 勘定科目: account_item) ※勘定科目はaccount_item_display_typeが「group」の時のみ指定できます", + "enum": [ + "account_item", + "item", + "partner", + "section" + ], + "type": "string" + } + }, + { + "name": "partner_id", + "in": "query", + "required": false, + "schema": { + "description": "取引先IDで絞込(0を指定すると、取引先が未選択で絞り込めます)", + "type": "number" + } + }, + { + "name": "partner_code", + "in": "query", + "required": false, + "schema": { + "description": "取引先コードで絞込(事業所設定で取引先コードの利用を有効にしている場合のみ利用可能です)", + "type": "string" + } + }, + { + "name": "item_id", + "in": "query", + "required": false, + "schema": { + "description": "品目IDで絞込(0を指定すると、品目が未選択で絞り込めます)", + "type": "number" + } + }, + { + "name": "section_id", + "in": "query", + "required": false, + "schema": { + "description": "部門IDで絞込(0を指定すると、部門が未選択で絞り込めます)", + "type": "number" + } + }, + { + "name": "adjustment", + "in": "query", + "required": false, + "schema": { + "description": "決算整理仕訳で絞込(決算整理仕訳のみ: only, 決算整理仕訳以外: without)", + "enum": [ + "only", + "without" + ], + "type": "string" + } + }, + { + "name": "cost_allocation", + "in": "query", + "required": false, + "schema": { + "description": "配賦仕訳で絞込(配賦仕訳のみ:only,配賦仕訳以外:without)", + "enum": [ + "not_include", + "only" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "trial_pl_three_years": { + "type": "object", + "properties": { + "company_id": { + "description": "事業所ID", + "type": "number" + }, + "up_to_date": { + "description": "集計結果が最新かどうか", + "type": "boolean" + }, + "fiscal_year": { + "description": "会計年度(条件に指定した時、または条件に月、日条件がない時のみ含まれる)", + "type": "number" + }, + "start_month": { + "description": "発生月で絞込:開始会計月(mm)(条件に指定した時のみ含まれる)", + "type": "number" + }, + "end_month": { + "description": "発生月で絞込:終了会計月(mm)(条件に指定した時のみ含まれる)", + "type": "number" + }, + "start_date": { + "description": "発生日で絞込:開始日(yyyy-mm-dd)(条件に指定した時のみ含まれる)", + "type": "string" + }, + "end_date": { + "description": "発生日で絞込:終了日(yyyy-mm-dd)(条件に指定した時のみ含まれる)", + "type": "string" + }, + "account_item_display_type": { + "description": "勘定科目の表示(勘定科目: account_item, 決算書表示:group)(条件に指定した時のみ含まれる)", + "enum": [ + "account_item", + "group" + ], + "type": "string" + }, + "breakdown_display_type": { + "description": "内訳の表示(取引先: partner, 品目: item, 部門: section, 勘定科目: account_item)(条件に指定した時のみ含まれる)", + "enum": [ + "account_item", + "item", + "partner", + "section" + ], + "type": "string" + }, + "partner_id": { + "description": "取引先ID(条件に指定した時のみ含まれる)", + "type": "number" + }, + "partner_code": { + "description": "取引先コード(条件に指定した時のみ含まれる)", + "type": "string" + }, + "item_id": { + "description": "品目ID(条件に指定した時のみ含まれる)", + "type": "number" + }, + "section_id": { + "description": "部門ID(条件に指定した時のみ含まれる)", + "type": "number" + }, + "adjustment": { + "description": "決算整理仕訳のみ: only, 決算整理仕訳以外: without(条件に指定した時のみ含まれる)", + "enum": [ + "only", + "without" + ], + "type": "string" + }, + "cost_allocation": { + "description": "配賦仕訳のみ:only,配賦仕訳以外:without(条件に指定した時のみ含まれる)", + "enum": [ + "only", + "without" + ], + "type": "string" + }, + "created_at": { + "description": "作成日時", + "type": "string" + }, + "balances": { + "type": "array", + "items": { + "type": "object", + "properties": { + "account_item_id": { + "description": "勘定科目ID(勘定科目の時のみ含まれる)", + "type": "number" + }, + "account_item_name": { + "description": "勘定科目名(勘定科目の時のみ含まれる)", + "type": "string" + }, + "partners": { + "description": "breakdown_display_type:partner, account_item_display_type:account_item指定時のみ含まれる", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "取引先ID", + "type": "number" + }, + "name": { + "description": "取引先名", + "type": "string" + }, + "two_years_before_closing_balance": { + "description": "前々年度期末残高", + "type": "number" + }, + "last_year_closing_balance": { + "description": "前年度期末残高", + "type": "number" + }, + "closing_balance": { + "description": "期末残高", + "type": "number" + }, + "year_on_year": { + "description": "前年比", + "type": "number" + } + }, + "required": [ + "id" + ] + } + }, + "items": { + "description": "breakdown_display_type:item, account_item_display_type:account_item指定時のみ含まれる", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "品目ID", + "type": "number" + }, + "name": { + "description": "品目", + "type": "string" + }, + "two_years_before_closing_balance": { + "description": "前々年度期末残高", + "type": "number" + }, + "last_year_closing_balance": { + "description": "前年度期末残高", + "type": "number" + }, + "closing_balance": { + "description": "期末残高", + "type": "number" + }, + "year_on_year": { + "description": "前年比", + "type": "number" + } + }, + "required": [ + "id" + ] + } + }, + "sections": { + "description": "breakdown_display_type:section, account_item_display_type:account_item指定時のみ含まれる", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "部門ID", + "type": "number" + }, + "name": { + "description": "部門名", + "type": "string" + }, + "two_years_before_closing_balance": { + "description": "前々年度期末残高", + "type": "number" + }, + "last_year_closing_balance": { + "description": "前年度期末残高", + "type": "number" + }, + "closing_balance": { + "description": "期末残高", + "type": "number" + }, + "year_on_year": { + "description": "前年比", + "type": "number" + } + }, + "required": [ + "id" + ] + } + }, + "account_category_id": { + "description": "勘定科目カテゴリーID(勘定科目カテゴリーの時のみ含まれる)", + "type": "number" + }, + "account_category_name": { + "description": "勘定科目カテゴリー名(勘定科目カテゴリーの時のみ含まれる)", + "type": "string" + }, + "total_line": { + "description": "合計行(勘定科目カテゴリー名の時のみ含まれる)", + "type": "boolean" + }, + "hierarchy_level": { + "description": "階層レベル", + "type": "number" + }, + "parent_account_category_id": { + "description": "上位科目カテゴリーID(上層が存在する場合含まれる)", + "type": "number" + }, + "parent_account_category_name": { + "description": "上位勘定科目カテゴリー名(上層が存在する場合含まれる)", + "type": "string" + }, + "two_years_before_closing_balance": { + "description": "前々年度期末残高", + "type": "number" + }, + "last_year_closing_balance": { + "description": "前年度期末残高", + "type": "number" + }, + "closing_balance": { + "description": "期末残高", + "type": "number" + }, + "year_on_year": { + "description": "前年比", + "type": "number" + } + } + } + } + }, + "required": [ + "balances", + "company_id", + "up_to_date" + ] + } + }, + "required": [ + "trial_pl_three_years" + ] + } + } + } + } + } + } + }, + "samples/freee/api/1/reports/trial_pl_two_years": { + "get": { + "tags": [ + "api", + "1", + "reports", + "trial_pl_two_years" + ], + "parameters": [ + { + "name": "company_id", + "in": "query", + "required": true, + "schema": { + "description": "事業所ID", + "type": "number" + } + }, + { + "name": "fiscal_year", + "in": "query", + "required": false, + "schema": { + "description": "会計年度", + "type": "number" + } + }, + { + "name": "start_month", + "in": "query", + "required": false, + "schema": { + "description": "発生月で絞込:開始会計月(mm)", + "type": "number" + } + }, + { + "name": "end_month", + "in": "query", + "required": false, + "schema": { + "description": "発生月で絞込:終了会計月(mm)", + "type": "number" + } + }, + { + "name": "start_date", + "in": "query", + "required": false, + "schema": { + "description": "発生日で絞込:開始日(yyyy-mm-dd)", + "type": "string" + } + }, + { + "name": "end_date", + "in": "query", + "required": false, + "schema": { + "description": "発生日で絞込:終了日(yyyy-mm-dd)", + "type": "string" + } + }, + { + "name": "account_item_display_type", + "in": "query", + "required": false, + "schema": { + "description": "勘定科目の表示(勘定科目: account_item, 決算書表示:group)", + "enum": [ + "account_item", + "group" + ], + "type": "string" + } + }, + { + "name": "breakdown_display_type", + "in": "query", + "required": false, + "schema": { + "description": "内訳の表示(取引先: partner, 品目: item, 部門: section, 勘定科目: account_item) ※勘定科目はaccount_item_display_typeが「group」の時のみ指定できます", + "enum": [ + "account_item", + "item", + "partner", + "section" + ], + "type": "string" + } + }, + { + "name": "partner_id", + "in": "query", + "required": false, + "schema": { + "description": "取引先IDで絞込(0を指定すると、取引先が未選択で絞り込めます)", + "type": "number" + } + }, + { + "name": "partner_code", + "in": "query", + "required": false, + "schema": { + "description": "取引先コードで絞込(事業所設定で取引先コードの利用を有効にしている場合のみ利用可能です)", + "type": "string" + } + }, + { + "name": "item_id", + "in": "query", + "required": false, + "schema": { + "description": "品目IDで絞込(0を指定すると、品目が未選択で絞り込めます)", + "type": "number" + } + }, + { + "name": "section_id", + "in": "query", + "required": false, + "schema": { + "description": "部門IDで絞込(0を指定すると、部門が未選択で絞り込めます)", + "type": "number" + } + }, + { + "name": "adjustment", + "in": "query", + "required": false, + "schema": { + "description": "決算整理仕訳で絞込(決算整理仕訳のみ: only, 決算整理仕訳以外: without)", + "enum": [ + "only", + "without" + ], + "type": "string" + } + }, + { + "name": "cost_allocation", + "in": "query", + "required": false, + "schema": { + "description": "配賦仕訳で絞込(配賦仕訳のみ:only,配賦仕訳以外:without)", + "enum": [ + "not_include", + "only" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "trial_pl_two_years": { + "type": "object", + "properties": { + "company_id": { + "description": "事業所ID", + "type": "number" + }, + "up_to_date": { + "description": "集計結果が最新かどうか", + "type": "boolean" + }, + "fiscal_year": { + "description": "会計年度(条件に指定した時、または条件に月、日条件がない時のみ含まれる)", + "type": "number" + }, + "start_month": { + "description": "発生月で絞込:開始会計月(mm)(条件に指定した時のみ含まれる)", + "type": "number" + }, + "end_month": { + "description": "発生月で絞込:終了会計月(mm)(条件に指定した時のみ含まれる)", + "type": "number" + }, + "start_date": { + "description": "発生日で絞込:開始日(yyyy-mm-dd)(条件に指定した時のみ含まれる)", + "type": "string" + }, + "end_date": { + "description": "発生日で絞込:終了日(yyyy-mm-dd)(条件に指定した時のみ含まれる)", + "type": "string" + }, + "account_item_display_type": { + "description": "勘定科目の表示(勘定科目: account_item, 決算書表示:group)(条件に指定した時のみ含まれる)", + "enum": [ + "account_item", + "group" + ], + "type": "string" + }, + "breakdown_display_type": { + "description": "内訳の表示(取引先: partner, 品目: item, 部門: section, 勘定科目: account_item)(条件に指定した時のみ含まれる)", + "enum": [ + "account_item", + "item", + "partner", + "section" + ], + "type": "string" + }, + "partner_id": { + "description": "取引先ID(条件に指定した時のみ含まれる)", + "type": "number" + }, + "partner_code": { + "description": "取引先コード(条件に指定した時のみ含まれる)", + "type": "string" + }, + "item_id": { + "description": "品目ID(条件に指定した時のみ含まれる)", + "type": "number" + }, + "section_id": { + "description": "部門ID(条件に指定した時のみ含まれる)", + "type": "number" + }, + "adjustment": { + "description": "決算整理仕訳のみ: only, 決算整理仕訳以外: without(条件に指定した時のみ含まれる)", + "enum": [ + "only", + "without" + ], + "type": "string" + }, + "cost_allocation": { + "description": "配賦仕訳のみ:only,配賦仕訳以外:without(条件に指定した時のみ含まれる)", + "enum": [ + "only", + "without" + ], + "type": "string" + }, + "created_at": { + "description": "作成日時", + "type": "string" + }, + "balances": { + "type": "array", + "items": { + "type": "object", + "properties": { + "account_item_id": { + "description": "勘定科目ID(勘定科目の時のみ含まれる)", + "type": "number" + }, + "account_item_name": { + "description": "勘定科目名(勘定科目の時のみ含まれる)", + "type": "string" + }, + "partners": { + "description": "breakdown_display_type:partner, account_item_display_type:account_item指定時のみ含まれる", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "取引先ID", + "type": "number" + }, + "name": { + "description": "取引先名", + "type": "string" + }, + "last_year_closing_balance": { + "description": "前年度期末残高", + "type": "number" + }, + "closing_balance": { + "description": "期末残高", + "type": "number" + }, + "year_on_year": { + "description": "前年比", + "type": "number" + } + }, + "required": [ + "id" + ] + } + }, + "items": { + "description": "breakdown_display_type:item, account_item_display_type:account_item指定時のみ含まれる", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "品目ID", + "type": "number" + }, + "name": { + "description": "品目", + "type": "string" + }, + "last_year_closing_balance": { + "description": "前年度期末残高", + "type": "number" + }, + "closing_balance": { + "description": "期末残高", + "type": "number" + }, + "year_on_year": { + "description": "前年比", + "type": "number" + } + }, + "required": [ + "id" + ] + } + }, + "sections": { + "description": "breakdown_display_type:section, account_item_display_type:account_item指定時のみ含まれる", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "部門ID", + "type": "number" + }, + "name": { + "description": "部門名", + "type": "string" + }, + "last_year_closing_balance": { + "description": "前年度期末残高", + "type": "number" + }, + "closing_balance": { + "description": "期末残高", + "type": "number" + }, + "year_on_year": { + "description": "前年比", + "type": "number" + } + }, + "required": [ + "id" + ] + } + }, + "account_category_id": { + "description": "勘定科目カテゴリーID(勘定科目カテゴリーの時のみ含まれる)", + "type": "number" + }, + "account_category_name": { + "description": "勘定科目カテゴリー名(勘定科目カテゴリーの時のみ含まれる)", + "type": "string" + }, + "total_line": { + "description": "合計行(勘定科目カテゴリー名の時のみ含まれる)", + "type": "boolean" + }, + "hierarchy_level": { + "description": "階層レベル", + "type": "number" + }, + "parent_account_category_id": { + "description": "上位科目カテゴリーID(上層が存在する場合含まれる)", + "type": "number" + }, + "parent_account_category_name": { + "description": "上位勘定科目カテゴリー名(上層が存在する場合含まれる)", + "type": "string" + }, + "last_year_closing_balance": { + "description": "前年度期末残高", + "type": "number" + }, + "closing_balance": { + "description": "期末残高", + "type": "number" + }, + "year_on_year": { + "description": "前年比", + "type": "number" + } + } + } + } + }, + "required": [ + "balances", + "company_id", + "up_to_date" + ] + } + }, + "required": [ + "trial_pl_two_years" + ] + } + } + } + } + } + } + }, + "samples/freee/api/1/sections/{id}": { + "get": { + "tags": [ + "api", + "1", + "sections" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "number" + } + }, + { + "name": "company_id", + "in": "query", + "required": true, + "schema": { + "description": "事業所ID", + "type": "number" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "section": { + "type": "object", + "properties": { + "id": { + "description": "部門ID", + "type": "number" + }, + "name": { + "description": "部門名 (30文字以内)", + "type": "string" + }, + "long_name": { + "description": "正式名称(255文字以内)", + "type": [ + "null", + "string" + ] + }, + "company_id": { + "description": "事業所ID", + "type": "number" + }, + "shortcut1": { + "description": "ショートカット1 (20文字以内)", + "type": [ + "null", + "string" + ] + }, + "shortcut2": { + "description": "ショートカット2 (20文字以内)", + "type": [ + "null", + "string" + ] + } + }, + "required": [ + "company_id", + "id", + "name" + ] + } + }, + "required": [ + "section" + ] + } + } + } + } + } + }, + "put": { + "tags": [ + "api", + "1", + "sections" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "number" + } + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "description": "部門の更新", + "type": "object", + "properties": { + "company_id": { + "description": "事業所ID", + "type": "number" + }, + "name": { + "description": "部門名 (30文字以内)", + "type": "string" + }, + "long_name": { + "description": "正式名称 (255文字以内)", + "type": "string" + }, + "shortcut1": { + "description": "ショートカット1 (20文字以内)", + "type": "string" + }, + "shortcut2": { + "description": "ショートカット2 (20文字以内)", + "type": "string" + }, + "parent_id": { + "description": "親部門ID (ビジネスプラン以上)", + "type": "number" + } + }, + "required": [ + "company_id", + "name" + ] + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "section": { + "type": "object", + "properties": { + "id": { + "description": "部門ID", + "type": "number" + }, + "name": { + "description": "部門名 (30文字以内)", + "type": "string" + }, + "long_name": { + "description": "正式名称(255文字以内)", + "type": [ + "null", + "string" + ] + }, + "company_id": { + "description": "事業所ID", + "type": "number" + }, + "shortcut1": { + "description": "ショートカット1 (20文字以内)", + "type": [ + "null", + "string" + ] + }, + "shortcut2": { + "description": "ショートカット2 (20文字以内)", + "type": [ + "null", + "string" + ] + } + }, + "required": [ + "company_id", + "id", + "name" + ] + } + }, + "required": [ + "section" + ] + } + } + } + } + } + }, + "delete": { + "tags": [ + "api", + "1", + "sections" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "number" + } + }, + { + "name": "company_id", + "in": "query", + "required": true, + "schema": { + "description": "事業所ID", + "type": "number" + } + } + ] + } + }, + "samples/freee/api/1/sections": { + "get": { + "tags": [ + "api", + "1", + "sections" + ], + "parameters": [ + { + "name": "company_id", + "in": "query", + "required": true, + "schema": { + "description": "事業所ID", + "type": "number" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "sections": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "部門ID", + "type": "number" + }, + "name": { + "description": "部門名 (30文字以内)", + "type": "string" + }, + "long_name": { + "description": "正式名称(255文字以内)", + "type": [ + "null", + "string" + ] + }, + "company_id": { + "description": "事業所ID", + "type": "number" + }, + "shortcut1": { + "description": "ショートカット1 (20文字以内)", + "type": [ + "null", + "string" + ] + }, + "shortcut2": { + "description": "ショートカット2 (20文字以内)", + "type": [ + "null", + "string" + ] + } + }, + "required": [ + "company_id", + "id", + "name" + ] + } + } + }, + "required": [ + "sections" + ] + } + } + } + } + } + }, + "post": { + "tags": [ + "api", + "1", + "sections" + ], + "parameters": [], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "description": "部門の作成", + "type": "object", + "properties": { + "company_id": { + "description": "事業所ID", + "type": "number" + }, + "name": { + "description": "部門名 (30文字以内)", + "type": "string" + }, + "long_name": { + "description": "正式名称 (255文字以内)", + "type": "string" + }, + "shortcut1": { + "description": "ショートカット1 (20文字以内)", + "type": "string" + }, + "shortcut2": { + "description": "ショートカット2 (20文字以内)", + "type": "string" + }, + "parent_id": { + "description": "親部門ID (ビジネスプラン以上)", + "type": "number" + } + }, + "required": [ + "company_id", + "name" + ] + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "section": { + "type": "object", + "properties": { + "id": { + "description": "部門ID", + "type": "number" + }, + "name": { + "description": "部門名 (30文字以内)", + "type": "string" + }, + "long_name": { + "description": "正式名称(255文字以内)", + "type": [ + "null", + "string" + ] + }, + "company_id": { + "description": "事業所ID", + "type": "number" + }, + "shortcut1": { + "description": "ショートカット1 (20文字以内)", + "type": [ + "null", + "string" + ] + }, + "shortcut2": { + "description": "ショートカット2 (20文字以内)", + "type": [ + "null", + "string" + ] + } + }, + "required": [ + "company_id", + "id", + "name" + ] + } + }, + "required": [ + "section" + ] + } + } + } + } + } + } + }, + "samples/freee/api/1/segments/{segment_id}/tags/{id}": { + "put": { + "tags": [ + "api", + "1", + "segments" + ], + "parameters": [ + { + "name": "segment_id", + "in": "path", + "required": true, + "schema": { + "type": "number" + } + }, + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "number" + } + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "description": "セグメントタグの作成", + "type": "object", + "properties": { + "company_id": { + "description": "事業所ID", + "type": "number" + }, + "name": { + "description": "セグメントタグ名 (30文字以内)", + "type": "string" + }, + "description": { + "description": "備考 (30文字以内)", + "type": "string" + }, + "shortcut1": { + "description": "ショートカット1 (20文字以内)", + "type": "string" + }, + "shortcut2": { + "description": "ショートカット2 (20文字以内)", + "type": "string" + } + }, + "required": [ + "company_id", + "name" + ] + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "segment_tag": { + "type": "object", + "properties": { + "id": { + "description": "セグメントタグID", + "type": "number" + }, + "name": { + "description": "セグメントタグ名", + "type": "string" + }, + "description": { + "description": "備考", + "type": [ + "null", + "string" + ] + }, + "shortcut1": { + "description": "ショートカット1 (20文字以内)", + "type": [ + "null", + "string" + ] + }, + "shortcut2": { + "description": "ショートカット2 (20文字以内)", + "type": [ + "null", + "string" + ] + } + }, + "required": [ + "description", + "id", + "name", + "shortcut1", + "shortcut2" + ] + } + }, + "required": [ + "segment_tag" + ] + } + } + } + } + } + }, + "delete": { + "tags": [ + "api", + "1", + "segments" + ], + "parameters": [ + { + "name": "segment_id", + "in": "path", + "required": true, + "schema": { + "type": "number" + } + }, + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "number" + } + }, + { + "name": "company_id", + "in": "query", + "required": true, + "schema": { + "description": "事業所ID", + "type": "number" + } + } + ] + } + }, + "samples/freee/api/1/segments/{segment_id}/tags": { + "get": { + "tags": [ + "api", + "1", + "segments" + ], + "parameters": [ + { + "name": "segment_id", + "in": "path", + "required": true, + "schema": { + "type": "number" + } + }, + { + "name": "company_id", + "in": "query", + "required": true, + "schema": { + "description": "事業所ID", + "type": "number" + } + }, + { + "name": "offset", + "in": "query", + "required": false, + "schema": { + "description": "取得レコードのオフセット (デフォルト: 0)", + "type": "number" + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "description": "取得レコードの件数 (デフォルト: 20, 最小: 1, 最大: 500)", + "type": "number" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "segment_tags": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "セグメントタグID", + "type": "number" + }, + "name": { + "description": "セグメントタグ名", + "type": "string" + }, + "description": { + "description": "備考", + "type": [ + "null", + "string" + ] + }, + "shortcut1": { + "description": "ショートカット1 (20文字以内)", + "type": [ + "null", + "string" + ] + }, + "shortcut2": { + "description": "ショートカット2 (20文字以内)", + "type": [ + "null", + "string" + ] + } + }, + "required": [ + "description", + "id", + "name", + "shortcut1", + "shortcut2" + ] + } + } + }, + "required": [ + "segment_tags" + ] + } + } + } + } + } + }, + "post": { + "tags": [ + "api", + "1", + "segments" + ], + "parameters": [ + { + "name": "segment_id", + "in": "path", + "required": true, + "schema": { + "type": "number" + } + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "description": "セグメントタグの作成", + "type": "object", + "properties": { + "company_id": { + "description": "事業所ID", + "type": "number" + }, + "name": { + "description": "セグメントタグ名 (30文字以内)", + "type": "string" + }, + "description": { + "description": "備考 (30文字以内)", + "type": "string" + }, + "shortcut1": { + "description": "ショートカット1 (20文字以内)", + "type": "string" + }, + "shortcut2": { + "description": "ショートカット2 (20文字以内)", + "type": "string" + } + }, + "required": [ + "company_id", + "name" + ] + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "segment_tag": { + "type": "object", + "properties": { + "id": { + "description": "セグメントタグID", + "type": "number" + }, + "name": { + "description": "セグメントタグ名", + "type": "string" + }, + "description": { + "description": "備考", + "type": [ + "null", + "string" + ] + }, + "shortcut1": { + "description": "ショートカット1 (20文字以内)", + "type": [ + "null", + "string" + ] + }, + "shortcut2": { + "description": "ショートカット2 (20文字以内)", + "type": [ + "null", + "string" + ] + } + }, + "required": [ + "description", + "id", + "name", + "shortcut1", + "shortcut2" + ] + } + }, + "required": [ + "segment_tag" + ] + } + } + } + } + } + } + }, + "samples/freee/api/1/tags/{id}": { + "get": { + "tags": [ + "api", + "1", + "tags" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "number" + } + }, + { + "name": "company_id", + "in": "query", + "required": true, + "schema": { + "description": "事業所ID", + "type": "number" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "tag": { + "type": "object", + "properties": { + "id": { + "description": "タグID", + "type": "number" + }, + "company_id": { + "description": "事業所ID", + "type": "number" + }, + "name": { + "description": "名前(30文字以内)", + "type": [ + "null", + "string" + ] + }, + "shortcut1": { + "description": "ショートカット1 (255文字以内)", + "type": [ + "null", + "string" + ] + }, + "shortcut2": { + "description": "ショートカット2 (255文字以内)", + "type": [ + "null", + "string" + ] + } + }, + "required": [ + "company_id", + "id", + "name" + ] + } + }, + "required": [ + "tag" + ] + } + } + } + } + } + }, + "put": { + "tags": [ + "api", + "1", + "tags" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "number" + } + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "description": "メモタグの更新", + "type": "object", + "properties": { + "company_id": { + "description": "事業所ID", + "type": "number" + }, + "name": { + "description": "メモタグ名 (30文字以内)", + "type": "string" + }, + "shortcut1": { + "description": "メモタグ検索用 (20文字以内)", + "type": "string" + }, + "shortcut2": { + "description": "メモタグ検索用 (20文字以内)", + "type": "string" + } + }, + "required": [ + "company_id", + "name" + ] + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "tag": { + "type": "object", + "properties": { + "id": { + "description": "タグID", + "type": "number" + }, + "company_id": { + "description": "事業所ID", + "type": "number" + }, + "name": { + "description": "名前(30文字以内)", + "type": [ + "null", + "string" + ] + }, + "shortcut1": { + "description": "ショートカット1 (255文字以内)", + "type": [ + "null", + "string" + ] + }, + "shortcut2": { + "description": "ショートカット2 (255文字以内)", + "type": [ + "null", + "string" + ] + } + }, + "required": [ + "company_id", + "id", + "name" + ] + } + }, + "required": [ + "tag" + ] + } + } + } + } + } + }, + "delete": { + "tags": [ + "api", + "1", + "tags" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "number" + } + }, + { + "name": "company_id", + "in": "query", + "required": true, + "schema": { + "description": "事業所ID", + "type": "number" + } + } + ] + } + }, + "samples/freee/api/1/tags": { + "get": { + "tags": [ + "api", + "1", + "tags" + ], + "parameters": [ + { + "name": "company_id", + "in": "query", + "required": true, + "schema": { + "description": "事業所ID", + "type": "number" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "tags": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "タグID", + "type": "number" + }, + "company_id": { + "description": "事業所ID", + "type": "number" + }, + "name": { + "description": "名前(30文字以内)", + "type": [ + "null", + "string" + ] + }, + "shortcut1": { + "description": "ショートカット1 (255文字以内)", + "type": [ + "null", + "string" + ] + }, + "shortcut2": { + "description": "ショートカット2 (255文字以内)", + "type": [ + "null", + "string" + ] + } + }, + "required": [ + "company_id", + "id", + "name" + ] + } + } + }, + "required": [ + "tags" + ] + } + } + } + } + } + }, + "post": { + "tags": [ + "api", + "1", + "tags" + ], + "parameters": [], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "description": "メモタグの作成", + "type": "object", + "properties": { + "company_id": { + "description": "事業所ID", + "type": "number" + }, + "name": { + "description": "メモタグ名 (30文字以内)", + "type": "string" + }, + "shortcut1": { + "description": "メモタグ検索用 (20文字以内)", + "type": "string" + }, + "shortcut2": { + "description": "メモタグ検索用 (20文字以内)", + "type": "string" + } + }, + "required": [ + "company_id", + "name" + ] + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "tag": { + "type": "object", + "properties": { + "id": { + "description": "タグID", + "type": "number" + }, + "company_id": { + "description": "事業所ID", + "type": "number" + }, + "name": { + "description": "名前(30文字以内)", + "type": [ + "null", + "string" + ] + }, + "shortcut1": { + "description": "ショートカット1 (255文字以内)", + "type": [ + "null", + "string" + ] + }, + "shortcut2": { + "description": "ショートカット2 (255文字以内)", + "type": [ + "null", + "string" + ] + } + }, + "required": [ + "company_id", + "id", + "name" + ] + } + }, + "required": [ + "tag" + ] + } + } + } + } + } + } + }, + "samples/freee/api/1/taxes/codes/{code}": { + "get": { + "tags": [ + "api", + "1", + "taxes", + "codes" + ], + "parameters": [ + { + "name": "code", + "in": "path", + "required": true, + "schema": { + "type": "number" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "tax": { + "type": "object", + "properties": { + "code": { + "description": "税区分コード", + "type": "number" + }, + "name": { + "description": "税区分名", + "type": "string" + }, + "name_ja": { + "description": "税区分名(日本語表示用)", + "type": "string" + } + }, + "required": [ + "code", + "name", + "name_ja" + ] + } + }, + "required": [ + "tax" + ] + } + } + } + } + } + } + }, + "samples/freee/api/1/taxes/codes": { + "get": { + "tags": [ + "api", + "1", + "taxes", + "codes" + ], + "parameters": [], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "taxes": { + "type": "array", + "items": { + "type": "object", + "properties": { + "code": { + "description": "税区分コード", + "type": "number" + }, + "name": { + "description": "税区分名", + "type": "string" + }, + "name_ja": { + "description": "税区分名(日本語表示用)", + "type": "string" + } + }, + "required": [ + "code", + "name", + "name_ja" + ] + } + } + }, + "required": [ + "taxes" + ] + } + } + } + } + } + } + }, + "samples/freee/api/1/taxes/companies/{company_id}": { + "get": { + "tags": [ + "api", + "1", + "taxes", + "companies" + ], + "parameters": [ + { + "name": "company_id", + "in": "path", + "required": true, + "schema": { + "type": "number" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "taxes": { + "type": "array", + "items": { + "type": "object", + "properties": { + "code": { + "description": "税区分コード", + "type": "number" + }, + "name": { + "description": "税区分名", + "type": "string" + }, + "name_ja": { + "description": "税区分名(日本語表示用)", + "type": "string" + }, + "display_category": { + "description": "税区分の表示カテゴリ(tax_5: 5%表示の税区分、tax_8: 8%表示の税区分、tax_r8: 軽減税率8%表示の税区分、tax_10: 10%表示の税区分、null: 税率未設定税区分)", + "anyOf": [ + { + "enum": [ + "tax_10", + "tax_5", + "tax_8", + "tax_r8" + ], + "type": "string" + }, + { + "type": "null" + } + ] + }, + "available": { + "description": "true: 使用する、false: 使用しない", + "type": "boolean" + } + }, + "required": [ + "available", + "code", + "display_category", + "name", + "name_ja" + ] + } + } + }, + "required": [ + "taxes" + ] + } + } + } + } + } + } + }, + "samples/freee/api/1/transfers/{id}": { + "get": { + "tags": [ + "api", + "1", + "transfers" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "number" + } + }, + { + "name": "company_id", + "in": "query", + "required": true, + "schema": { + "description": "事業所ID", + "type": "number" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "transfer": { + "type": "object", + "properties": { + "id": { + "description": "取引(振替)ID", + "type": "number" + }, + "company_id": { + "description": "事業所ID", + "type": "number" + }, + "amount": { + "description": "金額", + "type": "number" + }, + "date": { + "description": "振替日 (yyyy-mm-dd)", + "type": "string" + }, + "from_walletable_type": { + "description": "振替元口座区分 (銀行口座: bank_account, クレジットカード: credit_card, 現金: wallet)", + "anyOf": [ + { + "enum": [ + "bank_account", + "credit_card", + "wallet" + ], + "type": "string" + }, + { + "type": "null" + } + ] + }, + "from_walletable_id": { + "description": "振替元口座ID", + "type": "number" + }, + "to_walletable_type": { + "description": "振替先口座区分 (銀行口座: bank_account, クレジットカード: credit_card, 現金: wallet)", + "anyOf": [ + { + "enum": [ + "bank_account", + "credit_card", + "wallet" + ], + "type": "string" + }, + { + "type": "null" + } + ] + }, + "to_walletable_id": { + "description": "振替先口座ID", + "type": "number" + }, + "description": { + "description": "備考", + "type": "string" + } + }, + "required": [ + "amount", + "company_id", + "date", + "description", + "from_walletable_id", + "from_walletable_type", + "id", + "to_walletable_id", + "to_walletable_type" + ] + } + }, + "required": [ + "transfer" + ] + } + } + } + } + } + }, + "put": { + "tags": [ + "api", + "1", + "transfers" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "number" + } + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "description": "取引(振替)の更新", + "type": "object", + "properties": { + "to_walletable_id": { + "description": "振替先口座ID", + "type": "number" + }, + "to_walletable_type": { + "description": "振替先口座区分 (銀行口座: bank_account, クレジットカード: credit_card, 現金: wallet)", + "enum": [ + "bank_account", + "credit_card", + "wallet" + ], + "type": "string" + }, + "from_walletable_id": { + "description": "振替元口座ID", + "type": "number" + }, + "from_walletable_type": { + "description": "振替元口座区分 (銀行口座: bank_account, クレジットカード: credit_card, 現金: wallet)", + "enum": [ + "bank_account", + "credit_card", + "wallet" + ], + "type": "string" + }, + "amount": { + "description": "金額", + "type": "number" + }, + "date": { + "description": "振替日 (yyyy-mm-dd)", + "type": "string" + }, + "company_id": { + "description": "事業所ID", + "type": "number" + }, + "description": { + "description": "備考", + "type": "string" + } + }, + "required": [ + "amount", + "company_id", + "date", + "from_walletable_id", + "from_walletable_type", + "to_walletable_id", + "to_walletable_type" + ] + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "transfer": { + "type": "object", + "properties": { + "id": { + "description": "取引(振替)ID", + "type": "number" + }, + "company_id": { + "description": "事業所ID", + "type": "number" + }, + "amount": { + "description": "金額", + "type": "number" + }, + "date": { + "description": "振替日 (yyyy-mm-dd)", + "type": "string" + }, + "from_walletable_type": { + "description": "振替元口座区分 (銀行口座: bank_account, クレジットカード: credit_card, 現金: wallet)", + "anyOf": [ + { + "enum": [ + "bank_account", + "credit_card", + "wallet" + ], + "type": "string" + }, + { + "type": "null" + } + ] + }, + "from_walletable_id": { + "description": "振替元口座ID", + "type": "number" + }, + "to_walletable_type": { + "description": "振替先口座区分 (銀行口座: bank_account, クレジットカード: credit_card, 現金: wallet)", + "anyOf": [ + { + "enum": [ + "bank_account", + "credit_card", + "wallet" + ], + "type": "string" + }, + { + "type": "null" + } + ] + }, + "to_walletable_id": { + "description": "振替先口座ID", + "type": "number" + }, + "description": { + "description": "備考", + "type": "string" + } + }, + "required": [ + "amount", + "company_id", + "date", + "description", + "from_walletable_id", + "from_walletable_type", + "id", + "to_walletable_id", + "to_walletable_type" + ] + } + }, + "required": [ + "transfer" + ] + } + } + } + } + } + }, + "delete": { + "tags": [ + "api", + "1", + "transfers" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "number" + } + }, + { + "name": "company_id", + "in": "query", + "required": true, + "schema": { + "description": "事業所ID", + "type": "number" + } + } + ] + } + }, + "samples/freee/api/1/transfers": { + "get": { + "tags": [ + "api", + "1", + "transfers" + ], + "parameters": [ + { + "name": "company_id", + "in": "query", + "required": true, + "schema": { + "description": "事業所ID", + "type": "number" + } + }, + { + "name": "start_date", + "in": "query", + "required": false, + "schema": { + "description": "振替日で絞込:開始日 (yyyy-mm-dd)", + "type": "string" + } + }, + { + "name": "end_date", + "in": "query", + "required": false, + "schema": { + "description": "振替日で絞込:終了日 (yyyy-mm-dd)", + "type": "string" + } + }, + { + "name": "offset", + "in": "query", + "required": false, + "schema": { + "description": "取得レコードのオフセット (デフォルト: 0)", + "type": "number" + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "description": "取得レコードの件数 (デフォルト: 20, 最小: 1, 最大: 100)", + "type": "number" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "transfers": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "取引(振替)ID", + "type": "number" + }, + "company_id": { + "description": "事業所ID", + "type": "number" + }, + "amount": { + "description": "金額", + "type": "number" + }, + "date": { + "description": "振替日 (yyyy-mm-dd)", + "type": "string" + }, + "from_walletable_type": { + "description": "振替元口座区分 (銀行口座: bank_account, クレジットカード: credit_card, 現金: wallet)", + "anyOf": [ + { + "enum": [ + "bank_account", + "credit_card", + "wallet" + ], + "type": "string" + }, + { + "type": "null" + } + ] + }, + "from_walletable_id": { + "description": "振替元口座ID", + "type": "number" + }, + "to_walletable_type": { + "description": "振替先口座区分 (銀行口座: bank_account, クレジットカード: credit_card, 現金: wallet)", + "anyOf": [ + { + "enum": [ + "bank_account", + "credit_card", + "wallet" + ], + "type": "string" + }, + { + "type": "null" + } + ] + }, + "to_walletable_id": { + "description": "振替先口座ID", + "type": "number" + }, + "description": { + "description": "備考", + "type": "string" + } + }, + "required": [ + "amount", + "company_id", + "date", + "description", + "from_walletable_id", + "from_walletable_type", + "id", + "to_walletable_id", + "to_walletable_type" + ] + } + } + }, + "required": [ + "transfers" + ] + } + } + } + } + } + }, + "post": { + "tags": [ + "api", + "1", + "transfers" + ], + "parameters": [], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "description": "取引(振替)の作成", + "type": "object", + "properties": { + "to_walletable_id": { + "description": "振替先口座ID", + "type": "number" + }, + "to_walletable_type": { + "description": "振替先口座区分 (銀行口座: bank_account, クレジットカード: credit_card, 現金: wallet)", + "enum": [ + "bank_account", + "credit_card", + "wallet" + ], + "type": "string" + }, + "from_walletable_id": { + "description": "振替元口座ID", + "type": "number" + }, + "from_walletable_type": { + "description": "振替元口座区分 (銀行口座: bank_account, クレジットカード: credit_card, 現金: wallet)", + "enum": [ + "bank_account", + "credit_card", + "wallet" + ], + "type": "string" + }, + "amount": { + "description": "金額", + "type": "number" + }, + "date": { + "description": "振替日 (yyyy-mm-dd)", + "type": "string" + }, + "company_id": { + "description": "事業所ID", + "type": "number" + }, + "description": { + "description": "備考", + "type": "string" + } + }, + "required": [ + "amount", + "company_id", + "date", + "from_walletable_id", + "from_walletable_type", + "to_walletable_id", + "to_walletable_type" + ] + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "transfer": { + "type": "object", + "properties": { + "id": { + "description": "取引(振替)ID", + "type": "number" + }, + "company_id": { + "description": "事業所ID", + "type": "number" + }, + "amount": { + "description": "金額", + "type": "number" + }, + "date": { + "description": "振替日 (yyyy-mm-dd)", + "type": "string" + }, + "from_walletable_type": { + "description": "振替元口座区分 (銀行口座: bank_account, クレジットカード: credit_card, 現金: wallet)", + "anyOf": [ + { + "enum": [ + "bank_account", + "credit_card", + "wallet" + ], + "type": "string" + }, + { + "type": "null" + } + ] + }, + "from_walletable_id": { + "description": "振替元口座ID", + "type": "number" + }, + "to_walletable_type": { + "description": "振替先口座区分 (銀行口座: bank_account, クレジットカード: credit_card, 現金: wallet)", + "anyOf": [ + { + "enum": [ + "bank_account", + "credit_card", + "wallet" + ], + "type": "string" + }, + { + "type": "null" + } + ] + }, + "to_walletable_id": { + "description": "振替先口座ID", + "type": "number" + }, + "description": { + "description": "備考", + "type": "string" + } + }, + "required": [ + "amount", + "company_id", + "date", + "description", + "from_walletable_id", + "from_walletable_type", + "id", + "to_walletable_id", + "to_walletable_type" + ] + } + }, + "required": [ + "transfer" + ] + } + } + } + } + } + } + }, + "samples/freee/api/1/users/capabilities": { + "get": { + "tags": [ + "api", + "1", + "users", + "capabilities" + ], + "parameters": [ + { + "name": "company_id", + "in": "query", + "required": true, + "schema": { + "description": "事業所ID", + "type": "number" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "wallet_txns": { + "type": "object", + "properties": { + "read": { + "description": "閲覧", + "type": "boolean" + }, + "create": { + "description": "作成", + "type": "boolean" + }, + "update": { + "description": "更新", + "type": "boolean" + }, + "destroy": { + "description": "削除", + "type": "boolean" + } + } + }, + "deals": { + "type": "object", + "properties": { + "read": { + "description": "閲覧", + "type": "boolean" + }, + "create": { + "description": "作成", + "type": "boolean" + }, + "update": { + "description": "更新", + "type": "boolean" + }, + "destroy": { + "description": "削除", + "type": "boolean" + } + } + }, + "transfers": { + "type": "object", + "properties": { + "read": { + "description": "閲覧", + "type": "boolean" + }, + "create": { + "description": "作成", + "type": "boolean" + }, + "update": { + "description": "更新", + "type": "boolean" + }, + "destroy": { + "description": "削除", + "type": "boolean" + } + } + }, + "docs": { + "type": "object", + "properties": { + "read": { + "description": "閲覧", + "type": "boolean" + }, + "create": { + "description": "作成", + "type": "boolean" + }, + "update": { + "description": "更新", + "type": "boolean" + }, + "destroy": { + "description": "削除", + "type": "boolean" + } + } + }, + "doc_postings": { + "type": "object", + "properties": { + "read": { + "description": "閲覧", + "type": "boolean" + }, + "create": { + "description": "作成", + "type": "boolean" + }, + "update": { + "description": "更新", + "type": "boolean" + }, + "destroy": { + "description": "削除", + "type": "boolean" + } + } + }, + "receipts": { + "type": "object", + "properties": { + "read": { + "description": "閲覧", + "type": "boolean" + }, + "create": { + "description": "作成", + "type": "boolean" + }, + "update": { + "description": "更新", + "type": "boolean" + }, + "destroy": { + "description": "削除", + "type": "boolean" + } + } + }, + "receipt_stream_editor": { + "type": "object", + "properties": { + "read": { + "description": "閲覧", + "type": "boolean" + }, + "create": { + "description": "作成", + "type": "boolean" + }, + "update": { + "description": "更新", + "type": "boolean" + }, + "destroy": { + "description": "削除", + "type": "boolean" + } + } + }, + "expense_applications": { + "type": "object", + "properties": { + "read": { + "description": "閲覧", + "type": "boolean" + }, + "create": { + "description": "作成", + "type": "boolean" + }, + "update": { + "description": "更新", + "type": "boolean" + }, + "destroy": { + "description": "削除", + "type": "boolean" + } + } + }, + "spreadsheets": { + "type": "object", + "properties": { + "read": { + "description": "閲覧", + "type": "boolean" + }, + "create": { + "description": "作成", + "type": "boolean" + }, + "update": { + "description": "更新", + "type": "boolean" + }, + "destroy": { + "description": "削除", + "type": "boolean" + } + } + }, + "payment_requests": { + "type": "object", + "properties": { + "read": { + "description": "閲覧", + "type": "boolean" + }, + "create": { + "description": "作成", + "type": "boolean" + }, + "update": { + "description": "更新", + "type": "boolean" + }, + "destroy": { + "description": "削除", + "type": "boolean" + } + } + }, + "request_forms": { + "type": "object", + "properties": { + "read": { + "description": "閲覧", + "type": "boolean" + }, + "create": { + "description": "作成", + "type": "boolean" + }, + "update": { + "description": "更新", + "type": "boolean" + }, + "destroy": { + "description": "削除", + "type": "boolean" + } + } + }, + "approval_requests": { + "type": "object", + "properties": { + "read": { + "description": "閲覧", + "type": "boolean" + }, + "create": { + "description": "作成", + "type": "boolean" + }, + "update": { + "description": "更新", + "type": "boolean" + }, + "destroy": { + "description": "削除", + "type": "boolean" + } + } + }, + "reports": { + "type": "object", + "properties": { + "read": { + "description": "閲覧", + "type": "boolean" + }, + "create": { + "description": "作成", + "type": "boolean" + }, + "update": { + "description": "更新", + "type": "boolean" + }, + "destroy": { + "description": "削除", + "type": "boolean" + } + } + }, + "reports_income_expense": { + "type": "object", + "properties": { + "read": { + "description": "閲覧", + "type": "boolean" + }, + "create": { + "description": "作成", + "type": "boolean" + }, + "update": { + "description": "更新", + "type": "boolean" + }, + "destroy": { + "description": "削除", + "type": "boolean" + } + } + }, + "reports_receivables": { + "type": "object", + "properties": { + "read": { + "description": "閲覧", + "type": "boolean" + }, + "create": { + "description": "作成", + "type": "boolean" + }, + "update": { + "description": "更新", + "type": "boolean" + }, + "destroy": { + "description": "削除", + "type": "boolean" + } + } + }, + "reports_payables": { + "type": "object", + "properties": { + "read": { + "description": "閲覧", + "type": "boolean" + }, + "create": { + "description": "作成", + "type": "boolean" + }, + "update": { + "description": "更新", + "type": "boolean" + }, + "destroy": { + "description": "削除", + "type": "boolean" + } + } + }, + "reports_cash_balance": { + "type": "object", + "properties": { + "read": { + "description": "閲覧", + "type": "boolean" + }, + "create": { + "description": "作成", + "type": "boolean" + }, + "update": { + "description": "更新", + "type": "boolean" + }, + "destroy": { + "description": "削除", + "type": "boolean" + } + } + }, + "reports_crosstabs": { + "type": "object", + "properties": { + "read": { + "description": "閲覧", + "type": "boolean" + }, + "create": { + "description": "作成", + "type": "boolean" + }, + "update": { + "description": "更新", + "type": "boolean" + }, + "destroy": { + "description": "削除", + "type": "boolean" + } + } + }, + "reports_general_ledgers": { + "type": "object", + "properties": { + "read": { + "description": "閲覧", + "type": "boolean" + }, + "create": { + "description": "作成", + "type": "boolean" + }, + "update": { + "description": "更新", + "type": "boolean" + }, + "destroy": { + "description": "削除", + "type": "boolean" + } + } + }, + "reports_pl": { + "type": "object", + "properties": { + "read": { + "description": "閲覧", + "type": "boolean" + }, + "create": { + "description": "作成", + "type": "boolean" + }, + "update": { + "description": "更新", + "type": "boolean" + }, + "destroy": { + "description": "削除", + "type": "boolean" + } + } + }, + "reports_bs": { + "type": "object", + "properties": { + "read": { + "description": "閲覧", + "type": "boolean" + }, + "create": { + "description": "作成", + "type": "boolean" + }, + "update": { + "description": "更新", + "type": "boolean" + }, + "destroy": { + "description": "削除", + "type": "boolean" + } + } + }, + "reports_journals": { + "type": "object", + "properties": { + "read": { + "description": "閲覧", + "type": "boolean" + }, + "create": { + "description": "作成", + "type": "boolean" + }, + "update": { + "description": "更新", + "type": "boolean" + }, + "destroy": { + "description": "削除", + "type": "boolean" + } + } + }, + "reports_managements_planning": { + "type": "object", + "properties": { + "read": { + "description": "閲覧", + "type": "boolean" + }, + "create": { + "description": "作成", + "type": "boolean" + }, + "update": { + "description": "更新", + "type": "boolean" + }, + "destroy": { + "description": "削除", + "type": "boolean" + } + } + }, + "reports_managements_navigation": { + "type": "object", + "properties": { + "read": { + "description": "閲覧", + "type": "boolean" + }, + "create": { + "description": "作成", + "type": "boolean" + }, + "update": { + "description": "更新", + "type": "boolean" + }, + "destroy": { + "description": "削除", + "type": "boolean" + } + } + }, + "manual_journals": { + "type": "object", + "properties": { + "read": { + "description": "閲覧", + "type": "boolean" + }, + "create": { + "description": "作成", + "type": "boolean" + }, + "update": { + "description": "更新", + "type": "boolean" + }, + "destroy": { + "description": "削除", + "type": "boolean" + } + } + }, + "fixed_assets": { + "type": "object", + "properties": { + "read": { + "description": "閲覧", + "type": "boolean" + }, + "create": { + "description": "作成", + "type": "boolean" + }, + "update": { + "description": "更新", + "type": "boolean" + }, + "destroy": { + "description": "削除", + "type": "boolean" + } + } + }, + "inventory_refreshes": { + "type": "object", + "properties": { + "read": { + "description": "閲覧", + "type": "boolean" + }, + "create": { + "description": "作成", + "type": "boolean" + }, + "update": { + "description": "更新", + "type": "boolean" + }, + "destroy": { + "description": "削除", + "type": "boolean" + } + } + }, + "biz_allocations": { + "type": "object", + "properties": { + "read": { + "description": "閲覧", + "type": "boolean" + }, + "create": { + "description": "作成", + "type": "boolean" + }, + "update": { + "description": "更新", + "type": "boolean" + }, + "destroy": { + "description": "削除", + "type": "boolean" + } + } + }, + "payment_records": { + "type": "object", + "properties": { + "read": { + "description": "閲覧", + "type": "boolean" + }, + "create": { + "description": "作成", + "type": "boolean" + }, + "update": { + "description": "更新", + "type": "boolean" + }, + "destroy": { + "description": "削除", + "type": "boolean" + } + } + }, + "annual_reports": { + "type": "object", + "properties": { + "read": { + "description": "閲覧", + "type": "boolean" + }, + "create": { + "description": "作成", + "type": "boolean" + }, + "update": { + "description": "更新", + "type": "boolean" + }, + "destroy": { + "description": "削除", + "type": "boolean" + } + } + }, + "tax_reports": { + "type": "object", + "properties": { + "read": { + "description": "閲覧", + "type": "boolean" + }, + "create": { + "description": "作成", + "type": "boolean" + }, + "update": { + "description": "更新", + "type": "boolean" + }, + "destroy": { + "description": "削除", + "type": "boolean" + } + } + }, + "consumption_entries": { + "type": "object", + "properties": { + "read": { + "description": "閲覧", + "type": "boolean" + }, + "create": { + "description": "作成", + "type": "boolean" + }, + "update": { + "description": "更新", + "type": "boolean" + }, + "destroy": { + "description": "削除", + "type": "boolean" + } + } + }, + "tax_return": { + "type": "object", + "properties": { + "read": { + "description": "閲覧", + "type": "boolean" + }, + "create": { + "description": "作成", + "type": "boolean" + }, + "update": { + "description": "更新", + "type": "boolean" + }, + "destroy": { + "description": "削除", + "type": "boolean" + } + } + }, + "account_item_statements": { + "type": "object", + "properties": { + "read": { + "description": "閲覧", + "type": "boolean" + }, + "create": { + "description": "作成", + "type": "boolean" + }, + "update": { + "description": "更新", + "type": "boolean" + }, + "destroy": { + "description": "削除", + "type": "boolean" + } + } + }, + "month_end": { + "type": "object", + "properties": { + "read": { + "description": "閲覧", + "type": "boolean" + }, + "create": { + "description": "作成", + "type": "boolean" + }, + "update": { + "description": "更新", + "type": "boolean" + }, + "destroy": { + "description": "削除", + "type": "boolean" + } + } + }, + "year_end": { + "type": "object", + "properties": { + "read": { + "description": "閲覧", + "type": "boolean" + }, + "create": { + "description": "作成", + "type": "boolean" + }, + "update": { + "description": "更新", + "type": "boolean" + }, + "destroy": { + "description": "削除", + "type": "boolean" + } + } + }, + "walletables": { + "type": "object", + "properties": { + "read": { + "description": "閲覧", + "type": "boolean" + }, + "create": { + "description": "作成", + "type": "boolean" + }, + "update": { + "description": "更新", + "type": "boolean" + }, + "destroy": { + "description": "削除", + "type": "boolean" + } + } + }, + "companies": { + "type": "object", + "properties": { + "read": { + "description": "閲覧", + "type": "boolean" + }, + "create": { + "description": "作成", + "type": "boolean" + }, + "update": { + "description": "更新", + "type": "boolean" + }, + "destroy": { + "description": "削除", + "type": "boolean" + } + } + }, + "invitations": { + "type": "object", + "properties": { + "read": { + "description": "閲覧", + "type": "boolean" + }, + "create": { + "description": "作成", + "type": "boolean" + }, + "update": { + "description": "更新", + "type": "boolean" + }, + "destroy": { + "description": "削除", + "type": "boolean" + } + } + }, + "sign_in_logs": { + "type": "object", + "properties": { + "read": { + "description": "閲覧", + "type": "boolean" + }, + "create": { + "description": "作成", + "type": "boolean" + }, + "update": { + "description": "更新", + "type": "boolean" + }, + "destroy": { + "description": "削除", + "type": "boolean" + } + } + }, + "backups": { + "type": "object", + "properties": { + "read": { + "description": "閲覧", + "type": "boolean" + }, + "create": { + "description": "作成", + "type": "boolean" + }, + "update": { + "description": "更新", + "type": "boolean" + }, + "destroy": { + "description": "削除", + "type": "boolean" + } + } + }, + "opening_balances": { + "type": "object", + "properties": { + "read": { + "description": "閲覧", + "type": "boolean" + }, + "create": { + "description": "作成", + "type": "boolean" + }, + "update": { + "description": "更新", + "type": "boolean" + }, + "destroy": { + "description": "削除", + "type": "boolean" + } + } + }, + "system_conversion": { + "type": "object", + "properties": { + "read": { + "description": "閲覧", + "type": "boolean" + }, + "create": { + "description": "作成", + "type": "boolean" + }, + "update": { + "description": "更新", + "type": "boolean" + }, + "destroy": { + "description": "削除", + "type": "boolean" + } + } + }, + "resets": { + "type": "object", + "properties": { + "read": { + "description": "閲覧", + "type": "boolean" + }, + "create": { + "description": "作成", + "type": "boolean" + }, + "update": { + "description": "更新", + "type": "boolean" + }, + "destroy": { + "description": "削除", + "type": "boolean" + } + } + }, + "partners": { + "type": "object", + "properties": { + "read": { + "description": "閲覧", + "type": "boolean" + }, + "create": { + "description": "作成", + "type": "boolean" + }, + "update": { + "description": "更新", + "type": "boolean" + }, + "destroy": { + "description": "削除", + "type": "boolean" + } + } + }, + "items": { + "type": "object", + "properties": { + "read": { + "description": "閲覧", + "type": "boolean" + }, + "create": { + "description": "作成", + "type": "boolean" + }, + "update": { + "description": "更新", + "type": "boolean" + }, + "destroy": { + "description": "削除", + "type": "boolean" + } + } + }, + "sections": { + "type": "object", + "properties": { + "read": { + "description": "閲覧", + "type": "boolean" + }, + "create": { + "description": "作成", + "type": "boolean" + }, + "update": { + "description": "更新", + "type": "boolean" + }, + "destroy": { + "description": "削除", + "type": "boolean" + } + } + }, + "tags": { + "type": "object", + "properties": { + "read": { + "description": "閲覧", + "type": "boolean" + }, + "create": { + "description": "作成", + "type": "boolean" + }, + "update": { + "description": "更新", + "type": "boolean" + }, + "destroy": { + "description": "削除", + "type": "boolean" + } + } + }, + "account_items": { + "type": "object", + "properties": { + "read": { + "description": "閲覧", + "type": "boolean" + }, + "create": { + "description": "作成", + "type": "boolean" + }, + "update": { + "description": "更新", + "type": "boolean" + }, + "destroy": { + "description": "削除", + "type": "boolean" + } + } + }, + "taxes": { + "type": "object", + "properties": { + "read": { + "description": "閲覧", + "type": "boolean" + }, + "create": { + "description": "作成", + "type": "boolean" + }, + "update": { + "description": "更新", + "type": "boolean" + }, + "destroy": { + "description": "削除", + "type": "boolean" + } + } + }, + "user_matchers": { + "type": "object", + "properties": { + "read": { + "description": "閲覧", + "type": "boolean" + }, + "create": { + "description": "作成", + "type": "boolean" + }, + "update": { + "description": "更新", + "type": "boolean" + }, + "destroy": { + "description": "削除", + "type": "boolean" + } + } + }, + "deal_templates": { + "type": "object", + "properties": { + "read": { + "description": "閲覧", + "type": "boolean" + }, + "create": { + "description": "作成", + "type": "boolean" + }, + "update": { + "description": "更新", + "type": "boolean" + }, + "destroy": { + "description": "削除", + "type": "boolean" + } + } + }, + "manual_journal_templates": { + "type": "object", + "properties": { + "read": { + "description": "閲覧", + "type": "boolean" + }, + "create": { + "description": "作成", + "type": "boolean" + }, + "update": { + "description": "更新", + "type": "boolean" + }, + "destroy": { + "description": "削除", + "type": "boolean" + } + } + }, + "cost_allocations": { + "type": "object", + "properties": { + "read": { + "description": "閲覧", + "type": "boolean" + }, + "create": { + "description": "作成", + "type": "boolean" + }, + "update": { + "description": "更新", + "type": "boolean" + }, + "destroy": { + "description": "削除", + "type": "boolean" + } + } + }, + "approval_flow_routes": { + "type": "object", + "properties": { + "read": { + "description": "閲覧", + "type": "boolean" + }, + "create": { + "description": "作成", + "type": "boolean" + }, + "update": { + "description": "更新", + "type": "boolean" + }, + "destroy": { + "description": "削除", + "type": "boolean" + } + } + }, + "expense_application_templates": { + "type": "object", + "properties": { + "read": { + "description": "閲覧", + "type": "boolean" + }, + "create": { + "description": "作成", + "type": "boolean" + }, + "update": { + "description": "更新", + "type": "boolean" + }, + "destroy": { + "description": "削除", + "type": "boolean" + } + } + }, + "workflows": { + "type": "object", + "properties": { + "read": { + "description": "閲覧", + "type": "boolean" + }, + "create": { + "description": "作成", + "type": "boolean" + }, + "update": { + "description": "更新", + "type": "boolean" + }, + "destroy": { + "description": "削除", + "type": "boolean" + } + } + }, + "oauth_applications": { + "type": "object", + "properties": { + "read": { + "description": "閲覧", + "type": "boolean" + }, + "create": { + "description": "作成", + "type": "boolean" + }, + "update": { + "description": "更新", + "type": "boolean" + }, + "destroy": { + "description": "削除", + "type": "boolean" + } + } + }, + "oauth_authorizations": { + "type": "object", + "properties": { + "read": { + "description": "閲覧", + "type": "boolean" + }, + "create": { + "description": "作成", + "type": "boolean" + }, + "update": { + "description": "更新", + "type": "boolean" + }, + "destroy": { + "description": "削除", + "type": "boolean" + } + } + }, + "bank_accountant_staff_users": { + "type": "object", + "properties": { + "read": { + "description": "閲覧", + "type": "boolean" + }, + "create": { + "description": "作成", + "type": "boolean" + }, + "update": { + "description": "更新", + "type": "boolean" + }, + "destroy": { + "description": "削除", + "type": "boolean" + } + } + } + }, + "required": [ + "account_item_statements", + "account_items", + "annual_reports", + "approval_flow_routes", + "approval_requests", + "backups", + "bank_accountant_staff_users", + "biz_allocations", + "companies", + "consumption_entries", + "cost_allocations", + "deal_templates", + "deals", + "doc_postings", + "docs", + "expense_application_templates", + "expense_applications", + "fixed_assets", + "inventory_refreshes", + "invitations", + "items", + "manual_journal_templates", + "manual_journals", + "month_end", + "oauth_applications", + "oauth_authorizations", + "opening_balances", + "partners", + "payment_records", + "payment_requests", + "receipt_stream_editor", + "receipts", + "reports", + "reports_bs", + "reports_cash_balance", + "reports_crosstabs", + "reports_general_ledgers", + "reports_income_expense", + "reports_journals", + "reports_managements_navigation", + "reports_managements_planning", + "reports_payables", + "reports_pl", + "reports_receivables", + "request_forms", + "resets", + "sections", + "sign_in_logs", + "spreadsheets", + "system_conversion", + "tags", + "tax_reports", + "tax_return", + "taxes", + "transfers", + "user_matchers", + "wallet_txns", + "walletables", + "workflows", + "year_end" + ] + } + } + } + } + } + } + }, + "samples/freee/api/1/users": { + "get": { + "tags": [ + "api", + "1", + "users" + ], + "parameters": [ + { + "name": "company_id", + "in": "query", + "required": true, + "schema": { + "description": "事業所ID", + "type": "number" + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "description": "取得レコードの件数 (デフォルト: 50, 最小: 1, 最大: 3000)", + "type": "number" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "users": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "ユーザーID", + "type": "number" + }, + "email": { + "description": "メールアドレス", + "type": "string" + }, + "display_name": { + "description": "表示名", + "type": [ + "null", + "string" + ] + }, + "first_name": { + "description": "氏名(名)", + "type": [ + "null", + "string" + ] + }, + "last_name": { + "description": "氏名(姓)", + "type": [ + "null", + "string" + ] + }, + "first_name_kana": { + "description": "氏名(カナ・名)", + "type": [ + "null", + "string" + ] + }, + "last_name_kana": { + "description": "氏名(カナ・姓)", + "type": [ + "null", + "string" + ] + } + }, + "required": [ + "email", + "id" + ] + } + } + }, + "required": [ + "users" + ] + } + } + } + } + } + } + }, + "samples/freee/api/1/users/me": { + "get": { + "tags": [ + "api", + "1", + "users", + "me" + ], + "parameters": [ + { + "name": "companies", + "in": "query", + "required": false, + "schema": { + "description": "取得情報にユーザが所属する事業所一覧を含める", + "const": true, + "type": "boolean" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "user": { + "type": "object", + "properties": { + "id": { + "description": "ユーザーID", + "type": "number" + }, + "email": { + "description": "メールアドレス", + "type": "string" + }, + "display_name": { + "description": "表示ユーザー名", + "type": [ + "null", + "string" + ] + }, + "first_name": { + "description": "名", + "type": [ + "null", + "string" + ] + }, + "last_name": { + "description": "姓", + "type": [ + "null", + "string" + ] + }, + "first_name_kana": { + "description": "名(カナ)", + "type": [ + "null", + "string" + ] + }, + "last_name_kana": { + "description": "姓(カナ)", + "type": [ + "null", + "string" + ] + }, + "companies": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "事業所ID", + "type": "number" + }, + "display_name": { + "description": "表示名", + "type": "string" + }, + "role": { + "description": "ユーザーの権限", + "enum": [ + "admin", + "read_only", + "self_only", + "simple_accounting" + ], + "type": "string" + }, + "use_custom_role": { + "description": "カスタム権限(true: 使用する、false: 使用しない)", + "type": "boolean" + } + }, + "required": [ + "display_name", + "id", + "role", + "use_custom_role" + ] + } + } + }, + "required": [ + "email", + "id" + ] + } + }, + "required": [ + "user" + ] + } + } + } + } + } + }, + "put": { + "tags": [ + "api", + "1", + "users", + "me" + ], + "parameters": [], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "description": "ユーザー情報の更新", + "type": "object", + "properties": { + "display_name": { + "description": "表示名 (20文字以内)", + "type": "string" + }, + "first_name": { + "description": "氏名(名) (20文字以内)", + "type": "string" + }, + "last_name": { + "description": "氏名(姓) (20文字以内)", + "type": "string" + }, + "first_name_kana": { + "description": "氏名(カナ・名) (20文字以内)", + "type": "string" + }, + "last_name_kana": { + "description": "氏名(カナ・姓) (20文字以内)", + "type": "string" + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "user": { + "type": "object", + "properties": { + "id": { + "description": "ユーザーID", + "type": "number" + }, + "email": { + "description": "メールアドレス", + "type": "string" + }, + "display_name": { + "description": "表示名", + "type": [ + "null", + "string" + ] + }, + "first_name": { + "description": "氏名(名)", + "type": [ + "null", + "string" + ] + }, + "last_name": { + "description": "氏名(姓)", + "type": [ + "null", + "string" + ] + }, + "first_name_kana": { + "description": "氏名(カナ・名)", + "type": [ + "null", + "string" + ] + }, + "last_name_kana": { + "description": "氏名(カナ・姓)", + "type": [ + "null", + "string" + ] + } + }, + "required": [ + "email", + "id" + ] + } + } + } + } + } + } + } + } + }, + "samples/freee/api/1/wallet_txns/{id}": { + "get": { + "tags": [ + "api", + "1", + "wallet_txns" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "number" + } + }, + { + "name": "company_id", + "in": "query", + "required": true, + "schema": { + "description": "事業所ID", + "type": "number" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "wallet_txn": { + "type": "object", + "properties": { + "id": { + "description": "明細ID", + "type": "number" + }, + "company_id": { + "description": "事業所ID", + "type": "number" + }, + "date": { + "description": "取引日(yyyy-mm-dd)", + "type": "string" + }, + "amount": { + "description": "取引金額", + "type": "number" + }, + "due_amount": { + "description": "未決済金額", + "type": "number" + }, + "balance": { + "description": "残高(銀行口座等)", + "type": "number" + }, + "entry_side": { + "description": "入金/出金 (入金: income, 出金: expense)", + "enum": [ + "expense", + "income" + ], + "type": "string" + }, + "walletable_type": { + "description": "口座区分 (銀行口座: bank_account, クレジットカード: credit_card, 現金: wallet)", + "enum": [ + "bank_account", + "credit_card", + "wallet" + ], + "type": "string" + }, + "walletable_id": { + "description": "口座ID", + "type": "number" + }, + "description": { + "description": "取引内容", + "type": "string" + }, + "status": { + "description": "明細のステータス(消込待ち: 1, 消込済み: 2, 無視: 3, 消込中: 4)", + "type": "number" + } + }, + "required": [ + "amount", + "balance", + "company_id", + "date", + "description", + "due_amount", + "entry_side", + "id", + "status", + "walletable_id", + "walletable_type" + ] + } + }, + "required": [ + "wallet_txn" + ] + } + } + } + } + } + }, + "delete": { + "tags": [ + "api", + "1", + "wallet_txns" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "number" + } + }, + { + "name": "company_id", + "in": "query", + "required": true, + "schema": { + "description": "事業所ID", + "type": "number" + } + } + ] + } + }, + "samples/freee/api/1/wallet_txns": { + "get": { + "tags": [ + "api", + "1", + "wallet_txns" + ], + "parameters": [ + { + "name": "company_id", + "in": "query", + "required": true, + "schema": { + "description": "事業所ID", + "type": "number" + } + }, + { + "name": "walletable_type", + "in": "query", + "required": false, + "schema": { + "description": "口座区分 (銀行口座: bank_account, クレジットカード: credit_card, 現金: wallet)", + "enum": [ + "bank_account", + "credit_card", + "wallet" + ], + "type": "string" + } + }, + { + "name": "walletable_id", + "in": "query", + "required": false, + "schema": { + "description": "口座ID", + "type": "number" + } + }, + { + "name": "start_date", + "in": "query", + "required": false, + "schema": { + "description": "取引日で絞込:開始日 (yyyy-mm-dd)", + "type": "string" + } + }, + { + "name": "end_date", + "in": "query", + "required": false, + "schema": { + "description": "取引日で絞込:終了日 (yyyy-mm-dd)", + "type": "string" + } + }, + { + "name": "entry_side", + "in": "query", + "required": false, + "schema": { + "description": "入金/出金 (入金: income, 出金: expense)", + "enum": [ + "expense", + "income" + ], + "type": "string" + } + }, + { + "name": "offset", + "in": "query", + "required": false, + "schema": { + "description": "取得レコードのオフセット (デフォルト: 0)", + "type": "number" + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "description": "取得レコードの件数 (デフォルト: 20, 最小: 1, 最大: 100)", + "type": "number" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "wallet_txns": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "明細ID", + "type": "number" + }, + "company_id": { + "description": "事業所ID", + "type": "number" + }, + "date": { + "description": "取引日(yyyy-mm-dd)", + "type": "string" + }, + "amount": { + "description": "取引金額", + "type": "number" + }, + "due_amount": { + "description": "未決済金額", + "type": "number" + }, + "balance": { + "description": "残高(銀行口座等)", + "type": "number" + }, + "entry_side": { + "description": "入金/出金 (入金: income, 出金: expense)", + "enum": [ + "expense", + "income" + ], + "type": "string" + }, + "walletable_type": { + "description": "口座区分 (銀行口座: bank_account, クレジットカード: credit_card, 現金: wallet)", + "enum": [ + "bank_account", + "credit_card", + "wallet" + ], + "type": "string" + }, + "walletable_id": { + "description": "口座ID", + "type": "number" + }, + "description": { + "description": "取引内容", + "type": "string" + }, + "status": { + "description": "明細のステータス(消込待ち: 1, 消込済み: 2, 無視: 3, 消込中: 4)", + "type": "number" + } + }, + "required": [ + "amount", + "balance", + "company_id", + "date", + "description", + "due_amount", + "entry_side", + "id", + "status", + "walletable_id", + "walletable_type" + ] + } + } + }, + "required": [ + "wallet_txns" + ] + } + } + } + } + } + }, + "post": { + "tags": [ + "api", + "1", + "wallet_txns" + ], + "parameters": [], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "description": "明細の作成", + "type": "object", + "properties": { + "entry_side": { + "description": "入金/出金 (入金: income, 出金: expense)", + "enum": [ + "expense", + "income" + ], + "type": "string" + }, + "description": { + "description": "取引内容", + "type": "string" + }, + "amount": { + "description": "取引金額", + "type": "number" + }, + "walletable_id": { + "description": "口座ID", + "type": "number" + }, + "walletable_type": { + "description": "口座区分 (銀行口座: bank_account, クレジットカード: credit_card, 現金: wallet)", + "enum": [ + "bank_account", + "credit_card", + "wallet" + ], + "type": "string" + }, + "date": { + "description": "取引日 (yyyy-mm-dd)", + "type": "string" + }, + "company_id": { + "description": "事業所ID", + "type": "number" + }, + "balance": { + "description": "残高 (銀行口座等)", + "type": "number" + } + }, + "required": [ + "amount", + "company_id", + "date", + "entry_side", + "walletable_id", + "walletable_type" + ] + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "wallet_txn": { + "type": "object", + "properties": { + "id": { + "description": "明細ID", + "type": "number" + }, + "company_id": { + "description": "事業所ID", + "type": "number" + }, + "date": { + "description": "取引日(yyyy-mm-dd)", + "type": "string" + }, + "amount": { + "description": "取引金額", + "type": "number" + }, + "due_amount": { + "description": "未決済金額", + "type": "number" + }, + "balance": { + "description": "残高(銀行口座等)", + "type": "number" + }, + "entry_side": { + "description": "入金/出金 (入金: income, 出金: expense)", + "enum": [ + "expense", + "income" + ], + "type": "string" + }, + "walletable_type": { + "description": "口座区分 (銀行口座: bank_account, クレジットカード: credit_card, 現金: wallet)", + "enum": [ + "bank_account", + "credit_card", + "wallet" + ], + "type": "string" + }, + "walletable_id": { + "description": "口座ID", + "type": "number" + }, + "description": { + "description": "取引内容", + "type": "string" + }, + "status": { + "description": "明細のステータス(消込待ち: 1, 消込済み: 2, 無視: 3, 消込中: 4)", + "type": "number" + } + }, + "required": [ + "amount", + "balance", + "company_id", + "date", + "description", + "due_amount", + "entry_side", + "id", + "status", + "walletable_id", + "walletable_type" + ] + } + }, + "required": [ + "wallet_txn" + ] + } + } + } + } + } + } + }, + "samples/freee/api/1/walletables/{type}/{id}": { + "get": { + "tags": [ + "api", + "1", + "walletables" + ], + "parameters": [ + { + "name": "type", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "number" + } + }, + { + "name": "company_id", + "in": "query", + "required": true, + "schema": { + "description": "事業所ID", + "type": "number" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "walletable": { + "type": "object", + "properties": { + "id": { + "description": "口座ID", + "type": "number" + }, + "name": { + "description": "口座名 (255文字以内)", + "type": "string" + }, + "bank_id": { + "description": "サービスID", + "type": [ + "null", + "number" + ] + }, + "type": { + "description": "口座区分 (銀行口座: bank_account, クレジットカード: credit_card, 現金: wallet)", + "enum": [ + "bank_account", + "credit_card", + "wallet" + ], + "type": "string" + }, + "last_balance": { + "description": "同期残高", + "type": "number" + }, + "walletable_balance": { + "description": "登録残高", + "type": "number" + }, + "meta": { + "type": "object", + "properties": { + "up_to_date": { + "description": "集計結果が最新かどうか", + "type": "boolean" + } + } + } + }, + "required": [ + "bank_id", + "id", + "name", + "type" + ] + } + }, + "required": [ + "walletable" + ] + } + } + } + } + } + }, + "put": { + "tags": [ + "api", + "1", + "walletables" + ], + "parameters": [ + { + "name": "type", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "number" + } + }, + { + "name": "company_id", + "in": "query", + "required": true, + "schema": { + "description": "事業所ID", + "type": "number" + } + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "description": "口座の作成", + "type": "object", + "properties": { + "name": { + "description": "口座名 (255文字以内)", + "type": "string" + }, + "company_id": { + "description": "事業所ID", + "type": "number" + } + }, + "required": [ + "company_id", + "name" + ] + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "walletable": { + "type": "object", + "properties": { + "id": { + "description": "口座ID", + "type": "number" + }, + "name": { + "description": "口座名 (255文字以内)", + "type": "string" + }, + "bank_id": { + "description": "サービスID", + "type": [ + "null", + "number" + ] + }, + "type": { + "description": "口座区分 (銀行口座: bank_account, クレジットカード: credit_card, 現金: wallet)", + "enum": [ + "bank_account", + "credit_card", + "wallet" + ], + "type": "string" + }, + "last_balance": { + "description": "同期残高", + "type": "number" + }, + "walletable_balance": { + "description": "登録残高", + "type": "number" + }, + "meta": { + "type": "object", + "properties": { + "up_to_date": { + "description": "集計結果が最新かどうか", + "type": "boolean" + } + } + } + }, + "required": [ + "bank_id", + "id", + "name", + "type" + ] + } + }, + "required": [ + "walletable" + ] + } + } + } + } + } + }, + "delete": { + "tags": [ + "api", + "1", + "walletables" + ], + "parameters": [ + { + "name": "type", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "number" + } + }, + { + "name": "company_id", + "in": "query", + "required": true, + "schema": { + "description": "事業所ID", + "type": "number" + } + } + ] + } + }, + "samples/freee/api/1/walletables": { + "get": { + "tags": [ + "api", + "1", + "walletables" + ], + "parameters": [ + { + "name": "company_id", + "in": "query", + "required": true, + "schema": { + "description": "事業所ID", + "type": "number" + } + }, + { + "name": "with_balance", + "in": "query", + "required": false, + "schema": { + "description": "残高情報を含める", + "type": "boolean" + } + }, + { + "name": "type", + "in": "query", + "required": false, + "schema": { + "description": "口座種別(bank_account : 銀行口座, credit_card : クレジットカード, wallet : その他の決済口座)", + "enum": [ + "bank_account", + "credit_card", + "wallet" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "walletables": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "口座ID", + "type": "number" + }, + "name": { + "description": "口座名 (255文字以内)", + "type": "string" + }, + "bank_id": { + "description": "サービスID", + "type": [ + "null", + "number" + ] + }, + "type": { + "description": "口座区分 (銀行口座: bank_account, クレジットカード: credit_card, 現金: wallet)", + "enum": [ + "bank_account", + "credit_card", + "wallet" + ], + "type": "string" + }, + "last_balance": { + "description": "同期残高", + "type": "number" + }, + "walletable_balance": { + "description": "登録残高", + "type": "number" + }, + "meta": { + "type": "object", + "properties": { + "up_to_date": { + "description": "集計結果が最新かどうか", + "type": "boolean" + } + } + } + }, + "required": [ + "bank_id", + "id", + "name", + "type" + ] + } + }, + "meta": { + "type": "object", + "properties": { + "up_to_date": { + "description": "集計結果が最新かどうか", + "type": "boolean" + } + } + } + }, + "required": [ + "walletables" + ] + } + } + } + } + } + }, + "post": { + "tags": [ + "api", + "1", + "walletables" + ], + "parameters": [], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "description": "口座の作成", + "type": "object", + "properties": { + "name": { + "description": "口座名 (255文字以内)", + "type": "string" + }, + "type": { + "description": "口座種別(bank_account : 銀行口座, credit_card : クレジットカード, wallet : その他の決済口座)", + "enum": [ + "bank_account", + "credit_card", + "wallet" + ], + "type": "string" + }, + "company_id": { + "description": "事業所ID", + "type": "number" + }, + "bank_id": { + "description": "サービスID", + "type": "number" + }, + "group_name": { + "description": "決算書表示名(小カテゴリー) 例:売掛金, 受取手形, 未収入金(法人のみ), 買掛金, 支払手形, 未払金, 預り金, 前受金", + "type": "string" + } + }, + "required": [ + "company_id", + "name", + "type" + ] + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "description": "口座ID", + "type": "number" + }, + "name": { + "description": "口座名, 最大255文字", + "type": "string" + }, + "bank_id": { + "description": "サービスID", + "type": "number" + }, + "type": { + "description": "口座区分 (銀行口座: bank_account, クレジットカード: credit_card, 現金: wallet)", + "enum": [ + "bank_account", + "credit_card", + "wallet" + ], + "type": "string" + } + }, + "required": [ + "bank_id", + "id", + "name", + "type" + ] + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "URLSearchParams": { + "type": "object", + "properties": { + "size": { + "description": "The total number of parameter entries.", + "type": "number" + } + }, + "required": [ + "size" + ] + }, + "Blob": { + "type": "object", + "properties": { + "size": { + "type": "number" + }, + "type": { + "type": "string" + } + }, + "required": [ + "size", + "type" + ] + }, + "FormData": { + "type": "object" + }, + "File": { + "type": "object", + "properties": { + "lastModified": { + "type": "number" + }, + "name": { + "type": "string" + }, + "webkitRelativePath": { + "type": "string" + }, + "size": { + "type": "number" + }, + "type": { + "type": "string" + } + }, + "required": [ + "lastModified", + "name", + "size", + "type", + "webkitRelativePath" + ] + }, + "ReadStream": { + "description": "Instances of `fs.ReadStream` are created and returned using the {@link createReadStream} function.", + "type": "object", + "properties": { + "bytesRead": { + "description": "The number of bytes that have been read so far.", + "type": "number" + }, + "path": { + "description": "The path to the file the stream is reading from as specified in the first\nargument to `fs.createReadStream()`. If `path` is passed as a string, then`readStream.path` will be a string. If `path` is passed as a `Buffer`, then`readStream.path` will be a\n`Buffer`. If `fd` is specified, then`readStream.path` will be `undefined`.", + "anyOf": [ + { + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^[0-9]+$": { + "type": "number" + } + }, + "properties": { + "BYTES_PER_ELEMENT": { + "type": "number" + }, + "buffer": { + "$ref": "#/components/schemas/ArrayBufferLike" + }, + "byteLength": { + "type": "number" + }, + "byteOffset": { + "type": "number" + }, + "length": { + "type": "number" + }, + "__@toStringTag@138753": { + "type": "string", + "const": "Uint8Array" + } + }, + "required": [ + "BYTES_PER_ELEMENT", + "__@toStringTag@138753", + "buffer", + "byteLength", + "byteOffset", + "length" + ] + }, + { + "type": "string" + } + ] + }, + "pending": { + "description": "This property is `true` if the underlying file has not been opened yet,\ni.e. before the `'ready'` event is emitted.", + "type": "boolean" + }, + "readableAborted": { + "description": "Returns whether the stream was destroyed or errored before emitting `'end'`.", + "type": "boolean" + }, + "readable": { + "description": "Is `true` if it is safe to call {@link read}, which means\nthe stream has not been destroyed or emitted `'error'` or `'end'`.", + "type": "boolean" + }, + "readableDidRead": { + "description": "Returns whether `'data'` has been emitted.", + "type": "boolean" + }, + "readableEncoding": { + "description": "Getter for the property `encoding` of a given `Readable` stream. The `encoding` property can be set using the {@link setEncoding} method.", + "anyOf": [ + { + "enum": [ + "ascii", + "base64", + "base64url", + "binary", + "hex", + "latin1", + "ucs-2", + "ucs2", + "utf-16le", + "utf-8", + "utf16le", + "utf8" + ], + "type": "string" + }, + { + "type": "null" + } + ] + }, + "readableEnded": { + "description": "Becomes `true` when [`'end'`](https://nodejs.org/docs/latest-v22.x/api/stream.html#event-end) event is emitted.", + "type": "boolean" + }, + "readableFlowing": { + "description": "This property reflects the current state of a `Readable` stream as described\nin the [Three states](https://nodejs.org/docs/latest-v22.x/api/stream.html#three-states) section.", + "type": [ + "null", + "boolean" + ] + }, + "readableHighWaterMark": { + "description": "Returns the value of `highWaterMark` passed when creating this `Readable`.", + "type": "number" + }, + "readableLength": { + "description": "This property contains the number of bytes (or objects) in the queue\nready to be read. The value provides introspection data regarding\nthe status of the `highWaterMark`.", + "type": "number" + }, + "readableObjectMode": { + "description": "Getter for the property `objectMode` of a given `Readable` stream.", + "type": "boolean" + }, + "destroyed": { + "description": "Is `true` after `readable.destroy()` has been called.", + "type": "boolean" + }, + "closed": { + "description": "Is `true` after `'close'` has been emitted.", + "type": "boolean" + }, + "errored": { + "description": "Returns error if the stream has been destroyed with an error.", + "anyOf": [ + { + "$ref": "#/components/schemas/Error" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "bytesRead", + "closed", + "destroyed", + "errored", + "path", + "pending", + "readable", + "readableAborted", + "readableDidRead", + "readableEncoding", + "readableEnded", + "readableFlowing", + "readableHighWaterMark", + "readableLength", + "readableObjectMode" + ] + }, + "ArrayBufferLike": { + "anyOf": [ + { + "$ref": "#/components/schemas/ArrayBuffer" + }, + { + "$ref": "#/components/schemas/SharedArrayBuffer" + } + ] + }, + "ArrayBuffer": { + "type": "object", + "properties": { + "byteLength": { + "type": "number" + }, + "__@toStringTag@138753": { + "type": "string" + } + }, + "required": [ + "__@toStringTag@138753", + "byteLength" + ] + }, + "SharedArrayBuffer": { + "type": "object", + "properties": { + "byteLength": { + "type": "number" + }, + "__@species@139211": { + "$ref": "#/components/schemas/SharedArrayBuffer" + }, + "__@toStringTag@138753": { + "type": "string", + "const": "SharedArrayBuffer" + } + }, + "required": [ + "__@species@139211", + "__@toStringTag@138753", + "byteLength" + ] + }, + "Error": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "message": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "cause": {} + }, + "required": [ + "message", + "name" + ] + } + } + } +} \ No newline at end of file diff --git a/samples/freee/@types/index.ts b/samples/freee/@types/index.ts new file mode 100644 index 0000000..2d7d5d7 --- /dev/null +++ b/samples/freee/@types/index.ts @@ -0,0 +1,3531 @@ +/* eslint-disable */ +import type { ReadStream } from 'fs' + +export type PaymentParams = { + /** 事業所ID */ + company_id: number; + /** 支払日 */ + date: string; + /** 口座区分 (銀行口座: bank_account, クレジットカード: credit_card, 現金: wallet, プライベート資金(法人の場合は役員借入金もしくは役員借入金、個人の場合は事業主貸もしくは事業主借): private_account_item):payments指定時は必須 */ + from_walletable_type: 'bank_account' | 'credit_card' | 'wallet' | 'private_account_item'; + /** 口座ID(from_walletable_typeがprivate_account_itemの場合は勘定科目ID):payments指定時は必須 */ + from_walletable_id: number; + /** 金額 */ + amount: number; +} + +export type DealCreateParams = { + /** 発生日 (yyyy-mm-dd) */ + issue_date: string; + /** 収支区分 (収入: income, 支出: expense) */ + type: 'income' | 'expense'; + /** 事業所ID */ + company_id: number; + /** 支払期日(yyyy-mm-dd) */ + due_date?: string | undefined; + /** 取引先ID */ + partner_id?: number | undefined; + /** 取引先コード */ + partner_code?: string | undefined; + /** 管理番号 */ + ref_number?: string | undefined; + details: { + /** 税区分コード */ + tax_code?: number | undefined; + /** 税区分ID(廃止予定。上記tax_codeを使用してください。tax_code, tax_idはどちらかの指定が必須です。) */ + tax_id?: number | undefined; + /** 勘定科目ID */ + account_item_id: number; + /** 取引金額(税込で指定してください) */ + amount: number; + /** 品目ID */ + item_id?: number | undefined; + /** 部門ID */ + section_id?: number | undefined; + /** メモタグID */ + tag_ids?: number[] | undefined; + /** セグメント1ID */ + segment_1_tag_id?: number | undefined; + /** セグメント2ID */ + segment_2_tag_id?: number | undefined; + /** セグメント3ID */ + segment_3_tag_id?: number | undefined; + /** 備考 */ + description?: string | undefined; + /** 消費税額(指定しない場合は自動で計算されます) */ + vat?: number | undefined; + }[]; + /** 支払行一覧(配列):未指定の場合、未決済の取引を作成します。 */ + payments?: { + /** 支払金額:payments指定時は必須 */ + amount: number; + /** 口座ID(from_walletable_typeがprivate_account_itemの場合は勘定科目ID):payments指定時は必須 */ + from_walletable_id: number; + /** 口座区分 (銀行口座: bank_account, クレジットカード: credit_card, 現金: wallet, プライベート資金(法人の場合は役員借入金もしくは役員借入金、個人の場合は事業主貸もしくは事業主借): private_account_item):payments指定時は必須 */ + from_walletable_type: 'bank_account' | 'credit_card' | 'wallet' | 'private_account_item'; + /** 支払日:payments指定時は必須 */ + date: string; + }[] | undefined; + /** 証憑ファイルID(配列) */ + receipt_ids?: number[] | undefined; +} + +export type DealUpdateParams = { + /** 発生日 (yyyy-mm-dd) */ + issue_date: string; + /** 収支区分 (収入: income, 支出: expense) */ + type: 'income' | 'expense'; + /** 事業所ID */ + company_id: number; + /** 支払期日(yyyy-mm-dd) */ + due_date?: string | undefined; + /** 取引先ID */ + partner_id?: number | undefined; + /** 取引先コード */ + partner_code?: string | undefined; + /** 管理番号 */ + ref_number?: string | undefined; + details: { + /** 取引行ID: 既存取引行を更新する場合に指定します。IDを指定しない取引行は、新規行として扱われ追加されます。また、detailsに含まれない既存の取引行は削除されます。更新後も残したい行は、必ず取引行IDを指定してdetailsに含めてください。 */ + id?: number | undefined; + /** 税区分コード */ + tax_code?: number | undefined; + /** 税区分ID(廃止予定。上記tax_codeを使用してください。tax_code, tax_idはどちらかの指定が必須です。) */ + tax_id?: number | undefined; + /** 勘定科目ID */ + account_item_id: number; + /** 取引金額(税込で指定してください) */ + amount: number; + /** 品目ID */ + item_id?: number | undefined; + /** 部門ID */ + section_id?: number | undefined; + /** メモタグID */ + tag_ids?: number[] | undefined; + /** セグメント1ID */ + segment_1_tag_id?: number | undefined; + /** セグメント2ID */ + segment_2_tag_id?: number | undefined; + /** セグメント3ID */ + segment_3_tag_id?: number | undefined; + /** 備考 */ + description?: string | undefined; + /** 消費税額(指定しない場合は自動で計算されます) */ + vat?: number | undefined; + }[]; + /** 証憑ファイルID(配列) */ + receipt_ids?: number[] | null | undefined; +} + +export type ManualJournalCreateParams = { + /** 事業所ID */ + company_id: number; + /** 発生日 (yyyy-mm-dd) */ + issue_date: string; + /** 決算整理仕訳フラグ(falseまたは未指定の場合: 日常仕訳) */ + adjustment?: boolean | undefined; + details: { + /** 貸借(貸方: credit, 借方: debit) */ + entry_side: 'debit' | 'credit'; + /** 税区分コード */ + tax_code: number; + /** 勘定科目ID */ + account_item_id: number; + /** 取引金額(税込で指定してください) */ + amount: number; + /** 消費税額(指定しない場合は自動で計算されます) */ + vat?: number | undefined; + /** 取引先ID */ + partner_id?: number | undefined; + /** 取引先コード */ + partner_code?: string | undefined; + /** 品目ID */ + item_id?: number | undefined; + /** 部門ID */ + section_id?: number | undefined; + /** メモタグID */ + tag_ids?: number[] | undefined; + /** セグメント1ID */ + segment_1_tag_id?: number | undefined; + /** セグメント2ID */ + segment_2_tag_id?: number | undefined; + /** セグメント3ID */ + segment_3_tag_id?: number | undefined; + /** 備考 */ + description?: string | undefined; + }[]; +} + +export type ManualJournalUpdateParams = { + /** 事業所ID */ + company_id: number; + /** 発生日 (yyyy-mm-dd) */ + issue_date: string; + /** 決算整理仕訳フラグ(falseまたは未指定の場合: 日常仕訳) */ + adjustment?: boolean | undefined; + details: { + /** 貸借行ID: 既存貸借行を更新または削除する場合に指定します。IDを指定しない貸借行は、新規行として扱われ追加されます。 */ + id?: number | undefined; + /** 貸借(貸方: credit, 借方: debit) */ + entry_side: 'debit' | 'credit'; + /** 税区分コード */ + tax_code: number; + /** 勘定科目ID */ + account_item_id: number; + /** 取引金額(税込で指定してください) */ + amount: number; + /** 消費税額(指定しない場合は自動で計算されます) */ + vat?: number | undefined; + /** 取引先ID */ + partner_id?: number | undefined; + /** 取引先コード */ + partner_code?: string | undefined; + /** 品目ID */ + item_id?: number | undefined; + /** 部門ID */ + section_id?: number | undefined; + /** メモタグID */ + tag_ids?: number[] | undefined; + /** セグメント1ID */ + segment_1_tag_id?: number | undefined; + /** セグメント2ID */ + segment_2_tag_id?: number | undefined; + /** セグメント3ID */ + segment_3_tag_id?: number | undefined; + /** 備考 */ + description?: string | undefined; + }[]; +} + +export type CompanyParams = { + /** 事業所の正式名称 (100文字以内) */ + name?: string | undefined; + /** 正式名称フリガナ (100文字以内) */ + name_kana?: string | undefined; + /** 担当者名 (50文字以内) */ + contact_name?: string | undefined; + + address_attributes?: { + /** 郵便番号 */ + zipcode?: string | undefined; + /** 都道府県コード(0: 北海道、1:青森、2:岩手、3:宮城、4:秋田、5:山形、6:福島、7:茨城、8:栃木、9:群馬、10:埼玉、11:千葉、12:東京、13:神奈川、14:新潟、15:富山、16:石川、17:福井、18:山梨、19:長野、20:岐阜、21:静岡、22:愛知、23:三重、24:滋賀、25:京都、26:大阪、27:兵庫、28:奈良、29:和歌山、30:鳥取、31:島根、32:岡山、33:広島、34:山口、35:徳島、36:香川、37:愛媛、38:高知、39:福岡、40:佐賀、41:長崎、42:熊本、43:大分、44:宮崎、45:鹿児島、46:沖縄 */ + prefecture_code?: number | undefined; + /** 市区町村・番地 */ + street_name1?: string | undefined; + /** 建物名・部屋番号など */ + street_name2?: string | undefined; + } | undefined; + + /** 電話番号1 */ + phone1?: string | undefined; + /** 電話番号2 */ + phone2?: string | undefined; + /** FAX */ + fax?: string | undefined; + + sales_information_attributes?: { + /** 種別(agriculture_forestry_fisheries_ore: 農林水産業/鉱業、construction: 建設、manufacturing_processing: 製造/加工、it: IT、transportation_logistics: 運輸/物流、retail_wholesale: 小売/卸売、finance_insurance: 金融/保険、real_estate_rental: 不動産/レンタル、profession: 士業/学術/専門技術サービス、design_production: デザイン/制作、food: 飲食、leisure_entertainment: レジャー/娯楽、lifestyle: 生活関連サービス、education: 教育/学習支援、medical_welfare: 医療/福祉、other_services: その他サービス、other: その他)Available values : agriculture_forestry_fisheries_ore, construction, manufacturing_processing, it, transportation_logistics, retail_wholesale, finance_insurance, real_estate_rental, profession, design_production, food, leisure_entertainment, lifestyle, education, medical_welfare, other_services, other */ + industry_class?: 'agriculture_forestry_fisheries_ore' | 'construction' | 'manufacturing_processing' | 'it' | 'transportation_logistics' | 'retail_wholesale' | 'finance_insurance' | 'real_estate_rental' | 'profession' | 'design_production' | 'food' | 'leisure_entertainment' | 'lifestyle' | 'education' | 'medical_welfare' | 'other_services' | 'other' | undefined; + /** 業種(agriculture: 農業, forestry: 林業, fishing_industry: 漁業、水産養殖業, mining: 鉱業、採石業、砂利採取業, civil_contractors: 土木工事業, pavement: 舗装工事業, carpenter: とび、大工、左官等の建設工事業, renovation: リフォーム工事業, electrical_plumbing: 電気、管工事等の設備工事業, grocery: 食料品の製造加工業, machinery_manufacturing: 機械器具の製造加工業, printing: 印刷業, other_manufacturing: その他の製造加工業, software_development: 受託:ソフトウェア、アプリ開発業, system_development: 受託:システム開発業, survey_analysis: 受託:調査、分析等の情報処理業, server_management: 受託:サーバー運営管理, website_production: 受託:ウェブサイト制作, online_service_management: オンラインサービス運営業, online_advertising_agency: オンライン広告代理店業, online_advertising_planning_production: オンライン広告企画・制作業, online_media_management: オンラインメディア運営業, portal_site_management: ポータルサイト運営業, other_it_services: その他、IT サービス業, transport_delivery: 輸送業、配送業, delivery: バイク便等の配達業, other_transportation_logistics: その他の運輸業、物流業, other_wholesale: 卸売業:その他, clothing_wholesale_fiber: 卸売業:衣類卸売/繊維, food_wholesale: 卸売業:飲食料品, entrusted_development_wholesale: 卸売業:機械器具, online_shop: 小売業:無店舗 オンラインショップ, fashion_grocery_store: 小売業:店舗あり ファッション、雑貨, food_store: 小売業:店舗あり 生鮮食品、飲食料品, entrusted_store: 小売業:店舗あり 機械、器具, other_store: 小売業:店舗あり その他, financial_instruments_exchange: 金融業:金融商品取引, commodity_futures_investment_advisor: 金融業:商品先物取引、商品投資顧問, other_financial: 金融業:その他, brokerage_insurance: 保険業:仲介、代理, other_insurance: 保険業:その他, real_estate_developer: 不動産業:ディベロッパー, real_estate_brokerage: 不動産業:売買、仲介, rent_coin_parking_management: 不動産業:賃貸、コインパーキング、管理, rental_office_co_working_space: 不動産業:レンタルオフィス、コワーキングスペース, rental_lease: レンタル業、リース業, cpa_tax_accountant: 士業:公認会計士事務所、税理士事務所, law_office: 士業:法律事務所, judicial_and_administrative_scrivener: 士業:司法書士事務所/行政書士事務所, labor_consultant: 士業:社会保険労務士事務所, other_profession: 士業:その他, business_consultant: 経営コンサルタント, academic_research_development: 学術・開発研究機関, advertising_agency: 広告代理店, advertising_planning_production: 広告企画/制作, design_development: ソフトウェア、アプリ開発業(受託), apparel_industry_design: 服飾デザイン業、工業デザイン業, website_design: ウェブサイト制作(受託), advertising_planning_design: 広告企画/制作業, other_design: その他、デザイン/制作, restaurants_coffee_shops: レストラン、喫茶店等の飲食店業, sale_of_lunch: 弁当の販売業, bread_confectionery_manufacture_sale: パン、菓子等の製造販売業, delivery_catering_mobile_catering: デリバリー業、ケータリング業、移動販売業, hotel_inn: 宿泊業:ホテル、旅館, homestay: 宿泊業:民泊, travel_agency: 旅行代理店業, leisure_sports_facility_management: レジャー、スポーツ等の施設運営業, show_event_management: ショー、イベント等の興行、イベント運営業, barber: ビューティ、ヘルスケア業:床屋、理容室, beauty_salon: ビューティ、ヘルスケア業:美容室, spa_sand_bath_sauna: ビューティ、ヘルスケア業:スパ、砂風呂、サウナ等, este_ail_salon: ビューティ、ヘルスケア業:その他、エステサロン、ネイルサロン等, bridal_planning_introduce_wedding: 冠婚葬祭業:ブライダルプランニング、結婚式場紹介等, memorial_ceremony_funeral: 冠婚葬祭業:メモリアルセレモニー、葬儀等, moving: 引っ越し業, courier_industry: 宅配業, house_maid_cleaning_agency: 家事代行サービス業:無店舗 ハウスメイド、掃除代行等, re_tailoring_clothes: 家事代行サービス業:店舗あり 衣類修理、衣類仕立て直し等, training_institute_management: 研修所等の施設運営業, tutoring_school: 学習塾、進学塾等の教育・学習支援業, music_calligraphy_abacus_classroom: 音楽教室、書道教室、そろばん教室等のの教育・学習支援業, english_school: 英会話スクール等の語学学習支援業, tennis_yoga_judo_school: テニススクール、ヨガ教室、柔道場等のスポーツ指導、支援業, culture_school: その他、カルチャースクール等の教育・学習支援業, seminar_planning_management: セミナー等の企画、運営業, hospital_clinic: 医療業:病院、一般診療所、クリニック等, dental_clinic: 医療業:歯科診療所, other_medical_services: 医療業:その他、医療サービス等, nursery: 福祉業:保育所等、児童向け施設型サービス, nursing_home: 福祉業:老人ホーム等、老人向け施設型サービス, rehabilitation_support_services: 福祉業:療育支援サービス等、障害者等向け施設型サービス, other_welfare: 福祉業:その他、施設型福祉サービス, visit_welfare_service: 福祉業:訪問型福祉サービス, recruitment_temporary_staffing: 人材紹介業、人材派遣業, life_related_recruitment_temporary_staffing: 生活関連サービスの人材紹介業、人材派遣業, car_maintenance_car_repair: 自動車整備業、自動車修理業, machinery_equipment_maintenance_repair: 機械機器類の整備業、修理業, cleaning_maintenance_building_management: 清掃業、メンテナンス業、建物管理業, security: 警備業, other_services: その他のサービス業, npo: NPO, general_incorporated_association: 一般社団法人, general_incorporated_foundation: 一般財団法人, other_association: その他組織) */ + industry_code?: 'agriculture' | 'forestry' | 'fishing_industry' | 'mining' | 'civil_contractors' | 'pavement' | 'carpenter' | 'renovation' | 'electrical_plumbing' | 'grocery' | 'machinery_manufacturing' | 'printing' | 'other_manufacturing' | 'software_development' | 'system_development' | 'survey_analysis' | 'server_management' | 'website_production' | 'online_service_management' | 'online_advertising_agency' | 'online_advertising_planning_production' | 'online_media_management' | 'portal_site_management' | 'other_it_services' | 'transport_delivery' | 'delivery' | 'other_transportation_logistics' | 'other_wholesale' | 'clothing_wholesale_fiber' | 'food_wholesale' | 'entrusted_development_wholesale' | 'online_shop' | 'fashion_grocery_store' | 'food_store' | 'entrusted_store' | 'other_store' | 'financial_instruments_exchange' | 'commodity_futures_investment_advisor' | 'other_financial' | 'brokerage_insurance' | 'other_insurance' | 'real_estate_developer' | 'real_estate_brokerage' | 'rent_coin_parking_management' | 'rental_office_co_working_space' | 'rental_lease' | 'cpa_tax_accountant' | 'law_office' | 'judicial_and_administrative_scrivener' | 'labor_consultant' | 'other_profession' | 'business_consultant' | 'academic_research_development' | 'advertising_agency' | 'advertising_planning_production' | 'design_development' | 'apparel_industry_design' | 'website_design' | 'advertising_planning_design' | 'other_design' | 'restaurants_coffee_shops' | 'sale_of_lunch' | 'bread_confectionery_manufacture_sale' | 'delivery_catering_mobile_catering' | 'hotel_inn' | 'homestay' | 'travel_agency' | 'leisure_sports_facility_management' | 'show_event_management' | 'barber' | 'beauty_salon' | 'spa_sand_bath_sauna' | 'este_ail_salon' | 'bridal_planning_introduce_wedding' | 'memorial_ceremony_funeral' | 'moving' | 'courier_industry' | 'house_maid_cleaning_agency' | 're_tailoring_clothes' | 'training_institute_management' | 'tutoring_school' | 'music_calligraphy_abacus_classroom' | 'english_school' | 'tennis_yoga_judo_school' | 'culture_school' | 'seminar_planning_management' | 'hospital_clinic' | 'dental_clinic' | 'other_medical_services' | 'nursery' | 'nursing_home' | 'rehabilitation_support_services' | 'other_welfare' | 'visit_welfare_service' | 'recruitment_temporary_staffing' | 'life_related_recruitment_temporary_staffing' | 'car_maintenance_car_repair' | 'machinery_equipment_maintenance_repair' | 'cleaning_maintenance_building_management' | 'security' | 'other_services' | 'npo' | 'general_incorporated_association' | 'general_incorporated_foundation' | 'other_association' | undefined; + } | undefined; + + /** 従業員数(0: 経営者のみ、1: 2~5人、2: 6~10人、3: 11~20人、13: 21~50人、14: 51~100人、15: 101~300人、18: 301~500人、16: 501~1,000人、17: 1,001人以上 */ + head_count?: 0 | 1 | 2 | 3 | 13 | 14 | 15 | 18 | 16 | 17 | undefined; + /** 法人番号 (半角数字13桁、法人のみ) */ + corporate_number?: string | undefined; + + fiscal_years_attributes?: { + /** 製造業向け機能(0: 使用しない、1: 使用する) */ + use_industry_template?: number | undefined; + /** 固定資産の控除法(0: 直接控除法、1: 間接控除法) */ + indirect_write_off_method?: number | undefined; + /** 間接控除時の累計額(0: 共通、1: 資産分類別) */ + indirect_write_off_method_type?: number | undefined; + /** 期首日 */ + start_date?: string | undefined; + /** 期末日(決算日�� */ + end_date?: string | undefined; + /** 期 */ + accounting_period?: number | undefined; + /** 減価償却端数処理法(法人のみ)(0: 切り捨て、1: 切り上げ) */ + depreciation_fraction?: number | undefined; + /** 不動産所得使用区分(個人事業主のみ)(0: 使用しない、3: 使用する) */ + return_code?: number | undefined; + /** 消費税端数処理方法(0: 切り上げ、1: 切り捨て, 2: 四捨五入) */ + tax_fraction?: number | undefined; + } | undefined; + + doc_template?: { + /** レイアウト(0: レイアウト1, 1:レイアウト2, 3:封筒1, 4:レイアウト3(繰越金額欄あり), 5: 封筒2(繰越金額欄あり)) */ + invoice_layout?: number | undefined; + /** スタイル(0: クラシック, 1: モダン) */ + invoice_style?: number | undefined; + /** 金額端数処理方法(0: 切り上げ、1: 切り捨て, 2: 四捨五入) */ + amount_fraction?: number | undefined; + } | undefined; + + /** 仕訳番号形式(not_used: 使用しない、digits: 数字(例:5091824)、alnum: 英数字(例:59J0P))Available values : not_used, digits, alnum */ + txn_number_format?: 'not_used' | 'digits' | 'alnum' | undefined; + /** プライベート資金/役員資金(0: 使用しない、1: 使用する) */ + private_settlement?: number | undefined; +} + +export type ItemParams = { + /** 事業所ID */ + company_id: number; + /** 品目名 (30文字以内) */ + name: string; + /** ショートカット1 (20文字以内) */ + shortcut1?: string | undefined; + /** ショートカット2 (20文字以内) */ + shortcut2?: string | undefined; +} + +export type WalletableCreateParams = { + /** 口座名 (255文字以内) */ + name: string; + /** 口座種別(bank_account : 銀行口座, credit_card : クレジットカード, wallet : その他の決済口座) */ + type: 'bank_account' | 'credit_card' | 'wallet'; + /** 事業所ID */ + company_id: number; + /** サービスID */ + bank_id?: number | undefined; + /** 決算書表示名(小カテゴリー) 例:売掛金, 受取手形, 未収入金(法人のみ), 買掛金, 支払手形, 未払金, 預り金, 前受金 */ + group_name?: string | undefined; +} + +export type WalletableUpdateParams = { + /** 口座名 (255文字以内) */ + name: string; + /** 事業所ID */ + company_id: number; +} + +export type TransferParams = { + /** 振替先口座ID */ + to_walletable_id: number; + /** 振替先口座区分 (銀行口座: bank_account, クレジットカード: credit_card, 現金: wallet) */ + to_walletable_type: 'bank_account' | 'credit_card' | 'wallet'; + /** 振替元口座ID */ + from_walletable_id: number; + /** 振替元口座区分 (銀行口座: bank_account, クレジットカード: credit_card, 現金: wallet) */ + from_walletable_type: 'bank_account' | 'credit_card' | 'wallet'; + /** 金額 */ + amount: number; + /** 振替日 (yyyy-mm-dd) */ + date: string; + /** 事業所ID */ + company_id: number; + /** 備考 */ + description?: string | undefined; +} + +export type WalletTxnParams = { + /** 入金/出金 (入金: income, 出金: expense) */ + entry_side: 'income' | 'expense'; + /** 取引内容 */ + description?: string | undefined; + /** 取引金額 */ + amount: number; + /** 口座ID */ + walletable_id: number; + /** 口座区分 (銀行口座: bank_account, クレジットカード: credit_card, 現金: wallet) */ + walletable_type: 'bank_account' | 'credit_card' | 'wallet'; + /** 取引日 (yyyy-mm-dd) */ + date: string; + /** 事業所ID */ + company_id: number; + /** 残高 (銀行口座等) */ + balance?: number | undefined; +} + +export type ExpenseApplicationCreateParams = { + /** 事業所ID */ + company_id: number; + /** 申請タイトル (250文字以内) */ + title: string; + /** 申請日 (yyyy-mm-dd) */ + issue_date: string; + /** 備考 (10000文字以内) */ + description?: string | undefined; + /** 会計freeeのWeb画面から申請内容を編集可能(デフォルト: false):falseの場合、Web上からの項目行の追加/削除・金額の編集が出来なくなります。APIでの編集は可能です。 */ + editable_on_web?: boolean | undefined; + /** 部門ID */ + section_id?: number | undefined; + /** メモタグID */ + tag_ids?: number[] | undefined; + expense_application_lines: { + /** 日付 (yyyy-mm-dd) */ + transaction_date?: string | undefined; + /** 内容 (250文字以内) */ + description?: string | undefined; + /** 金額 */ + amount?: number | undefined; + /** 経費科目ID */ + expense_application_line_template_id?: number | undefined; + /** 証憑ID */ + receipt_id?: number | undefined; + }[]; +} + +export type ExpenseApplicationUpdateParams = { + /** 事業所ID */ + company_id: number; + /** 申請タイトル (250文字以内) */ + title: string; + /** 申請日 (yyyy-mm-dd) */ + issue_date: string; + /** 備考 (10000文字以内) */ + description?: string | undefined; + /** 会計freeeのWeb画面から申請内容を編集可能:falseの場合、Web上からの項目行の追加/削除・金額の編集が出来なくなります。APIでの編集は可能です。 */ + editable_on_web?: boolean | undefined; + /** 部門ID */ + section_id?: number | undefined; + /** メモタグID */ + tag_ids?: number[] | undefined; + expense_application_lines: { + /** 経費申請の項目行ID: 既存項目行を更新する場合に指定します。IDを指定しない項目行は、新規行として扱われ追加されます。また、expense_application_linesに含まれない既存の項目行は削除されます。更新後も残したい行は、必ず経費申請の項目行IDを指定してexpense_application_linesに含めてください。 */ + id?: number | undefined; + /** 日付 (yyyy-mm-dd) */ + transaction_date?: string | undefined; + /** 内容 (250文字以内) */ + description?: string | undefined; + /** 金額 */ + amount?: number | undefined; + /** 経費科目ID */ + expense_application_line_template_id?: number | undefined; + /** 証憑ID */ + receipt_id?: number | undefined; + }[]; +} + +export type PartnerCreateParams = { + /** 事業所ID */ + company_id: number; + /** 取引先名 (255文字以内) */ + name: string; + /** 取引先コード */ + code?: string | undefined; + /** ショートカット1 (255文字以内) */ + shortcut1?: string | undefined; + /** ショートカット2 (255文字以内) */ + shortcut2?: string | undefined; + /** 正式名称(255文字以内) */ + long_name?: string | undefined; + /** カナ名称(255文字以内) */ + name_kana?: string | undefined; + /** 敬称(御中、様、(空白)の3つから選択) */ + default_title?: string | undefined; + /** 電話番号 */ + phone?: string | undefined; + /** 担当者 氏名 (255文字以内) */ + contact_name?: string | undefined; + /** 担当者 メールアドレス (255文字以内) */ + email?: string | undefined; + /** 振込元口座ID(一括振込ファイル用):(walletableのtypeが'bank_account'のidのみ指定できます。また、未設定にする場合は、nullを指定してください。) */ + payer_walletable_id?: number | null | undefined; + /** 振込手数料負担(一括振込ファイル用): (振込元(当方): payer, 振込先(先方): payee) */ + transfer_fee_handling_side?: 'payer' | 'payee' | undefined; + + address_attributes?: { + /** 郵便番号(8文字以内) */ + zipcode?: string | undefined; + /** 都道府県コード(0: 北海道、1:青森、2:岩手、3:宮城、4:秋田、5:山形、6:福島、7:茨城、8:栃木、9:群馬、10:埼玉、11:千葉、12:東京、13:神奈川、14:新潟、15:富山、16:石川、17:福井、18:山梨、19:長野、20:岐阜、21:静岡、22:愛知、23:三重、24:滋賀、25:京都、26:大阪、27:兵庫、28:奈良、29:和歌山、30:鳥取、31:島根、32:岡山、33:広島、34:山口、35:徳島、36:香川、37:愛媛、38:高知、39:福岡、40:佐賀、41:長崎、42:熊本、43:大分、44:宮崎、45:鹿児島、46:沖縄 */ + prefecture_code?: number | undefined; + /** 市区町村・番地(255文字以内) */ + street_name1?: string | undefined; + /** 建物名・部屋番号など(255文字以内) */ + street_name2?: string | undefined; + } | undefined; + + partner_doc_setting_attributes?: { + /** 請求書送付方法(email:メール、posting:郵送、email_and_posting:メールと郵送) */ + sending_method?: 'email' | 'posting' | 'email_and_posting' | undefined; + } | undefined; + + partner_bank_account_attributes?: { + /** 銀行名 */ + bank_name?: string | undefined; + /** 銀行名(カナ) */ + bank_name_kana?: string | undefined; + /** 銀行番号 */ + bank_code?: string | undefined; + /** 支店名 */ + branch_name?: string | undefined; + /** 支店名(カナ) */ + branch_kana?: string | undefined; + /** 支店番号 */ + branch_code?: string | undefined; + /** 口座種別(ordinary:普通、checking:当座、earmarked:納税準備預金、savings:貯蓄、other:その他) */ + account_type?: string | undefined; + /** 口座番号 */ + account_number?: string | undefined; + /** 受取人名 */ + long_account_name?: string | undefined; + /** 受取人名(カナ) */ + account_name?: string | undefined; + } | undefined; + + payment_term_attributes?: { + /** 締め日(29, 30, 31日の末日を指定する場合は、32を指定してください。) */ + cutoff_day?: number | undefined; + /** 支払月 */ + additional_months?: number | undefined; + /** 支払日(29, 30, 31日の末日を指定する場合は、32を指定してください。) */ + fixed_day?: number | undefined; + } | undefined; + + invoice_payment_term_attributes?: { + /** 締め日(29, 30, 31日の末日を指定する場合は、32を指定してください。) */ + cutoff_day?: number | undefined; + /** 支払月 */ + additional_months?: number | undefined; + /** 支払日(29, 30, 31日の末日を指定する場合は、32を指定してください。) */ + fixed_day?: number | undefined; + } | undefined; +} + +export type PartnerUpdateParams = { + /** 事業所ID */ + company_id: number; + /** 取引先名 (255文字以内) */ + name: string; + /** ショートカット1 (255文字以内) */ + shortcut1?: string | undefined; + /** ショートカット2 (255文字以内) */ + shortcut2?: string | undefined; + /** 正式名称(255文字以内) */ + long_name?: string | undefined; + /** カナ名称(255文字以内) */ + name_kana?: string | undefined; + /** 敬称(御中、様、(空白)の3つから選択) */ + default_title?: string | undefined; + /** 電話番号 */ + phone?: string | undefined; + /** 担当者 氏名 (255文字以内) */ + contact_name?: string | undefined; + /** 担当者 メールアドレス (255文字以内) */ + email?: string | undefined; + /** 振込元口座ID(一括振込ファイル用):(walletableのtypeが'bank_account'のidのみ指定できます。また、未設定にする場合は、nullを指定してください。) */ + payer_walletable_id?: number | null | undefined; + /** 振込手数料負担(一括振込ファイル用): (振込元(当方): payer, 振込先(先方): payee) */ + transfer_fee_handling_side?: 'payer' | 'payee' | undefined; + + address_attributes?: { + /** 郵便番号(8文字以内) */ + zipcode?: string | undefined; + /** 都道府県コード(0: 北海道、1:青森、2:岩手、3:宮城、4:秋田、5:山形、6:福島、7:茨城、8:栃木、9:群馬、10:埼玉、11:千葉、12:東京、13:神奈川、14:新潟、15:富山、16:石川、17:福井、18:山梨、19:長野、20:岐阜、21:静岡、22:愛知、23:三重、24:滋賀、25:京都、26:大阪、27:兵庫、28:奈良、29:和歌山、30:鳥取、31:島根、32:岡山、33:広島、34:山口、35:徳島、36:香川、37:愛媛、38:高知、39:福岡、40:佐賀、41:長崎、42:熊本、43:大分、44:宮崎、45:鹿児島、46:沖縄 */ + prefecture_code?: number | undefined; + /** 市区町村・番地(255文字以内) */ + street_name1?: string | undefined; + /** 建物名・部屋番号など(255文字以内) */ + street_name2?: string | undefined; + } | undefined; + + partner_doc_setting_attributes?: { + /** 請求書送付方法(email:メール、posting:郵送、email_and_posting:メールと郵送) */ + sending_method?: 'email' | 'posting' | 'email_and_posting' | undefined; + } | undefined; + + partner_bank_account_attributes?: { + /** 銀行名 */ + bank_name?: string | undefined; + /** 銀行名(カナ) */ + bank_name_kana?: string | undefined; + /** 銀行番号 */ + bank_code?: string | undefined; + /** 支店名 */ + branch_name?: string | undefined; + /** 支店名(カナ) */ + branch_kana?: string | undefined; + /** 支店番号 */ + branch_code?: string | undefined; + /** 口座種別(ordinary:普通、checking:当座、earmarked:納税準備預金、savings:貯蓄、other:その他) */ + account_type?: string | undefined; + /** 口座番号 */ + account_number?: string | undefined; + /** 受取人名 */ + long_account_name?: string | undefined; + /** 受取人名(カナ) */ + account_name?: string | undefined; + } | undefined; + + payment_term_attributes?: { + /** 締め日(29, 30, 31日の末日を指定する場合は、32を指定してください。) */ + cutoff_day?: number | undefined; + /** 支払月 */ + additional_months?: number | undefined; + /** 支払日(29, 30, 31日の末日を指定する場合は、32を指定してください。) */ + fixed_day?: number | undefined; + } | undefined; + + invoice_payment_term_attributes?: { + /** 締め日(29, 30, 31日の末日を指定する場合は、32を指定してください。) */ + cutoff_day?: number | undefined; + /** 支払月 */ + additional_months?: number | undefined; + /** 支払日(29, 30, 31日の末日を指定する場合は、32を指定してください。) */ + fixed_day?: number | undefined; + } | undefined; +} + +export type ReceiptCreateParams = { + /** 事業所ID */ + company_id: number; + /** メモ (255文字以内) */ + description?: string | undefined; + /** 取引日 (yyyy-mm-dd) */ + issue_date?: string | undefined; + /** 証憑ファイル */ + receipt: (File | ReadStream); +} + +export type ReceiptUpdateParams = { + /** 事業所ID */ + company_id: number; + /** メモ (255文字以内) */ + description?: string | undefined; + /** 取引日 (yyyy-mm-dd) */ + issue_date: string; +} + +export type AccountItemParams = { + /** 事業所ID */ + company_id: number; + + account_item: { + /** 勘定科目名 (30文字以内) */ + name: string; + /** ショートカット1 (20文字以内) */ + shortcut?: string | undefined; + /** ショートカット2(勘定科目コード)(20文字以内) */ + shortcut_num?: string | undefined; + /** 税区分 */ + tax_name: string; + /** 決算書表示名(小カテゴリー) */ + group_name: string; + /** 勘定科目カテゴリー */ + account_category: string; + /** 収入取引相手勘定科目名 */ + corresponding_income_name: string; + /** 支出取引相手勘定科目名 */ + corresponding_expense_name: string; + /** 減価償却累計額勘定科目 */ + accumulated_dep_account_item_name?: string | undefined; + /** 検索可能:2, 検索不可:3(登録時未指定の場合は2で登録されます。更新時未指定の場合はsearchableは変更されません。) */ + searchable?: number | undefined; + /** 品目 */ + items?: { + id?: number | undefined; + }[] | undefined; + /** 取引先 */ + partners?: { + id?: number | undefined; + }[] | undefined; + }; +} + +export type AccountItemsResponse = { + account_items: { + /** 勘定科目ID */ + id: number; + /** 勘定科目名 (30文字以内) */ + name: string; + /** ショートカット1 (20文字以内) */ + shortcut?: string | null | undefined; + /** ショートカット2(勘定科目コード) (20文字以内) */ + shortcut_num?: string | null | undefined; + /** デフォルト設定がされている税区分ID */ + default_tax_id?: number | undefined; + /** デフォルト設定がされている税区分コード */ + default_tax_code: number; + /** 勘定科目カテゴリー */ + account_category: string; + /** 勘定科目のカテゴリーID */ + account_category_id: number; + categories: string[]; + /** 勘定科目の使用設定(true: 使用する、false: 使用しない) */ + available: boolean; + /** 口座ID */ + walletable_id: number | null; + /** 決算書表示名(小カテゴリー) */ + group_name?: string | null | undefined; + /** 収入取引相手勘定科目名 */ + corresponding_income_name?: string | null | undefined; + /** 収入取引相手勘定科目ID */ + corresponding_income_id?: number | null | undefined; + /** 支出取引相手勘定科目名 */ + corresponding_expense_name?: string | null | undefined; + /** 支出取引相手勘定科目ID */ + corresponding_expense_id?: number | null | undefined; + }[]; +} + +export type AccountItemResponse = { + account_item: { + /** 勘定科目ID */ + id: number; + /** 勘定科目名 (30文字以内) */ + name: string; + /** 事業所ID */ + company_id: number; + /** 税区分コード */ + tax_code: number; + /** 勘定科目カテゴリー */ + account_category: string; + /** 勘定科目のカテゴリーID */ + account_category_id: number; + /** ショートカット1 (20文字以内) */ + shortcut?: string | undefined; + /** ショートカット2(勘定科目コード) (20文字以内) */ + shortcut_num?: string | undefined; + /** 支出取引相手勘定科目種別 */ + corresponding_type_expense: number; + /** 収入取引相手勘定科目種別 */ + corresponding_type_income: number; + /** 検索可能:2, 検索不可:3 */ + searchable: number; + /** 減価償却累計額勘定科目 */ + accumulated_dep_account_item_name?: string | undefined; + items?: { + /** 品目ID */ + id: number; + /** 品目 */ + name: string; + }[] | undefined; + partners?: { + /** 取引先ID */ + id: number; + /** 取引先 */ + name: string; + }[] | undefined; + /** 勘定科目の使用設定(true: 使用する、false: 使用しない) */ + available: boolean; + /** 口座ID */ + walletable_id: number | null; + /** 決算書表示名(小カテゴリー) */ + group_name?: string | null | undefined; + /** 収入取引相手勘定科目名 */ + corresponding_income_name?: string | null | undefined; + /** 収入取引相手勘定科目ID */ + corresponding_income_id?: number | null | undefined; + /** 支出取引相手勘定科目名 */ + corresponding_expense_name?: string | null | undefined; + /** 支出取引相手勘定科目ID */ + corresponding_expense_id?: number | null | undefined; + }; +} + +export type BankResponse = { + bank: { + /** 連携サービスID */ + id: number; + /** 連携サービス名 */ + name?: string | undefined; + /** 連携サービス種別: (銀行口座: bank_account, クレジットカード: credit_card, 現金: wallet) */ + type?: 'bank_account' | 'credit_card' | 'wallet' | undefined; + /** 連携サービス名(カナ) */ + name_kana?: string | null | undefined; + }; +} + +export type JournalsResponse = { + journals: { + /** 受け付けID */ + id: number; + /** 受け付けメッセージ */ + messages?: string | undefined; + /** 事業所ID */ + company_id: number; + /** ダウンロード形式 */ + download_type?: 'csv' | 'generic' | 'pdf' | undefined; + /** 取得開始日 (yyyy-mm-dd) */ + start_date?: string | undefined; + /** 取得終了日 (yyyy-mm-dd) */ + end_date?: string | undefined; + visible_tags?: ('partner' | 'item' | 'tag' | 'section' | 'description' | 'wallet_txn_description' | 'all')[] | undefined; + /** ステータス確認用URL */ + status_url?: string | undefined; + }; +} + +export type JournalStatusResponse = { + journals: { + /** 受け付けID */ + id: number; + /** 事業所ID */ + company_id: number; + /** ダウンロード形式 */ + download_type: 'csv' | 'generic' | 'pdf'; + /** 事業所ID */ + status: 'enqueued' | 'working' | 'uploaded' | 'failed'; + /** 取得開始日 (yyyy-mm-dd) */ + start_date: string; + /** 取得終了日 (yyyy-mm-dd) */ + end_date: string; + visible_tags: ('partner' | 'item' | 'tag' | 'section' | 'description' | 'wallet_txn_description' | 'all')[]; + /** ダウンロードURL */ + download_url?: string | undefined; + }; +} + +export type TrialBsResponse = { + trial_bs: { + /** 事業所ID */ + company_id: number; + /** 集計結果が最新かどうか */ + up_to_date: boolean; + /** 会計年度(条件に指定した時、または条件に月、日条件がない時のみ含まれる) */ + fiscal_year?: number | undefined; + /** 発生月で絞込:開始会計月(mm)(条件に指定した時のみ含まれる) */ + start_month?: number | undefined; + /** 発生月で絞込:終了会計月(mm)(条件に指定した時のみ含まれる) */ + end_month?: number | undefined; + /** 発生日で絞込:開始日(yyyy-mm-dd)(条件に指定した時のみ含まれる) */ + start_date?: string | undefined; + /** 発生日で絞込:終了日(yyyy-mm-dd)(条件に指定した時のみ含まれる) */ + end_date?: string | undefined; + /** 勘定科目の表示(勘定科目: account_item, 決算書表示:group)(条件に指定した時のみ含まれる) */ + account_item_display_type?: 'account_item' | 'group' | undefined; + /** 内訳の表示(取引先: partner, 品目: item, 勘定科目: account_item)(条件に指定した時のみ含まれる) */ + breakdown_display_type?: 'partner' | 'item' | 'account_item' | undefined; + /** 取引先ID(条件に指定した時のみ含まれる) */ + partner_id?: number | undefined; + /** 取引先コード(条件に指定した時のみ含まれる) */ + partner_code?: string | undefined; + /** 品目ID(条件に指定した時のみ含まれる) */ + item_id?: number | undefined; + /** 決算整理仕訳のみ: only, 決算整理仕訳以外: without(条件に指定した時のみ含まれる) */ + adjustment?: 'only' | 'without' | undefined; + /** 作成日時 */ + created_at?: string | undefined; + balances: { + /** 勘定科目ID(勘定科目の時のみ含まれる) */ + account_item_id?: number | undefined; + /** 勘定科目名(勘定科目の時のみ含まれる) */ + account_item_name?: string | undefined; + /** breakdown_display_type:partner, account_item_display_type:account_item指定時のみ含まれる */ + partners?: { + /** 取引先ID */ + id: number; + /** 取引先名 */ + name?: string | undefined; + /** 期首残高 */ + opening_balance?: number | undefined; + /** 借方金額 */ + debit_amount?: number | undefined; + /** 貸方金額 */ + credit_amount?: number | undefined; + /** 期末残高 */ + closing_balance?: number | undefined; + /** 構成比 */ + composition_ratio?: number | undefined; + }[] | undefined; + /** breakdown_display_type:item, account_item_display_type:account_item指定時のみ含まれる */ + items?: { + /** 品目ID */ + id: number; + /** 品目 */ + name?: string | undefined; + /** 期首残高 */ + opening_balance?: number | undefined; + /** 借方金額 */ + debit_amount?: number | undefined; + /** 貸方金額 */ + credit_amount?: number | undefined; + /** 期末残高 */ + closing_balance?: number | undefined; + /** 構成比 */ + composition_ratio?: number | undefined; + }[] | undefined; + /** 勘定科目カテゴリーID(勘定科目カテゴリーの時のみ含まれる) */ + account_category_id?: number | undefined; + /** 勘定科目カテゴリー名(勘定科目カテゴリーの時のみ含まれる) */ + account_category_name?: string | undefined; + /** 合計行(勘定科目カテゴリー名の時のみ含まれる) */ + total_line?: boolean | undefined; + /** 階層レベル */ + hierarchy_level?: number | undefined; + /** 上位科目カテゴリーID(上層が存在する場合含まれる) */ + parent_account_category_id?: number | undefined; + /** 上位勘定科目カテゴリー名(上層が存在する場合含まれる) */ + parent_account_category_name?: string | undefined; + /** 期首残高 */ + opening_balance?: number | undefined; + /** 借方金額 */ + debit_amount?: number | undefined; + /** 貸方金額 */ + credit_amount?: number | undefined; + /** 期末残高 */ + closing_balance?: number | undefined; + /** 構成比 */ + composition_ratio?: number | undefined; + }[]; + }; +} + +export type TrialBsTwoYearsResponse = { + trial_bs_two_years: { + /** 事業所ID */ + company_id: number; + /** 集計結果が最新かどうか */ + up_to_date: boolean; + /** 会計年度(条件に指定した時、または条件に月、日条件がない時のみ含まれる) */ + fiscal_year?: number | undefined; + /** 発生月で絞込:開始会計月(mm)(条件に指定した時のみ含まれる) */ + start_month?: number | undefined; + /** 発生月で絞込:終了会計月(mm)(条件に指定した時のみ含まれる) */ + end_month?: number | undefined; + /** 発生日で絞込:開始日(yyyy-mm-dd)(条件に指定した時のみ含まれる) */ + start_date?: string | undefined; + /** 発生日で絞込:終了日(yyyy-mm-dd)(条件に指定した時のみ含まれる) */ + end_date?: string | undefined; + /** 勘定科目の表示(勘定科目: account_item, 決算書表示:group)(条件に指定した時のみ含まれる) */ + account_item_display_type?: 'account_item' | 'group' | undefined; + /** 内訳の表示(取引先: partner, 品目: item, 勘定科目: account_item)(条件に指定した時のみ含まれる) */ + breakdown_display_type?: 'partner' | 'item' | 'account_item' | undefined; + /** 取引先ID(条件に指定した時のみ含まれる) */ + partner_id?: number | undefined; + /** 取引先コード(条件に指定した時のみ含まれる) */ + partner_code?: string | undefined; + /** 品目ID(条件に指定した時のみ含まれる) */ + item_id?: number | undefined; + /** 決算整理仕訳のみ: only, 決算整理仕訳以外: without(条件に指定した時のみ含まれる) */ + adjustment?: 'only' | 'without' | undefined; + /** 作成日時 */ + created_at?: string | undefined; + balances: { + /** 勘定科目ID(勘定科目の時のみ含まれる) */ + account_item_id?: number | undefined; + /** 勘定科目名(勘定科目の時のみ含まれる) */ + account_item_name?: string | undefined; + /** breakdown_display_type:partner, account_item_display_type:account_item指定時のみ含まれる */ + partners?: { + /** 取引先ID */ + id: number; + /** 取引先名 */ + name?: string | undefined; + /** 前年度期末残高 */ + last_year_closing_balance?: number | undefined; + /** 期末残高 */ + closing_balance?: number | undefined; + /** 前年比 */ + year_on_year?: number | undefined; + }[] | undefined; + /** breakdown_display_type:item, account_item_display_type:account_item指定時のみ含まれる */ + items?: { + /** 品目ID */ + id: number; + /** 品目 */ + name?: string | undefined; + /** 前年度期末残高 */ + last_year_closing_balance?: number | undefined; + /** 期末残高 */ + closing_balance?: number | undefined; + /** 前年比 */ + year_on_year?: number | undefined; + }[] | undefined; + /** 勘定科目カテゴリーID(勘定科目カテゴリーの時のみ含まれる) */ + account_category_id?: number | undefined; + /** 勘定科目カテゴリー名(勘定科目カテゴリーの時のみ含まれる) */ + account_category_name?: string | undefined; + /** 合計行(勘定科目カテゴリー名の時のみ含まれる) */ + total_line?: boolean | undefined; + /** 階層レベル */ + hierarchy_level?: number | undefined; + /** 上位科目カテゴリーID(上層が存在する場合含まれる) */ + parent_account_category_id?: number | undefined; + /** 上位勘定科目カテゴリー名(上層が存在する場合含まれる) */ + parent_account_category_name?: string | undefined; + /** 前年度期末残高 */ + last_year_closing_balance?: number | undefined; + /** 期末残高 */ + closing_balance?: number | undefined; + /** 前年比 */ + year_on_year?: number | undefined; + }[]; + }; +} + +export type TrialBsThreeYearsResponse = { + trial_bs_three_years: { + /** 事業所ID */ + company_id: number; + /** 集計結果が最新かどうか */ + up_to_date: boolean; + /** 会計年度(条件に指定した時、または条件に月、日条件がない時のみ含まれる) */ + fiscal_year?: number | undefined; + /** 発生月で絞込:開始会計月(mm)(条件に指定した時のみ含まれる) */ + start_month?: number | undefined; + /** 発生月で絞込:終了会計月(mm)(条件に指定した時のみ含まれる) */ + end_month?: number | undefined; + /** 発生日で絞込:開始日(yyyy-mm-dd)(条件に指定した時のみ含まれる) */ + start_date?: string | undefined; + /** 発生日で絞込:終了日(yyyy-mm-dd)(条件に指定した時のみ含まれる) */ + end_date?: string | undefined; + /** 勘定科目の表示(勘定科目: account_item, 決算書表示:group)(条件に指定した時のみ含まれる) */ + account_item_display_type?: 'account_item' | 'group' | undefined; + /** 内訳の表示(取引先: partner, 品目: item, 勘定科目: account_item)(条件に指定した時のみ含まれる) */ + breakdown_display_type?: 'partner' | 'item' | 'account_item' | undefined; + /** 取引先ID(条件に指定した時のみ含まれる) */ + partner_id?: number | undefined; + /** 取引先コード(条件に指定した時のみ含まれる) */ + partner_code?: string | undefined; + /** 品目ID(条件に指定した時のみ含まれる) */ + item_id?: number | undefined; + /** 決算整理仕訳のみ: only, 決算整理仕訳以外: without(条件に指定した時のみ含まれる) */ + adjustment?: 'only' | 'without' | undefined; + /** 作成日時 */ + created_at?: string | undefined; + balances: { + /** 勘定科目ID(勘定科目の時のみ含まれる) */ + account_item_id?: number | undefined; + /** 勘定科目名(勘定科目の時のみ含まれる) */ + account_item_name?: string | undefined; + /** breakdown_display_type:partner, account_item_display_type:account_item指定時のみ含まれる */ + partners?: { + /** 取引先ID */ + id: number; + /** 取引先名 */ + name?: string | undefined; + /** 前々年度期末残高 */ + two_years_before_closing_balance?: number | undefined; + /** 前年度期末残高 */ + last_year_closing_balance?: number | undefined; + /** 期末残高 */ + closing_balance?: number | undefined; + /** 前年比 */ + year_on_year?: number | undefined; + }[] | undefined; + /** breakdown_display_type:item, account_item_display_type:account_item指定時のみ含まれる */ + items?: { + /** 品目ID */ + id: number; + /** 品目 */ + name?: string | undefined; + /** 前々年度期末残高 */ + two_years_before_closing_balance?: number | undefined; + /** 前年度期末残高 */ + last_year_closing_balance?: number | undefined; + /** 期末残高 */ + closing_balance?: number | undefined; + /** 前年比 */ + year_on_year?: number | undefined; + }[] | undefined; + /** 勘定科目カテゴリーID(勘定科目カテゴリーの時のみ含まれる) */ + account_category_id?: number | undefined; + /** 勘定科目カテゴリー名(勘定科目カテゴリーの時のみ含まれる) */ + account_category_name?: string | undefined; + /** 合計行(勘定科目カテゴリー名の時のみ含まれる) */ + total_line?: boolean | undefined; + /** 階層レベル */ + hierarchy_level?: number | undefined; + /** 上位科目カテゴリーID(上層が存在する場合含まれる) */ + parent_account_category_id?: number | undefined; + /** 上位勘定科目カテゴリー名(上層が存在する場合含まれる) */ + parent_account_category_name?: string | undefined; + /** 前々年度期末残高 */ + two_years_before_closing_balance?: number | undefined; + /** 前年度期末残高 */ + last_year_closing_balance?: number | undefined; + /** 期末残高 */ + closing_balance?: number | undefined; + /** 前年比 */ + year_on_year?: number | undefined; + }[]; + }; +} + +export type TrialPlResponse = { + trial_pl: { + /** 事業所ID */ + company_id: number; + /** 集計結果が最新かどうか */ + up_to_date: boolean; + /** 会計年度(条件に指定した時、または条件に月、日条件がない時のみ含まれる) */ + fiscal_year?: number | undefined; + /** 発生月で絞込:開始会計月(mm)(条件に指定した時のみ含まれる) */ + start_month?: number | undefined; + /** 発生月で絞込:終了会計月(mm)(条件に指定した時のみ含まれる) */ + end_month?: number | undefined; + /** 発生日で絞込:開始日(yyyy-mm-dd)(条件に指定した時のみ含まれる) */ + start_date?: string | undefined; + /** 発生日で絞込:終了日(yyyy-mm-dd)(条件に指定した時のみ含まれる) */ + end_date?: string | undefined; + /** 勘定科目の表示(勘定科目: account_item, 決算書表示:group)(条件に指定した時のみ含まれる) */ + account_item_display_type?: 'account_item' | 'group' | undefined; + /** 内訳の表示(取引先: partner, 品目: item, 部門: section, 勘定科目: account_item)(条件に指定した時のみ含まれる) */ + breakdown_display_type?: 'partner' | 'item' | 'section' | 'account_item' | undefined; + /** 取引先ID(条件に指定した時のみ含まれる) */ + partner_id?: number | undefined; + /** 取引先コード(条件に指定した時のみ含まれる) */ + partner_code?: string | undefined; + /** 品目ID(条件に指定した時のみ含まれる) */ + item_id?: number | undefined; + /** 部門ID(条件に指定した時のみ含まれる) */ + section_id?: number | undefined; + /** 決算整理仕訳のみ: only, 決算整理仕訳以外: without(条件に指定した時のみ含まれる) */ + adjustment?: 'only' | 'without' | undefined; + /** 配賦仕訳のみ:only,配賦仕訳以外:without(条件に指定した時のみ含まれる) */ + cost_allocation?: 'only' | 'without' | undefined; + /** 作成日時 */ + created_at?: string | undefined; + balances: { + /** 勘定科目ID(勘定科目の時のみ含まれる) */ + account_item_id?: number | undefined; + /** 勘定科目名(勘定科目の時のみ含まれる) */ + account_item_name?: string | undefined; + /** breakdown_display_type:partner, account_item_display_type:account_item指定時のみ含まれる */ + partners?: { + /** 取引先ID */ + id: number; + /** 取引先名 */ + name?: string | undefined; + /** 期首残高 */ + opening_balance?: number | undefined; + /** 借方金額 */ + debit_amount?: number | undefined; + /** 貸方金額 */ + credit_amount?: number | undefined; + /** 期末残高 */ + closing_balance?: number | undefined; + /** 構成比 */ + composition_ratio?: number | undefined; + }[] | undefined; + /** breakdown_display_type:item, account_item_display_type:account_item指定時のみ含まれる */ + items?: { + /** 品目ID */ + id: number; + /** 品目 */ + name?: string | undefined; + /** 期首残高 */ + opening_balance?: number | undefined; + /** 借方金額 */ + debit_amount?: number | undefined; + /** 貸方金額 */ + credit_amount?: number | undefined; + /** 期末残高 */ + closing_balance?: number | undefined; + /** 構成比 */ + composition_ratio?: number | undefined; + }[] | undefined; + /** breakdown_display_type:section, account_item_display_type:account_item指定時のみ含まれる */ + sections?: { + /** 部門ID */ + id: number; + /** 部門名 */ + name?: string | undefined; + /** 期首残高 */ + opening_balance?: number | undefined; + /** 借方金額 */ + debit_amount?: number | undefined; + /** 貸方金額 */ + credit_amount?: number | undefined; + /** 期末残高 */ + closing_balance?: number | undefined; + /** 構成比 */ + composition_ratio?: number | undefined; + }[] | undefined; + /** 勘定科目カテゴリーID(勘定科目カテゴリーの時のみ含まれる) */ + account_category_id?: number | undefined; + /** 勘定科目カテゴリー名(勘定科目カテゴリーの時のみ含まれる) */ + account_category_name?: string | undefined; + /** 合計行(勘定科目カテゴリー名の時のみ含まれる) */ + total_line?: boolean | undefined; + /** 階層レベル */ + hierarchy_level?: number | undefined; + /** 上位科目カテゴリーID(上層が存在する場合含まれる) */ + parent_account_category_id?: number | undefined; + /** 上位勘定科目カテゴリー名(上層が存在する場合含まれる) */ + parent_account_category_name?: string | undefined; + /** 期首残高 */ + opening_balance?: number | undefined; + /** 借方金額 */ + debit_amount?: number | undefined; + /** 貸方金額 */ + credit_amount?: number | undefined; + /** 期末残高 */ + closing_balance?: number | undefined; + /** 構成比 */ + composition_ratio?: number | undefined; + }[]; + }; +} + +export type TrialPlTwoYearsResponse = { + trial_pl_two_years: { + /** 事業所ID */ + company_id: number; + /** 集計結果が最新かどうか */ + up_to_date: boolean; + /** 会計年度(条件に指定した時、または条件に月、日条件がない時のみ含まれる) */ + fiscal_year?: number | undefined; + /** 発生月で絞込:開始会計月(mm)(条件に指定した時のみ含まれる) */ + start_month?: number | undefined; + /** 発生月で絞込:終了会計月(mm)(条件に指定した時のみ含まれる) */ + end_month?: number | undefined; + /** 発生日で絞込:開始日(yyyy-mm-dd)(条件に指定した時のみ含まれる) */ + start_date?: string | undefined; + /** 発生日で絞込:終了日(yyyy-mm-dd)(条件に指定した時のみ含まれる) */ + end_date?: string | undefined; + /** 勘定科目の表示(勘定科目: account_item, 決算書表示:group)(条件に指定した時のみ含まれる) */ + account_item_display_type?: 'account_item' | 'group' | undefined; + /** 内訳の表示(取引先: partner, 品目: item, 部門: section, 勘定科目: account_item)(条件に指定した時のみ含まれる) */ + breakdown_display_type?: 'partner' | 'item' | 'section' | 'account_item' | undefined; + /** 取引先ID(条件に指定した時のみ含まれる) */ + partner_id?: number | undefined; + /** 取引先コード(条件に指定した時のみ含まれる) */ + partner_code?: string | undefined; + /** 品目ID(条件に指定した時のみ含まれる) */ + item_id?: number | undefined; + /** 部門ID(条件に指定した時のみ含まれる) */ + section_id?: number | undefined; + /** 決算整理仕訳のみ: only, 決算整理仕訳以外: without(条件に指定した時のみ含まれる) */ + adjustment?: 'only' | 'without' | undefined; + /** 配賦仕訳のみ:only,配賦仕訳以外:without(条件に指定した時のみ含まれる) */ + cost_allocation?: 'only' | 'without' | undefined; + /** 作成日時 */ + created_at?: string | undefined; + balances: { + /** 勘定科目ID(勘定科目の時のみ含まれる) */ + account_item_id?: number | undefined; + /** 勘定科目名(勘定科目の時のみ含まれる) */ + account_item_name?: string | undefined; + /** breakdown_display_type:partner, account_item_display_type:account_item指定時のみ含まれる */ + partners?: { + /** 取引先ID */ + id: number; + /** 取引先名 */ + name?: string | undefined; + /** 前年度期末残高 */ + last_year_closing_balance?: number | undefined; + /** 期末残高 */ + closing_balance?: number | undefined; + /** 前年比 */ + year_on_year?: number | undefined; + }[] | undefined; + /** breakdown_display_type:item, account_item_display_type:account_item指定時のみ含まれる */ + items?: { + /** 品目ID */ + id: number; + /** 品目 */ + name?: string | undefined; + /** 前年度期末残高 */ + last_year_closing_balance?: number | undefined; + /** 期末残高 */ + closing_balance?: number | undefined; + /** 前年比 */ + year_on_year?: number | undefined; + }[] | undefined; + /** breakdown_display_type:section, account_item_display_type:account_item指定時のみ含まれる */ + sections?: { + /** 部門ID */ + id: number; + /** 部門名 */ + name?: string | undefined; + /** 前年度期末残高 */ + last_year_closing_balance?: number | undefined; + /** 期末残高 */ + closing_balance?: number | undefined; + /** 前年比 */ + year_on_year?: number | undefined; + }[] | undefined; + /** 勘定科目カテゴリーID(勘定科目カテゴリーの時のみ含まれる) */ + account_category_id?: number | undefined; + /** 勘定科目カテゴリー名(勘定科目カテゴリーの時のみ含まれる) */ + account_category_name?: string | undefined; + /** 合計行(勘定科目カテゴリー名の時のみ含まれる) */ + total_line?: boolean | undefined; + /** 階層レベル */ + hierarchy_level?: number | undefined; + /** 上位科目カテゴリーID(上層が存在する場合含まれる) */ + parent_account_category_id?: number | undefined; + /** 上位勘定科目カテゴリー名(上層が存在する場合含まれる) */ + parent_account_category_name?: string | undefined; + /** 前年度期末残高 */ + last_year_closing_balance?: number | undefined; + /** 期末残高 */ + closing_balance?: number | undefined; + /** 前年比 */ + year_on_year?: number | undefined; + }[]; + }; +} + +export type TrialPlThreeYearsResponse = { + trial_pl_three_years: { + /** 事業所ID */ + company_id: number; + /** 集計結果が最新かどうか */ + up_to_date: boolean; + /** 会計年度(条件に指定した時、または条件に月、日条件がない時のみ含まれる) */ + fiscal_year?: number | undefined; + /** 発生月で絞込:開始会計月(mm)(条件に指定した時のみ含まれる) */ + start_month?: number | undefined; + /** 発生月で絞込:終了会計月(mm)(条件に指定した時のみ含まれる) */ + end_month?: number | undefined; + /** 発生日で絞込:開始日(yyyy-mm-dd)(条件に指定した時のみ含まれる) */ + start_date?: string | undefined; + /** 発生日で絞込:終了日(yyyy-mm-dd)(条件に指定した時のみ含まれる) */ + end_date?: string | undefined; + /** 勘定科目の表示(勘定科目: account_item, 決算書表示:group)(条件に指定した時のみ含まれる) */ + account_item_display_type?: 'account_item' | 'group' | undefined; + /** 内訳の表示(取引先: partner, 品目: item, 部門: section, 勘定科目: account_item)(条件に指定した時のみ含まれる) */ + breakdown_display_type?: 'partner' | 'item' | 'section' | 'account_item' | undefined; + /** 取引先ID(条件に指定した時のみ含まれる) */ + partner_id?: number | undefined; + /** 取引先コード(条件に指定した時のみ含まれる) */ + partner_code?: string | undefined; + /** 品目ID(条件に指定した時のみ含まれる) */ + item_id?: number | undefined; + /** 部門ID(条件に指定した時のみ含まれる) */ + section_id?: number | undefined; + /** 決算整理仕訳のみ: only, 決算整理仕訳以外: without(条件に指定した時のみ含まれる) */ + adjustment?: 'only' | 'without' | undefined; + /** 配賦仕訳のみ:only,配賦仕訳以外:without(条件に指定した時のみ含まれる) */ + cost_allocation?: 'only' | 'without' | undefined; + /** 作成日時 */ + created_at?: string | undefined; + balances: { + /** 勘定科目ID(勘定科目の時のみ含まれる) */ + account_item_id?: number | undefined; + /** 勘定科目名(勘定科目の時のみ含まれる) */ + account_item_name?: string | undefined; + /** breakdown_display_type:partner, account_item_display_type:account_item指定時のみ含まれる */ + partners?: { + /** 取引先ID */ + id: number; + /** 取引先名 */ + name?: string | undefined; + /** 前々年度期末残高 */ + two_years_before_closing_balance?: number | undefined; + /** 前年度期末残高 */ + last_year_closing_balance?: number | undefined; + /** 期末残高 */ + closing_balance?: number | undefined; + /** 前年比 */ + year_on_year?: number | undefined; + }[] | undefined; + /** breakdown_display_type:item, account_item_display_type:account_item指定時のみ含まれる */ + items?: { + /** 品目ID */ + id: number; + /** 品目 */ + name?: string | undefined; + /** 前々年度期末残高 */ + two_years_before_closing_balance?: number | undefined; + /** 前年度期末残高 */ + last_year_closing_balance?: number | undefined; + /** 期末残高 */ + closing_balance?: number | undefined; + /** 前年比 */ + year_on_year?: number | undefined; + }[] | undefined; + /** breakdown_display_type:section, account_item_display_type:account_item指定時のみ含まれる */ + sections?: { + /** 部門ID */ + id: number; + /** 部門名 */ + name?: string | undefined; + /** 前々年度期末残高 */ + two_years_before_closing_balance?: number | undefined; + /** 前年度期末残高 */ + last_year_closing_balance?: number | undefined; + /** 期末残高 */ + closing_balance?: number | undefined; + /** 前年比 */ + year_on_year?: number | undefined; + }[] | undefined; + /** 勘定科目カテゴリーID(勘定科目カテゴリーの時のみ含まれる) */ + account_category_id?: number | undefined; + /** 勘定科目カテゴリー名(勘定科目カテゴリーの時のみ含まれる) */ + account_category_name?: string | undefined; + /** 合計行(勘定科目カテゴリー名の時のみ含まれる) */ + total_line?: boolean | undefined; + /** 階層レベル */ + hierarchy_level?: number | undefined; + /** 上位科目カテゴリーID(上層が存在する場合含まれる) */ + parent_account_category_id?: number | undefined; + /** 上位勘定科目カテゴリー名(上層が存在する場合含まれる) */ + parent_account_category_name?: string | undefined; + /** 前々年度期末残高 */ + two_years_before_closing_balance?: number | undefined; + /** 前年度期末残高 */ + last_year_closing_balance?: number | undefined; + /** 期末残高 */ + closing_balance?: number | undefined; + /** 前年比 */ + year_on_year?: number | undefined; + }[]; + }; +} + +export type TrialPlSectionsResponse = { + trial_pl_sections: { + /** 事業所ID */ + company_id: number; + /** 集計結果が最新かどうか */ + up_to_date: boolean; + /** 出力する部門の指定 */ + section_ids: string; + /** 会計年度(条件に指定した時、または条件に月、日条件がない時のみ含まれる) */ + fiscal_year?: number | undefined; + /** 発生月で絞込:開始会計月(mm)(条件に指定した時のみ含まれる) */ + start_month?: number | undefined; + /** 発生月で絞込:終了会計月(mm)(条件に指定した時のみ含まれる) */ + end_month?: number | undefined; + /** 発生日で絞込:開始日(yyyy-mm-dd)(条件に指定した時のみ含まれる) */ + start_date?: string | undefined; + /** 発生日で絞込:終了日(yyyy-mm-dd)(条件に指定した時のみ含まれる) */ + end_date?: string | undefined; + /** 勘定科目の表示(勘定科目: account_item, 決算書表示:group)(条件に指定した時のみ含まれる) */ + account_item_display_type?: 'account_item' | 'group' | undefined; + /** 内訳の表示(取引先: partner, 品目: item, 勘定科目: account_item)(条件に指定した時のみ含まれる) */ + breakdown_display_type?: 'partner' | 'item' | 'account_item' | undefined; + /** 取引先ID(条件に指定した時のみ含まれる) */ + partner_id?: number | undefined; + /** 取引先コード(条件に指定した時のみ含まれる) */ + partner_code?: string | undefined; + /** 品目ID(条件に指定した時のみ含まれる) */ + item_id?: number | undefined; + /** 決算整理仕訳のみ: only, 決算整理仕訳以外: without(条件に指定した時のみ含まれる) */ + adjustment?: 'only' | 'without' | undefined; + /** 配賦仕訳のみ:only,配賦仕訳以外:without(条件に指定した時のみ含まれる) */ + cost_allocation?: 'only' | 'without' | undefined; + /** 作成日時 */ + created_at?: string | undefined; + balances: { + /** 勘定科目ID(勘定科目の時のみ含まれる) */ + account_item_id?: number | undefined; + /** 勘定科目名(勘定科目の時のみ含まれる) */ + account_item_name?: string | undefined; + /** 部門(勘定科目の時のみ含まれる) */ + sections?: { + /** 部門ID */ + id: number; + /** 部門名 */ + name?: string | undefined; + /** 期末残高 */ + closing_balance?: number | undefined; + /** breakdown_display_type:partner, account_item_display_type:account_item指定時のみ含まれる */ + partners?: { + /** 取引先ID */ + id: number; + /** 取引先名 */ + name?: string | undefined; + /** 期末残高 */ + closing_balance?: number | undefined; + }[] | undefined; + /** breakdown_display_type:item, account_item_display_type:account_item指定時のみ含まれる */ + items?: { + /** 品目ID */ + id: number; + /** 品目 */ + name?: string | undefined; + /** 期末残高 */ + closing_balance?: number | undefined; + }[] | undefined; + }[] | undefined; + /** 勘定科目カテゴリーID(勘定科目カテゴリーの時のみ含まれる) */ + account_category_id?: number | undefined; + /** 勘定科目カテゴリー名(勘定科目カテゴリーの時のみ含まれる) */ + account_category_name?: string | undefined; + /** 合計行(勘定科目カテゴリー名の時のみ含まれる) */ + total_line?: boolean | undefined; + /** 階層レベル */ + hierarchy_level?: number | undefined; + /** 上位科目カテゴリーID(上層が存在する場合含まれる) */ + parent_account_category_id?: number | undefined; + /** 上位勘定科目カテゴリー名(上層が存在する場合含まれる) */ + parent_account_category_name?: string | undefined; + /** 期末残高 */ + closing_balance?: number | undefined; + }[]; + }; +} + +export type SectionParams = { + /** 事業所ID */ + company_id: number; + /** 部門名 (30文字以内) */ + name: string; + /** 正式名称 (255文字以内) */ + long_name?: string | undefined; + /** ショートカット1 (20文字以内) */ + shortcut1?: string | undefined; + /** ショートカット2 (20文字以内) */ + shortcut2?: string | undefined; + /** 親部門ID (ビジネスプラン以上) */ + parent_id?: number | undefined; +} + +export type SectionResponse = { + section: { + /** 部門ID */ + id: number; + /** 部門名 (30文字以内) */ + name: string; + /** 正式名称(255文字以内) */ + long_name?: string | null | undefined; + /** 事業所ID */ + company_id: number; + /** ショートカット1 (20文字以内) */ + shortcut1?: string | null | undefined; + /** ショートカット2 (20文字以内) */ + shortcut2?: string | null | undefined; + }; +} + +export type DealCreateResponse = { + deal: { + /** 取引ID */ + id: number; + /** 事業所ID */ + company_id: number; + /** 発生日 (yyyy-mm-dd) */ + issue_date: string; + /** 支払期日 (yyyy-mm-dd) */ + due_date?: string | undefined; + /** 金額 */ + amount: number; + /** 支払金額 */ + due_amount?: number | undefined; + /** 収支区分 (収入: income, 支出: expense) */ + type?: 'income' | 'expense' | undefined; + /** 取引先ID */ + partner_id: number; + /** 取引先コード */ + partner_code?: string | null | undefined; + /** 管理番号 */ + ref_number?: string | undefined; + /** 決済状況 (未決済: unsettled, 完了: settled) */ + status: 'unsettled' | 'settled'; + /** 取引の明細行 */ + details?: { + /** 取引行ID */ + id: number; + /** 勘定科目ID */ + account_item_id: number; + /** 税区分ID(廃止予定) */ + tax_id?: number | undefined; + /** 税区分コード */ + tax_code: number; + /** 品目ID */ + item_id?: number | null | undefined; + /** 部門ID */ + section_id?: number | null | undefined; + /** メモタグID */ + tag_ids?: number[] | undefined; + /** セグメント1ID */ + segment_1_tag_id?: number | null | undefined; + /** セグメント2ID */ + segment_2_tag_id?: number | null | undefined; + /** セグメント3ID */ + segment_3_tag_id?: number | null | undefined; + /** 取引金額 */ + amount: number; + /** 消費税額 */ + vat: number; + /** 備考 */ + description?: string | undefined; + /** 貸借(貸方: credit, 借方: debit) */ + entry_side: 'credit' | 'debit'; + }[] | undefined; + /** 取引の支払行 */ + payments?: { + /** 取引行ID */ + id: number; + /** 支払日 */ + date: string; + /** 口座区分 (銀行口座: bank_account, クレジットカード: credit_card, 現金: wallet, プライベート資金(法人の場合は役員借入金もしくは役員借入金、個人の場合は事業主貸もしくは事業主借): private_account_item) */ + from_walletable_type?: 'bank_account' | 'credit_card' | 'wallet' | 'private_account_item' | undefined; + /** 口座ID(from_walletable_typeがprivate_account_itemの場合は勘定科目ID) */ + from_walletable_id?: number | undefined; + /** 支払金額 */ + amount: number; + }[] | undefined; + }; +} + +export type DealResponse = { + deal: { + /** 取引ID */ + id: number; + /** 事業所ID */ + company_id: number; + /** 発生日 (yyyy-mm-dd) */ + issue_date: string; + /** 支払期日 (yyyy-mm-dd) */ + due_date?: string | undefined; + /** 金額 */ + amount: number; + /** 支払金額 */ + due_amount?: number | undefined; + /** 収支区分 (収入: income, 支出: expense) */ + type?: 'income' | 'expense' | undefined; + /** 取引先ID */ + partner_id: number; + /** 取引先コード */ + partner_code?: string | null | undefined; + /** 管理番号 */ + ref_number?: string | undefined; + /** 決済状況 (未決済: unsettled, 完了: settled) */ + status: 'unsettled' | 'settled'; + /** 取引の明細行 */ + details?: { + /** 取引行ID */ + id: number; + /** 勘定科目ID */ + account_item_id: number; + /** 税区分ID(廃止予定) */ + tax_id?: number | undefined; + /** 税区分コード */ + tax_code: number; + /** 品目ID */ + item_id?: number | null | undefined; + /** 部門ID */ + section_id?: number | null | undefined; + /** メモタグID */ + tag_ids?: number[] | undefined; + /** セグメント1ID */ + segment_1_tag_id?: number | null | undefined; + /** セグメント2ID */ + segment_2_tag_id?: number | null | undefined; + /** セグメント3ID */ + segment_3_tag_id?: number | null | undefined; + /** 取引金額 */ + amount: number; + /** 消費税額 */ + vat: number; + /** 備考 */ + description?: string | undefined; + /** 貸借(貸方: credit, 借方: debit) */ + entry_side: 'credit' | 'debit'; + }[] | undefined; + /** 取引の+更新行 */ + renews?: { + /** +更新行ID */ + id: number; + /** 更新日 (yyyy-mm-dd) */ + update_date: string; + /** +更新の対象行ID */ + renew_target_id: number; + /** +更���の対象行タイプ */ + renew_target_type: 'detail' | 'accrual' | 'renew'; + /** +更新の明細行一覧(配列) */ + details: { + /** +更新の明細行ID */ + id: number; + /** 貸借(貸方: credit, 借方: debit) */ + entry_side: 'credit' | 'debit'; + /** 勘定科目ID */ + account_item_id: number; + /** 税区分コード */ + tax_code: number; + /** 品目ID */ + item_id?: number | null | undefined; + /** 部門ID */ + section_id?: number | null | undefined; + tag_ids: number[]; + /** セグメント1ID */ + segment_1_tag_id?: number | null | undefined; + /** セグメント2ID */ + segment_2_tag_id?: number | null | undefined; + /** セグメント3ID */ + segment_3_tag_id?: number | null | undefined; + /** 金額(税込で指定してください) */ + amount: number; + /** 消費税額(指定しない場合は自動で計算されます) */ + vat: number; + /** 備考 */ + description?: string | null | undefined; + }[]; + }[] | undefined; + /** 取引の支払行 */ + payments?: { + /** 取引行ID */ + id: number; + /** 支払日 */ + date: string; + /** 口座区分 (銀行口座: bank_account, クレジットカード: credit_card, 現金: wallet, プライベート資金(法人の場合は役員借入金もしくは役員借入金、個人の場合は事業主貸もしくは事業主借): private_account_item) */ + from_walletable_type?: 'bank_account' | 'credit_card' | 'wallet' | 'private_account_item' | undefined; + /** 口座ID(from_walletable_typeがprivate_account_itemの場合は勘定科目ID) */ + from_walletable_id?: number | undefined; + /** 支払金額 */ + amount: number; + }[] | undefined; + /** 証憑ファイル */ + receipts?: { + /** 証憑ID */ + id: number; + /** ステータス(unconfirmed:確認待ち、confirmed:確認済み、deleted:削除済み、ignored:無視) */ + status: 'unconfirmed' | 'confirmed' | 'deleted' | 'ignored'; + /** メモ */ + description?: string | undefined; + /** MIMEタイプ */ + mime_type: string; + /** 発生日 */ + issue_date?: string | undefined; + /** アップロード元種別 */ + origin: 'unknown' | 'web' | 'mobile_camera' | 'mobile_album' | 'scansnap' | 'scannable' | 'dropbox' | 'mail' | 'safety_contact_file' | 'public_api'; + /** 作成日時(ISO8601形式) */ + created_at: string; + /** ファイルのダウンロードURL(freeeにログインした状態でのみ閲覧可能です。) */ + file_src: string; + + user: { + /** ユーザID */ + id: number; + /** メールアドレス */ + email: string; + /** 表示名 */ + display_name?: string | null | undefined; + }; + }[] | undefined; + }; +} + +export type SelectablesIndexResponse = { + account_categories?: { + /** 収支 */ + balance: 'expense' | 'income'; + /** 事業形態(個人事業主: personal、法人: corporate) */ + org_code: 'personal' | 'corporate'; + /** カテゴリーコード */ + role: string; + /** カテゴリー名 */ + title: string; + /** カテゴリーの説明 */ + desc?: string | undefined; + /** 勘定科目の一覧 */ + account_items: { + /** 勘定科目ID */ + id: number; + /** 勘定科目 */ + name?: string | undefined; + /** 勘定科目の説明 */ + desc?: string | undefined; + /** 勘定科目の説明(詳細) */ + help?: string | undefined; + /** ショートカット */ + shortcut?: string | undefined; + + default_tax?: { + tax_rate_5?: { + /** 税区分ID */ + id?: number | undefined; + /** 税区分 */ + name?: string | undefined; + } | undefined; + + tax_rate_8?: { + /** 税区分ID */ + id?: number | undefined; + /** 税区分 */ + name?: string | undefined; + } | undefined; + } | undefined; + }[]; + }[] | undefined; + /** 決算書表示名(小カテゴリー) */ + account_groups?: { + /** 決算書表示名(小カテゴリー)ID */ + id: number; + /** 決算書表示名 */ + name: string; + /** 年度ID */ + account_structure_id: number; + /** 勘定科目カテゴリーID */ + account_category_id: number; + /** 詳細パラメータの種類 */ + detail_type?: number | undefined; + /** 並び順 */ + index: number; + /** 作成日時 */ + created_at?: string | undefined; + /** 更新日時 */ + updated_at?: string | undefined; + }[] | undefined; +} + +export type ItemResponse = { + item: { + /** 品目ID */ + id: number; + /** 事業所ID */ + company_id: number; + /** 品目名 (30文字以内) */ + name: string; + /** ショートカット1 (20文字以内) */ + shortcut1?: string | null | undefined; + /** ショートカット2 (20文字以内) */ + shortcut2?: string | null | undefined; + }; +} + +export type ManualJournalResponse = { + manual_journal: { + /** 振替伝票ID */ + id: number; + /** 事業所ID */ + company_id: number; + /** 発生日 (yyyy-mm-dd) */ + issue_date: string; + /** 決算整理仕訳フラグ(falseまたは未指定の場合: 日常仕訳) */ + adjustment: boolean; + /** 仕訳番号 */ + txn_number: string | null; + /** 貸借行一覧(配列): 貸借合わせて100行まで登録できます。 */ + details: { + /** 貸借行ID */ + id: number; + /** 貸借(貸方: credit, 借方: debit) */ + entry_side: 'credit' | 'debit'; + /** 勘定科目ID */ + account_item_id: number; + /** 税区分ID */ + tax_code: number; + /** 取引先ID */ + partner_id: number | null; + /** 取引先名 */ + partner_name: string | null; + /** 取引先コード */ + partner_code?: string | null | undefined; + /** 正式名称(255文字以内) */ + partner_long_name: string | null; + /** 品目ID */ + item_id: number | null; + /** 品目 */ + item_name: string | null; + /** 部門ID */ + section_id: number | null; + /** 部門 */ + section_name: string | null; + tag_ids: number[]; + tag_names: string[]; + /** セグメント1ID */ + segment_1_tag_id?: number | undefined; + /** セグメント1ID */ + segment_1_tag_name?: number | undefined; + /** セグメント2ID */ + segment_2_tag_id?: number | undefined; + /** セグメント2 */ + segment_2_tag_name?: number | undefined; + /** セグメント3ID */ + segment_3_tag_id?: number | undefined; + /** セグメント3 */ + segment_3_tag_name?: number | undefined; + /** 金額(税込で指定してください) */ + amount: number; + /** 消費税額(指定しない場合は自動で計算されます) */ + vat: number; + /** 備考 */ + description: string; + }[]; + }; +} + +export type TagParams = { + /** 事業所ID */ + company_id: number; + /** メモタグ名 (30文字以内) */ + name: string; + /** メモタグ検索用 (20文字以内) */ + shortcut1?: string | undefined; + /** メモタグ検索用 (20文字以内) */ + shortcut2?: string | undefined; +} + +export type TagResponse = { + tag: { + /** タグID */ + id: number; + /** 事業所ID */ + company_id: number; + /** 名前(30文字以内) */ + name: string | null; + /** ショートカット1 (255文字以内) */ + shortcut1?: string | null | undefined; + /** ショートカット2 (255文字以内) */ + shortcut2?: string | null | undefined; + }; +} + +export type CompanyUpdateResponse = { + company: { + /** 事業所ID */ + id: number; + /** 事業所の正式名称 (100文字以内) */ + name: string | null; + /** 正式名称フリガナ (100文字以内) */ + name_kana: string | null; + /** 事業所名 */ + display_name: string; + /** 源泉徴収税計算(0: 消費税を含める、1: 消費税を含めない) */ + tax_at_source_calc_type: number; + /** 担当者名 (50文字以内) */ + contact_name: string | null; + /** 従業員数(0: 経営者のみ、1: 2~5人、2: 6~10人、3: 11~20人、4: 21~30人、5: 31~40人、6: 41~100人、7: 100人以上 */ + head_count: number | null; + /** 法人番号 (半角数字13桁、法人のみ) */ + corporate_number: string; + /** 仕訳番号形式(not_used: 使用しない、digits: 数字(例:5091824)、alnum: 英数字(例:59J0P)) */ + txn_number_format: 'not_used' | 'digits' | 'alnum'; + /** 決済口座のデフォルト */ + default_wallet_account_id?: number | undefined; + /** プライベート資金/役員資金(false: 使用しない、true: 使用する) */ + private_settlement: boolean; + /** マイナスの表示方法(0: -、 1: △) */ + minus_format: number; + /** ユーザーの権限 */ + role: 'admin' | 'simple_accounting' | 'self_only' | 'read_only'; + /** 電話番号1 */ + phone1: string; + /** 電話番号2 */ + phone2: string | null; + /** FAX */ + fax: string | null; + /** 郵便番号 */ + zipcode: string; + /** 都道府県コード(0: 北海道、1:青森、2:岩手、3:宮城、4:秋田、5:山形、6:福島、7:茨城、8:栃木、9:群馬、10:埼玉、11:千葉、12:東京、13:神奈川、14:新潟、15:富山、16:石川、17:福井、18:山梨、19:長野、20:岐阜、21:静岡、22:愛知、23:三重、24:滋賀、25:京都、26:大阪、27:兵庫、28:奈良、29:和歌山、30:鳥取、31:島根、32:岡山、33:広島、34:山口、35:徳島、36:香川、37:愛媛、38:高知、39:福岡、40:佐賀、41:長崎、42:熊本、43:大分、44:宮崎、45:鹿児島、46:沖縄 */ + prefecture_code: number; + /** 市区町村・番地 */ + street_name1: string; + /** 建物名・部屋番号など */ + street_name2: string; + /** レイアウト(0: レイアウト1, 1:レイアウト2, 3:封筒1, 4:レイアウト3(繰越金額欄あり), 5: 封筒2(繰越金額欄あり)) */ + invoice_layout: number; + /** スタイル(0: クラシック, 1: モダン) */ + invoice_style: number; + /** 金額端数処理方法(0: 切り捨て、1: 切り上げ、2: 四捨五入) */ + amount_fraction: number; + /** 種別(agriculture_forestry_fisheries_ore: 農林水産業/鉱業、construction: 建設、manufacturing_processing: 製造/加工、it: IT、transportation_logistics: 運輸/物流、retail_wholesale: 小売/卸売、finance_insurance: 金融/保険、real_estate_rental: 不動産/レンタル、profession: 士業/学術/専門技術サービス、design_production: デザイン/制作、food: 飲食、leisure_entertainment: レジャー/娯楽、lifestyle: 生活関連サービス、education: 教育/学習支援、medical_welfare: 医療/福祉、other_services: その他サービス、other: その他) */ + industry_class: '' | 'agriculture_forestry_fisheries_ore' | 'construction' | 'manufacturing_processing' | 'it' | 'transportation_logistics' | 'retail_wholesale' | 'finance_insurance' | 'real_estate_rental' | 'profession' | 'design_production' | 'food' | 'lifestyle' | 'education' | 'medical_welfare' | 'other_services' | 'other'; + /** コード(transport_delivery: 輸送業/配送業、delivery: バイク便等の配達業、other_transportation_logistics: その他の運輸業、物流業) */ + industry_code: '' | 'transport_delivery' | 'delivery' | 'other_transportation_logistics'; + /** 仕訳承認フロー(enable: 有効、 disable: 無効) */ + workflow_setting: 'enable' | 'disable'; + fiscal_years?: { + /** 製造業向け機能(true: 使用する、false: 使用しない) */ + use_industry_template: boolean; + /** 固定資産の控除法(false: 減価償却累計額でまとめる、true: 独立間接控除方式) */ + indirect_write_off_method: boolean; + /** 期首日 */ + start_date?: string | undefined; + /** 期末日 */ + end_date?: string | undefined; + /** 月次償却(0: しない、1: する) */ + depreciation_record_method: number; + /** 課税区分(0: 免税、1: 簡易課税、2: 本則課税(個別対応方式)、3: 本則課税(一括比例配分方式)、4: 本則課税(全額控除)) */ + tax_method: number; + /** 簡易課税用事業区分(0: 第一種:卸売業、1: 第二種:小売業、2: 第三種:農林水産業、工業、建設業、製造業など、3: 第四種:飲食店業など、4: 第五種:金融・保険業、運輸通信業、サービス業など、5: 第六種:不動産業など */ + sales_tax_business_code: number; + /** 消費税端数処理方法(0: 切り捨て、1: 切り上げ、2: 四捨五入) */ + tax_fraction: number; + /** 消費税経理処理方法(0: 税込経理、1: 旧税抜経理、2: 税抜経理) */ + tax_account_method: number; + /** 不動産所得使用区分(0: 一般、1: 一般/不動産) ※個人事業主のみ設定可能 */ + return_code: number; + }[] | undefined; + }; +} + +export type CompanyIndexResponse = { + companies: { + /** 事業所ID */ + id: number; + /** 事業所名 */ + name: string | null; + /** 事業所名(カナ) */ + name_kana: string | null; + /** 事業所名 */ + display_name: string | null; + /** ユーザーの権限 */ + role: 'admin' | 'simple_accounting' | 'self_only' | 'read_only'; + }[]; +} + +export type CompanyResponse = { + company: { + /** 事業所ID */ + id: number; + /** 事業所の正式名称 (100文字以内) */ + name: string | null; + /** 正式名称フリガナ (100文字以内) */ + name_kana: string | null; + /** 事業所名 */ + display_name: string; + /** 源泉徴収税計算(0: 消費税を含める、1: 消費税を含めない) */ + tax_at_source_calc_type: number; + /** 担当者名 (50文字以内) */ + contact_name: string | null; + /** 従業員数(0: 経営者のみ、1: 2~5人、2: 6~10人、3: 11~20人、4: 21~30人、5: 31~40人、6: 41~100人、7: 100人以上 */ + head_count: number | null; + /** 法人番号 (半角数字13桁、法人のみ) */ + corporate_number: string; + /** 仕訳番号形式(not_used: 使用しない、digits: 数字(例:5091824)、alnum: 英数字(例:59J0P)) */ + txn_number_format: 'not_used' | 'digits' | 'alnum'; + /** 決済口座のデフォルト */ + default_wallet_account_id?: number | undefined; + /** プライベート資金/役員資金(false: 使用しない、true: 使用する) */ + private_settlement: boolean; + /** マイナスの表示方法(0: -、 1: △) */ + minus_format: number; + /** ユーザーの権限 */ + role: 'admin' | 'simple_accounting' | 'self_only' | 'read_only'; + /** 電話番号1 */ + phone1: string; + /** 電話番号2 */ + phone2: string | null; + /** FAX */ + fax: string | null; + /** 郵便番号 */ + zipcode: string; + /** 都道府県コード(0: 北海道、1:青森、2:岩手、3:宮城、4:秋田、5:山形、6:福島、7:茨城、8:栃木、9:群馬、10:埼玉、11:千葉、12:東京、13:神奈川、14:新潟、15:富山、16:石川、17:福井、18:山梨、19:長野、20:岐阜、21:静岡、22:愛知、23:三重、24:滋賀、25:京都、26:大阪、27:兵庫、28:奈良、29:和歌山、30:鳥取、31:島根、32:岡山、33:広島、34:山口、35:徳島、36:香川、37:愛媛、38:高知、39:福岡、40:佐賀、41:長崎、42:熊本、43:大分、44:宮崎、45:鹿児島、46:沖縄 */ + prefecture_code: number; + /** 市区町村・番地 */ + street_name1: string; + /** 建物名・部屋番号など */ + street_name2: string; + /** レイアウト(0: レイアウト1, 1:レイアウト2, 3:封筒1, 4:レイアウト3(繰越金額欄あり), 5: 封筒2(繰越金額欄あり)) */ + invoice_layout: number; + /** スタイル(0: クラシック, 1: モダン) */ + invoice_style: number; + /** 金額端数処理方法(0: 切り捨て、1: 切り上げ、2: 四捨五入) */ + amount_fraction: number; + /** 種別(agriculture_forestry_fisheries_ore: 農林水産業/鉱業、construction: 建設、manufacturing_processing: 製造/加工、it: IT、transportation_logistics: 運輸/物流、retail_wholesale: 小売/卸売、finance_insurance: 金融/保険、real_estate_rental: 不動産/レンタル、profession: 士業/学術/専門技術サービス、design_production: デザイン/制作、food: 飲食、leisure_entertainment: レジャー/娯楽、lifestyle: 生活関連サービス、education: 教育/学習支援、medical_welfare: 医療/福祉、other_services: その他サービス、other: その他) */ + industry_class: '' | 'agriculture_forestry_fisheries_ore' | 'construction' | 'manufacturing_processing' | 'it' | 'transportation_logistics' | 'retail_wholesale' | 'finance_insurance' | 'real_estate_rental' | 'profession' | 'design_production' | 'food' | 'lifestyle' | 'education' | 'medical_welfare' | 'other_services' | 'other'; + /** コード(transport_delivery: 輸送業/配送業、delivery: バイク便等の配達業、other_transportation_logistics: その他の運輸業、物流業) */ + industry_code: '' | 'transport_delivery' | 'delivery' | 'other_transportation_logistics'; + /** 仕訳承認フロー(enable: 有効、 disable: 無効) */ + workflow_setting: 'enable' | 'disable'; + /** 取引先コードの利用設定(true: 有効、 false: 無効) */ + use_partner_code: boolean; + fiscal_years: Fiscal_years[]; + }; +} + +export type UnauthorizedError = { + message?: string | undefined; + messages?: string | undefined; +} + +export type ForbiddenError = { + message?: string | undefined; + messages?: string | undefined; +} + +export type BadRequestError = { + status_code?: number | undefined; + errors?: { + messages: string[] | string; + + type: 'status' | 'validation' | 'error'; + }[] | undefined; +} + +export type BadRequestNotFoundError = { + status_code?: number | undefined; + errors?: { + messages: string[] | string; + + type: 'status' | 'validation' | 'error'; + }[] | undefined; +} + +export type TooManyRequestsError = { + status_code: number; + + meta: { + /** 設定されている上限値 */ + limit: number; + /** 使用回数をカウントする期間 (秒) */ + period?: number | undefined; + /** 上限に達するまでの使用可能回数 */ + remaining: number; + /** (上限値に達した場合)使用回数がリセットされる時刻 */ + reset: string; + }; +} + +export type InternalServerError = { + status_code?: number | undefined; + errors?: { + messages: string[] | string; + + type: 'status' | 'validation' | 'error'; + }[] | undefined; +} + +export type ServiceUnavailableError = { + status_code: number; + errors: { + messages: string[]; + type: 'status' | 'error'; + }[]; +} + +export type PartnersResponse = { + partners: { + /** 取引先ID */ + id: number; + /** 取引先コード */ + code: string | null; + /** 事業所ID */ + company_id: number; + /** 取引先名 */ + name: string; + /** ショートカット1 (20文字以内) */ + shortcut1?: string | null | undefined; + /** ショートカット2 (20文字以内) */ + shortcut2?: string | null | undefined; + /** 正式名称(255文字以内) */ + long_name?: string | null | undefined; + /** カナ名称(255文字以内) */ + name_kana?: string | null | undefined; + /** 敬称(御中、様、(空白)の3つから選択) */ + default_title?: string | null | undefined; + /** 電話番号 */ + phone?: string | null | undefined; + /** 担当者 氏名 */ + contact_name?: string | null | undefined; + /** 担当者 メールアドレス */ + email?: string | null | undefined; + /** 振込元口座ID(一括振込ファイル用):(未設定の場合は、nullです。) */ + payer_walletable_id?: number | null | undefined; + /** 振込手数料負担(一括振込ファイル用): (振込元(当方): payer, 振込先(先方): payee) */ + transfer_fee_handling_side?: 'payer' | 'payee' | undefined; + /** 郵便番号 */ + 'address_attributes[zipcode]'?: string | null | undefined; + /** 都道府県コード(0:北海道、1:青森、2:岩手、3:宮城、4:秋田、5:山形、6:福島、7:茨城、8:栃木、9:群馬、10:埼玉、11:千葉、12:東京、13:神奈川、14:新潟、15:富山、16:石川、17:福井、18:山梨、19:長野、20:岐阜、21:静岡、22:愛知、23:三重、24:滋賀、25:京都、26:大阪、27:兵庫、28:奈良、29:和歌山、30:鳥取、31:島根、32:岡山、33:広島、34:山口、35:徳島、36:香川、37:愛媛、38:高知、39:福岡、40:佐賀、41:長崎、42:熊本、43:大分、44:宮崎、45:鹿児島、46:沖縄 */ + 'address_attributes[prefecture_code]'?: number | undefined; + /** 市区町村・番地 */ + 'address_attributes[street_name1]'?: string | null | undefined; + /** 建物名・部屋番号など */ + 'address_attributes[street_name2]'?: string | null | undefined; + /** 請求書送付方法(mail:メール、posting:郵送、mail_and_posting:メールと郵送) */ + 'partner_doc_setting_attributes[sending_method]'?: 'mail' | 'posting' | 'main_and_posting' | null | undefined; + /** 銀行名 */ + 'partner_bank_account_attributes[bank_name]'?: string | null | undefined; + /** 銀行名(カナ) */ + 'partner_bank_account_attributes[bank_name_kana]'?: string | null | undefined; + /** 銀行番号 */ + 'partner_bank_account_attributes[bank_code]'?: string | null | undefined; + /** 支店名 */ + 'partner_bank_account_attributes[branch_name]'?: string | null | undefined; + /** 支店名(カナ) */ + 'partner_bank_account_attributes[branch_kana]'?: string | null | undefined; + /** 受取人名(カナ) */ + 'partner_bank_account_attributes[branch_code]'?: string | null | undefined; + /** 口座種別(ordinary:普通、checking:当座、earmarked:納税準備預金、savings:貯蓄、other:その他) */ + 'partner_bank_account_attributes[account_type]'?: 'ordinary' | 'checking' | 'earmarked' | 'savings' | 'other' | null | undefined; + /** 口座番号 */ + 'partner_bank_account_attributes[account_number]'?: string | null | undefined; + /** 受取人名(カナ) */ + 'partner_bank_account_attributes[account_name]'?: string | null | undefined; + /** 受取人名 */ + 'partner_bank_account_attributes[long_account_name]'?: string | null | undefined; + }[]; +} + +export type PartnerResponse = { + partner: { + /** 取引先ID */ + id: number; + /** 取引先コード */ + code: string | null; + /** 事業所ID */ + company_id: number; + /** 取引先名 */ + name: string; + /** ショートカット1 (20文字以内) */ + shortcut1?: string | null | undefined; + /** ショートカット2 (20文字以内) */ + shortcut2?: string | null | undefined; + /** 正式名称(255文字以内) */ + long_name?: string | null | undefined; + /** カナ名称(255文字以内) */ + name_kana?: string | null | undefined; + /** 敬称(御中、様、(空白)の3つから選択) */ + default_title?: string | null | undefined; + /** 電話番号 */ + phone?: string | null | undefined; + /** 担当者 氏名 */ + contact_name?: string | null | undefined; + /** 担当者 メールアドレス */ + email?: string | null | undefined; + /** 振込元口座ID(一括振込ファイル用):(未設定の場合は、nullです。) */ + payer_walletable_id?: number | null | undefined; + /** 振込手数料負担(一括振込ファイル用): (振込元(当方): payer, 振込先(先方): payee) */ + transfer_fee_handling_side?: 'payer' | 'payee' | undefined; + /** 郵便番号 */ + 'address_attributes[zipcode]'?: string | null | undefined; + /** 都道府県コード(0:北海道、1:青森、2:岩手、3:宮城、4:秋田、5:山形、6:福島、7:茨城、8:栃木、9:群馬、10:埼玉、11:千葉、12:東京、13:神奈川、14:新潟、15:富山、16:石川、17:福井、18:山梨、19:長野、20:岐阜、21:静岡、22:愛知、23:三重、24:滋賀、25:京都、26:大阪、27:兵庫、28:奈良、29:和歌山、30:鳥取、31:島根、32:岡山、33:広島、34:山口、35:徳島、36:香川、37:愛媛、38:高知、39:福岡、40:佐賀、41:長崎、42:熊本、43:大分、44:宮崎、45:鹿児島、46:沖縄 */ + 'address_attributes[prefecture_code]'?: number | undefined; + /** 市区町村・番地 */ + 'address_attributes[street_name1]'?: string | null | undefined; + /** 建物名・部屋番号など */ + 'address_attributes[street_name2]'?: string | null | undefined; + /** 請求書送付方法(email:メール、posting:郵送、email_and_posting:メールと郵送) */ + 'partner_doc_setting_attributes[sending_method]'?: 'email' | 'posting' | 'email_and_posting' | null | undefined; + /** 銀行名 */ + 'partner_bank_account_attributes[bank_name]'?: string | null | undefined; + /** 銀行名(カナ) */ + 'partner_bank_account_attributes[bank_name_kana]'?: string | null | undefined; + /** 銀行番号 */ + 'partner_bank_account_attributes[bank_code]'?: string | null | undefined; + /** 支店名 */ + 'partner_bank_account_attributes[branch_name]'?: string | null | undefined; + /** 支店名(カナ) */ + 'partner_bank_account_attributes[branch_kana]'?: string | null | undefined; + /** 受取人名(カナ) */ + 'partner_bank_account_attributes[branch_code]'?: string | null | undefined; + /** 口座種別(ordinary:普通、checking:当座、earmarked:納税準備預金、savings:貯蓄、other:その他) */ + 'partner_bank_account_attributes[account_type]'?: 'ordinary' | 'checking' | 'earmarked' | 'savings' | 'other' | null | undefined; + /** 口座番号 */ + 'partner_bank_account_attributes[account_number]'?: string | null | undefined; + /** 受取人名(カナ) */ + 'partner_bank_account_attributes[account_name]'?: string | null | undefined; + /** 受取人名 */ + 'partner_bank_account_attributes[long_account_name]'?: string | null | undefined; + /** 締め日(29, 30, 31日の末日を指定する場合は、32。) */ + 'payment_term_attributes[cutoff_day]'?: number | null | undefined; + /** 支払月 */ + 'payment_term_attributes[additional_months]'?: number | null | undefined; + /** 支払日(29, 30, 31日の末日を指定する場合は、32。) */ + 'payment_term_attributes[fixed_day]'?: number | null | undefined; + /** 締め日(29, 30, 31日の末日を指定する場合は、32。) */ + 'invoice_payment_term_attributes[cutoff_day]'?: number | null | undefined; + /** 支払月 */ + 'invoice_payment_term_attributes[additional_months]'?: number | null | undefined; + /** 支払日(29, 30, 31日の末日を指定する場合は、32。) */ + 'invoice_payment_term_attributes[fixed_day]'?: number | null | undefined; + }; +} + +export type TaxResponse = { + tax: { + /** 税区分コード */ + code: number; + /** 税区分名 */ + name: string; + /** 税区分名(日本語表示用) */ + name_ja: string; + }; +} + +export type WalletableResponse = { + walletable: { + /** 口座ID */ + id: number; + /** 口座名 (255文字以内) */ + name: string; + /** サービスID */ + bank_id: number | null; + /** 口座区分 (銀行口座: bank_account, クレジットカード: credit_card, 現金: wallet) */ + type: 'bank_account' | 'credit_card' | 'wallet'; + /** 同期残高 */ + last_balance?: number | undefined; + /** 登録残高 */ + walletable_balance?: number | undefined; + + meta?: { + /** 集計結果が最新かどうか */ + up_to_date?: boolean | undefined; + } | undefined; + }; +} + +export type WalletableCreateResponse = { + /** 口座ID */ + id: number; + /** 口座名, 最大255文字 */ + name: string; + /** サービスID */ + bank_id: number; + /** 口座区分 (銀行口座: bank_account, クレジットカード: credit_card, 現金: wallet) */ + type: 'bank_account' | 'credit_card' | 'wallet'; +} + +export type WalletTxnResponse = { + wallet_txn: { + /** 明細ID */ + id: number; + /** 事業所ID */ + company_id: number; + /** 取引日(yyyy-mm-dd) */ + date: string; + /** 取引金額 */ + amount: number; + /** 未決済金額 */ + due_amount: number; + /** 残高(銀行口座等) */ + balance: number; + /** 入金/出金 (入金: income, 出金: expense) */ + entry_side: 'income' | 'expense'; + /** 口座区分 (銀行口座: bank_account, クレジットカード: credit_card, 現金: wallet) */ + walletable_type: 'bank_account' | 'credit_card' | 'wallet'; + /** 口座ID */ + walletable_id: number; + /** 取引内容 */ + description: string; + /** 明細のステータス(消込待ち: 1, 消込済み: 2, 無視: 3, 消込中: 4) */ + status: number; + }; +} + +export type TransferResponse = { + transfer: { + /** 取引(振替)ID */ + id: number; + /** 事業所ID */ + company_id: number; + /** 金額 */ + amount: number; + /** 振替日 (yyyy-mm-dd) */ + date: string; + /** 振替元口座区分 (銀行口座: bank_account, クレジットカード: credit_card, 現金: wallet) */ + from_walletable_type: 'bank_account' | 'wallet' | 'credit_card' | null; + /** 振替元口座ID */ + from_walletable_id: number; + /** 振替先口座区分 (銀行口座: bank_account, クレジットカード: credit_card, 現金: wallet) */ + to_walletable_type: 'bank_account' | 'wallet' | 'credit_card' | null; + /** 振替先口座ID */ + to_walletable_id: number; + /** 備考 */ + description: string; + }; +} + +export type UserParams = { + /** 表示名 (20文字以内) */ + display_name?: string | undefined; + /** 氏名(名) (20文字以内) */ + first_name?: string | undefined; + /** 氏名(姓) (20文字以内) */ + last_name?: string | undefined; + /** 氏名(カナ・名) (20文字以内) */ + first_name_kana?: string | undefined; + /** 氏名(カナ・姓) (20文字以内) */ + last_name_kana?: string | undefined; +} + +export type UserResponse = { + user?: { + /** ユーザーID */ + id: number; + /** メールアドレス */ + email: string; + /** 表示名 */ + display_name?: string | null | undefined; + /** 氏名(名) */ + first_name?: string | null | undefined; + /** 氏名(姓) */ + last_name?: string | null | undefined; + /** 氏名(カナ・名) */ + first_name_kana?: string | null | undefined; + /** 氏名(カナ・姓) */ + last_name_kana?: string | null | undefined; + } | undefined; +} + +export type MeResponse = { + user: { + /** ユーザーID */ + id: number; + /** メールアドレス */ + email: string; + /** 表示ユーザー名 */ + display_name?: string | null | undefined; + /** 名 */ + first_name?: string | null | undefined; + /** 姓 */ + last_name?: string | null | undefined; + /** 名(カナ) */ + first_name_kana?: string | null | undefined; + /** 姓(カナ) */ + last_name_kana?: string | null | undefined; + companies?: { + /** 事業所ID */ + id: number; + /** 表示名 */ + display_name: string; + /** ユーザーの権限 */ + role: 'admin' | 'simple_accounting' | 'self_only' | 'read_only'; + /** カスタム権限(true: 使用する、false: 使用しない) */ + use_custom_role: boolean; + }[] | undefined; + }; +} + +export type UserCapability = { + /** 閲覧 */ + read?: boolean | undefined; + /** 作成 */ + create?: boolean | undefined; + /** 更新 */ + update?: boolean | undefined; + /** 削除 */ + destroy?: boolean | undefined; +} + +export type ReceiptResponse = { + receipt: { + /** 証憑ID */ + id: number; + /** ステータス(unconfirmed:確認待ち、confirmed:確認済み、deleted:削除済み、ignored:無視) */ + status: 'unconfirmed' | 'confirmed' | 'deleted' | 'ignored'; + /** メモ */ + description?: string | undefined; + /** MIMEタイプ */ + mime_type: string; + /** 発生日 */ + issue_date?: string | undefined; + /** アップロード元種別 */ + origin: 'unknown' | 'web' | 'mobile_camera' | 'mobile_album' | 'scansnap' | 'scannable' | 'dropbox' | 'mail' | 'safety_contact_file' | 'public_api'; + /** 作成日時(ISO8601形式) */ + created_at: string; + /** ファイルのダウンロードURL(freeeにログインした状態でのみ閲覧可能です。) */ + file_src: string; + + user: { + /** ユーザID */ + id: number; + /** メールアドレス */ + email: string; + /** 表示名 */ + display_name?: string | null | undefined; + }; + }; +} + +export type Fiscal_years = { + /** 製造業向け機能(true: 使用する、false: 使用しない) */ + use_industry_template: boolean; + /** 固定資産の控除法(false: 減価償却累計額でまとめる、true: 独立間接控除方式) */ + indirect_write_off_method: boolean; + /** 期首日 */ + start_date?: string | undefined; + /** 期末日 */ + end_date?: string | undefined; + /** 月次償却(0: しない、1: する) */ + depreciation_record_method: number; + /** 課税区分(0: 免税、1: 簡易課税、2: 本則課税(個別対応方式)、3: 本則課税(一括比例配分方式)、4: 本則課税(全額控除)) */ + tax_method: number; + /** 簡易課税用事業区分(0: 第一種:卸売業、1: 第二種:小売業、2: 第三種:農林水産業、工業、建設業、製造業など、3: 第四種:飲食店業など、4: 第五種:金融・保険業、運輸通信業、サービス業など、5: 第六種:不動産業など */ + sales_tax_business_code: number; + /** 消費税端数処理方法(0: 切り捨て、1: 切り上げ、2: 四捨五入) */ + tax_fraction: number; + /** 消費税経理処理方法(0: 税込経理、1: 旧税抜経理、2: 税抜経理) */ + tax_account_method: number; + /** 不動産所得使用区分(0: 一般、1: 一般/不動産) ※個人事業主のみ設定可能 */ + return_code: number; +} + +export type ExpenseApplicationResponse = { + expense_application: { + /** 経費申請ID */ + id: number; + /** 事業所ID */ + company_id: number; + /** 申請タイトル */ + title: string; + /** 申請日 (yyyy-mm-dd) */ + issue_date: string | null; + /** 備考 */ + description?: string | undefined; + /** 会計freeeのWeb画面から申請内容を編集可能:falseの場合、Web上からの項目行の追加/削除・金額の編集が出来なくなります。APIでの編集は可能です。 */ + editable_on_web: boolean; + /** 合計金額 */ + total_amount?: number | undefined; + /** 申請ステータス(draft:下書き, in_progress:申請中, approved:承認済, rejected:却下, feedback:差戻し) */ + status: 'draft' | 'in_progress' | 'approved' | 'rejected' | 'feedback'; + /** 部門ID */ + section_id?: number | null | undefined; + /** メモタグID */ + tag_ids?: number[] | undefined; + /** 経費申請の項目行一覧(配列) */ + expense_application_lines: { + /** 経費申請の項目行ID */ + id: number; + /** 日付 (yyyy-mm-dd) */ + transaction_date?: string | undefined; + /** 内容 */ + description?: string | undefined; + /** 金額 */ + amount?: number | undefined; + /** 経費科目ID */ + expense_application_line_template_id?: number | undefined; + /** 証憑ID */ + receipt_id?: number | undefined; + }[]; + /** 取引ID (申請ステータス:statusがapprovedで、取引が存在する時のみdeal_idが表示されます) */ + deal_id: number | null; + /** 取引ステータス (申請ステータス:statusがapprovedで、取引が存在する時のみdeal_statusが表示されます settled:精算済み, unsettled:清算待ち) */ + deal_status: 'settled' | 'unsettled' | null; + }; +} + +export type ExpenseApplicationLineTemplateResponse = { + expense_application_line_template: { + /** 経費科目ID */ + id: number; + /** 経費科目名 */ + name: string; + /** 勘定科目ID */ + account_item_id?: number | undefined; + /** 勘定科目名 */ + account_item_name: string; + /** 税区分コード */ + tax_code?: number | undefined; + /** 税区分名 */ + tax_name: string; + /** 経費科目の説明 */ + description?: string | undefined; + /** 内容の補足 */ + line_description?: string | undefined; + }; +} + +export type ApprovalRequestParams = { + /** 事業所ID */ + company_id: number; + /** 申請フォームID */ + request_form_id: number; + /** 経路申請ID */ + approval_flow_route_id: number; + /** 承認者ID */ + approver_id?: number | undefined; + /** 申請タイトル (255文字以内) */ + title: string; + request_items?: { + /** 項目ID */ + id?: number | undefined; + /** 項目タイプ(single_line: 自由記述形式 1行, multi_line: 自由記述形式 複数行, select: プルダウン, date: 日付, amount: 金額, receipt: 添付ファイル) */ + type?: 'single_line' | 'multi_line' | 'select' | 'date' | 'amount' | 'receipt' | undefined; + /** 項目の値 (項目タイプによって入力可能な値が異なります。詳細は注意点をご確認ください) */ + value?: string | undefined; + }[] | undefined; +} + +export type GeneralApplicationCreateParams = { + /** 事業所ID */ + company_id: number; + /** 申請日 (yyyy-mm-dd) */ + application_date: string; + /** 申請経路ID */ + approval_flow_route_id: number; + /** 申請フォームID */ + form_id: number; + /** 承認者ID */ + approver_id?: number | undefined; + /** falseの時、in_progress:申請中で作成する。それ以外の時はdraft:下書きで作成する */ + draft: boolean; + /** 親申請ID(既存各種申請IDのみ指定可能です。) */ + parent_id?: number | undefined; + request_items: { + /** 項目ID */ + id?: number | undefined; + /** 項目タイプ(title: 申請タイトル, single_line: 自由記述形式 1行, multi_line: 自由記述形式 複数行, select: プルダウン, date: 日付, amount: 金額, receipt: 添付ファイル) */ + type?: 'title' | 'single_line' | 'multi_line' | 'select' | 'date' | 'amount' | 'receipt' | undefined; + /** 項目の値 */ + value?: string | undefined; + }[]; +} + +export type GeneralApplicationUpdateParams = { + /** 事業所ID */ + company_id: number; + /** 申請日 (yyyy-mm-dd) */ + application_date: string; + /** 申請経路ID */ + approval_flow_route_id: number; + /** 承認者ID */ + approver_id?: number | undefined; + /** falseの時、in_progress:申請中で更新する。それ以外の時はdraft:下書きで更新する */ + draft: boolean; + request_items: { + /** 項目ID */ + id?: number | undefined; + /** 項目タイプ(title: 申請タイトル, single_line: 自由記述形式 1行, multi_line: 自由記述形式 複数行, select: プルダウン, date: 日付, amount: 金額, receipt: 添付ファイル) */ + type?: 'title' | 'single_line' | 'multi_line' | 'select' | 'date' | 'amount' | 'receipt' | undefined; + /** 項目の値 */ + value?: string | undefined; + }[]; +} + +export type GeneralApplicationActionCreateParams = { + /** 事業所ID */ + company_id: number; + /** 操作(approve: 承認する、force_approve: 代理承認する、cancel: 申請を取り消す、reject: 却下する、feedback: 申請者へ差し戻す、force_feedback: 承認済み・却下済みを取り消す) */ + approval_action: 'approve' | 'force_approve' | 'cancel' | 'reject' | 'feedback' | 'force_feedback'; + /** 次ステップの承認者ID */ + next_approver_id?: number | null | undefined; +} + +export type RenewCreateParams = { + /** 事業所ID */ + company_id: number; + /** 更新日 (yyyy-mm-dd) */ + update_date: string; + /** +更新対象行ID (details(取引の明細行), accruals(債権債務行), renewsのdetails(+更新の明細行)のIDを指定) */ + renew_target_id: number; + /** +更新の明細行 */ + details: { + /** 勘定科目ID */ + account_item_id: number; + /** 税区分コード */ + tax_code: number; + /** 取引金額(税込で指定してください) */ + amount: number; + /** 消費税額(指定しない場合は自動で計算されます) */ + vat?: number | undefined; + /** 品目ID */ + item_id?: number | undefined; + /** 部門ID */ + section_id?: number | undefined; + /** メモタグID */ + tag_ids?: number[] | undefined; + /** セグメント1ID */ + segment_1_tag_id?: number | undefined; + /** セグメント2ID */ + segment_2_tag_id?: number | undefined; + /** セグメント3ID */ + segment_3_tag_id?: number | undefined; + /** 備考 */ + description?: string | undefined; + }[]; +} + +export type RenewUpdateParams = { + /** 事業所ID */ + company_id: number; + /** 更新日 (yyyy-mm-dd) */ + update_date: string; + /** +更新の明細行 */ + details: { + /** 勘定科目ID */ + account_item_id: number; + /** 税区分コード */ + tax_code: number; + /** 取引金額(税込で指定してください) */ + amount: number; + /** 消費税額(指定しない場合は自動で計算されます) */ + vat?: number | undefined; + /** 品目ID */ + item_id?: number | undefined; + /** 部門ID */ + section_id?: number | undefined; + /** メモタグID */ + tag_ids?: number[] | undefined; + /** セグメント1ID */ + segment_1_tag_id?: number | undefined; + /** セグメント2ID */ + segment_2_tag_id?: number | undefined; + /** セグメント3ID */ + segment_3_tag_id?: number | undefined; + /** 備考 */ + description?: string | undefined; + }[]; +} + +export type ExpenseApplicationLineTemplateParams = { + /** 事業所ID */ + company_id: number; + /** 経費科目名 (100文字以内) */ + name: string; + /** 勘定科目ID */ + account_items_id?: number | undefined; + /** 品目ID */ + item_id?: number | undefined; + /** 税区分コード(税区分のdisplay_categoryがtax_5: 5%表示の税区分, tax_r8: 軽減税率8%表示の税区分に該当するtax_codeのみ利用可能です。税区分のdisplay_categoryは /taxes/companies/{:company_id}のAPIから取得可能です。) */ + tax_code: number; + /** 経費科目の説明 (1000文字以内) */ + description?: string | undefined; + /** 内容の補足 (1000文字以内) */ + line_description?: string | undefined; +} + +export type ApprovalRequestResponse = { + approval_request: { + /** 各種申請ID */ + id: number; + /** 事業所ID */ + company_id: number; + /** 申請日 (yyyy-mm-dd) */ + application_date: string; + /** 申請タイトル */ + title: string; + /** 申請者ID */ + applicant_id: number; + /** 承認者ID */ + approver_id: number | null; + /** 申請No. */ + application_number: string; + /** 申請ステータス */ + status: 'draft'; + /** 各種申請の項目一覧(配列) */ + request_items: { + /** 項目ID */ + id: number; + /** 項目タイプ */ + type: string; + /** 項目の値 */ + value: string; + }[]; + }; +} + +export type GeneralApplicationsIndexResponse = { + general_applications: { + /** 各種申請ID */ + id: number; + /** 事業所ID */ + company_id: number; + /** 申請日 (yyyy-mm-dd) */ + application_date: string; + /** 申請タイトル */ + title: string; + /** 申請者ID */ + applicant_id: number; + /** 承認者ID */ + approver_id: number | null; + /** 申請No. */ + application_number: string; + /** 申請ステータス(draft:下書き, in_progress:申請中, approved:承認済, rejected:却下, feedback:差戻し) */ + status: 'draft' | 'in_progress' | 'approved' | 'rejected' | 'feedback'; + /** 各種申請の項目一覧(配列) */ + request_items: { + /** 項目ID */ + id: number; + /** 項目タイプ(title: 申請タイトル, single_line: 自由記述形式 1行, multi_line: 自由記述形式 複数行, select: プルダウン, date: 日付, amount: 金額, receipt: 添付ファイル) */ + type: 'title' | 'single_line' | 'multi_line' | 'select' | 'date' | 'amount' | 'receipt'; + /** 項目の値 */ + value: string; + }[]; + /** 申請フォームID */ + form_id: number; + /** 申請経路ID */ + approval_flow_route_id: number; + }[]; +} + +export type GeneralApplicationResponse = { + general_application: { + /** 各種申請ID */ + id: number; + /** 事業所ID */ + company_id: number; + /** 申請日 (yyyy-mm-dd) */ + application_date: string; + /** 申請タイトル */ + title: string; + /** 申請者ID */ + applicant_id: number; + /** 承認者ID */ + approver_id: number | null; + /** 申請No. */ + application_number: string; + /** 申請ステータス(draft:下書き, in_progress:申請中, approved:承認済, rejected:却下, feedback:差戻し) */ + status: 'draft' | 'in_progress' | 'approved' | 'rejected' | 'feedback'; + /** 各種申請の項目一覧(配列) */ + request_items: { + /** 項目ID */ + id: number; + /** 項目タイプ(title: 申請タイトル, single_line: 自由記述形式 1行, multi_line: 自由記述形式 複数行, select: プルダウン, date: 日付, amount: 金額, receipt: 添付ファイル) */ + type: 'title' | 'single_line' | 'multi_line' | 'select' | 'date' | 'amount' | 'receipt'; + /** 項目の値 */ + value: string; + }[]; + /** 申請フォームID */ + form_id: number; + /** 申請経路ID */ + approval_flow_route_id: number; + /** 最終承認者ID(statusがapproved時以外はnullになります。) */ + last_approver_id: number | null; + /** 最終承認日時(ISO8601形式 statusがapproved時以外はnullになります。) */ + last_approved_at: string | null; + /** 各種申請のコメント一覧(配列) */ + comments: { + /** コメント内容 */ + comment: string; + /** ユーザーID */ + user_id: number; + /** コメント日時(ISO8601形式) */ + posted_at: string; + }[]; + /** 各種申請の承認履歴(配列) */ + approval_flow_logs: { + /** 操作(apply: 申請, approve: 承認, force_approve: 代理承認, ancel: 取消, reject: 却下, eedback: 差戻し) */ + action: 'apply' | 'approve' | 'force_approve' | 'cancel' | 'reject' | 'feedback'; + /** ユーザーID */ + user_id: number; + /** コメント日時(ISO8601形式) */ + updated_at: string; + }[]; + }; +} + +export type GeneralApplicationFormResponse = { + general_application_form: { + /** 申請フォームID */ + id: number; + /** 事業所ID */ + company_id: number; + /** 申請フォームの名前 */ + name: string; + /** 申請フォームの説明 */ + description: string; + /** ステータス(draft: 申請で使用しない、active: 申請で使用する、deleted: 削除済み) */ + status: 'draft' | 'active' | 'deleted'; + /** 作成日時 */ + created_date: string; + /** 表示順 */ + form_order: number | null; + /** 申請フォームの項目 */ + parts?: { + /** 項目ID */ + id: number; + /** 順序 */ + order?: number | undefined; + /** 項目種別 (title: 申請タイトル, single_line: 自由記述形式 1行, multi_line: 自由記述形式 複数行, select: プルダウン, date: 日付, amount: 金額, receipt: 添付ファイル) */ + type?: 'title' | 'single_line' | 'multi_line' | 'select' | 'date' | 'amount' | 'receipt' | undefined; + /** 項目名 */ + label?: string | undefined; + /** 追加説明 */ + annotation?: string | null | undefined; + /** 必須かどうか */ + required?: boolean | null | undefined; + /** 選択項目 */ + values?: { + /** 選択項目名 */ + name: string; + /** 順序 */ + order: number; + }[] | null | undefined; + /** 上限金額 */ + max_amount?: number | null | undefined; + /** 下限金額 */ + min_amount?: number | null | undefined; + }[] | undefined; + /** 適用された経路数 */ + route_setting_count: number; + }; +} + +export type ApprovalFlowRouteResponse = { + approval_flow_route: { + /** 申請経路ID */ + id: number; + /** 申請経路名 */ + name?: string | undefined; + /** 申請経路の説明 */ + description?: string | undefined; + /** 更新したユーザのユーザID */ + user_id?: number | null | undefined; + /** システム作成の申請経路かどうか */ + definition_system?: boolean | undefined; + /** この申請経路を使用中の申請があるかどうか */ + is_in_progress?: boolean | undefined; + /** 最初の承認ステップのID */ + first_step_id?: number | undefined; + /** 申請種別 */ + usages?: ('TxnApproval' | 'ExpenseApplication' | 'PaymentRequest' | 'ApprovalRequest' | 'DocApproval')[] | undefined; + }; +} + +export type SegmentTagResponse = { + segment_tag: { + /** セグメントタグID */ + id: number; + /** セグメントタグ名 */ + name: string; + /** 備考 */ + description: string | null; + /** ショートカット1 (20文字以内) */ + shortcut1: string | null; + /** ショートカット2 (20文字以内) */ + shortcut2: string | null; + }; +} + +export type SegmentTagParams = { + /** 事業所ID */ + company_id: number; + /** セグメントタグ名 (30文字以内) */ + name: string; + /** 備考 (30文字以内) */ + description?: string | undefined; + /** ショートカット1 (20文字以内) */ + shortcut1?: string | undefined; + /** ショートカット2 (20文字以内) */ + shortcut2?: string | undefined; +} + +export type InvoiceResponse = { + invoice: { + /** 請求書ID */ + id: number; + /** 事業所ID */ + company_id: number; + /** 請求日 (yyyy-mm-dd) */ + issue_date: string; + /** 取引先ID */ + partner_id: number | null; + /** 取引先コード */ + partner_code?: string | null | undefined; + /** 請求書番号 */ + invoice_number: string; + /** タイトル */ + title?: string | null | undefined; + /** 期日 (yyyy-mm-dd) */ + due_date?: string | null | undefined; + /** 合計金額 */ + total_amount: number; + /** 合計金額 */ + total_vat?: number | undefined; + /** 小計 */ + sub_total?: number | undefined; + /** 売上計上日 */ + booking_date?: string | null | undefined; + /** 概要 */ + description?: string | null | undefined; + /** 請求書ステータス (draft: 下書き, applying: 申請中, remanded: 差し戻し, rejected: 却下, approved: 承認済み, issued: 発行済み) */ + invoice_status: 'draft' | 'applying' | 'remanded' | 'rejected' | 'approved' | 'issued'; + /** 入金ステータス (unsettled: 入金待ち, settled: 入金済み) */ + payment_status?: '' | 'unsettled' | 'settled' | undefined; + /** 入金日 */ + payment_date?: string | null | undefined; + /** Web共有日時(最新) */ + web_published_at?: string | null | undefined; + /** Web共有ダウンロード日時(最新) */ + web_downloaded_at?: string | null | undefined; + /** Web共有取引先確認日時(最新) */ + web_confirmed_at?: string | null | undefined; + /** メール送信日時(最新) */ + mail_sent_at?: string | null | undefined; + /** 郵送ステータス(unrequested: リクエスト前, preview_registered: プレビュー登録, preview_failed: プレビュー登録失敗, ordered: 注文中, order_failed: 注文失敗, printing: 印刷中, canceled: キャンセル, posted: 投函済み) */ + posting_status: '' | 'unrequested' | 'preview_registered' | 'preview_failed' | 'ordered' | 'order_failed' | 'printing' | 'canceled' | 'posted'; + /** 取引先名 */ + partner_name?: string | null | undefined; + /** 取引先正式名称 */ + partner_long_name?: string | null | undefined; + /** 敬称(御中、様、(空白)の3つから選択) */ + partner_title?: string | null | undefined; + /** 郵便番号 */ + partner_zipcode?: string | null | undefined; + /** 都道府県コード(0:北海道、1:青森、2:岩手、3:宮城、4:秋田、5:山形、6:福島、7:茨城、8:栃木、9:群馬、10:埼玉、11:千葉、12:東京、13:神奈川、14:新潟、15:富山、16:石川、17:福井、18:山梨、19:長野、20:岐阜、21:静岡、22:愛知、23:三重、24:滋賀、25:京都、26:大阪、27:兵庫、28:奈良、29:和歌山、30:鳥取、31:島根、32:岡山、33:広島、34:山口、35:徳島、36:香川、37:愛媛、38:高知、39:福岡、40:佐賀、41:長崎、42:熊本、43:大分、44:宮崎、45:鹿児島、46:沖縄 */ + partner_prefecture_code?: number | null | undefined; + /** 都道府県 */ + partner_prefecture_name?: string | null | undefined; + /** 市区町村・番地 */ + partner_address1?: string | null | undefined; + /** 建物名・部屋番号など */ + partner_address2?: string | null | undefined; + /** 取引先担当者名 */ + partner_contact_info?: string | null | undefined; + /** 事業所名 */ + company_name: string; + /** 郵便番号 */ + company_zipcode?: string | null | undefined; + /** 都道府県コード(0:北海道、1:青森、2:岩手、3:宮城、4:秋田、5:山形、6:福島、7:茨城、8:栃木、9:群馬、10:埼玉、11:千葉、12:東京、13:神奈川、14:新潟、15:富山、16:石川、17:福井、18:山梨、19:長野、20:岐阜、21:静岡、22:愛知、23:三重、24:滋賀、25:京都、26:大阪、27:兵庫、28:奈良、29:和歌山、30:鳥取、31:島根、32:岡山、33:広島、34:山口、35:徳島、36:香川、37:愛媛、38:高知、39:福岡、40:佐賀、41:長崎、42:熊本、43:大分、44:宮崎、45:鹿児島、46:沖縄 */ + company_prefecture_code?: number | null | undefined; + /** 都道府県 */ + company_prefecture_name?: string | null | undefined; + /** 市区町村・番地 */ + company_address1?: string | null | undefined; + /** 建物名・部屋番号など */ + company_address2?: string | null | undefined; + /** 事業所担当者名 */ + company_contact_info?: string | null | undefined; + /** 支払方法 (振込: transfer, 引き落とし: direct_debit) */ + payment_type: '' | 'transfer' | 'direct_debit'; + /** 支払口座 */ + payment_bank_info?: string | null | undefined; + /** メッセージ */ + message?: string | null | undefined; + /** 備考 */ + notes?: string | null | undefined; + /** レイアウト(default_classic: レイアウト1/クラシック, standard_classic: レイアウト2/クラシック, envelope_classic: 封筒1/クラシック, carried_forward_standard_classic: レイアウト3(繰越金額欄あり)/クラシック, carried_forward_envelope_classic: 封筒2(繰越金額欄あり)/クラシック, default_modern: レイアウト1/モダン, standard_modern: レイアウト2/モダン, envelope_modern: 封筒/モダン) */ + invoice_layout: 'default_classic' | 'standard_classic' | 'envelope_classic' | 'carried_forward_standard_classic' | 'carried_forward_envelope_classic' | 'default_modern' | 'standard_modern' | 'envelope_modern'; + /** 請求書の消費税計算方法(inclusive: 内税, exclusive: 外税) */ + tax_entry_method: '' | 'inclusive' | 'exclusive'; + /** 取引ID (invoice_statusがissuedの時のみIDが表示されます) */ + deal_id?: number | null | undefined; + /** 請求内容 */ + invoice_contents?: { + /** 請求内容ID */ + id: number; + /** 順序 */ + order: number; + /** 行の種類 */ + type: 'normal' | 'discount' | 'text'; + /** 数量 */ + qty: number; + /** 単位 */ + unit: string | null; + /** 単価 */ + unit_price: number; + /** 金額 */ + amount: number; + /** 消費税額 */ + vat: number; + /** 軽減税率税区分(true: 対象、false: 対象外) */ + reduced_vat: boolean; + /** 備考 */ + description: string | null; + /** 勘定科目ID */ + account_item_id: number | null; + /** 勘定科目名 */ + account_item_name: string | null; + /** 税区分コード */ + tax_code: number | null; + /** 品目ID */ + item_id: number | null; + /** 品目 */ + item_name: string | null; + /** 部門ID */ + section_id: number | null; + /** 部門 */ + section_name: string | null; + tag_ids: number[]; + tag_names: string[]; + /** セグメント1ID */ + segment_1_tag_id?: number | null | undefined; + /** セグメント1ID */ + segment_1_tag_name?: string | null | undefined; + /** セグメント2ID */ + segment_2_tag_id?: number | null | undefined; + /** セグメント2 */ + segment_2_tag_name?: string | null | undefined; + /** セグメント3ID */ + segment_3_tag_id?: number | null | undefined; + /** セグメント3 */ + segment_3_tag_name?: string | null | undefined; + }[] | undefined; + + total_amount_per_vat_rate: { + /** 税率5%の税込み金額合計 */ + vat_5: number; + /** 税率8%の税込み金額合計 */ + vat_8: number; + /** 軽減税率8%の税込み金額合計 */ + reduced_vat_8: number; + /** 税率10%の税込み金額合計 */ + vat_10: number; + }; + }; +} + +export type InvoiceCreateParams = { + /** 事業所ID */ + company_id: number; + /** 請求日 (yyyy-mm-dd) */ + issue_date?: string | undefined; + /** 取引先ID */ + partner_id?: number | null | undefined; + /** 取引先コード */ + partner_code?: string | null | undefined; + /** 請求書番号 (デフォルト: 自動採番されます) */ + invoice_number?: string | undefined; + /** タイトル (デフォルト: 請求書) */ + title?: string | undefined; + /** 期日 (yyyy-mm-dd) */ + due_date?: string | undefined; + /** 売上計上日 */ + booking_date?: string | undefined; + /** 概要 */ + description?: string | undefined; + /** 請求書ステータス (draft: 下書き (デフォルト), issue: 発行(請求先ワークフローを利用している場合は指定できません)) */ + invoice_status?: 'draft' | 'issue' | undefined; + /** 請求書に表示する取引先名(未指定の場合は取引先の名称をそのまま利用します) */ + partner_name?: string | null | undefined; + /** 敬称(御中、様、(空白)の3つから選択) */ + partner_title?: string | null | undefined; + /** 取引先担当者名 */ + partner_contact_info?: string | null | undefined; + /** 取引先郵便番号 (デフォルトはpartner_idもしくははpartner_codeで指定された取引先設定情報が補完されます) */ + partner_zipcode?: string | null | undefined; + /** 取引先都道府県コード(0:北海道、1:青森、2:岩手、3:宮城、4:秋田、5:山形、6:福島、7:茨城、8:栃木、9:群馬、10:埼玉、11:千葉、12:東京、13:神奈川、14:新潟、15:富山、16:石川、17:福井、18:山梨、19:長野、20:岐阜、21:静岡、22:愛知、23:三重、24:滋賀、25:京都、26:大阪、27:兵庫、28:奈良、29:和歌山、30:鳥取、31:島根、32:岡山、33:広島、34:山口、35:徳島、36:香川、37:愛媛、38:高知、39:福岡、40:佐賀、41:長崎、42:熊本、43:大分、44:宮崎、45:鹿児島、46:沖縄) (デフォルトはpartner_idもしくははpartner_codeで指定された取引先設定情報が補完されます) */ + partner_prefecture_code?: number | null | undefined; + /** 取引先市区町村・番地 (デフォルトはpartner_idもしくははpartner_codeで指定された取引先設定情報が補完されます) */ + partner_address1?: string | null | undefined; + /** 取引先建物名・部屋番号など (デフォルトはpartner_idもしくははpartner_codeで指定された取引先設定情報が補完されます) */ + partner_address2?: string | null | undefined; + /** 事業所名 (デフォルトは事業所設定情報が補完されます) */ + company_name?: string | undefined; + /** 郵便番号 (デフォルトは事業所設定情報が補完されます) */ + company_zipcode?: string | undefined; + /** 都道府県コード(0:北海道、1:青森、2:岩手、3:宮城、4:秋田、5:山形、6:福島、7:茨城、8:栃木、9:群馬、10:埼玉、11:千葉、12:東京、13:神奈川、14:新潟、15:富山、16:石川、17:福井、18:山梨、19:長野、20:岐阜、21:静岡、22:愛知、23:三重、24:滋賀、25:京都、26:大阪、27:兵庫、28:奈良、29:和歌山、30:鳥取、31:島根、32:岡山、33:広島、34:山口、35:徳島、36:香川、37:愛媛、38:高知、39:福岡、40:佐賀、41:長崎、42:熊本、43:大分、44:宮崎、45:鹿児島、46:沖縄) (デフォルトは事業所設定情報が補完されます) */ + company_prefecture_code?: number | undefined; + /** 市区町村・番地 (デフォルトは事業所設定情報が補完されます) */ + company_address1?: string | undefined; + /** 建物名・部屋番号など (デフォルトは事業所設定情報が補完されます) */ + company_address2?: string | undefined; + /** 事業所担当者名 (デフォルトは事業所設定情報が補完されます) */ + company_contact_info?: string | undefined; + /** 支払方法 (振込: transfer, 引き落とし: direct_debit) */ + payment_type?: 'transfer' | 'direct_debit' | undefined; + /** 支払口座 */ + payment_bank_info?: string | undefined; + /** 振込専用口座の利用(利用しない: not_use(デフォルト), 利用する: use) */ + use_virtual_transfer_account?: 'not_use' | 'use' | undefined; + /** メッセージ (デフォルト: 下記の通りご請求申し上げます。) */ + message?: string | undefined; + /** 備考 */ + notes?: string | undefined; + /** レイアウト(default_classic: レイアウト1/クラシック (デフォルト), standard_classic: レイアウト2/クラシック, envelope_classic: 封筒1/クラシック, carried_forward_standard_classic: レイアウト3(繰越金額欄あり)/クラシック, carried_forward_envelope_classic: 封筒2(繰越金額欄あり)/クラシック, default_modern: レイアウト1/モダン, standard_modern: レイアウト2/モダン, envelope_modern: 封筒/モダン) */ + invoice_layout?: 'default_classic' | 'standard_classic' | 'envelope_classic' | 'carried_forward_standard_classic' | 'carried_forward_envelope_classic' | 'default_modern' | 'standard_modern' | 'envelope_modern' | undefined; + /** 請求書の消費税計算方法(inclusive: 内税表示, exclusive: 外税表示 (デフォルト)) */ + tax_entry_method?: 'inclusive' | 'exclusive' | undefined; + /** 請求内容 */ + invoice_contents?: { + /** 順序 */ + order: number; + /** 行の種類 */ + type: 'normal' | 'discount' | 'text'; + /** 数量 */ + qty?: number | undefined; + /** 単位 */ + unit?: string | undefined; + /** 単価 (tax_entry_method: inclusiveの場合は税込価格、tax_entry_method: exclusiveの場合は税抜価格となります) */ + unit_price?: number | undefined; + /** 消費税額 */ + vat?: number | null | undefined; + /** 備考 */ + description?: string | undefined; + /** 勘定科目ID */ + account_item_id?: number | undefined; + /** 税区分ID */ + tax_code?: number | undefined; + /** 品目ID */ + item_id?: number | undefined; + /** 部門ID */ + section_id?: number | undefined; + tag_ids?: number[] | undefined; + /** セグメント1ID */ + segment_1_tag_id?: number | undefined; + /** セグメント2ID */ + segment_2_tag_id?: number | undefined; + /** セグメント3ID */ + segment_3_tag_id?: number | undefined; + }[] | undefined; +} + +export type InvoiceUpdateParams = { + /** 事業所ID */ + company_id: number; + /** 請求日 (yyyy-mm-dd) */ + issue_date?: string | undefined; + /** 取引先ID */ + partner_id?: number | null | undefined; + /** 取引先コード */ + partner_code?: string | null | undefined; + /** 請求書番号 (デフォルト: 自動採番されます) */ + invoice_number?: string | undefined; + /** タイトル (デフォルト: 請求書) */ + title?: string | undefined; + /** 期日 (yyyy-mm-dd) */ + due_date?: string | undefined; + /** 売上計上日 */ + booking_date?: string | undefined; + /** 概要 */ + description?: string | undefined; + /** 請求書ステータス (draft: 下書き (デフォルト), issue: 発行(請求先ワークフローを利用している場合は承認済の請求書にのみ指定できます)) */ + invoice_status?: 'draft' | 'issue' | undefined; + /** 請求書に表示する取引先名(未指定の場合は取引先の名称をそのまま利用します) */ + partner_name?: string | null | undefined; + /** 敬称(御中、様、(空白)の3つから選択) */ + partner_title?: string | null | undefined; + /** 取引先担当者名 */ + partner_contact_info?: string | null | undefined; + /** 取引先郵便番号 (デフォルトはpartner_idもしくははpartner_codeで指定された取引先設定情報が補完されます) */ + partner_zipcode?: string | null | undefined; + /** 取引先都道府県コード(0:北海道、1:青森、2:岩手、3:宮城、4:秋田、5:山形、6:福島、7:茨城、8:栃木、9:群馬、10:埼玉、11:千葉、12:東京、13:神奈川、14:新潟、15:富山、16:石川、17:福井、18:山梨、19:長野、20:岐阜、21:静岡、22:愛知、23:三重、24:滋賀、25:京都、26:大阪、27:兵庫、28:奈良、29:和歌山、30:鳥取、31:島根、32:岡山、33:広島、34:山口、35:徳島、36:香川、37:愛媛、38:高知、39:福岡、40:佐賀、41:長崎、42:熊本、43:大分、44:宮崎、45:鹿児島、46:沖縄) (デフォルトはpartner_idもしくははpartner_codeで指定された取引先設定情報が補完されます) */ + partner_prefecture_code?: number | null | undefined; + /** 取引先市区町村・番地 (デフォルトはpartner_idもしくははpartner_codeで指定された取引先設定情報が補完されます) */ + partner_address1?: string | null | undefined; + /** 取引先建物名・部屋番号など (デフォルトはpartner_idもしくははpartner_codeで指定された取引先設定情報が補完されます) */ + partner_address2?: string | null | undefined; + /** 事業所名 (デフォルトは事業所設定情報が補完されます) */ + company_name?: string | undefined; + /** 郵便番号 (デフォルトは事業所設定情報が補完されます) */ + company_zipcode?: string | undefined; + /** 都道府県コード(0:北海道、1:青森、2:岩手、3:宮城、4:秋田、5:山形、6:福島、7:茨城、8:栃木、9:群馬、10:埼玉、11:千葉、12:東京、13:神奈川、14:新潟、15:富山、16:石川、17:福井、18:山梨、19:長野、20:岐阜、21:静岡、22:愛知、23:三重、24:滋賀、25:京都、26:大阪、27:兵庫、28:奈良、29:和歌山、30:鳥取、31:島根、32:岡山、33:広島、34:山口、35:徳島、36:香川、37:愛媛、38:高知、39:福岡、40:佐賀、41:長崎、42:熊本、43:大分、44:宮崎、45:鹿児島、46:沖縄) (デフォルトは事業所設定情報が補完されます) */ + company_prefecture_code?: number | undefined; + /** 市区町村・番地 (デフォルトは事業所設定情報が補完されます) */ + company_address1?: string | undefined; + /** 建物名・部屋番号など (デフォルトは事業所設定情報が補完されます) */ + company_address2?: string | undefined; + /** 事業所担当者名 (デフォルトは事業所設定情報が補完されます) */ + company_contact_info?: string | undefined; + /** 支払方法 (振込: transfer, 引き落とし: direct_debit) */ + payment_type?: 'transfer' | 'direct_debit' | undefined; + /** 支払口座 */ + payment_bank_info?: string | undefined; + /** 振込専用口座の利用(利用しない: not_use(デフォルト), 利用する: use) */ + use_virtual_transfer_account?: 'not_use' | 'use' | undefined; + /** メッセージ (デフォルト: 下記の通りご請求申し上げます。) */ + message?: string | undefined; + /** 備考 */ + notes?: string | undefined; + /** レイアウト(default_classic: レイアウト1/クラシック (デフォルト), standard_classic: レイアウト2/クラシック, envelope_classic: 封筒1/クラシック, carried_forward_standard_classic: レイアウト3(繰越金額欄あり)/クラシック, carried_forward_envelope_classic: 封筒2(繰越金額欄あり)/クラシック, default_modern: レイアウト1/モダン, standard_modern: レイアウト2/モダン, envelope_modern: 封筒/モダン) */ + invoice_layout?: 'default_classic' | 'standard_classic' | 'envelope_classic' | 'carried_forward_standard_classic' | 'carried_forward_envelope_classic' | 'default_modern' | 'standard_modern' | 'envelope_modern' | undefined; + /** 請求書の消費税計算方法(inclusive: 内税表示, exclusive: 外税表示 (デフォルト)) */ + tax_entry_method?: 'inclusive' | 'exclusive' | undefined; + /** 請求内容 */ + invoice_contents?: { + /** 請求内容ID */ + id?: number | undefined; + /** 順序 */ + order: number; + /** 行の種類 */ + type: 'normal' | 'discount' | 'text'; + /** 数量 */ + qty?: number | undefined; + /** 単位 */ + unit?: string | undefined; + /** 単価 (tax_entry_method: inclusiveの場合は税込価格、tax_entry_method: exclusiveの場合は税抜価格となります) */ + unit_price?: number | undefined; + /** 消費税額 */ + vat?: number | null | undefined; + /** 備考 */ + description?: string | undefined; + /** 勘定科目ID */ + account_item_id?: number | undefined; + /** 税区分ID */ + tax_code?: number | undefined; + /** 品目ID */ + item_id?: number | undefined; + /** 部門ID */ + section_id?: number | undefined; + tag_ids?: number[] | undefined; + /** セグメント1ID */ + segment_1_tag_id?: number | undefined; + /** セグメント2ID */ + segment_2_tag_id?: number | undefined; + /** セグメント3ID */ + segment_3_tag_id?: number | undefined; + }[] | undefined; +} + +export type QuotationResponse = { + quotation: { + /** 見積書ID */ + id: number; + /** 事業所ID */ + company_id: number; + /** 見積日 (yyyy-mm-dd) */ + issue_date: string; + /** 取引先ID */ + partner_id: number | null; + /** 取引先コード */ + partner_code?: string | null | undefined; + /** 見積書番号 */ + quotation_number: string; + /** タイトル */ + title?: string | null | undefined; + /** 合計金額 */ + total_amount: number; + /** 消費税 */ + total_vat?: number | undefined; + /** 小計 */ + sub_total?: number | undefined; + /** 概要 */ + description?: string | null | undefined; + /** 見積書ステータス (unsubmitted: 送付待ち, submitted: 送付済み, all: 全て) */ + quotation_status: 'unsubmitted' | 'submitted' | 'all'; + /** Web共有日時(最新) */ + web_published_at?: string | null | undefined; + /** Web共有ダウンロード日時(最新) */ + web_downloaded_at?: string | null | undefined; + /** Web共有取引先確認日時(最新) */ + web_confirmed_at?: string | null | undefined; + /** メール送信日時(最新) */ + mail_sent_at?: string | null | undefined; + /** 取引先名 */ + partner_name?: string | null | undefined; + /** 取引先正式名称 */ + partner_display_name?: string | null | undefined; + /** 敬称(御中、様、(空白)の3つから選択) */ + partner_title: '御中' | '様' | '(空白)' | null; + /** 郵便番号 */ + partner_zipcode?: string | null | undefined; + /** 都道府県コード(0:北海道、1:青森、2:岩手、3:宮城、4:秋田、5:山形、6:福島、7:茨城、8:栃木、9:群馬、10:埼玉、11:千葉、12:東京、13:神奈川、14:新潟、15:富山、16:石川、17:福井、18:山梨、19:長野、20:岐阜、21:静岡、22:愛知、23:三重、24:滋賀、25:京都、26:大阪、27:兵庫、28:奈良、29:和歌山、30:鳥取、31:島根、32:岡山、33:広島、34:山口、35:徳島、36:香川、37:愛媛、38:高知、39:福岡、40:佐賀、41:長崎、42:熊本、43:大分、44:宮崎、45:鹿児島、46:沖縄 */ + partner_prefecture_code?: number | null | undefined; + /** 都道府県 */ + partner_prefecture_name?: string | null | undefined; + /** 市区町村・番地 */ + partner_address1?: string | null | undefined; + /** 建物名・部屋番号など */ + partner_address2?: string | null | undefined; + /** 取引先担当者名 */ + partner_contact_info?: string | null | undefined; + /** 事業所名 */ + company_name: string; + /** 郵便番号 */ + company_zipcode?: string | null | undefined; + /** 都道府県コード(0:北海道、1:青森、2:岩手、3:宮城、4:秋田、5:山形、6:福島、7:茨城、8:栃木、9:群馬、10:埼玉、11:千葉、12:東京、13:神奈川、14:新潟、15:富山、16:石川、17:福井、18:山梨、19:長野、20:岐阜、21:静岡、22:愛知、23:三重、24:滋賀、25:京都、26:大阪、27:兵庫、28:奈良、29:和歌山、30:鳥取、31:島根、32:岡山、33:広島、34:山口、35:徳島、36:香川、37:愛媛、38:高知、39:福岡、40:佐賀、41:長崎、42:熊本、43:大分、44:宮崎、45:鹿児島、46:沖縄 */ + company_prefecture_code?: number | null | undefined; + /** 都道府県 */ + company_prefecture_name?: string | null | undefined; + /** 市区町村・番地 */ + company_address1?: string | null | undefined; + /** 建物名・部屋番号など */ + company_address2?: string | null | undefined; + /** 事業所担当者名 */ + company_contact_info?: string | null | undefined; + /** メッセージ */ + message?: string | null | undefined; + /** 備考 */ + notes?: string | null | undefined; + /** レイアウト(default_classic: レイアウト1/クラシック, standard_classic: レイアウト2/クラシック, envelope_classic: 封筒1/クラシック, carried_forward_standard_classic: レイアウト3(繰越金額欄あり)/クラシック, carried_forward_envelope_classic: 封筒2(繰越金額欄あり)/クラシック, default_modern: レイアウト1/モダン, standard_modern: レイアウト2/モダン, envelope_modern: 封筒/モダン) */ + quotation_layout: 'default_classic' | 'standard_classic' | 'envelope_classic' | 'carried_forward_standard_classic' | 'carried_forward_envelope_classic' | 'default_modern' | 'standard_modern' | 'envelope_modern'; + /** 見積書の消費税計算方法(inclusive: 内税, exclusive: 外税) */ + tax_entry_method: '' | 'inclusive' | 'exclusive'; + /** 見積内容 */ + quotation_contents?: { + /** 見積内容ID */ + id: number; + /** 順序 */ + order: number; + /** 行の種類 */ + type: 'normal' | 'discount' | 'text'; + /** 数量 */ + qty: number; + /** 単位 */ + unit: string | null; + /** 単価 */ + unit_price: number; + /** 金額 */ + amount: number; + /** 消費税額 */ + vat: number; + /** 軽減税率税区分(true: 対象、false: 対象外) */ + reduced_vat: boolean; + /** 備考 */ + description: string | null; + /** 勘定科目ID */ + account_item_id: number | null; + /** 勘定科目名 */ + account_item_name: string | null; + /** 税区分コード */ + tax_code: number | null; + /** 品目ID */ + item_id: number | null; + /** 品目 */ + item_name: string | null; + /** 部門ID */ + section_id: number | null; + /** 部門 */ + section_name: string | null; + tag_ids: number[]; + tag_names: string[]; + /** セグメント1ID */ + segment_1_tag_id?: number | null | undefined; + /** セグメント1ID */ + segment_1_tag_name?: string | null | undefined; + /** セグメント2ID */ + segment_2_tag_id?: number | null | undefined; + /** セグメント2 */ + segment_2_tag_name?: string | null | undefined; + /** セグメント3ID */ + segment_3_tag_id?: number | null | undefined; + /** セグメント3 */ + segment_3_tag_name?: string | null | undefined; + }[] | undefined; + + total_amount_per_vat_rate: { + /** 税率5%の税込み金額合計 */ + vat_5: number; + /** 税率8%の税込み金額合計 */ + vat_8: number; + /** 軽減税率8%の税込み金額合計 */ + reduced_vat_8: number; + /** 税率10%の税込み金額合計 */ + vat_10: number; + }; + }; +} + +export type QuotationCreateParams = { + /** 事業所ID */ + company_id: number; + /** 見積日 (yyyy-mm-dd) */ + issue_date?: string | undefined; + /** 取引先ID */ + partner_id?: number | null | undefined; + /** 取引先コード */ + partner_code?: string | null | undefined; + /** 見積書番号 (デフォルト: 自動採番されます) */ + quotation_number?: string | undefined; + /** タイトル (デフォルト: 見積書) */ + title?: string | undefined; + /** 概要 */ + description?: string | undefined; + /** 見積書ステータス (unsubmitted: 送付待ち, submitted: 送付済み) */ + quotation_status?: 'unsubmitted' | 'submitted' | undefined; + /** 見積書に表示する取引先名 */ + partner_display_name: string; + /** 敬称(御中、様、(空白)の3つから選択) */ + partner_title: string; + /** 取引先担当者名 */ + partner_contact_info?: string | null | undefined; + /** 取引先郵便番号 (デフォルトはpartner_idもしくははpartner_codeで指定された取引先設定情報が補完されます) */ + partner_zipcode?: string | null | undefined; + /** 取引先都道府県コード(0:北海道、1:青森、2:岩手、3:宮城、4:秋田、5:山形、6:福島、7:茨城、8:栃木、9:群馬、10:埼玉、11:千葉、12:東京、13:神奈川、14:新潟、15:富山、16:石川、17:福井、18:山梨、19:長野、20:岐阜、21:静岡、22:愛知、23:三重、24:滋賀、25:京都、26:大阪、27:兵庫、28:奈良、29:和歌山、30:鳥取、31:島根、32:岡山、33:広島、34:山口、35:徳島、36:香川、37:愛媛、38:高知、39:福岡、40:佐賀、41:長崎、42:熊本、43:大分、44:宮崎、45:鹿児島、46:沖縄) (デフォルトはpartner_idもしくはpartner_codeで指定された取引先設定情報が補完されます) */ + partner_prefecture_code?: number | null | undefined; + /** 取引先市区町村・番地 (デフォルトはpartner_idもしくははpartner_codeで指定された取引先設定情報が補完されます) */ + partner_address1?: string | null | undefined; + /** 取引先建物名・部屋番号など (デフォルトはpartner_idもしくははpartner_codeで指定された取引先設定情報が補完されます) */ + partner_address2?: string | null | undefined; + /** 事業所名 (デフォルトは事業所設定情報が補完されます) */ + company_name?: string | undefined; + /** 郵便番号 (デフォルトは事業所設定情報が補完されます) */ + company_zipcode?: string | undefined; + /** 都道府県コード(0:北海道、1:青森、2:岩手、3:宮城、4:秋田、5:山形、6:福島、7:茨城、8:栃木、9:群馬、10:埼玉、11:千葉、12:東京、13:神奈川、14:新潟、15:富山、16:石川、17:福井、18:山梨、19:長野、20:岐阜、21:静岡、22:愛知、23:三重、24:滋賀、25:京都、26:大阪、27:兵庫、28:奈良、29:和歌山、30:鳥取、31:島根、32:岡山、33:広島、34:山口、35:徳島、36:香川、37:愛媛、38:高知、39:福岡、40:佐賀、41:長崎、42:熊本、43:大分、44:宮崎、45:鹿児島、46:沖縄) (デフォルトは事業所設定情報が補完されます) */ + company_prefecture_code?: number | undefined; + /** 市区町村・番地 (デフォルトは事業所設定情報が補完されます) */ + company_address1?: string | undefined; + /** 建物名・部屋番号など (デフォルトは事業所設定情報が補完されます) */ + company_address2?: string | undefined; + /** 事業所担当者名 (デフォルトは事業所設定情報が補完されます) */ + company_contact_info?: string | undefined; + /** メッセージ (デフォルト: 下記の通り御見積申し上げます。) */ + message?: string | undefined; + /** 備考 */ + notes?: string | undefined; + /** レイアウト(default_classic: レイアウト1/クラシック (デフォルト), standard_classic: レイアウト2/クラシック, envelope_classic: 封筒1/クラシック, default_modern: レイアウト1/モダン, standard_modern: レイアウト2/モダン, envelope_modern: 封筒/モダン) */ + quotation_layout?: 'default_classic' | 'standard_classic' | 'envelope_classic' | 'default_modern' | 'standard_modern' | 'envelope_modern' | undefined; + /** 見積書の消費税計算方法(inclusive: 内税表示, exclusive: 外税表示 (デフォルト)) */ + tax_entry_method?: 'inclusive' | 'exclusive' | undefined; + /** 見積内容 */ + quotation_contents?: { + /** 順序 */ + order: number; + /** 行の種類 */ + type: 'normal' | 'discount' | 'text'; + /** 数量 */ + qty?: number | undefined; + /** 単位 */ + unit?: string | undefined; + /** 単価 (tax_entry_method: inclusiveの場合は税込価格、tax_entry_method: exclusiveの場合は税抜価格となります) */ + unit_price?: number | undefined; + /** 消費税額 */ + vat?: number | null | undefined; + /** 備考 */ + description?: string | undefined; + /** 勘定科目ID */ + account_item_id?: number | undefined; + /** 税区分ID */ + tax_code?: number | undefined; + /** 品目ID */ + item_id?: number | undefined; + /** 部門ID */ + section_id?: number | undefined; + tag_ids?: number[] | undefined; + /** セグメント1ID */ + segment_1_tag_id?: number | undefined; + /** セグメント2ID */ + segment_2_tag_id?: number | undefined; + /** セグメント3ID */ + segment_3_tag_id?: number | undefined; + }[] | undefined; +} + +export type QuotationUpdateParams = { + /** 事業所ID */ + company_id: number; + /** 見積日 (yyyy-mm-dd) */ + issue_date?: string | undefined; + /** 取引先ID */ + partner_id?: number | null | undefined; + /** 取引先コード */ + partner_code?: string | null | undefined; + /** 見積書番号 (デフォルト: 自動採番されます) */ + quotation_number?: string | undefined; + /** タイトル (デフォルト: 見積書) */ + title?: string | undefined; + /** 概要 */ + description?: string | undefined; + /** 見積書ステータス (unsubmitted: 送付待ち, submitted: 送付済み) */ + quotation_status?: 'unsubmitted' | 'submitted' | undefined; + /** 見積書に表示する取引先名 */ + partner_display_name: string; + /** 敬称(御中、様、(空白)の3つから選択) */ + partner_title: string; + /** 取引先担当者名 */ + partner_contact_info?: string | null | undefined; + /** 取引先郵便番号 (デフォルトはpartner_idもしくははpartner_codeで指定された取引先設定情報が補完されます) */ + partner_zipcode?: string | null | undefined; + /** 取引先都道府県コード(0:北海道、1:青森、2:岩手、3:宮城、4:秋田、5:山形、6:福島、7:茨城、8:栃木、9:群馬、10:埼玉、11:千葉、12:東京、13:神奈川、14:新潟、15:富山、16:石川、17:福井、18:山梨、19:長野、20:岐阜、21:静岡、22:愛知、23:三重、24:滋賀、25:京都、26:大阪、27:兵庫、28:奈良、29:和歌山、30:鳥取、31:島根、32:岡山、33:広島、34:山口、35:徳島、36:香川、37:愛媛、38:高知、39:福岡、40:佐賀、41:長崎、42:熊本、43:大分、44:宮崎、45:鹿児島、46:沖縄) (デフォルトはpartner_idもしくはpartner_codeで指定された取引先設定情報が補完されます) */ + partner_prefecture_code?: number | null | undefined; + /** 取引先市区町村・番地 (デフォルトはpartner_idもしくははpartner_codeで指定された取引先設定情報が補完されます) */ + partner_address1?: string | null | undefined; + /** 取引先建物名・部屋番号など (デフォルトはpartner_idもしくははpartner_codeで指定された取引先設定情報が補完されます) */ + partner_address2?: string | null | undefined; + /** 事業所名 (デフォルトは事業所設定情報が補完されます) */ + company_name?: string | undefined; + /** 郵便番号 (デフォルトは事業所設定情報が補完されます) */ + company_zipcode?: string | undefined; + /** 都道府県コード(0:北海道、1:青森、2:岩手、3:宮城、4:秋田、5:山形、6:福島、7:茨城、8:栃木、9:群馬、10:埼玉、11:千葉、12:東京、13:神奈川、14:新潟、15:富山、16:石川、17:福井、18:山梨、19:長野、20:岐阜、21:静岡、22:愛知、23:三重、24:滋賀、25:京都、26:大阪、27:兵庫、28:奈良、29:和歌山、30:鳥取、31:島根、32:岡山、33:広島、34:山口、35:徳島、36:香川、37:愛媛、38:高知、39:福岡、40:佐賀、41:長崎、42:熊本、43:大分、44:宮崎、45:鹿児島、46:沖縄) (デフォルトは事業所設定情報が補完されます) */ + company_prefecture_code?: number | undefined; + /** 市区町村・番地 (デフォルトは事業所設定情報が補完されます) */ + company_address1?: string | undefined; + /** 建物名・部屋番号など (デフォルトは事業所設定情報が補完されます) */ + company_address2?: string | undefined; + /** 事業所担当者名 (デフォルトは事業所設定情報が補完されます) */ + company_contact_info?: string | undefined; + /** メッセージ (デフォルト: 下記の通り御見積申し上げます。) */ + message?: string | undefined; + /** 備考 */ + notes?: string | undefined; + /** レイアウト(default_classic: レイアウト1/クラシック (デフォルト), standard_classic: レイアウト2/クラシック, envelope_classic: 封筒1/クラシック, default_modern: レイアウト1/モダン, standard_modern: レイアウト2/モダン, envelope_modern: 封筒/モダン) */ + quotation_layout?: 'default_classic' | 'standard_classic' | 'envelope_classic' | 'default_modern' | 'standard_modern' | 'envelope_modern' | undefined; + /** 見積書の消費税計算方法(inclusive: 内税表示, exclusive: 外税表示 (デフォルト)) */ + tax_entry_method?: 'inclusive' | 'exclusive' | undefined; + /** 見積内容 */ + quotation_contents?: { + /** 見積内容ID */ + id?: number | undefined; + /** 順序 */ + order: number; + /** 行の種類 */ + type: 'normal' | 'discount' | 'text'; + /** 数量 */ + qty?: number | undefined; + /** 単位 */ + unit?: string | undefined; + /** 単価 (tax_entry_method: inclusiveの場合は税込価格、tax_entry_method: exclusiveの場合は税抜価格となります) */ + unit_price?: number | undefined; + /** 消費税額 */ + vat?: number | null | undefined; + /** 備考 */ + description?: string | undefined; + /** 勘定科目ID */ + account_item_id?: number | undefined; + /** 税区分ID */ + tax_code?: number | undefined; + /** 品目ID */ + item_id?: number | undefined; + /** 部門ID */ + section_id?: number | undefined; + tag_ids?: number[] | undefined; + /** セグメント1ID */ + segment_1_tag_id?: number | undefined; + /** セグメント2ID */ + segment_2_tag_id?: number | undefined; + /** セグメント3ID */ + segment_3_tag_id?: number | undefined; + }[] | undefined; +} + +export type CompaniesPlanResponse = { + /** 事業所ID */ + id: number; + /** 会計プラン 個人用(non_charged: 無料プラン、starter: スターター、standard: スタンダード、premium: プレミアム) 法人用(non_charged: 無料プラン、minimum: ミニマム、basic: ベーシック、professional: プロフェッショナル、enterprise: エンタープライズ) */ + plan: 'non_charged' | 'starter' | 'standard' | 'premium' | 'minimum' | 'basic' | 'professional' | 'enterprise'; + /** 事業形態(個人事業主: personal、法人: corporate) */ + org_code: 'personal' | 'corporate'; +} diff --git a/samples/freee/api/1/account_items/_id@number/index.ts b/samples/freee/api/1/account_items/_id@number/index.ts new file mode 100644 index 0000000..28500dc --- /dev/null +++ b/samples/freee/api/1/account_items/_id@number/index.ts @@ -0,0 +1,51 @@ +/* eslint-disable */ +import type { DefineMethods } from 'aspida'; +import type * as Types from '../../../../@types'; + +export type Methods = DefineMethods<{ + /** + *

概要

+ * + *

指定した勘定科目の詳細を取得する

+ */ + get: { + query: { + /** 事業所ID */ + company_id: number; + }; + + status: 200; + resBody: Types.AccountItemResponse; + }; + + /** + *

概要

+ * + *

勘定科目を更新する

+ */ + put: { + status: 200; + resBody: Types.AccountItemResponse; + reqFormat: URLSearchParams; + /** 勘定科目の更新 */ + reqBody: Types.AccountItemParams; + }; + + /** + *

概要

+ * + *

指定した勘定科目を削除する

+ *

注意点

+ * + */ + delete: { + query: { + /** 事業所ID */ + company_id: number; + }; + + status: 204; + }; +}>; diff --git a/samples/freee/api/1/account_items/index.ts b/samples/freee/api/1/account_items/index.ts new file mode 100644 index 0000000..8f28611 --- /dev/null +++ b/samples/freee/api/1/account_items/index.ts @@ -0,0 +1,43 @@ +/* eslint-disable */ +import type { DefineMethods } from 'aspida'; +import type * as Types from '../../../@types'; + +export type Methods = DefineMethods<{ + /** + *

概要

+ * + *

指定した事業所の勘定科目一覧を取得する

+ * + *

定義

+ * + * + */ + get: { + query: { + /** 事業所ID */ + company_id: number; + /** 基準日:指定した場合、勘定科目に紐づく税区分(default_tax_code)が、基準日の税率に基づいて返ります。 */ + base_date?: string | undefined; + }; + + status: 200; + resBody: Types.AccountItemsResponse; + }; + + /** + *

概要

+ * + *

指定した事業所の勘定科目を作成する

+ */ + post: { + status: 201; + resBody: Types.AccountItemResponse; + reqFormat: URLSearchParams; + /** 勘定科目の作成 */ + reqBody: Types.AccountItemParams; + }; +}>; diff --git a/samples/freee/api/1/banks/_id@number/index.ts b/samples/freee/api/1/banks/_id@number/index.ts new file mode 100644 index 0000000..668ef12 --- /dev/null +++ b/samples/freee/api/1/banks/_id@number/index.ts @@ -0,0 +1,29 @@ +/* eslint-disable */ +import type { DefineMethods } from 'aspida'; +import type * as Types from '../../../../@types'; + +export type Methods = DefineMethods<{ + /** + *

概要

+ * + *

連携しているサービスを取得する

+ * + *

定義

+ * + * + */ + get: { + status: 200; + resBody: Types.BankResponse; + }; +}>; diff --git a/samples/freee/api/1/banks/index.ts b/samples/freee/api/1/banks/index.ts new file mode 100644 index 0000000..6261efc --- /dev/null +++ b/samples/freee/api/1/banks/index.ts @@ -0,0 +1,41 @@ +/* eslint-disable */ +import type { DefineMethods } from 'aspida'; +import type * as Types from '../../../@types'; + +export type Methods = DefineMethods<{ + /** + *

概要

+ * + *

連携しているサービス一覧を取得する

+ * + *

定義

+ * + * + */ + get: { + query?: { + /** 取得レコードのオフセット (デフォルト: 0) */ + offset?: number | undefined; + /** 取得レコードの件数 (デフォルト: 20, 最小: 1, 最大: 500) */ + limit?: number | undefined; + /** サービス種別 */ + type?: 'bank' | 'credit_card' | 'wallet' | undefined; + } | undefined; + + status: 200; + + resBody: { + banks: Types.BankResponse['bank'][]; + }; + }; +}>; diff --git a/samples/freee/api/1/companies/_id@number/index.ts b/samples/freee/api/1/companies/_id@number/index.ts new file mode 100644 index 0000000..13ea5b1 --- /dev/null +++ b/samples/freee/api/1/companies/_id@number/index.ts @@ -0,0 +1,66 @@ +/* eslint-disable */ +import type { DefineMethods } from 'aspida'; +import type * as Types from '../../../../@types'; + +export type Methods = DefineMethods<{ + /** + *

概要

+ * + *

ユーザが所属する事業所の詳細を取得する

+ * + *

定義

+ * + * + * + *

+ */ + get: { + query?: { + /** 取得情報に勘定科目・税区分コード・税区分・品目・取引先・部門・メモタグ・口座の一覧を含める */ + details?: true | undefined; + /** 取得情報に勘定科目一覧を含める */ + account_items?: true | undefined; + /** 取得情報に税区分コード・税区分一覧を含める */ + taxes?: true | undefined; + /** 取得情報に品目一覧を含める */ + items?: true | undefined; + /** 取得情報に取引先一覧を含める */ + partners?: true | undefined; + /** 取得情報に部門一覧を含める */ + sections?: true | undefined; + /** 取得情報にメモタグ一覧を含める */ + tags?: true | undefined; + /** 取得情報に口座一覧を含める */ + walletables?: true | undefined; + } | undefined; + + status: 200; + resBody: Types.CompanyResponse; + }; + + /** + *

概要

+ * + *

ユーザが所属する事業所の情報を更新する

+ * + *

※同時に複数のリクエストを受け付けない

+ */ + put: { + status: 200; + resBody: Types.CompanyUpdateResponse; + reqFormat: URLSearchParams; + reqBody?: Types.CompanyParams | undefined; + }; +}>; diff --git a/samples/freee/api/1/companies/index.ts b/samples/freee/api/1/companies/index.ts new file mode 100644 index 0000000..ef79434 --- /dev/null +++ b/samples/freee/api/1/companies/index.ts @@ -0,0 +1,31 @@ +/* eslint-disable */ +import type { DefineMethods } from 'aspida'; +import type * as Types from '../../../@types'; + +export type Methods = DefineMethods<{ + /** + *

概要

+ * + *

ユーザが所属する事業所の一覧を取得する

+ * + *

定義

+ * + * + */ + get: { + status: 200; + resBody: Types.CompanyIndexResponse; + }; +}>; diff --git a/samples/freee/api/1/deals/_id@number/index.ts b/samples/freee/api/1/deals/_id@number/index.ts new file mode 100644 index 0000000..e3b3429 --- /dev/null +++ b/samples/freee/api/1/deals/_id@number/index.ts @@ -0,0 +1,148 @@ +/* eslint-disable */ +import type { DefineMethods } from 'aspida'; +import type * as Types from '../../../../@types'; + +export type Methods = DefineMethods<{ + /** + *

概要

+ *

指定した事業所の取引(収入/支出)を取得する

+ *

定義

+ * + *

注意点

+ * + */ + get: { + query: { + /** 事業所ID */ + company_id: number; + /** 取引の債権債務行の表示(without: 表示しない(デフォルト), with: 表示する) */ + accruals?: 'without' | 'with' | undefined; + }; + + status: 200; + resBody: Types.DealResponse; + }; + + /** + *

概要

+ *

指定した事業所の取引(収入/支出)を更新する

+ *

定義

+ * + *

注意点

+ * + */ + put: { + status: 200; + resBody: Types.DealResponse; + reqFormat: URLSearchParams; + /** 取引(収入/支出)の更新 */ + reqBody?: Types.DealUpdateParams | undefined; + }; + + delete: { + query: { + /** 事業所ID */ + company_id: number; + }; + + status: 204; + }; +}>; diff --git a/samples/freee/api/1/deals/_id@number/payments/_payment_id@number/index.ts b/samples/freee/api/1/deals/_id@number/payments/_payment_id@number/index.ts new file mode 100644 index 0000000..7c794d9 --- /dev/null +++ b/samples/freee/api/1/deals/_id@number/payments/_payment_id@number/index.ts @@ -0,0 +1,95 @@ +/* eslint-disable */ +import type { DefineMethods } from 'aspida'; +import type * as Types from '../../../../../../@types'; + +export type Methods = DefineMethods<{ + /** + *

概要

+ *

指定した事業所の取引(収入/支出)の支払行を更新する

+ *

定義

+ * + */ + put: { + status: 200; + resBody: Types.DealResponse; + reqFormat: URLSearchParams; + /** 取引(収入/支出)の支払行更新 */ + reqBody: Types.PaymentParams; + }; + + /** + *

概要

+ *

指定した事業所の取引(収入/支出)の支払行を削除する

+ *

定義

+ * + */ + delete: { + query: { + /** 事業所ID */ + company_id: number; + }; + + status: 204; + }; +}>; diff --git a/samples/freee/api/1/deals/_id@number/payments/index.ts b/samples/freee/api/1/deals/_id@number/payments/index.ts new file mode 100644 index 0000000..f1c7345 --- /dev/null +++ b/samples/freee/api/1/deals/_id@number/payments/index.ts @@ -0,0 +1,51 @@ +/* eslint-disable */ +import type { DefineMethods } from 'aspida'; +import type * as Types from '../../../../../@types'; + +export type Methods = DefineMethods<{ + /** + *

概要

+ *

指定した事業所の取引(収入/支出)の支払行を作成する

+ *

定義

+ * + */ + post: { + status: 201; + resBody: Types.DealResponse; + reqFormat: URLSearchParams; + /** 取引(収入/支出)の支払行作成 */ + reqBody: Types.PaymentParams; + }; +}>; diff --git a/samples/freee/api/1/deals/_id@number/renews/_renew_id@number/index.ts b/samples/freee/api/1/deals/_id@number/renews/_renew_id@number/index.ts new file mode 100644 index 0000000..f76cf6e --- /dev/null +++ b/samples/freee/api/1/deals/_id@number/renews/_renew_id@number/index.ts @@ -0,0 +1,56 @@ +/* eslint-disable */ +import type { DefineMethods } from 'aspida'; +import type * as Types from '../../../../../../@types'; + +export type Methods = DefineMethods<{ + /** + *

概要

+ *

指定した事業所の取引(収入/支出)の+更新を更新する

+ *

定義

+ * + *

注意点

+ * + */ + put: { + status: 200; + resBody: Types.DealResponse; + reqFormat: URLSearchParams; + /** +更新の更新情報 */ + reqBody: Types.RenewUpdateParams; + }; + + /** + *

概要

+ *

指定した事業所の取引(収入/支出)の+更新を削除する

+ *

注意点

+ * + */ + delete: { + query: { + /** 事業所ID */ + company_id: number; + }; + + status: 200; + resBody: Types.DealResponse; + }; +}>; diff --git a/samples/freee/api/1/deals/_id@number/renews/index.ts b/samples/freee/api/1/deals/_id@number/renews/index.ts new file mode 100644 index 0000000..0891606 --- /dev/null +++ b/samples/freee/api/1/deals/_id@number/renews/index.ts @@ -0,0 +1,38 @@ +/* eslint-disable */ +import type { DefineMethods } from 'aspida'; +import type * as Types from '../../../../../@types'; + +export type Methods = DefineMethods<{ + /** + *

概要

+ *

指定した事業所の取引(収入/支出)の+更新を作成する

+ *

定義

+ * + *

注意点

+ * + */ + post: { + status: 201; + resBody: Types.DealResponse; + reqFormat: URLSearchParams; + /** 取引(収入/支出)に対する+更新の情報 */ + reqBody: Types.RenewCreateParams; + }; +}>; diff --git a/samples/freee/api/1/deals/index.ts b/samples/freee/api/1/deals/index.ts new file mode 100644 index 0000000..31d989c --- /dev/null +++ b/samples/freee/api/1/deals/index.ts @@ -0,0 +1,181 @@ +/* eslint-disable */ +import type { DefineMethods } from 'aspida'; +import type * as Types from '../../../@types'; + +export type Methods = DefineMethods<{ + /** + *

概要

+ *

指定した事業所の取引一覧(収入/支出)を取得する

+ *

定義

+ * + *

注意点

+ * + */ + get: { + query: { + /** 事業所ID */ + company_id: number; + /** 取引先IDで絞込 */ + partner_id?: number | undefined; + /** 勘定科目IDで絞込 */ + account_item_id?: number | undefined; + /** 取引先コードで絞込 */ + partner_code?: string | undefined; + /** 決済状況で絞込 (未決済: unsettled, 完了: settled) */ + status?: 'unsettled' | 'settled' | undefined; + /** 収支区分 (収入: income, 支出: expense) */ + type?: 'income' | 'expense' | undefined; + /** 発生日で絞込:開始日(yyyy-mm-dd) */ + start_issue_date?: string | undefined; + /** 発生日で絞込:終了日(yyyy-mm-dd) */ + end_issue_date?: string | undefined; + /** 支払期日で絞込:開始日(yyyy-mm-dd) */ + start_due_date?: string | undefined; + /** 支払期日で絞込:終了日(yyyy-mm-dd) */ + end_due_date?: string | undefined; + /** +更新日で絞込:開始日(yyyy-mm-dd) */ + start_renew_date?: string | undefined; + /** +更新日で絞込:終了日(yyyy-mm-dd) */ + end_renew_date?: string | undefined; + /** 取得レコードのオフセット (デフォルト: 0) */ + offset?: number | undefined; + /** 取得レコードの件数 (デフォルト: 20, 最大: 100) */ + limit?: number | undefined; + /** 取引登録元アプリで絞込(me: 本APIを叩くアプリ自身から登録した取引のみ) */ + registered_from?: 'me' | undefined; + /** 取引の債権債務行の表示(without: 表示しない(デフォルト), with: 表示する) */ + accruals?: 'without' | 'with' | undefined; + }; + + status: 200; + + resBody: { + deals: Types.DealResponse['deal'][]; + + meta: { + /** 検索条件に合致する取引の総数 */ + total_count: number; + }; + }; + }; + + /** + *

概要

+ *

指定した事業所の取引(収入/支出)を作成する

+ *

定義

+ * + *

注意点

+ * + */ + post: { + status: 201; + resBody: Types.DealCreateResponse; + reqFormat: URLSearchParams; + /** 取引(収入/支出)の作成 */ + reqBody?: Types.DealCreateParams | undefined; + }; +}>; diff --git a/samples/freee/api/1/expense_application_line_templates/_id@number/index.ts b/samples/freee/api/1/expense_application_line_templates/_id@number/index.ts new file mode 100644 index 0000000..81cf7e0 --- /dev/null +++ b/samples/freee/api/1/expense_application_line_templates/_id@number/index.ts @@ -0,0 +1,32 @@ +/* eslint-disable */ +import type { DefineMethods } from 'aspida'; +import type * as Types from '../../../../@types'; + +export type Methods = DefineMethods<{ + get: { + query: { + /** 事業所ID */ + company_id: number; + }; + + status: 200; + resBody: Types.ExpenseApplicationLineTemplateResponse; + }; + + put: { + status: 200; + resBody: Types.ExpenseApplicationLineTemplateResponse; + reqFormat: URLSearchParams; + /** 経費科目の更新 */ + reqBody: Types.ExpenseApplicationLineTemplateParams; + }; + + delete: { + query: { + /** 事業所ID */ + company_id: number; + }; + + status: 204; + }; +}>; diff --git a/samples/freee/api/1/expense_application_line_templates/index.ts b/samples/freee/api/1/expense_application_line_templates/index.ts new file mode 100644 index 0000000..568ff0a --- /dev/null +++ b/samples/freee/api/1/expense_application_line_templates/index.ts @@ -0,0 +1,35 @@ +/* eslint-disable */ +import type { DefineMethods } from 'aspida'; +import type * as Types from '../../../@types'; + +export type Methods = DefineMethods<{ + /** + *

概要

+ * + *

指定した事業所の経費科目一覧を取得する

+ */ + get: { + query: { + /** 事業所ID */ + company_id: number; + /** 取得レコードのオフセット (デフォルト: 0) */ + offset?: number | undefined; + /** 取得レコードの件数 (デフォルト: 20, 最小: 1, 最大: 100) */ + limit?: number | undefined; + }; + + status: 200; + + resBody: { + expense_application_line_templates: Types.ExpenseApplicationLineTemplateResponse['expense_application_line_template'][]; + }; + }; + + post: { + status: 201; + resBody: Types.ExpenseApplicationLineTemplateResponse; + reqFormat: URLSearchParams; + /** 経費科目の作成 */ + reqBody: Types.ExpenseApplicationLineTemplateParams; + }; +}>; diff --git a/samples/freee/api/1/expense_applications/_id@number/index.ts b/samples/freee/api/1/expense_applications/_id@number/index.ts new file mode 100644 index 0000000..b5e2d9f --- /dev/null +++ b/samples/freee/api/1/expense_applications/_id@number/index.ts @@ -0,0 +1,57 @@ +/* eslint-disable */ +import type { DefineMethods } from 'aspida'; +import type * as Types from '../../../../@types'; + +export type Methods = DefineMethods<{ + get: { + query: { + /** 事業所ID */ + company_id: number; + }; + + status: 200; + resBody: Types.ExpenseApplicationResponse; + }; + + /** + *

概要

+ * + *

指定した事業所の経費申請を更新する

+ * + *

注意点

+ * + */ + put: { + status: 200; + resBody: Types.ExpenseApplicationResponse; + reqFormat: URLSearchParams; + /** 経費申請の更新 */ + reqBody?: Types.ExpenseApplicationUpdateParams | undefined; + }; + + /** + *

概要

+ * + *

指定した事業所の経費申請を削除する

+ * + *

注意点

+ * + */ + delete: { + query: { + /** 事業所ID */ + company_id: number; + }; + + status: 204; + }; +}>; diff --git a/samples/freee/api/1/expense_applications/index.ts b/samples/freee/api/1/expense_applications/index.ts new file mode 100644 index 0000000..a21b54f --- /dev/null +++ b/samples/freee/api/1/expense_applications/index.ts @@ -0,0 +1,44 @@ +/* eslint-disable */ +import type { DefineMethods } from 'aspida'; +import type * as Types from '../../../@types'; + +export type Methods = DefineMethods<{ + get: { + query: { + /** 事業所ID */ + company_id: number; + /** 取得レコードのオフセット (デフォルト: 0) */ + offset?: number | undefined; + /** 取得レコードの件数 (デフォルト: 50, 最小: 1, 最大: 500) */ + limit?: number | undefined; + }; + + status: 200; + + resBody: { + expense_applications: Types.ExpenseApplicationResponse['expense_application'][]; + }; + }; + + /** + *

概要

+ * + *

指定した事業所の経費申請を作成する

+ * + *

注意点

+ * + */ + post: { + status: 201; + resBody: Types.ExpenseApplicationResponse; + reqFormat: URLSearchParams; + /** 経費申請の作成 */ + reqBody?: Types.ExpenseApplicationCreateParams | undefined; + }; +}>; diff --git a/samples/freee/api/1/forms/selectables/index.ts b/samples/freee/api/1/forms/selectables/index.ts new file mode 100644 index 0000000..3253636 --- /dev/null +++ b/samples/freee/api/1/forms/selectables/index.ts @@ -0,0 +1,22 @@ +/* eslint-disable */ +import type { DefineMethods } from 'aspida'; +import type * as Types from '../../../../@types'; + +export type Methods = DefineMethods<{ + /** + *

概要

+ * + *

指定した事業所のフォーム用選択項目情報を取得する

+ */ + get: { + query: { + /** 事業所ID */ + company_id: number; + /** 取得する項目(項目: account_item) */ + includes?: 'account_item' | undefined; + }; + + status: 200; + resBody: Types.SelectablesIndexResponse; + }; +}>; diff --git a/samples/freee/api/1/invoices/_id@number/index.ts b/samples/freee/api/1/invoices/_id@number/index.ts new file mode 100644 index 0000000..7978ace --- /dev/null +++ b/samples/freee/api/1/invoices/_id@number/index.ts @@ -0,0 +1,57 @@ +/* eslint-disable */ +import type { DefineMethods } from 'aspida'; +import type * as Types from '../../../../@types'; + +export type Methods = DefineMethods<{ + /** + *

概要

+ * + *

指定した事業所の請求書詳細を取得する

+ */ + get: { + query: { + /** 事業所ID */ + company_id: number; + }; + + status: 200; + resBody: Types.InvoiceResponse; + }; + + /** + *

概要

+ * + *

指定した事業所の請求書を更新する

+ * + *

注意点

+ * + */ + put: { + status: 200; + resBody: Types.InvoiceResponse; + reqFormat: URLSearchParams; + /** 請求書の更新 */ + reqBody?: Types.InvoiceUpdateParams | undefined; + }; + + /** + *

概要

+ * + *

指定した事業所の請求書を削除する

+ */ + delete: { + query: { + /** 事業所ID */ + company_id: number; + }; + + status: 204; + }; +}>; diff --git a/samples/freee/api/1/invoices/index.ts b/samples/freee/api/1/invoices/index.ts new file mode 100644 index 0000000..5c35207 --- /dev/null +++ b/samples/freee/api/1/invoices/index.ts @@ -0,0 +1,67 @@ +/* eslint-disable */ +import type { DefineMethods } from 'aspida'; +import type * as Types from '../../../@types'; + +export type Methods = DefineMethods<{ + /** + *

概要

+ * + *

指定した事業所の請求書一覧を取得する

+ */ + get: { + query: { + /** 事業所ID */ + company_id: number; + /** 取引先IDで絞込 */ + partner_id?: number | undefined; + /** 取引先コードで絞込 */ + partner_code?: string | undefined; + /** 請求日の開始日(yyyy-mm-dd) */ + issue_date_start?: string | undefined; + /** 請求日の終了日(yyyy-mm-dd) */ + issue_date_end?: string | undefined; + /** 期日の開始日(yyyy-mm-dd) */ + due_date_start?: string | undefined; + /** 期日の終了日(yyyy-mm-dd) */ + due_date_end?: string | undefined; + /** 請求書番号 */ + invoice_number?: string | undefined; + /** 概要 */ + description?: string | undefined; + /** 請求書ステータス (draft: 下書き, applying: 申請中, remanded: 差し戻し, rejected: 却下, approved: 承認済み, issued: 発行済み, unsubmitted: 送付待ち) */ + invoice_status?: 'draft' | 'applying' | 'remanded' | 'rejected' | 'approved' | 'issued' | 'unsubmitted' | undefined; + /** 入金ステータス (unsettled: 入金待ち, settled: 入金済み) */ + payment_status?: 'unsettled' | 'settled' | undefined; + /** 取得レコードのオフセット (デフォルト: 0) */ + offset?: number | undefined; + /** 取得レコードの件数 (デフォルト: 20, 最大: 100) */ + limit?: number | undefined; + }; + + status: 200; + + resBody: { + invoices: Types.InvoiceResponse['invoice'][]; + }; + }; + + /** + *

概要

+ * + *

指定した事業所の請求書を作成する

+ * + *

注意点

+ * + */ + post: { + status: 201; + resBody: Types.InvoiceResponse; + reqFormat: URLSearchParams; + /** 請求書の作成 */ + reqBody?: Types.InvoiceCreateParams | undefined; + }; +}>; diff --git a/samples/freee/api/1/items/_id@number/index.ts b/samples/freee/api/1/items/_id@number/index.ts new file mode 100644 index 0000000..d08561b --- /dev/null +++ b/samples/freee/api/1/items/_id@number/index.ts @@ -0,0 +1,47 @@ +/* eslint-disable */ +import type { DefineMethods } from 'aspida'; +import type * as Types from '../../../../@types'; + +export type Methods = DefineMethods<{ + /** + *

概要

+ * + *

指定した事業所の品目を取得する

+ */ + get: { + query: { + /** 事業所ID */ + company_id: number; + }; + + status: 200; + resBody: Types.ItemResponse; + }; + + /** + *

概要

+ * + *

指定した事業所の品目を更新する

+ */ + put: { + status: 200; + resBody: Types.ItemResponse; + reqFormat: URLSearchParams; + /** 品目の更新 */ + reqBody?: Types.ItemParams | undefined; + }; + + /** + *

概要

+ * + *

指定した事業所の品目を削除する

+ */ + delete: { + query: { + /** 事業所ID */ + company_id: number; + }; + + status: 204; + }; +}>; diff --git a/samples/freee/api/1/items/index.ts b/samples/freee/api/1/items/index.ts new file mode 100644 index 0000000..b906fd1 --- /dev/null +++ b/samples/freee/api/1/items/index.ts @@ -0,0 +1,36 @@ +/* eslint-disable */ +import type { DefineMethods } from 'aspida'; +import type * as Types from '../../../@types'; + +export type Methods = DefineMethods<{ + /** + *

概要

+ * + *

指定した事業所の品目一覧を取得する

+ */ + get: { + query: { + /** 事業所ID */ + company_id: number; + }; + + status: 200; + + resBody: { + items: Types.ItemResponse['item'][]; + }; + }; + + /** + *

概要

+ * + *

指定した事業所の品目を作成する

+ */ + post: { + status: 201; + resBody: Types.ItemResponse; + reqFormat: URLSearchParams; + /** 品目の作成 */ + reqBody?: Types.ItemParams | undefined; + }; +}>; diff --git a/samples/freee/api/1/journals/index.ts b/samples/freee/api/1/journals/index.ts new file mode 100644 index 0000000..945dd45 --- /dev/null +++ b/samples/freee/api/1/journals/index.ts @@ -0,0 +1,64 @@ +/* eslint-disable */ +import type { DefineMethods } from 'aspida'; +import type * as Types from '../../../@types'; + +export type Methods = DefineMethods<{ + /** + *

概要

+ * + *

ユーザが所属する事業所の仕訳帳のダウンロードをリクエストします 生成されるファイルに関しては、ヘルプページをご参照ください

+ * + *

*このAPIは無料プランのアカウントではご利用になれません

+ * + *

定義

+ * + * + */ + get: { + query: { + /** ダウンロード形式 */ + download_type: 'csv' | 'pdf' | 'yayoi' | 'generic'; + /** 事業所ID */ + company_id: number; + /** 補助科目やコメントとして出力する項目 */ + visible_tags?: ('partner' | 'item' | 'tag' | 'section' | 'description' | 'wallet_txn_description' | 'all')[] | undefined; + /** 取得開始日 (yyyy-mm-dd) */ + start_date?: string | undefined; + /** 取得終了日 (yyyy-mm-dd) */ + end_date?: string | undefined; + }; + + status: 202; + resBody: Types.JournalsResponse; + }; +}>; diff --git a/samples/freee/api/1/journals/reports/_id@number/download/index.ts b/samples/freee/api/1/journals/reports/_id@number/download/index.ts new file mode 100644 index 0000000..a1cbe6a --- /dev/null +++ b/samples/freee/api/1/journals/reports/_id@number/download/index.ts @@ -0,0 +1,27 @@ +/* eslint-disable */ +import type { DefineMethods } from 'aspida'; + +export type Methods = DefineMethods<{ + /** + *

概要

+ * + *

ダウンロードを実行する

+ * + *

*このAPIは無料プランのアカウントではご利用になれません

+ * + *

定義

+ * + * + */ + get: { + query: { + /** 事業所ID */ + company_id: number; + }; + + status: 200; + resBody: Blob; + }; +}>; diff --git a/samples/freee/api/1/journals/reports/_id@number/status/index.ts b/samples/freee/api/1/journals/reports/_id@number/status/index.ts new file mode 100644 index 0000000..617bf09 --- /dev/null +++ b/samples/freee/api/1/journals/reports/_id@number/status/index.ts @@ -0,0 +1,48 @@ +/* eslint-disable */ +import type { DefineMethods } from 'aspida'; +import type * as Types from '../../../../../../@types'; + +export type Methods = DefineMethods<{ + /** + *

概要

+ * + *

ダウンロードリクエストのステータスを確認する

+ * + *

*このAPIは無料プランのアカウントではご利用になれません

+ * + *

定義

+ * + * + */ + get: { + query: { + /** 事業所ID */ + company_id: number; + /** 補助科目やコメントとして出力する項目 */ + visible_tags?: ('partner' | 'item' | 'tag' | 'section' | 'description' | 'wallet_txn_description' | 'all')[] | undefined; + /** 取得開始日 (yyyy-mm-dd) */ + start_date?: string | undefined; + /** 取得終了日 (yyyy-mm-dd) */ + end_date?: string | undefined; + }; + + status: 200; + resBody: Types.JournalStatusResponse; + }; +}>; diff --git a/samples/freee/api/1/manual_journals/_id@number/index.ts b/samples/freee/api/1/manual_journals/_id@number/index.ts new file mode 100644 index 0000000..f1fc32e --- /dev/null +++ b/samples/freee/api/1/manual_journals/_id@number/index.ts @@ -0,0 +1,116 @@ +/* eslint-disable */ +import type { DefineMethods } from 'aspida'; +import type * as Types from '../../../../@types'; + +export type Methods = DefineMethods<{ + /** + *

概要

+ * + *

指定した事業所の振替伝票を取得する

+ * + *

定義

+ * + * + * + *

注意点

+ * + * + */ + get: { + query: { + /** 事業所ID */ + company_id: number; + }; + + status: 200; + resBody: Types.ManualJournalResponse; + }; + + /** + *

概要

+ * + *

指定した事業所の振替伝票を更新する

+ * + *

定義

+ * + * + * + *

注意点

+ * + * + */ + put: { + status: 200; + resBody: Types.ManualJournalResponse; + reqFormat: URLSearchParams; + /** 振替伝票の更新 */ + reqBody?: Types.ManualJournalUpdateParams | undefined; + }; + + /** + *

概要

+ * + *

指定した事業所の振替伝票を削除する

+ */ + delete: { + query: { + /** 事業所ID */ + company_id: number; + }; + + status: 204; + }; +}>; diff --git a/samples/freee/api/1/manual_journals/index.ts b/samples/freee/api/1/manual_journals/index.ts new file mode 100644 index 0000000..76f1374 --- /dev/null +++ b/samples/freee/api/1/manual_journals/index.ts @@ -0,0 +1,159 @@ +/* eslint-disable */ +import type { DefineMethods } from 'aspida'; +import type * as Types from '../../../@types'; + +export type Methods = DefineMethods<{ + /** + *

概要

+ * + *

指定した事業所の振替伝票一覧を取得する

+ * + *

定義

+ * + * + * + *

注意点

+ * + * + */ + get: { + query: { + /** 事業所ID */ + company_id: number; + /** 発生日で絞込:開始日(yyyy-mm-dd) */ + start_issue_date?: string | undefined; + /** 発生日で絞込:終了日(yyyy-mm-dd) */ + end_issue_date?: string | undefined; + /** 貸借で絞込 (貸方: credit, 借方: debit) */ + entry_side?: 'credit' | 'debit' | undefined; + /** 勘定科目IDで絞込 */ + account_item_id?: number | undefined; + /** 金額で絞込:下限 */ + min_amount?: number | undefined; + /** 金額で絞込:上限 */ + max_amount?: number | undefined; + /** 取引先IDで絞込(0を指定すると、取引先が未選択の貸借行を絞り込めます) */ + partner_id?: number | undefined; + /** 取引先コードで絞込 */ + partner_code?: string | undefined; + /** 品目IDで絞込(0を指定すると、品目が未選択の貸借行を絞り込めます) */ + item_id?: number | undefined; + /** 部門IDで絞込(0を指定すると、部門が未選択の貸借行を絞り込めます) */ + section_id?: number | undefined; + /** セグメント1IDで絞り込み(0を指定すると、セグメント1が未選択の貸借行を絞り込めます) */ + segment_1_tag_id?: number | undefined; + /** セグメント2IDで絞り込み(0を指定すると、セグメント2が未選択の貸借行を絞り込めます) */ + segment_2_tag_id?: number | undefined; + /** セグメント3IDで絞り込み(0を指定すると、セグメント3が未選択の貸借行を絞り込めます) */ + segment_3_tag_id?: number | undefined; + /** コメント状態で絞込(自分宛のコメント: posted_with_mention, 自分宛のコメント-未解決: raised_with_mention, 自分宛のコメント-解決済: resolved_with_mention, コメントあり: posted, 未解決: raised, 解決済: resolved, コメントなし: none) */ + comment_status?: 'posted_with_mention' | 'raised_with_mention' | 'resolved_with_mention' | 'posted' | 'raised' | 'resolved' | 'none' | undefined; + /** 重要コメント付きの振替伝票を絞込 */ + comment_important?: boolean | undefined; + /** 決算整理仕訳で絞込(決算整理仕訳のみ: only, 決算整理仕訳以外: without) */ + adjustment?: 'only' | 'without' | undefined; + /** 仕訳番号で絞込(事業所の仕訳番号形式が有効な場合のみ) */ + txn_number?: string | undefined; + /** 取得レコードのオフセット (デフォルト: 0) */ + offset?: number | undefined; + /** 取得レコードの件数 (デフォルト: 20, 最小: 1, 最大: 500) */ + limit?: number | undefined; + }; + + status: 200; + + resBody: { + manual_journals: Types.ManualJournalResponse['manual_journal'][]; + }; + }; + + /** + *

概要

+ * + *

指定した事業所の振替伝票を作成する

+ * + *

定義

+ * + * + * + *

注意点

+ * + * + */ + post: { + status: 201; + resBody: Types.ManualJournalResponse; + reqFormat: URLSearchParams; + /** 振替伝票の作成 */ + reqBody?: Types.ManualJournalCreateParams | undefined; + }; +}>; diff --git a/samples/freee/api/1/partners/_id@number/index.ts b/samples/freee/api/1/partners/_id@number/index.ts new file mode 100644 index 0000000..cc6b37d --- /dev/null +++ b/samples/freee/api/1/partners/_id@number/index.ts @@ -0,0 +1,52 @@ +/* eslint-disable */ +import type { DefineMethods } from 'aspida'; +import type * as Types from '../../../../@types'; + +export type Methods = DefineMethods<{ + /** + *

概要

+ * + *

指定した事業所の取引先を取得する

+ * + */ + get: { + query: { + /** 事業所ID */ + company_id: number; + }; + + status: 200; + resBody: Types.PartnerResponse; + }; + + /** + *

概要

+ * + *

指定した取引先の情報を更新する

+ * + */ + put: { + status: 200; + resBody: Types.PartnerResponse; + reqFormat: URLSearchParams; + /** 取引先の更新 */ + reqBody: Types.PartnerUpdateParams; + }; + + /** + *

概要

+ * + *

指定した事業所の取引先を削除する

+ */ + delete: { + query: { + /** 事業所ID */ + company_id: number; + }; + + status: 204; + }; +}>; diff --git a/samples/freee/api/1/partners/code/_code@string/index.ts b/samples/freee/api/1/partners/code/_code@string/index.ts new file mode 100644 index 0000000..734efe4 --- /dev/null +++ b/samples/freee/api/1/partners/code/_code@string/index.ts @@ -0,0 +1,22 @@ +/* eslint-disable */ +import type { DefineMethods } from 'aspida'; +import type * as Types from '../../../../../@types'; + +export type Methods = DefineMethods<{ + /** + *

概要

+ * + *

取引先コードをキーに、指定した取引先の情報を更新する

+ * + */ + put: { + status: 200; + resBody: Types.PartnerResponse; + reqFormat: URLSearchParams; + /** 取引先の更新 */ + reqBody: Types.PartnerUpdateParams; + }; +}>; diff --git a/samples/freee/api/1/partners/index.ts b/samples/freee/api/1/partners/index.ts new file mode 100644 index 0000000..6b667aa --- /dev/null +++ b/samples/freee/api/1/partners/index.ts @@ -0,0 +1,45 @@ +/* eslint-disable */ +import type { DefineMethods } from 'aspida'; +import type * as Types from '../../../@types'; + +export type Methods = DefineMethods<{ + /** + *

概要

+ * + *

指定した事業所の取引先一覧を取得する

+ * + */ + get: { + query: { + /** 事業所ID */ + company_id: number; + /** 取得レコードのオフセット (デフォルト: 0) */ + offset?: number | undefined; + /** 取得レコードの件数 (デフォルト: 50, 最小: 1, 最大: 3000) */ + limit?: number | undefined; + /** 検索キーワード:取引先名・正式名称・カナ名称に対するあいまい検索で一致、またはショートカットキー1・2のいずれかに完全一致 */ + keyword?: string | undefined; + }; + + status: 200; + resBody: Types.PartnersResponse; + }; + + /** + *

概要

+ * + *

指定した事業所の取引先を作成する

+ * + */ + post: { + status: 201; + resBody: Types.PartnerResponse; + reqFormat: URLSearchParams; + /** 取引先の作成 */ + reqBody: Types.PartnerCreateParams; + }; +}>; diff --git a/samples/freee/api/1/quotations/_id@number/index.ts b/samples/freee/api/1/quotations/_id@number/index.ts new file mode 100644 index 0000000..36b75d6 --- /dev/null +++ b/samples/freee/api/1/quotations/_id@number/index.ts @@ -0,0 +1,53 @@ +/* eslint-disable */ +import type { DefineMethods } from 'aspida'; +import type * as Types from '../../../../@types'; + +export type Methods = DefineMethods<{ + /** + *

概要

+ * + *

指定した事業所の見積書詳細を取得する

+ */ + get: { + query: { + /** 事業所ID */ + company_id: number; + }; + + status: 200; + resBody: Types.QuotationResponse; + }; + + /** + *

概要

+ * + *

指定した事業所の見積書を更新する

+ * + *

注意点

+ * + */ + put: { + status: 200; + resBody: Types.QuotationResponse; + reqFormat: URLSearchParams; + /** 見積書の更新 */ + reqBody?: Types.QuotationUpdateParams | undefined; + }; + + /** + *

概要

+ * + *

指定した事業所の見積書を削除する

+ */ + delete: { + query: { + /** 事業所ID */ + company_id: number; + }; + + status: 204; + }; +}>; diff --git a/samples/freee/api/1/quotations/index.ts b/samples/freee/api/1/quotations/index.ts new file mode 100644 index 0000000..16ae4cf --- /dev/null +++ b/samples/freee/api/1/quotations/index.ts @@ -0,0 +1,60 @@ +/* eslint-disable */ +import type { DefineMethods } from 'aspida'; +import type * as Types from '../../../@types'; + +export type Methods = DefineMethods<{ + /** + *

概要

+ * + *

指定した事業所の見積書一覧を取得する

+ */ + get: { + query: { + /** 事業所ID */ + company_id: number; + /** 取引先IDで絞込 */ + partner_id?: number | undefined; + /** 取引先コードで絞込 */ + partner_code?: string | undefined; + /** 見積日の開始日(yyyy-mm-dd) */ + start_issue_date?: string | undefined; + /** 見積日の終了日(yyyy-mm-dd) */ + end_issue_date?: string | undefined; + /** 見積書番号 */ + quotation_number?: string | undefined; + /** 概要 */ + description?: string | undefined; + /** 見積書ステータス (unsubmitted: 送付待ち, submitted: 送付済み, all: 全て) */ + quotation_status?: 'all' | 'unsubmitted' | 'submitted' | undefined; + /** 取得レコードのオフセット (デフォルト: 0) */ + offset?: number | undefined; + /** 取得レコードの件数 (デフォルト: 20, 最大: 100) */ + limit?: number | undefined; + }; + + status: 200; + + resBody: { + quotations: Types.QuotationResponse['quotation'][]; + }; + }; + + /** + *

概要

+ * + *

指定した事業所の見積書を作成する

+ * + *

注意点

+ * + */ + post: { + status: 201; + resBody: Types.QuotationResponse; + reqFormat: URLSearchParams; + /** 見積書の作成 */ + reqBody?: Types.QuotationCreateParams | undefined; + }; +}>; diff --git a/samples/freee/api/1/receipts/_id@number/index.ts b/samples/freee/api/1/receipts/_id@number/index.ts new file mode 100644 index 0000000..2100e64 --- /dev/null +++ b/samples/freee/api/1/receipts/_id@number/index.ts @@ -0,0 +1,51 @@ +/* eslint-disable */ +import type { DefineMethods } from 'aspida'; +import type * as Types from '../../../../@types'; + +export type Methods = DefineMethods<{ + /** + *

概要

+ * + *

指定した事業所のファイルボックス 証憑ファイルを取得する

+ */ + get: { + query: { + /** 事業所ID */ + company_id: number; + }; + + status: 200; + resBody: Types.ReceiptResponse; + }; + + /** + *

概要

+ * + *

ファイルボックスの証憑ファイル情報を更新する

+ *

注意点

+ * + */ + put: { + status: 200; + resBody: Types.ReceiptResponse; + reqFormat: URLSearchParams; + /** 経費申請の更新 */ + reqBody: Types.ReceiptUpdateParams; + }; + + /** + *

概要

+ * + *

ファイルボックスの証憑ファイルを削除する

+ */ + delete: { + query: { + /** 事業所ID */ + company_id: number; + }; + + status: 204; + }; +}>; diff --git a/samples/freee/api/1/receipts/index.ts b/samples/freee/api/1/receipts/index.ts new file mode 100644 index 0000000..48cfa42 --- /dev/null +++ b/samples/freee/api/1/receipts/index.ts @@ -0,0 +1,53 @@ +/* eslint-disable */ +import type { DefineMethods } from 'aspida'; +import type * as Types from '../../../@types'; + +export type Methods = DefineMethods<{ + /** + *

概要

+ * + *

指定した事業所のファイルボックス 証憑ファイル一覧を取得する

+ */ + get: { + query: { + /** 事業所ID */ + company_id: number; + /** アップロード日 (yyyy-mm-dd) */ + start_date: string; + /** アップロード日 (yyyy-mm-dd) */ + end_date: string; + /** アップロードしたユーザー名、メールアドレス */ + user_name?: string | undefined; + /** アップロードファイルNo */ + number?: number | undefined; + /** posted:コメントあり, raised:未解決, resolved:解決済 */ + comment_type?: 'posted' | 'raised' | 'resolved' | undefined; + /** trueの時、重要コメント付きが対象 */ + comment_important?: boolean | undefined; + /** all:すべて、without_deal:未登録、with_expense_application_line:経費申請中, with_deal:登録済み、ignored:無視 */ + category?: 'all' | 'without_deal' | 'with_expense_application_line' | 'with_deal' | 'ignored' | undefined; + /** 取得レコードのオフセット (デフォルト: 0) */ + offset?: number | undefined; + /** 取得レコードの件数 (デフォルト: 50, 最小: 1, 最大: 3000) */ + limit?: number | undefined; + }; + + status: 200; + + resBody: { + receipts: Types.ReceiptResponse['receipt'][]; + }; + }; + + /** + *

概要

+ * + *

ファイルボックスに証憑ファイルをアップロードする

+ */ + post: { + status: 201; + resBody: Types.ReceiptResponse; + reqFormat: FormData; + reqBody: Types.ReceiptCreateParams; + }; +}>; diff --git a/samples/freee/api/1/reports/trial_bs/index.ts b/samples/freee/api/1/reports/trial_bs/index.ts new file mode 100644 index 0000000..d1ced6f --- /dev/null +++ b/samples/freee/api/1/reports/trial_bs/index.ts @@ -0,0 +1,121 @@ +/* eslint-disable */ +import type { DefineMethods } from 'aspida'; +import type * as Types from '../../../../@types'; + +export type Methods = DefineMethods<{ + /** + *

概要

+ * + *

指定した事業所の貸借対照表を取得する

+ * + *

定義

+ * + *