Saltar al contenido
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Rutas

Endpoints

Listar rutas

get

Retorna un listado paginado de rutas de la organización. Por defecto excluye rutas en estado draft y finished.

Autorizaciones
AuthorizationstringRequerido

Token Bearer generado en la sección de integraciones de tu organización en Zipnova Rutas.

Parámetros de consulta
statusone ofOpcional

Filtrar por estado(s). Puede ser un string (status=published) o un array (status[]=published&status[]=started).

string · enumOpcionalValores posibles:
o
created_fromstring · date-timeOpcional

Filtrar rutas creadas desde esta fecha (ISO 8601).

Example: 2024-05-01T00:00:00Z
created_tostring · date-timeOpcional

Filtrar rutas creadas hasta esta fecha (ISO 8601).

Example: 2024-05-31T23:59:59Z
facilityone ofOpcional

Filtrar por instalación(es) de la ruta. Puede ser un string (facility=fac_01JTQZ8KPME5X3N7WVYHF2RD4K) o un array (facility[]=...&facility[]=...). Acepta el ID de la instalación (fac_...) o su ID interno. Las rutas sin instalación asociada quedan excluidas al aplicar este filtro.

stringOpcionalExample: fac_01JTQZ8KPME5X3N7WVYHF2RD4K
o
string[]OpcionalExample: fac_01JTQZ8KPME5X3N7WVYHF2RD4K
Respuestas
200

Lista paginada de rutas

application/json
get/routes
GET /api/v1/routes HTTP/1.1
Host: mi-organizacion.routes.zipnova.app
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "routes": {
    "data": [
      {
        "id": 10001545,
        "external_id": "RUTA-2024-001",
        "shift_date": "2024-05-21",
        "status": "published",
        "facility": {
          "id": "fac_01JTQZ8KPME5X3N7WVYHF2RD4K",
          "code": "default",
          "name": "Centro de distribución Norte"
        },
        "driver": {
          "id": 100,
          "firstname": "Carlos",
          "lastname": "López"
        },
        "vehicle": {
          "id": 56,
          "name": "Furgón 01"
        },
        "created_at": "2024-05-21T03:00:05.000Z"
      }
    ],
    "links": {
      "first": "https://example.com",
      "last": "https://example.com",
      "prev": "https://example.com",
      "next": "https://example.com"
    },
    "meta": {
      "total": 150,
      "per_page": 20,
      "current_page": 1,
      "last_page": 8,
      "from": 1,
      "to": 20
    }
  }
}

Obtener ruta

get

Obtiene los detalles completos de una ruta incluyendo vehículo, conductor y tareas.

Autorizaciones
AuthorizationstringRequerido

Token Bearer generado en la sección de integraciones de tu organización en Zipnova Rutas.

Parámetros de ruta
routeinteger · int64Requerido

ID de la ruta

Example: 10001545
Parámetros de consulta
show_groupedinteger · enumOpcional

Si es 1, el campo tasks se retorna como un objeto donde las claves son valores de grouping_hash y cada valor es un array de tareas con su número de secuencia, en lugar de un array plano.

Default: 0Example: 1Valores posibles:
Respuestas
200

Ruta obtenida

application/json

Ruta de reparto con sus tareas y datos del vehículo y conductor

idinteger · int64Opcional

ID interno de la ruta.

Example: 10001545
external_idstring · nullableOpcional

ID externo de la ruta.

Example: RUTA-2024-001
shift_datestring · dateOpcional

Fecha de la ruta.

Example: 2024-05-21
shift_sequenceintegerOpcional

Secuencia de la ruta (número de ruta para un vehículo y fecha).

Example: 1
shift_starts_atstring · date-time · nullableOpcional

Hora planificada de inicio, en UTC.

Example: 2024-05-21T11:00:00+00:00
estimated_finished_atstring · date-time · nullableOpcional

Hora estimada de fin, en UTC. Se recalcula con cada cambio de la ruta y mientras se ejecuta.

Example: 2024-05-21T18:30:00+00:00
statusstring · enumOpcional

Estado de la ruta.

Example: publishedValores posibles:
encoded_polylinestring · nullableOpcional

Polyline codificada del recorrido.

