Table Orders
Description
No description available
Parameters
Parameter | Label | Required | Options | Description | Help | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
There are no parameters |
Supported Operations
Below section contains supported CRUD operations. Each operation is executed by some EndPoint behind the scene.Method | Supported | Reference EndPoint |
---|---|---|
SELECT | get_orders | |
INSERT | ||
UPDATE | ||
UPSERT | ||
DELETE | ||
LOOKUP | get_order |
Examples
SSIS
Use FastSpring Connector in API Source component to read data or in API Destination component to read/write data:
Read from Orders table using API Source

Read/write to Orders table using API Destination

ODBC application
Use these SQL queries in your ODBC application data source:
Read orders
Read all orders
SELECT * FROM Orders
Read a single order by id
Read a single order by id
SELECT * FROM Orders Where Id='zzzzzzzzzz'
Read orders with date range
Read all orders within specific date range
SELECT * FROM Orders WITH(StartDate='2020-01-01', EndDate='2021-12-31' ) --use function like today, yesterday, yearstart, monthstart, yearstart-1y
Read orders placed in last 30 days
Read all orders placed in last 30 days. This hows how to use function like today, yesterday, yearstart, monthstart, yearstart-1y etc for date parameters
SELECT * FROM Orders
--WHERE Currency='USD' and TotalInPayoutCurrency>=1599
WITH(StartDate='today-30day', EndDate='today') --try today, yesterday, yearstart, yearend, monthstart, monthend, yearstart-1y so on
List all orders for a specific subscription
List all orders for a specific subscription
SELECT * FROM Orders
WHERE SubscriptionId_1='iBPfMFS6TZSxrLzSOrq8PQ'
OR SubscriptionId_2='iBPfMFS6TZSxrLzSOrq8PQ'
OR SubscriptionId_3='iBPfMFS6TZSxrLzSOrq8PQ'
ORDER BY OrderDate
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'
)
*/
SQL Server
Use these SQL queries in SQL Server after you create a data source in Data Gateway:
Read orders
Read all orders
DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * FROM Orders';
EXEC (@MyQuery) AT [LINKED_SERVER_TO_FASTSPRING_IN_DATA_GATEWAY];
Read a single order by id
Read a single order by id
DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * FROM Orders Where Id=''zzzzzzzzzz''';
EXEC (@MyQuery) AT [LINKED_SERVER_TO_FASTSPRING_IN_DATA_GATEWAY];
Read orders with date range
Read all orders within specific date range
DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * FROM Orders WITH(StartDate=''2020-01-01'', EndDate=''2021-12-31'' ) --use function like today, yesterday, yearstart, monthstart, yearstart-1y';
EXEC (@MyQuery) AT [LINKED_SERVER_TO_FASTSPRING_IN_DATA_GATEWAY];
Read orders placed in last 30 days
Read all orders placed in last 30 days. This hows how to use function like today, yesterday, yearstart, monthstart, yearstart-1y etc for date parameters
DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * FROM Orders
--WHERE Currency=''USD'' and TotalInPayoutCurrency>=1599
WITH(StartDate=''today-30day'', EndDate=''today'') --try today, yesterday, yearstart, yearend, monthstart, monthend, yearstart-1y so on';
EXEC (@MyQuery) AT [LINKED_SERVER_TO_FASTSPRING_IN_DATA_GATEWAY];
List all orders for a specific subscription
List all orders for a specific subscription
DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * FROM Orders
WHERE SubscriptionId_1=''iBPfMFS6TZSxrLzSOrq8PQ''
OR SubscriptionId_2=''iBPfMFS6TZSxrLzSOrq8PQ''
OR SubscriptionId_3=''iBPfMFS6TZSxrLzSOrq8PQ''
ORDER BY OrderDate';
EXEC (@MyQuery) AT [LINKED_SERVER_TO_FASTSPRING_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 [LINKED_SERVER_TO_FASTSPRING_IN_DATA_GATEWAY];