Update Document
documentos_vehiculos table. Only the fields provided in the request body will be updated.
Path Parameters
The unique identifier of the document to update
Request Body
Include only the fields you want to update. All fields from the create endpoint are supported:Updated expiration date (YYYY-MM-DD format)
Updated issue date (YYYY-MM-DD format)
Updated document number
Updated insurance company name
Updated PDF document URL
Updated observations or notes
Updated SOAT premium amount (for SOAT documents)
Updated policy number (for insurance documents)
Updated coverage type (for insurance documents)
Updated RTM certificate number (for RTM documents)
Response
Returns the updated document object with all fields.Document identifier
Vehicle ID
Document type
Expiration date
Timestamp of last update
Example Response
Error Responses
Common Update Scenarios
Renew Expired Document
When a document expires and needs renewal:Update PDF After Re-upload
If you need to replace the PDF document:Extend Expiration Date
If the expiration date needs to be corrected:Update Insurance Details
For updating insurance-specific fields:Partial Updates
The API supports partial updates - you only need to include the fields you want to change. Fields not included in the request body will remain unchanged.Example: Update Only Observations
Validation
The API validates:- Document ID must exist
- Date formats must be valid (YYYY-MM-DD)
- Expiration date should be in the future (warning only)
- References to other entities must be valid
Automatic Updates
Theupdated_at timestamp is automatically updated on every change.
Best Practices
- Always include observations when updating to maintain an audit trail
- Upload new PDF first before updating the
pdf_url - Verify dates before submitting to avoid expiration tracking issues
- Keep old PDFs in storage for historical records
- Update immediately when renewal documents are received to maintain accurate expiration tracking