Download OpenAPI specification:
リクエストの Authorization ヘッダーに、APIトークンを Bearer スキームで指定してください。
Authorization: Bearer {APIトークン}
APIトークンは、zaico にログインしたご自身の「アカウント設定」画面で確認できます(画面右上のユーザー名 →「アカウント設定」)。
| APIトークン | 対象 | 表示される場所 |
|---|---|---|
| 組織向けAPIトークン | 新プラン | 「APIトークン」欄 |
| 拠点向けAPIトークン(従来) | 旧プラン | 「APIトークン」欄 |
| 拠点向けAPIトークン(従来) | 旧プランから新プランへ移行した拠点 | 「拠点権限を設定」を開き、該当拠点の「(旧) APIトークン」欄(組織権限が「管理」のユーザーのみ) |
APIトークンの代わりに、OAuth 2.0 で発行したアクセストークンを、同じ Authorization ヘッダーに Bearer スキームで指定することもできます。以下の「アプリ」は、zaico に登録した OAuth 2.0 のクライアントを指します。
Authorization: Bearer {アクセストークン}
| 用途 | メソッド | URL |
|---|---|---|
| 認可 | GET | https://web.zaico.co.jp/oauth/authorize |
| トークンの発行・リフレッシュ | POST | https://web.zaico.co.jp/oauth/token |
| トークンの失効 | POST | https://web.zaico.co.jp/oauth/revoke |
認可コードフロー(PKCE に対応)とリフレッシュトークンを使えます。
response_type=code・client_id・redirect_uri・scope・state)。PKCE を使う場合は code_challenge と code_challenge_method=S256 も付けます。redirect_uri に認可コード(code)と state が返ります。state が送った値と一致することを確かめてください。grant_type=authorization_code・code・redirect_uri・client_id を送り、アクセストークンとリフレッシュトークンを受け取ります。client_secret を持つアプリは client_secret も送ります(Basic 認証ヘッダーでも送れます)。PKCE を使った場合は code_verifier も送ります。client_secret を安全に保管できないアプリ(利用者の端末に配布するアプリなど)は、client_secret を持たない公開クライアントとして PKCE(S256)を使ってください。
expires_in に秒数で返ります。有効期限が切れた、または失効したアクセストークンで呼ぶと 401 Unauthorized が返ります。grant_type=refresh_token・refresh_token・client_id(client_secret を持つアプリは client_secret も。Basic 認証ヘッダーでも送れます)を送ると受け取れます(有効期限が切れる前でも受け取れます)。レスポンスには新しいリフレッシュトークンも含まれるため、以後はそちらを使ってください。token・client_id(client_secret を持つアプリは client_secret も。Basic 認証ヘッダーでも送れます)を送ると失効できます。client_id が無いと失効できません。スコープは {リソース}.{操作} の形式(profile を除く)で、認可リクエストの scope にスペース区切りで指定します。
| 操作 | 許可される操作 |
|---|---|
read |
一覧・詳細の取得 |
write |
作成・更新(確定・送信などの状態を変える操作を含む) |
destroy |
削除・キャンセル |
admin |
そのリソースに対するすべての操作 |
scope には、アプリに登録されているスコープの中から指定します(admin を登録していても、read などを個別に指定するにはそのスコープの登録が必要です)。scope を省略すると、アプリに登録されているスコープで認可されます。403 Forbidden が返ります。403 Forbidden が返ります。403 の理由はレスポンスの detail に入ります。bearer{- "data": {
- "id": 0,
- "name": "string",
- "locale": "string",
- "department": "string",
- "position": "string",
- "org": {
- "id": 0,
- "name": "string",
- "enabled_function": "string"
}, - "joined_companies": [
- {
- "user_id": 0,
- "company_id": 0,
- "company_name": "string",
- "authority": "string",
- "user_group": "string",
- "enabled_function": "string"
}
]
}
}拠点一覧取得
org配下の拠点一覧を取得します。 新プラン(orgあり)の場合、組織配下の全拠点を返します。 旧プラン(orgなし)の場合、自身の拠点1件のみを返します。
| keyword | string 検索キーワード(拠点名の部分一致) |
| page | integer <int32> ページ番号(デフォルト: 1) |
| per_page | integer <int32> 1ページあたりの件数(デフォルト: 20) |
| sort_by | string Enum: "id" "name" "updated_at" ソート対象カラム |
| sort_order | string Enum: "asc" "desc" ソート順序 |
| include_deleted | boolean 論理削除済み拠点も含めるか(一部のアプリケーションでのみ有効) |
{- "data": [
- {
- "id": 0,
- "name": "string",
- "zip_code": "string",
- "address": "string",
- "building_name": "string",
- "phone_number": "string",
- "fax_number": "string",
- "hp": "string",
- "industry": "string",
- "number_of_employees": "string",
- "month_of_settlement": "string",
- "active_status": "active",
- "note": "string",
- "deleted": true,
- "created_at": "2025-01-01T00:00:00.000+09:00",
- "updated_at": "2025-01-01T00:00:00.000+09:00",
- "enabled_function": "string"
}
], - "pagination": {
- "current_page": 1,
- "per_page": 20,
- "total_count": 5,
- "total_pages": 1
}
}物品マスタ一覧取得
組織の物品マスタ一覧を取得します。
| keyword | string キーワード検索(ID完全一致 or 物品名部分一致) |
| page | integer <int32> ページ番号(デフォルト: 1) |
| per_page | integer <int32> 1ページあたりの件数(デフォルト: 50、許可値: 10, 50, 100) |
{- "data": [
- {
- "id": 1,
- "common_id": "550e8400-e29b-41d4-a716-446655440000",
- "title": "テスト物品",
- "etc": "備考テキスト",
- "create_org_user_id": 1,
- "create_org_user_name": "テストユーザー",
- "update_org_user_id": 1,
- "update_org_user_name": "テストユーザー",
- "created_at": "2026-01-01T00:00:00.000+09:00",
- "updated_at": "2026-01-01T00:00:00.000+09:00"
}
], - "pagination": {
- "current_page": 1,
- "per_page": 20,
- "total_count": 5,
- "total_pages": 1
}
}物品マスタ作成
新しい物品マスタを作成します。
物品マスタ作成リクエスト
| common_id | string 共通ID(省略時はUUID自動生成) |
| title required | string [ 1 .. 200 ] characters 物品名(最大200文字) |
| etc | string <= 2000 characters 備考(最大2000文字) |
| item_image_cache | string 画像キャッシュ |
| remove_item_image | boolean 画像を削除する |
{- "common_id": "string",
- "title": "string",
- "etc": "string",
- "item_image_cache": "string",
- "remove_item_image": true
}{- "data": {
- "id": 1,
- "common_id": "550e8400-e29b-41d4-a716-446655440000",
- "title": "テスト物品",
- "etc": "備考テキスト",
- "create_org_user_id": 1,
- "create_org_user_name": "テストユーザー",
- "update_org_user_id": 1,
- "update_org_user_name": "テストユーザー",
- "created_at": "2026-01-01T00:00:00.000+09:00",
- "updated_at": "2026-01-01T00:00:00.000+09:00"
}
}物品マスタ詳細取得
指定した物品マスタの詳細を取得します。
| id required | integer <int32> 物品マスタID |
{- "data": {
- "id": 1,
- "common_id": "550e8400-e29b-41d4-a716-446655440000",
- "title": "テスト物品",
- "etc": "備考テキスト",
- "create_org_user_id": 1,
- "create_org_user_name": "テストユーザー",
- "update_org_user_id": 1,
- "update_org_user_name": "テストユーザー",
- "created_at": "2026-01-01T00:00:00.000+09:00",
- "updated_at": "2026-01-01T00:00:00.000+09:00"
}
}物品マスタ更新
既存の物品マスタを更新します。
| id required | integer <int32> 物品マスタID |
物品マスタ更新リクエスト
| common_id | string 共通ID |
| title | string [ 1 .. 200 ] characters 物品名(最大200文字) |
| etc | string <= 2000 characters 備考(最大2000文字) |
| item_image_cache | string 画像キャッシュ |
| remove_item_image | boolean 画像を削除する |
{- "common_id": "string",
- "title": "string",
- "etc": "string",
- "item_image_cache": "string",
- "remove_item_image": true
}{- "data": {
- "id": 1,
- "common_id": "550e8400-e29b-41d4-a716-446655440000",
- "title": "テスト物品",
- "etc": "備考テキスト",
- "create_org_user_id": 1,
- "create_org_user_name": "テストユーザー",
- "update_org_user_id": 1,
- "update_org_user_name": "テストユーザー",
- "created_at": "2026-01-01T00:00:00.000+09:00",
- "updated_at": "2026-01-01T00:00:00.000+09:00"
}
}物品マスタ削除
物品マスタを論理削除します。
| id required | integer <int32> 物品マスタID |
| delete_inventories_option required | string Value: "unlink" 在庫の取り扱い方法(unlink: 紐付け解除) |
{- "title": "Unauthorized",
- "status": 401,
- "detail": "トークンが無効または未指定です"
}在庫一覧取得
指定した拠点の在庫一覧を取得します。
| company_id required | integer <int32> 拠点ID |
| title | string 物品名(部分一致) |
| category | string カテゴリ(完全一致) |
| place | string 保管場所(部分一致) |
| code | string コード(完全一致) |
| optional_attributes_name | string 追加項目名(追加項目値とセットで指定したときのみ完全一致絞り込み有効)。
|
| optional_attributes_value | string 追加項目値(追加項目名とセットで指定したときのみ完全一致絞り込み有効)。
|
| state | string 状態で絞り込み |
| page | integer <int32> ページ番号(デフォルト: 1) |
| per_page | integer <int32> 1ページあたりの件数(デフォルト: 100、最大: 1000) |
| sort_by | string Enum: "id" "title" "quantity" "updated_at" ソート対象カラム |
| sort_order | string Enum: "asc" "desc" ソート順序 |
| start_updated_at | string <date-time> レコード更新日時の下限(差分同期用、ISO8601形式、updated_at >= 指定値、指定日時を含む) |
| end_updated_at | string <date-time> レコード更新日時の上限(差分同期用、ISO8601形式、updated_at < 指定値、指定日時は含まない)。 半開区間 [start_updated_at, end_updated_at) で範囲指定します。 差分同期の推奨: 次回リクエストの start_updated_at に前回の end_updated_at と同じ値を指定すれば、レコードが重複しません。 |
| include_deleted | boolean 削除済みデータも含める(デフォルト: false)。 差分同期用途では start_updated_at と併用することを推奨します。 受理される値:
|
{- "data": [
- {
- "id": 0,
- "title": "string",
- "quantity": "string",
- "logical_quantity": "string",
- "unit": "string",
- "category": "string",
- "categories": [
- "string"
], - "state": "string",
- "place": "string",
- "etc": "string",
- "code": "string",
- "group_tag": "string",
- "item_image": {
- "url": "string"
}, - "stocktake_attributes": {
- "checked_at": "2025-01-01T00:00:00.000+09:00",
- "stocktake_difference": "string"
}, - "quantity_management_attributes": {
- "order_point_quantity": "string"
}, - "optional_attributes": {
- "property1": "string",
- "property2": "string"
}, - "user_group": "string",
- "is_quantity_auto_conversion_by_unit": true,
- "quantity_auto_conversion_by_unit_name": "string",
- "quantity_auto_conversion_by_unit_factor": "string",
- "create_user_name": "string",
- "update_user_name": "string",
- "created_at": "2025-01-01T00:00:00.000+09:00",
- "updated_at": "2025-01-01T00:00:00.000+09:00",
- "org_item_master": {
- "id": 1,
- "common_id": "550e8400-e29b-41d4-a716-446655440000",
- "title": "テスト物品",
- "etc": "備考テキスト",
- "create_org_user_id": 1,
- "create_org_user_name": "テストユーザー",
- "update_org_user_id": 1,
- "update_org_user_name": "テストユーザー",
- "created_at": "2026-01-01T00:00:00.000+09:00",
- "updated_at": "2026-01-01T00:00:00.000+09:00"
}, - "variant_setting": {
- "enabled": true,
- "items": [
- {
- "variant_setting_item_id": 0,
- "label": "string",
- "item_type": "string",
- "enabled_deadline_alert": true,
- "deadline_alert_day": 0
}
]
}, - "deleted": true
}
], - "pagination": {
- "current_page": 1,
- "per_page": 20,
- "total_count": 5,
- "total_pages": 1
}
}在庫作成
新しい在庫データを作成します。
| company_id required | integer <int32> 拠点ID |
在庫作成リクエスト
| title required | string 物品名(必須) |
| quantity | string 数量 |
| place | string 保管場所 |
| state | string 状態 |
| category | string カテゴリ |
| unit | string 単位 |
| code | string コード |
| item_image | string 画像(Data URI形式: data: |
| etc | string 備考 |
| group_tag | string グループタグ |
object 追加項目 | |
object 棚卸属性 | |
object 発注点属性 | |
| is_quantity_auto_conversion_by_unit | boolean 単位換算有効 |
| quantity_auto_conversion_by_unit_name | string 単位換算単位名 |
| quantity_auto_conversion_by_unit_factor | string 単位換算係数 |
| org_item_master_id | integer <int32> 物品マスタID |
| user_group | string ユーザーグループ(管理者のみ設定可) |
object バリエーション設定 |
{- "title": "string",
- "quantity": "string",
- "place": "string",
- "state": "string",
- "category": "string",
- "unit": "string",
- "code": "string",
- "item_image": "string",
- "etc": "string",
- "group_tag": "string",
- "optional_attributes": {
- "property1": "string",
- "property2": "string"
}, - "stocktake_attributes": {
- "checked_at": "2025-01-01T00:00:00.000+09:00",
- "stocktake_difference": "string"
}, - "quantity_management_attributes": {
- "order_point_quantity": "string"
}, - "is_quantity_auto_conversion_by_unit": true,
- "quantity_auto_conversion_by_unit_name": "string",
- "quantity_auto_conversion_by_unit_factor": "string",
- "org_item_master_id": 0,
- "user_group": "string",
- "variant_setting": {
- "enabled": true,
- "items": [
- {
- "label": "string",
- "item_type": "string",
- "enabled_deadline_alert": true,
- "deadline_alert_day": 0
}
]
}
}{- "data": {
- "attachments": [
- {
- "id": 0,
- "original_filename": "string",
- "url": "string",
- "created_at": "2025-01-01T00:00:00.000+09:00"
}
], - "id": 0,
- "title": "string",
- "quantity": "string",
- "logical_quantity": "string",
- "unit": "string",
- "category": "string",
- "categories": [
- "string"
], - "state": "string",
- "place": "string",
- "etc": "string",
- "code": "string",
- "group_tag": "string",
- "item_image": {
- "url": "string"
}, - "stocktake_attributes": {
- "checked_at": "2025-01-01T00:00:00.000+09:00",
- "stocktake_difference": "string"
}, - "quantity_management_attributes": {
- "order_point_quantity": "string"
}, - "optional_attributes": {
- "property1": "string",
- "property2": "string"
}, - "user_group": "string",
- "is_quantity_auto_conversion_by_unit": true,
- "quantity_auto_conversion_by_unit_name": "string",
- "quantity_auto_conversion_by_unit_factor": "string",
- "create_user_name": "string",
- "update_user_name": "string",
- "created_at": "2025-01-01T00:00:00.000+09:00",
- "updated_at": "2025-01-01T00:00:00.000+09:00",
- "org_item_master": {
- "id": 1,
- "common_id": "550e8400-e29b-41d4-a716-446655440000",
- "title": "テスト物品",
- "etc": "備考テキスト",
- "create_org_user_id": 1,
- "create_org_user_name": "テストユーザー",
- "update_org_user_id": 1,
- "update_org_user_name": "テストユーザー",
- "created_at": "2026-01-01T00:00:00.000+09:00",
- "updated_at": "2026-01-01T00:00:00.000+09:00"
}, - "variant_setting": {
- "enabled": true,
- "items": [
- {
- "variant_setting_item_id": 0,
- "label": "string",
- "item_type": "string",
- "enabled_deadline_alert": true,
- "deadline_alert_day": 0
}
]
}, - "deleted": true
}
}在庫詳細取得
指定した在庫データの詳細を取得します。
注意: 削除済み在庫データの詳細取得は本エンドポイントでは非対応です。
論理削除済みの在庫 ID を指定した場合、include_deleted パラメータの値にかかわらず 404 が返ります。
削除済み在庫の確認は GET /inventories に include_deleted=true を指定して一覧取得を利用してください。
| company_id required | integer <int32> 拠点ID |
| id required | integer <int32> 在庫ID |
{- "data": {
- "attachments": [
- {
- "id": 0,
- "original_filename": "string",
- "url": "string",
- "created_at": "2025-01-01T00:00:00.000+09:00"
}
], - "id": 0,
- "title": "string",
- "quantity": "string",
- "logical_quantity": "string",
- "unit": "string",
- "category": "string",
- "categories": [
- "string"
], - "state": "string",
- "place": "string",
- "etc": "string",
- "code": "string",
- "group_tag": "string",
- "item_image": {
- "url": "string"
}, - "stocktake_attributes": {
- "checked_at": "2025-01-01T00:00:00.000+09:00",
- "stocktake_difference": "string"
}, - "quantity_management_attributes": {
- "order_point_quantity": "string"
}, - "optional_attributes": {
- "property1": "string",
- "property2": "string"
}, - "user_group": "string",
- "is_quantity_auto_conversion_by_unit": true,
- "quantity_auto_conversion_by_unit_name": "string",
- "quantity_auto_conversion_by_unit_factor": "string",
- "create_user_name": "string",
- "update_user_name": "string",
- "created_at": "2025-01-01T00:00:00.000+09:00",
- "updated_at": "2025-01-01T00:00:00.000+09:00",
- "org_item_master": {
- "id": 1,
- "common_id": "550e8400-e29b-41d4-a716-446655440000",
- "title": "テスト物品",
- "etc": "備考テキスト",
- "create_org_user_id": 1,
- "create_org_user_name": "テストユーザー",
- "update_org_user_id": 1,
- "update_org_user_name": "テストユーザー",
- "created_at": "2026-01-01T00:00:00.000+09:00",
- "updated_at": "2026-01-01T00:00:00.000+09:00"
}, - "variant_setting": {
- "enabled": true,
- "items": [
- {
- "variant_setting_item_id": 0,
- "label": "string",
- "item_type": "string",
- "enabled_deadline_alert": true,
- "deadline_alert_day": 0
}
]
}, - "deleted": true
}
}在庫更新
既存の在庫データを更新します。
| company_id required | integer <int32> 拠点ID |
| id required | integer <int32> 在庫ID |
在庫更新リクエスト
| title | string 物品名 |
| quantity | string 数量 |
| place | string 保管場所 |
| state | string 状態 |
| category | string カテゴリ |
| unit | string 単位 |
| code | string コード |
| item_image | string 画像(Data URI形式: data: |
| etc | string 備考 |
| group_tag | string グループタグ |
object 追加項目 | |
object 棚卸属性 | |
object 発注点属性 | |
| is_quantity_auto_conversion_by_unit | boolean 単位換算有効 |
| quantity_auto_conversion_by_unit_name | string 単位換算単位名 |
| quantity_auto_conversion_by_unit_factor | string 単位換算係数 |
| org_item_master_id | integer or null <int32> 物品マスタID。整数IDで紐付け、nullで紐付け解除、省略時は既存の紐付けを維持します。 |
| user_group | string ユーザーグループ(管理者のみ設定可) |
{- "title": "string",
- "quantity": "string",
- "place": "string",
- "state": "string",
- "category": "string",
- "unit": "string",
- "code": "string",
- "item_image": "string",
- "etc": "string",
- "group_tag": "string",
- "optional_attributes": {
- "property1": "string",
- "property2": "string"
}, - "stocktake_attributes": {
- "checked_at": "2025-01-01T00:00:00.000+09:00",
- "stocktake_difference": "string"
}, - "quantity_management_attributes": {
- "order_point_quantity": "string"
}, - "is_quantity_auto_conversion_by_unit": true,
- "quantity_auto_conversion_by_unit_name": "string",
- "quantity_auto_conversion_by_unit_factor": "string",
- "org_item_master_id": 0,
- "user_group": "string"
}{- "data": {
- "attachments": [
- {
- "id": 0,
- "original_filename": "string",
- "url": "string",
- "created_at": "2025-01-01T00:00:00.000+09:00"
}
], - "id": 0,
- "title": "string",
- "quantity": "string",
- "logical_quantity": "string",
- "unit": "string",
- "category": "string",
- "categories": [
- "string"
], - "state": "string",
- "place": "string",
- "etc": "string",
- "code": "string",
- "group_tag": "string",
- "item_image": {
- "url": "string"
}, - "stocktake_attributes": {
- "checked_at": "2025-01-01T00:00:00.000+09:00",
- "stocktake_difference": "string"
}, - "quantity_management_attributes": {
- "order_point_quantity": "string"
}, - "optional_attributes": {
- "property1": "string",
- "property2": "string"
}, - "user_group": "string",
- "is_quantity_auto_conversion_by_unit": true,
- "quantity_auto_conversion_by_unit_name": "string",
- "quantity_auto_conversion_by_unit_factor": "string",
- "create_user_name": "string",
- "update_user_name": "string",
- "created_at": "2025-01-01T00:00:00.000+09:00",
- "updated_at": "2025-01-01T00:00:00.000+09:00",
- "org_item_master": {
- "id": 1,
- "common_id": "550e8400-e29b-41d4-a716-446655440000",
- "title": "テスト物品",
- "etc": "備考テキスト",
- "create_org_user_id": 1,
- "create_org_user_name": "テストユーザー",
- "update_org_user_id": 1,
- "update_org_user_name": "テストユーザー",
- "created_at": "2026-01-01T00:00:00.000+09:00",
- "updated_at": "2026-01-01T00:00:00.000+09:00"
}, - "variant_setting": {
- "enabled": true,
- "items": [
- {
- "variant_setting_item_id": 0,
- "label": "string",
- "item_type": "string",
- "enabled_deadline_alert": true,
- "deadline_alert_day": 0
}
]
}, - "deleted": true
}
}セット品一覧取得
指定した拠点のセット品一覧を取得します。
| company_id required | integer <int32> 拠点ID |
| page | integer <int32> ページ番号 |
| per_page | integer <int32> 1ページあたりの件数(デフォルト: 100, 最大: 100) |
{- "data": [
- {
- "id": 1,
- "title": "セット品A",
- "price": "1000.0",
- "code": "code1",
- "memo": "メモ",
- "available_delivery_quantity": "100",
- "update_user_id": 1,
- "created_at": "2025-01-01T00:00:00.000+09:00",
- "updated_at": "2025-01-01T00:00:00.000+09:00",
- "inventories_set_items": [
- {
- "inventory_id": 1,
- "quantity": "10.0",
- "created_at": "2025-01-01T00:00:00.000+09:00",
- "updated_at": "2025-01-01T00:00:00.000+09:00",
- "inventory_title": "在庫A",
- "inventory_quantity": "1000.0",
- "inventory_del_flg": false
}
]
}
], - "pagination": {
- "current_page": 1,
- "per_page": 20,
- "total_count": 5,
- "total_pages": 1
}
}セット品作成
新しいセット品を作成します。
| company_id required | integer <int32> 拠点ID |
| title required | string セット品名(必須) |
| price | number <double> 価格 |
| code | string 管理コード(空欄の場合はランダム値が生成される) |
| memo | string メモ |
required | Array of objects (Models.InventoriesSet.InventoriesSetItemRequest) セット品明細 |
{- "title": "テストセット",
- "price": 1000,
- "code": "000",
- "memo": "メモ",
- "inventories_set_items_attributes": [
- {
- "inventory_id": 1,
- "quantity": 10
}
]
}{- "data": {
- "id": 1,
- "title": "セット品A",
- "price": "1000.0",
- "code": "code1",
- "memo": "メモ",
- "available_delivery_quantity": "100",
- "update_user_id": 1,
- "available_delivery_logical_quantity": "100",
- "created_at": "2025-01-01T00:00:00.000+09:00",
- "updated_at": "2025-01-01T00:00:00.000+09:00",
- "inventories_set_items": [
- {
- "inventory_id": 1,
- "quantity": "10.0",
- "created_at": "2025-01-01T00:00:00.000+09:00",
- "updated_at": "2025-01-01T00:00:00.000+09:00",
- "inventory_title": "在庫A",
- "inventory_quantity": "1000.0",
- "inventory_del_flg": false,
- "inventory_logical_quantity": "1005.0"
}
]
}
}セット品詳細取得
指定したセット品の詳細を取得します。
| company_id required | integer <int32> 拠点ID |
| id required | integer <int32> セット品ID |
{- "data": {
- "id": 1,
- "title": "セット品A",
- "price": "1000.0",
- "code": "code1",
- "memo": "メモ",
- "available_delivery_quantity": "100",
- "update_user_id": 1,
- "available_delivery_logical_quantity": "100",
- "created_at": "2025-01-01T00:00:00.000+09:00",
- "updated_at": "2025-01-01T00:00:00.000+09:00",
- "inventories_set_items": [
- {
- "inventory_id": 1,
- "quantity": "10.0",
- "created_at": "2025-01-01T00:00:00.000+09:00",
- "updated_at": "2025-01-01T00:00:00.000+09:00",
- "inventory_title": "在庫A",
- "inventory_quantity": "1000.0",
- "inventory_del_flg": false,
- "inventory_logical_quantity": "1005.0"
}
]
}
}セット品更新
指定したセット品を更新します。
| company_id required | integer <int32> 拠点ID |
| id required | integer <int32> セット品ID |
| title | string セット品名 |
| price | number <double> 価格 |
| code | string 管理コード |
| memo | string メモ |
Array of objects (Models.InventoriesSet.InventoriesSetItemRequest) セット品明細(指定した場合、既存の明細は全て削除され新しい明細に置き換わる。空配列を指定すると明細は0件になる。省略した場合、既存の明細は変更されない) |
{- "title": "テストセット",
- "price": 3000,
- "code": "003",
- "memo": "更新メモ",
- "inventories_set_items_attributes": [
- {
- "inventory_id": 1,
- "quantity": 10
}
]
}{- "data": {
- "id": 1,
- "title": "セット品A",
- "price": "1000.0",
- "code": "code1",
- "memo": "メモ",
- "available_delivery_quantity": "100",
- "update_user_id": 1,
- "available_delivery_logical_quantity": "100",
- "created_at": "2025-01-01T00:00:00.000+09:00",
- "updated_at": "2025-01-01T00:00:00.000+09:00",
- "inventories_set_items": [
- {
- "inventory_id": 1,
- "quantity": "10.0",
- "created_at": "2025-01-01T00:00:00.000+09:00",
- "updated_at": "2025-01-01T00:00:00.000+09:00",
- "inventory_title": "在庫A",
- "inventory_quantity": "1000.0",
- "inventory_del_flg": false,
- "inventory_logical_quantity": "1005.0"
}
]
}
}添付ファイル一覧取得
指定した在庫の添付ファイル一覧を取得します。
| company_id required | integer <int32> 拠点ID |
| inventory_id required | integer <int32> 在庫ID |
{- "data": [
- {
- "id": 0,
- "original_filename": "string",
- "url": "string",
- "created_at": "2025-01-01T00:00:00.000+09:00"
}
]
}添付ファイル作成
在庫に添付ファイルをアップロードします。
| company_id required | integer <int32> 拠点ID |
| inventory_id required | integer <int32> 在庫ID |
添付ファイル作成リクエスト
| item_file required | string 添付ファイル(Data URI形式: data: |
| original_filename | string 元のファイル名。未指定の場合はサーバー側で自動生成。拡張子がファイルのMIMEタイプと異なる場合は正しい拡張子が自動付与される。 |
{- "item_file": "string",
- "original_filename": "string"
}{- "data": {
- "id": 0,
- "original_filename": "string",
- "url": "string",
- "created_at": "2025-01-01T00:00:00.000+09:00"
}
}添付ファイル削除
添付ファイルを物理削除します。
| company_id required | integer <int32> 拠点ID |
| inventory_id required | integer <int32> 在庫ID |
| id required | integer <int32> 添付ファイルID |
{- "title": "Unauthorized",
- "status": 401,
- "detail": "トークンが無効または未指定です"
}在庫属性一覧取得
指定した拠点の在庫属性データ(追加項目)一覧を取得します。
| company_id required | integer <int32> 拠点ID |
| page | integer <int32> ページ番号 |
| per_page | integer <int32> 1ページあたりの件数(デフォルト: 100, 最大: 100) |
{- "data": [
- {
- "id": 1,
- "title": "仕入価格",
- "attr_type": "Text"
}
], - "pagination": {
- "current_page": 1,
- "per_page": 20,
- "total_count": 5,
- "total_pages": 1
}
}バリアント一覧取得
指定した在庫のバリアント一覧を取得します。
| company_id required | integer <int32> 拠点ID |
| inventory_id required | integer <int32> 在庫ID |
| page | integer <int32> ページ番号(デフォルト: 1) |
| per_page | integer <int32> 1ページあたりの件数(デフォルト: 100、最大: 1000) |
{- "data": [
- {
- "id": 0,
- "inventory_id": 0,
- "data_key": "string",
- "code": "string",
- "items": [
- {
- "variant_setting_item_id": 0,
- "label": "string",
- "value": "string"
}
], - "quantity": "string",
- "logical_quantity": "string",
- "purchase_unit_price": "string",
- "packing_slip_unit_price": "string",
- "item_image": {
- "url": "string"
}, - "update_user_name": "string",
- "create_user_name": "string",
- "created_at": "2025-01-01T00:00:00.000+09:00",
- "updated_at": "2025-01-01T00:00:00.000+09:00",
- "update_date": "2025-01-01T00:00:00.000+09:00"
}
], - "pagination": {
- "current_page": 1,
- "per_page": 20,
- "total_count": 5,
- "total_pages": 1
}
}バリアント作成
指定した在庫に新しいバリアントを作成します。 variant_settingが有効な在庫のみ操作可能です。 同一data_keyの既存バリアントが存在する場合はマージされます。
| company_id required | integer <int32> 拠点ID |
| inventory_id required | integer <int32> 在庫ID |
リクエストボディ
required | Array of objects (CreateInventoryVariantItemInput) バリアント項目値 |
| quantity | string 数量 |
| code | string バリアントコード |
| purchase_unit_price | string 仕入単価 |
| packing_slip_unit_price | string 出庫単価 |
| item_image | string 画像(base64エンコード) |
{- "items": [
- {
- "id": 0,
- "value": "string"
}
], - "quantity": "string",
- "code": "string",
- "purchase_unit_price": "string",
- "packing_slip_unit_price": "string",
- "item_image": "string"
}{- "id": 0,
- "inventory_id": 0,
- "data_key": "string",
- "code": "string",
- "items": [
- {
- "variant_setting_item_id": 0,
- "label": "string",
- "value": "string"
}
], - "quantity": "string",
- "logical_quantity": "string",
- "purchase_unit_price": "string",
- "packing_slip_unit_price": "string",
- "item_image": {
- "url": "string"
}, - "update_user_name": "string",
- "create_user_name": "string",
- "created_at": "2025-01-01T00:00:00.000+09:00",
- "updated_at": "2025-01-01T00:00:00.000+09:00",
- "update_date": "2025-01-01T00:00:00.000+09:00"
}バリアント詳細取得
指定した在庫バリアントの詳細を取得します。
| company_id required | integer <int32> 拠点ID |
| inventory_id required | integer <int32> 在庫ID |
| id required | integer <int32> バリアントID |
{- "id": 0,
- "inventory_id": 0,
- "data_key": "string",
- "code": "string",
- "items": [
- {
- "variant_setting_item_id": 0,
- "label": "string",
- "value": "string"
}
], - "quantity": "string",
- "logical_quantity": "string",
- "purchase_unit_price": "string",
- "packing_slip_unit_price": "string",
- "item_image": {
- "url": "string"
}, - "update_user_name": "string",
- "create_user_name": "string",
- "created_at": "2025-01-01T00:00:00.000+09:00",
- "updated_at": "2025-01-01T00:00:00.000+09:00",
- "update_date": "2025-01-01T00:00:00.000+09:00"
}バリアント更新
指定した在庫バリアントを更新します。 variant_settingが有効な在庫のみ操作可能です。
| company_id required | integer <int32> 拠点ID |
| inventory_id required | integer <int32> 在庫ID |
| id required | integer <int32> バリアントID |
リクエストボディ
Array of objects (CreateInventoryVariantItemInput) バリアント項目値 | |
| quantity | string 数量 |
| code | string バリアントコード |
| purchase_unit_price | string 仕入単価 |
| packing_slip_unit_price | string 出庫単価 |
| item_image | string 画像(base64エンコード) |
{- "items": [
- {
- "id": 0,
- "value": "string"
}
], - "quantity": "string",
- "code": "string",
- "purchase_unit_price": "string",
- "packing_slip_unit_price": "string",
- "item_image": "string"
}{- "id": 0,
- "inventory_id": 0,
- "data_key": "string",
- "code": "string",
- "items": [
- {
- "variant_setting_item_id": 0,
- "label": "string",
- "value": "string"
}
], - "quantity": "string",
- "logical_quantity": "string",
- "purchase_unit_price": "string",
- "packing_slip_unit_price": "string",
- "item_image": {
- "url": "string"
}, - "update_user_name": "string",
- "create_user_name": "string",
- "created_at": "2025-01-01T00:00:00.000+09:00",
- "updated_at": "2025-01-01T00:00:00.000+09:00",
- "update_date": "2025-01-01T00:00:00.000+09:00"
}バリアント削除
指定した在庫バリアントを論理削除します。 variant_settingが有効な在庫のみ操作可能です。
| company_id required | integer <int32> 拠点ID |
| inventory_id required | integer <int32> 在庫ID |
| id required | integer <int32> バリアントID |
{- "title": "Unauthorized",
- "status": 401,
- "detail": "トークンが無効または未指定です"
}カテゴリ一覧取得
指定した拠点のカテゴリ一覧を取得します。 デフォルトの並び順は position ASC, created_at ASC です。
| company_id required | integer <int32> 拠点ID |
| page | integer <int32> ページ番号(デフォルト: 1) |
| per_page | integer <int32> 1ページあたりの件数(デフォルト: 100, 最大: 100) |
| include_deleted | boolean 削除済みデータも含める(デフォルト: false)。 受理される値:
|
{- "data": [
- {
- "id": 0,
- "name": "string",
- "position": 0,
- "deleted": true,
- "created_at": "2025-01-01T00:00:00.000+09:00",
- "updated_at": "2025-01-01T00:00:00.000+09:00"
}
], - "pagination": {
- "current_page": 1,
- "per_page": 20,
- "total_count": 5,
- "total_pages": 1
}
}カテゴリ作成
新しいカテゴリを作成します。
同名の論理削除済カテゴリが存在する場合の挙動(復活ロジック):
deleted: true)が同一拠点に存在する場合、
そのレコードを復活させて deleted: false で返します。新しい id は採番されず、
既存の id が返却される点に注意してください。position は末尾(既存有効カテゴリの最大 position + 1)に再設定されます。
削除前の position には戻りません。| company_id required | integer <int32> 拠点ID |
カテゴリ作成リクエスト
| name required | string [ 1 .. 50 ] characters ^[^,\n]*$ カテゴリ名(必須、最大50文字、 同名の論理削除済カテゴリが既に存在する場合は復活させ、同IDで返却する。
|
{- "name": "string"
}{- "data": {
- "id": 0,
- "name": "string",
- "position": 0,
- "deleted": true,
- "created_at": "2025-01-01T00:00:00.000+09:00",
- "updated_at": "2025-01-01T00:00:00.000+09:00"
}
}カテゴリ更新(部分更新)
カテゴリ名を更新します。
Web 画面での挙動との差異(重要):
Web 画面でのカテゴリ名変更とは異なり、過去の在庫データの category 文字列は
更新されません。古い名称の在庫データを新しいカテゴリ名に紐付け直す場合は、
別途在庫 API 経由で各レコードの category を更新してください。
冪等性:
リクエストボディが空 {} または name 未指定の場合、リソースは変更されず
HTTP 200 を返します(idempotent)。updated_at は更新されます。
論理削除済への更新:
deleted: true のカテゴリの id を指定すると HTTP 404 を返します。
論理削除済を復活させたい場合は、同名で POST してください(復活ロジック)。
| company_id required | integer <int32> 拠点ID |
| id required | integer <int32> カテゴリID |
カテゴリ更新リクエスト
| name | string [ 1 .. 50 ] characters ^[^,\n]*$ カテゴリ名(指定時のみ更新。最大50文字、 注: API V2 ではカテゴリ名を変更しても、過去の在庫データの category 文字列は更新されない。 |
{- "name": "string"
}{- "data": {
- "id": 0,
- "name": "string",
- "position": 0,
- "deleted": true,
- "created_at": "2025-01-01T00:00:00.000+09:00",
- "updated_at": "2025-01-01T00:00:00.000+09:00"
}
}カテゴリ削除(論理削除)
カテゴリを論理削除します(DBレコードは残ります)。
在庫データの category 文字列はそのまま残ります。
二重削除: 既に論理削除済の id を指定すると HTTP 404 を返します。 削除済カテゴリを再利用したい場合は、同名で POST して復活させてください。
| company_id required | integer <int32> 拠点ID |
| id required | integer <int32> カテゴリID |
{- "title": "Unauthorized",
- "status": 401,
- "detail": "トークンが無効または未指定です"
}出庫データ一覧取得
出庫データの一覧を取得します。 ページネーションに対応しており、デフォルトで1ページあたり100件を返します。 出庫物品(明細)をネストして返します。
| company_id required | integer <int32> 会社ID |
| page | integer <int32> ページ番号(デフォルト: 1) |
| per_page | integer <int32> 1ページあたりの件数(デフォルト: 100, 最大: 100) |
| status | string (Models.PackingSlip.PackingSlipStatus) Enum: "before_delivery" "during_delivery" "completed_delivery" ステータスで絞り込み |
| num | string 出庫番号 |
| start_updated_at | string <date-time> レコード更新日時の下限(差分同期用、ISO8601形式、updated_at >= 指定値、指定日時を含む) |
| end_updated_at | string <date-time> レコード更新日時の上限(差分同期用、ISO8601形式、updated_at < 指定値、指定日時は含まない)。 半開区間 [start_updated_at, end_updated_at) で範囲指定します。 差分同期の推奨: 次回リクエストの start_updated_at に前回の end_updated_at と同じ値を指定すれば、レコードが重複しません。 |
| include_deleted | boolean 削除済みデータも含める(デフォルト: false)。 差分同期用途では start_updated_at と併用することを推奨します。 include_deleted=true 時、ネストされた deliveries も削除済み明細を含めて返却します。 受理される値:
注意: サブスクリプションプランに応じた保持期間制限が適用されます (Free / Entry / Minimum: 2年、Lite: 5年、Full / Pro: 7年)。 保持期間を超えた古いデータは include_deleted=true でも取得できません。 |
{- "data": [
- {
- "id": 1,
- "num": "D-001",
- "customer_name": "テスト取引先",
- "status": "before_delivery",
- "total_amount": "10000.0",
- "delivery_date": "2025-01-15",
- "estimated_delivery_date": "2025-01-20",
- "create_user_name": "string",
- "memo": "社内メモ",
- "note": "備考",
- "created_at": "2025-01-01T00:00:00+09:00",
- "updated_at": "2025-01-01T00:00:00+09:00",
- "deleted": true,
- "deliveries": [
- {
- "id": 10,
- "inventory_id": 100,
- "title": "商品A",
- "quantity": "5.0",
- "unit": "個",
- "unit_price": "2000.0",
- "subtotal_amount": "10000.0",
- "status": "before_delivery",
- "delivery_date": "2025-01-15",
- "estimated_delivery_date": "2025-01-20",
- "etc": "備考テキスト",
- "deleted": true,
- "variants": [
- {
- "data_key": "12345",
- "quantity": "5.0",
- "unit_price": "2000.0",
- "amount": "10000.0",
- "unit_snapshot": {
- "factor": "10.0",
- "piece_name": "個",
- "box_name": "箱"
}, - "box_quantity": "1.0",
- "box_unit": "箱",
- "items": [
- {
- "variant_setting_item_id": 1,
- "label": "色",
- "value": "赤"
}
]
}
]
}
]
}
], - "pagination": {
- "current_page": 1,
- "per_page": 20,
- "total_count": 5,
- "total_pages": 1
}
}出庫データ作成
出庫データを作成します。 出庫物品(明細)を含めて一括作成します。 ステータスがcompleted_deliveryの場合、在庫数量が減算されます。
| company_id required | integer <int32> 会社ID |
作成パラメータ
| association | string Value: "inventory_title" 在庫データ関連付け方法。 inventory_title 指定時は deliveries[].inventory_title で同名の有効在庫を検索し、 見つからない場合は在庫を自動作成します。 |
| num | string 出庫番号 |
| customer_name | string 取引先名 |
| status | string Enum: "before_delivery" "during_delivery" "completed_delivery" ステータス 明細( |
| delivery_date | string or null <date> 出庫日(YYYY-MM-DD形式)。status が completed_delivery のとき必須。 |
| date_of_issue | string or null <date> 発行日(YYYY-MM-DD形式) |
| memo | string 社内メモ(最大250文字) |
| note | string 備考(最大250文字) |
required | Array of objects (Models.PackingSlip.CreatePackingSlipItemRequest) 出庫物品の配列。 association未指定時は各明細に inventory_id を指定し、 association=inventory_title 時は各明細に inventory_title を指定します。 |
{- "association": "inventory_title",
- "num": "string",
- "customer_name": "string",
- "status": "before_delivery",
- "delivery_date": "2019-08-24",
- "date_of_issue": "2019-08-24",
- "memo": "string",
- "note": "string",
- "deliveries": [
- {
- "inventory_id": 0,
- "inventory_title": "string",
- "quantity": "string",
- "unit_price": "string",
- "status": "before_delivery",
- "delivery_date": "2019-08-24",
- "estimated_delivery_date": "2019-08-24",
- "etc": "string",
- "variants": [
- {
- "id": 0,
- "code": "string",
- "quantity": "string",
- "unit_price": "string",
- "items": [
- {
- "label": "string",
- "value": "string"
}
]
}
]
}
]
}{- "data": {
- "id": 1,
- "num": "D-001",
- "customer_name": "テスト取引先",
- "status": "before_delivery",
- "total_amount": "10000.0",
- "delivery_date": "2025-01-15",
- "estimated_delivery_date": "2025-01-20",
- "create_user_name": "string",
- "memo": "社内メモ",
- "note": "備考",
- "created_at": "2025-01-01T00:00:00+09:00",
- "updated_at": "2025-01-01T00:00:00+09:00",
- "deleted": true,
- "deliveries": [
- {
- "id": 10,
- "inventory_id": 100,
- "title": "商品A",
- "quantity": "5.0",
- "unit": "個",
- "unit_price": "2000.0",
- "subtotal_amount": "10000.0",
- "status": "before_delivery",
- "delivery_date": "2025-01-15",
- "estimated_delivery_date": "2025-01-20",
- "etc": "備考テキスト",
- "deleted": true,
- "variants": [
- {
- "data_key": "12345",
- "quantity": "5.0",
- "unit_price": "2000.0",
- "amount": "10000.0",
- "unit_snapshot": {
- "factor": "10.0",
- "piece_name": "個",
- "box_name": "箱"
}, - "box_quantity": "1.0",
- "box_unit": "箱",
- "items": [
- {
- "variant_setting_item_id": 1,
- "label": "色",
- "value": "赤"
}
]
}
]
}
], - "date_of_issue": "2025-01-10"
}
}出庫データ詳細取得
指定されたIDの出庫データを取得します。 出庫物品(明細)をネストして返します。
| company_id required | integer <int32> 会社ID |
| id required | integer <int32> 出庫データID |
| include_deleted | boolean 削除済みデータも含める(デフォルト: false)。 include_deleted=true の場合、削除済みの親 PackingSlip と、ネストされた deliveries の削除済み明細も含めて返却します。 受理される値:
|
{- "data": {
- "id": 1,
- "num": "D-001",
- "customer_name": "テスト取引先",
- "status": "before_delivery",
- "total_amount": "10000.0",
- "delivery_date": "2025-01-15",
- "estimated_delivery_date": "2025-01-20",
- "create_user_name": "string",
- "memo": "社内メモ",
- "note": "備考",
- "created_at": "2025-01-01T00:00:00+09:00",
- "updated_at": "2025-01-01T00:00:00+09:00",
- "deleted": true,
- "deliveries": [
- {
- "id": 10,
- "inventory_id": 100,
- "title": "商品A",
- "quantity": "5.0",
- "unit": "個",
- "unit_price": "2000.0",
- "subtotal_amount": "10000.0",
- "status": "before_delivery",
- "delivery_date": "2025-01-15",
- "estimated_delivery_date": "2025-01-20",
- "etc": "備考テキスト",
- "deleted": true,
- "variants": [
- {
- "data_key": "12345",
- "quantity": "5.0",
- "unit_price": "2000.0",
- "amount": "10000.0",
- "unit_snapshot": {
- "factor": "10.0",
- "piece_name": "個",
- "box_name": "箱"
}, - "box_quantity": "1.0",
- "box_unit": "箱",
- "items": [
- {
- "variant_setting_item_id": 1,
- "label": "色",
- "value": "赤"
}
]
}
]
}
], - "date_of_issue": "2025-01-10"
}
}出庫データ更新
指定されたIDの出庫データを更新します。 出庫済みの物品は数量・ステータスの変更ができません。
| company_id required | integer <int32> 会社ID |
| id required | integer <int32> 出庫データID |
更新パラメータ
| num | string 出庫番号 |
| customer_name | string 取引先名 |
| memo | string 社内メモ(最大250文字) |
| note | string 備考(最大250文字) |
| date_of_issue | string or null <date> 発行日(YYYY-MM-DD形式) |
Array of objects (Models.PackingSlip.UpdatePackingSlipItemRequest) 出庫物品の配列 |
{- "num": "string",
- "customer_name": "string",
- "memo": "string",
- "note": "string",
- "date_of_issue": "2019-08-24",
- "deliveries": [
- {
- "inventory_id": 0,
- "quantity": "string",
- "unit_price": "string",
- "status": "before_delivery",
- "delivery_date": "2019-08-24",
- "estimated_delivery_date": "2019-08-24",
- "etc": "string",
- "variants": [
- {
- "id": 0,
- "code": "string",
- "quantity": "string",
- "unit_price": "string",
- "items": [
- {
- "label": "string",
- "value": "string"
}
]
}
]
}
]
}{- "data": {
- "id": 1,
- "num": "D-001",
- "customer_name": "テスト取引先",
- "status": "before_delivery",
- "total_amount": "10000.0",
- "delivery_date": "2025-01-15",
- "estimated_delivery_date": "2025-01-20",
- "create_user_name": "string",
- "memo": "社内メモ",
- "note": "備考",
- "created_at": "2025-01-01T00:00:00+09:00",
- "updated_at": "2025-01-01T00:00:00+09:00",
- "deleted": true,
- "deliveries": [
- {
- "id": 10,
- "inventory_id": 100,
- "title": "商品A",
- "quantity": "5.0",
- "unit": "個",
- "unit_price": "2000.0",
- "subtotal_amount": "10000.0",
- "status": "before_delivery",
- "delivery_date": "2025-01-15",
- "estimated_delivery_date": "2025-01-20",
- "etc": "備考テキスト",
- "deleted": true,
- "variants": [
- {
- "data_key": "12345",
- "quantity": "5.0",
- "unit_price": "2000.0",
- "amount": "10000.0",
- "unit_snapshot": {
- "factor": "10.0",
- "piece_name": "個",
- "box_name": "箱"
}, - "box_quantity": "1.0",
- "box_unit": "箱",
- "items": [
- {
- "variant_setting_item_id": 1,
- "label": "色",
- "value": "赤"
}
]
}
]
}
], - "date_of_issue": "2025-01-10"
}
}出庫データ削除
指定されたIDの出庫データを取消します。 出庫済みの物品がある場合、在庫数量が戻されます。
| company_id required | integer <int32> 会社ID |
| id required | integer <int32> 出庫データID |
{- "title": "Unauthorized",
- "status": 401,
- "detail": "トークンが無効または未指定です"
}出庫物品一覧取得
出庫物品(明細)の一覧を取得します。 ページネーションに対応しており、デフォルトで1ページあたり1000件を返します。 ステータス・日付による絞り込みが可能です。
| company_id required | integer <int32> 会社ID |
| page | integer <int32> ページ番号(デフォルト: 1) |
| per_page | integer <int32> 1ページあたりの件数(デフォルト: 100, 最大: 100) |
| status | string ステータスで絞り込み(before_delivery / during_delivery / completed_delivery) |
| start_date | string <date> 開始日で絞り込み(YYYY-MM-DD形式、delivery_date >= start_date) |
| end_date | string <date> 終了日で絞り込み(YYYY-MM-DD形式、delivery_date <= end_date) |
| include_deleted | boolean 削除済みデータも含める(デフォルト: false)。 差分同期用途では start_updated_at と併用することを推奨します。 取得範囲(出庫は親 PackingSlip と明細 Delivery の2段階フィルタを持つ):
受理される値:
|
| start_updated_at | string <date-time> レコード更新日時の下限(差分同期用、ISO8601形式、updated_at >= 指定値、指定日時を含む) |
| end_updated_at | string <date-time> レコード更新日時の上限(差分同期用、ISO8601形式、updated_at < 指定値、指定日時は含まない)。 半開区間 [start_updated_at, end_updated_at) で範囲指定します。 差分同期の推奨: 次回リクエストの start_updated_at に前回の end_updated_at と同じ値を指定すれば、レコードが重複しません。 |
{- "data": [
- {
- "id": 10,
- "packing_slip_id": 1,
- "inventory_id": 100,
- "title": "商品A",
- "quantity": "5.0",
- "unit": "個",
- "unit_price": "2000.0",
- "status": "before_delivery",
- "delivery_date": "2025-01-15",
- "estimated_delivery_date": "2025-01-20",
- "etc": "備考テキスト",
- "date_of_issue": "2025-01-10",
- "created_at": "2025-01-01T00:00:00.000+09:00",
- "updated_at": "2025-01-01T00:00:00.000+09:00",
- "deleted": true
}
], - "pagination": {
- "current_page": 1,
- "per_page": 20,
- "total_count": 5,
- "total_pages": 1
}
}出庫物品削除
指定されたIDの出庫物品(明細)を取消します。 出庫済みの物品の場合、在庫数量が戻されます。 全ての明細が削除された場合、親の出庫データも論理削除されます。
| company_id required | integer <int32> 会社ID |
| id required | integer <int32> 出庫物品ID |
{- "title": "Unauthorized",
- "status": 401,
- "detail": "トークンが無効または未指定です"
}入庫一覧取得
入庫データの一覧を取得します。 論理削除済みのデータは除外されます。
| company_id required | integer <int32> 拠点ID |
| page | integer <int32> ページ番号(デフォルト: 1) |
| per_page | integer <int32> 1ページあたりの件数(デフォルト: 100, 最大: 100) |
| status | string (PurchaseStatus) Enum: "none" "not_ordered" "ordered" "purchased" "quotation_requested" ステータスフィルタ |
| start_date | string <date> 入庫日の開始日(YYYY-MM-DD) |
| end_date | string <date> 入庫日の終了日(YYYY-MM-DD) |
| num | string 入庫番号 |
| inventory_id | integer <int32> 在庫ID |
| memo | string メモ(部分一致検索) |
| start_updated_at | string <date-time> レコード更新日時の下限(差分同期用、ISO8601形式、updated_at >= 指定値、指定日時を含む) |
| end_updated_at | string <date-time> レコード更新日時の上限(差分同期用、ISO8601形式、updated_at < 指定値、指定日時は含まない)。 半開区間 [start_updated_at, end_updated_at) で範囲指定します。 差分同期の推奨: 次回リクエストの start_updated_at に前回の end_updated_at と同じ値を指定すれば、レコードが重複しません。 |
| include_deleted | boolean 削除済みデータも含める(デフォルト: false)。 差分同期用途では start_updated_at と併用することを推奨します。 include_deleted=true 時、ネストされた purchase_items も削除済み明細を含めて返却します。 受理される値:
注意: サブスクリプションプランに応じた保持期間制限が適用されます (Free / Entry / Minimum: 2年、Lite: 5年、Full / Pro: 7年)。 保持期間を超えた古いデータは include_deleted=true でも取得できません。 |
{- "data": [
- {
- "id": 0,
- "num": "string",
- "customer_name": "string",
- "status": "none",
- "total_amount": "string",
- "purchase_date": "2025-01-15",
- "estimated_purchase_date": "2025-01-20",
- "create_user_name": "string",
- "memo": "string",
- "etc": "string",
- "created_at": "2025-01-01T00:00:00.000+09:00",
- "updated_at": "2025-01-01T00:00:00.000+09:00",
- "deleted": true,
- "purchase_items": [
- {
- "id": 0,
- "purchase_id": 0,
- "inventory_id": 0,
- "title": "string",
- "quantity": "string",
- "unit": "string",
- "unit_price": "string",
- "unit_snapshot": {
- "factor": "string",
- "piece_name": "string",
- "box_name": "string"
}, - "box_quantity": "string",
- "box_unit": "string",
- "subtotal_amount": "string",
- "status": "none",
- "purchase_date": "2025-01-15",
- "estimated_purchase_date": "2025-01-20",
- "etc": "string",
- "created_at": "2025-01-01T00:00:00.000+09:00",
- "updated_at": "2025-01-01T00:00:00.000+09:00",
- "deleted": true,
- "variants": [
- {
- "data_key": "string",
- "quantity": "string",
- "unit_price": "string",
- "amount": "string",
- "unit_snapshot": {
- "factor": "string",
- "piece_name": "string",
- "box_name": "string"
}, - "box_quantity": "string",
- "box_unit": "string",
- "items": [
- {
- "variant_setting_item_id": 0,
- "label": "string",
- "value": "string"
}
]
}
]
}
]
}
], - "pagination": {
- "current_page": 1,
- "per_page": 20,
- "total_count": 5,
- "total_pages": 1
}
}入庫作成
新しい入庫データを作成します。 statusがpurchasedの場合、在庫数量が加算されます。
| company_id required | integer <int32> 拠点ID |
入庫データ
| association | string Value: "inventory_title" 在庫データ関連付け方法。 inventory_title 指定時は purchase_items[].inventory_title で同名の有効在庫を検索し、 見つからない場合は在庫を自動作成します。 |
| customer_name | string 取引先名 |
| status | string Enum: "none" "not_ordered" "ordered" "purchased" "quotation_requested" ステータス |
| purchase_date | string or null <date> 入庫日(YYYY-MM-DD)。status が purchased のとき必須。 |
| estimated_purchase_date | string or null <date> 入庫予定日(YYYY-MM-DD)。status に関係なく指定可能。 |
| memo | string メモ |
| etc | string 備考 |
required | Array of objects (CreatePurchaseItemRequest) 入庫明細(1件以上必須)。 association未指定時は各明細に inventory_id を指定し、 association=inventory_title 時は各明細に inventory_title を指定します。 |
{- "association": "inventory_title",
- "customer_name": "string",
- "status": "none",
- "purchase_date": "2019-08-24",
- "estimated_purchase_date": "2019-08-24",
- "memo": "string",
- "etc": "string",
- "purchase_items": [
- {
- "inventory_id": 0,
- "inventory_title": "string",
- "title": "string",
- "quantity": "string",
- "unit": "string",
- "unit_price": "string",
- "status": "none",
- "purchase_date": "2019-08-24",
- "estimated_purchase_date": "2019-08-24",
- "etc": "string",
- "variants": [
- {
- "id": 0,
- "code": "string",
- "quantity": "string",
- "unit_price": "string",
- "items": [
- {
- "label": "string",
- "value": "string"
}
]
}
]
}
]
}{- "data": {
- "id": 0,
- "num": "string",
- "customer_name": "string",
- "status": "none",
- "total_amount": "string",
- "purchase_date": "2025-01-15",
- "estimated_purchase_date": "2025-01-20",
- "create_user_name": "string",
- "memo": "string",
- "etc": "string",
- "created_at": "2025-01-01T00:00:00.000+09:00",
- "updated_at": "2025-01-01T00:00:00.000+09:00",
- "deleted": true,
- "purchase_items": [
- {
- "id": 0,
- "purchase_id": 0,
- "inventory_id": 0,
- "title": "string",
- "quantity": "string",
- "unit": "string",
- "unit_price": "string",
- "unit_snapshot": {
- "factor": "string",
- "piece_name": "string",
- "box_name": "string"
}, - "box_quantity": "string",
- "box_unit": "string",
- "subtotal_amount": "string",
- "status": "none",
- "purchase_date": "2025-01-15",
- "estimated_purchase_date": "2025-01-20",
- "etc": "string",
- "created_at": "2025-01-01T00:00:00.000+09:00",
- "updated_at": "2025-01-01T00:00:00.000+09:00",
- "deleted": true,
- "variants": [
- {
- "data_key": "string",
- "quantity": "string",
- "unit_price": "string",
- "amount": "string",
- "unit_snapshot": {
- "factor": "string",
- "piece_name": "string",
- "box_name": "string"
}, - "box_quantity": "string",
- "box_unit": "string",
- "items": [
- {
- "variant_setting_item_id": 0,
- "label": "string",
- "value": "string"
}
]
}
]
}
]
}
}入庫詳細取得
指定された入庫データの詳細を取得します。 論理削除済みの明細は除外されます。
| company_id required | integer <int32> 拠点ID |
| id required | integer <int32> 入庫ID |
| include_deleted | boolean 削除済みデータも含める(デフォルト: false)。 include_deleted=true の場合、削除済みの親 Purchase と、ネストされた purchase_items の削除済み明細も含めて返却します。 受理される値:
|
{- "data": {
- "id": 0,
- "num": "string",
- "customer_name": "string",
- "status": "none",
- "total_amount": "string",
- "purchase_date": "2025-01-15",
- "estimated_purchase_date": "2025-01-20",
- "create_user_name": "string",
- "memo": "string",
- "etc": "string",
- "created_at": "2025-01-01T00:00:00.000+09:00",
- "updated_at": "2025-01-01T00:00:00.000+09:00",
- "deleted": true,
- "purchase_items": [
- {
- "id": 0,
- "purchase_id": 0,
- "inventory_id": 0,
- "title": "string",
- "quantity": "string",
- "unit": "string",
- "unit_price": "string",
- "unit_snapshot": {
- "factor": "string",
- "piece_name": "string",
- "box_name": "string"
}, - "box_quantity": "string",
- "box_unit": "string",
- "subtotal_amount": "string",
- "status": "none",
- "purchase_date": "2025-01-15",
- "estimated_purchase_date": "2025-01-20",
- "etc": "string",
- "created_at": "2025-01-01T00:00:00.000+09:00",
- "updated_at": "2025-01-01T00:00:00.000+09:00",
- "deleted": true,
- "variants": [
- {
- "data_key": "string",
- "quantity": "string",
- "unit_price": "string",
- "amount": "string",
- "unit_snapshot": {
- "factor": "string",
- "piece_name": "string",
- "box_name": "string"
}, - "box_quantity": "string",
- "box_unit": "string",
- "items": [
- {
- "variant_setting_item_id": 0,
- "label": "string",
- "value": "string"
}
]
}
]
}
]
}
}入庫更新
既存の入庫データを更新します。 purchasedステータスの明細は数量・ステータスの変更が制限されます。
| company_id required | integer <int32> 拠点ID |
| id required | integer <int32> 入庫ID |
更新データ
| customer_name | string 取引先名 |
| purchase_date | string or null <date> 入庫日(YYYY-MM-DD)。status が purchased のとき必須。 |
| estimated_purchase_date | string or null <date> 入庫予定日(YYYY-MM-DD)。status に関係なく指定可能。 |
| memo | string メモ |
| etc | string 備考 |
Array of objects (CreatePurchaseItemRequest) 入庫明細 |
{- "customer_name": "string",
- "purchase_date": "2019-08-24",
- "estimated_purchase_date": "2019-08-24",
- "memo": "string",
- "etc": "string",
- "purchase_items": [
- {
- "inventory_id": 0,
- "inventory_title": "string",
- "title": "string",
- "quantity": "string",
- "unit": "string",
- "unit_price": "string",
- "status": "none",
- "purchase_date": "2019-08-24",
- "estimated_purchase_date": "2019-08-24",
- "etc": "string",
- "variants": [
- {
- "id": 0,
- "code": "string",
- "quantity": "string",
- "unit_price": "string",
- "items": [
- {
- "label": "string",
- "value": "string"
}
]
}
]
}
]
}{- "data": {
- "id": 0,
- "num": "string",
- "customer_name": "string",
- "status": "none",
- "total_amount": "string",
- "purchase_date": "2025-01-15",
- "estimated_purchase_date": "2025-01-20",
- "create_user_name": "string",
- "memo": "string",
- "etc": "string",
- "created_at": "2025-01-01T00:00:00.000+09:00",
- "updated_at": "2025-01-01T00:00:00.000+09:00",
- "deleted": true,
- "purchase_items": [
- {
- "id": 0,
- "purchase_id": 0,
- "inventory_id": 0,
- "title": "string",
- "quantity": "string",
- "unit": "string",
- "unit_price": "string",
- "unit_snapshot": {
- "factor": "string",
- "piece_name": "string",
- "box_name": "string"
}, - "box_quantity": "string",
- "box_unit": "string",
- "subtotal_amount": "string",
- "status": "none",
- "purchase_date": "2025-01-15",
- "estimated_purchase_date": "2025-01-20",
- "etc": "string",
- "created_at": "2025-01-01T00:00:00.000+09:00",
- "updated_at": "2025-01-01T00:00:00.000+09:00",
- "deleted": true,
- "variants": [
- {
- "data_key": "string",
- "quantity": "string",
- "unit_price": "string",
- "amount": "string",
- "unit_snapshot": {
- "factor": "string",
- "piece_name": "string",
- "box_name": "string"
}, - "box_quantity": "string",
- "box_unit": "string",
- "items": [
- {
- "variant_setting_item_id": 0,
- "label": "string",
- "value": "string"
}
]
}
]
}
]
}
}入庫物品一覧取得
入庫物品(明細)の一覧を取得します。 ページネーションに対応しており、デフォルトで1ページあたり1000件を返します。 ステータス・日付による絞り込みが可能です。
| company_id required | integer <int32> 会社ID |
| page | integer <int32> ページ番号(デフォルト: 1) |
| per_page | integer <int32> 1ページあたりの件数(デフォルト: 100, 最大: 100) |
| status | string (PurchaseStatus) Enum: "none" "not_ordered" "ordered" "purchased" "quotation_requested" ステータスで絞り込み |
| start_date | string <date> 開始日で絞り込み(YYYY-MM-DD形式、purchase_date >= start_date) |
| end_date | string <date> 終了日で絞り込み(YYYY-MM-DD形式、purchase_date <= end_date) |
| include_deleted | boolean 削除済みデータも含める(デフォルト: false)。 差分同期用途では start_updated_at と併用することを推奨します。 取得範囲(入庫明細は親 Purchase と明細 PurchaseItem の2段階フィルタを持つ):
受理される値:
|
| start_updated_at | string <date-time> レコード更新日時の下限(差分同期用、ISO8601形式、updated_at >= 指定値、指定日時を含む) |
| end_updated_at | string <date-time> レコード更新日時の上限(差分同期用、ISO8601形式、updated_at < 指定値、指定日時は含まない)。 半開区間 [start_updated_at, end_updated_at) で範囲指定します。 差分同期の推奨: 次回リクエストの start_updated_at に前回の end_updated_at と同じ値を指定すれば、レコードが重複しません。 |
{- "data": [
- {
- "id": 0,
- "purchase_id": 0,
- "inventory_id": 0,
- "title": "string",
- "quantity": "string",
- "unit": "string",
- "unit_price": "string",
- "unit_snapshot": {
- "factor": "string",
- "piece_name": "string",
- "box_name": "string"
}, - "box_quantity": "string",
- "box_unit": "string",
- "subtotal_amount": "string",
- "status": "none",
- "purchase_date": "2025-01-15",
- "estimated_purchase_date": "2025-01-20",
- "etc": "string",
- "created_at": "2025-01-01T00:00:00.000+09:00",
- "updated_at": "2025-01-01T00:00:00.000+09:00",
- "deleted": true,
- "variants": [
- {
- "data_key": "string",
- "quantity": "string",
- "unit_price": "string",
- "amount": "string",
- "unit_snapshot": {
- "factor": "string",
- "piece_name": "string",
- "box_name": "string"
}, - "box_quantity": "string",
- "box_unit": "string",
- "items": [
- {
- "variant_setting_item_id": 0,
- "label": "string",
- "value": "string"
}
]
}
]
}
], - "pagination": {
- "current_page": 1,
- "per_page": 20,
- "total_count": 5,
- "total_pages": 1
}
}入庫物品削除
指定されたIDの入庫物品(明細)を取消します。 入庫済みの物品の場合、在庫数量が戻されます。 全ての明細が削除された場合、親の入庫データも論理削除されます。
| company_id required | integer <int32> 会社ID |
| id required | integer <int32> 入庫物品ID |
{- "title": "Unauthorized",
- "status": 401,
- "detail": "トークンが無効または未指定です"
}発注一覧取得
指定した会社の発注一覧を取得します。
| company_id required | integer <int32> 会社ID |
| keyword | string キーワード検索 |
| statuses | Array of strings ステータスフィルター |
| start_date | string <date> 発注日の開始日(YYYY-MM-DD) |
| end_date | string <date> 発注日の終了日(YYYY-MM-DD) |
| start_updated_at | string <date-time> レコード更新日時の下限(差分同期用、ISO8601形式、updated_at >= 指定値) |
| end_updated_at | string <date-time> レコード更新日時の上限(差分同期用、ISO8601形式、updated_at <= 指定値) |
| page | integer <int32> ページ番号(デフォルト: 1) |
| per_page | integer <int32> 1ページあたりの件数(デフォルト: 20、最大: 50) |
{- "data": [
- {
- "id": 1,
- "order_number": "PO-2026-001",
- "status": "unconfirmed",
- "ordered_at": "2026-03-10T00:00:00.000+09:00",
- "request_delivery_date": "2026-03-25",
- "estimated_delivery_date": "2026-03-20",
- "subtotal": "10000.0",
- "tax": "1000.0",
- "total": "11000.0",
- "note": "納期厳守でお願いします",
- "created_at": "2026-03-10T10:00:00.000+09:00",
- "updated_at": "2026-03-10T10:00:00.000+09:00",
- "supplier": {
- "name": "株式会社サプライヤー",
- "name_postfix": "御中"
}, - "items_count": 3
}
], - "pagination": {
- "current_page": 1,
- "per_page": 20,
- "total_count": 5,
- "total_pages": 1
}
}発注作成
新しい発注を作成します。
| company_id required | integer <int32> 会社ID |
発注作成リクエスト
| ordered_at | string <date-time> 発注日(省略時は現在日時) |
| order_number | string 発注番号 |
| request_delivery_date | string <date> 希望納期 |
| estimated_delivery_date | string <date> 納品予定日 |
| note | string 備考 |
required | object 仕入先情報(必須) |
object 発注元情報 | |
object 配送指示情報 | |
required | Array of objects (PurchaseOrderItemRequest) non-empty 発注明細(1件以上必須) |
{- "ordered_at": "2019-08-24T14:15:22Z",
- "order_number": "string",
- "request_delivery_date": "2019-08-24",
- "estimated_delivery_date": "2019-08-24",
- "note": "string",
- "supplier": {
- "name": "string",
- "name_postfix": "string",
- "customer_id": 0,
- "zip": "string",
- "address": "string",
- "building_name": "string",
- "phone_number": "string",
- "fax_number": "string",
- "email": "string"
}, - "buyer": {
- "name": "string",
- "name_postfix": "string",
- "customer_id": 0,
- "contact_person": "string",
- "zip": "string",
- "address": "string",
- "building_name": "string",
- "phone_number": "string",
- "fax_number": "string",
- "email": "string"
}, - "shipping_instruction": {
- "to_name": "string",
- "to_name_postfix": "string",
- "to_zip": "string",
- "to_phone_number": "string",
- "to_address": "string",
- "to_building_name": "string",
- "comment": "string"
}, - "purchase_order_items": [
- {
- "inventory_id": 0,
- "item_title": "string",
- "quantity": 0.1,
- "unit_price": 0.1,
- "unit_name": "string",
- "quantity_per_package": 0.1,
- "request_delivery_date": "2019-08-24",
- "note": "string"
}
]
}{- "data": {
- "id": 1,
- "order_number": "PO-2026-001",
- "status": "unconfirmed",
- "transaction_type": "external",
- "ordered_at": "2026-03-10T00:00:00.000+09:00",
- "request_delivery_date": "2026-03-25",
- "estimated_delivery_date": "2026-03-20",
- "subtotal": "10000.0",
- "tax": "1000.0",
- "total": "11000.0",
- "note": "納期厳守でお願いします",
- "created_at": "2026-03-10T10:00:00.000+09:00",
- "updated_at": "2026-03-10T10:00:00.000+09:00",
- "tax_rate": "10.0",
- "cancel_reason": "仕入先都合によるキャンセル",
- "memo": "社内用メモ",
- "submitted_at": "2026-03-11T09:00:00.000+09:00",
- "accepted_at": "2026-03-12T10:00:00.000+09:00",
- "completed_at": "2026-03-20T15:00:00.000+09:00",
- "cancelled_at": "2026-03-15T14:00:00.000+09:00",
- "items": [
- {
- "id": 1,
- "inventory_id": 10,
- "item_title": "部品A",
- "quantity": "5",
- "unit_price": "2000",
- "subtotal": "10000",
- "unit_name": "個",
- "quantity_per_package": "1",
- "request_delivery_date": "2026-03-25",
- "note": "急ぎでお願いします"
}
], - "supplier": {
- "customer_id": 1,
- "name": "株式会社サプライヤー",
- "name_postfix": "御中",
- "zip": "100-0001",
- "address": "東京都千代田区千代田1-1",
- "building_name": "サプライヤービル3F",
- "phone_number": "03-1234-5678",
- "fax_number": "03-1234-5679",
- "email": "supplier@example.com"
}, - "buyer": {
- "customer_id": 1,
- "name": "株式会社テスト",
- "name_postfix": "御中",
- "zip": "150-0001",
- "address": "東京都渋谷区渋谷1-1",
- "building_name": "テストビル5F",
- "phone_number": "03-9876-5432",
- "fax_number": "03-9876-5433",
- "email": "buyer@example.com",
- "contact_person": "山田太郎"
}, - "shipping_instruction": {
- "to_name": "株式会社配送先",
- "to_name_postfix": "御中",
- "to_zip": "150-0001",
- "to_phone_number": "03-9876-5432",
- "to_address": "東京都渋谷区渋谷1-1",
- "to_building_name": "渋谷ビル5F",
- "comment": "午前中指定でお願いします"
}
}
}発注詳細取得
指定した発注の詳細を取得します。
| company_id required | integer <int32> 会社ID |
| id required | integer <int32> 発注ID |
{- "data": {
- "id": 1,
- "order_number": "PO-2026-001",
- "status": "unconfirmed",
- "transaction_type": "external",
- "ordered_at": "2026-03-10T00:00:00.000+09:00",
- "request_delivery_date": "2026-03-25",
- "estimated_delivery_date": "2026-03-20",
- "subtotal": "10000.0",
- "tax": "1000.0",
- "total": "11000.0",
- "note": "納期厳守でお願いします",
- "created_at": "2026-03-10T10:00:00.000+09:00",
- "updated_at": "2026-03-10T10:00:00.000+09:00",
- "tax_rate": "10.0",
- "cancel_reason": "仕入先都合によるキャンセル",
- "memo": "社内用メモ",
- "submitted_at": "2026-03-11T09:00:00.000+09:00",
- "accepted_at": "2026-03-12T10:00:00.000+09:00",
- "completed_at": "2026-03-20T15:00:00.000+09:00",
- "cancelled_at": "2026-03-15T14:00:00.000+09:00",
- "items": [
- {
- "id": 1,
- "inventory_id": 10,
- "item_title": "部品A",
- "quantity": "5",
- "unit_price": "2000",
- "subtotal": "10000",
- "unit_name": "個",
- "quantity_per_package": "1",
- "request_delivery_date": "2026-03-25",
- "note": "急ぎでお願いします"
}
], - "supplier": {
- "customer_id": 1,
- "name": "株式会社サプライヤー",
- "name_postfix": "御中",
- "zip": "100-0001",
- "address": "東京都千代田区千代田1-1",
- "building_name": "サプライヤービル3F",
- "phone_number": "03-1234-5678",
- "fax_number": "03-1234-5679",
- "email": "supplier@example.com"
}, - "buyer": {
- "customer_id": 1,
- "name": "株式会社テスト",
- "name_postfix": "御中",
- "zip": "150-0001",
- "address": "東京都渋谷区渋谷1-1",
- "building_name": "テストビル5F",
- "phone_number": "03-9876-5432",
- "fax_number": "03-9876-5433",
- "email": "buyer@example.com",
- "contact_person": "山田太郎"
}, - "shipping_instruction": {
- "to_name": "株式会社配送先",
- "to_name_postfix": "御中",
- "to_zip": "150-0001",
- "to_phone_number": "03-9876-5432",
- "to_address": "東京都渋谷区渋谷1-1",
- "to_building_name": "渋谷ビル5F",
- "comment": "午前中指定でお願いします"
}
}
}発注更新
既存の発注を更新します。
| company_id required | integer <int32> 会社ID |
| id required | integer <int32> 発注ID |
発注更新リクエスト
| ordered_at | string <date-time> 発注日 |
| order_number | string 発注番号 |
| request_delivery_date | string <date> 希望納期 |
| estimated_delivery_date | string <date> 納品予定日 |
| note | string 備考 |
object 仕入先情報 | |
object 発注元情報 | |
object 配送指示情報 | |
Array of objects (PurchaseOrderItemRequest) 発注明細 |
{- "ordered_at": "2019-08-24T14:15:22Z",
- "order_number": "string",
- "request_delivery_date": "2019-08-24",
- "estimated_delivery_date": "2019-08-24",
- "note": "string",
- "supplier": {
- "name": "string",
- "name_postfix": "string",
- "customer_id": 0,
- "zip": "string",
- "address": "string",
- "building_name": "string",
- "phone_number": "string",
- "fax_number": "string",
- "email": "string"
}, - "buyer": {
- "name": "string",
- "name_postfix": "string",
- "customer_id": 0,
- "contact_person": "string",
- "zip": "string",
- "address": "string",
- "building_name": "string",
- "phone_number": "string",
- "fax_number": "string",
- "email": "string"
}, - "shipping_instruction": {
- "to_name": "string",
- "to_name_postfix": "string",
- "to_zip": "string",
- "to_phone_number": "string",
- "to_address": "string",
- "to_building_name": "string",
- "comment": "string"
}, - "purchase_order_items": [
- {
- "inventory_id": 0,
- "item_title": "string",
- "quantity": 0.1,
- "unit_price": 0.1,
- "unit_name": "string",
- "quantity_per_package": 0.1,
- "request_delivery_date": "2019-08-24",
- "note": "string"
}
]
}{- "data": {
- "id": 1,
- "order_number": "PO-2026-001",
- "status": "unconfirmed",
- "transaction_type": "external",
- "ordered_at": "2026-03-10T00:00:00.000+09:00",
- "request_delivery_date": "2026-03-25",
- "estimated_delivery_date": "2026-03-20",
- "subtotal": "10000.0",
- "tax": "1000.0",
- "total": "11000.0",
- "note": "納期厳守でお願いします",
- "created_at": "2026-03-10T10:00:00.000+09:00",
- "updated_at": "2026-03-10T10:00:00.000+09:00",
- "tax_rate": "10.0",
- "cancel_reason": "仕入先都合によるキャンセル",
- "memo": "社内用メモ",
- "submitted_at": "2026-03-11T09:00:00.000+09:00",
- "accepted_at": "2026-03-12T10:00:00.000+09:00",
- "completed_at": "2026-03-20T15:00:00.000+09:00",
- "cancelled_at": "2026-03-15T14:00:00.000+09:00",
- "items": [
- {
- "id": 1,
- "inventory_id": 10,
- "item_title": "部品A",
- "quantity": "5",
- "unit_price": "2000",
- "subtotal": "10000",
- "unit_name": "個",
- "quantity_per_package": "1",
- "request_delivery_date": "2026-03-25",
- "note": "急ぎでお願いします"
}
], - "supplier": {
- "customer_id": 1,
- "name": "株式会社サプライヤー",
- "name_postfix": "御中",
- "zip": "100-0001",
- "address": "東京都千代田区千代田1-1",
- "building_name": "サプライヤービル3F",
- "phone_number": "03-1234-5678",
- "fax_number": "03-1234-5679",
- "email": "supplier@example.com"
}, - "buyer": {
- "customer_id": 1,
- "name": "株式会社テスト",
- "name_postfix": "御中",
- "zip": "150-0001",
- "address": "東京都渋谷区渋谷1-1",
- "building_name": "テストビル5F",
- "phone_number": "03-9876-5432",
- "fax_number": "03-9876-5433",
- "email": "buyer@example.com",
- "contact_person": "山田太郎"
}, - "shipping_instruction": {
- "to_name": "株式会社配送先",
- "to_name_postfix": "御中",
- "to_zip": "150-0001",
- "to_phone_number": "03-9876-5432",
- "to_address": "東京都渋谷区渋谷1-1",
- "to_building_name": "渋谷ビル5F",
- "comment": "午前中指定でお願いします"
}
}
}発注受領
発注を受領します。
| company_id required | integer <int32> 会社ID |
| id required | integer <int32> 発注ID |
発注受領リクエスト
| estimated_delivery_date | string <date> 納品予定日 |
{- "estimated_delivery_date": "2019-08-24"
}{- "data": {
- "id": 1,
- "order_number": "PO-2026-001",
- "status": "unconfirmed",
- "transaction_type": "external",
- "ordered_at": "2026-03-10T00:00:00.000+09:00",
- "request_delivery_date": "2026-03-25",
- "estimated_delivery_date": "2026-03-20",
- "subtotal": "10000.0",
- "tax": "1000.0",
- "total": "11000.0",
- "note": "納期厳守でお願いします",
- "created_at": "2026-03-10T10:00:00.000+09:00",
- "updated_at": "2026-03-10T10:00:00.000+09:00",
- "tax_rate": "10.0",
- "cancel_reason": "仕入先都合によるキャンセル",
- "memo": "社内用メモ",
- "submitted_at": "2026-03-11T09:00:00.000+09:00",
- "accepted_at": "2026-03-12T10:00:00.000+09:00",
- "completed_at": "2026-03-20T15:00:00.000+09:00",
- "cancelled_at": "2026-03-15T14:00:00.000+09:00",
- "items": [
- {
- "id": 1,
- "inventory_id": 10,
- "item_title": "部品A",
- "quantity": "5",
- "unit_price": "2000",
- "subtotal": "10000",
- "unit_name": "個",
- "quantity_per_package": "1",
- "request_delivery_date": "2026-03-25",
- "note": "急ぎでお願いします"
}
], - "supplier": {
- "customer_id": 1,
- "name": "株式会社サプライヤー",
- "name_postfix": "御中",
- "zip": "100-0001",
- "address": "東京都千代田区千代田1-1",
- "building_name": "サプライヤービル3F",
- "phone_number": "03-1234-5678",
- "fax_number": "03-1234-5679",
- "email": "supplier@example.com"
}, - "buyer": {
- "customer_id": 1,
- "name": "株式会社テスト",
- "name_postfix": "御中",
- "zip": "150-0001",
- "address": "東京都渋谷区渋谷1-1",
- "building_name": "テストビル5F",
- "phone_number": "03-9876-5432",
- "fax_number": "03-9876-5433",
- "email": "buyer@example.com",
- "contact_person": "山田太郎"
}, - "shipping_instruction": {
- "to_name": "株式会社配送先",
- "to_name_postfix": "御中",
- "to_zip": "150-0001",
- "to_phone_number": "03-9876-5432",
- "to_address": "東京都渋谷区渋谷1-1",
- "to_building_name": "渋谷ビル5F",
- "comment": "午前中指定でお願いします"
}
}
}発注キャンセル
発注をキャンセルします。
| company_id required | integer <int32> 会社ID |
| id required | integer <int32> 発注ID |
発注キャンセルリクエスト
| cancel_reason | string キャンセル理由 |
{- "cancel_reason": "string"
}{- "data": {
- "id": 1,
- "order_number": "PO-2026-001",
- "status": "unconfirmed",
- "transaction_type": "external",
- "ordered_at": "2026-03-10T00:00:00.000+09:00",
- "request_delivery_date": "2026-03-25",
- "estimated_delivery_date": "2026-03-20",
- "subtotal": "10000.0",
- "tax": "1000.0",
- "total": "11000.0",
- "note": "納期厳守でお願いします",
- "created_at": "2026-03-10T10:00:00.000+09:00",
- "updated_at": "2026-03-10T10:00:00.000+09:00",
- "tax_rate": "10.0",
- "cancel_reason": "仕入先都合によるキャンセル",
- "memo": "社内用メモ",
- "submitted_at": "2026-03-11T09:00:00.000+09:00",
- "accepted_at": "2026-03-12T10:00:00.000+09:00",
- "completed_at": "2026-03-20T15:00:00.000+09:00",
- "cancelled_at": "2026-03-15T14:00:00.000+09:00",
- "items": [
- {
- "id": 1,
- "inventory_id": 10,
- "item_title": "部品A",
- "quantity": "5",
- "unit_price": "2000",
- "subtotal": "10000",
- "unit_name": "個",
- "quantity_per_package": "1",
- "request_delivery_date": "2026-03-25",
- "note": "急ぎでお願いします"
}
], - "supplier": {
- "customer_id": 1,
- "name": "株式会社サプライヤー",
- "name_postfix": "御中",
- "zip": "100-0001",
- "address": "東京都千代田区千代田1-1",
- "building_name": "サプライヤービル3F",
- "phone_number": "03-1234-5678",
- "fax_number": "03-1234-5679",
- "email": "supplier@example.com"
}, - "buyer": {
- "customer_id": 1,
- "name": "株式会社テスト",
- "name_postfix": "御中",
- "zip": "150-0001",
- "address": "東京都渋谷区渋谷1-1",
- "building_name": "テストビル5F",
- "phone_number": "03-9876-5432",
- "fax_number": "03-9876-5433",
- "email": "buyer@example.com",
- "contact_person": "山田太郎"
}, - "shipping_instruction": {
- "to_name": "株式会社配送先",
- "to_name_postfix": "御中",
- "to_zip": "150-0001",
- "to_phone_number": "03-9876-5432",
- "to_address": "東京都渋谷区渋谷1-1",
- "to_building_name": "渋谷ビル5F",
- "comment": "午前中指定でお願いします"
}
}
}発注完了
発注を完了します。
| company_id required | integer <int32> 会社ID |
| id required | integer <int32> 発注ID |
{- "data": {
- "id": 1,
- "order_number": "PO-2026-001",
- "status": "unconfirmed",
- "transaction_type": "external",
- "ordered_at": "2026-03-10T00:00:00.000+09:00",
- "request_delivery_date": "2026-03-25",
- "estimated_delivery_date": "2026-03-20",
- "subtotal": "10000.0",
- "tax": "1000.0",
- "total": "11000.0",
- "note": "納期厳守でお願いします",
- "created_at": "2026-03-10T10:00:00.000+09:00",
- "updated_at": "2026-03-10T10:00:00.000+09:00",
- "tax_rate": "10.0",
- "cancel_reason": "仕入先都合によるキャンセル",
- "memo": "社内用メモ",
- "submitted_at": "2026-03-11T09:00:00.000+09:00",
- "accepted_at": "2026-03-12T10:00:00.000+09:00",
- "completed_at": "2026-03-20T15:00:00.000+09:00",
- "cancelled_at": "2026-03-15T14:00:00.000+09:00",
- "items": [
- {
- "id": 1,
- "inventory_id": 10,
- "item_title": "部品A",
- "quantity": "5",
- "unit_price": "2000",
- "subtotal": "10000",
- "unit_name": "個",
- "quantity_per_package": "1",
- "request_delivery_date": "2026-03-25",
- "note": "急ぎでお願いします"
}
], - "supplier": {
- "customer_id": 1,
- "name": "株式会社サプライヤー",
- "name_postfix": "御中",
- "zip": "100-0001",
- "address": "東京都千代田区千代田1-1",
- "building_name": "サプライヤービル3F",
- "phone_number": "03-1234-5678",
- "fax_number": "03-1234-5679",
- "email": "supplier@example.com"
}, - "buyer": {
- "customer_id": 1,
- "name": "株式会社テスト",
- "name_postfix": "御中",
- "zip": "150-0001",
- "address": "東京都渋谷区渋谷1-1",
- "building_name": "テストビル5F",
- "phone_number": "03-9876-5432",
- "fax_number": "03-9876-5433",
- "email": "buyer@example.com",
- "contact_person": "山田太郎"
}, - "shipping_instruction": {
- "to_name": "株式会社配送先",
- "to_name_postfix": "御中",
- "to_zip": "150-0001",
- "to_phone_number": "03-9876-5432",
- "to_address": "東京都渋谷区渋谷1-1",
- "to_building_name": "渋谷ビル5F",
- "comment": "午前中指定でお願いします"
}
}
}発注送信
発注を仕入先に送信します。
| company_id required | integer <int32> 会社ID |
| id required | integer <int32> 発注ID |
{- "data": {
- "id": 1,
- "order_number": "PO-2026-001",
- "status": "unconfirmed",
- "transaction_type": "external",
- "ordered_at": "2026-03-10T00:00:00.000+09:00",
- "request_delivery_date": "2026-03-25",
- "estimated_delivery_date": "2026-03-20",
- "subtotal": "10000.0",
- "tax": "1000.0",
- "total": "11000.0",
- "note": "納期厳守でお願いします",
- "created_at": "2026-03-10T10:00:00.000+09:00",
- "updated_at": "2026-03-10T10:00:00.000+09:00",
- "tax_rate": "10.0",
- "cancel_reason": "仕入先都合によるキャンセル",
- "memo": "社内用メモ",
- "submitted_at": "2026-03-11T09:00:00.000+09:00",
- "accepted_at": "2026-03-12T10:00:00.000+09:00",
- "completed_at": "2026-03-20T15:00:00.000+09:00",
- "cancelled_at": "2026-03-15T14:00:00.000+09:00",
- "items": [
- {
- "id": 1,
- "inventory_id": 10,
- "item_title": "部品A",
- "quantity": "5",
- "unit_price": "2000",
- "subtotal": "10000",
- "unit_name": "個",
- "quantity_per_package": "1",
- "request_delivery_date": "2026-03-25",
- "note": "急ぎでお願いします"
}
], - "supplier": {
- "customer_id": 1,
- "name": "株式会社サプライヤー",
- "name_postfix": "御中",
- "zip": "100-0001",
- "address": "東京都千代田区千代田1-1",
- "building_name": "サプライヤービル3F",
- "phone_number": "03-1234-5678",
- "fax_number": "03-1234-5679",
- "email": "supplier@example.com"
}, - "buyer": {
- "customer_id": 1,
- "name": "株式会社テスト",
- "name_postfix": "御中",
- "zip": "150-0001",
- "address": "東京都渋谷区渋谷1-1",
- "building_name": "テストビル5F",
- "phone_number": "03-9876-5432",
- "fax_number": "03-9876-5433",
- "email": "buyer@example.com",
- "contact_person": "山田太郎"
}, - "shipping_instruction": {
- "to_name": "株式会社配送先",
- "to_name_postfix": "御中",
- "to_zip": "150-0001",
- "to_phone_number": "03-9876-5432",
- "to_address": "東京都渋谷区渋谷1-1",
- "to_building_name": "渋谷ビル5F",
- "comment": "午前中指定でお願いします"
}
}
}受注一覧取得
指定した会社の受注一覧を取得します。
| company_id required | integer <int32> 会社ID |
| keyword | string キーワード検索 |
| transaction_type | string 取引区分フィルター |
| start_updated_at | string <date-time> レコード更新日時の下限(差分同期用、ISO8601形式、updated_at >= 指定値) |
| end_updated_at | string <date-time> レコード更新日時の上限(差分同期用、ISO8601形式、updated_at <= 指定値) |
| page | integer <int32> ページ番号(デフォルト: 1) |
| per_page | integer <int32> 1ページあたりの件数(デフォルト: 20、最大: 50) |
{- "data": [
- {
- "id": 1,
- "order_number": "SO-2026-001",
- "status": "unconfirmed",
- "transaction_type": "external",
- "ordered_at": "2026-03-10T00:00:00.000+09:00",
- "estimated_delivery_date": "2026-03-20",
- "request_delivery_date": "2026-03-25",
- "subtotal": "10000.0",
- "tax": "1000.0",
- "total": "11000.0",
- "note": "納期厳守でお願いします",
- "created_at": "2026-03-10T10:00:00.000+09:00",
- "updated_at": "2026-03-10T10:00:00.000+09:00",
- "buyer": {
- "name": "株式会社テスト",
- "name_postfix": "御中"
}
}
], - "pagination": {
- "current_page": 1,
- "per_page": 20,
- "total_count": 5,
- "total_pages": 1
}
}受注作成
新しい受注を作成します。
| company_id required | integer <int32> 会社ID |
受注作成リクエスト
| order_number | string 受注番号 |
| ordered_at | string <date-time> 受注日 |
| transaction_type | string Enum: "internal" "external" 取引区分 |
| estimated_delivery_date | string <date> 希望納期 |
| request_delivery_date | string <date> 依頼納期 |
| note | string 備考 |
required | object 発注元情報 |
object 出荷先情報 | |
required | Array of objects (SalesOrderItemRequest) non-empty 受注明細(1件以上必須) |
Array of objects (SalesOrderChargeRequest) <= 20 items 受注費用明細(送料・値引き等。省略時は費用行なし。最大20件) |
{- "order_number": "string",
- "ordered_at": "2019-08-24T14:15:22Z",
- "transaction_type": "internal",
- "estimated_delivery_date": "2019-08-24",
- "request_delivery_date": "2019-08-24",
- "note": "string",
- "buyer": {
- "name": "string",
- "name_postfix": "string",
- "customer_id": 0,
- "contact_person": "string",
- "zip": "string",
- "address": "string",
- "building_name": "string",
- "phone_number": "string",
- "fax_number": "string",
- "email": "string"
}, - "shipping_instruction": {
- "to_name": "string",
- "to_name_postfix": "string",
- "to_zip": "string",
- "to_phone_number": "string",
- "to_address": "string",
- "to_building_name": "string",
- "comment": "string"
}, - "sales_order_items": [
- {
- "id": 0,
- "sales_item_master_id": 0,
- "item_title": "string",
- "quantity": 0.1,
- "unit_price": 0.1,
- "unit_name": "string",
- "quantity_per_package": 0.1,
- "request_delivery_date": "2019-08-24",
- "estimated_delivery_date": "2019-08-24",
- "note": "string"
}
], - "sales_order_charges": [
- {
- "id": 0,
- "title": "string",
- "quantity": 0.1,
- "unit_name": "string",
- "unit_price": 0.1,
- "note": "string"
}
]
}{- "data": {
- "id": 1,
- "order_number": "SO-2026-001",
- "status": "unconfirmed",
- "transaction_type": "external",
- "ordered_at": "2026-03-10T00:00:00.000+09:00",
- "estimated_delivery_date": "2026-03-20",
- "request_delivery_date": "2026-03-25",
- "subtotal": "10000.0",
- "tax": "1000.0",
- "total": "11000.0",
- "note": "納期厳守でお願いします",
- "created_at": "2026-03-10T10:00:00.000+09:00",
- "updated_at": "2026-03-10T10:00:00.000+09:00",
- "tax_rate": "10.0",
- "cancel_reason": "顧客都合によるキャンセル",
- "cancelled_at": "2026-03-15T14:00:00.000+09:00",
- "items": [
- {
- "id": 1,
- "sales_item_master_id": 10,
- "item_title": "商品A",
- "quantity": "5",
- "unit_price": "2000",
- "subtotal": "10000",
- "unit_name": "個",
- "quantity_per_package": "1",
- "request_delivery_date": "2026-03-25",
- "estimated_delivery_date": "2026-03-20",
- "note": "急ぎでお願いします"
}
], - "charges": [
- {
- "id": 1,
- "title": "送料",
- "quantity": "1",
- "unit_name": "式",
- "unit_price": "800",
- "subtotal": "800",
- "note": "ヤマト運輸"
}
], - "buyer": {
- "customer_id": 1,
- "name": "株式会社テスト",
- "name_postfix": "御中",
- "contact_person": "山田太郎",
- "zip": "100-0001",
- "address": "東京都千代田区千代田1-1",
- "building_name": "テストビル3F",
- "phone_number": "03-1234-5678",
- "fax_number": "03-1234-5679",
- "email": "buyer@example.com"
}, - "shipping_instruction": {
- "to_name": "株式会社配送先",
- "to_name_postfix": "御中",
- "to_zip": "150-0001",
- "to_phone_number": "03-9876-5432",
- "to_address": "東京都渋谷区渋谷1-1",
- "to_building_name": "渋谷ビル5F",
- "comment": "午前中指定でお願いします"
}
}
}受注詳細取得
指定した受注の詳細を取得します。
| company_id required | integer <int32> 会社ID |
| id required | integer <int32> 受注ID |
{- "data": {
- "id": 1,
- "order_number": "SO-2026-001",
- "status": "unconfirmed",
- "transaction_type": "external",
- "ordered_at": "2026-03-10T00:00:00.000+09:00",
- "estimated_delivery_date": "2026-03-20",
- "request_delivery_date": "2026-03-25",
- "subtotal": "10000.0",
- "tax": "1000.0",
- "total": "11000.0",
- "note": "納期厳守でお願いします",
- "created_at": "2026-03-10T10:00:00.000+09:00",
- "updated_at": "2026-03-10T10:00:00.000+09:00",
- "tax_rate": "10.0",
- "cancel_reason": "顧客都合によるキャンセル",
- "cancelled_at": "2026-03-15T14:00:00.000+09:00",
- "items": [
- {
- "id": 1,
- "sales_item_master_id": 10,
- "item_title": "商品A",
- "quantity": "5",
- "unit_price": "2000",
- "subtotal": "10000",
- "unit_name": "個",
- "quantity_per_package": "1",
- "request_delivery_date": "2026-03-25",
- "estimated_delivery_date": "2026-03-20",
- "note": "急ぎでお願いします"
}
], - "charges": [
- {
- "id": 1,
- "title": "送料",
- "quantity": "1",
- "unit_name": "式",
- "unit_price": "800",
- "subtotal": "800",
- "note": "ヤマト運輸"
}
], - "buyer": {
- "customer_id": 1,
- "name": "株式会社テスト",
- "name_postfix": "御中",
- "contact_person": "山田太郎",
- "zip": "100-0001",
- "address": "東京都千代田区千代田1-1",
- "building_name": "テストビル3F",
- "phone_number": "03-1234-5678",
- "fax_number": "03-1234-5679",
- "email": "buyer@example.com"
}, - "shipping_instruction": {
- "to_name": "株式会社配送先",
- "to_name_postfix": "御中",
- "to_zip": "150-0001",
- "to_phone_number": "03-9876-5432",
- "to_address": "東京都渋谷区渋谷1-1",
- "to_building_name": "渋谷ビル5F",
- "comment": "午前中指定でお願いします"
}
}
}受注更新
既存の受注を更新します。
| company_id required | integer <int32> 会社ID |
| id required | integer <int32> 受注ID |
受注更新リクエスト
| order_number | string 受注番号 |
| ordered_at | string <date-time> 受注日 |
| transaction_type | string Enum: "internal" "external" 取引区分 |
| estimated_delivery_date | string <date> 希望納期 |
| request_delivery_date | string <date> 依頼納期 |
| note | string 備考 |
object 発注元情報 | |
object 出荷先情報 | |
Array of objects (SalesOrderItemRequest) 受注明細 | |
Array of objects (SalesOrderChargeRequest) <= 20 items 受注費用明細。キー自体を省略すると既存の費用行を変更しない。[] は全削除。id 有りは更新、無しは追加、配列に無い既存 id は削除。最大20件。 受注ステータスにより反映範囲が変わる: unconfirmed / confirmed は全項目・追加・削除、completed は既存 id の note のみ(追加・削除・金額項目は無視)、cancelled は変更不可。 費用明細だけを更新する場合も sales_order_items(既存明細の id を含む)は必須 |
{- "order_number": "string",
- "ordered_at": "2019-08-24T14:15:22Z",
- "transaction_type": "internal",
- "estimated_delivery_date": "2019-08-24",
- "request_delivery_date": "2019-08-24",
- "note": "string",
- "buyer": {
- "name": "string",
- "name_postfix": "string",
- "customer_id": 0,
- "contact_person": "string",
- "zip": "string",
- "address": "string",
- "building_name": "string",
- "phone_number": "string",
- "fax_number": "string",
- "email": "string"
}, - "shipping_instruction": {
- "to_name": "string",
- "to_name_postfix": "string",
- "to_zip": "string",
- "to_phone_number": "string",
- "to_address": "string",
- "to_building_name": "string",
- "comment": "string"
}, - "sales_order_items": [
- {
- "id": 0,
- "sales_item_master_id": 0,
- "item_title": "string",
- "quantity": 0.1,
- "unit_price": 0.1,
- "unit_name": "string",
- "quantity_per_package": 0.1,
- "request_delivery_date": "2019-08-24",
- "estimated_delivery_date": "2019-08-24",
- "note": "string"
}
], - "sales_order_charges": [
- {
- "id": 0,
- "title": "string",
- "quantity": 0.1,
- "unit_name": "string",
- "unit_price": 0.1,
- "note": "string"
}
]
}{- "data": {
- "id": 1,
- "order_number": "SO-2026-001",
- "status": "unconfirmed",
- "transaction_type": "external",
- "ordered_at": "2026-03-10T00:00:00.000+09:00",
- "estimated_delivery_date": "2026-03-20",
- "request_delivery_date": "2026-03-25",
- "subtotal": "10000.0",
- "tax": "1000.0",
- "total": "11000.0",
- "note": "納期厳守でお願いします",
- "created_at": "2026-03-10T10:00:00.000+09:00",
- "updated_at": "2026-03-10T10:00:00.000+09:00",
- "tax_rate": "10.0",
- "cancel_reason": "顧客都合によるキャンセル",
- "cancelled_at": "2026-03-15T14:00:00.000+09:00",
- "items": [
- {
- "id": 1,
- "sales_item_master_id": 10,
- "item_title": "商品A",
- "quantity": "5",
- "unit_price": "2000",
- "subtotal": "10000",
- "unit_name": "個",
- "quantity_per_package": "1",
- "request_delivery_date": "2026-03-25",
- "estimated_delivery_date": "2026-03-20",
- "note": "急ぎでお願いします"
}
], - "charges": [
- {
- "id": 1,
- "title": "送料",
- "quantity": "1",
- "unit_name": "式",
- "unit_price": "800",
- "subtotal": "800",
- "note": "ヤマト運輸"
}
], - "buyer": {
- "customer_id": 1,
- "name": "株式会社テスト",
- "name_postfix": "御中",
- "contact_person": "山田太郎",
- "zip": "100-0001",
- "address": "東京都千代田区千代田1-1",
- "building_name": "テストビル3F",
- "phone_number": "03-1234-5678",
- "fax_number": "03-1234-5679",
- "email": "buyer@example.com"
}, - "shipping_instruction": {
- "to_name": "株式会社配送先",
- "to_name_postfix": "御中",
- "to_zip": "150-0001",
- "to_phone_number": "03-9876-5432",
- "to_address": "東京都渋谷区渋谷1-1",
- "to_building_name": "渋谷ビル5F",
- "comment": "午前中指定でお願いします"
}
}
}受注キャンセル
受注をキャンセルします。
| company_id required | integer <int32> 会社ID |
| id required | integer <int32> 受注ID |
受注キャンセルリクエスト
| cancel_reason required | string <= 1000 characters キャンセル理由(必須) |
{- "cancel_reason": "string"
}{- "data": {
- "id": 1,
- "order_number": "SO-2026-001",
- "status": "unconfirmed",
- "transaction_type": "external",
- "ordered_at": "2026-03-10T00:00:00.000+09:00",
- "estimated_delivery_date": "2026-03-20",
- "request_delivery_date": "2026-03-25",
- "subtotal": "10000.0",
- "tax": "1000.0",
- "total": "11000.0",
- "note": "納期厳守でお願いします",
- "created_at": "2026-03-10T10:00:00.000+09:00",
- "updated_at": "2026-03-10T10:00:00.000+09:00",
- "tax_rate": "10.0",
- "cancel_reason": "顧客都合によるキャンセル",
- "cancelled_at": "2026-03-15T14:00:00.000+09:00",
- "items": [
- {
- "id": 1,
- "sales_item_master_id": 10,
- "item_title": "商品A",
- "quantity": "5",
- "unit_price": "2000",
- "subtotal": "10000",
- "unit_name": "個",
- "quantity_per_package": "1",
- "request_delivery_date": "2026-03-25",
- "estimated_delivery_date": "2026-03-20",
- "note": "急ぎでお願いします"
}
], - "charges": [
- {
- "id": 1,
- "title": "送料",
- "quantity": "1",
- "unit_name": "式",
- "unit_price": "800",
- "subtotal": "800",
- "note": "ヤマト運輸"
}
], - "buyer": {
- "customer_id": 1,
- "name": "株式会社テスト",
- "name_postfix": "御中",
- "contact_person": "山田太郎",
- "zip": "100-0001",
- "address": "東京都千代田区千代田1-1",
- "building_name": "テストビル3F",
- "phone_number": "03-1234-5678",
- "fax_number": "03-1234-5679",
- "email": "buyer@example.com"
}, - "shipping_instruction": {
- "to_name": "株式会社配送先",
- "to_name_postfix": "御中",
- "to_zip": "150-0001",
- "to_phone_number": "03-9876-5432",
- "to_address": "東京都渋谷区渋谷1-1",
- "to_building_name": "渋谷ビル5F",
- "comment": "午前中指定でお願いします"
}
}
}受注確定
受注を確定します。
| company_id required | integer <int32> 会社ID |
| id required | integer <int32> 受注ID |
受注確定リクエスト
| agree_warning | boolean 上限超過時の警告同意フラグ |
{- "agree_warning": true
}{- "data": {
- "id": 1,
- "order_number": "SO-2026-001",
- "status": "unconfirmed",
- "transaction_type": "external",
- "ordered_at": "2026-03-10T00:00:00.000+09:00",
- "estimated_delivery_date": "2026-03-20",
- "request_delivery_date": "2026-03-25",
- "subtotal": "10000.0",
- "tax": "1000.0",
- "total": "11000.0",
- "note": "納期厳守でお願いします",
- "created_at": "2026-03-10T10:00:00.000+09:00",
- "updated_at": "2026-03-10T10:00:00.000+09:00",
- "tax_rate": "10.0",
- "cancel_reason": "顧客都合によるキャンセル",
- "cancelled_at": "2026-03-15T14:00:00.000+09:00",
- "items": [
- {
- "id": 1,
- "sales_item_master_id": 10,
- "item_title": "商品A",
- "quantity": "5",
- "unit_price": "2000",
- "subtotal": "10000",
- "unit_name": "個",
- "quantity_per_package": "1",
- "request_delivery_date": "2026-03-25",
- "estimated_delivery_date": "2026-03-20",
- "note": "急ぎでお願いします"
}
], - "charges": [
- {
- "id": 1,
- "title": "送料",
- "quantity": "1",
- "unit_name": "式",
- "unit_price": "800",
- "subtotal": "800",
- "note": "ヤマト運輸"
}
], - "buyer": {
- "customer_id": 1,
- "name": "株式会社テスト",
- "name_postfix": "御中",
- "contact_person": "山田太郎",
- "zip": "100-0001",
- "address": "東京都千代田区千代田1-1",
- "building_name": "テストビル3F",
- "phone_number": "03-1234-5678",
- "fax_number": "03-1234-5679",
- "email": "buyer@example.com"
}, - "shipping_instruction": {
- "to_name": "株式会社配送先",
- "to_name_postfix": "御中",
- "to_zip": "150-0001",
- "to_phone_number": "03-9876-5432",
- "to_address": "東京都渋谷区渋谷1-1",
- "to_building_name": "渋谷ビル5F",
- "comment": "午前中指定でお願いします"
}
}
}商品マスタ一覧取得
指定した会社の商品マスタ一覧を取得します。
| company_id required | integer <int32> 会社ID |
| item_code | string 商品コード(部分一致検索) |
| title | string 商品名(部分一致検索) |
| sort_by | string ソート対象(id, item_code, title, created_at, updated_at) |
| sort_order | string ソート順序(asc, desc) |
| page | integer <int32> ページ番号(デフォルト: 1) |
| per_page | integer <int32> 1ページあたりの件数(デフォルト: 20、最大: 50) |
{- "data": [
- {
- "id": 1,
- "item_code": "ITEM-001",
- "title": "商品A",
- "unit_id": 1,
- "quantity_per_package": "1",
- "price": "1000",
- "description": "商品Aの説明",
- "created_at": "2026-01-01T00:00:00.000+09:00",
- "updated_at": "2026-01-01T00:00:00.000+09:00",
- "inventory": {
- "id": 100,
- "title": "在庫A",
- "quantity": "1000",
- "logical_quantity": "900"
}
}
], - "pagination": {
- "current_page": 1,
- "per_page": 20,
- "total_count": 5,
- "total_pages": 1
}
}商品マスタ作成
新しい商品マスタを作成します。
| company_id required | integer <int32> 会社ID |
商品マスタ作成リクエスト
| item_code required | string 商品コード(会社内で一意) |
| title required | string 商品名 |
| unit_id required | integer <int32> 単位ID |
| quantity_per_package required | number <double> 入数 |
| inventory_id required | integer <int32> 在庫ID(デフォルトSalesItemSetに紐付け) |
| price | number <double> 金額 |
| description | string 商品説明 |
{- "item_code": "string",
- "title": "string",
- "unit_id": 0,
- "quantity_per_package": 0.1,
- "inventory_id": 0,
- "price": 0.1,
- "description": "string"
}{- "data": {
- "id": 1,
- "item_code": "ITEM-001",
- "title": "商品A",
- "unit_id": 1,
- "quantity_per_package": "1",
- "price": "1000",
- "description": "商品Aの説明",
- "created_at": "2026-01-01T00:00:00.000+09:00",
- "updated_at": "2026-01-01T00:00:00.000+09:00",
- "inventory": {
- "id": 100,
- "title": "在庫A",
- "quantity": "1000",
- "logical_quantity": "900"
}
}
}商品マスタ詳細取得
指定した商品マスタの詳細を取得します。
| company_id required | integer <int32> 会社ID |
| id required | integer <int32> 商品マスタID |
{- "data": {
- "id": 1,
- "item_code": "ITEM-001",
- "title": "商品A",
- "unit_id": 1,
- "quantity_per_package": "1",
- "price": "1000",
- "description": "商品Aの説明",
- "created_at": "2026-01-01T00:00:00.000+09:00",
- "updated_at": "2026-01-01T00:00:00.000+09:00",
- "inventory": {
- "id": 100,
- "title": "在庫A",
- "quantity": "1000",
- "logical_quantity": "900"
}
}
}商品マスタ更新
既存の商品マスタを更新します。
| company_id required | integer <int32> 会社ID |
| id required | integer <int32> 商品マスタID |
商品マスタ更新リクエスト
| item_code | string 商品コード |
| title | string 商品名 |
| unit_id | integer <int32> 単位ID |
| quantity_per_package | number <double> 入数 |
| inventory_id | integer <int32> 在庫ID |
| price | number <double> 金額 |
| description | string 商品説明 |
| remove_thumbnail | boolean サムネイル削除フラグ |
{- "item_code": "string",
- "title": "string",
- "unit_id": 0,
- "quantity_per_package": 0.1,
- "inventory_id": 0,
- "price": 0.1,
- "description": "string",
- "remove_thumbnail": true
}{- "data": {
- "id": 1,
- "item_code": "ITEM-001",
- "title": "商品A",
- "unit_id": 1,
- "quantity_per_package": "1",
- "price": "1000",
- "description": "商品Aの説明",
- "created_at": "2026-01-01T00:00:00.000+09:00",
- "updated_at": "2026-01-01T00:00:00.000+09:00",
- "inventory": {
- "id": 100,
- "title": "在庫A",
- "quantity": "1000",
- "logical_quantity": "900"
}
}
}商品マスタ削除
商品マスタを論理削除します。
| company_id required | integer <int32> 会社ID |
| id required | integer <int32> 商品マスタID |
{- "title": "Unauthorized",
- "status": 401,
- "detail": "トークンが無効または未指定です"
}zaico のデータが変わったときに、あらかじめ設定した通知先 URL へ HTTP リクエストで通知します。通知するイベントは次の 4 つです。通知する条件とペイロードは、このグループの各イベントを参照してください。
changed_quantity): 在庫データの数量が変わったときchanged_inventory): 在庫データの項目が変わったときchanged_purchase_status): 入庫データのステータスが変わったときchanged_packing_slip_status): 出庫データのステータスが変わったときWeb版 zaico の「設定」→「環境設定」→「利用機能設定」にある Webhook から設定画面を開き、イベントごとに通知の有効・無効と通知先 URL を設定します。設定は拠点ごとに行い、管理者だけが変更できます。手順は、ヘルプ記事「Webhook機能の使い方」を参照してください。
通知が zaico から送られたものかどうかは、リクエストヘッダー x-zaico-signature-256 で検証できます。値は、sha256= に続けて、リクエストボディをシークレットトークンで HMAC-SHA256 した結果を 16 進数で表したものです。シークレットトークンは Webhook の設定画面で確認できます。
受け取ったリクエストボディ(パースする前の文字列)から同じ方法で計算し、ヘッダーの値と一致することを確かめてください。Ruby の例:
def verify_signature(payload_body)
signature = 'sha256=' + OpenSSL::HMAC.hexdigest(OpenSSL::Digest.new('sha256'), ENV['SECRET_TOKEN'], payload_body)
return halt 500, "Invalid signature" unless Rack::Utils.secure_compare(signature, request.env['HTTP_X_ZAICO_SIGNATURE_256'])
end
zaico は送信元の IP アドレスを公開していません。送信元の検証にはこのヘッダーを使ってください。
シークレットトークンは Webhook の設定画面で再生成できます。再生成した後に発生したイベントの通知は、新しいシークレットトークンで署名されます。再生成の時点で送信中・再送中だった通知は、再生成する前のシークレットトークンで署名されたまま届きます。稼働中の受け口でシークレットトークンを再生成する場合は、しばらくの間、再生成する前のシークレットトークンでも検証することをおすすめします。
通知を受け取れたかどうかは、レスポンスのステータスコードで判断します。
| ステータスコード | 扱い |
|---|---|
| 2xx | 成功 |
| それ以外 | 失敗(再送します) |
処理する必要のない通知を受け取った場合も、2xx を返してください。2xx 以外を返すと再送されます。
リダイレクト(3xx)を返した場合は転送先へリクエストし直し、転送先のステータスコードで判断します。リダイレクトの種類によってはペイロードが転送先へ送られないため、通知先 URL にはリダイレクトを返さない URL を設定してください。
同じ通知が 2 回以上届くことがあります。通知を受け取ったときの処理は、同じ通知を繰り返し受け取っても結果が変わらないようにしてください。同じ通知は、リクエストヘッダー x-zaico-request-id の値が同じです。
通知は POST で送られ、次のヘッダーが付きます。
| ヘッダー | 値 |
|---|---|
user-agent |
ZaicoWebhook/1.0 |
content-type |
application/json |
x-zaico-company-id |
拠点 ID。公開API v2 のパスの company_id と同じ値です。例: 123456 |
x-zaico-event |
イベントの種別。例: changed_quantity |
x-zaico-request-id |
通知ごとの ID(UUID)。再送でも同じ値が送られます。例: 432dc9c5-7d14-49e7-8199-05c2a76fddd3 |
x-zaico-signature-256 |
sha256= に続けて、リクエストボディをシークレットトークンで HMAC-SHA256 した結果を 16 進数で表したもの。例: sha256=43bb5cf48442edfd14d6d97fa81cb563569e4992666bf75730334477f473e5ff |
ヘッダー名は、大文字と小文字を区別せずに読んでください。通信の方式によって、X-Zaico-Event のように先頭が大文字で届くことがあります。
http または https です。localhost、名前解決できないホスト、内部のアドレスに解決されるホストは指定できません。在庫データの数量が変わったときに通知します。x-zaico-event ヘッダーの値は changed_quantity です。
通知するのは、登録済みの在庫データの数量が変わったときです。在庫データを新しく作成したときは通知しません。
required | object 数量が変わった在庫データ |
{- "inventory": {
- "id": 49375,
- "code": "1413790e-fc3c-4fa7-aed4-6b6eed9a6e03",
- "title": "ボルト M8",
- "quantity": "150.0",
- "updated_at": "2021-10-02T22:44:15+09:00"
}
}在庫データの項目が変わったときに通知します。x-zaico-event ヘッダーの値は changed_inventory です。
通知するのは、登録済みの在庫データで、追加項目か下の表の項目のいずれかが変わったときです。次の場合は通知しません。
changed_attributes には、変わった項目に対応する下の表の値が入ります。追加項目が変わった場合は、changed_optional_attributes に追加項目の名前が入ります(changed_attributes には入りません)。
changed_attributes の値 |
項目 |
|---|---|
title |
物品名 |
quantity |
数量 |
category |
カテゴリ |
state |
状態 |
code |
コード(QRコード・バーコードの値) |
etc |
備考 |
group_tag |
グループタグ |
place |
保管場所 |
unit |
単位 |
is_quantity_auto_conversion_by_unit |
単位換算有効 |
quantity_auto_conversion_by_unit_name |
単位換算単位名 |
quantity_auto_conversion_by_unit_factor |
単位換算係数 |
user_group |
ユーザーグループ |
通知の対象になる項目は予告なく増えることがあります。この表に無い値が入っていても処理できるようにしてください。
| inventory_id required | integer <int32> 在庫ID |
| changed_attributes required | Array of strings 変更された標準の項目の名前。入りうる値はイベントの説明を参照 |
| changed_optional_attributes required | Array of strings 変更された追加項目の名前 |
| updated_at required | string <date-time> 更新日時(ISO 8601形式。マイクロ秒まで) |
{- "inventory_id": 123,
- "changed_attributes": [
- "title",
- "quantity"
], - "changed_optional_attributes": [
- "納品単価",
- "型式"
], - "updated_at": "2024-11-08T16:26:54.493728+09:00"
}入庫データのステータスが変わったときに通知します。入庫データを新しく作成したときも通知します。x-zaico-event ヘッダーの値は changed_purchase_status です。
GET /api/v2/orgs/companies/{company_id}/purchases/{id}.json)で取得してください。パスの company_id には x-zaico-company-id ヘッダーの値を、id にはペイロードの purchase.id を指定します。purchased になりません。このため、一部の明細だけが入庫済みになっても、通知されないことがあります。required | object ステータスが変わった入庫データ(明細は含まない) |
{- "purchase": {
- "id": 210948,
- "num": "119",
- "customer_name": "株式会社サンプル商事",
- "create_user_name": "山田 太郎",
- "issue_date": null,
- "purchase_date": null,
- "status": "ordered",
- "etc": "発注書の備考",
- "created_at": "2024-06-03T10:58:46+09:00",
- "updated_at": "2024-06-04T15:49:02+09:00",
- "earliest_estimated_purchase_date": "2024-06-08T00:00:00+09:00",
- "memo": "入庫メモ",
- "user_group": "基本グループ,管理者"
}
}出庫データのステータスが変わったときに通知します。出庫データを新しく作成したときも通知します。x-zaico-event ヘッダーの値は changed_packing_slip_status です。
GET /api/v2/orgs/companies/{company_id}/packing_slips/{id}.json)で取得してください。パスの company_id には x-zaico-company-id ヘッダーの値を、id にはペイロードの packing_slip.id を指定します。completed_delivery になりません。このため、一部の明細だけが出庫済みになっても、通知されないことがあります。required | object ステータスが変わった出庫データ(明細は含まない) |
{- "packing_slip": {
- "id": 210472,
- "created_at": "2024-05-28T15:07:38+09:00",
- "updated_at": "2024-06-04T15:50:26+09:00",
- "date_of_issue": null,
- "create_user_name": "山田 太郎",
- "customer_name": "株式会社サンプル商事",
- "customer_name_postfix": null,
- "num": "256",
- "delivery_date": "2024-06-04T00:00:00+09:00",
- "status": "completed_delivery",
- "earliest_estimated_delivery_date": null,
- "memo": "出庫メモ",
- "note": "納品書の備考",
- "user_group": "基本グループ,管理者"
}
}