For the complete documentation index, see llms.txt. This page is also available as Markdown.

Reports

List available report types with their filters, datasets, columns, and date presets

get

Discovery for the reports API: each of the six report types with the filters it accepts (names, data types, options), its result datasets and columns, grouping options, and the relative_date presets. Call this before create_report to construct a valid report.

Report types: affiliate_performance, attribution_performance, checkout_performance, customer_cohort_ltv, payment_plan_performance, product_sales.

Filter note: static options arrays are included where available. Dynamic / account-specific options (e.g. product lists, checkout lists) are omitted from this endpoint — pass the lister object's object field to understand what entity type drives the search.

Note: reports bucket dates in the report's own timezone field (legacy semantics), unlike /v2/analytics which is UTC-only.

Authorizations
AuthorizationstringRequired

Account API key authentication. Pass an API key as a Bearer token in the Authorization header. An account may have multiple named keys; any of them grants full access to all endpoints — equivalent to all OAuth scopes.

Responses
200

Successful response

application/json
typestringRequired
labelstringRequired
relative_datesstring[]Required
get/v2/reports/types
GET /v2/reports/types HTTP/1.1
Host: api.spiffy.co
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "type": "text",
  "label": "text",
  "filters": [
    {
      "name": "text",
      "data_type": "text",
      "options": [
        {
          "id": null,
          "label": "text"
        }
      ]
    }
  ],
  "datasets": [
    {
      "type": "text",
      "display_type": "text",
      "grouping_properties": [
        "text"
      ],
      "grouping_intervals": {
        "ANY_ADDITIONAL_PROPERTY": "text"
      },
      "columns": [
        {
          "name": "text",
          "label": "text",
          "data_type": "text"
        }
      ]
    }
  ],
  "relative_dates": [
    "text"
  ]
}

Download a report run export as CSV

get

Streams the full dataset for a completed run as text/csv, with no pagination and no row cap.

This endpoint requires no authentication — the signed token in the path is the credential — and it does not count against your monthly API quota. It is the cheapest way to pull a large dataset: create the run, poll until it completes, mint a URL with POST /v2/reports/{report_id}/runs/{run_id}/exports, then download here.

Tokens expire 15 minutes after they are minted.

Authorizations
AuthorizationstringRequired

Account API key authentication. Pass an API key as a Bearer token in the Authorization header. An account may have multiple named keys; any of them grants full access to all endpoints — equivalent to all OAuth scopes.

Path parameters
tokenstringRequired

Signed download token from the create-export response

Responses
200

Successful response

application/json
any · nullableOptional
get/v2/reports/exports/{token}
GET /v2/reports/exports/{token} HTTP/1.1
Host: api.spiffy.co
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*

No content

List reports

get

List saved reports

Authorizations
AuthorizationstringRequired

Account API key authentication. Pass an API key as a Bearer token in the Authorization header. An account may have multiple named keys; any of them grants full access to all endpoints — equivalent to all OAuth scopes.

Query parameters
pageintegerOptional

Page number

Example: 1
per_pageinteger · max: 100Optional

Items per page (max 100)

Example: 25
filter[type]stringOptional

Filter by type (exact match).

filter[type.contains]stringOptional

Filter by type (contains)

filter[is_active]stringOptional

Filter by is_active (exact match). Valid values: true, false.

filter[is_active.in]stringOptional

Filter by is_active (comma-separated list). Fetches many records in one request instead of one request per id.

Example: true,false
filter[is_active.nin]stringOptional

Filter by is_active (excluding a comma-separated list)

filter[created_at]stringOptional

Filter by created_at (exact match).

filter[created_at.gte]stringOptional

Filter by created_at (greater than or equal)

filter[created_at.lte]stringOptional

Filter by created_at (less than or equal)

sortstringOptional

Sort field (prefix with - for descending)

Example: -created_at
Responses
200

Successful response with paginated list

