curl -X PATCH https://api.whaapy.com/funnel/v1/stages/reorder \
-H "Authorization: Bearer wha_TU_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"stage_ids": [
"550e8400-e29b-41d4-a716-446655440002",
"550e8400-e29b-41d4-a716-446655440000",
"550e8400-e29b-41d4-a716-446655440001"
]
}'
{
"success": true,
"stages": [
{
"id": "550e8400-e29b-41d4-a716-446655440002",
"name": "Closed",
"position": 0,
"color": "#f59e0b",
"contact_count": 30,
"created_at": "2026-01-01T00:00:00Z",
"updated_at": "2026-01-28T12:30:00Z"
},
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Lead",
"position": 1,
"color": "#6366f1",
"contact_count": 120,
"created_at": "2026-01-01T00:00:00Z",
"updated_at": "2026-01-28T12:30:00Z"
},
{
"id": "550e8400-e29b-41d4-a716-446655440001",
"name": "Qualified",
"position": 2,
"color": "#10b981",
"contact_count": 45,
"created_at": "2026-01-01T00:00:00Z",
"updated_at": "2026-01-28T12:30:00Z"
}
]
}
Cambia el orden de las etapas del funnel
curl -X PATCH https://api.whaapy.com/funnel/v1/stages/reorder \
-H "Authorization: Bearer wha_TU_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"stage_ids": [
"550e8400-e29b-41d4-a716-446655440002",
"550e8400-e29b-41d4-a716-446655440000",
"550e8400-e29b-41d4-a716-446655440001"
]
}'
{
"success": true,
"stages": [
{
"id": "550e8400-e29b-41d4-a716-446655440002",
"name": "Closed",
"position": 0,
"color": "#f59e0b",
"contact_count": 30,
"created_at": "2026-01-01T00:00:00Z",
"updated_at": "2026-01-28T12:30:00Z"
},
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Lead",
"position": 1,
"color": "#6366f1",
"contact_count": 120,
"created_at": "2026-01-01T00:00:00Z",
"updated_at": "2026-01-28T12:30:00Z"
},
{
"id": "550e8400-e29b-41d4-a716-446655440001",
"name": "Qualified",
"position": 2,
"color": "#10b981",
"contact_count": 45,
"created_at": "2026-01-01T00:00:00Z",
"updated_at": "2026-01-28T12:30:00Z"
}
]
}
funnels:writecurl -X PATCH https://api.whaapy.com/funnel/v1/stages/reorder \
-H "Authorization: Bearer wha_TU_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"stage_ids": [
"550e8400-e29b-41d4-a716-446655440002",
"550e8400-e29b-41d4-a716-446655440000",
"550e8400-e29b-41d4-a716-446655440001"
]
}'
{
"success": true,
"stages": [
{
"id": "550e8400-e29b-41d4-a716-446655440002",
"name": "Closed",
"position": 0,
"color": "#f59e0b",
"contact_count": 30,
"created_at": "2026-01-01T00:00:00Z",
"updated_at": "2026-01-28T12:30:00Z"
},
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Lead",
"position": 1,
"color": "#6366f1",
"contact_count": 120,
"created_at": "2026-01-01T00:00:00Z",
"updated_at": "2026-01-28T12:30:00Z"
},
{
"id": "550e8400-e29b-41d4-a716-446655440001",
"name": "Qualified",
"position": 2,
"color": "#10b981",
"contact_count": 45,
"created_at": "2026-01-01T00:00:00Z",
"updated_at": "2026-01-28T12:30:00Z"
}
]
}
{
"error": "validation_error",
"message": "Datos inválidos",
"details": {
"stage_ids": ["Debe proporcionar al menos una etapa"]
}
}
{
"error": "not_found",
"message": "Algunas etapas no existen",
"invalid_ids": ["id-que-no-existe"]
}
funnel_stages.reordered:
{
"event": "funnel_stages.reordered",
"data": {
"stage_ids": [
"550e8400-e29b-41d4-a716-446655440002",
"550e8400-e29b-41d4-a716-446655440000",
"550e8400-e29b-41d4-a716-446655440001"
],
"reordered_at": "2026-01-28T12:30:00Z"
}
}