---
title: "Export customer sessions"
method: GET
path: "/v1/applications/{applicationId}/export_customer_sessions"
tags: ["Analytics"]
---

# Export customer sessions

`GET /v1/applications/{applicationId}/export_customer_sessions`

## Request

- Base URL: `https://yourbaseurl.talon.one`
- URL: `https://yourbaseurl.talon.one/v1/applications/{applicationId}/export_customer_sessions`
- Auth: one of:
  - API key in header `Authorization`
  - API key in header `Authorization`
- TypeScript: <https://skmtc.dev/talon/apis/management-api/docs/v1/applications/:applicationId/export_customer_sessions/get.ts> (a function with typed inputs; its response is checked against the schema)

> [!note] Management API endpoints are **not** meant to be used in real-time integrations that directly serve your end users. Rate limit: 3 requests per second.

Download a CSV file containing the customer sessions that match the request.

> [!important] Archived sessions cannot be exported. See the [retention
> policy](https://docs.talon.one/docs/dev/server-infrastructure-and-data-retention).

> [!tip] If the exported CSV file is too large to view, you can
> [split it into multiple files](https://www.google.com/search?q=split+CSV+into+multiple+files).

- `id`: The internal ID of the session.
- `firstsession`: Whether this is a first session.
- `integrationid`: The integration ID of the session.
- `applicationid`: The ID of the Application.
- `profileid`: The internal ID of the customer profile.
- `profileintegrationid`: The integration ID of the customer profile.
- `created`: The timestamp when the session was created.
- `state`: The [state](https://docs.talon.one/docs/dev/concepts/entities/customer-sessions#customer-session-states)
   of the session.
- `cartitems`: The cart items in the session.
- `discounts`: The discounts in the session.
- `total`: The total value of cart items and additional costs in the session, before any discounts are applied.
- `attributes`: The attributes set in the session.
- `closedat`: Timestamp when the session was closed.
- `cancelledat`: Timestamp when the session was cancelled.
- `referral`: The referral code in the session.
- `identifiers`: The identifiers in the session.
- `additional_costs`: The [additional costs](https://docs.talon.one/docs/product/account/dev-tools/managing-additional-costs)
   in the session.
- `updated`: Timestamp of the last session update.
- `store_integration_id`: The integration ID of the store.
- `loyaltycards`: The identifier of the loyalty card used in the session. A session can have only one loyalty card.
- `updatecount`: The number of times the session was updated. When the session is created, this value is initialized to `1`.
- `coupons`: Coupon codes in the session.
- `rewards`: The integration IDs of the unlocked rewards that can be used in the session.

## Path parameters

- `applicationId` integer, required

## Query parameters

- `createdBefore` string, date-time
- `createdAfter` string, date-time
- `updatedBefore` string, date-time
- `updatedAfter` string, date-time
- `profileIntegrationId` string
- `dateFormat` 'excel' | 'ISO8601'
- `customerSessionState` 'open' | 'closed' | 'partially_returned' | 'cancelled'

## Response `200`

OK

---

[API](https://skmtc.dev/talon/apis/management-api.md) - [All operations](https://skmtc.dev/talon/apis/management-api/llms.txt) - [OpenAPI document](https://skmtc.dev/talon/apis/management-api/revisions/7ef1b9504c3a?raw)
