Atribu
API Reference

Conversions & Revenue

Conversion counts, daily trends, attributed revenue, and cash collected by source.

Conversions & Revenue

Four endpoints for querying conversion activity and revenue attribution. All require the conversions:read scope.

Revenue means cash only

Revenue in all endpoints below refers exclusively to confirmed payments from Stripe and MercadoPago. GHL pipeline values (deal stages, closed-won projections) are never included in revenue or ROAS calculations -- they are projections, not confirmed cash.


Conversion Counts

Endpoint
GET /api/v1/conversions

Returns total conversions grouped by event type for the requested period.

Scope: conversions:read

Parameters

ParameterTypeRequiredDescription
date_fromstringYesStart date in YYYY-MM-DD format.
date_tostringYesEnd date in YYYY-MM-DD format.

Request

cURL
curl -H "Authorization: Bearer atb_live_YOUR_KEY" \
  "https://www.atribu.app/api/v1/conversions?date_from=2026-03-01&date_to=2026-03-25"
JavaScript
const res = await fetch(
  "https://www.atribu.app/api/v1/conversions?date_from=2026-03-01&date_to=2026-03-25",
  { headers: { Authorization: "Bearer atb_live_YOUR_KEY" } }
);
const { data } = await res.json();
Python
import requests

res = requests.get(
    "https://www.atribu.app/api/v1/conversions",
    headers={"Authorization": "Bearer atb_live_YOUR_KEY"},
    params={"date_from": "2026-03-01", "date_to": "2026-03-25"},
)
data = res.json()["data"]

Response

Success response (200 OK)
{
  "data": [
    { "event_type": "lead_created", "count": 85 },
    { "event_type": "appointment_booked", "count": 42 },
    { "event_type": "payment_received", "count": 28 },
    { "event_type": "closed_won", "count": 15 }
  ],
  "meta": {
    "date_from": "2026-03-01",
    "date_to": "2026-03-25",
    "profile_id": "uuid"
  }
}

Response fields

FieldTypeDescription
event_typestringConversion type (e.g., lead_created, payment_received).
countnumberTotal conversions of this type in the period.

Daily Conversions

Endpoint
GET /api/v1/conversions/timeseries

Returns daily conversion counts broken down by event type. Use this to chart conversion trends over time.

Scope: conversions:read

Parameters

ParameterTypeRequiredDescription
date_fromstringYesStart date in YYYY-MM-DD format.
date_tostringYesEnd date in YYYY-MM-DD format.

Request

cURL
curl -H "Authorization: Bearer atb_live_YOUR_KEY" \
  "https://www.atribu.app/api/v1/conversions/timeseries?date_from=2026-03-20&date_to=2026-03-25"
JavaScript
const res = await fetch(
  "https://www.atribu.app/api/v1/conversions/timeseries?date_from=2026-03-20&date_to=2026-03-25",
  { headers: { Authorization: "Bearer atb_live_YOUR_KEY" } }
);
const { data } = await res.json();
Python
import requests

res = requests.get(
    "https://www.atribu.app/api/v1/conversions/timeseries",
    headers={"Authorization": "Bearer atb_live_YOUR_KEY"},
    params={"date_from": "2026-03-20", "date_to": "2026-03-25"},
)
data = res.json()["data"]

Response

Success response (200 OK)
{
  "data": [
    { "date": "2026-03-20", "event_type": "lead_created", "count": 12 },
    { "date": "2026-03-20", "event_type": "payment_received", "count": 3 },
    { "date": "2026-03-21", "event_type": "lead_created", "count": 15 },
    { "date": "2026-03-21", "event_type": "appointment_booked", "count": 7 }
  ],
  "meta": {
    "date_from": "2026-03-20",
    "date_to": "2026-03-25",
    "profile_id": "uuid"
  }
}

Response fields

FieldTypeDescription
datestringCalendar date (YYYY-MM-DD).
event_typestringConversion type.
countnumberNumber of conversions of this type on this day.

Revenue by Day

Endpoint
GET /api/v1/revenue

