Skip to main content
GET
Get subscription contract analytics and revenue metrics

Headers

X-API-Key
string

Path Parameters

contractId
string
required

The subscription contract's numeric ID, without the gid://shopify/SubscriptionContract/ prefix.

Query Parameters

api_key
string

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

Response

Successfully retrieved contract analytics

totalOrderAmount
number<double> | null

Sum of the counted orders' amounts, in the shop's currency. Null when no counted order has an amount.

Example:

16.2

totalOrderCount
integer<int64>

The contract's first order, when the contract has an order ID, plus each billing attempt with the status SUCCESS and an order amount.

Example:

1

totalOrderRevenue
string

totalOrderAmount in the shop's money format, for display. Use totalOrderAmount for calculations.

Example:

"$16.20"