Example: a~l~Fjk~uOnzh@vlbBtc~@tsE`vnAp...
tasksone ofOpcional

Tareas de la ruta. Sin agrupamiento: array de objetos con sequence_number y task. Con show_grouped=1: objeto donde cada clave es el grouping_hash del grupo y el valor es un array de esos mismos objetos.

o
created_atstring · date-timeOpcionalExample: 2024-05-21T03:00:05.000Z
published_atstring · date-time · nullableOpcionalExample: 2024-05-21T16:57:38.000Z
started_atstring · date-time · nullableOpcionalExample: 2024-05-21T16:58:09.000Z
finished_atstring · date-time · nullableOpcionalExample: 2024-05-22T03:00:04.000Z
get/routes/{route}
GET /api/v1/routes/{route} HTTP/1.1
Host: mi-organizacion.routes.zipnova.app
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "id": 10001545,
  "external_id": "RUTA-2024-001",
  "shift_date": "2024-05-21",
  "shift_sequence": 1,
  "shift_starts_at": "2024-05-21T11:00:00+00:00",
  "estimated_finished_at": "2024-05-21T18:30:00+00:00",
  "status": "published",
  "carrier": {
    "id": "transporte-rex"
  },
  "facility": {
    "id": "fac_01JTQZ8KPME5X3N7WVYHF2RD4K",
    "code": "default",
    "name": "Centro de distribución Norte"
  },
  "vehicle": {
    "id": 56,
    "name": "Furgón 01",
    "color": "#bf9340",
    "vehicle_type": {
      "id": "vht_01JTQZ8KPME5X3N7WVYHF2RD4K",
      "name": "Van"
    }
  },
  "driver": {
    "id": 100,
    "firstname": "Carlos",
    "lastname": "López",
    "phone": "+5491156352708",
    "email": "carlos.lopez@empresa.com",
    "is_driver_on_duty": true
  },
  "encoded_polyline": "a~l~Fjk~uOnzh@vlbBtc~@tsE`vnAp...",
  "tasks": [
    {
      "sequence_number": 1,
      "task": {
        "id": "01GQBRNWN8ZS4X8K9WN5DFXH3Y",
        "internal_id": 1,
        "grouping_hash": "4343dsknnd9sdskd29d",
        "client_code": "CLI-001",
        "carrier": {
          "id": 5,
          "subdomain": "mi-empresa",
          "name": "Mi Empresa S.A."
        },
        "step": {
          "name": "delivery",
          "display_name": "Entrega",
          "complete_actions": [
            {}
          ],
          "fail_actions": [
            {}
          ],
          "cancel_actions": [
            {}
          ]
        },
        "is_pickup": false,
        "status": {
          "id": 1,
          "code": "pending",
          "name": "Pendiente",
          "color": "#FF5733",
          "metadata": {},
          "changed_at": "2024-05-21T12:00:00+00:00"
        },
        "address": {
          "id": "01J9X2K3M4N5P6Q7R8S9T0V1W2",
          "name": "Juan Pérez",
          "street": "Calle del Bajo",
          "street_number": "123",
          "floor": "2",
          "apartment": "B",
          "reference": "Portón negro, timbre 2",
          "zipcode": "8400",
          "phone": "+5492944412345",
          "email": "jperez@ejemplo.com",
          "city": {
            "id": 1875,
            "name": "Bariloche"
          },
          "state": {
            "id": 25,
            "name": "Rio Negro"
          },
          "country": {
            "id": 1,
            "name": "Argentina",
            "iso": "AR"
          },
          "geo_latitude": -41.133472,
          "geo_longitude": -71.310936
        },
        "recipient_name": "Juan Pérez",
        "notes": "Llamar antes de llegar",
        "is_self_assignable": false,
        "assigned_to_user": {
          "id": 10,
          "firstname": "Carlos",
          "lastname": "López"
        },
        "should_complete_after": "2024-05-21T09:00:00.000Z",
        "should_complete_before": "2024-05-21T13:00:00.000Z",
        "depends_on_task_ids": [
          "01GQBRNWN8ZS4X8K9WN5DFXH3Y",
          "01HXYZ123456789ABCDEFGHIJK"
        ],
        "cost": 0,
        "service_time_seconds": 300,
        "requirements_start": [
          {
            "type": "signature",
            "label": "Firma del destinatario",
            "required": true,
            "value": "text"
          }
        ],
        "requirements_complete": [
          {
            "type": "signature",
            "label": "Firma del destinatario",
            "required": true,
            "value": "text"
          }
        ],
        "requirements_fail": [
          {
            "type": "signature",
            "label": "Firma del destinatario",
            "required": true,
            "value": "text"
          }
        ],
        "time_windows": {
          "monday": [
            "08:00-14:00",
            "15:00-20:00"
          ],
          "tuesday": [
            "08:00-14:00",
            "15:00-20:00"
          ],
          "wednesday": [
            "08:00-14:00",
            "15:00-20:00"
          ],
          "thursday": [
            "08:00-14:00",
            "15:00-20:00"
          ],
          "friday": [
            "08:00-14:00",
            "15:00-20:00"
          ],
          "saturday": [
            "08:00-13:00"
          ],
          "sunday": []
        },
        "packages": [
          {
            "id": 10323223,
            "label_code": "LBL123",
            "external_reference": "PKG-001",
            "weight": {
              "value": 5000,
              "original_value": 5,
              "unit": "kg"
            },
            "grams": 5000,
            "length": {
              "value": 50,
              "original_value": 50,
              "unit": "cm"
            },
            "width": {
              "value": 30,
              "original_value": 30,
              "unit": "cm"
            },
            "height": {
              "value": 20,
              "original_value": 20,
              "unit": "cm"
            },
            "temperature_min": {
              "value": 2,
              "original_value": 2,
              "unit": "celsius"
            },
            "temperature_max": {
              "value": 8,
              "original_value": 8,
              "unit": "celsius"
            },
            "is_flammable": false,
            "is_corrosive": false,
            "is_fragile": true,
            "classification": "FOOD",
            "un_code": "1234",
            "declared_value_amount": 150,
            "declared_value_currency": "ARS"
          }
        ],
        "shipment": {
          "id": 100293023,
          "ulid": "01GQBRNWN8ZS4X8K9WN5DFXH3Y",
          "reference": "ORDER-123456",
          "client_code": "SHP-CLI-001",
          "external_reference": "EXT-ORDER-789",
          "declared_value": 100,
          "control_number": "CN-001"
        },
        "workflow": {
          "id": 28491,
          "external_reference": "WF-001",
          "step_in_workflow": "Entrega",
          "blueprint": {
            "type": "delivery"
          }
        },
        "merchant": {
          "id": 42,
          "name": "Tienda Ejemplo",
          "code": "TIENDA-01"
        },
        "merchant_id": 1,
        "groupable_by_merchant": true,
        "created_at": "2024-05-21T12:00:00.000Z",
        "updated_at": "2024-05-21T12:00:00.000Z"
      }
    }
  ],
  "created_at": "2024-05-21T03:00:05.000Z",
  "published_at": "2024-05-21T16:57:38.000Z",
  "started_at": "2024-05-21T16:58:09.000Z",
  "finished_at": "2024-05-22T03:00:04.000Z"
}

