From 945493c9aa4e1eccce86bfd6922024b8ef87a889 Mon Sep 17 00:00:00 2001 From: fukata Date: Thu, 5 Feb 2026 02:58:46 +0900 Subject: [PATCH] =?UTF-8?q?docs:=20DEV-8609=20Claude=20Code=E5=90=91?= =?UTF-8?q?=E3=81=91=E3=81=AE=E3=83=89=E3=82=AD=E3=83=A5=E3=83=A1=E3=83=B3?= =?UTF-8?q?=E3=83=88=E3=81=A8=E3=82=B3=E3=83=9E=E3=83=B3=E3=83=89=E3=82=92?= =?UTF-8?q?=E8=BF=BD=E5=8A=A0=20#time=2030m?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .claude/commands/sync-api-doc.md | 190 ++++ CLAUDE.md | 38 + dist/index.html | 1267 +++++++++++++++++++------ includes/api/customers.md | 54 +- includes/api/inventories.md | 47 +- includes/api/inventories_sets.md | 30 +- includes/api/inventory_attachments.md | 4 +- includes/api/inventory_group_items.md | 7 +- includes/api/packing_slips.md | 121 ++- includes/api/purchases.md | 313 +++--- includes/api/shipping_clients.md | 10 +- 11 files changed, 1509 insertions(+), 572 deletions(-) create mode 100644 .claude/commands/sync-api-doc.md create mode 100644 CLAUDE.md diff --git a/.claude/commands/sync-api-doc.md b/.claude/commands/sync-api-doc.md new file mode 100644 index 0000000..dc0074d --- /dev/null +++ b/.claude/commands/sync-api-doc.md @@ -0,0 +1,190 @@ +--- +description: 公開APIドキュメント(zaico_api_doc)とzaico_webの実装を比較し、スキーマ定義(型、最大文字列長、必須)の不整合を検出・修正する +--- + +# 公開APIドキュメント同期コマンド + +## 概要 + +公開APIドキュメント(API Blueprint形式)とzaico_webの実装を比較し、以下の不整合を検出・修正します: + +- maxLength(最大文字列長)の定義漏れ・不整合 +- required(必須)の定義漏れ・不整合 +- レスポンス項目の漏れ + +## 実行手順 + +### 1. モデルバリデーションの確認 + +zaico_webの以下のモデルから`validates`を抽出: + +- app/models/inventory.rb +- app/models/customer.rb +- app/models/packing_slip.rb +- app/models/purchase.rb +- app/models/delivery.rb +- app/models/purchase_item.rb +- app/models/inventories_set.rb +- app/models/inventories_set_item.rb +- app/models/shipping_client.rb +- app/models/inventory_attachment.rb + +確認項目: +- `validates :field, presence: true` → required +- `validates :field, length: { maximum: N }` → maxLength + +### 2. DBスキーマの確認 + +`zaico_web/db/schema.rb`から以下を確認: + +- string型カラムの`limit`制約 +- `null: false`制約(モデルバリデーションがない場合の補完) + +### 3. jbuilderの確認 + +`zaico_web/app/views/api/v1/`配下のjbuilderファイルから出力項目を確認: + +- inventories/index.json.jbuilder +- inventories/show.json.jbuilder +- customers/index.json.jbuilder +- packing_slips/index.json.jbuilder +- packing_slips/show.json.jbuilder +- purchases/index.json.jbuilder +- purchases/show.json.jbuilder +- inventories_sets/index.json.jbuilder +- inventories_sets/show.json.jbuilder +- inventory_attachments/index.json.jbuilder +- inventory_group_items/index.json.jbuilder +- shipping_clients/index.json.jbuilder + +### 4. APIドキュメントとの比較 + +`zaico_api_doc/includes/api/`配下のAPIドキュメントと比較: + +- inventories.md +- customers.md +- packing_slips.md +- purchases.md +- inventories_sets.md +- inventory_attachments.md +- inventory_group_items.md +- shipping_clients.md + +### 5. 不整合のレポート + +検出した不整合を以下の形式でレポート: + +| ファイル | フィールド | 問題 | 現状 | 期待値 | +|----------|------------|------|------|--------| +| inventories.md | title | maxLength未定義 | - | 200 | +| customers.md | name | required未指定 | - | required | + +### 6. 修正の実施 + +レポートに基づき、APIドキュメントを修正: + +- maxLengthは説明文に「(最大N文字)」形式で追加 +- requiredは`(string, required)`形式で追加 +- 欠落しているレスポンス項目を追加 + +## 優先順位 + +モデルバリデーション > DBスキーマ制約 + +## 検証 + +修正後、以下を実行して確認: + +```bash +cd zaico_api_doc && yarn build +``` + +## モデルバリデーション参照表 + +### Inventory +| フィールド | presence | maxLength | 備考 | +|------------|----------|-----------|------| +| user_group | true | 255 | | +| title | - | 200 | | +| state | - | 200 | | +| place | - | 200 | | +| quantity | - | - | decimal(15,4):整数部11桁、小数部4桁 | +| logical_quantity | - | - | decimal(15,4):整数部11桁、小数部4桁 | +| code | - | 200 | | +| category | - | 250 | | +| optional_attributes | - | 9000 | | +| group_tag | - | 250 | | + +### Customer +| フィールド | presence | maxLength | +|------------|----------|-----------| +| name | true | 100 | +| zip | - | 7 | +| address | - | 1000 | +| building_name | - | 1000 | +| phone_number | - | 11 | +| etc | - | 500 | +| email | - | 200 | +| num | - | 200 | + +### PackingSlip +| フィールド | presence | maxLength | +|------------|----------|-----------| +| num | - | 250 | +| delivery_date | true (if completed) | - | +| memo | - | 250 | +| note | - | 250 | +| user_group | - | 255 | + +### Purchase +| フィールド | presence | maxLength | +|------------|----------|-----------| +| num | - | 250 | +| purchase_date | true (if purchased) | - | +| memo | - | 250 | +| etc | - | 250 | +| user_group | - | 255 | + +### Delivery +| フィールド | presence | maxLength | 備考 | +|------------|----------|-----------|------| +| quantity | - | - | decimal(15,4):整数部11桁、小数部4桁 | +| unit_price | - | - | decimal(15,4):整数部11桁、小数部4桁 | +| etc | - | 250 | | +| delivery_date | true (if completed) | - | | + +### PurchaseItem +| フィールド | presence | maxLength | 備考 | +|------------|----------|-----------|------| +| quantity | true | - | decimal(15,4):整数部11桁、小数部4桁 | +| unit_price | - | - | decimal(15,4):整数部11桁、小数部4桁 | +| etc | - | 250 | | +| purchase_date | true (if purchased) | - | | + +### InventoriesSet +| フィールド | presence | maxLength | 備考 | +|------------|----------|-----------|------| +| title | true | 200 | | +| memo | - | 250 | | +| code | - | 200 | | +| price | - | - | decimal(15,4):整数部11桁、小数部4桁 | + +### InventoriesSetItem +| フィールド | presence | maxLength | 備考 | +|------------|----------|-----------|------| +| inventory_id | true | - | | +| quantity | true | - | decimal(15,4):整数部11桁、小数部4桁、0より大きい | + +### ShippingClient +| フィールド | presence | maxLength | +|------------|----------|-----------| +| name | true | 16 | +| zip | true | 7 | +| address | true | 32 | +| building_name | - | 16 | +| phone_number | true | 11 | + +### InventoryAttachment +| フィールド | presence | maxLength | +|------------|----------|-----------| +| item_file | true | - | diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..44704fc --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,38 @@ +# CLAUDE.md + +This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. + +## Project Overview + +ZAICO API Documentation repository - generates interactive HTML documentation from Markdown API specifications using Aglio (API Blueprint format). Published at https://zaicodev.github.io/zaico_api_doc/ + +## Development Commands + +```bash +# Install dependencies (requires Node.js v16) +yarn + +# Development server with auto-reload (localhost:3005) +yarn dev + +# Build production HTML (outputs to dist/index.html) +yarn build +``` + +## Architecture + +- **api.md**: Main entry point using API Blueprint FORMAT: 1A syntax. Includes all API endpoint files via `` directives. +- **includes/authorization.md**: Authentication documentation (Bearer token) +- **includes/api/*.md**: Individual API endpoint documentation files (inventories, purchases, packing_slips, customers, etc.) +- **dist/index.html**: Generated HTML output (committed to repo) + +## Adding New API Endpoints + +1. Create a new file in `includes/api/` following API Blueprint format +2. Add `` to `api.md` +3. Use `# Group` for resource grouping, `## Endpoint [/path]` and `### HTTP_METHOD` for endpoints +4. Define request/response with `+ Request`, `+ Response`, `+ Parameters`, `+ Attributes` + +## Deployment + +GitHub Actions automatically builds and deploys to GitHub Pages when commits are pushed to `master` branch. The workflow is defined in `.github/workflows/gh-pages.yml`. diff --git a/dist/index.html b/dist/index.html index 2d57e7c..49d0e8b 100644 --- a/dist/index.html +++ b/dist/index.html @@ -1,10 +1,15 @@ -zaico API Document Back to top

