店舗取得
GET
/shops/{shop_id}
const url = 'https://api.smaregi.dev/TARGET-CONTRACT-ID/ec-oms/shops/example?fields=shopId%2CshopName';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/shops/example?fields=shopId%2CshopName' \ --header 'Authorization: Bearer <token>'店舗を取得します。
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”shop_id
required
string
店舗ID
Query Parameters
Section titled “Query Parameters”fields
Array<string>
取得するフィールドをカンマ区切りで指定します。 指定がない場合すべてのフィールドを取得します。
Example
?fields=shopId,shopNameResponses
Section titled “Responses”取得成功
Media typeapplication/json
Shop
object
shopId
店舗ID
string
shopName
店舗名
string
ecShopName
ECショップ名
string
shopNameShort
店舗名略称
string
ecType
出店モール
string
ecTypeName
出店モール名
string
smaregiShopId
スマレジ店舗ID
string
Examples
Exampledefault
{ "shopId": "1", "shopName": "テスト店舗", "ecShopName": "テストECショップ", "shopNameShort": "テスト", "ecType": "1", "ecTypeName": "テストモール", "smaregiShopId": "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}