{
  "openapi": "3.0.1",
  "info": {
    "title": "EU Battery Passport Validator & DPP Generator",
    "description": "Traceable battery DPP readiness assessments, evidence gaps, conflict findings and preparation packages — not legal certification or Registry submission.",
    "version": "1.0",
    "x-build-id": "EGdhwJHNJlDPa3hgf"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/zentrafoundry~eu-battery-passport-readiness-auditor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-zentrafoundry-eu-battery-passport-readiness-auditor",
        "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/zentrafoundry~eu-battery-passport-readiness-auditor/runs": {
      "post": {
        "operationId": "runs-sync-zentrafoundry-eu-battery-passport-readiness-auditor",
        "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/zentrafoundry~eu-battery-passport-readiness-auditor/run-sync": {
      "post": {
        "operationId": "run-sync-zentrafoundry-eu-battery-passport-readiness-auditor",
        "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",
        "properties": {
          "mode": {
            "title": "Operation mode",
            "enum": [
              "audit",
              "audit-and-build",
              "validate-existing",
              "monitor"
            ],
            "type": "string",
            "description": "Choose audit for readiness findings, audit-and-build for readiness findings plus a preparation package, validate-existing for supplied DPP records, or monitor for deployed DPP URLs.",
            "default": "audit-and-build"
          },
          "sector": {
            "title": "Sector",
            "enum": [
              "battery"
            ],
            "type": "string",
            "description": "This specialized Actor implements battery readiness only.",
            "default": "battery"
          },
          "useExampleData": {
            "title": "Use built-in example batteries",
            "type": "boolean",
            "description": "Runs three deterministic synthetic battery records. It needs no credentials, does not contact a Registry, and never emits buyer-value events.",
            "default": true
          },
          "strictness": {
            "title": "Evidence strictness",
            "enum": [
              "official-evidence-only",
              "allow-unverified"
            ],
            "type": "string",
            "description": "Official-evidence-only accepts listed technical, declaration, test, conformity, or regulatory evidence with a stable URL or document hash. Allow unverified keeps supplied claims visible but not upgraded to proof.",
            "default": "official-evidence-only"
          },
          "language": {
            "title": "Output language",
            "enum": [
              "en"
            ],
            "type": "string",
            "description": "English output is implemented in this release.",
            "default": "en"
          },
          "records": {
            "title": "Battery product records",
            "type": "array",
            "description": "Use in audit modes. Supply productId, productName, manufacturer, batteryCategory, model, capacityKwh, batteryChemistry, carbonFootprintKgCo2e, manufacturingLocation, and evidence where available. Set Use built-in example batteries to false when supplying records."
          },
          "productUrls": {
            "title": "Product page URLs",
            "type": "array",
            "description": "Use in audit modes. Credential-free public HTTP(S) product pages or JSON, XML, CSV, HTML/text documents only. Private, local, login-protected, paywalled, or CAPTCHA-protected targets are rejected.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "evidenceUrls": {
            "title": "Evidence document URLs",
            "type": "array",
            "description": "Use in audit modes. Credential-free public HTTP(S) JSON, XML, CSV, HTML/text, or text-based PDF documents. Documents are limited by Maximum document size.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "sourceDatasetId": {
            "title": "Source Apify dataset ID",
            "type": "string",
            "description": "Use in audit modes to consume readable rows from another Apify Actor dataset. The rows are evaluated as battery product records; the Actor does not require another account credential."
          },
          "dppRecords": {
            "title": "Existing DPP records",
            "type": "array",
            "description": "Use primarily with Validate existing DPP records. Supply structured existing DPP/product records for gap, provenance, conflict, identifier, and HTTPS URL checks."
          },
          "dppUrls": {
            "title": "Deployed DPP URLs",
            "type": "array",
            "description": "Use primarily with Monitor. Supply credential-free public HTTPS DPP URLs. The Actor checks bounded availability, HTTPS syntax, and whether the response is a recognizable structured document; it never performs Registry login or submission.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "outputFormats": {
            "title": "Output formats",
            "type": "array",
            "description": "JSON readiness assessments and machine-readable DPP preparation JSON/XML are always retained for audit-and-build and validate-existing. Select auxiliary CSV, HTML, QR, XML, or ZIP artifacts as needed.",
            "items": {
              "type": "string",
              "enum": [
                "json",
                "csv",
                "html",
                "xml",
                "qr",
                "zip"
              ]
            },
            "default": [
              "json",
              "csv",
              "html",
              "qr"
            ]
          },
          "includeQrCodes": {
            "title": "Include QR codes",
            "type": "boolean",
            "description": "Generate PNG QR preparation artifacts when qr is selected. Without a supplied valid HTTPS DPP URL, a QR encodes a clearly non-deployable preparation URI.",
            "default": true
          },
          "includeHtmlReport": {
            "title": "Include HTML report",
            "type": "boolean",
            "description": "Write a buyer-readable HTML readiness summary when html is selected.",
            "default": true
          },
          "maxProducts": {
            "title": "Maximum products",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum product or DPP records processed in one run. The built-in three-record fixture is never truncated. Buyer-supplied completed assessments may be billable once per unique product model.",
            "default": 50
          },
          "requestTimeoutSecs": {
            "title": "Request timeout (seconds)",
            "minimum": 5,
            "maximum": 120,
            "type": "integer",
            "description": "Maximum time for each public document or DPP URL request, including bounded redirects.",
            "default": 15
          },
          "maxDocumentSizeMb": {
            "title": "Maximum document size (MB)",
            "minimum": 1,
            "maximum": 25,
            "type": "integer",
            "description": "Maximum downloaded size for each public document. Supported range is 1–25 MB; large, private, or inaccessible documents are recorded as input diagnostics instead of causing a silent claim.",
            "default": 8
          },
          "monitorChecks": {
            "title": "Monitoring checks",
            "type": "array",
            "description": "Used in Monitor mode: availability, credential-free HTTPS URL syntax, and recognizable structured-document content type. Registry validation, identifier-authority checks, QR-target verification, and evidence-link crawling are not implemented claims.",
            "items": {
              "type": "string",
              "enum": [
                "availability",
                "https",
                "structured-document"
              ]
            },
            "default": [
              "availability",
              "https",
              "structured-document"
            ]
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}