# Webhook

There are some actions that you need to trigger on some events

Production BaseUrl `app.converted.in/magento/webhooks`

Testing BaseUrl `app-stg.converted.in/magento/webhooks`

### Actions to trigger

When a new collection/category is added [webhook](https://developer.converted.in/magento-or-webhooks/categories)

When a new user is registered [webhook](https://developer.converted.in/magento-or-webhooks/customers)

When a new product is added/updated/stock changed [webhook](https://developer.converted.in/magento-or-webhooks/products)

When order is added or updated [webhook](https://developer.converted.in/magento-or-webhooks/orders)

#### Request template

## Request authorization should follow the following template

<mark style="color:green;">`POST`</mark> `BASEURL/endpoint`

#### Headers

| Name          | Type   | Description                                               |
| ------------- | ------ | --------------------------------------------------------- |
| Authorization | string | Bearer token, the same magento token that you provided us |

#### Request Body

| Name        | Type   | Description |
| ----------- | ------ | ----------- |
| JSON object | string | json entity |

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

```
{
    "status": "success"
}
```

{% endtab %}

{% tab title="401 " %}

```
{
    "status": "Authorization error"
}
```

{% endtab %}
{% endtabs %}


---

# 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://developer.converted.in/magento-or-webhooks/getting-started-1.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.
