# Webhook setting guide

* **Your endoint URL:** `http://webhook.endpoint.url`
* **Method:** POST
* **CURL Example:**&#x20;

```
curl -X POST "http://webhook.endpoint.url" \
     -H "X-QuoteSnap: $signature" \
     -d '{
           "product_list": YOUR_PRODUCT_LIST_JSON,
           "customer_info": YOUR_CUSTOMER_INFO_JSON
         }'
```

* **Headers:**
  * Contains `X-QuoteSnap` which is an HMAC hash encrypted by SHA256 and serves as the signature from the QuoteSnap Server sent to the Client Server.
  * The signature is encrypted using SHA256, with the key being the `apiKey` generated on the settings screen and the data being the shop name (e.g., `mystore.myshopify.com`).
  * The Client Server should verify this HMAC to ensure that the request is sent from the QuoteSnap Server.
  * Header example:&#x20;

```
"X-QuoteSnap: $signature"
```

* **Request:**
  * Data type: Object
  * Request data example:

```
{
    "product_list": [
        {
            "id": 7975041237150,
            "title": "Appointment",
            "vendor": "kietdt-store",
            "handle": "appointment",
            "quantity": 1,
            "variant": {
                "id": 44057763938462,
                "title": null,
                "price": 10,
                "basePrice": 10,
                "sku": null,
                "priceText": "10₫"
            },
            "message": null,
            "total": 10,
            "totalPrice": "10₫",
            "trackingSource": null,
            "properties": [],
            "pageChoosen": "product",
            "priceCountDiscount": 1000,
            "currencyShop": "{{amount_no_decimals_with_comma_separator}}₫",
            "variants": [
                {
                    "id": 44057763938462,
                    "title": null,
                    "price": 10,
                    "basePrice": 10,
                    "sku": null,
                    "priceText": "10₫"
                }
            ],
            "product_info": [
                {
                    "id": 139218,
                    "max": 20,
                    "min": 0,
                    "req": 1,
                    "send": 1,
                    "type": "text",
                    "input": "text",
                    "label": "Detail inquiry",
                    "width": 100,
                    "placeholder": "Enter your inquiry",
                    "value": "aaa"
                }
            ],
            "offer_price": null
        }
    ],
    "customer_info": [
        {
            "label": "Name",
            "value": "My name"
        },
        {
            "label": "Email",
            "value": "example@gmail.com"
        },
        {
            "label": "Message",
            "value": "Quote Snapp"
        },
        {
            "label": "Select",
            "value": "Option 1"
        }
    ]
}
```


---

# 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://docs.quotesnap.net/advanced-features/webhook-setting-guide.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.
