店舗一覧取得
GET
/shops
const url = 'https://api.smaregi.dev/TARGET-CONTRACT-ID/ec-oms/shops?limit=100&page=1&fields=shopId%2CshopName&shop_id=1%2C2&shop_name=%E3%83%86%E3%82%B9%E3%83%88%E5%BA%97%E8%88%971%2C%E3%83%86%E3%82%B9%E3%83%88%E5%BA%97%E8%88%972&ec_shop_name=%E3%83%86%E3%82%B9%E3%83%88EC%E3%82%B7%E3%83%A7%E3%83%83%E3%83%971%2C%E3%83%86%E3%82%B9%E3%83%88EC%E3%82%B7%E3%83%A7%E3%83%83%E3%83%972&shop_name_short=%E3%83%86%E3%82%B9%E3%83%881%2C%E3%83%86%E3%82%B9%E3%83%882&ec_type_name=%E3%83%86%E3%82%B9%E3%83%88%E3%83%A2%E3%83%BC%E3%83%AB1%2C%E3%83%86%E3%82%B9%E3%83%88%E3%83%A2%E3%83%BC%E3%83%AB2&sort=rank%3Adesc';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?limit=100&page=1&fields=shopId%2CshopName&shop_id=1%2C2&shop_name=%E3%83%86%E3%82%B9%E3%83%88%E5%BA%97%E8%88%971%2C%E3%83%86%E3%82%B9%E3%83%88%E5%BA%97%E8%88%972&ec_shop_name=%E3%83%86%E3%82%B9%E3%83%88EC%E3%82%B7%E3%83%A7%E3%83%83%E3%83%971%2C%E3%83%86%E3%82%B9%E3%83%88EC%E3%82%B7%E3%83%A7%E3%83%83%E3%83%972&shop_name_short=%E3%83%86%E3%82%B9%E3%83%881%2C%E3%83%86%E3%82%B9%E3%83%882&ec_type_name=%E3%83%86%E3%82%B9%E3%83%88%E3%83%A2%E3%83%BC%E3%83%AB1%2C%E3%83%86%E3%82%B9%E3%83%88%E3%83%A2%E3%83%BC%E3%83%AB2&sort=rank%3Adesc' \ --header 'Authorization: Bearer <token>'店舗の一覧を取得します。
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”limit
integer
取得件数
page
integer
ページ
fields
Array<string>
取得するフィールドをカンマ区切りで指定します。 指定がない場合すべてのフィールドを取得します。
Example
?fields=shopId,shopNameshop_id
Array<string>
店舗IDで絞り込みを行います。
- 完全一致で判定します。
- カンマ区切りで複数指定した場合はOR条件として扱います(例:
1,2は店舗IDが1または2に一致するレコードを返却します)。 - 空文字を指定した場合や、カンマ区切り内に空要素を含む場合(例:
1,,2)は400エラーを返却します。 - パラメータを省略した場合は絞り込みを行いません。
Example
?shop_id=1,2shop_name
Array<string>
店舗名で絞り込みを行います。
- 完全一致で判定します(部分一致は不可)。
- カンマ区切りで複数指定した場合はOR条件として扱います(例:
A,BはAまたはBに一致するレコードを返却します)。 - 空文字を指定した場合や、カンマ区切り内に空要素を含む場合(例:
A,,B)は400エラーを返却します。 - パラメータを省略した場合は絞り込みを行いません。
Example
?shop_name=%E3%83%86%E3%82%B9%E3%83%88%E5%BA%97%E8%88%971,%E3%83%86%E3%82%B9%E3%83%88%E5%BA%97%E8%88%972ec_shop_name
Array<string>
ECショップ名で絞り込みを行います。
- 完全一致で判定します(部分一致は不可)。
- カンマ区切りで複数指定した場合はOR条件として扱います(例:
A,BはAまたはBに一致するレコードを返却します)。 - 空文字を指定した場合や、カンマ区切り内に空要素を含む場合(例:
A,,B)は400エラーを返却します。 - パラメータを省略した場合は絞り込みを行いません。
Example
?ec_shop_name=%E3%83%86%E3%82%B9%E3%83%88EC%E3%82%B7%E3%83%A7%E3%83%83%E3%83%971,%E3%83%86%E3%82%B9%E3%83%88EC%E3%82%B7%E3%83%A7%E3%83%83%E3%83%972shop_name_short
Array<string>
店舗名略称で絞り込みを行います。
- 完全一致で判定します(部分一致は不可)。
- カンマ区切りで複数指定した場合はOR条件として扱います(例:
A,BはAまたはBに一致するレコードを返却します)。 - 空文字を指定した場合や、カンマ区切り内に空要素を含む場合(例:
A,,B)は400エラーを返却します。 - パラメータを省略した場合は絞り込みを行いません。
Example
?shop_name_short=%E3%83%86%E3%82%B9%E3%83%881,%E3%83%86%E3%82%B9%E3%83%882ec_type_name
Array<string>
出店モール名で絞り込みを行います。
- 完全一致で判定します(部分一致は不可)。
- カンマ区切りで複数指定した場合はOR条件として扱います(例:
A,BはAまたはBに一致するレコードを返却します)。 - 空文字を指定した場合や、カンマ区切り内に空要素を含む場合(例:
A,,B)は400エラーを返却します。 - パラメータを省略した場合は絞り込みを行いません。
Example
?ec_type_name=%E3%83%86%E3%82%B9%E3%83%88%E3%83%A2%E3%83%BC%E3%83%AB1,%E3%83%86%E3%82%B9%E3%83%88%E3%83%A2%E3%83%BC%E3%83%AB2sort
string
ソート
rank: ソート順
Example
rank:descResponses
Section titled “Responses”取得成功
Media typeapplication/json
Array<object>
Shopobject
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" }]Headers
Section titled “Headers”Link
string
<前ページURI>; rel="prev", <次ページURI>; rel="next", <最初ページURI>; rel="start", <最終ページURI>; rel="last"
- limitが範囲外の場合
- pageが範囲外の場合
Media typeapplication/json
object
type
required
string
title
required
string
detail
One of:
string
Array<string>
status
integer
Examples
{ "type": "about:blank", "title": "BadRequest", "detail": "limitは1〜1000の範囲で入力してください", "status": 400}{ "type": "about:blank", "title": "BadRequest", "detail": "pageは1以上で入力してください", "status": 400}サーバー内部エラー
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}