zaico API Document

このドキュメントはZAICO APIの機能と使うために必要なパラメータなどを説明するものです。

-
-バリエーションについて -

2024年9月4日にリリースしたバリエーション機能については、現在一部の公開APIからのみ操作することができます。

-

その他のAPIの対応時期については決まり次第別途お知らせいたします。

-

ご不便をおかけしますが、ご了承のほどよろしくお願いいたします。

-
+API Documentation Back to top

API Documentation

+

zaico API Document

+

このドキュメントはZAICO APIの機能と使うために必要なパラメータなどを説明するものです。

2025年12月18日更新

認証

認証について

GET

@@ -12,7 +17,8 @@

概要

在庫データ一覧取得

GET/api/v1/inventories

処理概要

+

在庫データ

在庫データ一覧取得

GET/api/v1/inventories

バリエーション対応

+

処理概要

  • 自分のアカウントに登録されている在庫データのすべてを返します

    @@ -61,6 +67,7 @@

    Example URI

    GET& "logical_quantity": "10", "unit": "個", "category": "製品", + "categories": [], "state": "新品", "place": "ZAICO倉庫", "etc": "備考", @@ -125,15 +132,15 @@

    Example URI

    GET& }, "title": { "type": "string", - "description": "在庫データタイトル" + "description": "在庫データタイトル(最大200文字)" }, "quantity": { "type": "string", - "description": "数量" + "description": "数量(整数部11桁、小数部4桁)" }, "logical_quantity": { "type": "string", - "description": "予定フリー在庫数(フルプランのみ)" + "description": "予定フリー在庫数(フルプランのみ)(整数部11桁、小数部4桁)" }, "unit": { "type": "string", @@ -141,15 +148,19 @@

    Example URI

    GET& }, "category": { "type": "string", - "description": "カテゴリ" + "description": "カテゴリ(最大250文字)" + }, + "categories": { + "type": "array", + "description": "カテゴリの配列(categoryをカンマ分割した配列)" }, "state": { "type": "string", - "description": "状態" + "description": "状態(最大200文字)" }, "place": { "type": "string", - "description": "保管場所" + "description": "保管場所(最大200文字)" }, "etc": { "type": "string", @@ -157,11 +168,11 @@

    Example URI

    GET& }, "group_tag": { "type": "string", - "description": "グループタグ(フルプランのみ)" + "description": "グループタグ(フルプランのみ)(最大250文字)" }, "code": { "type": "string", - "description": "バーコードの値" + "description": "バーコードの値(最大200文字)" }, "item_image": { "type": "object", @@ -177,7 +188,7 @@

    Example URI

    GET& "properties": { "checked_at": { "type": "string", - "description": "棚卸日" + "description": "棚卸日(ISO 8601形式)" } } }, @@ -190,7 +201,8 @@

    Example URI

    GET& { "type": "string" } - ] + ], + "description": "追加項目(最大9000文字)" }, "quantity_management_attributes": { "type": "object", @@ -203,11 +215,11 @@

    Example URI

    GET& }, "created_at": { "type": "string", - "description": "作成日" + "description": "作成日(ISO 8601形式)" }, "updated_at `2018-03-27T09:38:19+09:00`": { "type": "string", - "description": "更新日" + "description": "更新日(ISO 8601形式)" }, "create_user_name": { "type": "string", @@ -219,7 +231,7 @@

    Example URI

    GET& }, "user_group": { "type": "string", - "description": "ユーザーグループ" + "description": "ユーザーグループ(最大255文字)" }, "is_quantity_auto_conversion_by_unit": { "type": "string", @@ -267,7 +279,8 @@

    Example URI

    GET& "description": "バリエーション設定情報" } } -}

    在庫データ作成

    POST/api/v1/inventories

    処理概要

    +}

    在庫データ作成

    POST/api/v1/inventories

    バリエーション対応

    +

    処理概要

    • 在庫データを作成します
    @@ -356,11 +369,11 @@

    Example URI

    POSTproperties": { "title": { "type": "string", - "description": "在庫データタイトル" + "description": "在庫データタイトル(最大200文字)" }, "quantity": { "type": "string", - "description": "数量" + "description": "数量(整数部11桁、小数部4桁)" }, "unit": { "type": "string", @@ -368,15 +381,15 @@

    Example URI

    POST}, "category": { "type": "string", - "description": "カテゴリ" + "description": "カテゴリ(最大250文字)" }, "state": { "type": "string", - "description": "状態" + "description": "状態(最大200文字)" }, "place": { "type": "string", - "description": "保管場所" + "description": "保管場所(最大200文字)" }, "etc": { "type": "string", @@ -384,15 +397,15 @@

    Example URI

    POST}, "group_tag": { "type": "string", - "description": "グループタグ(フルプランのみ)" + "description": "グループタグ(フルプランのみ)(最大250文字)" }, "user_group": { "type": "string", - "description": "ユーザーグループ(カンマ区切りで複数指定可)" + "description": "ユーザーグループ(カンマ区切りで複数指定可)(最大255文字)" }, "code": { "type": "string", - "description": "バーコードの値" + "description": "バーコードの値(最大200文字)" }, "item_image": { "type": "string" @@ -402,7 +415,7 @@

    Example URI

    POSTproperties": { "checked_at": { "type": "string", - "description": "棚卸日" + "description": "棚卸日(ISO 8601形式)" } } }, @@ -420,7 +433,8 @@

    Example URI

    POSTdescription": "追加項目値" } } - } + }, + "description": "追加項目(最大9000文字)" }, "quantity_management_attributes": { "type": "object", @@ -537,7 +551,8 @@

    Example URI

    POSTdescription": "エラー内容" } } -}

    在庫データ個別取得

    GET/api/v1/inventories/{id}

    処理概要

    +}

    在庫データ個別取得

    GET/api/v1/inventories/{id}

    バリエーション対応

    +

    処理概要

    • 在庫データを1件のみ取得します

      @@ -564,6 +579,7 @@

      Example URI

      GET& "logical_quantity": "10", "unit": "個", "category": "製品", + "categories": [], "state": "新品", "place": "ZAICO倉庫", "etc": "備考", @@ -687,15 +703,15 @@

      Example URI

      GET& }, "title": { "type": "string", - "description": "在庫データタイトル" + "description": "在庫データタイトル(最大200文字)" }, "quantity": { "type": "string", - "description": "数量" + "description": "数量(整数部11桁、小数部4桁)" }, "logical_quantity": { "type": "string", - "description": "予定フリー在庫数(フルプランのみ)" + "description": "予定フリー在庫数(フルプランのみ)(整数部11桁、小数部4桁)" }, "unit": { "type": "string", @@ -703,15 +719,19 @@

      Example URI

      GET& }, "category": { "type": "string", - "description": "カテゴリ" + "description": "カテゴリ(最大250文字)" + }, + "categories": { + "type": "array", + "description": "カテゴリの配列(categoryをカンマ分割した配列)" }, "state": { "type": "string", - "description": "状態" + "description": "状態(最大200文字)" }, "place": { "type": "string", - "description": "保管場所" + "description": "保管場所(最大200文字)" }, "etc": { "type": "string", @@ -719,11 +739,11 @@

      Example URI

      GET& }, "group_tag": { "type": "string", - "description": "グループタグ(フルプランのみ)" + "description": "グループタグ(フルプランのみ)(最大250文字)" }, "code": { "type": "string", - "description": "バーコードの値" + "description": "バーコードの値(最大200文字)" }, "item_image": { "type": "object", @@ -739,7 +759,7 @@

      Example URI

      GET& "properties": { "checked_at": { "type": "string", - "description": "棚卸日" + "description": "棚卸日(ISO 8601形式)" } } }, @@ -752,7 +772,8 @@

      Example URI

      GET& { "type": "string" } - ] + ], + "description": "追加項目(最大9000文字)" }, "quantity_management_attributes": { "type": "object", @@ -765,11 +786,11 @@

      Example URI

      GET& }, "created_at": { "type": "string", - "description": "作成日" + "description": "作成日(ISO 8601形式)" }, "updated_at `2018-03-27T09:38:19+09:00`": { "type": "string", - "description": "更新日" + "description": "更新日(ISO 8601形式)" }, "create_user_name": { "type": "string", @@ -781,7 +802,7 @@

      Example URI

      GET& }, "user_group": { "type": "string", - "description": "ユーザーグループ" + "description": "ユーザーグループ(最大255文字)" }, "is_quantity_auto_conversion_by_unit": { "type": "string", @@ -832,7 +853,8 @@

      Example URI

      GET& "type": "object", "properties": { "data": { - "type": "array" + "type": "array", + "description": "バリエーション情報" }, "total_count": { "type": "number", @@ -934,11 +956,11 @@

      Example URI

      PUT& "properties": { "title": { "type": "string", - "description": "在庫データタイトル" + "description": "在庫データタイトル(最大200文字)" }, "quantity": { "type": "string", - "description": "数量" + "description": "数量(整数部11桁、小数部4桁)" }, "unit": { "type": "string", @@ -946,15 +968,15 @@

      Example URI

      PUT& }, "category": { "type": "string", - "description": "カテゴリ" + "description": "カテゴリ(最大250文字)" }, "state": { "type": "string", - "description": "状態" + "description": "状態(最大200文字)" }, "place": { "type": "string", - "description": "保管場所" + "description": "保管場所(最大200文字)" }, "etc": { "type": "string", @@ -962,15 +984,15 @@

      Example URI

      PUT& }, "group_tag": { "type": "string", - "description": "グループタグ(フルプランのみ)" + "description": "グループタグ(フルプランのみ)(最大250文字)" }, "user_group": { "type": "string", - "description": "ユーザーグループ(カンマ区切りで複数指定可)" + "description": "ユーザーグループ(カンマ区切りで複数指定可)(最大255文字)" }, "code": { "type": "string", - "description": "バーコードの値" + "description": "バーコードの値(最大200文字)" }, "item_image": { "type": "string" @@ -980,7 +1002,7 @@

      Example URI

      PUT& "properties": { "checked_at": { "type": "string", - "description": "棚卸日" + "description": "棚卸日(ISO 8601形式)" } } }, @@ -998,7 +1020,8 @@

      Example URI

      PUT& "description": "追加項目値" } } - } + }, + "description": "追加項目(最大9000文字)" }, "quantity_management_attributes": { "type": "object", @@ -1214,7 +1237,7 @@

      Example URI

      POSTproperties": { "item_file": { "type": "string", - "description": "添付する写真またはファイルのバイナリデータ" + "description": "添付する写真またはファイルのバイナリデータ(必須)" } }, "required": [ @@ -1349,6 +1372,7 @@

      Example URI

      POSTtitle": "セット品A", "price": 1000, "code": "123456", + "memo": "メモ", "inventories_set_items_attributes": [ { "inventory_id": 1, @@ -1365,7 +1389,7 @@

      Example URI

      POSTproperties": { "title": { "type": "string", - "description": "セット品名" + "description": "セット品名(最大200文字)" }, "price": { "type": "number", @@ -1373,7 +1397,11 @@

      Example URI

      POST}, "code": { "type": "string", - "description": "コード" + "description": "コード(最大200文字)" + }, + "memo": { + "type": "string", + "description": "メモ(最大250文字)" }, "inventories_set_items_attributes": { "type": "array", @@ -1543,7 +1571,7 @@

      Example URI

      GET& }, "title": { "type": "string", - "description": "セット品名" + "description": "セット品名(最大200文字)" }, "price": { "type": "string", @@ -1551,11 +1579,11 @@

      Example URI

      GET& }, "code": { "type": "string", - "description": "コード" + "description": "コード(最大200文字)" }, "memo": { "type": "string", - "description": "メモ" + "description": "メモ(最大250文字)" }, "update_user_id": { "type": "number", @@ -1684,6 +1712,7 @@

      Example URI

      PUT& "title": "セット品A", "price": 1000, "code": "123456", + "memo": "メモ", "inventories_set_items_attributes": [ { "inventory_id": 1, @@ -1700,7 +1729,7 @@

      Example URI

      PUT& "properties": { "title": { "type": "string", - "description": "セット品名" + "description": "セット品名(最大200文字)" }, "price": { "type": "number", @@ -1708,7 +1737,11 @@

      Example URI

      PUT& }, "code": { "type": "string", - "description": "コード" + "description": "コード(最大200文字)" + }, + "memo": { + "type": "string", + "description": "メモ(最大250文字)" }, "inventories_set_items_attributes": { "type": "array", @@ -2094,7 +2127,8 @@

      Example URI

      GET& ]
      Schema
      {
         "$schema": "http://json-schema.org/draft-04/schema#",
         "type": "array"
      -}

      出庫データ作成

      出庫データ作成
      POST/api/v1/packing_slips/

      処理概要

      +}

      出庫データ作成

      出庫データ作成
      POST/api/v1/packing_slips/

      バリエーション対応

      +

      処理概要

      • 出庫データを作成します

        @@ -2152,7 +2186,7 @@

        Example URI

        GET&
      • value : バリエーションの値
    • -
    • quantity : バリエーション毎の入庫数量
    • +
    • quantity : バリエーション毎の出庫数量
    • unit_price : バリエーション毎の仕入単価
    • code : バーコードの値
    @@ -2204,50 +2238,16 @@

    Example URI

    POSTcustomer_name": "株式会社ZAICO", "status": "completed_delivery", "delivery_date": "2019-09-01", + "memo": "出庫メモ", + "note": "納品書備考", + "user_group": "ユーザーグループ", "deliveries": [ { "inventory_id": 1, "quantity": 25, "unit_price": 100, "estimated_delivery_date": "2019-09-01", - "variants": [ - { - "items": [ - { - "label": "ロット番号", - "value": "100" - }, - { - "label": "拠点", - "value": "第一倉庫" - }, - { - "label": "利用期限", - "value": "2025/12/31" - } - ], - "quantity": 10, - "unit_price": 800 - }, - { - "items": [ - { - "label": "ロット番号", - "value": "200" - }, - { - "label": "拠点", - "value": "第二倉庫" - }, - { - "label": "利用期限", - "value": "2026/01/31" - } - ], - "quantity": 15, - "unit_price": 700 - } - ] + "etc": "摘要・備考" } ], "shipping_instruction": { @@ -2271,11 +2271,11 @@

    Example URI

    POSTproperties": { "num": { "type": "string", - "description": "出庫データ番号(ユーザーが任意に設定できる番号)" + "description": "出庫データ番号(ユーザーが任意に設定できる番号)(最大250文字)" }, "customer_name": { "type": "string", - "description": "取引先名" + "description": "取引先名(最大255文字)" }, "status": { "type": "string", @@ -2283,37 +2283,82 @@

    Example URI

    POST}, "delivery_date": { "type": "string", - "description": "出庫日" + "description": "出庫日, YYYY-MM-DD形式" + }, + "memo": { + "type": "string", + "description": "出庫メモ(最大250文字)" + }, + "note": { + "type": "string", + "description": "納品書備考(最大250文字)" + }, + "user_group": { + "type": "string", + "description": "ユーザーグループ(最大255文字)" }, "deliveries": { - "type": "array" + "type": "array", + "items": { + "type": "object", + "properties": { + "inventory_id": { + "type": "number", + "description": "在庫データID" + }, + "quantity": { + "type": "number", + "description": "出庫数量(整数部11桁、小数部4桁)" + }, + "unit_price": { + "type": "number", + "description": "納品単価(整数部11桁、小数部4桁)" + }, + "estimated_delivery_date": { + "type": [ + "string", + "null" + ], + "description": "出庫予定日, YYYY-MM-DD形式" + }, + "etc": { + "type": "string", + "description": "摘要・備考(最大250文字)" + } + }, + "required": [ + "inventory_id", + "quantity" + ] + }, + "description": "出庫物品データ" }, "shipping_instruction": { "type": "object", "properties": { "to_name": { "type": "string", - "description": "宛名" + "description": "宛名(最大500文字)" }, "to_name_postfix": { "type": "string", - "description": "敬称" + "description": "敬称(最大255文字)" }, "to_zip": { "type": "string", - "description": "郵便番号" + "description": "郵便番号(最大8文字)" }, "to_address": { "type": "string", - "description": "住所" + "description": "住所(最大32文字)" }, "building_name": { "type": "string", - "description": "建物名・部屋番号" + "description": "建物名・部屋番号(最大16文字)" }, "to_phone_number": { "type": "string", - "description": "電話番号" + "description": "電話番号(最大14文字)" }, "shipping_client_id": { "type": "number", @@ -2321,19 +2366,19 @@

    Example URI

    POST}, "invoice_type_name": { "type": "string", - "description": "便指定" + "description": "便指定(最大255文字)" }, "product_name_on_invoice": { "type": "string", - "description": "品名" + "description": "品名(最大25文字)" }, "freight_handling": { "type": "string", - "description": "荷扱い" + "description": "荷扱い(最大255文字)" }, "freight_handling2": { "type": "string", - "description": "荷扱い" + "description": "荷扱い(最大255文字)" }, "arrival_date": { "type": "string", @@ -2341,7 +2386,7 @@

    Example URI

    POST}, "arrival_hour": { "type": "string", - "description": "希望お届け時間帯" + "description": "希望お届け時間帯(最大255文字)" } } } @@ -2667,27 +2712,27 @@

    Example URI

    GET& "properties": { "to_name": { "type": "string", - "description": "宛名" + "description": "宛名(最大500文字)" }, "to_name_postfix": { "type": "string", - "description": "敬称" + "description": "敬称(最大255文字)" }, "to_zip": { "type": "string", - "description": "郵便番号" + "description": "郵便番号(最大8文字)" }, "to_address": { "type": "string", - "description": "住所" + "description": "住所(最大32文字)" }, "building_name": { "type": "string", - "description": "建物名・部屋番号" + "description": "建物名・部屋番号(最大16文字)" }, "to_phone_number": { "type": "string", - "description": "電話番号" + "description": "電話番号(最大14文字)" }, "shipping_client": { "type": "object", @@ -2698,42 +2743,48 @@

    Example URI

    GET& }, "name": { "type": "string", - "description": "名前/会社名" + "description": "名前/会社名(最大16文字)" }, "zip": { "type": "string", - "description": "郵便番号" + "description": "郵便番号(最大7文字)" }, "address": { "type": "string", - "description": "住所" + "description": "住所(最大32文字)" }, "building_name": { "type": "string", - "description": "建物名・部屋番号" + "description": "建物名・部屋番号(最大16文字)" }, "phone_number": { "type": "string", - "description": "電話番号" + "description": "電話番号(最大11文字)" } }, + "required": [ + "name", + "zip", + "address", + "phone_number" + ], "description": "発送元" }, "invoice_type_name": { "type": "string", - "description": "便指定" + "description": "便指定(最大255文字)" }, "product_name_on_invoice": { "type": "string", - "description": "品名" + "description": "品名(最大25文字)" }, "freight_handling": { "type": "string", - "description": "荷扱い" + "description": "荷扱い(最大255文字)" }, "freight_handling2": { "type": "string", - "description": "荷扱い" + "description": "荷扱い(最大255文字)" }, "arrival_date": { "type": "string", @@ -2741,7 +2792,7 @@

    Example URI

    GET& }, "arrival_hour": { "type": "string", - "description": "希望お届け時間帯" + "description": "希望お届け時間帯(最大255文字)" } } } @@ -2826,6 +2877,8 @@

    Example URI

    PUT&
    Request
    HideShow
    Headers
    Authorization: Bearer YOUR_TOKEN
    Content-Type: application/json
    Body
    {
       "num": "100",
       "customer_name": "株式会社ZAICO",
    +  "memo": "出庫メモ",
    +  "note": "納品書備考",
       "deliveries": [
         {
           "inventory_id": 1,
    @@ -2833,14 +2886,8 @@ 

    Example URI

    PUT& "unit_price": 100, "status": "completed_delivery", "delivery_date": "2019-11-11", - "estimated_delivery_date": "2019-11-11" - }, - { - "inventory_id": 2, - "quantity": 5, - "unit_price": 100, - "status": "before_delivery", - "estimated_delivery_date": "2019-11-11" + "estimated_delivery_date": "2019-11-11", + "etc": "摘要・備考" } ], "shipping_instruction": { @@ -2864,41 +2911,91 @@

    Example URI

    PUT& "properties": { "num": { "type": "string", - "description": "出庫データ番号(ユーザーが任意に設定できる番号)" + "description": "出庫データ番号(ユーザーが任意に設定できる番号)(最大250文字)" }, "customer_name": { "type": "string", - "description": "取引先名" + "description": "取引先名(最大255文字)" + }, + "memo": { + "type": "string", + "description": "出庫メモ(最大250文字)" + }, + "note": { + "type": "string", + "description": "納品書備考(最大250文字)" }, "deliveries": { - "type": "array" + "type": "array", + "items": { + "type": "object", + "properties": { + "inventory_id": { + "type": "number", + "description": "在庫データID" + }, + "quantity": { + "type": "number", + "description": "出庫数量(整数部11桁、小数部4桁)" + }, + "unit_price": { + "type": "number", + "description": "納品単価(整数部11桁、小数部4桁)" + }, + "status": { + "type": "string", + "description": "状態(completed_delivery/before_delivery)" + }, + "delivery_date": { + "type": "string", + "description": "出庫日, YYYY-MM-DD形式" + }, + "estimated_delivery_date": { + "type": [ + "string", + "null" + ], + "description": "出庫予定日, YYYY-MM-DD形式" + }, + "etc": { + "type": "string", + "description": "摘要・備考(最大250文字)" + } + }, + "required": [ + "inventory_id", + "quantity", + "status" + ] + }, + "description": "出庫物品データ" }, "shipping_instruction": { "type": "object", "properties": { "to_name": { "type": "string", - "description": "宛名" + "description": "宛名(最大500文字)" }, "to_name_postfix": { "type": "string", - "description": "敬称" + "description": "敬称(最大255文字)" }, "to_zip": { "type": "string", - "description": "郵便番号" + "description": "郵便番号(最大8文字)" }, "to_address": { "type": "string", - "description": "住所" + "description": "住所(最大32文字)" }, "building_name": { "type": "string", - "description": "建物名・部屋番号" + "description": "建物名・部屋番号(最大16文字)" }, "to_phone_number": { "type": "string", - "description": "電話番号" + "description": "電話番号(最大14文字)" }, "shipping_client_id": { "type": "number", @@ -2906,19 +3003,19 @@

    Example URI

    PUT& }, "invoice_type_name": { "type": "string", - "description": "便指定" + "description": "便指定(最大255文字)" }, "product_name_on_invoice": { "type": "string", - "description": "品名" + "description": "品名(最大25文字)" }, "freight_handling": { "type": "string", - "description": "荷扱い" + "description": "荷扱い(最大255文字)" }, "freight_handling2": { "type": "string", - "description": "荷扱い" + "description": "荷扱い(最大255文字)" }, "arrival_date": { "type": "string", @@ -2926,7 +3023,7 @@

    Example URI

    PUT& }, "arrival_hour": { "type": "string", - "description": "希望お届け時間帯" + "description": "希望お届け時間帯(最大255文字)" } } } @@ -3037,7 +3134,8 @@

    Example URI

    DELETEdescription": "メッセージ" } } -}

出庫物品データ

出庫物品データ一覧取得

出庫物品データ一覧取得
GET/api/v1/deliveries

処理概要

+}

出庫物品データ

出庫物品データ一覧取得

出庫物品データ一覧取得
GET/api/v1/deliveries

バリエーション対応

+

処理概要

  • 自分のアカウントに登録されている出庫物品データを返します

    @@ -3112,17 +3210,9 @@

    Example URI

    DELETE

Example URI

GET https://web.zaico.co.jp/api/v1/deliveries
URI Parameters
HideShow
status
string (optional) Example: before_delivery, during_delivery, completed_delivery

ステータス

-
    -
  • -

    start_date: 2019-09-01 (string, optional) - 出庫日がこの日以降

    -
  • -
  • -

    end_date: 2019-09-01 (string, optional) - 出庫日がこの日以前

    -
  • -
  • -

    page: 1 (number, optional) - ページ番号

    -
  • -
+
start_date
string (optional) Example: 2019-09-01

出庫日がこの日以降

+
end_date
string (optional) Example: 2019-09-01

出庫日がこの日以前

+
page
number (optional) Example: 1

ページ番号

Request
HideShow
Headers
Authorization: Bearer YOUR_TOKEN
Content-Type: application/json
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
   {
     "packing_slip_id": 10,
@@ -3133,8 +3223,8 @@ 

Example URI

GET& "unit_price": "100", "status": "completed_delivery", "delivery_date": "2021-11-17", - "estimated_delivery_date": "Hello, world!", - "etc": "Hello, world!", + "estimated_delivery_date": null, + "etc": "", "date_of_issue": "2021-11-17", "created_at": "2023-11-16 11:27:24", "updated_at": "2023-11-16 11:27:24" @@ -3148,8 +3238,8 @@

Example URI

GET& "unit_price": "100", "status": "completed_delivery", "delivery_date": "2021-11-17", - "estimated_delivery_date": "Hello, world!", - "etc": "Hello, world!", + "estimated_delivery_date": null, + "etc": "", "date_of_issue": "2021-11-17", "created_at": "2023-11-16 11:27:24", "updated_at": "2023-11-16 11:27:24", @@ -3176,7 +3266,194 @@

Example URI

GET& } ]
Schema
{
   "$schema": "http://json-schema.org/draft-04/schema#",
-  "type": "array"
+  "type": "array",
+  "items": [
+    {
+      "type": "object",
+      "properties": {
+        "packing_slip_id": {
+          "type": "number",
+          "description": "出庫データID"
+        },
+        "inventory_id": {
+          "type": "number",
+          "description": "在庫データID"
+        },
+        "title": {
+          "type": "string",
+          "description": "物品名"
+        },
+        "quantity": {
+          "type": "string",
+          "description": "出庫数量"
+        },
+        "unit": {
+          "type": "string",
+          "description": "単位"
+        },
+        "unit_price": {
+          "type": "string",
+          "description": "出庫単価"
+        },
+        "status": {
+          "type": "string",
+          "description": "状態"
+        },
+        "delivery_date": {
+          "type": "string",
+          "description": "出庫日"
+        },
+        "estimated_delivery_date": {
+          "type": [
+            "string",
+            "null"
+          ],
+          "description": "出庫予定日"
+        },
+        "etc": {
+          "type": "string",
+          "description": "摘要・備考"
+        },
+        "date_of_issue": {
+          "type": "string",
+          "description": "納品書に記載される出庫日"
+        },
+        "created_at": {
+          "type": "string",
+          "description": "作成日時"
+        },
+        "updated_at": {
+          "type": "string",
+          "description": "更新日時"
+        }
+      }
+    },
+    {
+      "type": "object",
+      "properties": {
+        "packing_slip_id": {
+          "type": "number",
+          "description": "出庫データID"
+        },
+        "inventory_id": {
+          "type": "number",
+          "description": "在庫データID"
+        },
+        "title": {
+          "type": "string",
+          "description": "物品名"
+        },
+        "quantity": {
+          "type": "string",
+          "description": "出庫数量"
+        },
+        "unit": {
+          "type": "string",
+          "description": "単位"
+        },
+        "unit_price": {
+          "type": "string",
+          "description": "出庫単価"
+        },
+        "status": {
+          "type": "string",
+          "description": "状態"
+        },
+        "delivery_date": {
+          "type": "string",
+          "description": "出庫日"
+        },
+        "estimated_delivery_date": {
+          "type": [
+            "string",
+            "null"
+          ],
+          "description": "出庫予定日"
+        },
+        "etc": {
+          "type": "string",
+          "description": "摘要・備考"
+        },
+        "date_of_issue": {
+          "type": "string",
+          "description": "納品書に記載される出庫日"
+        },
+        "created_at": {
+          "type": "string",
+          "description": "作成日時"
+        },
+        "updated_at": {
+          "type": "string",
+          "description": "更新日時"
+        },
+        "variants": {
+          "type": "array",
+          "items": {
+            "type": "object",
+            "properties": {
+              "data_key": {
+                "type": "string",
+                "description": "データキー"
+              },
+              "quantity": {
+                "type": "number",
+                "description": "出庫数量"
+              },
+              "unit_price": {
+                "type": "number",
+                "description": "出庫単価"
+              },
+              "amount": {
+                "type": "number",
+                "description": "出庫金額"
+              },
+              "box_quantity": {
+                "type": "number",
+                "description": "まとめ換算の出庫数量"
+              },
+              "box_unit": {
+                "type": "string",
+                "description": "まとめ単位"
+              },
+              "items": {
+                "type": "object",
+                "properties": {
+                  "4": {
+                    "type": "object",
+                    "properties": {
+                      "id": {
+                        "type": "number",
+                        "description": "バリエーション項目ID"
+                      },
+                      "value": {
+                        "type": "string",
+                        "description": "値"
+                      }
+                    }
+                  },
+                  "5": {
+                    "type": "object",
+                    "properties": {
+                      "id": {
+                        "type": "number",
+                        "description": "バリエーション項目ID"
+                      },
+                      "value": {
+                        "type": "string",
+                        "description": "値"
+                      }
+                    }
+                  }
+                },
+                "description": "バリエーション項目"
+              }
+            }
+          },
+          "description": "バリエーションデータ"
+        }
+      }
+    }
+  ]
 }

入庫データ

HOST: https://web.zaico.co.jp/

入庫データ一覧取得

入庫データ一覧取得
GET/api/v1/purchases/

処理概要

    @@ -3328,7 +3605,7 @@

    Example URI

    GET& "updated_at": "2019-12-27T09:38:19+09:00", "purchase_items": [ { - "inventory_id": "5", + "inventory_id": 5, "title": "掃除機", "quantity": "3", "unit": "台", @@ -3342,7 +3619,8 @@

    Example URI

    GET& ]
    Schema
    {
       "$schema": "http://json-schema.org/draft-04/schema#",
       "type": "array"
    -}

入庫データ作成

入庫データ作成
POST/api/v1/purchases/

処理概要

+}

入庫データ作成

入庫データ作成
POST/api/v1/purchases/

バリエーション対応

+

処理概要

  • 入庫データを作成します

    @@ -3420,50 +3698,16 @@

    Example URI

    POSTcustomer_name": "株式会社ZAICO", "status": "purchased", "purchase_date": "2019-09-01", + "memo": "入庫メモ", + "etc": "発注書備考", + "user_group": "ユーザーグループ", "purchase_items": [ { "inventory_id": 1, "quantity": 25, "unit_price": 100, "estimated_purchase_date": "2019-09-01", - "variants": [ - { - "items": [ - { - "label": "ロット番号", - "value": "100" - }, - { - "label": "拠点", - "value": "第一倉庫" - }, - { - "label": "利用期限", - "value": "2025/12/31" - } - ], - "quantity": 10, - "unit_price": 800 - }, - { - "items": [ - { - "label": "ロット番号", - "value": "200" - }, - { - "label": "拠点", - "value": "第二倉庫" - }, - { - "label": "利用期限", - "value": "2026/01/31" - } - ], - "quantity": 15, - "unit_price": 700 - } - ] + "etc": "摘要・備考" } ] }
    Schema
    {
    @@ -3472,11 +3716,11 @@ 

    Example URI

    POSTproperties": { "num": { "type": "string", - "description": "入庫データ番号(ユーザーが任意に設定できる番号)" + "description": "入庫データ番号(ユーザーが任意に設定できる番号)(最大250文字)" }, "customer_name": { "type": "string", - "description": "取引先名" + "description": "取引先名(最大255文字)" }, "status": { "type": "string", @@ -3484,10 +3728,55 @@

    Example URI

    POST}, "purchase_date": { "type": "string", - "description": "入庫日" + "description": "入庫日, YYYY-MM-DD形式" + }, + "memo": { + "type": "string", + "description": "入庫メモ(最大250文字)" + }, + "etc": { + "type": "string", + "description": "発注書備考(最大250文字)" + }, + "user_group": { + "type": "string", + "description": "ユーザーグループ(最大255文字)" }, "purchase_items": { - "type": "array" + "type": "array", + "items": { + "type": "object", + "properties": { + "inventory_id": { + "type": "number", + "description": "在庫データID" + }, + "quantity": { + "type": "number", + "description": "入庫数量(整数部11桁、小数部4桁)" + }, + "unit_price": { + "type": "number", + "description": "仕入単価(整数部11桁、小数部4桁)" + }, + "estimated_purchase_date": { + "type": [ + "string", + "null" + ], + "description": "入庫予定日, YYYY-MM-DD形式" + }, + "etc": { + "type": "string", + "description": "摘要・備考(最大250文字)" + } + }, + "required": [ + "inventory_id", + "quantity" + ] + }, + "description": "入庫物品データ" } }, "required": [ @@ -3620,7 +3909,7 @@

    Example URI

    GET& "updated_at": "2019-12-27T09:38:19+09:00", "purchase_items": [ { - "inventory_id": "1", + "inventory_id": 1, "title": "掃除機", "quantity": "3", "unit": "台", @@ -3630,7 +3919,7 @@

    Example URI

    GET& "estimated_purchase_date": "2020-01-01" }, { - "inventory_id": "1", + "inventory_id": 1, "title": "掃除機", "quantity": "3", "unit": "台", @@ -3640,7 +3929,7 @@

    Example URI

    GET& "estimated_purchase_date": "2020-01-01" }, { - "inventory_id": "2", + "inventory_id": 2, "title": "ビール", "quantity": "12", "box_quantity": "1", @@ -3697,7 +3986,146 @@

    Example URI

    GET& "type": "string" }, "purchase_items": { - "type": "array" + "type": "array", + "items": [ + { + "type": "object", + "properties": { + "inventory_id": { + "type": "number", + "description": "在庫データID" + }, + "title": { + "type": "string", + "description": "物品名" + }, + "quantity": { + "type": "string", + "description": "入庫数量" + }, + "unit": { + "type": "string", + "description": "単位" + }, + "unit_price": { + "type": "string", + "description": "仕入単価" + }, + "status": { + "type": "string", + "description": "状態" + }, + "purchase_date": { + "type": "string", + "description": "入庫日" + }, + "estimated_purchase_date": { + "type": "string", + "description": "入庫予定日" + } + } + }, + { + "type": "object", + "properties": { + "inventory_id": { + "type": "number", + "description": "在庫データID" + }, + "title": { + "type": "string", + "description": "物品名" + }, + "quantity": { + "type": "string", + "description": "入庫数量" + }, + "unit": { + "type": "string", + "description": "単位" + }, + "unit_price": { + "type": "string", + "description": "仕入単価" + }, + "status": { + "type": "string", + "description": "状態" + }, + "purchase_date": { + "type": "string", + "description": "入庫日" + }, + "estimated_purchase_date": { + "type": "string", + "description": "入庫予定日" + } + } + }, + { + "type": "object", + "properties": { + "inventory_id": { + "type": "number", + "description": "在庫データID" + }, + "title": { + "type": "string", + "description": "物品名" + }, + "quantity": { + "type": "string", + "description": "入庫数量" + }, + "box_quantity": { + "type": "string", + "description": "まとめ換算の入庫数量" + }, + "unit": { + "type": "string", + "description": "単位" + }, + "box_unit": { + "type": "string", + "description": "まとめ単位" + }, + "unit_price": { + "type": "string", + "description": "仕入単価" + }, + "unit_snapshot": { + "type": "object", + "properties": { + "piece_name": { + "type": "string", + "description": "基本単位名称" + }, + "box_name": { + "type": "string", + "description": "まとめ単位名称" + }, + "factor": { + "type": "string", + "description": "換算値" + } + }, + "description": "まとめ単位情報" + }, + "status": { + "type": "string", + "description": "状態" + }, + "purchase_date": { + "type": "string", + "description": "入庫日" + }, + "estimated_purchase_date": { + "type": "string", + "description": "入庫予定日" + } + } + } + ] } } }

