# Update

Update Order

## Endpoint => /order

<mark style="color:orange;">`PUT`</mark> `/order`

#### Headers

| Name                                             | Type   | Description       |
| ------------------------------------------------ | ------ | ----------------- |
| Authorization <mark style="color:red;">\*</mark> | String | Your Bearer Token |
| secret-key<mark style="color:red;">\*</mark>     | String | Your Secret Key   |

#### Request Body

| Name                                      | Type   | Description                              |
| ----------------------------------------- | ------ | ---------------------------------------- |
| recipientAddress                          | String | Recipient Address (Delivery destination) |
| recipientState                            | String | Must be any of the 36 states or FCT      |
| recipientName                             | String | Recipient Name                           |
| recipientPhone                            | String | Recipient Phone or Mobile number         |
| orderNo<mark style="color:red;">\*</mark> | String | Order number                             |

{% tabs %}
{% tab title="201: Created Success" %}

```json
{
  "status": "Success",
  "description": "Update Batch Request Processed",
  "Response": {
    "37P727012321": "Order Successfully Updated",
    "JHAZ27012319": "Order Successfully Updated"
  }
}
```

{% endtab %}

{% tab title="401 Unauthorized" %}

```
{
    "status": "Error",
    "description": "Organization Secret Key is Required"
}
```

{% endtab %}
{% endtabs %}

```php
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://apisandbox.fezdelivery.co/v1/order/multiple',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'PUT',
  CURLOPT_POSTFIELDS =>'[{
    "recipientAddress":"Idumota11",
    "recipientState":"Lagos",
    "recipientName":"Femi11",
    "recipientPhone":"08059151937",
    "orderNo":"37P727012321"
},{
    "recipientAddress":"Idumota33",
    "recipientState":"Lagos",
    "recipientName":"Femi2334",
    "recipientPhone":"08059051937",
    "orderNo":"JHAZ27012319"
}]
',
  CURLOPT_HTTPHEADER => array(
    'secret-key: {{Your Secret Key}}'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

```

{% hint style="info" %}
**Good to know:** Upon successfully creating the order, the API returns an array object that consist of the update feedback for each request.
{% endhint %}
