Reference

Endpoint Get Revenue Report


Name

get_revenue_report

Description

Parameters

Parameter Required Options
Name: ReportColumns

Label: ReportColumns

Option Value
Buyer_Email Buyer_Email
Buyer_ID Buyer_ID
Chargeback_True_False Chargeback_True_False
Company_ID Company_ID
Company_Name Company_Name
Country_ISO Country_ISO
Country_Name Country_Name
CouponDigital_Backup_Fulfillment_Fee CouponDigital_Backup_Fulfillment_Fee
Digital_Backup_Fulfillment_Fee_in_USD Digital_Backup_Fulfillment_Fee_in_USD
Digital_Fulfillment_Fee Digital_Fulfillment_Fee
Digital_Fulfillment_Fee_in_USD Digital_Fulfillment_Fee_in_USD
Discount Discount
Driving_Offer_TypeDriving_Product_Path Driving_Offer_TypeDriving_Product_Path
Fixed_FeeFixed_Fee_in_USDIncomeIncome_in_USDItem_ID Fixed_FeeFixed_Fee_in_USDIncomeIncome_in_USDItem_ID
Order_ID Order_ID
Physical_Backup_Fulfillment_Fee Physical_Backup_Fulfillment_Fee
Physical_Backup_Fulfillment_Fee_in_USD Physical_Backup_Fulfillment_Fee_in_USD
Product_Display_Name Product_Display_Name
Product_ID Product_ID
Product_Name Product_Name
Product_Path Product_Path
Purchase_Type Purchase_Type
Return_Fee Return_Fee
Return_Fee_in_USD Return_Fee_in_USD
Return_True_False Return_True_False
SegmentStore_Chargeback_Fee SegmentStore_Chargeback_Fee
Store_ID Store_ID
Store_Name Store_Name
Subscription_Period Subscription_Period
Subscription_Period_End Subscription_Period_End
Subscription_Period_Start Subscription_Period_Start
Subscription_Start_Date Subscription_Start_Date
Subscription_Status Subscription_Status
Subscription_True_False Subscription_True_False
Tax Tax
Tax_Fee Tax_Fee
Tax_Fee_in_USD Tax_Fee_in_USD
Tax_in_USD Tax_in_USD
Transaction_Amount Transaction_Amount
Transaction_Amount_in_USD Transaction_Amount_in_USD
Transaction_Currency Transaction_Currency
Transaction_Date Transaction_Date
Transaction_Fee Transaction_Fee
Transaction_Fee_in_USD Transaction_Fee_in_USD
Transaction_Item_Count Transaction_Item_Count
Transaction_Month Transaction_Month
Transaction_Rate Transaction_Rate
Transaction_Time_UTC Transaction_Time_UTC
Transaction_Type Transaction_Type
Transaction_Year Transaction_Year
Grand_Total_In_USD Grand_Total_In_USD
syncDatecountryISO syncDatecountryISO
Product_Count Product_Count
Product_Units Product_Units
Name: GroupByColumns

Label: GroupByColumns

Option Value
Buyer_Email Buyer_Email
Buyer_ID Buyer_ID
Chargeback_True_False Chargeback_True_False
Company_ID Company_ID
Company_Name Company_Name
Country_ISO Country_ISO
Country_Name Country_Name
Coupon Coupon
Discount Discount
Driving_Offer_Type Driving_Offer_Type
Driving_Product_Path Driving_Product_Path
Income Income
Item_ID Item_ID
Order_ID Order_ID
Product_Display_Name Product_Display_Name
Product_ID Product_ID
Product_Name Product_Name
Product_Path Product_Path
Purchase_Type Purchase_Type
Return_True_False Return_True_False
Segment Segment
Store_ID Store_ID
Store_Name Store_Name
Subscription_Period Subscription_Period
Subscription_Status Subscription_Status
Subscription_True_False Subscription_True_False
Transaction_Currency Transaction_Currency
Transaction_Date Transaction_Date
Transaction_Month Transaction_Month
Transaction_Type Transaction_Type
Transaction_Year Transaction_Year
countryISO countryISO
Name: PageSize