application/json
get/v2/reports
GET /v2/reports HTTP/1.1
Host: api.spiffy.co
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "data": [
    {
      "id": 1,
      "type": "text",
      "name": "text",
      "filters": [
        {
          "name": "text",
          "comparison": "text",
          "values": [],
          "value": null
        }
      ],
      "timezone": "text",
      "relative_date": "text",
      "frequency": "day",
      "frequency_count": 1,
      "next_run_at": "2026-01-01T00:00:00.000Z",
      "is_active": true,
      "users": [
        {
          "user_id": 1,
          "name": "text",
          "email": "text"
        }
      ],
      "created_at": "2026-01-01T00:00:00.000Z",
      "updated_at": "2026-01-01T00:00:00.000Z"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 25,
    "total": 150,
    "pages": 6
  }
}

Create a saved report

post

Create a new saved report. Call GET /v2/reports/types (list_report_types) first to discover valid type values, filter names, and relative_date presets.

Scheduling: when frequency and relative_date are set, the report is emailed to its users on the computed schedule — exactly as dashboard-created scheduled reports are. frequency requires relative_date (a rolling window such as "Last Month"). users[] is optional — each entry takes {user_id} OR {email} (account users with report access). When scheduling and users is omitted, it defaults to YOU (the authorizing user), so "schedule this and email me" needs no ids at all.

next_run_at is computed automatically from frequency + frequency_count; do not set it manually.

Reports are created active (is_active=true, no draft state — unlike the dashboard). When name is omitted, a descriptive name is auto-generated from the type and filters (same as the dashboard) — but pass an explicit name when you want a predictable one.

Authorizations
AuthorizationstringRequired

Account API key authentication. Pass an API key as a Bearer token in the Authorization header. An account may have multiple named keys; any of them grants full access to all endpoints — equivalent to all OAuth scopes.

Body
typestringRequired
namestring · max: 255 · nullableOptional
timezonestringOptional
relative_datestringOptional
frequencystring · enumOptionalPossible values:
frequency_countintegerOptional
Responses
201

Created successfully

application/json
idintegerRequired
typestringRequired

Report type key, e.g. 'product_sales'. See GET /v2/reports/types.

namestring · nullableRequired
timezonestringRequired

IANA timezone the report buckets dates in (legacy semantics — unlike /v2/analytics, which is UTC-only).

relative_datestring · nullableRequired

Date-range preset resolved per run, e.g. 'Last Month'.

frequencystring · enum · nullableRequiredPossible values:
frequency_countinteger · nullableRequired
next_run_atstring · date-time · nullableRequired
is_activebooleanRequired
created_atstring · date-time · nullableRequired
updated_atstring · date-time · nullableRequired
post/v2/reports
POST /v2/reports HTTP/1.1
Host: api.spiffy.co
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 220

{
  "type": "text",
  "name": "text",
  "filters": [
    {
      "name": "text",
      "comparison": "text",
      "values": [],
      "value": null
    }
  ],
  "timezone": "text",
  "relative_date": "text",
  "frequency": "day",
  "frequency_count": 1,
  "users": [
    {
      "user_id": 1,
      "email": "text"
    }
  ]
}
{
  "id": 1,
  "type": "text",
  "name": "text",
  "filters": [
    {
      "name": "text",
      "comparison": "text",
      "values": [],
      "value": null
    }
  ],
  "timezone": "text",
  "relative_date": "text",
  "frequency": "day",
  "frequency_count": 1,
  "next_run_at": "2026-01-01T00:00:00.000Z",
  "is_active": true,
  "users": [
    {
      "user_id": 1,
      "name": "text",
      "email": "text"
    }
  ],
  "created_at": "2026-01-01T00:00:00.000Z",
  "updated_at": "2026-01-01T00:00:00.000Z"
}

Get reports

get

Retrieve a single reports by ID

Authorizations
AuthorizationstringRequired

Account API key authentication. Pass an API key as a Bearer token in the Authorization header. An account may have multiple named keys; any of them grants full access to all endpoints — equivalent to all OAuth scopes.

Path parameters
report_idintegerRequired

reports ID

Example: 12345
Responses
200

Successful response

application/json
idintegerRequired
typestringRequired

Report type key, e.g. 'product_sales'. See GET /v2/reports/types.

namestring · nullableRequired
timezonestringRequired

