{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/stackit/json-schema/stackit-marketplace-subscription-v1-list-subscriptions-response-schema.json",
  "title": "marketplace.subscription.v1.ListSubscriptionsResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/stackit-consumers-api-openapi.yml#/components/schemas/marketplace.subscription.v1.ListSubscriptionsResponse",
  "properties": {
    "cursor": {
      "type": "string"
    },
    "items": {
      "items": {
        "$ref": "#/$defs/marketplace.subscription.v1.Subscription"
      },
      "type": "array"
    },
    "limit": {
      "format": "int32",
      "type": "integer"
    }
  },
  "type": "object",
  "$defs": {
    "marketplace.subscription.v1.Assets": {
      "properties": {
        "endUserLicenseAgreement": {
          "$ref": "#/$defs/marketplace.subscription.v1.File"
        },
        "productDescription": {
          "$ref": "#/$defs/marketplace.subscription.v1.File"
        },
        "serviceCertificate": {
          "$ref": "#/$defs/marketplace.subscription.v1.File"
        },
        "serviceLevelAgreement": {
          "$ref": "#/$defs/marketplace.subscription.v1.File"
        }
      },
      "type": "object"
    },
    "marketplace.subscription.v1.File": {
      "properties": {
        "version": {
          "$ref": "#/$defs/marketplace.subscription.v1.File_LocalizedVersion"
        }
      },
      "type": "object"
    },
    "marketplace.subscription.v1.File_LocalizedVersion": {
      "properties": {
        "de": {
          "description": "The file version matching the file name (localized).",
          "type": "string"
        },
        "en": {
          "description": "The file version matching the file name (localized).",
          "type": "string"
        }
      },
      "type": "object"
    },
    "marketplace.subscription.v1.Subscription": {
      "properties": {
        "approvalTimeout": {
          "description": "Period between the subscription was created until the approval needs to happen.",
          "readOnly": true,
          "type": "string"
        },
        "autoRenewal": {
          "description": "If true, the the subscription will extend its validity automatically at the end of the current period.",
          "readOnly": true,
          "type": "boolean"
        },
        "lifecycleState": {
          "enum": [
            "STATE_UNSPECIFIED",
            "SUBSCRIPTION_PENDING",
            "SUBSCRIPTION_ACTIVE",
            "SUBSCRIPTION_INACTIVE",
            "SUBSCRIPTION_CANCELLING",
            "SUBSCRIPTION_CANCELLED",
            "SUBSCRIPTION_REJECTED",
            "SUBSCRIPTION_APPROVAL_TIMED_OUT"
          ],
          "readOnly": true,
          "type": "string"
        },
        "orderedAt": {
          "description": "When the subscription was ordered.",
          "readOnly": true,
          "type": "string"
        },
        "organizationId": {
          "description": "The UUID of the organization.",
          "readOnly": true,
          "type": "string"
        },
        "product": {
          "allOf": [
            {
              "$ref": "#/$defs/marketplace.subscription.v1.SubscriptionProduct"
            }
          ],
          "description": "The product to the subscription.",
          "readOnly": true
        },
        "projectId": {
          "description": "The UUID of the project.",
          "readOnly": true,
          "type": "string"
        },
        "subscriptionId": {
          "description": "The UUID of the subscription.",
          "readOnly": true,
          "type": "string"
        },
        "terminatesAt": {
          "description": "Timestamp when the subscription will finally terminate.",
          "readOnly": true,
          "type": "string"
        },
        "validFrom": {
          "description": "Timestamp when the subscription validity has started.",
          "readOnly": true,
          "type": "string"
        },
        "validUntil": {
          "description": "Timestamp when the current subscription validity will end. May be automatically renewed.",
          "readOnly": true,
          "type": "string"
        }
      },
      "required": [
        "organizationId",
        "projectId",
        "subscriptionId",
        "product",
        "lifecycleState",
        "orderedAt"
      ],
      "type": "object"
    },
    "marketplace.subscription.v1.SubscriptionProduct": {
      "properties": {
        "assets": {
          "$ref": "#/$defs/marketplace.subscription.v1.Assets"
        },
        "deliveryMethod": {
          "description": "The product delivery method/type. For reference: SAAS - Software as a Service, CLOUD_IMAGE - STACKIT Cloud Image",
          "enum": [
            "SAAS",
            "CONTAINER_IMAGE",
            "CLOUD_IMAGE",
            "PROFESSIONAL_SERVICE"
          ],
          "readOnly": true,
          "type": "string"
        },
        "lifecycleState": {
          "description": "The lifecycle state of the product.",
          "enum": [
            "PRODUCT_LIVE",
            "PRODUCT_PENDING_APPROVAL",
            "PRODUCT_PREVIEW"
          ],
          "readOnly": true,
          "type": "string"
        },
        "noticePeriod": {
          "description": "The cancellation notice period of the subscription.",
          "type": "string"
        },
        "planId": {
          "description": "The user-readable plan ID of a pricing option.",
          "type": "string"
        },
        "priceType": {
          "description": "The product's price type.",
          "enum": [
            "CONTRACT",
            "FREE",
            "FREE_TRIAL",
            "BYOL",
            "PAYG"
          ],
          "readOnly": true,
          "type": "string"
        },
        "pricingPlan": {
          "description": "Additional price type information.",
          "type": "string"
        },
        "productId": {
          "description": "The user-readable ID of the product.",
          "type": "string"
        },
        "productName": {
          "description": "The name of the product.",
          "type": "string"
        },
        "rate": {
          "description": "The price of the product (per unit).",
          "type": "string"
        },
        "validityPeriod": {
          "description": "The period the subscription is valid for before it will be renewed.",
          "type": "string"
        },
        "vendorName": {
          "description": "The product vendor's name.",
          "type": "string"
        },
        "vendorPlanId": {
          "description": "The vendor provided plan ID.",
          "type": "string"
        },
        "vendorProductId": {
          "description": "The vendor provided prduct ID.",
          "type": "string"
        },
        "vendorWebsiteUrl": {
          "description": "The vendor's website.",
          "type": "string"
        }
      },
      "required": [
        "deliveryMethod",
        "lifecycleState",
        "planId",
        "priceType",
        "pricingPlan",
        "productId",
        "productName",
        "vendorName",
        "vendorWebsiteUrl",
        "validityPeriod",
        "noticePeriod",
        "rate"
      ],
      "type": "object"
    }
  }
}