ReCORE.co-api

在庫

在庫検索

概要

基本情報

query

key 説明 制約など
ids 在庫ID 整数のみ、カンマ区切りで複数指定可能
codes 在庫コード カンマ区切りで複数指定可能
alias_codes 代替在庫コード カンマ区切りで複数指定可能
is_tracked 在庫数管理 -
product_ids 商品ID 整数のみ、カンマ区切りで複数指定可能
ia_* 在庫属性 (*1)
pa_* 商品属性 (*1)
created_at_from 作成日から 2024-04-12 12:08:38 形式
created_at_to 作成日まで 同上
updated_at_from 更新日から 同上
updated_at_to 更新日まで 同上
page ページ 整数のみ、デフォルト:1
limit 1ページあたりの件数 整数のみ、デフォルト:50、最大: 250
cursor ページカーソル -

例

GET /items?codes=ITBC0PV0VJPA
[
  {
    "id": 23,
    "code": "ITBC0PV0VJPA",
    "is_tracked": true,
    "alias_code": null,
    "store": {
      "id": 1,
      "name": "main"
    },
    "price": 33,
    "grade": {
      "id": 2,
      "name": "中古A"
    },
    "condition_note": null,
    "condition_tags": [
      {
        "id": 1,
        "name": "喫煙あり"
      }
    ],
    "note": null,
    "stocks": [
      {
        "location": {
          "id": 1,
          "type": "DEFAULT",
          "name": "デフォルト"
        },
        "status": "PENDING",
        "quantity": 1,
        "cost_price": 20
      }
    ],
    "attribute": {
      "size": "S"
    },
    "image_urls": [
      "https://..."
    ],
    "racks":[
      {
        "numbers":[
          "棚1",
          "棚2"
        ],
        "location": {
          "id": 1,
          "type": "DEFAULT",
          "name": "デフォルト"
        }
      }
    ],
    "product_id": 7,
    "created_at": 1673411650,
    "updated_at": 1673411650
  }
]
key type 説明
* array<object> 在庫
*.id int 在庫ID
*.code string 在庫コード
*.is_tracked boolean 在庫数管理
*.alias_code string | null 代替在庫コード
*.store object 所属店舗
*.store.id int 所属店舗ID
*.store.name string 所属店舗名
*.price int 価格
*.grade object グレード
*.grade.id int グレードID
*.grade.name string グレード名
*.condition_note string | null コンディション詳細
*.condition_tags array<object> コンディションタグ
*.condition_tags.*.id int コンディションタグID
*.condition_tags.*.name string コンディションタグ名
*.note string | null 在庫メモ
*.stocks array<object> 在庫、location-statusでユニーク
*.stocks.*.location object 在庫ロケーション
*.stocks.*.location.id int 在庫ロケーションID
*.stocks.*.location.type string 在庫ロケーションタイプ
*.stocks.*.location.name string 在庫ロケーション名
*.stocks.*.status string 在庫ステータス
*.stocks.*.quantity int 在庫数
*.stocks.*.cost_price int 在庫原価
*.attribute object | null 在庫属性
*.image_urls array<string> 在庫画像URL
*.racks array<object> 棚情報
*.racks.*.location object ロケーション
*.racks.*.numbers array<string> 番号
*.product_id int 商品ID
*.created_at int | null 作成日時
*.updated_at int | null 更新日時

在庫取得

概要

基本情報

例

GET /items/23
在庫検索のresponse[0]と同様

在庫作成

概要

基本情報

body

key type 説明 制約など
product_id int 商品ID -
price int 価格 -
is_tracked ?boolean 在庫数管理 デフォルト: true
alias_code ?string | null 代替在庫コード 100文字まで
grade_id ?int グレードID -
condition_note ?string | null コンディション詳細 -
condition_tag_ids ?array<int> コンディションタグID -
note ?string | null 在庫メモ -
attribute ?object 在庫属性 -
image_urls ?array<string> 商品画像URL (*1)
racks ?array<object> 棚情報 -
racks.*.location_id int ロケーションID -
racks.*.numbers array<string> | null 番号 -

例

POST /items
{
  "product_id": 2,
  "price": 100,
  "is_tracked": true,
  "alias_code": null,
  "condition_tag_ids": [1, 2, 3],
  "image_urls": ["https://***", "https://***"],
  "racks": [
    {
      "location_id": 1,
      "numbers": ["棚1", "棚2"]
    }
  ]
}
在庫取得と同様

在庫更新

概要

基本情報

body

在庫作成との差分のみ記載
key type 説明 制約など
product_id int (更新不可)、在庫振替を使う -
price int (更新不可)、在庫価格更新を使う -
attribute ?object 在庫属性 (*1)
image_urls ?array<string> 商品画像URL (*2)

例

PUT /items/23
{
  "alias_code": null,
  "condition_tag_ids": [1, 2, 3],
  "image_urls": ["https://***", "https://***"]
}
在庫取得と同様

在庫一括作成

概要

基本情報

body

key type 説明 制約など
* array<object> - 1件以上 1000件まで
*.* - (以下在庫作成と同様) -

例

POST /items/bulk
[
  {
    "product_id": 2,
    "price": 100,
    "alias_code": null,
    "condition_tag_ids": [1, 2, 3]
  }
]
在庫検索と同様

在庫一括更新

概要

基本情報

body

key type 説明 制約など
* array<object> - 1件以上 1000件まで
*.id int 在庫ID -
*.* - (以下在庫更新と同様) -

例

PUT /items/bulk
[
  {
    "id": 234,
    "alias_code": null,
    "condition_tag_ids": [1, 2, 3]
  }
]
在庫検索と同様