> For the complete documentation index, see [llms.txt](https://doc.blowhorn.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.blowhorn.com/api-docs/webhook/webhook-2.md).

# Inventory Status

API Details for 'Inventory Status' webhook.

## Configure Webhook

<mark style="color:green;">`POST`</mark> `/webhooks/subscribe`

Use this api to subscribe to the real time order status updates.

#### Headers

| Name                                       | Type   | Description                              |
| ------------------------------------------ | ------ | ---------------------------------------- |
| API\_KEY<mark style="color:red;">\*</mark> | string | API key obtained by the customer/partner |

{% tabs %}
{% tab title="200 Webhook created" %}

```json
{
    "status": "PASS",
    "message": "Webhook configured successfully"
}
```

{% endtab %}

{% tab title="400 Bad request/Validation error" %}

```json
{
   "status": "FAIL",
   "message": "Webhook update failed"
}
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Example Value | Schema" %}

```json
{
  "webhookId": 13,
  "callbackUrl": "https://myserver.com/send/callback/here",
  "headers": {
      "API_KEY": "bSd74acDFhjzy90vqml"
  },
  "verify_payload": true
}
```

{% endtab %}
{% endtabs %}

| Event             | Topics                                                                                                                                                                                                                                                                                                                                                                                     |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| updateOrderStatus | <p>Shipment Order status updates</p><p>{ </p><p>"WaybillNo":"c018c43h32", "OrderStatus":"Pending", "CourierComment":null, "StatusDateTime":"2020-07-08T08:12:06.759961+00:00", "ToMobileNumber":"+919898989898", "ToEmail":"<abc@xyz.com>", "ToName":"My Name", "Client":"ABC", "podDocs":\[ "drive.blowhorn.com/SH-1N1LJX7/2180710.JPG", "drive.blowhorn.com/POD\_SH-1N1LJX7.PDF" ] }</p> |

## Update Webhook configuration

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

Use this api to update an existing webhook like callback url, active etc.

#### Headers

| Name     | Type   | Description                              |
| -------- | ------ | ---------------------------------------- |
| API\_KEY | String | API key obtained by the customer/partner |

{% tabs %}
{% tab title="200 Webhook config updated" %}

```json
{
   "status": "PASS",
   "message": "Updated the webhook successfully"
}
```

{% endtab %}

{% tab title="400 Bad Request/Validation Error" %}

```json
{
   "status": string,
   "message": string
}
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Example | Schema" %}

```json
{
    "webhookId": 12,
    "callbackUrl": "https://myserver.com/send/callback/here",
    "headers": {
        "API_KEY": "bSd74acDFhjzy90vqml"
    },
    "is_active": false
}
```

{% endtab %}
{% endtabs %}

## Postman Collection

We have a Postman collection to make the integration quicker and easier. You can test all our APIs by importing the full API collection through the **'Run in Postman'** button and running them in the Postman app.

[![Run in Postman](https://run.pstmn.io/button.svg)](https://app.getpostman.com/run-collection/47346810-a86e8255-8e1a-4c58-b6f5-5a304b03c382)
