---
title: Streaming Events via API
slug: qatar-airways-hol/streaming-events-via-api
docTags: 
createdAt: 2024-01-12T15:07:59.316Z
---

In this exercise we will use a streaming connection to ingest XDM-formatted JSON records in real-time to the Adobe Experience Platform.&#x20;

We will use Postman to send these events to the Streaming endpoint.&#x20;

In our example, we will send a product purchase event to the dataset `Demo System - Event Dataset for POS (Global v1.1)`

1. Open Postman and expand the Collection.
2. Select the POST request `Sending Events via Streaming API (Booking)`
3. Click on **Body&#x20;**&#x74;o see the JSON payload we are sending.

You will see that the **payload** is in the XDM format as defined by the Schema. We've included:

- The **product list items** array to give context to which product has been viewed.
- The **timestamp** which specifies when the product view event occured.
- The **event type** which is recognised as the product view event in AEP.
- The **\_id** which is the unique ID of the event.
- The Schema and Dataset IDs for where we want to send the data.

The full payload:

```json
{
      "header": {
          "schemaRef": {
              "id": "https://ns.adobe.com/demopotemea/schemas/dce58aa964d98317c66cfc735a4ec48b646598cd247a8b9b",
              "contentType": "application/vnd.adobe.xed-full+json;version=1.0"
          },
          "imsOrgId": "8AB51935659C10E40A495FA2@AdobeOrg",
          "datasetId": "678e494d4b35002aefb167eb",
          "source": {
              "name":"Travel streaming connection dataflow"
          }
      },
      "body": {
          "xdmMeta": {
              "schemaRef": {
                  "id": "https://ns.adobe.com/demopotemea/schemas/dce58aa964d98317c66cfc735a4ec48b646598cd247a8b9b",
                  "contentType": "application/vnd.adobe.xed-full+json;version=1.0"
              }
          },
          "xdmEntity": {
            "_demopotemea": {
              "identification": {
                "core": {
                  "loyaltyId": "12fd45tg"
                }
              },
              "interactionDetails": {
                "core": {
                  "channel": "api"
                }
              }
            },
            "_id": "wk1hsz97v160632289959130",
            "commerce": {
              "productViews": {
                "value": 1
              }
            },
            "environment": {
              "type": "external"
            },
            "eventType": "commerce.purchases",
            "implementationDetails": {
              "environment": "server",
              "name": "https://ns.adobe.com/experience/alloy",
              "version": "1.2"
            },
            "productListItems": [{
                "SKU": "MS01",
                "name": "WAW-AMS",
                "quantity": 1,
                "priceTotal": 340,
                "productAddMethod": "api",
                "_demopotemea": {
                    "core": {
                        "description": "Wawsaw to Amsterdam return trip",
                        "mainCategory": "Flight"
                    }
                }
            }],
            "timestamp": "2025-01-20T09:20:39+00:00"
          }
      }
  }
```

1. Click **Send** to execute this request and send the event to the Experience Platform.
2. You will see a **response** with status `200 OK` if the event has been received successfully.&#x20;

![](https://api.archbee.com/api/optimize/1Jp0iolWv35Z_mkI7oUiT/Jxtzxd1Al7HTVsqBwm88d_image.png)

You can now check the **Dataset Activity** UI to see if your event has been ingested successfully.&#x20;

1. Navigate to **Datasets&#x20;**&#x66;rom the main left hand navigation.
2. Click the dataset `Demo System - Event Dataset for POS (Global v1.1)`.
3. Look in the recent batches for successfully ingested records.
4. Select **Preview Dataset** to see what data has been ingested, look for your product view event.&#x20;

![](https://api.archbee.com/api/optimize/1Jp0iolWv35Z_mkI7oUiT/yC3djsC9XTo6FW8HQm1vY_image.png)

:::hint{type="success"}
With this, you’ve now successfully ingested product view events to Adobe Experience Platform via the **Streaming API**!
:::

