Overview
The Analytics API provides account and subscription analytics information.
NOTE: Using the ClickBank Analytics API may require a rudimentary understanding of computer programming. If you do not feel equipped to proceed, we encourage you to seek assistance from someone who has computer programming experience. All ClickBank Analytics API users must abide by the ClickBank API Contract.
Related: How to Use ClickBank APIs
The following subjects are covered in this article:
Analytics API Usage & Updates
- As of December 2022, the Subscription Reporting API has been updated. Updates include deprecated fields, new fields, and improved calculations.
Related: Subscription Reporting API Updates - As of January 2020, it was discovered that the Analytics API starDate and endDate ranges are returned in UTC time format while the data in our databases exists in Pacific Standard Time (PST). This creates a discrepancy of 7 or 8 hours, depending on daylight savings time. Additionally, the Customer Country (CUSTOMER_COUNTRY) filter does not function as expected. Use at your own discretion.
- As of May 2020, it was discovered that the VTID field returns in all lowercase. This may impact your operations if you are in a case-sensitive scenario.
URL
https://api.clickbank.com/rest/1.3/analytics
Methods
This section provides details about the methods available within the Analytics API, including required keys and roles, output types, and supported and required parameters.
The following methods are covered in this section. Click the link to navigate to a specific method.
- GET /1.3/analytics/status (1)
Returns the status and last update time of the API. - GET /1.3/analytics/schema/AnalyticsResult (2)
Returns the XML schema for analytics results. - GET /1.3/analytics/schema/AnalyticsStatus (3)
Returns the XML schema for analytics status results. - GET /1.3/analytics/schema/SubscriptionDetailResult (4)
Returns the XML schema for subscription results. - GET /1.3/analytics/schema/SubscriptionTrendsData (5)
Returns the XML schema for subscription trends results. - GET /1.3/analytics/schema/SubscriptionDetailResultRow (6)
Returns the XML schema for individual subscription results. - GET /1.3/analytics/{role}/{dimension} (7)
Returns statistical data for the given role and dimension. - GET /1.3/analytics/{role}/{dimension}/summary (8)
Returns a summary of statistical data for the given role and dimension. - GET /1.3/analytics/{role}/subscription/details (9)
Returns subscription details for the given role. - GET /1.3/analytics/{role}/subscription/details/canceldate (10)
Returns a list of subscriptions which were canceled within the specified date range. - GET /1.3/analytics/{role}/subscription/details/cancelsixty (11)
Returns a list of subscriptions that have been canceled in the last sixty days. - GET /1.3/analytics/{role}/subscription/details/cancelthirty (12)
Returns a list of subscriptions that have been canceled in the last thirty days. - GET /1.3/analytics/{role}/subscription/details/compsixty (13)
Returns a list of subscriptions that will complete in the next sixty days. - GET /1.3/analytics/{role}/subscription/details/compthirty (14)
Returns a list of subscriptions that will complete in the next thirty days. - GET /1.3/analytics/{role}/subscription/details/nextpmtdate (15)
Returns a list of subscriptions for which the next payment date is within the specified date range. - GET /1.3/analytics/{role}/subscription/details/startdate (16)
Returns a list of subscriptions for which the start date is within the specified date range. - GET /1.3/analytics/{role}/subscription/details/status (17)
Returns subscription status data for the given role. - GET /1.3/analytics/{role}/subscription/trends (18)
Returns statistical summations of subscription data for a specified date range.
GET /1.3/analytics/status (1)
This method returns the status and last update time of the API.
The possible statuses are:
- GREEN, which indicates normal operation.
- YELLOW, which indicates delayed delivery.
-
RED, which indicates severely delayed data or critical problems.
The required keys and roles are:
-
Developer Key
-
Clerk Key (Analytics Role)
Related: How to Generate API Keys
The return type is Analytics Status.
The supported output types are:
-
application/xml
- application/json
- text/csv
GET /1.3/analytics/schema/AnalyticsResult (2)
This method returns the XML Schema for analytics results.
There are not any required keys or rules for this method.
The return type is XML Schema for Analytics Result and the only support output type is application/xml.
GET /1.3/analytics/schema/AnalyticsStatus (3)
This method returns the XML Schema for analytics status results.
There are not any required keys or rules for this method.
The return type is XML Schema for Analytics Status and the only support output type is application/xml.
GET /1.3/analytics/schema/SubscriptionDetailResult (4)
This method returns the XML Schema for subscription results.
NOTE: This method was updated as of December 13, 2022. For more information visit the status update article.
There are not any required keys or rules for this method.
The return type is XML Schema for Subscription Detail Result and the only support output type is application/xml.
GET /1.3/analytics/schema/SubscriptionTrendsData (5)
This method returns the XML Schema for subscription trends results.
NOTE: This method was updated as of December 13, 2022. For more information visit the status update article.
There are not any required keys or rules for this method.
The return type is XML Schema for Subscription Trends Data and the only supported output type is application/xml.
GET /1.3/analytics/schema/SubscriptionDetailResultRow (6)
This method returns the XML Schema for Individual Subscription Results.
NOTE: This method was updated as of December 13, 2022. For more information visit the status update article.
There are not any required keys or roles for this method.
The return type is XML Schema for Subscription Trends Data and the only supported output type is application/xml.
GET /1.3/analytics/{role}/{dimension} (7)
This method returns statistical data for a given role and dimension.
Valid roles include:
- AFFILIATE
- VENDOR
Dimensions include:
- AFFILIATE
- VENDOR_CATEGORY
- CUSTOMER_CURRENCY
- CUSTOMER_COUNTRY
- CUSTOMER_PROVINCE
- CUSTOMER_LANGUAGE
- PRODUCT_SKU
NOTE: This dimension can only be used with the vendor role. - TRACKING_ID
- VENDOR
- VENDOR_PRODUCT_SKU
NOTE: This dimension can only be used with the affiliate role.
The required keys and roles are:
- Developer Key
- Clerk Key (Analytics Role)
Related: How to Generate API Keys
The return type is Analytics Result.
The supported output types are:
- application/xml
- application/json
Head Parameters
Name | Required | Description |
---|---|---|
page | No |
Return the specified page of results. The default is page 1. |
Request Parameters
Name | Required | Description |
---|---|---|
account | Yes |
Return results from the specified account nickname. |
dimensionFilter | No |
Limits the results returned to ones with a matching dimension ID. This value is case sensitive. |
endDate | No |
Return results ending with the specified date. The date range is inclusive. The date format is yyyy-mm-dd. The default value is the current day. Refunds are included or excluded based on the date of the initial purchase transaction. |
orderBy | No |
Order the results by the specified data field. The valid values are:
|
select | No |
Return the specified data fields. You can pass multiple select parameters to select multiple values. If this parameter is absent, all values are returned. The valid values are:
|
sortAscending | No |
If you are using the orderBy parameter, you can specify this parameter with a value of true to sort ascending instead of descending. |
startDate | No |
Return results beginning with the specified date. The date range is inclusive. The date format is yyyy-mm-dd. The default value is the previous day. Refunds are included or excluded based on the date of the initial purchase transaction. |
GET /1.3/analytics/{role}/{dimension}/summary (8)
This method returns summary statistical data for a given role and dimension.
Valid roles include:
- AFFILIATE
- VENDOR
Dimensions include:
- AFFILIATE
- VENDOR_CATEGORY
- CUSTOMER_CURRENCY
- CUSTOMER_COUNTRY
- CUSTOMER_PROVINCE
- CUSTOMER_LANGUAGE
- PRODUCT_SKU
NOTE: This dimension can only be used with the vendor role. - TRACKING_ID
- VENDOR
- VENDOR_PRODUCT_SKU
NOTE: This dimension can only be used with the affiliate role.
The required keys and roles are:
- Developer Key
- Clerk Key (Analytics Role)
Related: How to Generate API Keys
The return type is Analytics Result.
The supported output types are:
- application/xml
- application/json
Head Parameters
Name | Required | Description |
---|---|---|
page | No |
Return the specified page of results. The default is page 1. |
Request Parameters
Name | Required | Description |
---|---|---|
account | Yes |
Return results from the specified account nickname. |
summaryType | Yes |
This parameter specifies which type of summary data is desired. The valid values are:
|
dimensionFilter | No |
This parameter limits the results returned to ones with a matching dimension id. This value is case sensitive. |
endDate | No |
Return results ending with the specified date. The date range is inclusive. The date format is yyyy-mm-dd. The default value is the current day. Refunds are included or excluded based on the date of the initial purchase transaction. |
orderBy | No |
Order the results by the specified data field. The valid values are:
|
select | No |
Return the specified data fields. You can pass multiple select parameters to select multiple values. If this parameter is absent, all values are returned. The valid values are:
|
sortAscending | No |
If you are using the orderBy parameter, you can specify this parameter with a value of true to sort ascending instead of descending. |
startDate | No |
Return results beginning with the specified date. The date range is inclusive. The date format is yyyy-mm-dd. The default value is the previous day. Refunds are included or excluded based on the date of the initial purchase transaction. |
GET /1.3/analytics/{role}/subscription/details (9)
This method returns subscription data for a given role.
NOTE: This method was updated as of December 13, 2022. For more information visit the status update article.
Valid roles include:
- VENDOR
NOTE: As of December 13, 2022, the GET /1.3/analytics/{role}/subscription/details endpoints are available for the subscription product owner only (aka seller/vendor). API requests using the affiliate role will return an empty Affiliate support for reporting subscription products earnings and events is provided by the sales analytics tool in the Clickbank dashboard, and/ or through the analytics API referencing rebill sale events and rebill earnings. If certain subscription data was applicable and valuable for you that’s no longer accessible, please share with our product team your needs for this data by emailing productfeedback@clickbank.com.
The required keys and roles are:
- Developer Key
- Clerk Key (Analytics Role)
Related: How to Generate API Keys
The return type is Subscription Detail Result.
The supported output types are:
- application/xml
- application/json
Head Parameters
Name | Required | Description |
---|---|---|
page | No |
Return the specified page of results. The default is page 1. |
Request Parameters
Name | Required | Description |
---|---|---|
account | Yes |
Return results from the specified account nickname. |
orderBy | No |
Order the results by the specified data field. The valid values are:
|
sortDirection | No |
Specify the order in which the sorted results are returned. The valid values are:
|
GET /1.3/analytics/{role}/subscription/details/canceldate (10)
This method returns a list of subscriptions where the subscription canceled date is within the specified date range.
NOTE: This method was updated as of December 13, 2022. For more information visit the status update article.
The required keys and roles are:
- Developer Key
- Clerk Key (Analytics Role)
Related: How to Generate API Keys
The return type is Subscription Detail Result.
The supported output types are:
- application/xml
- application/json
Head Parameters
Name | Required | Description |
---|---|---|
page | No |
Return the specified page of results. The default is page 1. |
Request Parameters
Name | Required | Description |
---|---|---|
account | Yes |
Return results from the specified account nickname. |
endDate | Yes |
Return results ending with the specified date. The date range is inclusive. The date format is yyyy-mm-dd. |
startDate | Yes |
Return results beginning with the specified date. The date range is inclusive. The date format is yyyy-mm-dd. |
orderBy | No |
Order the results by the specified data field. The valid values are:
|
sortDirection | No |
Specify the order in which the sorted results are returned. The valid values are:
|
GET /1.3/analytics/{role}/subscription/details/cancelsixty (11)
This method returns a list of subscriptions canceled in the last 60 days.
NOTE: This method was updated as of December 13, 2022. For more information visit the status update article.
The required keys and roles are:
- Developer Key
- Clerk Key (Analytics Role)
The return type is Subscription Detail Result.
The supported output types are:
- application/xml
- application/json
Head Parameters
Name | Required | Description |
---|---|---|
page | No |
Return the specified page of results. The default is page 1. |
Request Parameters
Name | Required | Description |
---|---|---|
account | Yes |
Return results from the specified account nickname. |
orderBy | No |
Order the results by the specified data field. The valid values are:
|
sortDirection | No |
Specify the order in which the sorted results are returned. The valid values are:
|
GET /1.3/analytics/{role}/subscription/details/cancelthirty (12)
This method returns a list of subscriptions canceled in the last 30 days.
NOTE: This method was updated as of December 13, 2022. For more information visit the status update article.
The required keys and roles are:
- Developer Key
- Clerk Key (Analytics Role)
Related: How to Generate API Keys
The return type is Subscription Detail Result.
The supported output types are:
- application/xml
- application/json
Head Parameters
Name | Required | Description |
---|---|---|
page | No |
Return the specified page of results. The default is page 1. |
Request Parameters
Name | Required | Description |
---|---|---|
account | Yes |
Return results from the specified account nickname. |
orderBy | No |
Order the results by the specified data field. The valid values are:
|
sortDirection | No |
Specify the order in which the sorted results are returned. The valid values are:
|
GET /1.3/analytics/{role}/subscription/details/compsixty (13)
This method returns a list of subscriptions that will complete in the next 60 days. Subscriptions that have a known number of payments (like a payment plan, for example) have a set number of rebills to completion. When the rebills cease, the subscription receives a complete status and no more rebills will occur.
NOTE: This method was updated as of December 13, 2022. For more information visit the status update article.
The required keys and roles are:
- Developer Key
- Clerk Key (Analytics Role)
Related: How to Generate API Keys
The return type is Subscription Detail Result.
The supported output types are:
- application/xml
- application/json
Head Parameters
Name | Required | Description |
---|---|---|
page | No |
Return the specified page of results. The default is page 1. |
Request Parameters
Name | Required | Description |
---|---|---|
account | Yes |
Return results from the specified account nickname. |
orderBy | No |
Order the results by the specified data field. The valid values are:
|
sortDirection | No |
Specify the order in which the sorted results are returned. The valid values are:
|
GET /1.3/analytics/{role}/subscription/details/compthirty (14)
This method returns a list of subscriptions that will complete within the next thirty days. Subscriptions that have a known number of payments (like a payment plan, for example) have a set number of rebills to completion. When the rebills cease, the subscription receives a complete status and no more rebills will occur.
NOTE: This method was updated as of December 13, 2022. For more information visit the status update article.
The required keys and roles are:
- Developer Key
- Clerk Key (Analytics Role)
Related: How to Generate API Keys
The return type is Subscription Detail Result.
The supported output types are:
- application/xml
- application/json
Head Parameters
Name | Required | Description |
---|---|---|
page | No |
Return the specified page of results. The default is page 1. |
Request Parameters
Name | Required | Description |
---|---|---|
account | Yes |
Return results from the specified account nickname. |
orderBy | No |
Order the results by the specified data field. The valid values are:
|
sortDirection | No |
Specify the order in which the sorted results are returned. The valid values are:
|
GET /1.3/analytics/{role}/subscription/details/nextpmtdate (15)
This method returns a list of subscriptions where the next payment date is within the specified timeframe.
NOTE: This method was updated as of December 13, 2022. For more information visit the status update article.
The required keys and roles are:
- Developer Key
- Clerk Key (Analytics Role)
Related: How to Generate API Keys
The return type is Subscription Detail Result.
The supported output types are:
- application/xml
- application/json
Head Parameters
Name | Required | Description |
---|---|---|
page | No |
Return the specified page of results. The default is page 1. |
Request Parameters
Name | Required | Description |
---|---|---|
account | Yes |
Return results from the specified account nickname. |
endDate | Yes |
Return results ending with the specified date. The date range is inclusive. The date format is yyyy-mm-dd. |
startDate | Yes |
Return results beginning with the specified date. The date range is inclusive. The date format is yyyy-mm-dd. |
orderBy | No |
Order the results by the specified data field. The valid values are:
|
sortDirection | No |
Specify the order in which the sorted results are returned. The valid values are:
|
GET /1.3/analytics/{role}/subscription/details/startdate (16)
This method returns a list of subscriptions where the subscription start date is within the specified timeframe.
NOTE: This method was updated as of December 13, 2022. For more information visit the status update article.
The required keys and roles are:
- Developer Key
- Clerk Key (Analytics Role)
Related: How to Generate API Keys
The return type is Subscription Detail Result.
The supported output types are:
- application/xml
- application/json
Head Parameters
Name | Required | Description |
---|---|---|
page | No |
Return the specified page of results. The default is page 1. |
Request Parameters
Name | Required | Description |
---|---|---|
account | Yes |
Return results from the specified account nickname. |
endDate | Yes |
Return results ending with the specified date. The date range is inclusive. The date format is yyyy-mm-dd. |
startDate | Yes |
Return results beginning with the specified date. The date range is inclusive. The date format is yyyy-mm-dd. |
orderBy | No |
Order the results by the specified data field. The valid values are:
|
sortDirection | No |
Specify the order in which the sorted results are returned. The valid values are:
|
GET /1.3/analytics/{role}/subscription/details/status (17)
This method returns subscription status data for a given role.
NOTE: This method was updated as of December 13, 2022. For more information visit the status update article.
Valid roles include:
- VENDOR
NOTE: As of December 13, 2022, the GET /1.3/analytics/{role}/subscription/status endpoints are available for the subscription product owner only (aka seller/vendor). API requests using the affiliate role will return an empty Affiliate support for reporting subscription products earnings and events is provided by the sales analytics tool in the Clickbank dashboard, and/ or through the analytics API referencing rebill sale events and rebill earnings. If certain subscription data was applicable and valuable for you that’s no longer accessible, please share with our product team your needs for this data by emailing productfeedback@clickbank.com
The required keys and roles are:
- Developer Key
- Clerk Key (Analytics Role)
Related: How to Generate API Keys
The return type is Subscription Detail Result.
The supported output types are:
- application/xml
- application/json
Head Parameters
Name | Required | Description |
---|---|---|
page | No |
Return the specified page of results. The default is page 1. |
Request Parameters
Name | Required | Description |
---|---|---|
account | Yes |
Return results from the specified account nickname. |
status | Yes |
The subscription status. Valid values include:
|
orderBy | No |
Order the results by the specified data field. The valid values are:
|
sortDirection | No |
Specify the order in which the sorted results are returned. The valid values are:
|
GET /1.3/analytics/{role}/subscription/trends (18)
This method returns statistical summations of data for subscriptions over a specified time frame.
NOTE: This method was updated as of December 13, 2022. For more information visit the status update article.
Valid roles include:
- VENDOR
NOTE: As of December 13, 2022, the GET /1.3/analytics/{role}/subscription/details endpoints are available for the subscription product owner only (aka seller/vendor). API requests using the affiliate role will return an empty Affiliate support for reporting subscription products earnings and events is provided by the sales analytics tool in the Clickbank dashboard, and/ or through the analytics API referencing rebill sale events and rebill earnings. If certain subscription data was applicable and valuable for you that’s no longer accessible, please share with our product team your needs for this data by emailing productfeedback@clickbank.com.
The required keys and roles are:
- Developer Key
- Clerk Key (Analytics Role)
Related: How to Generate API Keys
The return type is Subscription Trends Data.
The supported output types are:
- application/xml
- application/json
Head Parameters
Name | Required | Description |
---|---|---|
page | No |
Return the specified page of results. The default is page 1. |
Request Parameters
Name | Required | Description |
---|---|---|
account | Yes |
Return results from the specified account nickname. |
endDate | Yes |
Return results ending with the specified date. The date range is inclusive. The date format is yyyy-mm-dd. |
startDate | Yes |
Return results beginning with the specified date. The date range is inclusive. The date format is yyyy-mm-dd. |
groupBy | No |
You can group the results by business date by passing DATE as the value. |
productId | No |
Return results on the specified Product ID. You can include multiple parameter/value pairs to return results on multiple Product IDs. |
Return Types
The following return types are used:
- Analytics Result
- Analytics Status
- Subscription Detail Result
- Subscription Detail Result Row
- Subscription Trends Data
Analytics Result
Analytics Result returns use the following format:
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:cb="http://www.clickbank.com/api" version="1.0">
<xs:element name="analyticsResult" type="analyticsResult"/>
<xs:complexType name="analyticsResult">
<xs:sequence>
<xs:element name="rows" type="rows" minOccurs="0"/>
<xs:element name="totals" type="totals" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="rows">
<xs:sequence>
<xs:element name="row" type="analyticsResultRow" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="analyticsResultRow">
<xs:sequence>
<xs:element name="dimensionIdentifier" type="xs:string" minOccurs="0"/>
<xs:element name="dimensionValue" type="xs:string" minOccurs="0"/>
<xs:element name="accountNickName" type="xs:string" minOccurs="0"/>
<xs:element name="data" type="analyticsValue" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="analyticsValue">
<xs:sequence>
<xs:element name="attribute" type="analyticAttribute" minOccurs="0"/>
<xs:element name="value" type="xs:anyType" nillable="true" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="totals">
<xs:sequence>
<xs:element name="total" type="analyticsValue" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:simpleType name="analyticAttribute">
<xs:restriction base="xs:string">
<xs:enumeration value="DIMENSION_VALUE"/>
<xs:enumeration value="HOP_COUNT"/>
<xs:enumeration value="ORDER_IMPRESSION"/>
<xs:enumeration value="ORDER_SUBMISSION"/>
<xs:enumeration value="SALE_COUNT"/>
<xs:enumeration value="SALE_AMOUNT"/>
<xs:enumeration value="REFUND_COUNT"/>
<xs:enumeration value="REFUND_AMOUNT"/>
<xs:enumeration value="CHARGEBACK_COUNT"/>
<xs:enumeration value="CHARGEBACK_AMOUNT"/>
<xs:enumeration value="REBILL_COUNT"/>
<xs:enumeration value="REBILL_AMOUNT"/>
<xs:enumeration value="UPSELL_COUNT"/>
<xs:enumeration value="UPSELL_AMOUNT"/>
<xs:enumeration value="UPSELL_ORDER_IMPRESSION"/>
<xs:enumeration value="GROSS_SALE_COUNT"/>
<xs:enumeration value="GROSS_SALE_AMOUNT"/>
<xs:enumeration value="NET_SALE_COUNT"/>
<xs:enumeration value="NET_SALE_AMOUNT"/>
<xs:enumeration value="EARNINGS_PER_HOP"/>
<xs:enumeration value="EARNINGS_PER_CLICK"/>
<xs:enumeration value="HOPS_PER_SALE"/>
<xs:enumeration value="HOPS_PER_ORDER_FORM_IMPRESSION"/>
<xs:enumeration value="ORDER_FORM_SALE_CONVERSION"/>
<xs:enumeration value="REFUND_RATE"/>
<xs:enumeration value="CHARGEBACK_RATE"/>
<xs:enumeration value="TOTAL_ORDER_IMPRESSION"/>
</xs:restriction>
</xs:simpleType>
</xs:schema>
Analytics Status
Analytics Status returns use the following format:
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:cb="http://www.clickbank.com/api" version="1.0">
<xs:element name="AnalyticsStatus" type="AnalyticsStatus"/>
<xs:complexType name="AnalyticsStatus">
<xs:sequence>
<xs:element name="status" type="xs:string"/>
<xs:element name="lastUpdateTime" type="xs:dateTime"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
Subscription Detail Result
Subscription Detail Result returns use the following format:
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:cb="http://www.clickbank.com/api" version="1.0">
<xs:element name="subscriptionDetailResult" type="subscriptionDetailResult"/>
<xs:complexType name="subscriptionDetailResult">
<xs:sequence>
<xs:element name="totalCount" type="xs:int"/>
<xs:element name="data" type="subscriptionDetailsDataWrapper" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="subscriptionDetailsDataWrapper">
<xs:sequence>
<xs:element name="row" type="subscriptionDetailsRowData" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="subscriptionDetailsRowData">
<xs:sequence>
<xs:element name="affNickName" type="xs:string" minOccurs="0"/>
<xs:element name="cancelled" type="xs:boolean"/>
<xs:element name="chargebackAmount" type="xs:decimal" minOccurs="0"/>
<xs:element name="chargebackCount" type="xs:int"/>
<xs:element name="countryCode" type="xs:string" minOccurs="0"/>
<xs:element name="currencyCode" type="xs:string" minOccurs="0"/>
<xs:element name="customerDisplayName" type="xs:string" minOccurs="0"/>
<xs:element name="customerFirstName" type="xs:string" minOccurs="0"/>
<xs:element name="customerLastName" type="xs:string" minOccurs="0"/>
<xs:element name="duration" type="xs:int"/>
<xs:element name="email" type="xs:string" minOccurs="0"/>
<xs:element name="frequency" type="xs:string" minOccurs="0"/>
<xs:element name="ftxnId" type="xs:int"/>
<xs:element name="futurePaymentsCount" type="xs:int"/>
<xs:element name="initialSaleAmount" type="xs:decimal" minOccurs="0"/>
<xs:element name="initialSaleCount" type="xs:int"/>
<xs:element name="itemNo" type="xs:string" minOccurs="0"/>
<xs:element name="nextPaymentDate" type="xs:dateTime" nillable="true" minOccurs="0"/>
<xs:element name="paymentMethod" type="xs:string" minOccurs="0"/>
<xs:element name="processedPaymentsCount" type="xs:int"/>
<xs:element name="province" type="xs:string" minOccurs="0"/>
<xs:element name="pubNickName" type="xs:string" minOccurs="0"/>
<xs:element name="purchaseDate" type="xs:dateTime" minOccurs="0"/>
<xs:element name="rebillSaleAmount" type="xs:decimal" minOccurs="0"/>
<xs:element name="rebillSaleCount" type="xs:int"/>
<xs:element name="receipt" type="xs:string" minOccurs="0"/>
<xs:element name="refundAmount" type="xs:decimal" minOccurs="0"/>
<xs:element name="refundCount" type="xs:int"/>
<xs:element name="status" type="xs:string" minOccurs="0"/>
<xs:element name="subCancelDate" type="xs:dateTime" minOccurs="0"/>
<xs:element name="subEndDate" type="xs:dateTime" minOccurs="0"/>
<xs:element name="subValue" type="xs:decimal" minOccurs="0"/>
<xs:element name="timeStr" type="xs:string" minOccurs="0"/>
<xs:element name="trialPeriod" type="xs:string" minOccurs="0"/>
<xs:element name="txnType" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
Subscription Detail Result Row
Subscription Detail Result Row returns use the following format:
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:cb="http://www.clickbank.com/api" version="1.0">
<xs:complexType name="subscriptionDetailsRowData">
<xs:sequence>
<xs:element name="affNickName" type="xs:string" minOccurs="0"/>
<xs:element name="cancelled" type="xs:boolean"/>
<xs:element name="chargebackAmount" type="xs:decimal" minOccurs="0"/>
<xs:element name="chargebackCount" type="xs:int"/>
<xs:element name="countryCode" type="xs:string" minOccurs="0"/>
<xs:element name="currencyCode" type="xs:string" minOccurs="0"/>
<xs:element name="customerDisplayName" type="xs:string" minOccurs="0"/>
<xs:element name="customerFirstName" type="xs:string" minOccurs="0"/>
<xs:element name="customerLastName" type="xs:string" minOccurs="0"/>
<xs:element name="duration" type="xs:int"/>
<xs:element name="email" type="xs:string" minOccurs="0"/>
<xs:element name="frequency" type="xs:string" minOccurs="0"/>
<xs:element name="ftxnId" type="xs:int"/>
<xs:element name="futurePaymentsCount" type="xs:int"/>
<xs:element name="initialSaleAmount" type="xs:decimal" minOccurs="0"/>
<xs:element name="initialSaleCount" type="xs:int"/>
<xs:element name="itemNo" type="xs:string" minOccurs="0"/>
<xs:element name="nextPaymentDate" type="xs:dateTime" nillable="true" minOccurs="0"/>
<xs:element name="paymentMethod" type="xs:string" minOccurs="0"/>
<xs:element name="processedPaymentsCount" type="xs:int"/>
<xs:element name="province" type="xs:string" minOccurs="0"/>
<xs:element name="pubNickName" type="xs:string" minOccurs="0"/>
<xs:element name="purchaseDate" type="xs:dateTime" minOccurs="0"/>
<xs:element name="rebillSaleAmount" type="xs:decimal" minOccurs="0"/>
<xs:element name="rebillSaleCount" type="xs:int"/>
<xs:element name="receipt" type="xs:string" minOccurs="0"/>
<xs:element name="refundAmount" type="xs:decimal" minOccurs="0"/>
<xs:element name="refundCount" type="xs:int"/>
<xs:element name="status" type="xs:string" minOccurs="0"/>
<xs:element name="subCancelDate" type="xs:dateTime" minOccurs="0"/>
<xs:element name="subEndDate" type="xs:dateTime" minOccurs="0"/>
<xs:element name="subValue" type="xs:decimal" minOccurs="0"/>
<xs:element name="timeStr" type="xs:string" minOccurs="0"/>
<xs:element name="trialPeriod" type="xs:string" minOccurs="0"/>
<xs:element name="txnType" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
Subscription Trends Data
Subscription Trend returns use the following format:
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:cb="http://www.clickbank.com/api" version="1.0">
<xs:element name="SubscriptionTrendsData" type="SubscriptionTrendsData"/>
<xs:complexType name="SubscriptionTrendsData">
<xs:sequence>
<xs:element name="totalCount" type="xs:int"/>
<xs:element name="data" type="subscriptionTrendsDataWrapper" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="subscriptionTrendsDataWrapper">
<xs:sequence>
<xs:element name="row" type="subscriptionProductRowData" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="subscriptionProductRowData">
<xs:sequence>
<xs:element name="avgActiveSubCnt" type="xs:decimal" minOccurs="0"/>
<xs:element name="avgSubAge" type="xs:decimal" minOccurs="0"/>
<xs:element name="avgSubValue" type="xs:decimal" minOccurs="0"/>
<xs:element name="businessDate" type="xs:dateTime" minOccurs="0"/>
<xs:element name="cancelSubCnt" type="xs:decimal" minOccurs="0"/>
<xs:element name="description" type="xs:string" minOccurs="0"/>
<xs:element name="duration" type="xs:int"/>
<xs:element name="frequency" type="xs:string" minOccurs="0"/>
<xs:element name="grossSales" type="xs:decimal" minOccurs="0"/>
<xs:element name="initialSaleAmt" type="xs:decimal" minOccurs="0"/>
<xs:element name="initialSaleCnt" type="xs:decimal" minOccurs="0"/>
<xs:element name="itemNo" type="xs:string" minOccurs="0"/>
<xs:element name="netSales" type="xs:decimal" minOccurs="0"/>
<xs:element name="nickname" type="xs:string" minOccurs="0"/>
<xs:element name="productId" type="xs:int"/>
<xs:element name="recurringSaleAmt" type="xs:decimal" minOccurs="0"/>
<xs:element name="recurringSaleCnt" type="xs:decimal" minOccurs="0"/>
<xs:element name="title" type="xs:string" minOccurs="0"/>
<xs:element name="totalSalesCnt" type="xs:decimal" minOccurs="0"/>
<xs:element name="trialPeriod" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
Trends Data Modifications as of December 13, 2022
- netSales - This calculation was updated to reflect the gross earnings less the return amounts. Previously net sales always matched gross sales and did not include chargeback and refund deductions.
- avgSubAge - The avgSubAge calculation considers subscriptions that fall within the requested startDate and endDate. This includes subscriptions which are active during the requested date range (even if the subscription was started before the requested time period), and those that started, canceled, or completed within the provided startDate and endDate time window. Previously the avgSubAge value returned from the trends API considered all subscriptions for this product, regardless of the startDate and endDate values in the request.
- avgSubValue - The avgSubValue calculation considers subscriptions that fall within the requested startDate and endDate. This includes subscriptions which are active during the requested date range (even if the subscription was started before the requested time period), and those that started, canceled, or completed within the provided startDate and endDate time window. Previously the avgSubValue value returned from the trends API considered all subscriptions for this product, regardless of the startDate and endDate values in the request.
- avgActiveSubCnt - This calculation has been updated to provide the average number of subscriptions active per day for the requested date range. This includes subscriptions which started prior to the startDate that are still active, AND includes subscriptions which started within the requested date range and ended after the specified endDate.
- cancelSubCnt - This has been updated to provide the number of subscriptions canceled with an end of service subscription date within the requested startDate and endDate window. It includes subscriptions that may have started prior to the startDate which were canceled within the requested date range.
- businessDate - The businessDate will always be returned in the subscription trends response. When groupBy=date is specified in the request, the data is grouped based on the original purchase date. When groupBy is not included in the request, businessDate will be in the response with value: ‘null’. Note this is an update from the previous API response which only returned businessDate when the request contained groupedBy=Date.
- grossSales - This calculation is the initial sale + rebills sales that occurred from subscriptions that are active within the requested date range, as well as subscriptions that started, completed or canceled within the requested date range. Note this is an update from the previous API response based on the subscription records evaluated within startDate and endDate request parameters.
- initialSaleAmt - This calculation provides the earnings amount from the initial sales that occurred from subscriptions that are active within the requested date range and subscriptions that started, completed or canceled within the requested date range. Note this is an update from the previous API response based on the subscription records evaluated within startDate and endDate request parameters.
- initialSaleCnt - This calculation is the count of initial sales from the subscriptions which are active within the requested date range and subscriptions that started, completed or canceled within the requested date range. NOTE: In the previous version of the API, initial sale count was reported incorrectly as 0.
- recurringSaleAmt - This calculation is earnings from the rebill sales from subscriptions which are active within the requested date range and subscriptions that started, completed or canceled within the requested date range. Note this is an update from the previous API response based on the subscription records evaluated within startDate and endDate request parameters.
- recurringSaleCnt - This calculation is count of rebill sales from the subscriptions which are active within the requested date range and subscriptions that started, completed or canceled within the requested date range. ote this is an update from the previous API response based on the subscription records evaluated within startDate and endDate request parameters.
- totalSaleCnt - This calculation is the count of initial sales and rebill sale events from the subscriptions which are active within the requested date range and subscriptions that started, completed or canceled within the requested date range. NOTE: This is an update from the previous API response based on the subscription records evaluated within startDate and endDate request parameters.
Additional Resources & Related Article
- KNOWLEDGE BASE: Analytics Reporting
- KNOWLEDGE BASE: How to Use ClickBank APIs
- KNOWLEDGE BASE: How to Generate API Keys
- KNOWLEDGE BASE: Subscription Reporting
- KNOWLEDGE BASE: API Contract
- KNOWLEDGE BASE: ClickBank API Specifications