v1

latestOpenAPI 3.1.02026-08-04170116.0 KB
Data In

Create Customer Record

Ingest customer data into Triple Whale. This endpoint allows users to upload detailed customer information — including contact details, address, consent status, and purchase history metadata.

post/data-in/customers

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.

customer_idstring required

The unique identifier for the customer.

platformstring

The platform associated with the customer record (e.g. shopify, magento, woocommerce, klaviyo).

platform_account_idstring

The account ID associated with the platform.

address1string

The first line of the customer's default address.

address2string

The second line of the customer's default address.

amount_spentnumber

The total amount spent by the customer.

citystring

The city of the customer's default address.

countrystring

The country of the customer's default address.

country_codestring

The country code of the customer’s default address, according to ISO 3166-1 alpha-2.

created_atstring date-time

The time at which the customer 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.

customer_tagsstring[]

Tags associated with the customer, set in the main sales platform.

display_namestring

The display name of the customer.

email_addressstring

The primary email address associated with the customer’s account.

email_marketing_consent_collected_fromstring

The source from which the customer's email marketing consent was collected.

email_marketing_consent_opt_in_levelstring

The level of consent provided by the customer for email marketing.

email_marketing_consent_statusstring

The current status of the customer's email marketing consent.

email_marketing_consent_updated_atstring date-time

The time at which the email marketing consent was updated. 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).

first_namestring

The customer's first name.

last_namestring

The customer's last name.

last_order_idstring

The ID of the most recent order from the customer.

latitudenumber

The latitude associated with the customer's location.

localestring

The locale setting associated with the customer's account.

longitudenumber

The longitude associated with the customer's location.

notestring

Any note attached to the customer profile.

ordersinteger

The total number of orders placed by the customer.

phonestring

The customer's phone number.

product_subscriber_statusstring

The customer's subscription status for products.

sms_marketing_consent_collected_fromstring

The source from which the customer's SMS marketing consent was collected.

sms_marketing_consent_opt_in_levelstring

The level of consent provided by the customer for SMS marketing.

sms_marketing_consent_updated_atstring date-time

The time at which the sms marketing consent was updated. 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).

statestring

The state or province of the customer's default address.

state_codestring

The state or province code of the customer's default address.

statusstring

The current status of the customer in the system.

tax_exemptboolean

Indicates whether the customer is exempt from tax.

zipstring

The zip or postal code of the customer's defaults address.

Example request

{
  "shop": "madisonbraids.myshopify.com",
  "customer_id": "5209503793328",
  "platform": "magento",
  "platform_account_id": "shop_account_123",
  "address1": "764 Example Dr",
  "address2": "Apt 603",
  "amount_spent": 1250.75,
  "city": "San Francisco",
  "country": "United States",
  "country_code": "US",
  "created_at": "2022-06-15T19:26:30.000Z",
  "customer_tags": [
    "Active Subscriber",
    "PayPal_user",
    "Login with FB"
  ],
  "display_name": "John Doe",
  "email_address": "customer@example.com",
  "email_marketing_consent_collected_from": "website_signup",
  "email_marketing_consent_opt_in_level": "SINGLE_OPT_IN",
  "email_marketing_consent_status": "SUBSCRIBED",
  "email_marketing_consent_updated_at": "2019-05-22 21:01:29",
  "first_name": "John",
  "last_name": "Doe",
  "last_order_id": "4930225799243",
  "latitude": 34.1413713,
  "locale": "en-US",
  "longitude": -118.8639169,
  "note": "VIP customer",
  "orders": 15,
  "phone": "18005550199",
  "product_subscriber_status": "ACTIVE",
  "sms_marketing_consent_collected_from": "checkout",
  "sms_marketing_consent_opt_in_level": "CONFIRMED_OPT_IN",
  "sms_marketing_consent_updated_at": "2019-05-22 21:01:29",
  "state": "Oregon",
  "state_code": "OR",
  "status": "ENABLED",
  "zip": "48104"
}

Response

Customer record successfully received.

successboolean
messagestring

Example response

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