Skip to developer documentation
Browse developer documentation
API documentation / Reports

Reports

Sales

Read recorded payments and refunds, newest first, with observed attribution details.

GET/api/v1/stats/sales

Access: Workspace key or OAuth analytics:read · Permission details

Query parameters

Query parameters
FieldTypeDescription
sitestringWebsite ID or domain. Required when the workspace has more than one website.
periodstringUTC date selection. from and to override period.

Values: realtime, today, yesterday, 7d, 30d, 90d, 12m, wtd, mtd, qtd, ytd, all.

Default: 30d.

fromstringInclusive start date. Supply to as well.
tostringInclusive end date. Supply from as well.
comparestringComparison range.

Values: previous_period, mom, qoq, yoy, none.

Default: previous_period.

modelstringHow recorded sources share revenue credit.

Values: first_touch, last_touch, linear, time_decay.

Default: first_touch.

filtersstringURL-encoded JSON array of up to twenty visitor filters, for example [{"dim":"country","op":"is","value":"US"}]. Dimensions: source, channel, campaign, entry_page, page, hostname, country, device, browser, os, goal. Operators: is, is_not. Values are exact strings up to 500 characters. All filters must match the visitor across available history; report dates then select activity for that cohort. Unmatched payments are excluded. Crawler counts remain website-wide; spend requires every filter to be source/channel/campaign. Preserve filters when paging.
limitintegerRow limit for reports that support it.

Default: 50.

cursorstringOpaque next_cursor from the previous page. Preserve the original website, report, dates, model and funnel selection. Never construct a cursor.

Request examples

Examples run from your server or terminal. Configure ATTRIBOO_TOKEN privately for authenticated requests. Replace example website IDs and values with your own. The examples make real requests when you run them.

cURL request
curl "https://www.attriboo.com/api/v1/stats/sales?site=site_example&from=2026-10-01&to=2026-10-07&compare=none" \
  -H "Authorization: Bearer $ATTRIBOO_TOKEN"

Response

Illustrative response. Fields below are inside the data object. Optional coverage, notes and continuation fields vary by report.

Response fields
FieldTypeDescription
siteobjectWebsite ID, domain and currency.
periodobjectResolved UTC boundaries; to is the exclusive timestamp after the selected end date.
salesarrayReport records. See the fields below.
next_cursorstring | nullWhen provided, pass this value to continue; null means the last page. Some small-site reports omit this field.
coverageobjectWhen provided, describes completeness, snapshot time and row coverage. Row limits apply to this page, not to headline totals.

site fields

site nested fields
FieldTypeDescription
idstringWebsite ID.
domainstringWebsite domain.
currencystringThree-letter currency.

period fields

period nested fields
FieldTypeDescription
fromstringInclusive UTC start.
tostringExclusive UTC end.
labelstringHuman-readable date selection.
comparestringComparison selection.
attribution_modelstringRevenue-credit model.

sales[] fields

sales nested fields
FieldTypeDescription
idstringStored transaction ID.
providerstringPayment provider.
external_idstringProvider transaction ID.
typestringone_time, subscription_new, subscription_renewal or refund.
amountintegerSigned integer cents; refunds are negative.
currencystringTransaction currency.
customer_emailstring | nullCustomer email or null. Treat as private data.
transacted_atstringUTC transaction time.
attributedbooleanWhether a preceding observed source was linked.
first_touchstring | nullFirst source or null.
last_touchstring | nullLast source or null.
touchesintegerPreceding observed touches.
self_reported_sourcestring | nullSurvey answer or null.
JSON response
{
  "status": "success",
  "data": {
    "site": {
      "id": "site_example",
      "domain": "shop.example.com",
      "currency": "USD"
    },
    "period": {
      "from": "2026-10-01T00:00:00.000Z",
      "to": "2026-10-08T00:00:00.000Z",
      "label": "Custom",
      "compare": "none",
      "attribution_model": "first_touch"
    },
    "sales": [
      {
        "id": "tx_example",
        "provider": "stripe",
        "external_id": "order_123",
        "type": "one_time",
        "amount": 5000,
        "currency": "USD",
        "customer_email": null,
        "transacted_at": "2026-10-01T12:00:00Z",
        "attributed": true,
        "first_touch": "Google Organic",
        "last_touch": "Direct",
        "touches": 2,
        "self_reported_source": null
      }
    ]
  }
}

Behavior and limits

Money is integer cents in site.currency. Percentages use a 0–100 scale.

An unattributed payment is still a payment. Importing history does not recreate unobserved visits.

Keep customer_email and visitor identifiers in authorized private systems.