{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/dhl/json-schema/dhl-subscription-request-state-schema.json",
  "title": "SubscriptionRequestState",
  "description": "Subscription request state response",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/dhl-shipment-tracking-unified-push-openapi.yml#/components/schemas/SubscriptionRequestState",
  "type": "object",
  "properties": {
    "self": {
      "description": "uniform resource identifier of system",
      "type": "string",
      "format": "uri"
    },
    "scope": {
      "$ref": "#/$defs/SubscriptionScope"
    },
    "expires": {
      "type": "string",
      "format": "iso8601-date-time"
    },
    "secret": {
      "description": "Validation of intent secret",
      "type": "string",
      "format": "password"
    },
    "note": {
      "type": "string"
    },
    "failure": {
      "$ref": "#/$defs/ProblemDetail"
    }
  },
  "required": [
    "scope"
  ],
  "$defs": {
    "ProblemDetail": {
      "description": "A problem detail response",
      "type": "object",
      "properties": {
        "detail": {
          "description": "A human-readable explanation specific to this occurrence of the problem",
          "type": "string"
        },
        "instance": {
          "description": "A URI reference that identifies the specific occurrence of the problem",
          "format": "uri",
          "type": "string"
        },
        "status": {
          "description": "The HTTP status code",
          "type": "number"
        },
        "title": {
          "description": "A short, human-readable summary of the problem type",
          "type": "string"
        },
        "type": {
          "description": "An identity of caused exception class",
          "type": "string"
        }
      }
    },
    "SubscriptionScope": {
      "type": "string",
      "enum": [
        "subscription.create",
        "subscription.validate",
        "subscription.activate",
        "subscription.ready",
        "subscription.push",
        "subscription.remove",
        "subscription.failure"
      ],
      "x-enum-varnames": [
        "CREATE",
        "VALIDATE",
        "ACTIVATE",
        "READY",
        "PUSH",
        "REMOVE",
        "FAILURE"
      ]
    }
  }
}