> For the complete documentation index, see [llms.txt](https://docs.shippify.co/developers/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.shippify.co/developers/en/shippify-api/deliveries/change-delivery-statuses.md).

# Change delivery statuses

You can use this endpoint to change the status of a delivery. Here you can add comments or include reasons for issues previously created in the system. To learn more about Shippify's statuses [click here.](/developers/en/integration-guide/basic-processes/status-update/statuses.md)

## Update the status of a delivery

> Update the status of a delivery by its ID or reference.

```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/deliveries/{id}/status":{"patch":{"tags":["Deliveries"],"summary":"Update the status of a delivery","description":"Update the status of a delivery by its ID or reference.","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 or reference ID of the delivery to change status.","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"Here goes the description","content":{"application/json":{"schema":{"$ref":"#/components/schemas/changeStatus/request"}}}}}}}}
```

## Use cases

<details>

<summary>Update status by referenceId</summary>

You can use the delivery's reference ID in the URL of the request to change its status.

</details>

<details>

<summary>Cancel delivery</summary>

```json
{
    "status": "canceled",
    "comment": "TEST",
    "author": {
        "email": "example@shippify.co",
        "id": 999,
        "name": "Test operator",
        "type": "operator"
    }
}
```

</details>

<details>

<summary>Change the status to "hold by courier" with a reason for the problem</summary>

```json
{
    "status": "hold_by_courier",
    "comment": "South of the city",
    "reasonByCompany": [
        {
            "companyId": "9065",
            "reasonId": 67,
            "reason": "Risky area"
        }
    ],
    "author": {
        "type": "operator",
        "id": 1,
        "name": "Juan Perez",
        "email": "example@shippify.co"
    }
}
```

</details>

<details>

<summary>Complete a delivery</summary>

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

</details>
