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

# Update Delivery

### 📝 Summary

This endpoint allows users to update the details of an existing delivery. Users can modify various aspects of the delivery, such as the delivery address, package details, priority, or status. The update request will reflect changes in the delivery, including adjustments to the assigned driver, vehicle, and estimated delivery time.

***

### Requests

##### Example

<Expandable>
  ```json theme={null}
  sender_name: Nuel Geek
  sender_address: 2 Umuleri street, Lagos
  sender_phone: "08087168391"
  sender_phonecode: "234"
  sender_email: sender@example.com
  "receivers[0][customer_name]": TundeNasri
  "receivers[0][customer_address]":
    - TundeNasri
    - TundeNasri
    - 12 Ahmadu Bello way, Central Business District, Abuja
  "receivers[0][customer_phone_number]": "08065302534"
  "receivers[0][customer_phone_code]": "234"
  "receivers[0][customer_email]": sinoma@gmail.com
  "receivers[0][items][0][item_uuid]": "{{item_uuid}}"
  "receivers[0][items][0][item_description]": Eva soap pack for me
  "receivers[0][items][0][item_quantity]": "1"
  "receivers[0][items][0][item_value]": "4000"
  "receivers[0][items][1][item_description]": Cannon Camera
  "receivers[0][items][1][item_quantity]": "1"
  "receivers[0][items][1][item_value]": "30000"
  delivery_fee: "3000"
  send_sms: "1"
  creation_date: 13-03-2024
  "receivers[0][customer_detail_id]": 4d012972-e3b7-46c7-9362-5409fef8ba6d
  ```
</Expandable>

##### Params

<Expandable>
  **Description:**

  | Name                                       | Location | Type   | Required | Description   |
  | ------------------------------------------ | -------- | ------ | -------- | ------------- |
  | `body`                                     | body     | object | no       | none          |
  | `sender_name`                              | body     | string | yes      | none          |
  | `sender_address`                           | body     | string | yes      | none          |
  | `sender_phone`                             | body     | string | yes      | none          |
  | `sender_phonecode`                         | body     | string | yes      | none          |
  | `sender_email`                             | body     | string | yes      | none          |
  | `receivers[0][customer_name]`              | body     | string | yes      | none          |
  | `receivers[0][customer_address]`           | body     | array  | yes      | none          |
  | `receivers[0][customer_phone_number]`      | body     | string | yes      | none          |
  | `receivers[0][customer_phone_code]`        | body     | string | yes      | none          |
  | `receivers[0][customer_email]`             | body     | string | yes      | none          |
  | `receivers[0][items][0][item_uuid]`        | body     | string | yes      | none          |
  | `receivers[0][items][0][item_description]` | body     | string | yes      | none          |
  | `receivers[0][items][0][item_quantity]`    | body     | string | yes      | none          |
  | `receivers[0][items][0][item_value]`       | body     | string | yes      | none          |
  | `receivers[0][items][1][item_description]` | body     | string | yes      | none          |
  | `receivers[0][items][1][item_quantity]`    | body     | string | yes      | none          |
  | `receivers[0][items][1][item_value]`       | body     | string | yes      | none          |
  | `delivery_fee`                             | body     | string | yes      | none          |
  | `send_sms`                                 | body     | string | yes      | True Or False |
  | `creation_date`                            | body     | string | no       | none          |
  | `receivers[0][customer_detail_id]`         | body     | string | yes      | none          |
</Expandable>

### Responses

| HTTP Status Code                 | Meaning                                                          | Description | Data schema |
| -------------------------------- | ---------------------------------------------------------------- | ----------- | ----------- |
| <Badge color="green">200</Badge> | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)          | none        | Inline      |
| <Badge color="red">422</Badge>   | [Bad Request](https://tools.ietf.org/html/rfc7231#section-6.3.1) | none        | Inline      |

<ResponseExample>
  ```json sample response theme={null}
  {
  "status": "success",
  "data": {
  "uuid": "b0febc7b-91a0-43d2-a933-fc1c27dd25c3",
  "order_number": "531886487269",
  "fleet_id": null,
  "status": "Awaiting Pickup",
  "delivery_type": "state_to_state",
  "sender_longitude": 3.3096414,
  "sender_latitude": 6.5352628,
  "customer_longitude": 7.4974495,
  "customer_latitude": 9.0339358,
  "delivery_fee": "3000",
  "created_at": "2023-12-05T01:02:02.000000Z",
  "customer_detail": {
    "uuid": "caf911a3-7b66-4599-9b3a-aa26d7730e69",
    "customer_name": "TundeNasri",
    "customer_email": null,
    "customer_phone_number": "08065302534",
    "customer_phone_code": "234",
    "customer_address": "12 Ahmadu Bello way, Central Business District, Abuja",
    "created_at": "2023-12-04T22:03:06.000000Z"
  },
  "sender_detail": {
    "uuid": "2743f3a5-b692-4c10-99f7-b3b941f0c3eb",
    "sender_name": "Nuel Geek",
    "sender_phone": "08087168391",
    "sender_email": null,
    "sender_phonecode": "234",
    "sender_address": "2 Umuleri street, Lagos",
    "created_at": "2023-12-05T01:02:02.000000Z",
    "updated_at": "2023-12-06T00:45:41.000000Z"
  },
  "items": [
    {
      "uuid": "cbf13cbb-b817-42ce-b948-12344ff7507f",
      "item_description": "Freshfish",
      "item_quantity": 1,
      "item_value": "10000.00",
      "created_at": "2023-12-06T00:45:41.000000Z"
    },
    {
      "uuid": "7cf6577f-c6e1-40fa-aa98-443ca27cdc3f",
      "item_description": "Freshfish",
      "item_quantity": 1,
      "item_value": "10000.00",
      "created_at": "2023-12-06T01:00:27.000000Z"
    },
    {
      "uuid": "a758c1cb-011a-4f96-9f5e-249bff763e07",
      "item_description": "Canno Camera",
      "item_quantity": 1,
      "item_value": "30000.00",
      "created_at": "2023-12-06T01:00:54.000000Z"
    },
    {
      "uuid": "a67c925e-c9bd-4829-ac2b-c429437f50e1",
      "item_description": "Eva soap pack",
      "item_quantity": 1,
      "item_value": "4000.00",
      "created_at": "2023-12-05T01:02:02.000000Z"
    }
  ],
  "organization_detail": {
    "uuid": "9a7519bc-a726-4bff-a9aa-e77d627e2688",
    "fleet_identity_number": null,
    "business_address": null,
    "phone_number": "8081939285",
    "phone_code": "234",
    "logo": null,
    "created_at": "2023-11-30T16:57:27.000000Z",
    "updated_at": "2023-11-30T16:57:27.000000Z"
  }
  },
  "message": "Delivery updated"
  }
  ```
</ResponseExample>
