{
  "openapi": "3.0.1",
  "info": {
    "title": "EU VIES VAT Number Batch Validator & Reverse-Charge Check",
    "description": "Validate EU & Northern Ireland (XI) VAT numbers in batch via the official European Commission VIES API, with B2B reverse-charge flags, Member State status and GDPR sole-trader redaction. New: official EU VAT rates by country, CN/CPA code or category (TEDB).",
    "version": "0.2",
    "x-build-id": "0hkYggUoWifMkSpDi"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/itulo~eu-vies-vat-validator/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-itulo-eu-vies-vat-validator",
        "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/itulo~eu-vies-vat-validator/runs": {
      "post": {
        "operationId": "runs-sync-itulo-eu-vies-vat-validator",
        "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/itulo~eu-vies-vat-validator/run-sync": {
      "post": {
        "operationId": "run-sync-itulo-eu-vies-vat-validator",
        "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": [
              "validate_batch",
              "member_state_status",
              "vat_rates"
            ],
            "type": "string",
            "description": "validate_batch validates a list of EU/XI VAT numbers; member_state_status checks availability of all 28 national VAT databases; vat_rates returns VAT rates per Member State from the European Commission TEDB (standard, reduced, super-reduced, parking; optionally for CN/CPA codes or categories).",
            "default": "validate_batch"
          },
          "vatNumbers": {
            "title": "VAT numbers to validate",
            "type": "array",
            "description": "List of EU/XI VAT numbers with country prefix (e.g. 'FI01120389', 'FI10728943', 'DE123456789'). Spaces, dots, and hyphens are stripped automatically.",
            "default": [
              "FI01120389",
              "FI10728943"
            ],
            "items": {
              "type": "string"
            }
          },
          "supplierCountryCode": {
            "title": "Supplier country code (for reverse-charge check)",
            "type": "string",
            "description": "Two-letter EU country code of the seller/supplier (e.g. 'FI', 'DE') to flag cross-border B2B reverse-charge candidates.",
            "default": "FI"
          },
          "requesterMemberStateCode": {
            "title": "Requester Member State code (optional)",
            "type": "string",
            "description": "Optional requester EU Member State code if requesting an official VIES consultation reference identifier.",
            "default": ""
          },
          "requesterNumber": {
            "title": "Requester VAT number without prefix (optional)",
            "type": "string",
            "description": "Optional requester VAT number (without country prefix) to obtain a VIES consultation requestIdentifier.",
            "default": ""
          },
          "includeMemberStateStatus": {
            "title": "Also output Member State availability table",
            "type": "boolean",
            "description": "When true in validate_batch mode, also writes the 28 Member State VIES availability rows.",
            "default": false
          },
          "vatRateCountries": {
            "title": "VAT rates: countries",
            "type": "array",
            "description": "vat_rates mode: EU Member State codes (GR accepted as EL; XI = Northern Ireland). Empty = all 27.",
            "items": {
              "type": "string"
            }
          },
          "vatRateDate": {
            "title": "VAT rates: situation on (YYYY-MM-DD)",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2})?$",
            "type": "string",
            "description": "vat_rates mode: date the rates should apply on. Default today."
          },
          "cnCodes": {
            "title": "VAT rates: CN codes",
            "type": "array",
            "description": "vat_rates mode: optional Combined Nomenclature goods codes (e.g. 4901 books) to get the rate that applies to them.",
            "items": {
              "type": "string"
            }
          },
          "cpaCodes": {
            "title": "VAT rates: CPA codes",
            "type": "array",
            "description": "vat_rates mode: optional CPA service codes (e.g. 55.10).",
            "items": {
              "type": "string"
            }
          },
          "vatRateCategories": {
            "title": "VAT rates: TEDB categories",
            "type": "array",
            "description": "vat_rates mode: optional TEDB category identifiers (e.g. FOODSTUFFS, BOOKS).",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}