Ir al contenido

Restaurar una cotización

PUT/api/quotation/{quotationId}/restore

Restaura una cotización eliminada. El estado vuelve al que tenía antes de eliminarla (previous_status) y se registra al usuario en restore_user_id. Si la cotización no está eliminada, responde 404.

quotationIdintegerobligatorio

Identificador de la cotización eliminada.

quotation.delete, que se valida en QuotationPolicy::restore.

Ventana de terminal
curl -X PUT \
"https://servererp.allendostmen.app/api/quotation/1/restore" \
-H "Authorization: Bearer $TOKEN" \
-H "Accept: application/json"
Cotización restaurada200
{
"id": 1520,
"code": "110012 - INSTALACION_ELECTRICA - ACME_SAC-V1",
"version": 1,
"igv": 18,
"rent": 1.5,
"detraction": 12,
"name": "Instalación eléctrica",
"date": "2026-11-19",
"description": "Instalación eléctrica del almacén central",
"days_validity": 30,
"coin_id": 1,
"coin_value": 3.75,
"limit_decimals": 4,
"customer_id": 8,
"customer_contact_id": 14,
"seller_id": 5,
"project_manager_id": 9,
"opportunity_id": 77,
"budget_folder_id": 31,
"status": "cotizando",
"is_global_utility": false,
"total_items": 12500,
"total_overheads": 1500,
"subtotal": 14000,
"total_igv": 2520,
"total": 16520,
"create_user_id": 5,
"created_at": "2026-11-19T10:40:15.000000Z",
"updated_at": "2026-11-19T10:40:15.000000Z",
"deleted_at": null,
"restore_user_id": 1
}
Sin permiso403
{
"message": "This action is unauthorized."
}
No existe404
{
"message": "No query results for model [App\\Models\\Quotation] 999."
}