商品SKU取得
GET
/products_sku/{product_sku_id}
const url = 'https://api.smaregi.dev/TARGET-CONTRACT-ID/ec-oms/products_sku/example?fields=productSkuId%2CshipperId';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_sku/example?fields=productSkuId%2CshipperId' \ --header 'Authorization: Bearer <token>'商品SKUを取得します。
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”product_sku_id
required
string
商品SKUID
Query Parameters
Section titled “Query Parameters”fields
Array<string>
取得するフィールドをカンマ区切りで指定します。 指定がない場合すべてのフィールドを取得します。
Example
?fields=productSkuId,shipperIdResponses
Section titled “Responses”取得成功
Media typeapplication/json
ProductSku
object
productSkuId
商品SKUID
string
shipperId
荷主ID
string
shipper
荷主会社名
string
productSkuCode
商品SKUコード
string
makerProductSkuCode
メーカー品番
string
janCode
JANコード
string
detailKbn
商品SKU種別
string
productCategory
商品SKU種別(和名)
string
productSkuName
商品SKU名
string
productSkuName2
商品SKU名(お客様用)
string
productSkuKana
商品SKU名カナ
string
taxFlag
消費税
string
price01
通常価格(税抜・税込)
string
price02
販売価格(税抜・税込)
string
stockPrice
売上原価(税抜)
string
costPrice
仕入価格(税抜)
string
stockFlag
在庫管理対象
string
stockFlagJa
在庫管理対象(和名)
string
stockReserveFlag
在庫引当区分
string
stockReserveFlagJa
在庫引当区分(和名)
string
yukoFlag
有効フラグ
string
yukoFlagJa
有効フラグ(和名)
string
productPrintFlag
伝票出力フラグ
string
unitName
単位コード
string
unitNameJa
単位(和名)
string
stockQuantity
実在庫
string
stockQuantityLogical
有効在庫
string
secureStock
確保在庫
string
placingOrderPoint
発注点
string
safetyStockPoint
安全在庫量
string
placingYoteiQuantity
発注予定数
string
stockLotUnit
仕入単位
string
memo
備考
string
posProductId
スマレジ商品ID
string
Examples
Exampledefault
{ "productSkuId": "1", "shipperId": "1", "shipper": "荷主会社名", "productSkuCode": "pf_api_test_product", "makerProductSkuCode": "makerProductSkuCode", "janCode": "123", "detailKbn": "1", "productCategory": "通常商品", "productSkuName": "PFAPIテスト商品", "productSkuName2": "プラットフォームエーピーアイテスト商品", "productSkuKana": "PFAPIテストショウヒン", "taxFlag": "1", "price01": "800", "price02": "1000", "stockPrice": "800", "costPrice": "700", "stockFlag": "0", "stockFlagJa": "管理しない", "stockReserveFlag": "1", "stockReserveFlagJa": "即時", "yukoFlag": "1", "yukoFlagJa": "有効", "productPrintFlag": "0", "unitName": "1", "unitNameJa": "個", "stockQuantity": "30", "stockQuantityLogical": "20", "secureStock": "10", "placingOrderPoint": "5", "safetyStockPoint": "10", "placingYoteiQuantity": "10", "stockLotUnit": "1", "memo": "メモ", "posProductId": "1"}Fieldsに指定外の値が設定されている場合
Media typeapplication/json
object
type
required
string
title
required
string
detail
One of:
string
Array<string>
status
integer
Examples
Examplefieldsに指定外の値が設定されている場合
{ "type": "about:blank", "title": "BadRequest", "detail": "指定されたfields項目が不正です: {invalid_field}", "status": 400}指定されたIDのリソースが存在しない場合
Media typeapplication/json
object
type
required
string
title
required
string
detail
One of:
string
Array<string>
status
integer
Examples
Example指定したリソースが存在しない場合
{ "type": "about:blank", "title": "NotFound", "detail": "指定されたIDのリソースが見つかりません", "status": 404}サーバー内部エラー
Media typeapplication/json
object
type
required
string
title
required
string
detail
One of:
string
Array<string>
status
integer
Examples
Exampledefault
{ "type": "about:blank", "title": "InternalServerError", "status": 500}