Skip to main content

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.

The Incidents API manages problems that arise during deliveries. Each incident is linked to an assignment (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
skip
integer
default:"0"
Number of records to skip for pagination.
limit
integer
default:"50"
Maximum records to return (max 200).
asignacion_id
integer
Filter to incidents for a specific assignment.
severidad_min
integer
Return only incidents with severidad >= severidad_min.
curl -X GET "https://api.rappi2.com/incidencias?asignacion_id=101&severidad_min=3" \
  -H "Authorization: Bearer <token>"
[
  {
    "id": 15,
    "asignacion_id": 101,
    "tipo": "paquete_dañado",
    "severidad": 4,
    "notas": "La caja llegó aplastada.",
    "evidencia_url": null,
    "fecha": "2026-05-22T13:45:00Z"
  }
]

Create incident

POST /incidencias Create a new incident for an existing assignment. Permission: incidencias:write
asignacion_id
integer
required
ID of the assignment during which the incident occurred. Must reference an existing assignment.
tipo
string
required
Incident type label (free-form string, e.g. "paquete_dañado", "accidente", "robo").
severidad
integer
required
Severity level from 1 (minor) to 5 (critical).
notas
string
Free-text description or additional context.
evidencia_url
string
Optional URL pointing to an external evidence resource.
curl -X POST "https://api.rappi2.com/incidencias" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "asignacion_id": 101,
    "tipo": "paquete_dañado",
    "severidad": 4,
    "notas": "La caja llegó aplastada."
  }'
{
  "id": 15,
  "asignacion_id": 101,
  "tipo": "paquete_dañado",
  "severidad": 4,
  "notas": "La caja llegó aplastada.",
  "evidencia_url": null,
  "fecha": "2026-05-22T13:45:00Z"
}

Get incident

GET /incidencias/{incidencia_id} Retrieve a single incident by ID. Permission: incidencias:read
incidencia_id
integer
required
Incident ID.
curl -X GET "https://api.rappi2.com/incidencias/15" \
  -H "Authorization: Bearer <token>"

Update incident

PATCH /incidencias/{incidencia_id} Partially update an incident’s type, severity, notes, or evidence URL. Permission: incidencias:write
incidencia_id
integer
required
Incident ID.
tipo
string
Updated incident type label.
severidad
integer
Updated severity (15).
notas
string
Updated notes.
evidencia_url
string
Updated external evidence URL.
curl -X PATCH "https://api.rappi2.com/incidencias/15" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{"severidad": 5, "notas": "Confirmado: pérdida total del paquete."}'

Delete incident

DELETE /incidencias/{incidencia_id} Deletes the incident and cascades deletion to all associated evidence documents and GridFS files. Permission: incidencias:delete
Deleting an incident permanently removes all linked evidence files from GridFS. This action is irreversible.
incidencia_id
integer
required
Incident ID.
curl -X DELETE "https://api.rappi2.com/incidencias/15" \
  -H "Authorization: Bearer <token>"

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.
incidencia_id
integer
required
Incident ID.
tipo
string
required
Evidence type: foto, video, audio, or documento.
descripcion
string
Optional description for this set of files.
archivos
file[]
required
One or more files to upload (photo, video, audio, or document).
curl -X POST "https://api.rappi2.com/incidencias/15/evidencias/upload" \
  -H "Authorization: Bearer <token>" \
  -F "tipo=foto" \
  -F "descripcion=Foto del daño en el embalaje" \
  -F "archivos=@/path/to/damage.jpg"
{
  "id": "664f2b3c4d5e6f7a8b9c0d1e",
  "incidencia_id": 15,
  "urls": [],
  "archivos": [
    {
      "file_id": "664f2b3c4d5e6f7a8b9c0d1f",
      "filename": "damage.jpg",
      "content_type": "image/jpeg",
      "size": 204800
    }
  ],
  "tipo": "foto",
  "descripcion": "Foto del daño en el embalaje",
  "uploaded_by": 3,
  "timestamp": "2026-05-22T14:10:00Z"
}

List evidence for incident

GET /incidencias/{incidencia_id}/evidencias Returns all evidence documents linked to an incident, ordered by timestamp descending. Permission: incidencias:read
incidencia_id
integer
required
Incident ID.
curl -X GET "https://api.rappi2.com/incidencias/15/evidencias" \
  -H "Authorization: Bearer <token>"

Get evidence document

GET /incidencias/evidencias/{evidencia_id} Retrieve a single evidence document by its MongoDB ObjectId. Permission: incidencias:read
evidencia_id
string
required
MongoDB ObjectId of the evidence document.
curl -X GET "https://api.rappi2.com/incidencias/evidencias/664f2b3c4d5e6f7a8b9c0d1e" \
  -H "Authorization: Bearer <token>"

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
file_id
string
required
GridFS ObjectId of the file (from an archivos[].file_id field on an evidence document).
curl -X GET "https://api.rappi2.com/incidencias/evidencias/archivos/664f2b3c4d5e6f7a8b9c0d1f" \
  -H "Authorization: Bearer <token>" \
  --output damage.jpg

Delete evidence document

DELETE /incidencias/evidencias/{evidencia_id} Deletes the evidence document and all its associated GridFS files. Permission: incidencias:delete
All files referenced by archivos are permanently deleted from GridFS.
evidencia_id
string
required
MongoDB ObjectId of the evidence document.
curl -X DELETE "https://api.rappi2.com/incidencias/evidencias/664f2b3c4d5e6f7a8b9c0d1e" \
  -H "Authorization: Bearer <token>"

Incident response schema

id
integer
required
Incident ID (auto-incremented).
asignacion_id
integer
required
Assignment during which the incident occurred.
tipo
string
required
Incident type label.
severidad
integer
required
Severity on a scale of 1 (minor) to 5 (critical).
notas
string
Free-text description.
evidencia_url
string
URL to an external evidence resource.
fecha
string
required
ISO 8601 datetime when the incident was recorded.

Evidence response schema

id
string
required
MongoDB ObjectId of the evidence document.
incidencia_id
integer
required
Linked incident ID.
tipo
string
required
One of foto, video, audio, documento.
archivos
object[]
required
List of GridFS file references.
urls
string[]
List of external URLs (populated when evidence is linked by URL rather than file upload).
descripcion
string
Description of the evidence.
uploaded_by
integer
User ID of the uploader.
timestamp
string
required
ISO 8601 creation timestamp.

Build docs developers (and LLMs) love