Skip to main content

停用成本中心

接口​

DELETE https://api.verifik.co/v2/cost-centers/{id}

停用一个成本中心。记录不会被删除:active 变为 false,用量历史仍然挂在它上面。新请求不能再使用这个中心。

请求头​

名称值
Content-Typeapplication/json
AuthorizationBearer <token>

路径参数​

id​

类型: string
必填: 是

要停用的成本中心 id。

请求示例​

curl -X DELETE "https://api.verifik.co/v2/cost-centers/6acfbdda92451bac5d0a7ebe" \
-H "Authorization: Bearer $VERIFIK_TOKEN"

响应示例​

{
"data": {
"_id": "6acfbdda92451bac5d0a7ebe",
"client": "69c2b824295cd7d276e478ad",
"name": "西班牙运营",
"code": "SPAIN-OPS",
"country": "ES",
"active": false,
"createdAt": "2026-10-14T17:37:30.469Z",
"updatedAt": "2026-10-14T18:05:44.010Z"
}
}

要重新启用,在更新成本中心中发送 active: true。

错误响应​

{
"message": "cost_center_not_found",
"code": "NotFound"
}