IANA timezone the report buckets dates in (legacy semantics — unlike /v2/analytics, which is UTC-only).

relative_datestring · nullableRequired

Date-range preset resolved per run, e.g. 'Last Month'.

frequencystring · enum · nullableRequiredPossible values:
frequency_countinteger · nullableRequired
next_run_atstring · date-time · nullableRequired
is_activebooleanRequired
created_atstring · date-time · nullableRequired
updated_atstring · date-time · nullableRequired
get/v2/reports/{report_id}
GET /v2/reports/{report_id} HTTP/1.1
Host: api.spiffy.co
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "id": 1,
  "type": "text",
  "name": "text",
  "filters": [
    {
      "name": "text",
      "comparison": "text",
      "values": [],
      "value": null
    }
  ],
  "timezone": "text",
  "relative_date": "text",
  "frequency": "day",
  "frequency_count": 1,
  "next_run_at": "2026-01-01T00:00:00.000Z",
  "is_active": true,
  "users": [
    {
      "user_id": 1,
      "name": "text",
      "email": "text"
    }
  ],
  "created_at": "2026-01-01T00:00:00.000Z",
  "updated_at": "2026-01-01T00:00:00.000Z"
}

Delete a saved report

delete

Soft-delete a saved report (sets is_active=false). The report is no longer returned by the default list. Returns 204 on success.

Authorizations
AuthorizationstringRequired

Account API key authentication. Pass an API key as a Bearer token in the Authorization header. An account may have multiple named keys; any of them grants full access to all endpoints — equivalent to all OAuth scopes.

Path parameters
report_idstringRequired

Report ID

Responses
204

Deleted successfully

No content

delete/v2/reports/{report_id}
DELETE /v2/reports/{report_id} HTTP/1.1
Host: api.spiffy.co
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*

No content

Update a saved report

patch

Update an existing saved report. Only the provided fields are changed (partial update). Set name, relative_date, frequency, or frequency_count to null to clear them — clearing frequency turns the schedule off (next_run_at becomes null). Set is_active=true to reactivate a soft-deleted report. Supplying users replaces the entire recipient list ({user_id} or {email} per entry; [] clears it); when a patch introduces frequency on a report with no recipients and users is omitted, the authorizing user is defaulted. Changing the cadence recomputes next_run_at; resending an unchanged frequency leaves the send date where it is.

Authorizations
AuthorizationstringRequired

Account API key authentication. Pass an API key as a Bearer token in the Authorization header. An account may have multiple named keys; any of them grants full access to all endpoints — equivalent to all OAuth scopes.

Path parameters
report_idstringRequired

Report ID

Body
namestring · max: 255 · nullableOptional

Report name. null clears the name.

timezonestringOptional
relative_datestring · nullableOptional

Date-range preset, e.g. 'Last Month'. null clears the schedule window (only valid when frequency is also null/cleared).

frequencystring · enum · nullableOptional

Schedule frequency. null clears the schedule (next_run_at becomes null).

Possible values:
frequency_countinteger · nullableOptional

Schedule interval multiplier. null clears it (treated as 1 while frequency is set).

is_activebooleanOptional

true reactivates a soft-deleted report; false soft-deletes (same as DELETE).

Responses
200

Successful response

application/json
idintegerRequired
typestringRequired

Report type key, e.g. 'product_sales'. See GET /v2/reports/types.

namestring · nullableRequired
timezonestringRequired

IANA timezone the report buckets dates in (legacy semantics — unlike /v2/analytics, which is UTC-only).

relative_datestring · nullableRequired

Date-range preset resolved per run, e.g. 'Last Month'.

frequencystring · enum · nullableRequiredPossible values:
frequency_countinteger · nullableRequired
next_run_atstring · date-time · nullableRequired
is_activebooleanRequired
created_atstring · date-time · nullableRequired
updated_atstring · date-time · nullableRequired
patch/v2/reports/{report_id}
PATCH /v2/reports/{report_id} HTTP/1.1
Host: api.spiffy.co
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 223

