---
title: [Tech] Streaming events via API
slug: flutter-crm-pillar/tech-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 Website (Global v1.1)`

1. Open Postman and expand the Collection.
2. Select the POST request `Sending Events via Streaming API (Product View)`.
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/d9b88a044ad96154637965a97ed63c7b20bdf2ab3b4f642e",
            "contentType": "application/vnd.adobe.xed-full+json;version=1.0"
        },
        "imsOrgId": "8AB51935659C10E40A495FA2@AdobeOrg",
        "datasetId": "681b32239973b72aefce2bdc",
        "source": {
            "name": "Streaming dataflow - Website Events"
        }
    },
    "body": {
        "xdmMeta": {
            "schemaRef": {
                "id": "https://ns.adobe.com/demopotemea/schemas/d9b88a044ad96154637965a97ed63c7b20bdf2ab3b4f642e",
                "contentType": "application/vnd.adobe.xed-full+json;version=1.0"
            },
            "identityMap": {
                "Ecid": [
                    {
                        "id": "58603221885344320682417072105764913825",
                        "primary": true
                    }
                ]
            }
        },
        "xdmEntity": {
            "_demopotemea": {
                "identification": {
                    "core": {
                        "ecid": "58603221885344320682417072105764913825"
                    }
                },
                "interactionDetails": {
                    "core": {
                        "channel": "api"
                    }
                }
            },
            "_id": "wk1hsz97v160632289959130",
            "commerce": {
                "productViews": {
                    "value": 1
                }
            },
            "environment": {
                "type": "external"
            },
            "eventType": "commerce.productViews",
            "implementationDetails": {
                "environment": "server",
                "name": "https://ns.adobe.com/experience/alloy",
                "version": "1.2"
            },
            "productListItems": [
                {
                    "SKU": "35345958",
                    "name": "valladolid-v-girona",
                    "quantity": 1,
                    "productAddMethod": "api",
                    "_demopotemea": {
                        "core": {
                            "description": "spanish-la-liga > valladolid-v-girona",
                            "mainCategory": "Football"
                        }
                    }
                }
            ],
            "timestamp": "2025-05-13T13: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/Kr9jNQk3X89PNSZafWHK9-xTU9rRvKY4vFRk7apXo_9-20250513-141334.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 Website (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/Kr9jNQk3X89PNSZafWHK9-XZvOaWxbq6TfH9ENSVorT-20250513-141430.png)

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