Crear ruta

post

Crea una nueva ruta de reparto, opcionalmente con vehículo, conductor y tareas iniciales.

Autorizaciones
AuthorizationstringRequerido

Token Bearer generado en la sección de integraciones de tu organización en Zipnova Rutas.

Cuerpo
vehicle_idinteger · nullableOpcional

ID del vehículo a asignar.

Example: 56
driver_idinteger · nullableOpcional

ID del conductor a asignar.

Example: 100
shift_datestring · dateOpcional

Fecha de la ruta.

Example: 2024-05-21
shift_starts_atstring · date-time · nullableOpcional

Hora planificada de inicio, en ISO 8601 con offset. Si se omite, la ruta arranca cuando se estima que termina la última ruta del vehículo ese día o, si es la primera, a la hora de inicio de la organización.

Example: 2024-05-21T11:00:00Z
external_idstring · nullableOpcional

ID externo de la ruta.

Example: RUTA-2024-001
descriptionstring · nullableOpcional

Descripción de la ruta.

Example: Zona Norte - Mañana
facility_idstring · nullableOpcional

Instalación bajo la que opera la ruta, con su ID (fac_...). Si se omite, se usa la instalación más antigua de la organización.

Example: fac_01JTQZ8KPME5X3N7WVYHF2RD4K
Respuestas
201

Ruta creada

application/json
successbooleanOpcionalExample: true
post/routes
POST /api/v1/routes HTTP/1.1
Host: mi-organizacion.routes.zipnova.app
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 273

