商品取得
const url = 'https://api.smaregi.dev/TARGET-CONTRACT-ID/ec-oms/products/example?fields=productId%2CcommonCode';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.smaregi.dev/TARGET-CONTRACT-ID/ec-oms/products/example?fields=productId%2CcommonCode' \ --header 'Authorization: Bearer <token>'商品を取得します。
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”商品ID
Query Parameters
Section titled “Query Parameters”取得するフィールドをカンマ区切りで指定します。
指定がない場合すべてのフィールドを取得します。
Example
?fields=productId,commonCodeResponses
Section titled “Responses”取得成功
object
商品ID
商品管理番号
商品番号
商品名
消費税
消費税(和名)
倉庫指定
在庫タイプ
在庫タイプ(和名)
在庫表示設定(通常在庫)
残り表示閾値(通常在庫)
在庫表示設定(項目選択肢別在庫)
残り表示閾値(項目選択肢別在庫)
消費税率
JANコード
商品略称(内部用)
商品略称(お客様用)
配送温度区分
配送温度区分(和名)
在庫戻し設定
在庫切れ時の注文
在庫あり時の納期
在庫あり時の納期(和名)
在庫切れ時の納期
在庫切れ時の納期(和名)
object
商品クラスID
商品ID
商品規格ID(横軸)
商品規格ID(縦軸)
商品番号
販売価格
商品種別
在庫連携指定
在庫指定値
JANコード
在庫納期情報個別設定
在庫戻し設定
在庫切れ時の注文
在庫あり時の納期管理番号
在庫あり時の納期管理番号(和名)
在庫切れ時の納期管理番号
在庫切れ時の納期管理番号(和名)
規格情報
object
規格ID
商品ID
規格名
規格軸
1: 横軸(規格1)2: 縦軸(規格2)
連携用商品ID
連携用規格軸
object
規格詳細ID
規格ID
商品ID
規格名詳細
連携コード
枝番
連携用商品ID
店舗別商品規格です。各 classcategoryId1~classcategoryId6 には、その行が使用する店舗別規格値IDを返し、使用していない規格軸は 0 を返します。
通常在庫商品の基準行では6項目すべてが 0 です。
商品一覧取得・商品取得では有効な行だけを返すため、項目選択肢別在庫の削除扱いの基準行は含みません。
object
商品クラスID
店舗ID
商品ID
店舗別規格値ID1。未使用時は 0
店舗別規格値ID2。未使用時は 0
店舗別規格値ID3。未使用時は 0
店舗別規格値ID4。未使用時は 0
店舗別規格値ID5。未使用時は 0
店舗別規格値ID6。未使用時は 0
店舗別商品コード
商品種別
JANコード
店舗別規格情報
object
店舗別規格ID
店舗ID
商品ID
店舗別規格名
店舗別規格軸
- 楽天以外:
1,2 - 楽天:
1〜6
object
店舗別規格詳細ID
店舗ID
店舗別規格ID
商品ID
店舗別規格詳細名
商品コード
枝番
モール別個別設定情報です。
org[xxxx]... の [xxxx] にはモール名(英名・先頭大文字)が入ります。
例: モールキーが rakuten の場合、orgRakutenProductCode となります。
object
商品ID
店舗ID
商品コード
商品コード設定。一部の店舗にのみ設定されます。
商品管理番号
商品タイプ。一部の店舗にのみ設定されます。
モール反映フラグ
Examples
{ "productId": "2277", "commonCode": "pfapi_test_product_test33", "commonProductCode": "pfapi_test_product_test_2", "name": "プラットフォームAPIテスト商品_test33", "taxFlag": "1", "taxFlagJa": "消費税込", "status": "1", "zaikoType": "2", "zaikoTypeJa": "項目選択肢別在庫", "nokori": "0", "nokoriDisp": null, "inventoryType": "3", "inventoryDisp": "10", "taxRate": "10", "rcatalogId": "010245", "name1": "PFAPIテスト商品", "name2": "プラットフォームAPIテスト商品", "delivKbn": "1", "delivKbnJa": "普通", "restoreInventoryFlag": "1", "backorderFlag": "1", "normalDelvdateId": "1", "normalDelvdateIdJa": "1~3日以内に発送予定。(土日祝除く)", "backorderDelvdateId": "1", "backorderDelvdateIdJa": "1~3日以内に発送予定。(土日祝除く)", "productsClass": [ { "productClassId": "2536", "productId": "2277", "classcategoryId1": "202", "classcategoryId2": "205", "productCode": "pfapi_test_product_test_2", "price02": "1000", "productTypeId": "1", "stockUpdateFlg": "2", "stockUpdateValue": "100", "rcatalogId": "010245", "delvdateChk": "1", "restoreInventoryFlag": "1", "backorderFlag": "1", "normalDelvdateId": "2", "normalDelvdateIdJa": "メーカー確認後ご連絡致します。", "backorderDelvdateId": "2", "backorderDelvdateIdJa": "メーカー確認後ご連絡致します。" }, { "productClassId": "2537", "productId": "2277", "classcategoryId1": "202", "classcategoryId2": "206", "productCode": "pfapi_test_product_test_2", "price02": "1000", "productTypeId": "1", "stockUpdateFlg": "2", "stockUpdateValue": "100", "rcatalogId": "010245", "delvdateChk": "1", "restoreInventoryFlag": "1", "backorderFlag": "1", "normalDelvdateId": "2", "normalDelvdateIdJa": "メーカー確認後ご連絡致します。", "backorderDelvdateId": "2", "backorderDelvdateIdJa": "メーカー確認後ご連絡致します。" }, { "productClassId": "2538", "productId": "2277", "classcategoryId1": "202", "classcategoryId2": "207", "productCode": "pfapi_test_product_test_2", "price02": "1000", "productTypeId": "1", "stockUpdateFlg": "2", "stockUpdateValue": "100", "rcatalogId": "010245", "delvdateChk": "1", "restoreInventoryFlag": "1", "backorderFlag": "1", "normalDelvdateId": "2", "normalDelvdateIdJa": "メーカー確認後ご連絡致します。", "backorderDelvdateId": "2", "backorderDelvdateIdJa": "メーカー確認後ご連絡致します。" }, { "productClassId": "2539", "productId": "2277", "classcategoryId1": "203", "classcategoryId2": "205", "productCode": "pfapi_test_product_test_2", "price02": "1000", "productTypeId": "1", "stockUpdateFlg": "2", "stockUpdateValue": "100", "rcatalogId": "010245", "delvdateChk": "1", "restoreInventoryFlag": "1", "backorderFlag": "1", "normalDelvdateId": "2", "normalDelvdateIdJa": "メーカー確認後ご連絡致します。", "backorderDelvdateId": "2", "backorderDelvdateIdJa": "メーカー確認後ご連絡致します。" }, { "productClassId": "2540", "productId": "2277", "classcategoryId1": "203", "classcategoryId2": "206", "productCode": "pfapi_test_product_test_2", "price02": "1000", "productTypeId": "1", "stockUpdateFlg": "2", "stockUpdateValue": "100", "rcatalogId": "010245", "delvdateChk": "1", "restoreInventoryFlag": "1", "backorderFlag": "1", "normalDelvdateId": "2", "normalDelvdateIdJa": "メーカー確認後ご連絡致します。", "backorderDelvdateId": "2", "backorderDelvdateIdJa": "メーカー確認後ご連絡致します。" }, { "productClassId": "2541", "productId": "2277", "classcategoryId1": "203", "classcategoryId2": "207", "productCode": "pfapi_test_product_test_2", "price02": "1000", "productTypeId": "1", "stockUpdateFlg": "2", "stockUpdateValue": "100", "rcatalogId": "010245", "delvdateChk": "1", "restoreInventoryFlag": "1", "backorderFlag": "1", "normalDelvdateId": "2", "normalDelvdateIdJa": "メーカー確認後ご連絡致します。", "backorderDelvdateId": "2", "backorderDelvdateIdJa": "メーカー確認後ご連絡致します。" }, { "productClassId": "2542", "productId": "2277", "classcategoryId1": "204", "classcategoryId2": "205", "productCode": "pfapi_test_product_test_2", "price02": "1000", "productTypeId": "1", "stockUpdateFlg": "2", "stockUpdateValue": "100", "rcatalogId": "010245", "delvdateChk": "1", "restoreInventoryFlag": "1", "backorderFlag": "1", "normalDelvdateId": "2", "normalDelvdateIdJa": "メーカー確認後ご連絡致します。", "backorderDelvdateId": "2", "backorderDelvdateIdJa": "メーカー確認後ご連絡致します。" }, { "productClassId": "2543", "productId": "2277", "classcategoryId1": "204", "classcategoryId2": "206", "productCode": "pfapi_test_product_test_2", "price02": "1000", "productTypeId": "1", "stockUpdateFlg": "2", "stockUpdateValue": "100", "rcatalogId": "010245", "delvdateChk": "1", "restoreInventoryFlag": "1", "backorderFlag": "1", "normalDelvdateId": "2", "normalDelvdateIdJa": "メーカー確認後ご連絡致します。", "backorderDelvdateId": "2", "backorderDelvdateIdJa": "メーカー確認後ご連絡致します。" }, { "productClassId": "2544", "productId": "2277", "classcategoryId1": "204", "classcategoryId2": "207", "productCode": "pfapi_test_product_test_2", "price02": "1000", "productTypeId": "1", "stockUpdateFlg": "2", "stockUpdateValue": "100", "rcatalogId": "010245", "delvdateChk": "1", "restoreInventoryFlag": "1", "backorderFlag": "1", "normalDelvdateId": "2", "normalDelvdateIdJa": "メーカー確認後ご連絡致します。", "backorderDelvdateId": "2", "backorderDelvdateIdJa": "メーカー確認後ご連絡致します。" } ], "class": [ { "classId": "84", "productId": "2277", "name": "カラー", "classType": "2", "plgRaku2ProductId": "2277", "plgRaku2ClassType": "2", "classcategory": [ { "classcategoryId": "205", "classId": "84", "productId": "2277", "name": "緑", "subcode": "-g", "plgRaku2ProductId": "2277" }, { "classcategoryId": "206", "classId": "84", "productId": "2277", "name": "赤", "subcode": "-r", "plgRaku2ProductId": "2277" }, { "classcategoryId": "207", "classId": "84", "productId": "2277", "name": "青", "subcode": "-b", "plgRaku2ProductId": "2277" } ] }, { "classId": "83", "productId": "2277", "name": "サイズ", "classType": "1", "plgRaku2ProductId": "2277", "plgRaku2ClassType": "1", "classcategory": [ { "classcategoryId": "202", "classId": "83", "productId": "2277", "name": "L", "subcode": "-l", "plgRaku2ProductId": "2277" }, { "classcategoryId": "203", "classId": "83", "productId": "2277", "name": "M", "subcode": "-m", "plgRaku2ProductId": "2277" }, { "classcategoryId": "204", "classId": "83", "productId": "2277", "name": "S", "subcode": "-s", "plgRaku2ProductId": "2277" } ] } ], "productsClassShop": [ { "productClassId": "4126", "shopId": "34", "productId": "2277", "classcategoryId1": "9001", "classcategoryId2": "9101", "classcategoryId3": "0", "classcategoryId4": "0", "classcategoryId5": "0", "classcategoryId6": "0", "productCode": "SHOP001-01", "productTypeId": "1", "rcatalogId": "4900000000001" }, { "productClassId": "4127", "shopId": "31", "productId": "2277", "classcategoryId1": "9001", "classcategoryId2": "9101", "classcategoryId3": "0", "classcategoryId4": "0", "classcategoryId5": "0", "classcategoryId6": "0", "productCode": "SHOP001-02", "productTypeId": "1", "rcatalogId": "4900000000002" }, { "productClassId": "4128", "shopId": "35", "productId": "2277", "classcategoryId1": "9001", "classcategoryId2": "9101", "classcategoryId3": "0", "classcategoryId4": "0", "classcategoryId5": "0", "classcategoryId6": "0", "productCode": "SHOP001-03", "productTypeId": "1", "rcatalogId": "4900000000003" }, { "productClassId": "4129", "shopId": "19", "productId": "2277", "classcategoryId1": "9001", "classcategoryId2": "9101", "classcategoryId3": "0", "classcategoryId4": "0", "classcategoryId5": "0", "classcategoryId6": "0", "productCode": "SHOP001-04", "productTypeId": "1", "rcatalogId": "4900000000004" }, { "productClassId": "4130", "shopId": "15", "productId": "2277", "classcategoryId1": "9001", "classcategoryId2": "9101", "classcategoryId3": "0", "classcategoryId4": "0", "classcategoryId5": "0", "classcategoryId6": "0", "productCode": "SHOP001-05", "productTypeId": "1", "rcatalogId": "4900000000005" }, { "productClassId": "4131", "shopId": "8", "productId": "2277", "classcategoryId1": "9001", "classcategoryId2": "9101", "classcategoryId3": "0", "classcategoryId4": "0", "classcategoryId5": "0", "classcategoryId6": "0", "productCode": "SHOP001-06", "productTypeId": "1", "rcatalogId": "4900000000006" }, { "productClassId": "4132", "shopId": "25", "productId": "2277", "classcategoryId1": "9001", "classcategoryId2": "9101", "classcategoryId3": "0", "classcategoryId4": "0", "classcategoryId5": "0", "classcategoryId6": "0", "productCode": "SHOP001-07", "productTypeId": "1", "rcatalogId": "4900000000007" }, { "productClassId": "4133", "shopId": "17", "productId": "2277", "classcategoryId1": "9001", "classcategoryId2": "9101", "classcategoryId3": "0", "classcategoryId4": "0", "classcategoryId5": "0", "classcategoryId6": "0", "productCode": "SHOP001-08", "productTypeId": "0", "rcatalogId": "4900000000008" }, { "productClassId": "4134", "shopId": "7", "productId": "2277", "classcategoryId1": "9001", "classcategoryId2": "9101", "classcategoryId3": "0", "classcategoryId4": "0", "classcategoryId5": "0", "classcategoryId6": "0", "productCode": "SHOP001-09", "productTypeId": "0", "rcatalogId": "4900000000009" }, { "productClassId": "4135", "shopId": "29", "productId": "2277", "classcategoryId1": "9001", "classcategoryId2": "9101", "classcategoryId3": "0", "classcategoryId4": "0", "classcategoryId5": "0", "classcategoryId6": "0", "productCode": "SHOP001-10", "productTypeId": "1", "rcatalogId": "4900000000010" }, { "productClassId": "4136", "shopId": "28", "productId": "2277", "classcategoryId1": "9001", "classcategoryId2": "9101", "classcategoryId3": "0", "classcategoryId4": "0", "classcategoryId5": "0", "classcategoryId6": "0", "productCode": "SHOP001-11", "productTypeId": "1", "rcatalogId": "4900000000011" }, { "productClassId": "4137", "shopId": "9", "productId": "2277", "classcategoryId1": "9001", "classcategoryId2": "9101", "classcategoryId3": "0", "classcategoryId4": "0", "classcategoryId5": "0", "classcategoryId6": "0", "productCode": "SHOP001-12", "productTypeId": "1", "rcatalogId": "4900000000012" }, { "productClassId": "4138", "shopId": "27", "productId": "2277", "classcategoryId1": "9001", "classcategoryId2": "9101", "classcategoryId3": "0", "classcategoryId4": "0", "classcategoryId5": "0", "classcategoryId6": "0", "productCode": "SHOP001-13", "productTypeId": "1", "rcatalogId": "4900000000013" }, { "productClassId": "4139", "shopId": "18", "productId": "2277", "classcategoryId1": "9001", "classcategoryId2": "9101", "classcategoryId3": "0", "classcategoryId4": "0", "classcategoryId5": "0", "classcategoryId6": "0", "productCode": "SHOP001-14", "productTypeId": "1", "rcatalogId": "4900000000014" }, { "productClassId": "4140", "shopId": "10", "productId": "2277", "classcategoryId1": "9001", "classcategoryId2": "9101", "classcategoryId3": "0", "classcategoryId4": "0", "classcategoryId5": "0", "classcategoryId6": "0", "productCode": "SHOP001-15", "productTypeId": "1", "rcatalogId": "4900000000015" }, { "productClassId": "4141", "shopId": "20", "productId": "2277", "classcategoryId1": "9001", "classcategoryId2": "9101", "classcategoryId3": "0", "classcategoryId4": "0", "classcategoryId5": "0", "classcategoryId6": "0", "productCode": "SHOP001-16", "productTypeId": "1", "rcatalogId": "4900000000016" }, { "productClassId": "4142", "shopId": "11", "productId": "2277", "classcategoryId1": "9001", "classcategoryId2": "9101", "classcategoryId3": "0", "classcategoryId4": "0", "classcategoryId5": "0", "classcategoryId6": "0", "productCode": "SHOP001-17", "productTypeId": "1", "rcatalogId": "4900000000017" }, { "productClassId": "4143", "shopId": "13", "productId": "2277", "classcategoryId1": "9001", "classcategoryId2": "9101", "classcategoryId3": "0", "classcategoryId4": "0", "classcategoryId5": "0", "classcategoryId6": "0", "productCode": "SHOP001-18", "productTypeId": "1", "rcatalogId": "4900000000018" }, { "productClassId": "4144", "shopId": "12", "productId": "2277", "classcategoryId1": "9001", "classcategoryId2": "9101", "classcategoryId3": "0", "classcategoryId4": "0", "classcategoryId5": "0", "classcategoryId6": "0", "productCode": "SHOP001-19", "productTypeId": "1", "rcatalogId": "4900000000019" }, { "productClassId": "4145", "shopId": "26", "productId": "2277", "classcategoryId1": "9001", "classcategoryId2": "9101", "classcategoryId3": "0", "classcategoryId4": "0", "classcategoryId5": "0", "classcategoryId6": "0", "productCode": "SHOP001-20", "productTypeId": "1", "rcatalogId": "4900000000020" }, { "productClassId": "4146", "shopId": "23", "productId": "2277", "classcategoryId1": "9001", "classcategoryId2": "9101", "classcategoryId3": "0", "classcategoryId4": "0", "classcategoryId5": "0", "classcategoryId6": "0", "productCode": "SHOP001-21", "productTypeId": "1", "rcatalogId": "4900000000021" }, { "productClassId": "4147", "shopId": "24", "productId": "2277", "classcategoryId1": "9001", "classcategoryId2": "9101", "classcategoryId3": "0", "classcategoryId4": "0", "classcategoryId5": "0", "classcategoryId6": "0", "productCode": "SHOP001-22", "productTypeId": "1", "rcatalogId": "4900000000022" }, { "productClassId": "4148", "shopId": "33", "productId": "2277", "classcategoryId1": "9001", "classcategoryId2": "9101", "classcategoryId3": "0", "classcategoryId4": "0", "classcategoryId5": "0", "classcategoryId6": "0", "productCode": "SHOP001-23", "productTypeId": "1", "rcatalogId": "4900000000023" }, { "productClassId": "4149", "shopId": "5", "productId": "2277", "classcategoryId1": "9001", "classcategoryId2": "9101", "classcategoryId3": "0", "classcategoryId4": "0", "classcategoryId5": "0", "classcategoryId6": "0", "productCode": "SHOP001-24", "productTypeId": "1", "rcatalogId": "4900000000024" }, { "productClassId": "4150", "shopId": "22", "productId": "2277", "classcategoryId1": "9001", "classcategoryId2": "9101", "classcategoryId3": "0", "classcategoryId4": "0", "classcategoryId5": "0", "classcategoryId6": "0", "productCode": "SHOP001-25", "productTypeId": "1", "rcatalogId": "4900000000025" }, { "productClassId": "4151", "shopId": "32", "productId": "2277", "classcategoryId1": "9001", "classcategoryId2": "9101", "classcategoryId3": "0", "classcategoryId4": "0", "classcategoryId5": "0", "classcategoryId6": "0", "productCode": "SHOP001-26", "productTypeId": "1", "rcatalogId": "4900000000026" }, { "productClassId": "4152", "shopId": "30", "productId": "2277", "classcategoryId1": "9001", "classcategoryId2": "9101", "classcategoryId3": "0", "classcategoryId4": "0", "classcategoryId5": "0", "classcategoryId6": "0", "productCode": "SHOP001-27", "productTypeId": "1", "rcatalogId": "4900000000027" } ], "classShop": [ { "classId": "501", "shopId": "1", "productId": "2277", "name": "サイズ", "classType": "1", "classcategoryShop": [ { "classcategoryId": "9001", "shopId": "1", "classId": "501", "productId": "2277", "name": "S", "rakutenCode": "pfapi_test_product_test_2", "subcode": "-s" }, { "classcategoryId": "9002", "shopId": "1", "classId": "501", "productId": "2277", "name": "M", "rakutenCode": "pfapi_test_product_test_2", "subcode": "-m" } ] }, { "classId": "502", "shopId": "1", "productId": "2277", "name": "カラー", "classType": "2", "classcategoryShop": [ { "classcategoryId": "9003", "shopId": "1", "classId": "502", "productId": "2277", "name": "青", "rakutenCode": "pfapi_test_product_test_2", "subcode": "-b" }, { "classcategoryId": "9004", "shopId": "1", "classId": "502", "productId": "2277", "name": "赤", "rakutenCode": "pfapi_test_product_test_2", "subcode": "-r" } ] } ], "productsSpecialShop": [ { "productId": "115", "shopId": "5", "orgExpFlg": "1", "orgRakutenProductCode": "testProductCode", "orgRakutenCode": "testCode", "orgRakutenProductType": "1" }, { "productId": "115", "shopId": "6", "orgExpFlg": "1", "orgYahooProductCodeChk": "1", "orgYahooProductCode": "pfapi_test_product_2", "orgYahooProductType": "0" } ]}Fieldsに指定外の値が設定されている場合
object
Examples
{ "type": "about:blank", "title": "BadRequest", "detail": "指定されたfields項目が不正です: {invalid_field}", "status": 400}指定されたIDのリソースが存在しない場合
object
Examples
{ "type": "about:blank", "title": "NotFound", "detail": "指定されたIDのリソースが見つかりません", "status": 404}サーバー内部エラー
object
Examples
{ "type": "about:blank", "title": "InternalServerError", "status": 500}