Financials
5 endpoints. Each needs an API key or OAuth token with the scope shown; the key already names its store, so paths start at /v1/store. Generated from the live contract; also in openapi.json.
Gross to net earnings for a period, per currency, tied out to the ledger
GET
/v1/store/financials/statementOr name the store: GET /v1/stores/{storeId}/financials/statement
Parameters
range"today" | "yesterday" | "7d" | "30d" | "90d" | "this_month" | "last_month" | "6mo" | "ytd" | "365d" | "custom"queryfromstring | nullquerytostring | nullquerybucket"hour" | "day" | "week" | "month" | nullquery
Response FinancialStatement
periodAnalyticsPeriodrequiredpaymentModel"merchant_of_record" | "seller_gateway"requiredstatementsCurrencyStatement[]requiredgeneratedAtTimestamprequired
Example
curl "https://api.shopfa.st/v1/store/financials/statement" \
-H "Authorization: Bearer $SHOPFAST_API_KEY"const res = await fetch('https://api.shopfa.st/v1/store/financials/statement', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.SHOPFAST_API_KEY}`,
},
});
if (!res.ok) throw new Error((await res.json()).detail);
const data = await res.json();import os, requests
res = requests.request(
"GET",
"https://api.shopfa.st/v1/store/financials/statement",
headers={"Authorization": f"Bearer {os.environ['SHOPFAST_API_KEY']}"},
)
res.raise_for_status()
data = res.json()req, _ := http.NewRequest("GET", "https://api.shopfa.st/v1/store/financials/statement", nil)
req.Header.Set("Authorization", "Bearer "+os.Getenv("SHOPFAST_API_KEY"))
res, err := http.DefaultClient.Do(req)Try it with your key
One statement row per month
GET
/v1/store/financials/monthlyOr name the store: GET /v1/stores/{storeId}/financials/monthly
Parameters
monthsinteger | stringquery
Response MonthlyStatements
timezonestringrequiredmonthsMonthlyRow[]required
Example
curl "https://api.shopfa.st/v1/store/financials/monthly" \
-H "Authorization: Bearer $SHOPFAST_API_KEY"const res = await fetch('https://api.shopfa.st/v1/store/financials/monthly', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.SHOPFAST_API_KEY}`,
},
});
if (!res.ok) throw new Error((await res.json()).detail);
const data = await res.json();import os, requests
res = requests.request(
"GET",
"https://api.shopfa.st/v1/store/financials/monthly",
headers={"Authorization": f"Bearer {os.environ['SHOPFAST_API_KEY']}"},
)
res.raise_for_status()
data = res.json()req, _ := http.NewRequest("GET", "https://api.shopfa.st/v1/store/financials/monthly", nil)
req.Header.Set("Authorization", "Bearer "+os.Getenv("SHOPFAST_API_KEY"))
res, err := http.DefaultClient.Do(req)Try it with your key
Payouts matched to their ledger journals, and the balance roll-forward
GET
/v1/store/financials/payoutsOr name the store: GET /v1/stores/{storeId}/financials/payouts
Parameters
range"today" | "yesterday" | "7d" | "30d" | "90d" | "this_month" | "last_month" | "6mo" | "ytd" | "365d" | "custom"queryfromstring | nullquerytostring | nullquerybucket"hour" | "day" | "week" | "month" | nullquery
Response PayoutReconciliation
periodAnalyticsPeriodrequiredpayoutsPayoutReconRow[]requiredrollForwardobject[]requiredcurrencyCurrencyCoderequiredopeningAvailableMinorintegerrequiredsettledMinorintegerrequiredreleasedMinorintegerrequiredrefundsMinorintegerrequireddisputesMinorintegerrequiredotherMinorintegerrequiredpayoutsMinorintegerrequiredclosingAvailableMinorintegerrequireddifferenceMinorintegerrequired
unmatchedintegerrequired
Example
curl "https://api.shopfa.st/v1/store/financials/payouts" \
-H "Authorization: Bearer $SHOPFAST_API_KEY"const res = await fetch('https://api.shopfa.st/v1/store/financials/payouts', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.SHOPFAST_API_KEY}`,
},
});
if (!res.ok) throw new Error((await res.json()).detail);
const data = await res.json();import os, requests
res = requests.request(
"GET",
"https://api.shopfa.st/v1/store/financials/payouts",
headers={"Authorization": f"Bearer {os.environ['SHOPFAST_API_KEY']}"},
)
res.raise_for_status()
data = res.json()req, _ := http.NewRequest("GET", "https://api.shopfa.st/v1/store/financials/payouts", nil)
req.Header.Set("Authorization", "Bearer "+os.Getenv("SHOPFAST_API_KEY"))
res, err := http.DefaultClient.Do(req)Try it with your key
Tax collected and refunded by buyer country
GET
/v1/store/financials/taxOr name the store: GET /v1/stores/{storeId}/financials/tax
Parameters
range"today" | "yesterday" | "7d" | "30d" | "90d" | "this_month" | "last_month" | "6mo" | "ytd" | "365d" | "custom"queryfromstring | nullquerytostring | nullquerybucket"hour" | "day" | "week" | "month" | nullquery
Response TaxReport
periodAnalyticsPeriodrequiredpaymentModel"merchant_of_record" | "seller_gateway"requiredremittedBy"shopfast" | "seller"requiredrowsTaxRow[]requiredtotalsobject[]requiredcurrencyCurrencyCoderequiredordersintegerrequiredtaxableSalesMinorintegerrequiredtaxCollectedMinorintegerrequiredtaxRefundedMinorintegerrequirednetTaxMinorintegerrequired
Example
curl "https://api.shopfa.st/v1/store/financials/tax" \
-H "Authorization: Bearer $SHOPFAST_API_KEY"const res = await fetch('https://api.shopfa.st/v1/store/financials/tax', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.SHOPFAST_API_KEY}`,
},
});
if (!res.ok) throw new Error((await res.json()).detail);
const data = await res.json();import os, requests
res = requests.request(
"GET",
"https://api.shopfa.st/v1/store/financials/tax",
headers={"Authorization": f"Bearer {os.environ['SHOPFAST_API_KEY']}"},
)
res.raise_for_status()
data = res.json()req, _ := http.NewRequest("GET", "https://api.shopfa.st/v1/store/financials/tax", nil)
req.Header.Set("Authorization", "Bearer "+os.Getenv("SHOPFAST_API_KEY"))
res, err := http.DefaultClient.Do(req)Try it with your key
A statement, the months, payouts, tax or the raw ledger as CSV
GET
/v1/store/financials/exportOr name the store: GET /v1/stores/{storeId}/financials/export
Parameters
range"today" | "yesterday" | "7d" | "30d" | "90d" | "this_month" | "last_month" | "6mo" | "ytd" | "365d" | "custom"queryfromstring | nullquerytostring | nullquerybucket"hour" | "day" | "week" | "month" | nullquerykind"statement" | "monthly" | "payouts" | "tax" | "ledger"queryrequired
Response FinancialCsv
filenamestringrequiredcsvstringrequiredrowsintegerrequired
Example
curl "https://api.shopfa.st/v1/store/financials/export" \
-H "Authorization: Bearer $SHOPFAST_API_KEY"const res = await fetch('https://api.shopfa.st/v1/store/financials/export', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.SHOPFAST_API_KEY}`,
},
});
if (!res.ok) throw new Error((await res.json()).detail);
const data = await res.json();import os, requests
res = requests.request(
"GET",
"https://api.shopfa.st/v1/store/financials/export",
headers={"Authorization": f"Bearer {os.environ['SHOPFAST_API_KEY']}"},
)
res.raise_for_status()
data = res.json()req, _ := http.NewRequest("GET", "https://api.shopfa.st/v1/store/financials/export", nil)
req.Header.Set("Authorization", "Bearer "+os.Getenv("SHOPFAST_API_KEY"))
res, err := http.DefaultClient.Do(req)