オプショングループ商品削除
DELETE
/product_option_groups/{product_option_group_id}/products/{product_id}
const url = 'https://api.smaregi.dev/TARGET-CONTRACT-ID/pos/product_option_groups/example/products/example';const options = {method: 'DELETE', 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 DELETE \ --url https://api.smaregi.dev/TARGET-CONTRACT-ID/pos/product_option_groups/example/products/example \ --header 'Authorization: Bearer <token>'指定されたオプショングループ商品を削除します。
対象プラン
- スタンダード
- プレミアム
- プレミアムプラス
- フードビジネス
- リテールビジネス
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”product_option_group_id
required
string
オプショングループID
product_id
required
string
商品ID
※ ユーザーアクセストークンを利用する場合、ユーザーの所属する店舗で販売している商品IDを指定してください。
Responses
Section titled “Responses”削除成功
- 指定されたオプショングループのオプション商品が1件の場合
Media typeapplication/json
object
type
required
string
title
required
string
detail
string
status
integer
Examples
Example指定されたオプショングループのオプション商品が1件の場合
{ "type": "about:blank", "title": "Bad Request", "detail": "オプション商品が0件になるため削除できません。", "status": 400}- URIで指定されたオプショングループが存在しない場合
- URIで指定された商品が存在しない場合
- URIで指定されたパラメータの組み合わせが存在しない場合
Media typeapplication/json
object
type
required
string
title
required
string
detail
string
status
integer
Examples
{ "type": "about:blank", "title": "NotFound", "detail": "指定されたオプショングループIDのリソースが見つかりません。", "status": 404}{ "type": "about:blank", "title": "NotFound", "detail": "指定された商品IDのリソースが見つかりません。", "status": 404}{ "type": "about:blank", "title": "NotFound", "detail": "指定されたオプショングループ商品のリソースが見つかりません。", "status": 404}