商品グループ更新
PATCH
/product_groups/{product_group_id}
const url = 'https://api.smaregi.dev/TARGET-CONTRACT-ID/ec-b2b/product_groups/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"夏季特集グループ(更新)","publishCode":2}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://api.smaregi.dev/TARGET-CONTRACT-ID/ec-b2b/product_groups/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "夏季特集グループ(更新)", "publishCode": 2 }'商品グループ情報を更新します。
リクエストボディで指定されなかったフィールドは更新されません。
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”product_group_id
required
string format: uuid
商品グループID
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
ProductGroupWritable
object
referenceIdentifier
管理番号
使用可能文字: 半角英数字および - _ . #
string
name
グループ名
string
publishCode
公開ステータス
1: 公開2: 下書き
integer
detailPageText
詳細ページテキスト
null または空文字 "" を指定した場合は、値がクリア(null)されます。
string
Examples
Exampledefault
{ "name": "夏季特集グループ(更新)", "publishCode": 2}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}指定されたIDのリソースが見つからない場合
Media typeapplication/json
object
type
required
string
title
required
string
detail
string
status
integer
Example
{ "type": "about:blank", "title": "Not Found", "detail": "指定されたIDのリソースが見つかりません", "status": 404}指定された管理番号が既に登録されている場合
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}