{
  "name": "text",
  "filters": [
    {
      "name": "text",
      "comparison": "text",
      "values": [],
      "value": null
    }
  ],
  "timezone": "text",
  "relative_date": "text",
  "frequency": "day",
  "frequency_count": 1,
  "users": [
    {
      "user_id": 1,
      "email": "text"
    }
  ],
  "is_active": true
}
{
  "id": 1,
  "type": "text",
  "name": "text",
  "filters": [
    {
      "name": "text",
      "comparison": "text",
      "values": [],
      "value": null
    }
  ],
  "timezone": "text",
  "relative_date": "text",
  "frequency": "day",
  "frequency_count": 1,
  "next_run_at": "2026-01-01T00:00:00.000Z",
  "is_active": true,
  "users": [
    {
      "user_id": 1,
      "name": "text",
      "email": "text"
    }
  ],
  "created_at": "2026-01-01T00:00:00.000Z",
  "updated_at": "2026-01-01T00:00:00.000Z"
}

List reports

get

List runs for a report

Authorizations
AuthorizationstringRequired

Account API key authentication. Pass an API key as a Bearer token in the Authorization header. An account may have multiple named keys; any of them grants full access to all endpoints — equivalent to all OAuth scopes.

Query parameters
pageintegerOptional

Page number

Example: 1
per_pageinteger · max: 100Optional

Items per page (max 100)

Example: 25
sortstringOptional

Sort field (prefix with - for descending)

Example: -created_at
Responses
200

Successful response with paginated list

application/json
get/v2/reports/{report_id}/runs
GET /v2/reports/{report_id}/runs HTTP/1.1
Host: api.spiffy.co
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "data": [
    {
      "id": 1,
      "report_id": 1,
      "status": "pending",
      "start_at": "2026-01-01T00:00:00.000Z",
      "end_at": "2026-01-01T00:00:00.000Z",
      "started_at": "2026-01-01T00:00:00.000Z",
      "completed_at": "2026-01-01T00:00:00.000Z",
      "error_reason": "text",
      "stats": {
        "flat_stats": {
          "ANY_ADDITIONAL_PROPERTY": {
            "value": 1,
            "label": "text",
            "data_type": "text"
          }
        }
      },
      "created_at": "2026-01-01T00:00:00.000Z"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 25,
    "total": 150,
    "pages": 6
  }
}

Create a report run (queued for background execution)

post

Create a new report run. Returns 202 Accepted with the run in "pending" status. Execution is asynchronous: a background worker picks up pending runs, so runs typically START within about 30 seconds of creation, then take a few seconds to a few minutes to finish depending on data volume.

Polling: call get_report_run until status is "completed" or "failed". Each poll counts against the monthly API quota — poll no faster than every ~30 seconds (matches the worker pickup cadence); typical runs complete within a couple of minutes.

Reading results: when completed, the run includes a stats block (flat_stats) that answers most questions — total revenue, count, etc. — without fetching rows. Read stats first; only fetch rows via list_report_run_results if you need detail.

The run inherits the report's filters, timezone, and date range. For relative_date presets (e.g. "Last Month"), the start/end dates are resolved at run time. The report must have a date range — relative_date or a report_date filter — or this returns 400 (every report type date-filters its results).

Authorizations
AuthorizationstringRequired

Account API key authentication. Pass an API key as a Bearer token in the Authorization header. An account may have multiple named keys; any of them grants full access to all endpoints — equivalent to all OAuth scopes.

Path parameters
report_idstringRequired

Report ID

Responses
201

Created successfully

application/json
idintegerRequired
report_idintegerRequired
statusstring · enumRequiredPossible values:
start_atstring · date-time · nullableRequired
end_atstring · date-time · nullableRequired
started_atstring · date-time · nullableRequired
completed_atstring · date-time · nullableRequired
error_reasonstring · nullableRequired
created_atstring · date-time · nullableRequired
post/v2/reports/{report_id}/runs
POST /v2/reports/{report_id}/runs HTTP/1.1
Host: api.spiffy.co
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "id": 1,
  "report_id": 1,
  "status": "pending",
  "start_at": "2026-01-01T00:00:00.000Z",
  "end_at": "2026-01-01T00:00:00.000Z",
  "started_at": "2026-01-01T00:00:00.000Z",
  "completed_at": "2026-01-01T00:00:00.000Z",
  "error_reason": "text",
  "stats": {
    "flat_stats": {
      "ANY_ADDITIONAL_PROPERTY": {
        "value": 1,
        "label": "text",
        "data_type": "text"
      }
    }
  },
  "created_at": "2026-01-01T00:00:00.000Z"
}

