商品グループ一覧取得
GET
/product_groups
const url = 'https://api.smaregi.dev/TARGET-CONTRACT-ID/ec-b2b/product_groups?limit=10&page=1&sort=name%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-b2b/product_groups?limit=10&page=1&sort=name%3Adesc' \ --header 'Authorization: Bearer <token>'商品グループ情報の一覧を取得します。
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”limit
integer
取得件数
page
integer
ページ
sort
string
ソート
name: グループ名
Example
name:descResponses
Section titled “Responses”取得成功
Media typeapplication/json
Array
ProductGroupResponseobject
id
商品グループID
string format: uuid
referenceIdentifier
管理番号
使用可能文字: 半角英数字および - _ . #
string
name
グループ名
string
publishCode
公開ステータス
1: 公開2: 下書き
integer
detailPageText
詳細ページテキスト
null または空文字 "" を指定した場合は、値がクリア(null)されます。
string
updatedAt
更新日時:登録時・更新時の日時。[YYYY-MM-DDThh:mm:ssTZD]
string format: date-time
Examples
Exampledefault
[ { "id": "12345678-1234-1234-1234-1234567890ab", "referenceIdentifier": "group-001", "name": "夏季特集グループ", "publishCode": 1, "detailPageText": "夏季特集の商品グループです。", "updatedAt": "2025-06-09T14:15:40+09:00" }, { "id": "12345678-1234-1234-1234-1234567890cd", "referenceIdentifier": "group-002", "name": "冬季特集グループ", "publishCode": 2, "detailPageText": null, "updatedAt": "2025-06-09T14:15:40+09:00" }]Headers
Section titled “Headers”Link
<前ページURI>; rel="prev", <次ページURI>; rel="next"
string
- 入力チェックエラーの場合
Media typeapplication/json
object
type
required
string
title
required
string
detail
string
status
integer
Examples
{ "type": "about:blank", "title": "Bad Request", "detail": "request_json:[limit]は100以下の数字を指定してください。", "status": 400}{ "type": "about:blank", "title": "Bad Request", "detail": "request_json:[page]は1以上の数字を指定してください。", "status": 400}