> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kasiye.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update a shipment

> Change customer, addresses, and weight while the shipment is unpaid.

Allowed only while `status` is `pending` and `payment_status` is `awaiting_payment`. Kasiye recalculates the quote. If the new route is not covered, the shipment is left unchanged and the API returns `422`.

The request body is the same as [create](/api-reference/create-shipment).

<ParamField path="path.shipment" type="string" required>
  Shipment reference, for example `SHP-12345`.
</ParamField>

```bash theme={null}
curl -X PATCH https://api.kasiye.com/v1/shipments/SHP-12345 \
  -H "Authorization: Bearer shp_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "customer_name": "Acme Corp",
    "customer_email": "logistics@acme.com",
    "pickup_address": "Area 47, Lilongwe",
    "pickup_lat": -13.9626,
    "pickup_lng": 33.7741,
    "dropoff_address": "City Centre, Lilongwe",
    "dropoff_lat": -13.9833,
    "dropoff_lng": 33.7689,
    "weight_kg": 40
  }'
```

After payment, update returns `422`:

```json theme={null}
{
  "message": "This shipment can no longer be updated.",
  "errors": {
    "shipment": ["This shipment can no longer be updated."]
  }
}
```
