Open Pet Data Standard

The CloudEvents of pet telemetry. A citable, open standard for activity trackers, smart collars, and veterinary integrations.

Simple, Versioned Event Envelope

Every OPDS event follows a consistent envelope structure with namespaced types, idempotency keys, and clear provenance. Designed for append-only event stores.

  • Globally unique event IDs
  • Versioned event types (e.g., opds.activity.summary.v1)
  • Immutable corrections, not overwrites
  • RFC-0002 consent lifecycle
{
  "event_id": "7b2c3d4e-5f6a-7b8c-9d0e-1f2a3b4c5d6e",
  "event_type": "opds.activity.summary.v1",
  "opds_version": "0.1.0",
  "subject": "pet_abc123",
  "event_time": "2025-12-27T14:30:00Z",
  "source": {
    "connector": "fitbark",
    "device_id": "fb_12345"
  },
  "data": {
    "step_count": 4500,
    "active_minutes": 45,
    "distance_meters": 3200
  }
}

Supported Event Types

OPDS v0.1.0 includes schemas for activity tracking, vital signs, data corrections, and consent management.

opds.activity.summary.v1

Daily/hourly activity rollup

opds.vitals.temperature.v1

Temperature reading

opds.vitals.weight.v1

Weight measurement

opds.system.correction.v1

Late-arriving data correction

opds.consent.grant.v1

Consent authorization

opds.consent.revoke.v1

Consent revocation

Quick Start

# Install the SDK

npm install @petsorcery/opds-sdk

# Send an event

import { OPDSClient, events } from '@petsorcery/opds-sdk';

const client = new OPDSClient({
  webhookUrl: 'https://api.vetsorcery.com/opds/ingest',
  apiKey: process.env.OPDS_API_KEY,
  connector: 'my-smart-collar',
});

await client.send(events.activitySummary({
  subject: 'pet_abc123',
  data: {
    step_count: 4500,
    active_minutes: 45,
    period_start: '2025-12-27T00:00:00Z',
    period_end: '2025-12-27T23:59:59Z',
  },
}));