# Webhooks

### Base URL

> <https://app.converted.in/api/webhooks/api/>

### Request Method

> **POST**

### Headers

<table><thead><tr><th width="303.90209790209786">name</th><th>value</th></tr></thead><tbody><tr><td>Content-Type</td><td>application/json</td></tr><tr><td>token</td><td>MTY0ODQQQQQQ=</td></tr><tr><td>X-Shop-Domain</td><td>store-name.com</td></tr></tbody></table>

### Endpoints

| path                | description                      |
| ------------------- | -------------------------------- |
| /orders/create      | when order created               |
| /orders/update      | when order updated               |
| /orders/delete      | when order deleted               |
| /customers/create   | when customer created            |
| /customers/update   | when customer updated            |
| /customers/delete   | when customer deleted            |
| /products/create    | when product created             |
| /products/update    | when product updated             |
| /products/delete    | when product deleted             |
| /collections/create | when collection created          |
| /collections/update | when collection updated          |
| /collections/delete | when collection deleted          |
| /app/uninstalled    | when convertedin app uninstalled |

#### Postman Collection

you can download  [postman collection](https://convertedin-assets.s3.eu-west-1.amazonaws.com/convertedIn_webHooks_Api.postman_collection.json)

### Request Body

#### Order

```json
{
            "id": "3255",
            "ordered_at": "2021-06-14 11:54:36",
            "total_price": "50286",
            "subtotal_price": "50286.0000",
            "total_tax": 0,
            "total_discounts": 0,
            "taxes_included": "1",
            "currency": "EGP",
            "country_code": "EG",
            "phone": "01111XXXX",
            "contact_email": "info@converted.in",
            "line_items": [
                {
                    "order_product_id": "1888",
                    "order_id": "85",
                    "product_id": "166",
                    "name": "bunk bed for staff",
                    "model": "سرير بطابقين",
                    "quantity": "3",
                    "price": "16762.0000",
                    "total": "50286.0000",
                    "tax": "0.0000",
                    "reward": "0",
                    "extra_details": null,
                    "code_generator": null,
                    "added_by_user_type": "customer",
                    "image": "https://converted.in/data/DemoImages/Products/68.jpg",
                    "product_status": "1",
                    "product_name": "bunk bed for staff",
                    "product_subtract_status": "0",
                    "original_id": "166",
                    "weight": "0.00000000",
                    "weight_class_id": "1",
                    "width": "0.00000000",
                    "height": "0.00000000",
                    "length": "0.00000000",
                    "sku": "",
                    "barcode": "",
                    "storable": "0"
                }
            ]
        }
```

#### Product

```json
{
    "id": 632910392,
    "title": "IPod Nano - 8GB",
    "full_permalink": "https://converted.in?route=product/product&product_id=143543",
    "app_links": {
         "ios": "myapp://ios/product/123",
         "android": "myapp://android/product/123"
    },
    "content": "<p>It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.</p>",
    "vendor": "Apple",
    "handle": "ipod-nano",
    "published_at": "2007-12-31T19:00:00-05:00",
    "price": "80",
    "compare_at_price": "80",
    "status": "active",
    "meta": "Apple",
    "tags": "Emotive, Flash Memory, MP3, Music",
    "images": [
        {
            "width": 123,
            "height": 456,
            "path": "https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1633120966"
        },
        {
            "width": 123,
            "height": 456,
            "path": "https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1633120966"
        }
    ],
    "image": "https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1633120966"
}
```

#### Customer

```json
        {
            "id": "1255",
            "email": "info@converted.in",
            "phone": "+201xxxxxxxx",
            "first_name": "Ali",
            "last_name": "Raslan",
            "orders_count": "1",
            "total_spent": 50,
            "currency": "USD",
            "registered_at": "2021-06-01 10:34:04",
            "gender": "male"
        }
```

#### Collection

```json
{
    "id": "1",
    "taxonomy": "Mobiles and Tablets",
    "title": "Convertedin collections",
    "updated_at": "2017-10-28 17:46:07",
    "published_at": "2017-10-22 13:46:54",
    "available": true,
    "image": {
        "src": "https://converted.in/ecdata/stores/image/data/DemoImages/Categories/image_1.png"
    }
}
```