入庫データ更新

入庫データ更新
PUT/api/v1/purchases/{id}

処理概要

@@ -3746,6 +4174,7 @@

Example URI

PUT&
Request
HideShow
Headers
Authorization: Bearer YOUR_TOKEN
Content-Type: application/json
Body
{
   "num": "100",
   "customer_name": "株式会社ZAICO",
+  "memo": "入庫メモ",
   "purchase_items": [
     {
       "inventory_id": 1,
@@ -3753,22 +4182,8 @@ 

Example URI

PUT& "unit_price": 100, "status": "purchased", "purchase_date": "2019-11-11", - "estimated_purchase_date": "2019-11-11" - }, - { - "inventory_id": 1, - "quantity": 3, - "unit_price": 100, - "status": "ordered", - "purchase_date": "2019-11-11", - "estimated_purchase_date": "2019-11-11" - }, - { - "inventory_id": 2, - "quantity": 5, - "unit_price": 100, - "status": "not_ordered", - "estimated_purchase_date": "2019-11-11" + "estimated_purchase_date": "2019-11-11", + "etc": "摘要・備考" } ] }
Schema
{
@@ -3777,14 +4192,60 @@ 

Example URI

PUT& "properties": { "num": { "type": "string", - "description": "入庫データ番号(ユーザーが任意に設定できる番号)" + "description": "入庫データ番号(ユーザーが任意に設定できる番号)(最大250文字)" }, "customer_name": { "type": "string", - "description": "取引先名" + "description": "取引先名(最大255文字)" + }, + "memo": { + "type": "string", + "description": "入庫メモ(最大250文字)" }, "purchase_items": { - "type": "array" + "type": "array", + "items": { + "type": "object", + "properties": { + "inventory_id": { + "type": "number", + "description": "在庫データID" + }, + "quantity": { + "type": "number", + "description": "入庫数量(整数部11桁、小数部4桁)" + }, + "unit_price": { + "type": "number", + "description": "仕入単価(整数部11桁、小数部4桁)" + }, + "status": { + "type": "string", + "description": "状態(purchased/ordered/not_ordered)" + }, + "purchase_date": { + "type": "string", + "description": "入庫日, YYYY-MM-DD形式" + }, + "estimated_purchase_date": { + "type": [ + "string", + "null" + ], + "description": "入庫予定日, YYYY-MM-DD形式" + }, + "etc": { + "type": "string", + "description": "摘要・備考(最大250文字)" + } + }, + "required": [ + "inventory_id", + "quantity", + "status" + ] + }, + "description": "入庫物品データ" } }, "required": [ @@ -3893,7 +4354,8 @@

Example URI

DELETEdescription": "メッセージ" } } -}

入庫物品データ

入庫物品データ一覧取得

入庫物品データ一覧取得
GET/api/v1/purchases/items

処理概要

+}

入庫物品データ

入庫物品データ一覧取得

入庫物品データ一覧取得
GET/api/v1/purchases/items

バリエーション対応

+

処理概要

  • 自分のアカウントに登録されている入庫物品データを返します

    @@ -3967,17 +4429,9 @@

    Example URI

    DELETE

Example URI

GET https://web.zaico.co.jp/api/v1/purchases/items
URI Parameters
HideShow
status
string (optional) Example: none, not_ordered, ordered, purchased, quotation_requested

ステータス

-
    -
  • -

    start_date: 2019-09-01 (string, optional) - 入庫日がこの日以降

    -
  • -
  • -

    end_date: 2019-09-01 (string, optional) - 入庫日がこの日以前

    -
  • -
  • -

    page: 1 (number, optional) - ページ番号

    -
  • -
+
start_date
string (optional) Example: 2019-09-01

入庫日がこの日以降

+
end_date
string (optional) Example: 2019-09-01

入庫日がこの日以前

+
page
number (optional) Example: 1

ページ番号

Request
HideShow
Headers
Authorization: Bearer YOUR_TOKEN
Content-Type: application/json
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
   {
     "purchase_id": 10,
@@ -3988,8 +4442,8 @@ 

Example URI

GET& "unit_price": "100", "status": "purchased", "purchase_date": "2021", - "estimated_purchase_date": "Hello, world!", - "etc": "Hello, world!", + "estimated_purchase_date": null, + "etc": "", "created_at": "2023-11-16 11:27:24", "updated_at": "2023-11-16 11:27:24" }, @@ -4002,8 +4456,8 @@

Example URI

GET& "unit_price": "200", "status": "purchased", "purchase_date": "2021", - "estimated_purchase_date": "Hello, world!", - "etc": "Hello, world!", + "estimated_purchase_date": null, + "etc": "", "created_at": "2023-11-16 11:27:24", "updated_at": "2023-11-16 11:27:24", "variants": [ @@ -4029,7 +4483,186 @@

Example URI

GET& } ]
Schema
{
   "$schema": "http://json-schema.org/draft-04/schema#",
-  "type": "array"
+  "type": "array",
+  "items": [
+    {
+      "type": "object",
+      "properties": {
+        "purchase_id": {
+          "type": "number",
+          "description": "入庫データID"
+        },
+        "inventory_id": {
+          "type": "number",
+          "description": "在庫データID"
+        },
+        "title": {
+          "type": "string",
+          "description": "物品名"
+        },
+        "quantity": {
+          "type": "string",
+          "description": "入庫数量"
+        },
+        "unit": {
+          "type": "string",
+          "description": "単位"
+        },
+        "unit_price": {
+          "type": "string",
+          "description": "仕入単価"
+        },
+        "status": {
+          "type": "string",
+          "description": "状態"
+        },
+        "purchase_date": {
+          "type": "string",
+          "description": "11-17 (string) - 入庫日"
+        },
+        "estimated_purchase_date": {
+          "type": [
+            "string",
+            "null"
+          ],
+          "description": "入庫予定日"
+        },
+        "etc": {
+          "type": "string",
+          "description": "摘要・備考"
+        },
+        "created_at": {
+          "type": "string",
+          "description": "作成日時"
+        },
+        "updated_at": {
+          "type": "string",
+          "description": "更新日時"
+        }
+      }
+    },
+    {
+      "type": "object",
+      "properties": {
+        "purchase_id": {
+          "type": "number",
+          "description": "入庫データID"
+        },
+        "inventory_id": {
+          "type": "number",
+          "description": "在庫データID"
+        },
+        "title": {
+          "type": "string",
+          "description": "物品名"
+        },
+        "quantity": {
+          "type": "string",
+          "description": "入庫数量"
+        },
+        "unit": {
+          "type": "string",
+          "description": "単位"
+        },
+        "unit_price": {
+          "type": "string",
+          "description": "仕入単価"
+        },
+        "status": {
+          "type": "string",
+          "description": "状態"
+        },
+        "purchase_date": {
+          "type": "string",
+          "description": "11-17 (string) - 入庫日"
+        },
+        "estimated_purchase_date": {
+          "type": [
+            "string",
+            "null"
+          ],
+          "description": "入庫予定日"
+        },
+        "etc": {
+          "type": "string",
+          "description": "摘要・備考"
+        },
+        "created_at": {
+          "type": "string",
+          "description": "作成日時"
+        },
+        "updated_at": {
+          "type": "string",
+          "description": "更新日時"
+        },
+        "variants": {
+          "type": "array",
+          "items": {
+            "type": "object",
+            "properties": {
+              "data_key": {
+                "type": "string",
+                "description": "データキー"
+              },
+              "quantity": {
+                "type": "number",
+                "description": "入庫数量"
+              },
+              "unit_price": {
+                "type": "number",
+                "description": "仕入単価"
+              },
+              "amount": {
+                "type": "number",
+                "description": "入庫金額"
+              },
+              "box_quantity": {
+                "type": "number",
+                "description": "まとめ換算の入庫数量"
+              },
+              "box_unit": {
+                "type": "string",
+                "description": "まとめ単位"
+              },
+              "items": {
+                "type": "object",
+                "properties": {
+                  "2": {
+                    "type": "object",
+                    "properties": {
+                      "id": {
+                        "type": "number",
+                        "description": "バリエーション項目ID"
+                      },
+                      "value": {
+                        "type": "string",
+                        "description": "値"
+                      }
+                    }
+                  },
+                  "3": {
+                    "type": "object",
+                    "properties": {
+                      "id": {
+                        "type": "number",
+                        "description": "バリエーション項目ID"
+                      },
+                      "value": {
+                        "type": "string",
+                        "description": "値"
+                      }
+                    }
+                  }
+                },
+                "description": "バリエーション項目"
+              }
+            }
+          },
+          "description": "バリエーションデータ"
+        }
+      }
+    }
+  ]
 }

