Reference

Endpoint Get Accounts


Name

get_accounts

Description

Related Tables

Accounts

Parameters

Parameter Required Options
Name: PageSize

Label: PageSize

Name: Email

Label: Email

Account email
Name: CustomKey

Label: Account custom key

Name: GlobalKey

Label: Account global key

Name: OrderID

Label: Account orderID

Name: OrderReference

Label: Account orderReference

Name: SubscriptionId

Label: Account subscriptionId

Name: Products

Label: Products

filters results to include only transactions involving the specified product ID(s) / product path(s)
Name: Refunds

Label: Show Returned Only

filters results to include orders with or without returns; response includes returns array with return IDs where applicable
Option Value
true true
false false
Name: SubscriptionStatus

Label: Subscription Status

'active', 'ended', 'canceled', 'started' will return accounts with subscriptions in the corresponding state
Option Value
active active
ended ended
canceled canceled
started started

Output Columns

Label Data Type (SSIS) Data Type (SQL) Length Description
Id DT_WSTR nvarchar(50) 50
ContactFirst DT_WSTR nvarchar(255) 255
ContactLast DT_WSTR nvarchar(255) 255
ContactEmail DT_WSTR nvarchar(255) 255
ContactCompany DT_WSTR nvarchar(255) 255
ContactPhone DT_WSTR nvarchar(255) 255
ContactSubscribed DT_BOOL bit
AddressLine1 DT_WSTR nvarchar(255) 255
AddressLine2 DT_WSTR nvarchar(255) 255
City DT_WSTR nvarchar(255) 255
Region DT_WSTR nvarchar(255) 255
RegionCustom DT_WSTR nvarchar(255) 255
PostalCode DT_WSTR nvarchar(255) 255
AddressCompany DT_WSTR nvarchar(255) 255
Language DT_WSTR nvarchar(255) 255
Country DT_WSTR nvarchar(255) 255
LookupGlobal DT_WSTR nvarchar(255) 255
Url DT_WSTR nvarchar(255) 255
PaymentMethods DT_I8 bigint
PaymentActive DT_I8 bigint
Orders DT_NTEXT nvarchar(MAX)
Subscriptions DT_NTEXT nvarchar(MAX)
Charges DT_NTEXT nvarchar(MAX)
Subscribed DT_BOOL bit
TaxExemptionData DT_WSTR nvarchar(4000) 4000
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

This Endpoint belongs to the Accounts table, therefore it is better to use it, instead of accessing the endpoint directly:

API Source - FastSpring
Read / write FastSpring data related to Orders, Subscriptions, Quotes, Products, Accounts and more without coding.
FastSpring
Accounts
There are no parameters to configure.
SSIS API Source - Read from table or endpoint

API Destination

This Endpoint belongs to the Accounts table, therefore it is better to use it, instead of accessing the endpoint directly. Use this table and table-operation pair to get accounts:

API Destination - FastSpring
Read / write FastSpring data related to Orders, Subscriptions, Quotes, Products, Accounts and more without coding.
FastSpring
Accounts
Select
There are no parameters to configure.
SSIS API Destination - Access table operation

ODBC application

Use these SQL queries in your ODBC application data source:

Get all accounts

Get all accounts for your store

SELECT *
FROM Accounts	

SELECT "Id"
	, "ContactFirst"
	, "ContactLast"
	, "ContactEmail"
	, "ContactCompany"
	, "ContactPhone"
	, "ContactSubscribed"
	, "AddressLine1"
	, "AddressLine2"
	, "City"
	, "Region"
	, "RegionCustom"
	, "PostalCode"
	, "AddressCompany"
	, "Language"
	, "Country"
	, "LookupGlobal"
	, "Url"
	, "PaymentMethods"
	, "PaymentActive"
	, "Orders"
	, "Subscriptions"
	, "Charges"
	, "Subscribed"
	, "TaxExemptionData"
FROM Accounts

--Use WITH clause --OR-- Key column(s) in WHERE clause
--WHERE [Id] = 'abcd'

--search by one or more parameters below
/*
WITH(
	  Email='X'
	, CustomKey='X'
	, GlobalKey='X'
	, OrderID='X'
	, OrderReference='X'
	, SubscriptionId='X'
	, Products='PROD-1,PROD-2,PROD-3'
	, Refunds='true'
	, SubscriptionStatus='active'
)
*/

Get all accounts with specific product orders

Use below query to search accounts who placed orders for specific products

SELECT * from Accounts WITH(Products='ssis-pp-pro,ssis-pp-pro-sub,ssis-pp-ent,ssis-pp-ent-sub')

get_accounts endpoint belongs to Accounts table(s), and can therefore be used via those table(s).

SQL Server

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

Get all accounts

Get all accounts for your store

DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT *
FROM Accounts	

SELECT "Id"
	, "ContactFirst"
	, "ContactLast"
	, "ContactEmail"
	, "ContactCompany"
	, "ContactPhone"
	, "ContactSubscribed"
	, "AddressLine1"
	, "AddressLine2"
	, "City"
	, "Region"
	, "RegionCustom"
	, "PostalCode"
	, "AddressCompany"
	, "Language"
	, "Country"
	, "LookupGlobal"
	, "Url"
	, "PaymentMethods"
	, "PaymentActive"
	, "Orders"
	, "Subscriptions"
	, "Charges"
	, "Subscribed"
	, "TaxExemptionData"
FROM Accounts

--Use WITH clause --OR-- Key column(s) in WHERE clause
--WHERE [Id] = ''abcd''

--search by one or more parameters below
/*
WITH(
	  Email=''X''
	, CustomKey=''X''
	, GlobalKey=''X''
	, OrderID=''X''
	, OrderReference=''X''
	, SubscriptionId=''X''
	, Products=''PROD-1,PROD-2,PROD-3''
	, Refunds=''true''
	, SubscriptionStatus=''active''
)
*/';

EXEC (@MyQuery) AT [LS_TO_FASTSPRING_IN_GATEWAY];

Get all accounts with specific product orders

Use below query to search accounts who placed orders for specific products

DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * from Accounts WITH(Products=''ssis-pp-pro,ssis-pp-pro-sub,ssis-pp-ent,ssis-pp-ent-sub'')';

EXEC (@MyQuery) AT [LS_TO_FASTSPRING_IN_GATEWAY];

get_accounts endpoint belongs to Accounts table(s), and can therefore be used via those table(s).