{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/7digital/refs/heads/main/json-schema/streaming-platform-subscription-schema.json",
  "title": "Subscription",
  "description": "Subscription schema from 7digital API",
  "type": "object",
  "properties": {
    "subscriptionId": {
      "type": "string",
      "example": "sub-789012"
    },
    "userId": {
      "type": "string",
      "example": "500123"
    },
    "productId": {
      "type": "string",
      "example": "unlimited-streaming-monthly"
    },
    "status": {
      "type": "string",
      "enum": [
        "active",
        "cancelled",
        "expired"
      ],
      "example": "active"
    },
    "startDate": {
      "type": "string",
      "format": "date",
      "example": "2026-05-28"
    },
    "endDate": {
      "type": "string",
      "format": "date",
      "example": "2026-06-28"
    }
  }
}