入庫物品データ削除

入庫物品データ削除
DELETE/api/v1/purchases/items/{id}

処理概要

  • @@ -4133,35 +4766,35 @@

    Example URI

    GET& }, "name": { "type": "string", - "description": "取引先名" + "description": "取引先名(最大100文字)" }, "email": { "type": "string", - "description": "メールアドレス" + "description": "メールアドレス(最大200文字)" }, "name_postfix": { "type": "string", - "description": "敬称" + "description": "敬称(最大10文字)" }, "zip": { "type": "string", - "description": "郵便番号" + "description": "郵便番号(最大7文字)" }, "address": { "type": "string", - "description": "住所" + "description": "住所(最大1000文字)" }, "building_name": { "type": "string", - "description": "建物名・部屋番号" + "description": "建物名・部屋番号(最大1000文字)" }, "phone_number": { "type": "string", - "description": "電話番号" + "description": "電話番号(最大11文字)" }, "etc": { "type": "string", - "description": "備考" + "description": "備考(最大500文字)" }, "fax_number": { "type": "string", @@ -4177,7 +4810,7 @@

    Example URI

    GET& }, "num": { "type": "string", - "description": "取引先No." + "description": "取引先No.(最大200文字)" } } }

取引先データ作成

POST/api/v1/customers/

