Skip to main content
GET
Get detailed subscription information for a customer

Headers

X-API-Key
string

Path Parameters

customerId
integer<int64>
required

Customer Id

Query Parameters

api_key
string

API Key (Deprecated - Use Header X-API-Key instead)

Response

Successfully retrieved customer subscription details. Returns array of subscription objects (may be empty).

shop
string
required
activatedOn
string<date-time>
allowDeliveryAddressOverride
boolean
allowDeliveryPriceOverride
boolean
autoCharge
boolean
billingCountryCode
string
billingDateAfterTrial
string<date-time>
billingPolicyInterval
string
billingPolicyIntervalCount
integer<int32>
cancellationFeedback
string
cancellationNote
string
cancelledOn
string<date-time>

When the contract was cancelled. The value stays if the contract is reactivated later, so read status to know whether a contract is cancelled.

contractAmount
number<double>

What the contract bills per renewal now, in currencyCode: the sum of its lines' discountedPrice in contractDetailsJSON (each line's price times quantity, after discounts). Shipping and tax are not included. On a prepaid contract, one renewal pays for every delivery until the next renewal. Appstle recalculates it when the contract is updated, so changes to lines, quantities and prices show up here. It is a floating-point number and can read like 84.60000000000001: round it to the currency's decimals before you show or compare it. For the checkout order, see orderAmount.

contractAmountUSD
number<double>

contractAmount converted to US dollars.

contractDetailsJSON
string

The contract's lines as a JSON string, not an array: parse it before you read it. Each line has productId, variantId, title, variantTitle, sku, quantity, lineId, sellingPlanId and sellingPlanName (empty strings when the line has no selling plan), discountAllocations (the IDs of the discounts on the line), and three prices sent as strings: currentPrice (one unit, per renewal, after the plan's discount; on a prepaid contract it covers every delivery the renewal pays for), discountedPrice (the line total: currentPrice times quantity, after manual and code discounts) and basePrice (one unit before the plan's discount, from pricingPolicy; on a line without pricingPolicy, currentPrice divided by the number of deliveries per renewal). A line can also have pricingPolicy (the plan's discount by cycle) and customAttributes.

createdAt
string<date-time>
currencyCode
string

The three-letter code of the contract's currency. contractAmount and the prices in contractDetailsJSON are in this currency. orderAmount is in the store's currency.

customerEmail
string
customerFirstName
string
customerId
integer<int64>
customerLastName
string
customerName
string
customerTag
string
deletedVariantIds
string
deliveryCountryCode
string
deliveryPolicyInterval
string
deliveryPolicyIntervalCount
integer<int32>
disableFixEmptyQueue
boolean
emailBouncedOrFailed
boolean
endsAt
string<date-time>
graphCustomerId
string
graphOrderId
string
graphSubscriptionContractId
string
id
integer<int64>
importedId
string
lastSuccessfulOrder
string
lifetimeValue
number<double>
lifetimeValueUSD
number<double>
maxCycles
integer<int32>
minCycles
integer<int32>
nextBillingDate
string<date-time>

The date of the contract's next renewal, in ISO 8601 (UTC). A paused or cancelled contract keeps a date here but isn't charged on it, so read it with status. For the next renewal that charges the customer, see nextPaidBillingDate.

nextPaidBillingDate
string<date-time>
orderAmount
number<double>

This subscription's share of the order the customer placed at checkout: its lines' prices after discounts, times quantity, plus their tax when the store's prices don't include tax. Shipping and the order's other items are not included, so each subscription created by one order has its own orderAmount. It is in the store's currency, which can differ from currencyCode, and it is null when the contract has no checkout order (orderName is UNKNOWN). For what the contract bills per renewal now, use contractAmount.

orderAmountContractCurrency
number<double>
orderAmountShopCurrency
number<double>
orderAmountUSD
number<double>
orderId
integer<int64>
orderName
string
orderNote
string
orderNoteAttributes
string
originType
enum<string>
Available options:
STORE_FRONT,
IMPORTED,
SPLIT_ATTEMPT_BILLING,
SPLIT_CONTRACT
originalContractId
integer<int64>
pauseDurationCycle
integer<int32>
pauseFeedback
string
pauseReason
string
pauseTillDate
string<date-time>
pausedFromActive
boolean
pausedOn
string<date-time>
pendingCancellationCycle
integer<int32>
pendingCancellationDate
string<date-time>
phone
string
queueUpdatedAt
string<date-time>
skipPaymentCreateUnpaidOrder
boolean
startsAt
string<date-time>
status
string

The contract's status, in lowercase: active, paused or cancelled. A contract can also be expired or failed, for example one imported with a failed status.

stopUpComingOrderEmail
boolean
subscriptionContractId
integer<int64>
subscriptionCreatedEmailSent
boolean
subscriptionCreatedEmailSentStatus
enum<string>
Available options:
SENT,
UNSENT,
FAILED,
EMAIL_SETTINGS_DISABLED,
CUSTOMER_PAYMENT_EMPTY,
CONTRACT_PAUSED_STATUS
subscriptionCreatedSmsSentStatus
enum<string>
Available options:
SENT,
UNSENT,
FAILED,
SMS_SETTINGS_DISABLED,
CUSTOMER_PAYMENT_EMPTY,
CONTRACT_PAUSED_STATUS,
PHONE_NUMBER_EMPTY
subscriptionType
enum<string>
Available options:
REGULAR_SUBSCRIPTION,
BUILD_A_BOX_CLASSIC,
BUILD_A_BOX_SINGLE_PRODUCT,
BUNDLING_CLASSIC,
BUNDLING_MIX_AND_MATCH,
SECTIONED_BUNDLE,
VOLUME_DISCOUNT
subscriptionTypeIdentifier
string
totalSuccessfulOrders
integer<int32>
upcomingEmailBufferDays
integer<int32>
upcomingEmailTaskUrl
string
updatedAt
string<date-time>
updatingQueue
boolean