Skip to main content

Health Export

Passport can export meal and nutrition data to popular health and fitness apps, helping diners track their overall diet without manual entry.

Supported Platforms

PlatformStatusData Exported
Apple HealthSupportedCalories, nutrients, meal times
Google FitSupportedCalories, macros
MyFitnessPalPlannedFull nutrition
Generic ExportSupportedCSV, JSON

Connecting Apple Health

mutation ConnectAppleHealth($token: String!, $authCode: String!) {
  connectHealthApp(
    token: $token,
    platform: APPLE_HEALTH,
    authCode: $authCode
  ) {
    connection {
      id
      platform
      status
      connectedAt
    }
  }
}

iOS Implementation

import HealthKit

func connectToEveryBite() {
    let healthStore = HKHealthStore()

    let typesToShare: Set = [
        HKObjectType.quantityType(forIdentifier: .dietaryEnergyConsumed)!,
        HKObjectType.quantityType(forIdentifier: .dietaryProtein)!,
        HKObjectType.quantityType(forIdentifier: .dietaryCarbohydrates)!,
        HKObjectType.quantityType(forIdentifier: .dietaryFatTotal)!
    ]

    healthStore.requestAuthorization(toShare: typesToShare, read: nil) { success, error in
        if success {
            // Send authorization to EveryBite API
            self.sendAuthToEveryBite()
        }
    }
}

Connecting Google Fit

mutation ConnectGoogleFit($token: String!, $authCode: String!) {
  connectHealthApp(
    token: $token,
    platform: GOOGLE_FIT,
    authCode: $authCode
  ) {
    connection {
      id
      platform
      status
    }
  }
}

Checking Connection Status

query GetHealthConnections($token: String!) {
  passport(token: $token) {
    healthConnections {
      platform
      status       # CONNECTED, DISCONNECTED, PENDING
      connectedAt
      lastSyncAt
    }
  }
}

Sync Behavior

Automatic Sync

When enabled, meals sync automatically:
  1. Diner completes order at a restaurant
  2. Meal recorded in Passport history
  3. Data pushed to connected health apps
  4. Appears in Apple Health, Google Fit, etc.

Manual Sync

Trigger a sync for historical data:
mutation SyncToHealthApp(
  $token: String!,
  $platform: HealthPlatform!,
  $dateFrom: Date,
  $dateTo: Date
) {
  syncToHealthApp(
    token: $token,
    platform: $platform,
    dateRange: { from: $dateFrom, to: $dateTo }
  ) {
    syncedMeals
    status
  }
}

Data Exported

Each meal exports:
FieldApple HealthGoogle Fit
CaloriesdietaryEnergyConsumedcalories.expended
ProteindietaryProteinnutrition.protein
CarbsdietaryCarbohydratesnutrition.carbs
FatdietaryFatTotalnutrition.fat
Meal timestartDatestartTime
Meal typemetadata.mealTypemealType

Generic Export

Export data as CSV or JSON for use in other apps:
mutation ExportMealData(
  $token: String!,
  $format: ExportFormat!,
  $dateFrom: Date,
  $dateTo: Date
) {
  exportMealData(
    token: $token,
    format: $format,  # CSV or JSON
    dateRange: { from: $dateFrom, to: $dateTo }
  ) {
    downloadUrl
    expiresAt
  }
}

CSV Format

date,meal_name,restaurant,calories,protein_g,carbs_g,fat_g
2025-12-16,Red Coconut Curry,Honeygrow,530,18,52,24
2025-12-15,Pomegranate Acai Salad,Honeygrow,400,12,45,20

JSON Format

{
  "meals": [
    {
      "date": "2025-12-16T18:30:00Z",
      "name": "Red Coconut Curry",
      "restaurant": "Honeygrow",
      "nutrition": {
        "calories": 530,
        "protein": 18,
        "carbohydrates": 52,
        "fat": 24
      }
    }
  ]
}

Disconnecting

mutation DisconnectHealthApp($token: String!, $platform: HealthPlatform!) {
  disconnectHealthApp(token: $token, platform: $platform) {
    success
  }
}
Disconnecting stops future syncs but does not delete data already exported to the health app. Users must delete that data directly in the health app if desired.

Privacy

Only nutrition data is exported. No restaurant names, dish details, or location data is sent to health platforms.
Users can disconnect at any time, stopping all future exports.