v1

latestOpenAPI 3.1.02026-08-04170116.0 KB
Data In

Create Post-Purchase Survey (PPS) Record

Ingest PPS data into Triple Whale. This endpoint allows users to upload detailed post-purchase survey information, including order-related data, questions, and responses.

post/data-in/pps

Request body

shopstring required

The exact Shop URL (e.g., 'example.myshopify.com'). Must match the Shop URL value shown in Settings → Store. The API key owner must also have access to the shop, otherwise the request will return 403.

platformstring

The platform where the post-purchase survey originated.

platform_account_idstring

The account ID associated with the platform.

order_idstring required

The unique identifier for the order associated with the PPS.

created_atstring date-time

The time at which the post-purchase survey record was created. Must be provided in ISO 8601 format, with explicit timezone information (Z or +/-HH:mm offset). Offsets are supported (e.g., 2024-11-29T12:00:00+02:00). Defaults to the current time.

total_pricenumber

The total price of the order associated with the PPS. Must be non-negative.

question_idstring

Unique ID for the survey question. If omitted, the data will still be used for attribution (when include_in_attribution = true), but won’t appear in the PPS table, SQL, or Moby.

question_textstring

The text of the survey question. Maps to question in the Post-Purchase Survey table.

response_idstring

Unique ID for the survey response.

responsestring

The customer’s response to the survey question. Maps to answer in the Post-Purchase Survey table.

include_in_attributionboolean

Set to true to include this survey response in the Total Impact and Triple Attribution models. If omitted, Triple Whale will determine whether the question is attribution-related based on the question_text.

sourcestring

The marketing or referral channel that appears in Attribution. If omitted, Triple Whale infers the source from the response text. You may provide any string value, but using a Standardized PPS Source ID (e.g. facebook-ads) ensures offline events are grouped with existing channels rather than appearing as a separate custom source.

Example request

{
  "shop": "madisonbraids.myshopify.com",
  "platform": "custom_pps_platform",
  "platform_account_id": "platform_account_123",
  "order_id": "order-123",
  "created_at": "2022-06-15T19:26:30.000Z",
  "total_price": 150.75,
  "question_id": "question-001",
  "question_text": "How did you hear about us?",
  "response_id": "response-001",
  "response": "Recommended by a friend",
  "include_in_attribution": true,
  "source": "facebook-ads"
}

Response

PPS record successfully received.

successboolean
messagestring

Example response

{
  "success": true,
  "message": "pps received"
}