# Crear ruta

## Creación de rutas

> Endpoint que permite crear rutas a partir de entregas dadas.

```json
{"openapi":"3.0.0","info":{"title":"API de Shippify","version":"1.0.0"},"servers":[{"url":"https://api.shippify.co","description":"Servidor de desarrollo"}],"security":[{"Basic_Auth":[]}],"components":{"securitySchemes":{"Basic_Auth":{"type":"http","scheme":"basic"}},"schemas":{"createRoutes":{"successfulResponse":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"data":{"type":"object","description":"Información de los procesos adicionales creados (en caso de que la entrega pertenezca a una ruta)","properties":{"jobs":{"description":"Identificador del proceso externo creado","type":"string"}}}}},"request":{"type":"object","required":["routes","iterations"],"properties":{"routes":{"description":"Conjunto de entregas, cada elemento creará una ruta","type":"array","items":{"required":["deliveries"],"type":"object","properties":{"deliveries":{"type":"array","description":"Identificadores de las entregas a rutear. Mínimo 2 entregas.","items":{"type":"string"}}}}},"iterations":{"description":"Indica el nivel de optimización con el que se creará la ruta","type":"integer","minimum":1,"maximum":10}}}},"Unauthenticated":{"properties":{"code":{"type":"string"},"message":{"type":"string"}},"type":"object"}}},"paths":{"/v1/routes/create":{"post":{"tags":["Creación, Rutas"],"summary":"Creación de rutas","description":"Endpoint que permite crear rutas a partir de entregas dadas.","responses":{"200":{"description":"Operación exitosa","content":{"application/json":{"schema":{"$ref":"#/components/schemas/createRoutes/successfulResponse"}}}},"401":{"description":"No autorizado","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthenticated"}}}}},"requestBody":{"description":"Aquí va la descripción","content":{"application/json":{"schema":{"$ref":"#/components/schemas/createRoutes/request"}}}}}}}}
```

## Casos de uso&#x20;

<details>

<summary>Crear rutas con un orden específico de entregas</summary>

```json
{
    "routes": [
        {
            "deliveries": [
              "t-pruaas-4973",
              "t-pruaas-4972"
            ]
        }
    ],
    "iterations": 1
}
```

</details>

<details>

<summary>Crear rutas con optimización media a partir de entregas ingresadas</summary>

```json
{
    "routes": [
        {
            "deliveries": [
              "t-pruaas-4973",
              "t-pruaas-4972"
            ]
        }
    ],
    "iterations": 5
}
```

</details>

<details>

<summary>Crear rutas con optimización alta a partir de entregas ingresadas</summary>

```json
{
    "routes": [
        {
            "deliveries": [
              "t-pruaas-4973",
              "t-pruaas-4972"
            ]
        }
    ],
    "iterations": 10
}
```

</details>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.shippify.co/developers/shippify-api/rutas/crear-ruta.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
