1. Sign in
CallPOST /api/login with the email address and password for a SOXAI app account. Keep the returned localId as the user ID and send the returned idToken as a Bearer token.
localId, idToken, and refreshToken. An ID token expires after one hour. Use the refresh token to obtain a new ID token before it expires.
2. Get daily data
ReplaceYOUR_UID with localId and send the ID token in the request.
DailyInfoData returns daily summary data. Use DailyDetailData for finer-grained data and DailyTrendData for trend data. See the API reference for their fields and parameters.
Request sizes and pagination
Keep requests within the limits below and divide larger exports into multiple requests.
The v1 single-user data endpoints do not currently enforce a date-range maximum. Still divide large v1 exports into manageable periods to avoid long-running requests.
For organization-wide JSON requests, pagination is based on users, not measurement records. A successful result for at most 100 eligible users is an array. With more users, it is an object containing
data and pagination. The metadata contains total_users, total_pages, current_page (zero-based), and page_size (100 users). Request the next page while pagination.current_page + 1 < pagination.total_pages. A user can contribute many records or none, so neither the record count nor an empty data result determines the last page.
If a requested page has no measurements, the API can return {"msg":"No data found"} without pagination metadata. Continue using a previously obtained total_pages; if none is available, this response alone cannot tell you how many pages remain. For predictable bulk exports, send explicit batches of at most 100 eligible user IDs with uid_list. With a non-empty uid_list, page is ignored. See the organization summary reference and organization detail reference.
All three v1 data endpoints and the five v2 data endpoints support format=csv. GET /api/v2/GroupView/{group_id} does not support CSV.
Build for compatible additions
The API can add response fields in a backward-compatible release. Configure your client to ignore fields it does not recognize instead of rejecting an otherwise valid response.Next steps
- Read Authentication before using a long-lived API key.
- Review Data fields to understand v1 and v2 field naming.
- Use Troubleshooting when expected data is missing.