{
  "vehicle_id": 56,
  "driver_id": 100,
  "shift_date": "2024-05-21",
  "shift_starts_at": "2024-05-21T11:00:00Z",
  "external_id": "RUTA-2024-001",
  "description": "Zona Norte - Mañana",
  "facility_id": "fac_01JTQZ8KPME5X3N7WVYHF2RD4K",
  "tasks": [
    {
      "id": "01GQBRNWN8ZS4X8K9WN5DFXH3Y",
      "position": 1
    }
  ]
}
{
  "success": true,
  "route": {
    "id": 10001545,
    "external_id": "RUTA-2024-001",
    "shift_date": "2024-05-21",
    "shift_sequence": 1,
    "shift_starts_at": "2024-05-21T11:00:00+00:00",
    "estimated_finished_at": "2024-05-21T18:30:00+00:00",
    "status": "published",
    "carrier": {
      "id": "transporte-rex"
    },
    "facility": {
      "id": "fac_01JTQZ8KPME5X3N7WVYHF2RD4K",
      "code": "default",
      "name": "Centro de distribución Norte"
    },
    "vehicle": {
      "id": 56,
      "name": "Furgón 01",
      "color": "#bf9340",
      "vehicle_type": {
        "id": "vht_01JTQZ8KPME5X3N7WVYHF2RD4K",
        "name": "Van"
      }
    },
    "driver": {
      "id": 100,
      "firstname": "Carlos",
      "lastname": "López",
      "phone": "+5491156352708",
      "email": "carlos.lopez@empresa.com",
      "is_driver_on_duty": true
    },
    "encoded_polyline": "a~l~Fjk~uOnzh@vlbBtc~@tsE`vnAp...",
    "tasks": [
      {
        "sequence_number": 1,
        "task": {
          "id": "01GQBRNWN8ZS4X8K9WN5DFXH3Y",
          "internal_id": 1,
          "grouping_hash": "4343dsknnd9sdskd29d",
          "client_code": "CLI-001",
          "carrier": {
            "id": 5,
            "subdomain": "mi-empresa",
            "name": "Mi Empresa S.A."
          },
          "step": {
            "name": "delivery",
            "display_name": "Entrega",
            "complete_actions": [
              {}
            ],
            "fail_actions": [
              {}
            ],
            "cancel_actions": [
              {}
            ]
          },
          "is_pickup": false,
          "status": {
            "id": 1,
            "code": "pending",
            "name": "Pendiente",
            "color": "#FF5733",
            "metadata": {},
            "changed_at": "2024-05-21T12:00:00+00:00"
          },
          "address": {
            "id": "01J9X2K3M4N5P6Q7R8S9T0V1W2",
            "name": "Juan Pérez",
            "street": "Calle del Bajo",
            "street_number": "123",
            "floor": "2",
            "apartment": "B",
            "reference": "Portón negro, timbre 2",
            "zipcode": "8400",
            "phone": "+5492944412345",
            "email": "jperez@ejemplo.com",
            "city": {
              "id": 1875,
              "name": "Bariloche"
            },
            "state": {
              "id": 25,
              "name": "Rio Negro"
            },
            "country": {
              "id": 1,
              "name": "Argentina",
              "iso": "AR"
            },
            "geo_latitude": -41.133472,
            "geo_longitude": -71.310936
          },
          "recipient_name": "Juan Pérez",
          "notes": "Llamar antes de llegar",
          "is_self_assignable": false,
          "assigned_to_user": {
            "id": 10,
            "firstname": "Carlos",
            "lastname": "López"
          },
          "should_complete_after": "2024-05-21T09:00:00.000Z",
          "should_complete_before": "2024-05-21T13:00:00.000Z",
          "depends_on_task_ids": [
            "01GQBRNWN8ZS4X8K9WN5DFXH3Y",
            "01HXYZ123456789ABCDEFGHIJK"
          ],
          "cost": 0,
          "service_time_seconds": 300,
          "requirements_start": [
            {
              "type": "signature",
              "label": "Firma del destinatario",
              "required": true,
              "value": "text"
            }
          ],
          "requirements_complete": [
            {
              "type": "signature",
              "label": "Firma del destinatario",
              "required": true,
              "value": "text"
            }
          ],
          "requirements_fail": [
            {
              "type": "signature",
              "label": "Firma del destinatario",
              "required": true,
              "value": "text"
            }
          ],
          "time_windows": {
            "monday": [
              "08:00-14:00",
              "15:00-20:00"
            ],
            "tuesday": [
              "08:00-14:00",
              "15:00-20:00"
            ],
            "wednesday": [
              "08:00-14:00",
              "15:00-20:00"
            ],
            "thursday": [
              "08:00-14:00",
              "15:00-20:00"
            ],
            "friday": [
              "08:00-14:00",
              "15:00-20:00"
            ],
            "saturday": [
              "08:00-13:00"
            ],
            "sunday": []
          },
          "packages": [
            {
              "id": 10323223,
              "label_code": "LBL123",
              "external_reference": "PKG-001",
              "weight": {
                "value": 5000,
                "original_value": 5,
                "unit": "kg"
              },
              "grams": 5000,
              "length": {
                "value": 50,
                "original_value": 50,
                "unit": "cm"
              },
              "width": {
                "value": 30,
                "original_value": 30,
                "unit": "cm"
              },
              "height": {
                "value": 20,
                "original_value": 20,
                "unit": "cm"
              },
              "temperature_min": {
                "value": 2,
                "original_value": 2,
                "unit": "celsius"
              },
              "temperature_max": {
                "value": 8,
                "original_value": 8,
                "unit": "celsius"
              },
              "is_flammable": false,
              "is_corrosive": false,
              "is_fragile": true,
              "classification": "FOOD",
              "un_code": "1234",
              "declared_value_amount": 150,
              "declared_value_currency": "ARS"
            }
          ],
          "shipment": {
            "id": 100293023,
            "ulid": "01GQBRNWN8ZS4X8K9WN5DFXH3Y",
            "reference": "ORDER-123456",
            "client_code": "SHP-CLI-001",
            "external_reference": "EXT-ORDER-789",
            "declared_value": 100,
            "control_number": "CN-001"
          },
          "workflow": {
            "id": 28491,
            "external_reference": "WF-001",
            "step_in_workflow": "Entrega",
            "blueprint": {
              "type": "delivery"
            }
          },
          "merchant": {
            "id": 42,
            "name": "Tienda Ejemplo",
            "code": "TIENDA-01"
          },
          "merchant_id": 1,
          "groupable_by_merchant": true,
          "created_at": "2024-05-21T12:00:00.000Z",
          "updated_at": "2024-05-21T12:00:00.000Z"
        }
      }
    ],
    "created_at": "2024-05-21T03:00:05.000Z",
    "published_at": "2024-05-21T16:57:38.000Z",
    "started_at": "2024-05-21T16:58:09.000Z",
    "finished_at": "2024-05-22T03:00:04.000Z"
  }
}

Agregar tareas a la ruta

post

Agrega una o más tareas a una ruta. Cada tarea se identifica por su ID. Las tareas del mismo workflow se incluyen automáticamente. Las tareas en estado final (completada, fallada, cancelada) se reportan en tasks_in_final_status pero no se agregan.

Autorizaciones
AuthorizationstringRequerido

Token Bearer generado en la sección de integraciones de tu organización en Zipnova Rutas.

Parámetros de ruta
routeinteger · int64Requerido

ID de la ruta

Example: 10001545
Cuerpo
Respuestas
200

Tareas agregadas

application/json
successbooleanOpcionalExample: true
post/routes/{route}/tasks/add
POST /api/v1/routes/{route}/tasks/add HTTP/1.1
Host: mi-organizacion.routes.zipnova.app
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 60

