商品削除
DELETE
/products/{product_id}
const url = 'https://api.smaregi.dev/TARGET-CONTRACT-ID/ec-oms/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/ec-oms/products/example \ --header 'Authorization: Bearer <token>'商品を削除します。
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”product_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
{ "type": "about:blank", "title": "BadRequest", "detail": [ "指定された項目が不正です: invalidKey" ], "status": 400}{ "type": "about:blank", "title": "BadRequest", "detail": "すでに削除されています", "status": 400}指定された商品が存在しない場合
Media typeapplication/json
object
type
required
string
title
required
string
detail
One of:
string
Array<string>
status
integer
Examples
Example指定された商品が存在しない場合
{ "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}