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.

Body Params
string
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.

string
required

The unique identifier for the subscription.

string
Defaults to custom_subscription_platform

The platform where the subscription was processed.

string
Defaults to custom_platform_account

The account ID associated with the platform. Can be used to segment parts of the data coming from different platform accounts, e.g. facebook_account_a vs. facebook_account_b.

date-time
required

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

date-time

The time the subscription was canceled, if applicable. 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).

date-time

The time the subscription ended (canceled or expired), if applicable. 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).

string

The reason for the subscription's cancellation.

string

Additional comments regarding the cancellation.

string
required

The currency of the subscription (e.g., 'USD').

customer
object
required

Details of the customer associated with the subscription.

subscription_items
array of objects
required
length ≥ 1

Details of the items included in the subscription. At least one is required.

subscription_items*
string
required

The unique identifier for the subscription item.

date-time
required

The date and time the subscription item 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).

date-time

The date and time the subscription item was canceled, if applicable. 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).

date-time

The date and time the subscription item ended, if applicable. 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).

string
enum
required

The current status of the subscription item.

Allowed:
string
enum
required

The billing interval for the subscription item.

Allowed:
integer
required

The number of intervals for each billing cycle.

string

The unique identifier for the product associated with this item.

float
required

The price of the subscription item.

integer
required

The quantity of the subscription item.

string

The unique identifier for the product variant, if applicable.

discount
object

Discounts applied to the subscription item.

string
required

The status of the subscription (e.g., active, canceled).

string

Additional metadata or notes related to the subscription.

date-time

The time at which the subscription record was last 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). Defaults to the current time.

Responses

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json