Label: PageSize

Name: StartDate

Label: StartDate

The date for which to retrieve the report in YYYYMMDD format. Supported functions now|today|yesterday|weekstart|weekend|monthstart|monthend|yearstart|yearend and supported intervals for add/subtract are ms|s|sec|min|h|hour|y|year|d|day|m|month|y|year. Example monthstart-3d (subtract 3days from month start)
Option Value
2023-12-31 2023-12-31
today today
yesterday yesterday
yearstart-10y yearstart-10y
monthstart monthstart
monthend monthend
yearstart yearstart
yearend yearend
weekstart weekstart
weekend weekend
yearstart-1y yearstart-1y
yearend-1y yearend-1y
monthstart-1d monthstart-1d
monthend+1d monthend+1d
monthend+1d-1y monthend+1d-1y
Name: EndDate

Label: EndDate

The date for which to retrieve the report in YYYYMMDD format. Supported functions now|today|yesterday|weekstart|weekend|monthstart|monthend|yearstart|yearend and supported intervals for add/subtract are ms|s|sec|min|h|hour|y|year|d|day|m|month|y|year. Example monthstart-3d (subtract 3days from month start)
Option Value
2023-12-31 2023-12-31
today today
yesterday yesterday
yearstart-10y yearstart-10y
monthstart monthstart
monthend monthend
yearstart yearstart
yearend yearend
weekstart weekstart
weekend weekend
yearstart-1y yearstart-1y
yearend-1y yearend-1y
monthstart-1d monthstart-1d
monthend+1d monthend+1d
monthend+1d-1y monthend+1d-1y
Name: SyncDate

Label: SyncDate

The date for which to retrieve the report in YYYYMMDD format. Supported functions now|today|yesterday|weekstart|weekend|monthstart|monthend|yearstart|yearend and supported intervals for add/subtract are ms|s|sec|min|h|hour|y|year|d|day|m|month|y|year. Example monthstart-3d (subtract 3days from month start)
Option Value
2023-12-31 2023-12-31
today today
yesterday yesterday
yearstart-10y yearstart-10y
monthstart monthstart
monthend monthend
yearstart yearstart
yearend yearend
weekstart weekstart
weekend weekend
yearstart-1y yearstart-1y
yearend-1y yearend-1y
monthstart-1d monthstart-1d
monthend+1d monthend+1d
monthend+1d-1y monthend+1d-1y
Name: Country

Label: Country

Option Value
Albania AL
Argentina AR
Aruba AW
Australia AU
Austria AT
Azerbaijan AZ
Belgium BE
Brazil BR
British Virgin Islands VG
Bulgaria BG
Canada CA
CANADA CANADA
Chile CL
China CN
Colombia CO
Costa Rica CR
Croatia HR
CW CW
Cyprus CY
Czech Republic CZ
Denmark DK
Dominican Republic DO
Ecuador EC
Egypt EG
Estonia EE
Finland FI
FINLAND FINLAND
France FR
French Polynesia PF
Germany DE
Gibraltar GI
Greece GR
Guatemala GT
Honduras HN
Hong Kong, SAR China HK
Hungary HU
Iceland IS
India IN
Indonesia ID
Ireland IE
Isle of Man IM
Israel IL
Italy IT
Jamaica JM
Japan JP
Korea (South) KR
Latvia LV
Lithuania LT
Luxembourg LU
Malaysia MY
Malta Malta
Mauritius MU
Mexico MX
Netherlands NL
New Zealand NZ
Nigeria NG
Norway NO
Peru PE
Philippines PH
Poland PL
Portugal PT
Puerto Rico PR
Qatar QA
Romania RO
Russian Federation RU
Saudi Arabia SA
Singapore SG
Slovakia SK
Slovenia SI
South Africa ZA
Spain ES
Sri Lanka LK
Sweden SE
Switzerland CH
Thailand TH
Trinidad and Tobago TT
Turkey TR
Ukraine UA
United Arab Emirates AE
United Kingdom GB
United States of America US
USA USA
Viet Nam VN
Name: ProductPaths

