Eliminar un flujo de proyecto
Endpoint
DELETE https://api.verifik.co/v3/project-flows/{id}
Elimina permanentemente un flujo de proyecto y toda su configuración asociada. Esta acción no se puede deshacer.
Encabezados
| Nombre | Valor |
|---|---|
| Content-Type | application/json |
| Authorization | Bearer <token> |
Parámetros
| Nombre | Tipo | Requerido | Descripción |
|---|---|---|---|
id | string | Sí | ID del flujo de proyecto a eliminar |
Solicitud
- Node.js
- PHP
- Python
- Go
const fetch = require("node-fetch");
async function run() {
const flowId = "64a1b2c3d4e5f6789012346";
const res = await fetch(`https://api.verifik.co/v3/project-flows/${flowId}`, {
method: "DELETE",
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${process.env.VERIFIK_TOKEN}`,
},
});
console.log(await res.json());
}
run();
<?php
$flowId = "64a1b2c3d4e5f6789012346";
$ch = curl_init("https://api.verifik.co/v3/project-flows/" . $flowId);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Content-Type: application/json",
"Authorization: Bearer " . getenv("VERIFIK_TOKEN")
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
import os, requests
flow_id = "64a1b2c3d4e5f6789012346"
url = f"https://api.verifik.co/v3/project-flows/{flow_id}"
headers = {
"Content-Type": "application/json",
"Authorization": f"Bearer {os.getenv('VERIFIK_TOKEN')}"
}
r = requests.delete(url, headers=headers)
print(r.json())
package main
import (
"encoding/json"
"fmt"
"net/http"
"os"
)
func main() {
flowId := "64a1b2c3d4e5f6789012346"
url := fmt.Sprintf("https://api.verifik.co/v3/project-flows/%s", flowId)
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer "+os.Getenv("VERIFIK_TOKEN"))
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
var out map[string]interface{}
json.NewDecoder(resp.Body).Decode(&out)
fmt.Println(out)
}
Respuesta
- 200
- 400
- 401/403
- 404
- 409
{
"data": {
"_id": "64a1b2c3d4e5f6789012346",
"status": "deleted"
}
}
{ "message": "Invalid project flow ID format", "code": "BadRequest" }
{ "message": "Access forbidden", "code": "Forbidden" }
{ "message": "Project flow not found", "code": "NotFound" }
{ "message": "Cannot delete project flow with active users", "code": "Conflict" }
Notas
- Acción irreversible; considera pausar el flujo antes de borrar.
- Se eliminan referencias en el proyecto padre y configuraciones asociadas.