{
  "tasks": [
    {
      "id": "01GQBRNWN8ZS4X8K9WN5DFXH3Y",
      "position": 1
    }
  ]
}
{
  "success": true,
  "route": {
    "id": 10001545,
    "external_id": "RUTA-2024-001",
    "shift_date": "2024-05-21",
    "shift_sequence": 1,
    "shift_starts_at": "2024-05-21T11:00:00+00:00",
    "estimated_finished_at": "2024-05-21T18:30:00+00:00",
    "status": "published",
    "carrier": {
      "id": "transporte-rex"
    },
    "facility": {
      "id": "fac_01JTQZ8KPME5X3N7WVYHF2RD4K",
      "code": "default",
      "name": "Centro de distribución Norte"
    },
    "vehicle": {
      "id": 56,
      "name": "Furgón 01",
      "color": "#bf9340",
      "vehicle_type": {
        "id": "vht_01JTQZ8KPME5X3N7WVYHF2RD4K",
        "name": "Van"
      }
    },
    "driver": {
      "id": 100,
      "firstname": "Carlos",
      "lastname": "López",
      "phone": "+5491156352708",
      "email": "carlos.lopez@empresa.com",
      "is_driver_on_duty": true
    },
    "encoded_polyline": "a~l~Fjk~uOnzh@vlbBtc~@tsE`vnAp...",
    "tasks": [
      {
        "sequence_number": 1,
        "task": {
          "id": "01GQBRNWN8ZS4X8K9WN5DFXH3Y",
          "internal_id": 1,
          "grouping_hash": "4343dsknnd9sdskd29d",
          "client_code": "CLI-001",
          "carrier": {
            "id": 5,
            "subdomain": "mi-empresa",
            "name": "Mi Empresa S.A."
          },
          "step": {
            "name": "delivery",
            "display_name": "Entrega",
            "complete_actions": [
              {}
            ],
            "fail_actions": [
              {}
            ],
            "cancel_actions": [
              {}
            ]
          },
          "is_pickup": false,
          "status": {
            "id": 1,
            "code": "pending",
            "name": "Pendiente",
            "color": "#FF5733",
            "metadata": {},
            "changed_at": "2024-05-21T12:00:00+00:00"
          },
          "address": {
            "id": "01J9X2K3M4N5P6Q7R8S9T0V1W2",
            "name": "Juan Pérez",
            "street": "Calle del Bajo",
            "street_number": "123",
            "floor": "2",
            "apartment": "B",
            "reference": "Portón negro, timbre 2",
            "zipcode": "8400",
            "phone": "+5492944412345",
            "email": "jperez@ejemplo.com",
            "city": {
              "id": 1875,
              "name": "Bariloche"
            },
            "state": {
              "id": 25,
              "name": "Rio Negro"
            },
            "country": {
              "id": 1,
              "name": "Argentina",
              "iso": "AR"
            },
            "geo_latitude": -41.133472,
            "geo_longitude": -71.310936
          },
          "recipient_name": "Juan Pérez",
          "notes": "Llamar antes de llegar",
          "is_self_assignable": false,
          "assigned_to_user": {
            "id": 10,
            "firstname": "Carlos",
            "lastname": "López"
          },
          "should_complete_after": "2024-05-21T09:00:00.000Z",
          "should_complete_before": "2024-05-21T13:00:00.000Z",
          "depends_on_task_ids": [
            "01GQBRNWN8ZS4X8K9WN5DFXH3Y",
            "01HXYZ123456789ABCDEFGHIJK"
          ],
          "cost": 0,
          "service_time_seconds": 300,
          "requirements_start": [
            {
              "type": "signature",
              "label": "Firma del destinatario",
              "required": true,
              "value": "text"
            }
          ],
          "requirements_complete": [
            {
              "type": "signature",
              "label": "Firma del destinatario",
              "required": true,
              "value": "text"
            }
          ],
          "requirements_fail": [
            {
              "type": "signature",
              "label": "Firma del destinatario",
              "required": true,
              "value": "text"
            }
          ],
          "time_windows": {
            "monday": [
              "08:00-14:00",
              "15:00-20:00"
            ],
            "tuesday": [
              "08:00-14:00",
              "15:00-20:00"
            ],
            "wednesday": [
              "08:00-14:00",
              "15:00-20:00"
            ],
            "thursday": [
              "08:00-14:00",
              "15:00-20:00"
            ],
            "friday": [
              "08:00-14:00",
              "15:00-20:00"
            ],
            "saturday": [
              "08:00-13:00"
            ],
            "sunday": []
          },
          "packages": [
            {
              "id": 10323223,
              "label_code": "LBL123",
              "external_reference": "PKG-001",
              "weight": {
                "value": 5000,
                "original_value": 5,
                "unit": "kg"
              },
              "grams": 5000,
              "length": {
                "value": 50,
                "original_value": 50,
                "unit": "cm"
              },
              "width": {
                "value": 30,
                "original_value": 30,
                "unit": "cm"
              },
              "height": {
                "value": 20,
                "original_value": 20,
                "unit": "cm"
              },
              "temperature_min": {
                "value": 2,
                "original_value": 2,
                "unit": "celsius"
              },
              "temperature_max": {
                "value": 8,
                "original_value": 8,
                "unit": "celsius"
              },
              "is_flammable": false,
              "is_corrosive": false,
              "is_fragile": true,
              "classification": "FOOD",
              "un_code": "1234",
              "declared_value_amount": 150,
              "declared_value_currency": "ARS"
            }
          ],
          "shipment": {
            "id": 100293023,
            "ulid": "01GQBRNWN8ZS4X8K9WN5DFXH3Y",
            "reference": "ORDER-123456",
            "client_code": "SHP-CLI-001",
            "external_reference": "EXT-ORDER-789",
            "declared_value": 100,
            "control_number": "CN-001"
          },
          "workflow": {
            "id": 28491,
            "external_reference": "WF-001",
            "step_in_workflow": "Entrega",
            "blueprint": {
              "type": "delivery"
            }
          },
          "merchant": {
            "id": 42,
            "name": "Tienda Ejemplo",
            "code": "TIENDA-01"
          },
          "merchant_id": 1,
          "groupable_by_merchant": true,
          "created_at": "2024-05-21T12:00:00.000Z",
          "updated_at": "2024-05-21T12:00:00.000Z"
        }
      }
    ],
    "created_at": "2024-05-21T03:00:05.000Z",
    "published_at": "2024-05-21T16:57:38.000Z",
    "started_at": "2024-05-21T16:58:09.000Z",
    "finished_at": "2024-05-22T03:00:04.000Z"
  },
  "tasks_in_final_status": [
    {
      "task_id": 100293023,
      "message": "La tarea ya está completada"
    }
  ]
}

