# Order Webhook Request

{% hint style="info" %}
Note that the registered url is a POST route. Json body will be sent to this route and will contain <mark style="color:blue;">**orderNumber**</mark> and <mark style="color:blue;">s</mark><mark style="color:blue;">**tatus**</mark> as request body.
{% endhint %}

## Request

<mark style="color:green;">`POST`</mark> `/{{userDefinedBaseUrl}}`

#### Request Body

| Name                                          | Type   | Description                  |
| --------------------------------------------- | ------ | ---------------------------- |
| orderNumber<mark style="color:red;">\*</mark> | String | Your order unique ID on fez  |
| status<mark style="color:red;">\*</mark>      | String | The new status of your order |

{% tabs %}
{% tab title="200 Success" %}

```json
{
    userDefinedResponse
}
```

{% endtab %}

{% tab title="401 Unauthorized" %}

```json
{
    userDefinedResponse
}
```

{% endtab %}

{% tab title="422 Validation Error" %}

```json
{
    userDefinedResponse
}
```

{% endtab %}
{% endtabs %}

```php
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => '{{userDefinedUrl}}',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{
    "orderNumber":"UKOOIE001F35",
    "status": "Delivered"
}',
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

```


---

# 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://fez-delivery-co.gitbook.io/fezcorporate-api-docs/api-endpoints/webhook/order-webhook-request.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.