Returns daily attributed revenue and ad spend. Revenue is computed using the selected attribution model and includes cash payments only.

Scope: conversions:read

Parameters

ParameterTypeRequiredDescription
date_fromstringYesStart date in YYYY-MM-DD format.
date_tostringYesEnd date in YYYY-MM-DD format.
modelstringNoAttribution model. Default last_touch. Options: first_touch, linear, position_based, time_decay, last_non_direct.

Request

cURL
curl -H "Authorization: Bearer atb_live_YOUR_KEY" \
  "https://www.atribu.app/api/v1/revenue?date_from=2026-03-20&date_to=2026-03-25&model=last_touch"
JavaScript
const res = await fetch(
  "https://www.atribu.app/api/v1/revenue?date_from=2026-03-20&date_to=2026-03-25&model=last_touch",
  { headers: { Authorization: "Bearer atb_live_YOUR_KEY" } }
);
const { data } = await res.json();
Python
import requests

res = requests.get(
    "https://www.atribu.app/api/v1/revenue",
    headers={"Authorization": "Bearer atb_live_YOUR_KEY"},
    params={
        "date_from": "2026-03-20",
        "date_to": "2026-03-25",
        "model": "last_touch",
    },
)
data = res.json()["data"]

Response

Success response (200 OK)
{
  "data": [
    { "date": "2026-03-20", "revenue": 2400.00, "spend": 680.00 },
    { "date": "2026-03-21", "revenue": 1800.00, "spend": 720.00 },
    { "date": "2026-03-22", "revenue": 3200.00, "spend": 650.00 }
  ],
  "meta": {
    "date_from": "2026-03-20",
    "date_to": "2026-03-25",
    "profile_id": "uuid"
  }
}

Response fields

FieldTypeDescription
datestringCalendar date (YYYY-MM-DD).
revenuenumberAttributed cash revenue in reporting currency.
spendnumberTotal ad spend across all platforms.

Cash Collected

Endpoint
GET /api/v1/revenue/cash

Returns total cash payments grouped by payment source and currency. Unlike the attributed revenue endpoint above, this shows raw payment totals regardless of attribution model.

Scope: conversions:read

Parameters

ParameterTypeRequiredDescription
date_fromstringYesStart date in YYYY-MM-DD format.
date_tostringYesEnd date in YYYY-MM-DD format.

Request

cURL
curl -H "Authorization: Bearer atb_live_YOUR_KEY" \
  "https://www.atribu.app/api/v1/revenue/cash?date_from=2026-03-01&date_to=2026-03-25"
JavaScript
const res = await fetch(
  "https://www.atribu.app/api/v1/revenue/cash?date_from=2026-03-01&date_to=2026-03-25",
  { headers: { Authorization: "Bearer atb_live_YOUR_KEY" } }
);
const { data } = await res.json();
Python
import requests

res = requests.get(
    "https://www.atribu.app/api/v1/revenue/cash",
    headers={"Authorization": "Bearer atb_live_YOUR_KEY"},
    params={"date_from": "2026-03-01", "date_to": "2026-03-25"},
)
data = res.json()["data"]

Response

Success response (200 OK)
{
  "data": [
    { "source": "stripe", "currency": "USD", "total": 9800.00, "count": 35 },
    { "source": "mercadopago", "currency": "MXN", "total": 45000.00, "count": 12 }
  ],
  "meta": {
    "date_from": "2026-03-01",
    "date_to": "2026-03-25",
    "profile_id": "uuid"
  }
}

Response fields

FieldTypeDescription
sourcestringPayment provider (stripe, mercadopago).
currencystringISO 4217 currency code.
totalnumberSum of payments in the original currency.
countnumberNumber of payments.

Cash collected vs. attributed revenue

Cash collected (/revenue/cash) is the raw sum of payments, independent of any attribution model. Attributed revenue (/revenue) distributes payment value across the marketing touchpoints that contributed to the conversion, based on the selected model. Use cash collected for financial reconciliation and attributed revenue for marketing performance analysis.

On this page