{
  "openapi": "3.0.1",
  "info": {
    "title": "EUDAMED Certificate Status & Expiry Monitor",
    "description": "Monitor public EU MDR/IVDR certificates by certificate number, manufacturer SRN or notified body and detect status, version, portfolio and expiry changes over time. A NOT_FOUND here never hides a EUDAMED failure, and a certificate leaving a query is never reported as a withdrawal.",
    "version": "0.1",
    "x-build-id": "qkc8hqpMNajheQl6x"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/automa-flow~eudamed-certificate-status-expiry-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-automa-flow-eudamed-certificate-status-expiry-monitor",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/automa-flow~eudamed-certificate-status-expiry-monitor/runs": {
      "post": {
        "operationId": "runs-sync-automa-flow-eudamed-certificate-status-expiry-monitor",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/automa-flow~eudamed-certificate-status-expiry-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-automa-flow-eudamed-certificate-status-expiry-monitor",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "required": [
          "watchItems"
        ],
        "properties": {
          "watchItems": {
            "title": "Certificates, manufacturers and notified bodies to watch",
            "maxItems": 500,
            "type": "array",
            "description": "Each entry is an object with a type, a value and an optional label of your own. type is certificate (an exact certificate number such as Z-25-052-S-IX-E), manufacturer_srn (an EUDAMED actor SRN such as DE-MF-000006413) or notified_body_srn (the four-digit notified-body number such as 0633). Values are trimmed and duplicates removed before any request, so nothing is queried or charged twice. A company name is rejected rather than guessed into an SRN. Up to 500 items per run."
          },
          "monitorChanges": {
            "title": "Detect changes since the last run",
            "type": "boolean",
            "description": "Compare each certificate against its last complete observation and report FIRST_OBSERVATION, CERTIFICATE_CHANGED, STATUS_CHANGED, SUSPENDED, REINSTATED, WITHDRAWN, RESTRICTED, CANCELLED, VERSION_CHANGED, EXPIRY_DATE_CHANGED, EXPIRING_SOON, EXPIRED, MANUFACTURER_CHANGED, NOTIFIED_BODY_CHANGED, CERTIFICATE_ADDED and MISSING_FROM_QUERY. A failed, guarded or truncated check never overwrites a good baseline, so a EUDAMED outage cannot manufacture a status or removal event. Turn it off for a one-off lookup that stores nothing.",
            "default": true
          },
          "emitUnchanged": {
            "title": "Include unchanged certificates",
            "type": "boolean",
            "description": "When off, a run returns only certificates whose state moved, plus every diagnostic row. Each certificate is still checked and its baseline still updated, and the run summary still counts them all, but unchanged certificates are neither returned nor charged, so a standing daily watch costs only for the changes it finds.",
            "default": true
          },
          "includeDetails": {
            "title": "Fetch status-change reasons and decision dates",
            "type": "boolean",
            "description": "Adds one request for certificates in AMENDED, SUPPLEMENTED, SUSPENDED, REINSTATED, WITHDRAWN, RESTRICTED or CANCELLED status to collect decision and version dates, status-change reasons, notified-body name and EUDAMED certificate ID. ISSUED and REISSUED certificates remain search-only. Status, expiry, version, manufacturer and notified-body number are monitored either way.",
            "default": true
          },
          "monitorId": {
            "title": "Independent monitor ID",
            "minLength": 1,
            "maxLength": 128,
            "type": "string",
            "description": "Optional stable name for this monitoring history. Use a different value when separate API clients or schedules watch the same certificate set independently. Saved Tasks are isolated automatically by Task ID."
          },
          "expiryWarningDays": {
            "title": "Expiry warning window (days)",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "How far ahead a certificate counts as EXPIRING_SOON. An EXPIRING_SOON event fires on the run where a certificate crosses into this window, not on every run afterwards; the standing state is always readable in expiry_state.",
            "default": 90
          },
          "maxCertificatesPerWatch": {
            "title": "Maximum certificates per watch item",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "A safety cap for manufacturer and notified-body watches, not a truncation setting. A watch query matching more than this collects nothing, is reported as PARTIAL, and derives no portfolio change from a partial view, because a half-seen portfolio would look like certificates disappearing.",
            "default": 1000
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}