> For the complete documentation index, see [llms.txt](https://foodcommerce-api-help.onlinesales.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://foodcommerce-api-help.onlinesales.ai/user-tracking-events/api/sending-events.md).

# Sending Events

To send new events, make a GET request to following API. When you send the request to this API, OnlineSales.ai register  events.

### Endpoint

GET `https://t.o-s.io/appsflyer`

Following is the list of all possible query parameters to be passed to above endpoint:

| Parameter           | Description                                                                                                                                                                                                                                                                          | Mandatory                                                                                                                                                                                                                                                                                                                                                                   |          |     |
| ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | --- |
| device\_id          | The unique identifier for the user currently performing the action. Use GAID or IDFA in case of Android or iOS respectively.                                                                                                                                                         | Yes                                                                                                                                                                                                                                                                                                                                                                         |          |     |
| cli\_ubid           | Client's generated user id. If sent, this takes precedence over `device_id` Once generated for a user - should be the same for all the api calls.                                                                                                                                    | Yes if device\_id is not set                                                                                                                                                                                                                                                                                                                                                |          |     |
| client\_id          | Identifier for your account. The value will be shared at the time of integration and will be fixed for all API calls.                                                                                                                                                                | Yes                                                                                                                                                                                                                                                                                                                                                                         |          |     |
| event\_time         | Time of the event. Format : 13 digit epoch. Eg for 7 August 2019 09:57:18 value will be `1565171838000`                                                                                                                                                                              | Yes                                                                                                                                                                                                                                                                                                                                                                         |          |     |
| event\_name         | Should be one of `viewproduct`, `viewrestaurant`, `funnel_add2cart`, `funnel_salecomplete`                                                                                                                                                                                           | Yes                                                                                                                                                                                                                                                                                                                                                                         |          |     |
| currency            | Currency of the product price                                                                                                                                                                                                                                                        | Yes                                                                                                                                                                                                                                                                                                                                                                         |          |     |
| device\_brand       | Device manufacturer name                                                                                                                                                                                                                                                             | No                                                                                                                                                                                                                                                                                                                                                                          |          |     |
| device\_model       | Device model number. eg: SM-G313HZ                                                                                                                                                                                                                                                   | No                                                                                                                                                                                                                                                                                                                                                                          |          |     |
| sales               | <p>Total amount of purchase (ex: 102.59) without the currency symbol and comma (,). This is the amount which is after discount (i.e. the amount which the customer paid). </p><p><strong>Required if the <code>event\_name</code> is <code>funnel\_salecomplete</code></strong> </p> | No                                                                                                                                                                                                                                                                                                                                                                          |          |     |
| item\_identifier    | <p>The order id which is generated and shown to the users on the website / app. </p><p><strong>Required if the event\_name is funnel\_salecomplete</strong></p>                                                                                                                      | No                                                                                                                                                                                                                                                                                                                                                                          |          |     |
| sku\_id             | <p>pipe (                                                                                                                                                                                                                                                                            | ) separated list of sku ids. <br>Example: <br>1. event\_name <em>=</em> <code>viewprodu</code>ct then this will be sku\_id = M111<br><br>2. eventname = <code>funnel\_salecomplete</code> i.e. if there are 2 menu items in cart with id M111 & M222 then this will be sku\_id=M111                                                                                         | M222</p> | Yes |
| product\_category   | The category in which the menu item belongs. This should be a string and should match with the category feed shared with OnlineSales.ai.                                                                                                                                             | No                                                                                                                                                                                                                                                                                                                                                                          |          |     |
| cust\_email\_hash   | SHA256 of the email of the user performing the action.                                                                                                                                                                                                                               | No                                                                                                                                                                                                                                                                                                                                                                          |          |     |
| product\_prices     | <p>pipe (                                                                                                                                                                                                                                                                            | ) separated list of prices in order of sku<em>ids.</em><br>Example:<br>1. eventname = <code>viewproduct</code> then this will only contain price of one product i.e. productprices = 20<br><br>2. event\_name = <code>funnel\_salecomplete</code> <br>if the prices of are 2 menu items (M111 & M222) are 20 & 50 respectively in cart then this will be product\_prices=20 | 50.</p>  | Yes |
| product\_quantities | <p>pipe (                                                                                                                                                                                                                                                                            | ) separated list of quantities in order of skuids. <br>Example:<br>1. event\_name = <code>viewproduct</code>, then product\_quantities = 1<br><br>2. event\_name = <code>funnel\_salecomplete</code>, if the user has selected 2 and 5 quantities of 2 product items (M111 & M222)  respectively then this will be product\_quantities=2                                    | 5.</p>   | Yes |
