# Change the status of a route

## Update the status of a route

> Update the status of a route, including all its deliveries.

```json
{"openapi":"3.0.0","info":{"title":"Shippify Api","version":"1.0.0"},"servers":[{"url":"https://api.shippify.co","description":"Development server"}],"security":[{"Basic_Auth":[]}],"components":{"securitySchemes":{"Basic_Auth":{"type":"http","scheme":"basic"}},"schemas":{"changeStatus":{"successfulResponse":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}},"request":{"type":"object","required":["status","comment","author"],"properties":{"status":{"description":"New status of the route","type":"string","enum":["pending_to_review","processing","broadcasting","assigned","confirmed_to_pickup","going_to_pickup","at_pickup","on_delivery","going_to_dropoff","at_dropoff","dropped_off","completed","canceled","going_to_return","at_return_point","returned","not_picked_up","not_picked_up_payable","hold_by_courier"]},"comment":{"type":"string","description":"Comment of the change"},"reasonByCompany":{"type":"array","description":"Predefined reasons for the change of status","items":{"type":"object","required":["reasonId","reason"],"properties":{"reasonId":{"type":"integer","description":"Identifier of the reason for changing the status"},"reason":{"type":"string","description":"Name of the reason for changing the status"}}}},"author":{"type":"object","required":["id","type","name","email"],"description":"Information of the user making the status change","properties":{"type":{"type":"string","description":"User type","enum":["operator","admin"]},"id":{"type":"integer","description":"User identifier"},"name":{"type":"string","description":"User name"},"email":{"type":"string","description":"User email"}}}}}},"Unauthenticated":{"properties":{"code":{"type":"string"},"message":{"type":"string"}},"type":"object"}}},"paths":{"/v1/routes/{id}/status":{"patch":{"tags":["Routes"],"summary":"Update the status of a route","description":"Update the status of a route, including all its deliveries.","responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/changeStatus/successfulResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthenticated"}}}}},"parameters":[{"name":"id","in":"path","description":"Identifier of the route to change its status.","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/changeStatus/request"}}}}}}}}
```

## Use cases

<details>

<summary>Cancel a route</summary>

```json
{
    "status": "canceled",
    "comment": "",
    "author": {
        "type": "operator",
        "id": 1,
        "name": "Juan Perez",
        "email": "example@shippify.co"
    }
}
```

</details>

<details>

<summary>Complete a route</summary>

```json
{
    "status": "completed",
    "comment": "",
    "author": {
        "type": "operator",
        "id": 1,
        "name": "Juan Perez",
        "email": "example@shippify.co"
    }
}
```

</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/en/shippify-api/routes/change-the-status-of-a-route.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.