Quitar tareas de la ruta

post

Elimina una o más tareas de una ruta. Las tareas se identifican por su ID.

Autorizaciones
AuthorizationstringRequerido

Token Bearer generado en la sección de integraciones de tu organización en Zipnova Rutas.

Parámetros de ruta
routeinteger · int64Requerido

ID de la ruta

Example: 10001545
Cuerpo
tasksstring[] · mín: 1Requerido

Lista de IDs (numérico o ULID) de las tareas a quitar

Example: 01GQBRNWN8ZS4X8K9WN5DFXH3Y
Respuestas
200

Tareas quitadas de la ruta

application/json
successbooleanOpcionalExample: true
post/routes/{route}/tasks/remove
POST /api/v1/routes/{route}/tasks/remove HTTP/1.1
Host: mi-organizacion.routes.zipnova.app
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 40

{
  "tasks": [
    "01GQBRNWN8ZS4X8K9WN5DFXH3Y"
  ]
}
{
  "success": true,
  "route": {
    "id": 10001545,
    "external_id": "RUTA-2024-001",
    "shift_date": "2024-05-21",
    "shift_sequence": 1,
    "shift_starts_at": "2024-05-21T11:00:00+00:00",
    "estimated_finished_at": "2024-05-21T18:30:00+00:00",
    "status": "published",
    "carrier": {
      "id": "transporte-rex"
    },
    "facility": {
      "id": "fac_01JTQZ8KPME5X3N7WVYHF2RD4K",
      "code": "default",
      "name": "Centro de distribución Norte"
    },
    "vehicle": {
      "id": 56,
      "name": "Furgón 01",
      "color": "#bf9340",
      "vehicle_type": {
        "id": "vht_01JTQZ8KPME5X3N7WVYHF2RD4K",
        "name": "Van"
      }
    },
    "driver": {
      "id": 100,
      "firstname": "Carlos",
      "lastname": "López",
      "phone": "+5491156352708",
      "email": "carlos.lopez@empresa.com",
      "is_driver_on_duty": true
    },
    "encoded_polyline": "a~l~Fjk~uOnzh@vlbBtc~@tsE`vnAp...",
    "tasks": [
      {
        "sequence_number": 1,
        "task": {
          "id": "01GQBRNWN8ZS4X8K9WN5DFXH3Y",
          "internal_id": 1,
          "grouping_hash": "4343dsknnd9sdskd29d",
          "client_code": "CLI-001",
          "carrier": {
            "id": 5,
            "subdomain": "mi-empresa",
            "name": "Mi Empresa S.A."
          },
          "step": {
            "name": "delivery",
            "display_name": "Entrega",
            "complete_actions": [
              {}
            ],
            "fail_actions": [
              {}
            ],
            "cancel_actions": [
              {}
            ]
          },
          "is_pickup": false,
          "status": {
            "id": 1,
            "code": "pending",
            "name": "Pendiente",
            "color": "#FF5733",
            "metadata": {},
            "changed_at": "2024-05-21T12:00:00+00:00"
          },
          "address": {
            "id": "01J9X2K3M4N5P6Q7R8S9T0V1W2",
            "name": "Juan Pérez",
            "street": "Calle del Bajo",
            "street_number": "123",
            "floor": "2",
            "apartment": "B",
            "reference": "Portón negro, timbre 2",
            "zipcode": "8400",
            "phone": "+5492944412345",
            "email": "jperez@ejemplo.com",
            "city": {
              "id": 1875,
              "name": "Bariloche"
            },
            "state": {
              "id": 25,
              "name": "Rio Negro"
            },
            "country": {
              "id": 1,
              "name": "Argentina",
              "iso": "AR"
            },
            "geo_latitude": -41.133472,
            "geo_longitude": -71.310936
          },
          "recipient_name": "Juan Pérez",
          "notes": "Llamar antes de llegar",
          "is_self_assignable": false,
          "assigned_to_user": {
            "id": 10,
            "firstname": "Carlos",
            "lastname": "López"
          },
          "should_complete_after": "2024-05-21T09:00:00.000Z",
          "should_complete_before": "2024-05-21T13:00:00.000Z",
          "depends_on_task_ids": [
            "01GQBRNWN8ZS4X8K9WN5DFXH3Y",
            "01HXYZ123456789ABCDEFGHIJK"
          ],
          "cost": 0,
          "service_time_seconds": 300,
          "requirements_start": [
            {
              "type": "signature",
              "label": "Firma del destinatario",
              "required": true,
              "value": "text"
            }
          ],
          "requirements_complete": [
            {
              "type": "signature",
              "label": "Firma del destinatario",
              "required": true,
              "value": "text"
            }
          ],
          "requirements_fail": [
            {
              "type": "signature",
              "label": "Firma del destinatario",
              "required": true,
              "value": "text"
            }
          ],
          "time_windows": {
            "monday": [
              "08:00-14:00",
              "15:00-20:00"
            ],
            "tuesday": [
              "08:00-14:00",
              "15:00-20:00"
            ],
            "wednesday": [
              "08:00-14:00",
              "15:00-20:00"
            ],
            "thursday": [
              "08:00-14:00",
              "15:00-20:00"
            ],
            "friday": [
              "08:00-14:00",
              "15:00-20:00"
            ],
            "saturday": [
              "08:00-13:00"
            ],
            "sunday": []
          },
          "packages": [
            {
              "id": 10323223,
              "label_code": "LBL123",
              "external_reference": "PKG-001",
              "weight": {
                "value": 5000,
                "original_value": 5,
                "unit": "kg"
              },
              "grams": 5000,
              "length": {
                "value": 50,
                "original_value": 50,
                "unit": "cm"
              },
              "width": {
                "value": 30,
                "original_value": 30,
                "unit": "cm"
              },
              "height": {
                "value": 20,
                "original_value": 20,
                "unit": "cm"
              },
              "temperature_min": {
                "value": 2,
                "original_value": 2,
                "unit": "celsius"
              },
              "temperature_max": {
                "value": 8,
                "original_value": 8,
                "unit": "celsius"
              },
              "is_flammable": false,
              "is_corrosive": false,
              "is_fragile": true,
              "classification": "FOOD",
              "un_code": "1234",
              "declared_value_amount": 150,
              "declared_value_currency": "ARS"
            }
          ],
          "shipment": {
            "id": 100293023,
            "ulid": "01GQBRNWN8ZS4X8K9WN5DFXH3Y",
            "reference": "ORDER-123456",
            "client_code": "SHP-CLI-001",
            "external_reference": "EXT-ORDER-789",
            "declared_value": 100,
            "control_number": "CN-001"
          },
          "workflow": {
            "id": 28491,
            "external_reference": "WF-001",
            "step_in_workflow": "Entrega",
            "blueprint": {
              "type": "delivery"
            }
          },
          "merchant": {
            "id": 42,
            "name": "Tienda Ejemplo",
            "code": "TIENDA-01"
          },
          "merchant_id": 1,
          "groupable_by_merchant": true,
          "created_at": "2024-05-21T12:00:00.000Z",
          "updated_at": "2024-05-21T12:00:00.000Z"
        }
      }
    ],
    "created_at": "2024-05-21T03:00:05.000Z",
    "published_at": "2024-05-21T16:57:38.000Z",
    "started_at": "2024-05-21T16:58:09.000Z",
    "finished_at": "2024-05-22T03:00:04.000Z"
  },
  "tasks_in_final_status": [
    {
      "task_id": 100293023,
      "message": "La tarea ya está completada"
    }
  ]
}

