{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/servera-lt/json-schema/servera-lt-partner-service-info-schema.json",
  "title": "PartnerServiceInfo",
  "x-generated": "2026-11-24",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/servera-lt-openapi.json#/components/schemas/PartnerServiceInfo",
  "properties": {
    "id": {
      "type": "integer",
      "title": "Id"
    },
    "product_id": {
      "type": "integer",
      "title": "Product Id"
    },
    "product_name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Product Name"
    },
    "status": {
      "type": "string",
      "enum": [
        "pending",
        "active",
        "suspended",
        "cancelled",
        "terminated",
        "completed"
      ],
      "title": "Status"
    },
    "billing_cycle": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Billing Cycle"
    },
    "recurring_amount": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "title": "Recurring Amount",
      "description": "Recurring fee per cycle. null for one-time products (they have no recurring charge)."
    },
    "next_due_date": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Next Due Date",
      "description": "Next billing date (end of the paid period). null for one-time products and for services not yet anchored."
    },
    "registration_date": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Registration Date"
    },
    "order_id": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Order Id",
      "description": "Id of the order that created this service."
    },
    "order_number": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Order Number",
      "description": "Order number (ORD-…) that created this service — use with order_item_index to link a service to its order line."
    },
    "order_item_index": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Order Item Index",
      "description": "0-based position of this service's item within its order, stable across calls, so N services from quantity:N can be told apart."
    }
  },
  "type": "object",
  "required": [
    "id",
    "product_id",
    "status"
  ]
}