部門削除
DELETE
/categories/{category_id}
const url = 'https://api.smaregi.dev/TARGET-CONTRACT-ID/pos/categories/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/categories/example \ --header 'Authorization: Bearer <token>'部門情報を削除します。
対象プラン
- スタンダード
- プレミアム
- プレミアムプラス
- フードビジネス
- リテールビジネス
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”category_id
required
string
部門ID
Responses
Section titled “Responses”削除成功
指定された部門IDが削除不可の場合
- 紐づく商品が存在する場合
- 親部門IDに指定されている場合
Media typeapplication/json
object
type
required
string
title
required
string
detail
string
status
integer
Examples
{ "type": "about:blank", "title": "Bad Request", "detail": "関連商品が存在するため削除できません", "status": 400}{ "type": "about:blank", "title": "Bad Request", "detail": "親部門に設定されているため削除できません", "status": 400}指定した部門データが存在しない場合
Media typeapplication/json
object
type
required
string
title
required
string
detail
string
status
integer
Examples
Exampleリソースが存在しない場合
{ "type": "about:blank", "title": "NotFound", "detail": "指定されたIDのリソースが見つかりません", "status": 404}