> For the complete documentation index, see [llms.txt](https://mipos.gitbook.io/public-api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mipos.gitbook.io/public-api/markets/delivery-webhook-content.md).

# Third Party Webhooks Content

Contents of the requests on third party webhooks

## TYPE : MENU

<mark style="color:green;">`POST`</mark> `https://yourwebhook/for_type_menu`

Service for receiving the menu from the POS.&#x20;

#### Headers

| Name         | Type   | Description                                                        |
| ------------ | ------ | ------------------------------------------------------------------ |
| Content-type | string | application/json                                                   |
| auth-anton-x | string | sha256 Hash code of the body request using the webhook secret key. |

#### Request Body

| Name                | Type   | Description                               |
| ------------------- | ------ | ----------------------------------------- |
| external\_store\_id | string | ID store on third party platform          |
| language            | string | Language of Store: es\_EC, es\_CO, es\_MX |
| modifier\_groups    | array  | modifier\_groups\[]                       |
| items               | array  | items\[] Store items                      |
| categories          | array  | categories\[] Store categories            |
| menus               | array  | menus\[] Stores Menus                     |

{% tabs %}
{% tab title="201 Cake successfully retrieved." %}

```
{    "message": "ANY MESSAGE"}
```

{% endtab %}

{% tab title="409 Could not find a cake matching this query." %}

```
{    "message": "ERROR MESSAGE"}
```

{% endtab %}
{% endtabs %}

#### Menu Object

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

| param                   | type        | description                                               |
| ----------------------- | ----------- | --------------------------------------------------------- |
| name                    | string      | name of the menu                                          |
| category\_external\_ids | string\[]   | Ids of the menu categories on the POS                     |
| schedules               | Schedule\[] | Availability of all menu items on a specified day of week |
| identifier              | string      | menu id                                                   |
| {% endtab %}            |             |                                                           |

{% tab title="schedules" %}

| param         | type         | description                                                      |
| ------------- | ------------ | ---------------------------------------------------------------- |
| day\_of\_week | enum(string) | `monday, tuesday, wednesday, thursday, friday, saturday, sunday` |
| periods       | Periods\[]   | Sale time periods per day                                        |
| {% endtab %}  |              |                                                                  |

{% tab title="periods" %}

| param         | type   | description                          |
| ------------- | ------ | ------------------------------------ |
| start         | string | Menu availability start time (hh:mm) |
| end           | string | Menu availability end time (hh:mm)   |
| {% endtab %}  |        |                                      |
| {% endtabs %} |        |                                      |

#### Category Object

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

| param        | type        | description                                             |
| ------------ | ----------- | ------------------------------------------------------- |
| external\_id | string      | Id category on the POS                                  |
| name         | string      | Category name to be displayed                           |
| data\_items  | dataItem\[] | Data of the items(products) of this category in the POS |
| {% endtab %} |             |                                                         |

{% tab title="dataItem" %}

{% hint style="warning" %}
The price of the item will only be replaced at this level when the categories are in different menus.
{% endhint %}

| param              | type              | description                                                                            |
| ------------------ | ----------------- | -------------------------------------------------------------------------------------- |
| item\_external\_id | string            | Id item on the POS (this must be the same defined in the external\_id of the **Item**) |
| price              | object (optional) | { value: 5000 }                                                                        |
| {% endtab %}       |                   |                                                                                        |
| {% endtabs %}      |                   |                                                                                        |

#### Item Object

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

| param                  | type                  | description                                                          |
| ---------------------- | --------------------- | -------------------------------------------------------------------- |
| external\_id           | string                | Id item on the POS                                                   |
| name                   | string                | Item name to be displayed                                            |
| image\_url             | string (optional)     | Url item image                                                       |
| schedules              | schedules\[]          | Item availability on a specified day of week(override schedule menu) |
| price                  | price                 | Specifies the price to charge for ordering the item                  |
| data\_modifier\_groups | dataModifierGroups\[] | Data of the modifier groups of this item in the POS                  |
| {% endtab %}           |                       |                                                                      |

{% tab title="price" %}
{% hint style="danger" %}
Price should always be integer value (never decilmals), include decimals in the integer value.

Example: $10.30, it would be 1030
{% endhint %}

{% hint style="danger" %}
If your currency does not handle decimals, you must add 2 zeros to the end of the integer value.

Example: 12000 COP, it would be 1200000
{% endhint %}

| param            | type             | description                   |
| ---------------- | ---------------- | ----------------------------- |
| value            | number           | Price of the item             |
| promotion\_value | number(optional) | Promotional price of the item |
| {% endtab %}     |                  |                               |
| {% endtabs %}    |                  |                               |

#### ModifierGroup Object

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

| param         | type           | description                                         |
| ------------- | -------------- | --------------------------------------------------- |
| external\_id  | string         | Id modifier group on the POS                        |
| name          | string         | Modifier group name to be displayed                 |
| quantity      | Quantity       | Rules when selecting options in this modifier group |
| data\_options | dataOptions\[] | Modifier group options                              |
| {% endtab %}  |                |                                                     |

{% tab title="Quantity" %}

| param         | type    | description                                                                  |
| ------------- | ------- | ---------------------------------------------------------------------------- |
| min\_quantity | integer | Minimum quantity allowed (inclusive). Cannot be negative.                    |
| max\_quantity | integer | Maximum quantity allowed (inclusive). Must be greater than the min\_quantity |

{% endtab %}

{% tab title="DataOption" %}

| param              | type                | description                                                                            |
| ------------------ | ------------------- | -------------------------------------------------------------------------------------- |
| item\_external\_id | string              | Id item on the POS (this must be the same defined in the external\_id of the **Item**) |
| price              | Price (optional)    | Override the price of the item in this context                                         |
| quantity           | Quantity (optional) | Rules when selecting this item option                                                  |
| {% endtab %}       |                     |                                                                                        |
| {% endtabs %}      |                     |                                                                                        |

## TYPE: ORDER\_STATUS

<mark style="color:green;">`POST`</mark> `https://yourwebhook/for_type_order_status`

Service where receive the status of order from the POS: REJECT - ACCEPT

#### Headers

| Name         | Type   | Description                                                       |
| ------------ | ------ | ----------------------------------------------------------------- |
|              | string | sha256 hash code of the body request using the webhook secret key |
| Content-type | string | application/json                                                  |

#### Request Body

| Name      | Type   | Description                          |
| --------- | ------ | ------------------------------------ |
| message   | string | a message when and order is rejected |
| status    | string | <p>ENUM: <br>ACCEPT <br>REJECT</p>   |
| order\_id | string | Id order on the third party platform |

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

```
{"message": "ANY MESSAGE"}
```

{% endtab %}

{% tab title="409 " %}

```
{"message": "ERROR MESSAGE"}
```

{% endtab %}
{% endtabs %}