Publicar ruta

post

Publica una ruta para que quede disponible al conductor. La ruta debe tener un conductor asignado y no estar publicada previamente.

Autorizaciones
AuthorizationstringRequerido

Token Bearer generado en la sección de integraciones de tu organización en Zipnova Rutas.

Parámetros de ruta
routeinteger · int64Requerido

ID de la ruta

Example: 10001545
Respuestas
200

Ruta publicada

application/json
successbooleanOpcionalExample: true
post/routes/{route}/publish
POST /api/v1/routes/{route}/publish HTTP/1.1
Host: mi-organizacion.routes.zipnova.app
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "success": true,
  "route": {
    "id": 10001545,
    "external_id": "RUTA-2024-001",
    "shift_date": "2024-05-21",
    "shift_sequence": 1,
    "shift_starts_at": "2024-05-21T11:00:00+00:00",
    "estimated_finished_at": "2024-05-21T18:30:00+00:00",
    "status": "published",
    "carrier": {
      "id": "transporte-rex"
    },
    "facility": {
      "id": "fac_01JTQZ8KPME5X3N7WVYHF2RD4K",
      "code": "default",
      "name": "Centro de distribución Norte"
    },
    "vehicle": {
      "id": 56,
      "name": "Furgón 01",
      "color": "#bf9340",
      "vehicle_type": {
        "id": "vht_01JTQZ8KPME5X3N7WVYHF2RD4K",
        "name": "Van"
      }
    },
    "driver": {
      "id": 100,
      "firstname": "Carlos",
      "lastname": "López",
      "phone": "+5491156352708",
      "email": "carlos.lopez@empresa.com",
      "is_driver_on_duty": true
    },
    "encoded_polyline": "a~l~Fjk~uOnzh@vlbBtc~@tsE`vnAp...",
    "tasks": [
      {
        "sequence_number": 1,
        "task": {
          "id": "01GQBRNWN8ZS4X8K9WN5DFXH3Y",
          "internal_id": 1,
          "grouping_hash": "4343dsknnd9sdskd29d",
          "client_code": "CLI-001",
          "carrier": {
            "id": 5,
            "subdomain": "mi-empresa",
            "name": "Mi Empresa S.A."
          },
          "step": {
            "name": "delivery",
            "display_name": "Entrega",
            "complete_actions": [
              {}
            ],
            "fail_actions": [
              {}
            ],
            "cancel_actions": [
              {}
            ]
          },
          "is_pickup": false,
          "status": {
            "id": 1,
            "code": "pending",
            "name": "Pendiente",
            "color": "#FF5733",
            "metadata": {},
            "changed_at": "2024-05-21T12:00:00+00:00"
          },
          "address": {
            "id": "01J9X2K3M4N5P6Q7R8S9T0V1W2",
            "name": "Juan Pérez",
            "street": "Calle del Bajo",
            "street_number": "123",
            "floor": "2",
            "apartment": "B",
            "reference": "Portón negro, timbre 2",
            "zipcode": "8400",
            "phone": "+5492944412345",
            "email": "jperez@ejemplo.com",
            "city": {
              "id": 1875,
              "name": "Bariloche"
            },
            "state": {
              "id": 25,
              "name": "Rio Negro"
            },
            "country": {
              "id": 1,
              "name": "Argentina",
              "iso": "AR"
            },
            "geo_latitude": -41.133472,
            "geo_longitude": -71.310936
          },
          "recipient_name": "Juan Pérez",
          "notes": "Llamar antes de llegar",
          "is_self_assignable": false,
          "assigned_to_user": {
            "id": 10,
            "firstname": "Carlos",
            "lastname": "López"
          },
          "should_complete_after": "2024-05-21T09:00:00.000Z",
          "should_complete_before": "2024-05-21T13:00:00.000Z",
          "depends_on_task_ids": [
            "01GQBRNWN8ZS4X8K9WN5DFXH3Y",
            "01HXYZ123456789ABCDEFGHIJK"
          ],
          "cost": 0,
          "service_time_seconds": 300,
          "requirements_start": [
            {
              "type": "signature",
              "label": "Firma del destinatario",
              "required": true,
              "value": "text"
            }
          ],
          "requirements_complete": [
            {
              "type": "signature",
              "label": "Firma del destinatario",
              "required": true,
              "value": "text"
            }
          ],
          "requirements_fail": [
            {
              "type": "signature",
              "label": "Firma del destinatario",
              "required": true,
              "value": "text"
            }
          ],
          "time_windows": {
            "monday": [
              "08:00-14:00",
              "15:00-20:00"
            ],
            "tuesday": [
              "08:00-14:00",
              "15:00-20:00"
            ],
            "wednesday": [
              "08:00-14:00",
              "15:00-20:00"
            ],
            "thursday": [
              "08:00-14:00",
              "15:00-20:00"
            ],
            "friday": [
              "08:00-14:00",
              "15:00-20:00"
            ],
            "saturday": [
              "08:00-13:00"
            ],
            "sunday": []
          },
          "packages": [
            {
              "id": 10323223,
              "label_code": "LBL123",
              "external_reference": "PKG-001",
              "weight": {
                "value": 5000,
                "original_value": 5,
                "unit": "kg"
              },
              "grams": 5000,
              "length": {
                "value": 50,
                "original_value": 50,
                "unit": "cm"
              },
              "width": {
                "value": 30,
                "original_value": 30,
                "unit": "cm"
              },
              "height": {
                "value": 20,
                "original_value": 20,
                "unit": "cm"
              },
              "temperature_min": {
                "value": 2,
                "original_value": 2,
                "unit": "celsius"
              },
              "temperature_max": {
                "value": 8,
                "original_value": 8,
                "unit": "celsius"
              },
              "is_flammable": false,
              "is_corrosive": false,
              "is_fragile": true,
              "classification": "FOOD",
              "un_code": "1234",
              "declared_value_amount": 150,
              "declared_value_currency": "ARS"
            }
          ],
          "shipment": {
            "id": 100293023,
            "ulid": "01GQBRNWN8ZS4X8K9WN5DFXH3Y",
            "reference": "ORDER-123456",
            "client_code": "SHP-CLI-001",
            "external_reference": "EXT-ORDER-789",
            "declared_value": 100,
            "control_number": "CN-001"
          },
          "workflow": {
            "id": 28491,
            "external_reference": "WF-001",
            "step_in_workflow": "Entrega",
            "blueprint": {
              "type": "delivery"
            }
          },
          "merchant": {
            "id": 42,
            "name": "Tienda Ejemplo",
            "code": "TIENDA-01"
          },
          "merchant_id": 1,
          "groupable_by_merchant": true,
          "created_at": "2024-05-21T12:00:00.000Z",
          "updated_at": "2024-05-21T12:00:00.000Z"
        }
      }
    ],
    "created_at": "2024-05-21T03:00:05.000Z",
    "published_at": "2024-05-21T16:57:38.000Z",
    "started_at": "2024-05-21T16:58:09.000Z",
    "finished_at": "2024-05-22T03:00:04.000Z"
  }
}

Esquemas

Última actualización