{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/opentrack/json-schema/opentrack-webhook-registration-request-schema.json",
  "title": "WebhookRegistrationRequest",
  "x-generated": "2026-11-15",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/opentrack-api-openapi.yml#/components/schemas/WebhookRegistrationRequest",
  "anyOf": [
    {
      "required": [
        "url"
      ]
    },
    {
      "required": [
        "events"
      ]
    },
    {
      "required": [
        "secret"
      ]
    },
    {
      "required": [
        "name"
      ]
    },
    {
      "required": [
        "callbackHeaders"
      ]
    }
  ],
  "properties": {
    "url": {
      "type": "string"
    },
    "events": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Event"
      }
    },
    "secret": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "callbackHeaders": {
      "type": "object"
    }
  },
  "$defs": {
    "Event": {
      "type": "string",
      "enum": [
        "container.status.updated",
        "container.history.updated",
        "container.itinerary.updated",
        "container.location.updated",
        "container.holds.updated",
        "container.demurrage.updated",
        "container.exceptions.updated",
        "container.tracking.stopped",
        "container.tracking.failed",
        "shipment.itinerary.updated",
        "shipment.tracking.failed"
      ]
    }
  }
}