Get reports

get

Retrieve a single reports by ID

Authorizations
AuthorizationstringRequired

Account API key authentication. Pass an API key as a Bearer token in the Authorization header. An account may have multiple named keys; any of them grants full access to all endpoints — equivalent to all OAuth scopes.

Responses
200

Successful response

application/json
idintegerRequired
report_idintegerRequired
statusstring · enumRequiredPossible values:
start_atstring · date-time · nullableRequired
end_atstring · date-time · nullableRequired
started_atstring · date-time · nullableRequired
completed_atstring · date-time · nullableRequired
error_reasonstring · nullableRequired
created_atstring · date-time · nullableRequired
get/v2/reports/{report_id}/runs/{run_id}
GET /v2/reports/{report_id}/runs/{run_id} HTTP/1.1
Host: api.spiffy.co
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "id": 1,
  "report_id": 1,
  "status": "pending",
  "start_at": "2026-01-01T00:00:00.000Z",
  "end_at": "2026-01-01T00:00:00.000Z",
  "started_at": "2026-01-01T00:00:00.000Z",
  "completed_at": "2026-01-01T00:00:00.000Z",
  "error_reason": "text",
  "stats": {
    "flat_stats": {
      "ANY_ADDITIONAL_PROPERTY": {
        "value": 1,
        "label": "text",
        "data_type": "text"
      }
    }
  },
  "created_at": "2026-01-01T00:00:00.000Z"
}

List reports

get

Get paginated tabular results for a completed report run

Authorizations
AuthorizationstringRequired

Account API key authentication. Pass an API key as a Bearer token in the Authorization header. An account may have multiple named keys; any of them grants full access to all endpoints — equivalent to all OAuth scopes.

Query parameters
pageintegerOptional

Page number

Example: 1
per_pageinteger · max: 100Optional

Items per page (max 100)

Example: 25
sortstringOptional

Sort field (prefix with - for descending)

Example: -created_at
Responses
200

Successful response with paginated list

application/json
get/v2/reports/{report_id}/runs/{run_id}/results
GET /v2/reports/{report_id}/runs/{run_id}/results HTTP/1.1
Host: api.spiffy.co
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "data": [
    {
      "dataset": "text",
      "columns": [
        {
          "name": "text",
          "label": "text",
          "data_type": "text"
        }
      ],
      "rows": [
        []
      ]
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 25,
    "total": 150,
    "pages": 6
  }
}

Create a short-lived signed CSV download URL for a completed report run

post

Generates a signed download URL for the full dataset of a completed run. One quota call, zero context — the URL is handed to the user or fetched with local tooling (e.g. curl). The URL requires no authentication (the signed token IS the credential). Expires in 15 minutes.

Run must be completed (status=completed) — 409 otherwise; poll get_report_run first.

Query/body param: dataset — which dataset to download (default: "default"); 400 lists available datasets.

Response: { data: { url: string, expires_at: ISO8601 } }

Authorizations
AuthorizationstringRequired

Account API key authentication. Pass an API key as a Bearer token in the Authorization header. An account may have multiple named keys; any of them grants full access to all endpoints — equivalent to all OAuth scopes.

Path parameters
report_idstringRequired

Report ID

run_idstringRequired

Run ID

Responses
201

Created successfully

application/json
urlstringRequired

Short-lived signed download URL for the full CSV. No authentication needed; expires quickly.

expires_atstring · date-time · nullableRequired
post/v2/reports/{report_id}/runs/{run_id}/exports
POST /v2/reports/{report_id}/runs/{run_id}/exports HTTP/1.1
Host: api.spiffy.co
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "url": "text",
  "expires_at": "2026-01-01T00:00:00.000Z"
}

Last updated