{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-data-hub/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["admonition"]},"type":"markdown"},"seo":{"title":"Asynchronous Exports","description":"Gateway to technical documentation for EGYM Platform."},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"asynchronous-exports","__idx":0},"children":["Asynchronous Exports"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Asynchronous exports create a background job and return a downloadable file when processing is complete. Use this flow for historical event data, larger date ranges, or file-based ingestion."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Async exports support Smart Strength workouts, Smart Strength assessments, body measurements, and flexibility measurements."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Async exports can go back up to one year. Requests cannot include event data older than one year, and each export job can cover at most 365 days."]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"warning","name":"Important integration rules"},"children":[{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Do not fetch daily data before 09:00 UTC:"]}," Data pipelines finish processing overnight records in the early morning. If you submit daily export jobs, schedule them for 09:00 UTC or later to ensure you get complete data for the previous day."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Event exports require member opt-in:"]}," Async event exports only include records for members who have opted in to health data and consumer-to-business (C2B) sharing. Records for members without this opt-in are excluded, so an export file may contain fewer rows than the total number of events at the gym."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Always store externalAccountId:"]}," Every user-related record in the export file includes ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["externalAccountId"]},". Make sure your data pipeline saves this ID in your database or data warehouse. When a member opts out, EGYM sends only this ID to request data deletion. You must have it saved to find and delete their records."]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"create-an-export-job","__idx":1},"children":["Create an export job"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"http","header":{"controls":{"copy":{}}},"source":"POST /api/v1/data/async\nx-api-key: <api-key>\nContent-Type: application/json\n","lang":"http"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"startDate\": \"2026-01-01\",\n  \"endDate\": \"2026-03-31\",\n  \"exportType\": \"SMART_STRENGTH_WORKOUTS\",\n  \"fileType\": \"JSONL\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The API returns the job ID and the initial status."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"jobId\": \"9f8a7c55-2d2f-4f3b-8a7b-5a32799116a4\",\n  \"status\": \"IN_PROGRESS\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"request-fields","__idx":2},"children":["Request fields"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Field"},"children":["Field"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Required"},"children":["Required"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["startDate"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Start date in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["YYYY-MM-DD"]}," format. Must not be older than one year."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["endDate"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["End date in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["YYYY-MM-DD"]}," format. The requested period cannot exceed 365 days or include data older than one year."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["exportType"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Data set to export."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["fileType"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Output format. Defaults to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["JSONL"]},"."]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["startDate"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["endDate"]}," are interpreted as UTC calendar days, and timestamp fields in the exported records (such as ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["eventTimestamp"]},") are returned in UTC."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Supported ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["exportType"]}," values:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SMART_STRENGTH_WORKOUTS"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SMART_STRENGTH_ASSESSMENTS"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["FLEXIBILITY_MEASUREMENTS"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["BODY_MEASUREMENTS"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Supported ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["fileType"]}," values:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["JSONL"]},": one JSON object per line"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["JSON"]},": JSON array"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["CSV"]},": comma-separated values with a header row"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"check-job-status","__idx":3},"children":["Check job status"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"http","header":{"controls":{"copy":{}}},"source":"GET /api/v1/data/async/jobs/9f8a7c55-2d2f-4f3b-8a7b-5a32799116a4\nx-api-key: <api-key>\n","lang":"http"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"status\": \"DONE\",\n  \"downloadURL\": \"https://storage.googleapis.com/...\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["downloadURL"]}," field is only present when the job status is ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["DONE"]},". It is a signed URL that expires two hours after the job completes. Download the file within that window. If the URL has expired, the job status changes to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["EXPIRED"]},"; create a new export job to obtain a fresh ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["downloadURL"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"job-statuses","__idx":4},"children":["Job statuses"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Status"},"children":["Status"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Meaning"},"children":["Meaning"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["IN_PROGRESS"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The export job was accepted and is still processing."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["DONE"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The export file is ready and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["downloadURL"]}," is present."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["FAILED"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The export job failed. Retry the request or contact support if the issue persists."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["EXPIRED"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The export finished previously, but the signed download URL has expired two hours after completion. Create a new job if the file is still needed."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"file-contents","__idx":5},"children":["File contents"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["JSON and JSONL files contain the same item objects as the synchronous response ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["data"]}," arrays. CSV files contain a header row followed by the same fields in column form. The ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/data-hub/api"},"children":["API Reference"]}," lists the fields for each export type."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"storing-externalaccountid-for-member-deletions","__idx":6},"children":["Storing externalAccountId for member deletions"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Regardless of whether you choose JSONL, JSON, or CSV, every exported record includes ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["externalAccountId"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["When you load the file into your data warehouse or database:"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Save externalAccountId:"]}," Store ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["externalAccountId"]}," alongside each user record."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Check opted-out users regularly:"]}," Query ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GET /api/v1/data/opted-out-users"]}," (see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/data-hub/synchronous-exports#opted-out-users"},"children":["Opted-out users"]},")."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Map and delete:"]}," The opt-out endpoint returns only ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["externalAccountId"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["lastSeenAt"]},"; names and emails are omitted. Look up this ID in your database to find and delete their previously exported workouts, assessments, and measurements."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If your ingestion pipeline does not store ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["externalAccountId"]},", you will not be able to identify which records belong to opted-out users when deletion is required."]}]},"headings":[{"value":"Asynchronous Exports","id":"asynchronous-exports","depth":1},{"value":"Create an export job","id":"create-an-export-job","depth":2},{"value":"Request fields","id":"request-fields","depth":2},{"value":"Check job status","id":"check-job-status","depth":2},{"value":"Job statuses","id":"job-statuses","depth":2},{"value":"File contents","id":"file-contents","depth":2},{"value":"Storing externalAccountId for member deletions","id":"storing-externalaccountid-for-member-deletions","depth":2}],"frontmatter":{"seo":{"title":"Asynchronous Exports"}},"lastModified":"2026-09-16T07:12:40.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/data-hub/async-exports","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}