{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/dhl/json-schema/dhl-timestamp-notification-subscription-v2-schema.json",
  "title": "timestampNotificationSubscriptionV2",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/dhl-dgf-push-api-openapi.yml#/components/schemas/timestampNotificationSubscriptionV2",
  "required": [
    "status",
    "callback-details"
  ],
  "properties": {
    "status": {
      "type": "string",
      "description": "Set to 'ACTIVE' to enable your subscription",
      "enum": [
        "ACTIVE",
        "INACTIVE"
      ]
    },
    "onlyNotifyAPIBookings": {
      "type": "string",
      "description": "Set to 'true' to receive push notifications exclusively for shipments booked through the Shipment Booking API.",
      "enum": [
        "true",
        "false"
      ]
    },
    "subscription-type": {
      "type": "string",
      "description": "Use this property to define the push notification format. Please refer to [GET Started Page](https://developer.dhl.com/api-reference/dgf-push-api#get-started-section/timestamp-push-api-v2) for the subscription types and the corresponding subscribable events for each subscription type",
      "enum": [
        "timestamp-notification",
        "tracking-notification",
        "tracking-notification-v2",
        "tracking-notification-v2-purchase-order"
      ]
    },
    "accountNumbers": {
      "type": "array",
      "description": "Use this property to receive push notifications exclusively for shipments belonging to the specified account number(s)",
      "items": {
        "type": "string"
      }
    },
    "divisionCodes": {
      "type": "array",
      "description": "Use this property to receive push notifications exclusively for shipments belonging to the specified DGF division code(s)",
      "items": {
        "type": "string"
      }
    },
    "filters": {
      "type": "array",
      "items": {
        "required": [
          "modeOfTransport",
          "events"
        ],
        "properties": {
          "modeOfTransport": {
            "type": "string",
            "description": "Use this property to limit push notifications to shipments with the specified mode(s) of transport.  At least one of modeOfTransport, origin, and destination must be provided.",
            "enum": [
              "Air",
              "Ocean",
              "Rail",
              "Road"
            ]
          },
          "origin": {
            "type": "array",
            "description": "Origin country code (2 character) or (UNLOCODE format) (5 character). Use this property to limit push notifications to shipments coming from the specified origin(s).  At least one of modeOfTransport, origin, and destination must be provided.",
            "items": {
              "type": "string"
            }
          },
          "destination": {
            "type": "array",
            "description": "Destination country code (2 character) or (UNLOCODE format) (5 character). Use this property to limit push notifications to shipments going to the specified destination(s). At least one of modeOfTransport, origin, and destination must be provided.",
            "items": {
              "type": "string"
            }
          },
          "events": {
            "type": "array",
            "description": "Event code. Use this property to limit push notifications to status updates for the specified event(s). Please refer to [GET Started Page](https://developer.dhl.com/api-reference/dgf-push-api#get-started-section/timestamp-push-api-v2) for the subscribable event codes for each subscription type",
            "items": {
              "type": "string",
              "minLength": 1
            }
          }
        }
      }
    },
    "callback-details": {
      "properties": {
        "support-email-address": {
          "type": "string",
          "description": "Your support contact email address in case we need to reach you",
          "format": "email"
        },
        "callback-url": {
          "type": "string",
          "format": "uri",
          "description": "Your callback URL where DHL will post the timestamp notification to"
        },
        "http-headers": {
          "additionalProperties": {
            "type": "string"
          },
          "minProperties": 0,
          "maxProperties": 5,
          "description": "Use this to specify the HTTP Headers you want DHL to provide when connecting to your URL e.g. Authorization header or API Key for authentication"
        }
      }
    }
  }
}