オプショングループ商品
POST
/webhook-product-option-group-products
const url = 'https://api.smaregi.dev/TARGET-CONTRACT-ID/pos/webhook-product-option-group-products';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"contractId":"string","event":"string","action":"created","ids":[{"productOptionGroupId":"1","productId":"1"},{"productOptionGroupId":"1","productId":"10"}]}'};
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/pos/webhook-product-option-group-products \ --header 'Content-Type: application/json' \ --data '{ "contractId": "string", "event": "string", "action": "created", "ids": [ { "productOptionGroupId": "1", "productId": "1" }, { "productOptionGroupId": "1", "productId": "10" } ] }'Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”Smaregi-Event
string
イベント名 pos:product-options
Request Body
Section titled “Request Body”Media typeapplication/json
object
contractId
契約ID
string
event
イベント
string
action
アクション
- created: 登録
- deleted: 削除
- bulk-update: 一括更新
string
ids
Array<object>
object
productOptionGroupId
オプショングループID
string
productId
商品ID
string
Example
{ "contractId": "string", "event": "string", "action": "created", "ids": [ { "productOptionGroupId": "1", "productId": "1" }, { "productOptionGroupId": "1", "productId": "10" } ]}