Label: ProductPaths

Name: ProductNames

Label: ProductNames

Name: NotificationEmails

Label: NotificationEmails

Output Columns

Label Data Type (SSIS) Data Type (SQL) Length Description
There are no Static columns defined for this endpoint. This endpoint detects columns dynamically at runtime.
If the column you are looking for is missing, consider customizing FastSpring Connector.

Input Columns

Label Data Type (SSIS) Data Type (SQL) Length Description
There are no Static columns defined for this endpoint. This endpoint detects columns dynamically at runtime.

Examples

SSIS

Use FastSpring Connector in API Source or in API Destination SSIS Data Flow components to read or write data.

API Source

API Source - FastSpring
Read / write FastSpring data related to Orders, Subscriptions, Quotes, Products, Accounts and more without coding.
FastSpring
Get Revenue Report
Optional Parameters
ReportColumns Transaction_Year~Transaction_Month~Transaction_Date~Company_Name~Product_Path~Product_Units~Tax_in_USD~Transaction_Amount_in_USD~Grand_Total_In_USD
GroupByColumns
SSIS API Source - Read from table or endpoint

API Destination

API Destination - FastSpring
Read / write FastSpring data related to Orders, Subscriptions, Quotes, Products, Accounts and more without coding.
FastSpring
Get Revenue Report
Optional Parameters
ReportColumns Transaction_Year~Transaction_Month~Transaction_Date~Company_Name~Product_Path~Product_Units~Tax_in_USD~Transaction_Amount_in_USD~Grand_Total_In_USD
GroupByColumns
SSIS API Destination - Access table or endpoint

ODBC application

Use these SQL queries in your ODBC application data source:

Generate Revenue Report by Date, Product, Group By

Generate revenue report for selected group by columns, date range, products and more

SELECT *
FROM get_revenue_report
Order by transaction_date
WITH(
	  Country='AL~UA~US'
	, ProductPaths='odbc-pp-ent-sub~odbc-pp-pro-sub~odbc-pp-std~ssis-pp-pro-sub~ssis-pp-std-sub~ssis-pp-ent-sub'
	, StartDate='monthstart-1m' --or  2022-01-01
	, EndDateDate='monthend+2d' --or  2022-01-01
	, ReportColumns='Transaction_Year~Transaction_Month~Transaction_Date~Company_Name~Product_Path~Product_Units~Tax_in_USD~Transaction_Amount_in_USD~Grand_Total_In_USD'
	, GroupByColumns='transaction_date~transaction_month~transaction_year'
)

SQL Server

Use these SQL queries in SQL Server after you create a data source in Data Gateway:

Generate Revenue Report by Date, Product, Group By

Generate revenue report for selected group by columns, date range, products and more

DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT *
FROM get_revenue_report
Order by transaction_date
WITH(
	  Country=''AL~UA~US''
	, ProductPaths=''odbc-pp-ent-sub~odbc-pp-pro-sub~odbc-pp-std~ssis-pp-pro-sub~ssis-pp-std-sub~ssis-pp-ent-sub''
	, StartDate=''monthstart-1m'' --or  2022-01-01
	, EndDateDate=''monthend+2d'' --or  2022-01-01
	, ReportColumns=''Transaction_Year~Transaction_Month~Transaction_Date~Company_Name~Product_Path~Product_Units~Tax_in_USD~Transaction_Amount_in_USD~Grand_Total_In_USD''
	, GroupByColumns=''transaction_date~transaction_month~transaction_year''
)';

EXEC (@MyQuery) AT [LS_TO_FASTSPRING_IN_GATEWAY];