処理概要

@@ -4218,35 +4851,35 @@

Example URI

POSTproperties": { "name": { "type": "string", - "description": "取引先名" + "description": "取引先名(最大100文字)" }, "email": { "type": "string", - "description": "メールアドレス" + "description": "メールアドレス(最大200文字)" }, "name_postfix": { "type": "string", - "description": "敬称" + "description": "敬称(最大10文字)" }, "zip": { "type": "string", - "description": "郵便番号" + "description": "郵便番号(最大7文字)" }, "address": { "type": "string", - "description": "住所" + "description": "住所(最大1000文字)" }, "building_name": { "type": "string", - "description": "建物名・部屋番号" + "description": "建物名・部屋番号(最大1000文字)" }, "phone_number": { "type": "string", - "description": "電話番号" + "description": "電話番号(最大11文字)" }, "etc": { "type": "string", - "description": "備考" + "description": "備考(最大500文字)" }, "fax_number": { "type": "string", @@ -4262,9 +4895,12 @@

Example URI

POST}, "num": { "type": "string", - "description": "取引先No." + "description": "取引先No.(最大200文字)" } - } + }, + "required": [ + "name" + ] }
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
   "code": 200,
   "status": "success",
@@ -4374,35 +5010,35 @@ 

Example URI

PUT& "properties": { "name": { "type": "string", - "description": "取引先名" + "description": "取引先名(最大100文字)" }, "email": { "type": "string", - "description": "メールアドレス" + "description": "メールアドレス(最大200文字)" }, "name_postfix": { "type": "string", - "description": "敬称" + "description": "敬称(最大10文字)" }, "zip": { "type": "string", - "description": "郵便番号" + "description": "郵便番号(最大7文字)" }, "address": { "type": "string", - "description": "住所" + "description": "住所(最大1000文字)" }, "building_name": { "type": "string", - "description": "建物名・部屋番号" + "description": "建物名・部屋番号(最大1000文字)" }, "phone_number": { "type": "string", - "description": "電話番号" + "description": "電話番号(最大11文字)" }, "etc": { "type": "string", - "description": "備考" + "description": "備考(最大500文字)" }, "fax_number": { "type": "string", @@ -4418,7 +5054,7 @@

Example URI

PUT& }, "num": { "type": "string", - "description": "取引先No." + "description": "取引先No.(最大200文字)" } } }
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
@@ -4620,6 +5256,7 @@ 

