For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Help CenterAPI KeysStatusSign In
GuidesAPI ReferenceChangelog
GuidesAPI ReferenceChangelog
  • Introduction
    • Getting started
  • Email API
  • Transactional SMS
  • Transactional WhatsApp
  • Marketing Campaigns
  • Contact Management
  • Events
    • GETGet events
    • POSTCreate an event
    • POSTCreate events in batch
  • Object Management
  • Accounts and Settings
  • Sales CRM
  • Conversations
  • Ecommerce
      • GETGet detailed attribution metrics for a single Brevo campaign or workflow
      • GETGet attributed product sales for a single Brevo campaign or workflow
      • GETGet attribution metrics for one or more Brevo campaigns or workflows
  • Loyalty
LogoLogo
Help CenterAPI KeysStatusSign In
EcommerceRevenue Attribution

Get attribution metrics for one or more Brevo campaigns or workflows

GET
https://api.brevo.com/v3/ecommerce/attribution/metrics
GET
/v3/ecommerce/attribution/metrics
1import { BrevoClient } from "@getbrevo/brevo";
2
3async function main() {
4 const client = new BrevoClient({
5 apiKey: "YOUR_API_KEY_HERE",
6 });
7 await client.ecommerce.getAttributionMetricsForOneOrMoreBrevoCampaignsOrWorkflows({});
8}
9main();
1{
2 "results": [
3 {
4 "averageBasket": 3,
5 "conversionSource": "email_campaign",
6 "id": 1.1,
7 "ordersCount": 300,
8 "revenue": 900
9 },
10 {
11 "averageBasket": 4,
12 "conversionSource": "email_campaign",
13 "id": 1.1,
14 "ordersCount": 200,
15 "revenue": 800
16 }
17 ],
18 "totals": {
19 "averageBasket": 3.4,
20 "ordersCount": 500,
21 "revenue": 1700
22 }
23}

Retrieve aggregated ecommerce attribution metrics for one or more Brevo email campaigns, SMS campaigns, or automation workflows. You can optionally filter by a date range using periodFrom and periodTo in RFC3339 format. The response includes per-source metrics (orders count, revenue, and average basket) as well as aggregated totals across all requested sources.

Was this page helpful?
Previous

Activate the eCommerce app

Next
Built with

Authentication

api-keystring

The API key should be passed in the request headers as api-key for authentication.

Query parameters

periodFromdatetimeOptional
When getting metrics for a specific period, define the starting datetime in RFC3339 format
periodTodatetimeOptional
When getting metrics for a specific period, define the end datetime in RFC3339 format
emailCampaignId[]list of stringsOptional

The email campaign ID(s) to get metrics for

smsCampaignId[]list of stringsOptional

The SMS campaign ID(s) to get metrics for

automationWorkflowEmailId[]list of stringsOptional

The automation workflow ID(s) to get email attribution metrics for

automationWorkflowSmsId[]list of stringsOptional

The automation workflow ID(s) to get SMS attribution metrics for

Response

OK
resultslist of objects
List of conversion attribution metrics
totalsobject
Attribution list aggregated totals

Errors

400
Bad Request Error