Data API
Paginated REST endpoints to read members and store credit history. Authenticated via the Subscribfy API key over the Shopify App Proxy.
The Data API exposes two paginated GET endpoints to read your Subscribfy data: customers (with their store credit balance) and the full store credit history. Use these to sync members with a CRM, build custom dashboards, or reconcile credit ledgers.
The Data API is the paginated successor to the Collection API. New integrations should prefer these endpoints because they support page parameters and return a stable { data, meta } envelope.
Authentication
Requests go through the Shopify App Proxy and require your Subscribfy API key. Generate it in Settings → Integrations → Subscribfy API (see API Key).
Prop
Type
Endpoints
| Endpoint | Method | Returns |
|---|---|---|
/apps/subscribfy-api/v1/data/members | GET | Paginated list of members with store credit balances |
/apps/subscribfy-api/v1/data/credits-history | GET | Paginated list of store credit transactions |
Replace the host with your Shopify store domain, for example:
https://your-store.myshopify.com/apps/subscribfy-api/v1/data/members?key=YOUR_API_KEYResponse Envelope
Both endpoints return the same wrapper:
{
"data": [ /* records */ ],
"meta": {
"current_page": 1,
"per_page": 10000
}
}per_page differs by endpoint. The list ends when data returns fewer items than per_page, or is empty.
| Endpoint | Records per page |
|---|---|
/data/members | 10000 |
/data/credits-history | 1000 |
GET /data/members
Returns all customers known to Subscribfy for the shop, with their current store credit balance. If a third-party reward points integration is active (for example Klaviyo or Yotpo loyalty), an extra balance field is added per member.
Query parameters
Prop
Type
Example
curl -G "https://your-store.myshopify.com/apps/subscribfy-api/v1/data/members" \
--data-urlencode "key=YOUR_API_KEY" \
--data-urlencode "page=1"Response:
{
"data": [
{
"shopify_customer_gid": "7834521098",
"email": "john@example.com",
"balance_from_subscribfy": "150.00"
},
{
"shopify_customer_gid": "7834521099",
"email": "jane@example.com",
"balance_from_subscribfy": "0.00"
}
],
"meta": {
"current_page": 1,
"per_page": 10000
}
}Member fields
Prop
Type
When a reward points integration is active and exposes its balance to the storefront, an additional integration-specific field appears on each member (for example klaviyo_points, yotpo_points). The exact key is provided by the integration. If the integration is connected but its balance is hidden from the storefront, the value returns as " - ".
GET /data/credits-history
Returns store credit transactions for the shop, newest first. Cancelled and aborted records are excluded. You can optionally restrict results to a single customer.
Query parameters
Prop
Type
Example
curl -G "https://your-store.myshopify.com/apps/subscribfy-api/v1/data/credits-history" \
--data-urlencode "key=YOUR_API_KEY" \
--data-urlencode "page=1" \
--data-urlencode "shopify_customer_gid=7834521098"Response:
{
"data": [
{
"shopify_customer_gid": "7834521098",
"body": "Discount Redemption",
"value": "-15.00",
"unit": "money",
"status": 1,
"created_at": "2026-01-20 14:22",
"order_name": "#1234"
},
{
"shopify_customer_gid": "7834521098",
"body": "You've earned 29.00 Store Credits!",
"value": "29.00",
"unit": "money",
"status": 0,
"created_at": "2026-01-15 10:30"
}
],
"meta": {
"current_page": 1,
"per_page": 1000
}
}Credit history fields
Prop
Type
Timestamps are formatted in your shop's configured timezone (the Shopify "Standards and formats" timezone). Convert to UTC client-side if you need timezone-independent storage.
Pagination Pattern
Both endpoints use simple page-based pagination. Loop until you receive fewer items than per_page:
$apiKey = 'your_api_key';
$store = 'your-store.myshopify.com';
$page = 1;
$members = [];
do {
$url = "https://{$store}/apps/subscribfy-api/v1/data/members?" . http_build_query([
'key' => $apiKey,
'page' => $page,
]);
$response = json_decode(file_get_contents($url), true);
$members = array_merge($members, $response['data'] ?? []);
$page++;
} while (count($response['data'] ?? []) === ($response['meta']['per_page'] ?? 0));
echo count($members) . " members loaded\n";const axios = require('axios');
const apiKey = 'your_api_key';
const store = 'your-store.myshopify.com';
async function getAllMembers() {
const all = [];
let page = 1;
let perPage = 0;
do {
const { data } = await axios.get(
`https://${store}/apps/subscribfy-api/v1/data/members`,
{ params: { key: apiKey, page } }
);
all.push(...data.data);
perPage = data.meta.per_page;
page++;
if (data.data.length < perPage) break;
} while (true);
return all;
}
getAllMembers().then(m => console.log(`${m.length} members`));import requests
api_key = 'your_api_key'
store = 'your-store.myshopify.com'
page = 1
members = []
while True:
res = requests.get(
f'https://{store}/apps/subscribfy-api/v1/data/members',
params={'key': api_key, 'page': page},
).json()
members.extend(res['data'])
if len(res['data']) < res['meta']['per_page']:
break
page += 1
print(f'{len(members)} members loaded')Errors
| Status | Cause |
|---|---|
| 401 | Missing key, invalid API key, or the Shopify App Proxy signature could not be verified |
| 422 | page is not a positive integer |
When to Use Which Endpoint
Use the Webhook Events API for real-time pushes (a payment, a credit change, a tier upgrade), and the Data API for periodic reconciliation, exports, or rebuilding state after downtime. They are complementary, not redundant.
| Need | Use |
|---|---|
| React to events as they happen | Webhook Events API |
| Initial backfill or full re-sync | Data API |
| One customer's credit ledger | Data API with shopify_customer_gid filter |
| Aggregated balances and emails | /data/members |
Related
- Subscribfy API Key - generate and manage your key
- Collection API - the older, non-paginated equivalent
- Webhook Events API - real-time push notifications
Was this page helpful?
Storefront Customer Portal API
Storefront API for customer self-service: pause, cancel, skip, swap products, update billing, and manage subscriptions.
Collection API (Deprecated)
Deprecated. Use the Data API for new integrations. Query customer data, store credit history, activity logs, and subscription contracts via the legacy Collection API endpoint.