{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/sourcefinch-com/json-schema/sourcefinch-com-delivery-schema.json",
  "title": "Delivery",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/sourcefinch-com-openapi.json#/components/schemas/Delivery",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "destination_id": {
      "type": "string",
      "format": "uuid"
    },
    "run_id": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid"
    },
    "source_id": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid"
    },
    "test": {
      "type": "boolean"
    },
    "idempotency_key": {
      "type": "string"
    },
    "status": {
      "type": "string",
      "enum": [
        "pending",
        "in_flight",
        "delivered",
        "dead",
        "cancelled"
      ]
    },
    "attempts": {
      "type": "integer"
    },
    "next_attempt_at": {
      "type": "string",
      "description": "ISO-8601 timestamp (UTC)"
    },
    "payload_sha256": {
      "type": [
        "string",
        "null"
      ]
    },
    "last_status_code": {
      "type": [
        "integer",
        "null"
      ]
    },
    "last_error": {
      "type": [
        "string",
        "null"
      ]
    },
    "last_attempt_at": {
      "type": [
        "string",
        "null"
      ],
      "description": "ISO-8601 timestamp (UTC)"
    },
    "delivered_at": {
      "type": [
        "string",
        "null"
      ],
      "description": "ISO-8601 timestamp (UTC)"
    },
    "created_at": {
      "type": "string",
      "description": "ISO-8601 timestamp (UTC)"
    }
  },
  "required": [
    "id",
    "destination_id",
    "run_id",
    "source_id",
    "test",
    "idempotency_key",
    "status",
    "attempts",
    "next_attempt_at",
    "payload_sha256",
    "last_status_code",
    "last_error",
    "last_attempt_at",
    "delivered_at",
    "created_at"
  ],
  "additionalProperties": false
}