The Incidents API manages problems that arise during deliveries. Each incident is linked to an assignment (Documentation Index
Fetch the complete documentation index at: https://mintlify.com/JorLOrT/rappi2/llms.txt
Use this file to discover all available pages before exploring further.
asignacion_id), carries a tipo string and a numeric severidad (1–5). File evidence — photos, videos, audio, or documents — can be attached via a multipart upload endpoint and is stored in MongoDB GridFS.
All endpoints require a valid Bearer token. The required permission is noted on each operation.
List incidents
GET /incidencias
Returns incidents in descending date order with optional filters.
Permission: incidencias:read
Number of records to skip for pagination.
Maximum records to return (max
200).Filter to incidents for a specific assignment.
Return only incidents with
severidad >= severidad_min.Create incident
POST /incidencias
Create a new incident for an existing assignment.
Permission: incidencias:write
ID of the assignment during which the incident occurred. Must reference an existing assignment.
Incident type label (free-form string, e.g.
"paquete_dañado", "accidente", "robo").Severity level from
1 (minor) to 5 (critical).Free-text description or additional context.
Optional URL pointing to an external evidence resource.
Get incident
GET /incidencias/{incidencia_id}
Retrieve a single incident by ID.
Permission: incidencias:read
Incident ID.
Update incident
PATCH /incidencias/{incidencia_id}
Partially update an incident’s type, severity, notes, or evidence URL.
Permission: incidencias:write
Incident ID.
Updated incident type label.
Updated severity (
1–5).Updated notes.
Updated external evidence URL.
Delete incident
DELETE /incidencias/{incidencia_id}
Deletes the incident and cascades deletion to all associated evidence documents and GridFS files.
Permission: incidencias:delete
Incident ID.
Upload evidence files
POST /incidencias/{incidencia_id}/evidencias/upload
Uploads one or more files for an incident and stores them in MongoDB GridFS. Returns the created evidence document with references to each stored file.
Permission: incidencias:write
This endpoint uses
multipart/form-data, not JSON.Incident ID.
Evidence type:
foto, video, audio, or documento.Optional description for this set of files.
One or more files to upload (photo, video, audio, or document).
List evidence for incident
GET /incidencias/{incidencia_id}/evidencias
Returns all evidence documents linked to an incident, ordered by timestamp descending.
Permission: incidencias:read
Incident ID.
Get evidence document
GET /incidencias/evidencias/{evidencia_id}
Retrieve a single evidence document by its MongoDB ObjectId.
Permission: incidencias:read
MongoDB ObjectId of the evidence document.
Download evidence file
GET /incidencias/evidencias/archivos/{file_id}
Streams a raw file from GridFS. The response Content-Type is set from the metadata stored at upload time.
Permission: incidencias:read
GridFS ObjectId of the file (from an
archivos[].file_id field on an evidence document).Delete evidence document
DELETE /incidencias/evidencias/{evidencia_id}
Deletes the evidence document and all its associated GridFS files.
Permission: incidencias:delete
MongoDB ObjectId of the evidence document.
Incident response schema
Incident ID (auto-incremented).
Assignment during which the incident occurred.
Incident type label.
Severity on a scale of
1 (minor) to 5 (critical).Free-text description.
URL to an external evidence resource.
ISO 8601 datetime when the incident was recorded.
Evidence response schema
MongoDB ObjectId of the evidence document.
Linked incident ID.
One of
foto, video, audio, documento.List of GridFS file references.
List of external URLs (populated when evidence is linked by URL rather than file upload).
Description of the evidence.
User ID of the uploader.
ISO 8601 creation timestamp.