{
  "openapi": "3.0.1",
  "info": {
    "title": "FEC Checker — Fichier des Écritures Comptables Validator",
    "description": "Vérifiez votre FEC avant un contrôle fiscal (art. A47 A-1 LPF) : 18 colonnes, dates, équilibre, numérotation, signaux de risque et plan de correction IA.\nValidate a French FEC against art. A47 A-1 LPF before a tax audit: 18 columns, dates, balance, numbering gaps, plus risk signals and an optional A",
    "version": "0.1",
    "x-build-id": "SyNvpcZESKJz5BeSO"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/highfiddle~fec-checker/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-highfiddle-fec-checker",
        "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/highfiddle~fec-checker/runs": {
      "post": {
        "operationId": "runs-sync-highfiddle-fec-checker",
        "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/highfiddle~fec-checker/run-sync": {
      "post": {
        "operationId": "run-sync-highfiddle-fec-checker",
        "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": {
          "fecFile": {
            "title": "FEC file",
            "type": "string",
            "description": "The FEC to check: upload it or paste an http(s) URL to it. Expected format: one flat .txt file, tab- or pipe-separated, UTF-8 or ISO-8859-15, with the 18 columns JournalCode … Idevise, named SIRENFECAAAAMMJJ.txt (for example 123456782FEC20251231.txt). A .zip holding exactly one .txt FEC is unpacked; a UTF-16 export is read with a warning. PDFs, spreadsheets and other non-text files are refused before the check and not charged. Leave empty to check a bundled synthetic demo file; demo runs are not charged.",
            "default": ""
          },
          "language": {
            "title": "Report language",
            "enum": [
              "fr",
              "en"
            ],
            "type": "string",
            "description": "Language of the report messages and of the AI summary: \"fr\" (French) or \"en\" (English). Rule codes, field names and the JSON structure are the same in both languages.",
            "default": "fr"
          },
          "includeAiReport": {
            "title": "Include AI summary",
            "type": "boolean",
            "description": "Add a prioritized fix list written by AI (Claude, by Anthropic) in the aiSummary field. Charged as one extra \"ai-report\" event, only when the summary is produced. Only the report is sent to the AI (rule codes, counts, line numbers, statistics), never lines, labels or values from the file.",
            "default": false
          },
          "fiscalYearEnd": {
            "title": "Fiscal year end",
            "type": "string",
            "description": "Closing date of the fiscal year, as YYYY-MM-DD. Lines dated after it are flagged with the entries_after_fiscal_year_end risk signal, and a warning is raised if it differs from the date in the file name. Leave empty to use the date in the file name (the AAAAMMJJ part of SIRENFECAAAAMMJJ.txt)."
          },
          "fileName": {
            "title": "Original file name",
            "type": "string",
            "description": "The file name to check against the SIRENFECAAAAMMJJ.txt naming rule. Set it when the upload or URL does not keep the original name, otherwise the file_name rule may fail. Leave empty to use the name given by the download.",
            "default": ""
          },
          "maxIssuesPerRule": {
            "title": "Max occurrences listed per rule",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Every occurrence of a rule is counted, but only the first N are listed with their line number, field, entry and value. Raise it to get every line to fix (1 to 10000).",
            "default": 50
          },
          "deleteUploadedFile": {
            "title": "Delete the uploaded file after the check",
            "type": "boolean",
            "description": "When the file was uploaded to your Apify storage through this form, delete it once the report is written, so only the report is kept. Files given by an external URL are never touched. Turn off to keep the upload, for example to run the check again.",
            "default": true
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}