v1
latestOpenAPI 3.1.02026-08-04170116.0 KBData In
Create Subscription Record
Ingest subscription data into Triple Whale. This endpoint allows users to upload detailed subscription information, including customer details, items, status, and metadata.
post/data-in/subscriptions
Request body
Example request
{
"shop": "madisonbraids.myshopify.com",
"subscription_id": "sub-123",
"platform": "custom_subscription_platform",
"platform_account_id": "acct-456",
"created_at": "2022-06-15T19:26:30.000Z",
"canceled_at": "2024-12-01T10:00:00Z",
"ended_at": "2024-12-15T12:00:00Z",
"cancellation_reason": "Customer Request",
"cancellation_comments": "Dissatisfaction with service.",
"currency": "USD",
"customer": {
"id": "cust-789",
"email": "customer@example.com",
"phone": "+1234567890",
"first_name": "John",
"last_name": "Doe"
},
"subscription_items": [
{
"subscription_item_id": "sub-item-001",
"created_at": "2022-06-15T19:26:30.000Z",
"canceled_at": "2024-12-01T10:00:00Z",
"ended_at": "2024-12-15T12:00:00Z",
"status": "active",
"interval": "month",
"interval_count": 1,
"product_id": "prod-123",
"price": 19.99,
"quantity": 1,
"variant_id": "variant-123",
"discount": {
"amount_off": 5,
"percent_off": 10
}
}
],
"status": "active",
"metadata": "Preferred customer",
"updated_at": "2024-11-29T10:00:00Z"
}Response
Subscription record successfully received.
Example response
{
"success": true,
"message": "Subscription received"
}