商品グループ登録
POST
/product_groups
const url = 'https://api.smaregi.dev/TARGET-CONTRACT-ID/ec-b2b/product_groups';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"referenceIdentifier":"group-001","name":"夏季特集グループ","publishCode":1,"detailPageText":"夏季特集の商品グループです。"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.smaregi.dev/TARGET-CONTRACT-ID/ec-b2b/product_groups \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "referenceIdentifier": "group-001", "name": "夏季特集グループ", "publishCode": 1, "detailPageText": "夏季特集の商品グループです。" }'商品グループ情報を登録します。
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
ProductGroupRequest
object
referenceIdentifier
管理番号
使用可能文字: 半角英数字および - _ . #
string
name
グループ名
string
publishCode
公開ステータス
1: 公開2: 下書き
integer
detailPageText
詳細ページテキスト
null または空文字 "" を指定した場合は、値がクリア(null)されます。
string
Examples
Exampledefault
{ "referenceIdentifier": "group-001", "name": "夏季特集グループ", "publishCode": 1, "detailPageText": "夏季特集の商品グループです。"}Responses
Section titled “Responses”登録成功
Media typeapplication/json
ProductGroupResponse
object
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"}入力チェックエラーの場合
Media typeapplication/json
object
type
required
string
title
required
string
detail
string
status
integer
Example
{ "type": "about:blank", "title": "Bad Request", "detail": "request_json:[name]は255文字以下で指定してください。", "status": 400}指定された管理番号が既に登録されている場合
Media typeapplication/json
object
type
required
string
title
required
string
detail
string
status
integer
Example
{ "type": "about:blank", "title": "Conflict", "detail": "request_json:[referenceIdentifier]はこの項目の値は既に存在しています。違う値を指定してください。", "status": 409}