Desativar um centro de custo
Endpoint
DELETE https://api.verifik.co/v2/cost-centers/{id}
Desativa um centro de custo. O registro não é apagado: active passa a false e o histórico de uso continua ligado a ele. Novas solicitações não podem mais usar este centro.
cabeçalhos
| Nome | Valor |
|---|---|
| Content-Type | application/json |
| Authorization | Bearer <token> |
parâmetros de rota
id
Tipo: string
Obrigatório: Sim
O id do centro de custo a desativar.
Exemplo de solicitação
- cURL
- Node.js
- Python
curl -X DELETE "https://api.verifik.co/v2/cost-centers/6acfbdda92451bac5d0a7ebe" \
-H "Authorization: Bearer $VERIFIK_TOKEN"
const axios = require("axios");
const config = {
method: "delete",
url: "https://api.verifik.co/v2/cost-centers/6acfbdda92451bac5d0a7ebe",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_ACCESS_TOKEN"
}
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
import os
import requests
response = requests.delete(
"https://api.verifik.co/v2/cost-centers/6acfbdda92451bac5d0a7ebe",
headers={"Authorization": f"Bearer {os.environ['VERIFIK_TOKEN']}"},
)
print(response.json())
Exemplo de resposta
- 200 OK
{
"data": {
"_id": "6acfbdda92451bac5d0a7ebe",
"client": "69c2b824295cd7d276e478ad",
"name": "Operação Espanha",
"code": "SPAIN-OPS",
"country": "ES",
"active": false,
"createdAt": "2026-10-14T17:37:30.469Z",
"updatedAt": "2026-10-14T18:05:44.010Z"
}
}
Envie active: true em Atualizar um centro de custo para reativá-lo.
Respostas de erro
{
"message": "cost_center_not_found",
"code": "NotFound"
}