Get Experience Export

Export experience data

Export order-level or line-item-level data for an experience (A/B test) as a CSV file.

POST /analytics/experience/{experienceId}/export

Returns a presigned S3 URL to download a CSV file containing the requested export data. The URL is valid for 15 minutes.

Parameters

  • experienceId (path) — required. UUID of the experience.
  • exportType — required. Type of export: orders, order_line_items, or order_reconciliation (see table below).
  • startTs — optional 10-digit epoch timestamp in seconds. Defaults to experience start date.
  • endTs — optional 10-digit epoch timestamp in seconds. Defaults to now or experience end date.
  • filters — optional analytics filters object. See below and the Filters Reference for available fields.

Export Types

ValueDescription
ordersOrder-level data — one row per order with revenue, discount, variation assignment, and visitor
order_line_itemsLine-item-level data — one row per line item with product, quantity, price, and variation
order_reconciliationReconciliation export joining Intelligems order attribution against the underlying order data

order_reconciliation columns

Unlike the other two export types, this one is a narrow audit list rather than a metrics export. It has five columns and one row per store order in the window — including orders excluded from the analysis, not only orders attributed to the experience — so it answers "why is this order not in my numbers?".

ColumnDescription
order_idShopify order ID.
order_nameShopify order name (for example #1234).
order_created_tsOrder creation timestamp.
is_excludedWhether the order was excluded from the experience's analytics.
exclusion_reasonWhy it was excluded, as a numbered code and label (for example 05/Order could not be matched to a session). Included orders have 99/Not excluded, not an empty value. A bare Other with no numbered prefix also occurs, so parse the code defensively rather than assuming every value splits on /.

Because excluded orders are included, the row count is normally higher than the orders export for the same window.

Upsell columns

Both the orders and order_line_items exports identify lines that an Intelligems upsell put in the cart, so you can separate upsell revenue from organic revenue.

order_line_items adds one column:

ColumnDescription
upsell_typeWhich Intelligems upsell surface added this line. Empty when none did. See values below.
ValueMeaning
(empty)No Intelligems upsell added this line — see scoping below.
checkout_upsellAdded from an upsell block in the checkout extension.
onsite_upsellAdded from the onsite upsell widget, which renders on the product page or the cart.
post_purchase_offerAdded from a post-purchase offer, after checkout completed.

The surfaces are mutually exclusive, so a line has exactly one value. Filter or pivot on this column to split upsell revenue from organic revenue. To see which variation an upsell line belongs to, use test_group_name, which is already in the export.

Scoping — what an empty value means

When the experience has its own checkout upsell blocks or onsite upsell components, upsell_type is scoped to them. checkout_upsell then means "added by this experience's checkout upsell", not "is an upsell of any kind". A line added by a different, concurrently-running upsell experience is left empty.

This is deliberate: it stops an export of one upsell test from attributing an overlapping test's upsells to itself. When the experience has no upsell surfaces of its own, no scoping is applied and the values mean "from any Intelligems upsell".

So read an empty upsell_type as "no upsell attributable to this experience", not strictly as "organic line item".

orders adds three order-level columns rolled up from the same scoped classification, so the two exports always agree on whether an order contains an upsell:

ColumnDescription
upsell_typesArray of the distinct upsell surfaces present on the order. Empty array when there are none.
net_revenue_from_upsellNet revenue across every upsell line on the order, all surfaces combined.
unit_quantity_from_upsellUnits across every upsell line on the order, all surfaces combined.

For a per-surface revenue split, use the order_line_items export and group by upsell_type, or request the per-variation upsell metrics from POST /analytics/resource/{experienceId} with includeUpsellMetrics: true.

Filters

This endpoint accepts the same filters as POST /analytics/resource/{experienceId}. Key filters include:

FieldTypeDescription
deviceTypestring"any", "mobile", or "desktop"
visitorTypestring"any", "new", or "returning"
countryCodesstring[]ISO 3166-1 alpha-2 codes, e.g. ["US", "GB"]
sourceSitesOrChannelsstring[]Traffic channel names (see Filters Reference)
userBehaviorobjectVisitor behavior filter (see sub-fields below)
experimentProductsOnlybooleanOnly include products in the experiment (target products)
onlyProductIdsstring[]Shopify product IDs to include
onlyProductHandlesstring[]Shopify product handles to include

userBehavior sub-fields

All fields are optional booleans. Set to true to filter to only visitors who performed that action.

FieldDescription
viewedProductPageVisitor viewed a product page
viewedCollectionPageVisitor viewed a collection page
addedToCartVisitor added an item to cart
viewedCheckoutVisitor reached checkout

See the Filters Reference section for the full list of available filter fields.

Response Structure

The response contains:

FieldTypeDescription
exportTypestringThe export type requested (orders, order_line_items, or order_reconciliation)
experienceIdstringUUID of the experience
experienceNamestringDisplay name of the experience
urlstring|nullPresigned S3 URL to download the CSV. Null if the export timed out.
expiresInnumberSeconds until the URL expires (900 = 15 minutes). 0 if url is null.
formatstringAlways "csv"
messagestringHuman-readable status (e.g. "Export ready", "Export timed out, please retry")

Date Range Behavior

  • When startTs and endTs are omitted, the date range defaults to the experience's full lifetime (start date through end/pause date or now).
  • If the experience is paused or ended, the export is automatically truncated at the pause/end date.
  • If the provided startTs is before the experience start date, it is clamped to the experience start. Similarly, endTs is clamped to the experience end/pause date.
  • Clamping only applies to a window that overlaps the experience lifetime. A window that falls entirely outside it is rejected rather than clamped: HTTP 400 with { "error": "Requested time range falls outside the experience lifetime" }.

Presigned URL

The returned URL is a time-limited presigned S3 URL. It expires after 15 minutes (900 seconds). After expiry, the URL returns a 403 Forbidden. Call the endpoint again to generate a new URL.

Rate Limit: 20 requests per 60s window, refilling 10 tokens every 60s.

post/v25-10-beta/analytics/experience/{experienceId}/export

Request

Path parameters

experienceIdstring uuid required

Request body

exportType'orders' | 'order_line_items' | 'order_reconciliation' required

Type of export data to retrieve. 'orders' returns order-level data, 'order_line_items' returns line-item-level data.

startTsstring

Optional analysis start timestamp as a 10-digit Unix epoch string in seconds. Defaults to the experience start date.

endTsstring

Optional analysis end timestamp as a 10-digit Unix epoch string in seconds. Defaults to now or the experience end date.

Response

OK

exportType'orders' | 'order_line_items' | 'order_reconciliation' required

The type of export that was generated.

experienceIdstring required

The UUID of the experience.

experienceNamestring required

The display name of the experience.

urlstring nullable required

Presigned S3 URL to download the CSV file. Valid for 15 minutes. Null if the export timed out or failed.

expiresInnumber required

Number of seconds until the presigned URL expires. 0 if url is null.

format'csv' required

The file format of the export (always 'csv').

messagestring required

Human-readable status message.

Changes

No recorded changes to this operation across all 1 revision of this API.