Example URI

GET& "order_point_quantity": "10", "order_point_warning": false, "group_value": "グループタグ", + "code": "tw201800000000", "created_at": "2018-03-27T09:38:19+09:00", "updated_at `2018-03-27T09:38:19+09:00`": "Hello, world!" }
Schema
{
@@ -4632,7 +5269,7 @@ 

Example URI

GET& }, "title": { "type": "string", - "description": "タイトル" + "description": "タイトル(最大200文字)" }, "quantity": { "type": "string", @@ -4654,13 +5291,17 @@

Example URI

GET& "type": "string", "description": "グループタグ" }, + "code": { + "type": "string", + "description": "バーコードの値(最大200文字)" + }, "created_at": { "type": "string", - "description": "作成日" + "description": "作成日(ISO 8601形式)" }, "updated_at `2018-03-27T09:38:19+09:00`": { "type": "string", - "description": "更新日" + "description": "更新日(ISO 8601形式)" } } }

個別取得

GET/api/v1/inventory_group_items/{id}

処理概要

@@ -4685,6 +5326,7 @@

Example URI

GET& "order_point_quantity": "10", "order_point_warning": false, "group_value": "グループタグ", + "code": "tw201800000000", "created_at": "2018-03-27T09:38:19+09:00", "updated_at `2018-03-27T09:38:19+09:00`": "Hello, world!" }
Schema
{
@@ -4697,7 +5339,7 @@ 

Example URI

GET& }, "title": { "type": "string", - "description": "タイトル" + "description": "タイトル(最大200文字)" }, "quantity": { "type": "string", @@ -4719,13 +5361,17 @@

Example URI

GET& "type": "string", "description": "グループタグ" }, + "code": { + "type": "string", + "description": "バーコードの値(最大200文字)" + }, "created_at": { "type": "string", - "description": "作成日" + "description": "作成日(ISO 8601形式)" }, "updated_at `2018-03-27T09:38:19+09:00`": { "type": "string", - "description": "更新日" + "description": "更新日(ISO 8601形式)" } } }
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
@@ -4782,6 +5428,7 @@ 

