---
title: "Get Customer Journey Attribution Data"
method: POST
path: "/attribution/get-orders-with-journeys-v2"
tags: ["Data Out"]
---

# Get Customer Journey Attribution Data

`POST /attribution/get-orders-with-journeys-v2`

Export full customer journey data, with Triple Pixel attribution, for all customers who placed an order in the specified period.

## Request body

- object
  - `shop` string, required — The exact Shop URL (e.g., 'example.myshopify.com'). Must match the Shop URL value shown in [Settings → Store](https://app.triplewhale.com/store-settings/general). The API key owner must also have access to the shop, otherwise the request will return 403.
  - `startDate` string, required — The start date or timestamp for the requested data period. Must be in ISO 8601 format.
  - `endDate` string, required — The end date or timestamp for the requested data period. Must be in ISO 8601 format.
  - `page` number — The page number of results to return, starting from 1. Use this to paginate through the data.
  - `pageSize` number — The number of results per page. Must be between 1 and 100.
  - `excludeJourneyData` boolean — Set this to `true` to exclude journey data from the response.

## Response `200`

A successful response containing orders, attribution data,  and (optionally) journey events for the requested period.

- object
  - `totalForRange` number, required — The total number of orders within the requested date range.
  - `count` number, required — The number of orders returned in the current page of results.
  - `startDate` string, required — The start date or timestamp of the requested period in ISO 8601 format.
  - `endDate` string, required — The end date or timestamp of the requested period in ISO 8601 format.
  - `page` number — The page number of the current response. Starts at 1.
  - `ordersWithJourneys` object[], required — A list of orders along with their attribution and journey details.
    - `order_id` number, required — The unique identifier for the order.
    - `created_at` string, required — The timestamp when the order was created, in ISO 8601 format.
    - `order_name` string, required — The name of the order as defined in the e-commerce platform.
    - `attribution` object, required — Attribution details for the order.
      - `firstClick` object[] — A list of First Click attribution records, representing the initial interaction leading to the order.
        - `source` string, required — The source of the attribution (e.g., Facebook, Google).
        - `campaignId` string, required — The unique identifier of the campaign.
        - `adsetId` string, required — The unique identifier of the adset.
        - `adId` string, required — The unique identifier of the ad.
        - `clickDate` string, required — The timestamp of the click event.
    - `customer_id` number, required — The unique identifier for the customer associated with the order.
    - `total_price` string, required — The total price of the order.
    - `currency` string, required — The currency code for the order (e.g., USD, EUR).
    - `journey` object[], required — A list of events in the customer journey, such as page views or add-to-cart events, leading to the order.
      - `time` string, required — The timestamp of the journey event, in ISO 8601 format.
      - `event` 'page loaded' | 'add2c', required — The name of the journey event (e.g., `page loaded` for page views, `add2c` for add-to-cart actions).
      - `path` string, required — The URL path of the event (e.g., `/products/product-name`).
      - `productId` string, required — The unique identifier of the product associated with the event.
  - `earliestDate` string, required — The earliest date among the orders returned in this response. Returns `null` if there are no earlier orders.
  - `error` string — An error message if the request failed or encountered an issue.

## Other responses

- `429` — Too Many Requests

---

[API](https://skmtc.net/triplewhale/apis/triple-whale-api.md) · [All operations](https://skmtc.net/triplewhale/apis/triple-whale-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/triplewhale/triple-whale-api/versions/96b22ac9b5a7/schema)
