Every delivery in Rappi2 follows a well-defined path: an order is placed, a driver and vehicle are paired to it, the driver picks up and delivers the package, and the transaction is closed with a payment and invoice. This guide walks through each stage in sequence and shows the exact API calls you need at every step.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.
Order state machine
An order moves through the following states. Transitions are driven automatically by actions on the/api/asignaciones resource — you never need to PATCH the order state directly during the normal flow.
| Order state | Assignment state | Trigger |
|---|---|---|
Pendiente | — | Order created |
En Proceso | Asignada | Assignment created |
En Tránsito | EnCurso | /iniciar called |
Entregado | Finalizada | /finalizar called |
Cancelado | — | Order deleted |
Create an order
Submit the customer, origin address, and destination address. The order is created in the Response
Pendiente state.Required permission: ordenes:write201 Created:| Field | Type | Required | Notes |
|---|---|---|---|
cliente_id | integer | Yes | Must reference an active client |
direccion_origen | string | Yes | Full pickup address |
distrito_origen | string | No | District / borough |
direccion_destino | string | Yes | Full delivery address |
distrito_destino | string | No | District / borough |
total | decimal | No | Order value |
Assign a driver
Link a driver and vehicle to the order. Both must be in service before the API will accept the assignment.Required permission: Response
asignaciones:write201 Created:| Field | Type | Required | Notes |
|---|---|---|---|
orden_id | integer | Yes | Must be in Pendiente state |
conductor_id | integer | Yes | Must be active and Disponible |
vehiculo_placa | string | Yes | Must be active and Operativo |
Creating an assignment automatically transitions the linked order from
Pendiente to En Proceso and flips the conductor’s disponibilidad to "Ocupado". No separate PATCH is needed.Start the delivery (iniciar)
Call Response This call sets
/iniciar when the driver picks up the package and begins transit. The assignment must be in the Asignada state.Required permission: asignaciones:write200 OK:asignacion.estado → EnCurso, records fecha_inicio (UTC), and transitions the linked order to En Tránsito.Complete the delivery (finalizar)
Call Response This call sets
/finalizar once the package has been delivered. The assignment must be in the EnCurso state.Required permission: asignaciones:write200 OK:asignacion.estado → Finalizada, records fecha_fin (UTC), transitions the order to Entregado, and resets the conductor’s disponibilidad back to "Disponible".Record payment
Post a payment against the order. Payments are scoped under the order they belong to.Required permission: Response
pagos:write201 Created:| Field | Type | Required | Notes |
|---|---|---|---|
monto | decimal | Yes | Payment amount |
estado | string | No | Pendiente | Pagado | Fallido | Reembolsado. Defaults to Pendiente |
referencia_banco | string | No | Bank transaction reference |