Example URI

PUT& "order_point_quantity": "10", "order_point_warning": false, "group_value": "グループタグ", + "code": "tw201800000000", "created_at": "2018-03-27T09:38:19+09:00", "updated_at `2018-03-27T09:38:19+09:00`": "Hello, world!" }
Schema
{
@@ -4794,7 +5441,7 @@ 

Example URI

PUT& }, "title": { "type": "string", - "description": "タイトル" + "description": "タイトル(最大200文字)" }, "quantity": { "type": "string", @@ -4816,13 +5463,17 @@

Example URI

PUT& "type": "string", "description": "グループタグ" }, + "code": { + "type": "string", + "description": "バーコードの値(最大200文字)" + }, "created_at": { "type": "string", - "description": "作成日" + "description": "作成日(ISO 8601形式)" }, "updated_at `2018-03-27T09:38:19+09:00`": { "type": "string", - "description": "更新日" + "description": "更新日(ISO 8601形式)" } } }
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
@@ -4868,6 +5519,7 @@ 

Example URI

POSTorder_point_quantity": "10", "order_point_warning": false, "group_value": "グループタグ", + "code": "tw201800000000", "created_at": "2018-03-27T09:38:19+09:00", "updated_at `2018-03-27T09:38:19+09:00`": "Hello, world!" }
Schema
{
@@ -4880,7 +5532,7 @@ 

Example URI

POST}, "title": { "type": "string", - "description": "タイトル" + "description": "タイトル(最大200文字)" }, "quantity": { "type": "string", @@ -4902,13 +5554,17 @@

Example URI

POSTtype": "string", "description": "グループタグ" }, + "code": { + "type": "string", + "description": "バーコードの値(最大200文字)" + }, "created_at": { "type": "string", - "description": "作成日" + "description": "作成日(ISO 8601形式)" }, "updated_at `2018-03-27T09:38:19+09:00`": { "type": "string", - "description": "更新日" + "description": "更新日(ISO 8601形式)" } } }
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
@@ -4954,6 +5610,7 @@ 

Example URI

POSTorder_point_quantity": "10", "order_point_warning": false, "group_value": "グループタグ", + "code": "tw201800000000", "created_at": "2018-03-27T09:38:19+09:00", "updated_at `2018-03-27T09:38:19+09:00`": "Hello, world!" }
Schema
{
@@ -4966,7 +5623,7 @@ 

Example URI

POST}, "title": { "type": "string", - "description": "タイトル" + "description": "タイトル(最大200文字)" }, "quantity": { "type": "string", @@ -4988,13 +5645,17 @@

Example URI

POSTtype": "string", "description": "グループタグ" }, + "code": { + "type": "string", + "description": "バーコードの値(最大200文字)" + }, "created_at": { "type": "string", - "description": "作成日" + "description": "作成日(ISO 8601形式)" }, "updated_at `2018-03-27T09:38:19+09:00`": { "type": "string", - "description": "更新日" + "description": "更新日(ISO 8601形式)" } } }
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
@@ -5018,7 +5679,7 @@ 

Example URI

POSTdescription": "エラー内容" } } -}

Generated by aglio on 17 Dec 2025