# 07 Get Experience Export

## POST /v25-10-beta/analytics/experience/{experienceId}/export

> 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\` or \`order\_line\_items\` (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\
> \
> \| Value              | Description                                                                                    |\
> \| ------------------ | ---------------------------------------------------------------------------------------------- |\
> \| \`orders\`           | Order-level data — one row per order with revenue, discount, variation assignment, and visitor |\
> \| \`order\_line\_items\` | Line-item-level data — one row per line item with product, quantity, price, and variation      |\
> \
> \### Filters\
> \
> This endpoint accepts the same filters as \`POST /analytics/resource/{experienceId}\`. Key filters include:\
> \
> \| Field                    | Type     | Description                                               |\
> \| ------------------------ | -------- | --------------------------------------------------------- |\
> \| \`deviceType\`             | string   | \`"any"\`, \`"mobile"\`, or \`"desktop"\`                       |\
> \| \`visitorType\`            | string   | \`"any"\`, \`"new"\`, or \`"returning"\`                        |\
> \| \`countryCodes\`           | string\[] | ISO 3166-1 alpha-2 codes, e.g. \`\["US", "GB"]\`             |\
> \| \`sourceSitesOrChannels\`  | string\[] | Traffic channel names (see Filters Reference)             |\
> \| \`userBehavior\`           | object   | Visitor behavior filter (see sub-fields below)            |\
> \| \`experimentProductsOnly\` | boolean  | Only include products in the experiment (target products) |\
> \| \`onlyProductIds\`         | string\[] | Shopify product IDs to include                            |\
> \| \`onlyProductHandles\`     | string\[] | 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.\
> \
> \| Field                  | Description                      |\
> \| ---------------------- | -------------------------------- |\
> \| \`viewedProductPage\`    | Visitor viewed a product page    |\
> \| \`viewedCollectionPage\` | Visitor viewed a collection page |\
> \| \`addedToCart\`          | Visitor added an item to cart    |\
> \| \`viewedCheckout\`       | Visitor reached checkout         |\
> \
> See the Filters Reference section for the full list of available filter fields.\
> \
> \### Response Structure\
> \
> The response contains:\
> \
> \| Field            | Type         | Description                                                                   |\
> \| ---------------- | ------------ | ----------------------------------------------------------------------------- |\
> \| \`exportType\`     | string       | The export type requested (\`orders\` or \`order\_line\_items\`)                    |\
> \| \`experienceId\`   | string       | UUID of the experience                                                        |\
> \| \`experienceName\` | string       | Display name of the experience                                                |\
> \| \`url\`            | string\\|null | Presigned S3 URL to download the CSV. Null if the export timed out.           |\
> \| \`expiresIn\`      | number       | Seconds until the URL expires (900 = 15 minutes). 0 if url is null.           |\
> \| \`format\`         | string       | Always \`"csv"\`                                                                |\
> \| \`message\`        | string       | Human-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.\
> \
> \### 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.

```json
{"openapi":"3.1.0","info":{"title":"Intelligems External API v25-10-beta","version":"v25-10-beta"},"tags":[{"name":"07-get-experience-export"}],"servers":[{"url":"https://api.intelligems.io","description":"Production"}],"security":[{"intelligems_access_token":[]}],"components":{"securitySchemes":{"intelligems_access_token":{"type":"apiKey","in":"header","name":"intelligems-access-token","description":"Intelligems external API access token."}}},"paths":{"/v25-10-beta/analytics/experience/{experienceId}/export":{"post":{"tags":["07-get-experience-export"],"description":"Export order-level or line-item-level data for an experience (A/B test) as a CSV file.\n\n## POST /analytics/experience/{experienceId}/export\n\nReturns a presigned S3 URL to download a CSV file containing the requested export data. The URL is valid for 15 minutes.\n\n### Parameters\n\n- `experienceId` (path) — **required**. UUID of the experience.\n- `exportType` — **required**. Type of export: `orders` or `order_line_items` (see table below).\n- `startTs` — optional 10-digit epoch timestamp in seconds. Defaults to experience start date.\n- `endTs` — optional 10-digit epoch timestamp in seconds. Defaults to now or experience end date.\n- `filters` — optional analytics filters object. See below and the Filters Reference for available fields.\n\n### Export Types\n\n| Value              | Description                                                                                    |\n| ------------------ | ---------------------------------------------------------------------------------------------- |\n| `orders`           | Order-level data — one row per order with revenue, discount, variation assignment, and visitor |\n| `order_line_items` | Line-item-level data — one row per line item with product, quantity, price, and variation      |\n\n### Filters\n\nThis endpoint accepts the same filters as `POST /analytics/resource/{experienceId}`. Key filters include:\n\n| Field                    | Type     | Description                                               |\n| ------------------------ | -------- | --------------------------------------------------------- |\n| `deviceType`             | string   | `\"any\"`, `\"mobile\"`, or `\"desktop\"`                       |\n| `visitorType`            | string   | `\"any\"`, `\"new\"`, or `\"returning\"`                        |\n| `countryCodes`           | string[] | ISO 3166-1 alpha-2 codes, e.g. `[\"US\", \"GB\"]`             |\n| `sourceSitesOrChannels`  | string[] | Traffic channel names (see Filters Reference)             |\n| `userBehavior`           | object   | Visitor behavior filter (see sub-fields below)            |\n| `experimentProductsOnly` | boolean  | Only include products in the experiment (target products) |\n| `onlyProductIds`         | string[] | Shopify product IDs to include                            |\n| `onlyProductHandles`     | string[] | Shopify product handles to include                        |\n\n#### `userBehavior` sub-fields\n\nAll fields are optional booleans. Set to `true` to filter to only visitors who performed that action.\n\n| Field                  | Description                      |\n| ---------------------- | -------------------------------- |\n| `viewedProductPage`    | Visitor viewed a product page    |\n| `viewedCollectionPage` | Visitor viewed a collection page |\n| `addedToCart`          | Visitor added an item to cart    |\n| `viewedCheckout`       | Visitor reached checkout         |\n\nSee the Filters Reference section for the full list of available filter fields.\n\n### Response Structure\n\nThe response contains:\n\n| Field            | Type         | Description                                                                   |\n| ---------------- | ------------ | ----------------------------------------------------------------------------- |\n| `exportType`     | string       | The export type requested (`orders` or `order_line_items`)                    |\n| `experienceId`   | string       | UUID of the experience                                                        |\n| `experienceName` | string       | Display name of the experience                                                |\n| `url`            | string\\|null | Presigned S3 URL to download the CSV. Null if the export timed out.           |\n| `expiresIn`      | number       | Seconds until the URL expires (900 = 15 minutes). 0 if url is null.           |\n| `format`         | string       | Always `\"csv\"`                                                                |\n| `message`        | string       | Human-readable status (e.g. \"Export ready\", \"Export timed out, please retry\") |\n\n### Date Range Behavior\n\n- When `startTs` and `endTs` are omitted, the date range defaults to the experience's full lifetime (start date through end/pause date or now).\n- If the experience is **paused** or **ended**, the export is automatically truncated at the pause/end date.\n- 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.\n\n### Presigned URL\n\nThe 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.","parameters":[{"in":"path","name":"experienceId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"exportType":{"type":"string","enum":["orders","order_line_items","order_reconciliation"],"description":"Type of export data to retrieve. 'orders' returns order-level data, 'order_line_items' returns line-item-level data."},"startTs":{"description":"Optional analysis start timestamp as a 10-digit Unix epoch string in seconds. Defaults to the experience start date.","type":"string"},"endTs":{"description":"Optional analysis end timestamp as a 10-digit Unix epoch string in seconds. Defaults to now or the experience end date.","type":"string"},"filters":{"description":"Optional analytics filters object. Supports device, visitor, traffic source, country, product, and targeting filters.\n\nAnalytics filters object for narrowing experience/experiment result data.","type":"object","properties":{"deviceType":{"description":"Filter by device type. Options: 'any' (disables filter), 'mobile', 'desktop'. Omit or null to include all devices.","anyOf":[{"type":"string","enum":["any","mobile","desktop"]},{"type":"null"}]},"visitorType":{"description":"Filter by visitor type. Options: 'any' (disables filter), 'new', 'returning'. Omit or null to include all visitors.","anyOf":[{"type":"string","enum":["any","new","returning"]},{"type":"null"}]},"sourceSitesOrChannels":{"description":"Filter by traffic source channels. Array of channel names: 'Referral', 'All Social', 'Organic Social', 'Paid Social', 'Organic Search', 'Paid Search', 'Paid Shopping', 'Email', 'Google', 'Facebook', 'Instagram', 'Linktree', 'TikTok', 'Twitter', 'Direct', 'SMS', 'Meta', 'Link Tree', 'Wunderkind Text', 'Youtube', 'Other', 'any'. Omit or pass empty array for all channels.","type":"array","items":{"type":"string","enum":["Referral","All Social","Organic Social","Paid Social","Organic Search","Paid Search","Paid Shopping","Email","Google","Facebook","Instagram","Linktree","TikTok","Twitter","Direct","SMS","Other","Meta","Link Tree","Wunderkind Text","Youtube","any"]}},"landingPageFilters":{"description":"Filter by landing page URL path with multi-value support. Array of filter items, each with: filterType (match operator: 'equals', 'contains', 'startsWith', 'endsWith', 'doesNotEqual', 'doesNotContain', 'doesNotStartWith', 'doesNotEndWith', 'isNull', 'isNotNull') and values (array of strings to match against — omit for 'isNull'/'isNotNull'). Multiple values within a single item are OR'd. How items in the array are combined is controlled by landingPageFiltersOperator.","type":"array","items":{"type":"object","properties":{"values":{"type":"array","items":{"type":"string"}},"filterType":{"type":"string","enum":["equals","contains","startsWith","endsWith","doesNotEqual","doesNotContain","doesNotStartWith","doesNotEndWith","isNull","isNotNull"]}},"required":["filterType"]}},"landingPageFiltersOperator":{"description":"How multiple items in landingPageFilters are combined. 'or' (default) — session matches if any filter item matches. 'and' — session must match every filter item.","type":"string","enum":["or","and"]},"userBehavior":{"description":"Filter by visitor browsing behavior. Object with optional boolean flags: viewedCheckout, addedToCart, viewedProductPage, viewedCollectionPage. Set a flag to true to include only visitors who performed that action. Omit or null for flags you don't want to filter on. Multiple true flags are combined with AND logic.","type":"object","properties":{"viewedCheckout":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"addedToCart":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"viewedProductPage":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"viewedCollectionPage":{"anyOf":[{"type":"boolean"},{"type":"null"}]}}},"countryCodes":{"description":"Filter by ISO 3166-1 alpha-2 country codes (e.g. ['US', 'GB', 'CA']). Omit or pass empty array for all countries.","type":"array","items":{"type":"string"}},"landingPageTypes":{"description":"Filter sessions by landing page types. An array of values from: 'PDP', 'Collection', 'Content', 'Blog', 'Homepage', 'Search', 'Cart', 'Other'. Omit or null to include all landing page types.","type":"array","items":{"type":"string","enum":["PDP","Collection","Content","Blog","Homepage","Search","Cart","Other"]}},"experimentProductsOnly":{"description":"When true, only include products that are part of the experiment. Only applies when analyzing an experience/experiment.","anyOf":[{"type":"boolean"},{"type":"null"}]},"onlyProductIds":{"description":"Filter to only include specific Shopify product IDs (numeric strings).","anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"onlyProductHandles":{"description":"Filter to only include specific Shopify product handles.","anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]}}}},"required":["exportType"]}}}},"responses":{"200":{"description":"OK","headers":{"access-control-allow-origin":{"schema":{"type":"string"},"description":"CORS allow-origin header."},"access-control-allow-credentials":{"schema":{"type":"string"},"description":"CORS allow-credentials header."},"content-type":{"schema":{"type":"string"},"description":"Response content type."},"Timing-Allow-Origin":{"schema":{"type":"string"},"description":"Allowed origin for Timing headers."}},"content":{"application/json":{"schema":{"type":"object","properties":{"exportType":{"type":"string","enum":["orders","order_line_items","order_reconciliation"],"description":"The type of export that was generated."},"experienceId":{"type":"string","description":"The UUID of the experience."},"experienceName":{"type":"string","description":"The display name of the experience."},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Presigned S3 URL to download the CSV file. Valid for 15 minutes. Null if the export timed out or failed."},"expiresIn":{"type":"number","description":"Number of seconds until the presigned URL expires. 0 if url is null."},"format":{"type":"string","const":"csv","description":"The file format of the export (always 'csv')."},"message":{"type":"string","description":"Human-readable status message."}},"required":["exportType","experienceId","experienceName","url","expiresIn","format","message"],"additionalProperties":false}}}}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.intelligems.io/developer-resources/external-api/07-get-experience-export.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
