商品共通規格削除
DELETE
/products/{product_id}/variants/{class_id}
const url = 'https://api.smaregi.dev/TARGET-CONTRACT-ID/ec-oms/products/example/variants/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/ec-oms/products/example/variants/example \ --header 'Authorization: Bearer <token>'商品共通規格を削除します。
※規格を削除する場合、商品SKU紐づけ・規格別価格情報などが初期化されることがあります。
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”product_id
required
string
商品ID
class_id
required
string
規格ID
Responses
Section titled “Responses”削除成功
指定された項目が不正な場合
Media typeapplication/json
object
type
required
string
title
required
string
detail
One of:
string
Array<string>
status
integer
Examples
Example指定された項目が不正な場合
{ "type": "about:blank", "title": "BadRequest", "detail": [ "指定された項目が不正です: invalidKey" ], "status": 400}- 指定された商品が存在しない場合
- 指定された規格が存在しない場合
Media typeapplication/json
object
type
required
string
title
required
string
detail
One of:
string
Array<string>
status
integer
Examples
{ "type": "about:blank", "title": "NotFound", "detail": [ "該当する商品IDが見つかりませんでした" ], "status": 404}{ "type": "about:blank", "title": "NotFound", "detail": [ "該当する規格IDが見つかりませんでした" ], "status": 404}サーバー内部エラー
Media typeapplication/json
object
type
required
string
title
required
string
detail
One of:
string
Array<string>
status
integer
Examples
Exampledefault
{ "type": "about:blank", "title": "InternalServerError", "status": 500}