{
  "openapi": "3.0.1",
  "info": {
    "title": "Peppol Participant Lookup – Reachability Monitor",
    "description": "Peppol participant lookup for ERP and invoicing software: bulk e-invoicing reachability check by KvK, VAT, KBO, GLN or SIREN number, with participant ID, document types, processes and access point. Monitor mode follows your counterparties and new registrations.",
    "version": "0.1",
    "x-build-id": "BWYPtpyWwIo7cIWda"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/lwsdjfls~peppol-participant-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-lwsdjfls-peppol-participant-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/lwsdjfls~peppol-participant-monitor/runs": {
      "post": {
        "operationId": "runs-sync-lwsdjfls-peppol-participant-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/lwsdjfls~peppol-participant-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-lwsdjfls-peppol-participant-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",
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "lookup",
              "monitor"
            ],
            "type": "string",
            "description": "Lookup: check every identifier and get the full answer on each run. Monitor: schedule it; you receive only what changed for your identifiers, plus new registrations in the countries you follow.",
            "default": "lookup"
          },
          "identifiers": {
            "title": "Company identifiers",
            "maxItems": 100000,
            "type": "array",
            "description": "One per line: KvK numbers, VAT numbers (NL…B01, BE0…, DE…, FR…, IT…), prefixed numbers (KBO:0403170701, GLN:8712345678906, SIREN:784301772) or Peppol participant IDs (0106:12345678). Bare numbers use the default identifier type below.",
            "items": {
              "type": "string",
              "maxLength": 200
            },
            "default": []
          },
          "defaultIdentifierType": {
            "title": "Default identifier type",
            "enum": [
              "nl-kvk",
              "nl-vat",
              "nl-oin",
              "be-enterprise",
              "be-vat",
              "fr-siren",
              "fr-siret",
              "fr-vat",
              "de-vat",
              "de-leitweg",
              "gln",
              "duns",
              "dk-cvr",
              "se-orgnr",
              "no-orgnr",
              "it-vat"
            ],
            "type": "string",
            "description": "How to read identifiers without a prefix or country code.",
            "default": "nl-kvk"
          },
          "countries": {
            "title": "Countries to follow (monitor mode)",
            "maxItems": 40,
            "type": "array",
            "description": "Two-letter country codes in capitals: BE, FR, NL… Each run reports participants registered in the look-back window, and changes to them.",
            "items": {
              "type": "string",
              "pattern": "^[A-Z]{2}$"
            },
            "default": []
          },
          "lookbackDays": {
            "title": "Look-back window (days)",
            "minimum": 1,
            "maximum": 14,
            "type": "integer",
            "description": "How many registration days to follow per country. A new registration can be listed in the Directory before it is reachable in the network; pending registrations are re-checked every run within this window.",
            "default": 7
          },
          "includeProcesses": {
            "title": "Include processes per document type",
            "type": "boolean",
            "description": "Read the process identifiers of every document type from the participant's SMP. Turn off for faster bulk lookups: every document type is still listed and the access point is still included, but their processes stay empty (null).",
            "default": true
          },
          "maxDocumentTypesPerParticipant": {
            "title": "Document types checked per participant",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Participants with very many document types are checked for this many; all are still listed, up to 200, the rest without their processes. The status reason of such a participant says how many were checked.",
            "default": 50
          },
          "maxLookupsPerRun": {
            "title": "Maximum lookups per run",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Caps the charged lookups in one run. Each run checks identifiers in list order and stops at the cap, so set it to at least the number of identifiers in your list. The Peppol Directory's 2 requests per second cap the run at about 7,000 registered participants per hour, and the run keeps time free to deliver its records before its timeout: with a one-hour timeout it checks at most about 5,800 in lookup mode or a first monitor run (nearly 7,000 in a later monitor run that finds few changes). The default run timeout of 24 hours holds the 100,000 identifiers lookup mode accepts; with a shorter timeout, split a larger list into several runs.",
            "default": 10000
          },
          "maxNewRegistrationsPerRun": {
            "title": "Maximum registrations checked per run (monitor)",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Caps how many new and pending registrations are looked up in the network per run, country by country and newest registration day first. A monitor run delivers at most maxLookupsPerRun + maxNewRegistrationsPerRun changes. What a run holds back is left for later runs, which pick up a registration only while its registration day is within lookbackDays.",
            "default": 2000
          },
          "maxConcurrency": {
            "title": "Maximum concurrency",
            "minimum": 1,
            "maximum": 16,
            "type": "integer",
            "description": "Participants checked in parallel. The Peppol Directory itself is always queried at no more than 2 requests per second.",
            "default": 8
          },
          "webhookUrl": {
            "title": "Webhook URL",
            "type": "string",
            "description": "Optional. In monitor mode, receives a JSON summary with one line per change after each run that found changes. Must be a public address; stored encrypted."
          },
          "stateKey": {
            "title": "Monitor name",
            "type": "string",
            "description": "Keeps separate monitors apart, for example one per customer. Defaults to the task ID; runs started without a task and without a name share one state. Stored encrypted, because it often names a customer."
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}