{
  "openapi": "3.0.1",
  "info": {
    "title": "Neotimo API",
    "description": "# Neotimo API\r\n\r\n> Émission et réception de factures électroniques pour PME françaises. **L'environnement est porté par la clé, pas par l'URL** (modèle Stripe) : un seul hôte `https://api.neotimo.com`, `ak_test_…` = sandbox (simulateur, rien ne part vers le PPF), `ak_live_…` = production. Il n'existe pas de `sandbox.neotimo.com` — chez nous le sous-domaine désigne le tenant (`{slug}.neotimo.com`). `GET /me` vous dit dans quel mode votre clé se trouve.\r\n\r\nWelcome! This API gives you programmatic access to the platform's resources:\r\norganizations, accounts, files, settings, and more depending on which modules are enabled.\r\n\r\nWhether you're a partner integrating our services, a dev automating workflows,\r\nor an AI reading this doc at 3 AM — you're in the right place.\r\n\r\n---\r\n\r\n## Quick Start — from zero to your first API call in 3 minutes\r\n\r\n### Step 1: Get your API key\r\n\r\nYour administrator creates a key from the back-office (**Settings > API Keys**).\r\n\r\nIf you're an admin yourself, you can also create one via the API\r\n(yes, it's recursive — and yes, we think that's elegant):\r\n\r\n```bash\r\ncurl -X POST https://api.neotimo.com/api/v1/core/api-keys \\\r\n  -H \"Authorization: Bearer <admin_token>\" \\\r\n  -H \"Content-Type: application/json\" \\\r\n  -d '{\r\n    \"name\": \"My awesome integration\",\r\n    \"roles\": \"user\",\r\n    \"isTest\": false\r\n  }'\r\n```\r\n\r\nYou'll get back:\r\n\r\n```json\r\n{\r\n  \"data\": {\r\n    \"id\": 42,\r\n    \"name\": \"My awesome integration\",\r\n    \"key\": \"ak_live_AbCdEfGhIjKlMnOpQrStUv\",\r\n    \"keyPrefix\": \"ak_live_AbCd\",\r\n    \"roles\": \"user\"\r\n  }\r\n}\r\n```\r\n\r\n> **Copy your key right now!** It's only shown once.\r\n> Like that brilliant idea you had at 3 AM but didn't write down.\r\n\r\n### Step 2: Make your first call\r\n\r\nAdd the `X-Api-Key` header to every request:\r\n\r\n```bash\r\ncurl https://api.neotimo.com/api/v1/core/me \\\r\n  -H \"X-Api-Key: ak_live_AbCdEfGhIjKlMnOpQrStUv\"\r\n```\r\n\r\nThat's it. No OAuth dance, no token refresh, no existential crisis.\r\n\r\n### Step 3: Verify it works\r\n\r\nA successful `/api/v1/core/me` response looks like this:\r\n\r\n```json\r\n{\r\n  \"data\": {\r\n    \"name\": \"My awesome integration\",\r\n    \"roles\": [\"user\"],\r\n    \"tenantId\": 1\r\n  }\r\n}\r\n```\r\n\r\n| Code | What it means |\r\n|------|--------------|\r\n| `200` | All good, you're in |\r\n| `401` | Invalid or missing key — double-check your header |\r\n| `403` | Key is valid but lacks the required role — ask your admin |\r\n| `429` | Too many requests — more on that below |\r\n\r\n---\r\n\r\n## Authentication\r\n\r\nTwo methods, pick your favorite — unlike restaurants, both are equally good here:\r\n\r\n| Method | Header | Best for |\r\n|--------|--------|----------|\r\n| **API Key** | `X-Api-Key: ak_live_...` | Partners, webhooks, server-to-server integrations |\r\n| **Bearer Token** | `Authorization: Bearer eyJ...` | Apps with user context |\r\n\r\nAPI keys are prefixed so you never mix them up:\r\n- `ak_live_` — production (the real deal)\r\n- `ak_test_` — sandbox (where you can break things without consequences)\r\n\r\n### API Key lifecycle\r\n\r\nEvery key has an **expiration date** (default **12 months**, max 24). Forever-valid keys are a security smell — they outlive the engineer who created them and the integration they were meant for.\r\n\r\n- We email the key owner at **T-30 / T-7 / T-1** days before expiry. No surprises.\r\n- **Rotate** before expiry with one atomic call:\r\n\r\n  ```bash\r\n  curl -X POST https://api.neotimo.com/api/v1/core/api-keys/42/rotate \\\r\n    -H \"Authorization: Bearer <admin_token>\"\r\n  ```\r\n\r\n  The response carries the freshly minted key (same shape as Create — copy it now, it's only shown once). The old key keeps authenticating during the **overlap window (default 24h)** so you can roll the secret across your deployment without downtime. A background job auto-revokes the old key once the window closes — no clean-up step on your side.\r\n\r\n- Need to revoke right now? Delete it from **Settings > API Keys** — effective immediately, all in-flight calls fail with `401`.\r\n- A key is hashed at rest (with a server-side pepper). We can't recover it for you — only re-issue.\r\n\r\n---\r\n\r\n## Response Format\r\n\r\nEvery response uses the same envelope. No surprises, we promise:\r\n\r\n```json\r\n{\r\n  \"data\": { ... },\r\n  \"pagination\": {\r\n    \"page\": 1,\r\n    \"pageSize\": 20,\r\n    \"totalCount\": 142,\r\n    \"totalPages\": 8\r\n  }\r\n}\r\n```\r\n\r\nErrors follow [RFC 9457 — Problem Details](https://www.rfc-editor.org/rfc/rfc9457).\r\nBecause even our errors are well-dressed.\r\n\r\n```json\r\nHTTP 422 Unprocessable Entity\r\n{\r\n  \"type\": \"https://docs.anplatform.fr/errors/validation\",\r\n  \"title\": \"Validation Error\",\r\n  \"status\": 422,\r\n  \"detail\": \"One or more fields are invalid.\",\r\n  \"errors\": {\r\n    \"email\": [\"The email field is required.\"]\r\n  },\r\n  \"traceId\": \"00-abc123...\"\r\n}\r\n```\r\n\r\n| Status | When |\r\n|--------|------|\r\n| `400` | Bad JSON / missing required param |\r\n| `401` | Not authenticated (no/invalid/expired key) |\r\n| `403` | Authenticated but no permission for this action |\r\n| `404` | Resource not found |\r\n| `409` | Conflict (duplicate, version mismatch, idempotency mismatch — see below) |\r\n| `422` | Validation error (business rules) |\r\n| `429` | Rate limit exceeded — see [Rate Limits](#rate-limits) |\r\n| `500` | Unexpected — please report with the `traceId` |\r\n\r\nThe `traceId` is yours: include it in support tickets and we can pull\r\nthe exact request from our logs in seconds.\r\n\r\n---\r\n\r\n## Pagination\r\n\r\nAll list endpoints support pagination via query string:\r\n\r\n```\r\nGET /api/v1/core/api-keys?page=2&pageSize=50\r\n```\r\n\r\n| Parameter | Default | Description |\r\n|-----------|---------|------------|\r\n| `page` | 1 | Page number (starts at 1, like humans count) |\r\n| `pageSize` | 20 | Items per page (max: 100) |\r\n| `sort` | (id) | Property name to sort by |\r\n| `order` | `asc` | `asc` or `desc` (case-insensitive) |\r\n\r\nSend `?order=ascending` or `?pageSize=500` and you get a `422` with the\r\nexact field that's wrong. We'd rather tell you than silently clamp.\r\n\r\n---\r\n\r\n## Rate Limits\r\n\r\n| Caller type | Limit |\r\n|-------------|-------|\r\n| Authenticated (Bearer) | **100 req/min** per user |\r\n| API Key | Configurable per key |\r\n| Anonymous | **10 req/min** per IP |\r\n\r\nHit the limit? You'll get a `429 Too Many Requests` with a\r\n`Retry-After` header (in seconds) telling you exactly when to come\r\nback. Grab a coffee and try again then. No hard feelings.\r\n\r\n---\r\n\r\n## Idempotency — safe retries for POST\r\n\r\n`PUT` and `DELETE` are idempotent by definition. `POST` is not — and\r\nthat's the single biggest source of duplicate invoices, double-charged\r\npayments, and weekend incidents.\r\n\r\nEvery `POST` that creates or mutates a resource accepts an\r\n**`Idempotency-Key`** header (UUID v4 or ULID, your choice):\r\n\r\n```bash\r\ncurl -X POST https://api.neotimo.com/api/v1/core/api-keys \\\r\n  -H \"X-Api-Key: ak_live_...\" \\\r\n  -H \"Idempotency-Key: 7f3b9c8a-1234-4abc-9def-fedcba987654\" \\\r\n  -H \"Content-Type: application/json\" \\\r\n  -d '{ \"name\": \"My integration\" }'\r\n```\r\n\r\nWhat happens:\r\n\r\n| Scenario | Result |\r\n|----------|--------|\r\n| **First call with key X** | Action runs, response cached for **24 hours** |\r\n| **Retry with the same key X, same body** | Cached response replayed — action does NOT re-run |\r\n| **Retry with the same key X, different body** | `409 Conflict` — different payload, refuse to guess |\r\n| **No key** | Server runs the action; you own the deduplication |\r\n\r\nSend a fresh key for every distinct operation, and **reuse the same\r\nkey on retries** after a network blip. The cache is scoped per\r\n`(tenant, principal)` so two callers using the same string don't\r\ncollide.\r\n\r\n---\r\n\r\n## Versioning\r\n\r\nThe path carries the major version: `/api/v1/core/me`, `/api/v2/...`.\r\nUnder the hood we use Asp.Versioning with `ApiVersion(\"1.0\")` — the URL\r\ntemplate substitutes that as `v1` (drop the `.0` for the URL, keep it in\r\nattributes). So `[ApiVersion(\"1.0\")]` plus `[Route(\"api/v{version:apiVersion}/...\")]`\r\nrenders as `/api/v1/...` in the docs and the actual routing table.\r\n\r\n- We **increment major** only on breaking changes (removed field,\r\n  changed type, changed behavior). Adding a field doesn't count.\r\n- We support at most **two majors simultaneously** (current + previous).\r\n  Migrate within the deprecation window we announce — typically 6 months.\r\n- Within a major, we may add optional fields, new endpoints, new\r\n  status codes you weren't expecting. Code defensively: ignore unknown\r\n  JSON fields, don't assume the response shape is closed.\r\n\r\n---\r\n\r\n## Audit & Transparency\r\n\r\nEvery mutating call you make (`POST`, `PUT`, `PATCH`, `DELETE` under\r\n`/api/v…`) is recorded server-side: who called, when, from where,\r\nwhich route, what status, the parameters that don't carry secrets.\r\nWe keep this for **12 months** in hot storage.\r\n\r\nWhy you should care:\r\n\r\n- If something looks wrong on our side, **send us the `traceId`** —\r\n  we can pull the exact row in seconds.\r\n- If something looks wrong on your side, we have receipts. The same\r\n  audit feeds the customer's \"API activity\" panel.\r\n- Secrets (anything tagged `x-sensitive: true` in the OpenAPI spec —\r\n  tokens, codes, anti-CSRF nonces) are **redacted before persistence**.\r\n  Your SDK can mirror this and mask the same values in its own logs.\r\n\r\n---\r\n\r\n## Tips & Best Practices\r\n\r\n- All dates are **ISO 8601 / UTC** — no timezone debates here\r\n- `DELETE` returns `204 No Content` — silence means it worked\r\n- IDs are `long` (int64) — we think big\r\n- Use `isTest: true` to create sandbox keys during development\r\n- Keep your API keys safe (environment variables, vault — not a sticky note on your monitor)\r\n\r\n---\r\n\r\n*Crafted with coffee and mild stubbornness by [Avenir Numérique](https://avenir-numerique.fr)*\r\n\r\n<!-- If you're reading the source of this doc, congrats. You deserve a cookie. -->\r\n",
    "contact": {
      "name": "Neotimo",
      "url": "https://neotimo.com"
    },
    "version": "v1"
  },
  "servers": [
    {
      "url": "https://api.neotimo.com",
      "description": "Hôte unique — ak_test_ = sandbox, ak_live_ = production"
    }
  ],
  "paths": {
    "/api/v1/neotimo/annuaire/register": {
      "post": {
        "tags": [
          "Neotimo/Annuaire"
        ],
        "summary": "Starts a PA registration.",
        "description": "The caller hands us a matricule. If the entry is `Unclaimed`\r\non our side, we mail a magic link to the DGFIP-known address and\r\nreply with a generic OK. Same shape returned whether or not the\r\nmatricule exists — partners can't enumerate the directory through\r\nretries. Useful for a PA that wants to kick off their enrolment\r\nprogrammatically from their own back-office instead of clicking\r\nthrough our public sign-up page.",
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/RegisterPaRequestDto"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RegisterPaRequestDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RegisterPaRequestDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RegisterPaRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Init result — see An.Platform.Module.Neotimo.Presentation.Dtos.PaDirectory.RegisterPaResult.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_RegisterPaResponseDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_RegisterPaResponseDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_RegisterPaResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "Missing matricule.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/neotimo/annuaire/directory/pa/{matricule}": {
      "get": {
        "tags": [
          "Neotimo/Annuaire"
        ],
        "summary": "Looks up a PA by matricule.",
        "description": "Only `Status=Active` entries surface. An unknown or non-Active\r\nmatricule yields 404 with no extra information — we don't tell the\r\ncaller whether the matricule exists in any other state.",
        "parameters": [
          {
            "name": "matricule",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Active entry found.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_PaDirectoryPeerDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_PaDirectoryPeerDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_PaDirectoryPeerDto"
                }
              }
            }
          },
          "404": {
            "description": "Unknown matricule, or entry not yet Active.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Not authenticated."
          },
          "403": {
            "description": "Authenticated but missing the `neotimo-pa` role."
          }
        },
        "security": [
          {
            "Bearer": [ ],
            "ApiKey": [ ]
          }
        ]
      }
    },
    "/api/v1/neotimo/annuaire/directory/pa/search": {
      "get": {
        "tags": [
          "Neotimo/Annuaire"
        ],
        "summary": "Searches Active PAs by matricule, SIREN or denomination.",
        "description": "Every filter is optional: `matricule` and `siren` match by\r\nprefix, `denomination` matches by substring (case-insensitive).\r\n`page` is 1-based; `pageSize` is clamped server-side to\r\n100 — paginate honestly rather than swallow the limit silently.",
        "parameters": [
          {
            "name": "matricule",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "siren",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "denomination",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Paged result (may be empty — that's a normal answer).",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_PagedResult_PaDirectoryPeerDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_PagedResult_PaDirectoryPeerDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_PagedResult_PaDirectoryPeerDto"
                }
              }
            }
          },
          "401": {
            "description": "Not authenticated."
          },
          "403": {
            "description": "Authenticated but missing the `neotimo-pa` role."
          }
        },
        "security": [
          {
            "Bearer": [ ],
            "ApiKey": [ ]
          }
        ]
      }
    },
    "/api/v1/neotimo/annuaire/directory/pa": {
      "get": {
        "tags": [
          "Neotimo/Annuaire"
        ],
        "summary": "Lists every Active PA, paged.",
        "description": "No filter — useful to build your own peer index or cache. `page`\r\nis 1-based; `pageSize` is clamped server-side to 100.",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Paged result (may be empty).",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_PagedResult_PaDirectoryPeerDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_PagedResult_PaDirectoryPeerDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_PagedResult_PaDirectoryPeerDto"
                }
              }
            }
          },
          "401": {
            "description": "Not authenticated."
          },
          "403": {
            "description": "Authenticated but missing the `neotimo-pa` role."
          }
        },
        "security": [
          {
            "Bearer": [ ],
            "ApiKey": [ ]
          }
        ]
      }
    },
    "/api/v1/neotimo/annuaire/me": {
      "get": {
        "tags": [
          "Neotimo/Annuaire"
        ],
        "summary": "Returns your directory entry.",
        "description": "Capabilities are included. The fiche is resolved from your\r\n`core:entityid` claim — partners and other PAs never see this\r\nsurface, only the logged-in owner does.",
        "responses": {
          "200": {
            "description": "Entry found.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_PaDirectoryDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_PaDirectoryDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_PaDirectoryDto"
                }
              }
            }
          },
          "403": {
            "description": "No authenticated EntityId on the principal — the caller is not a PA.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "No directory entry is linked to your account.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ],
            "ApiKey": [ ]
          }
        ]
      },
      "put": {
        "tags": [
          "Neotimo/Annuaire"
        ],
        "summary": "Updates contacts and capabilities of your entry.",
        "description": "One PUT, aggregate save. See An.Platform.Module.Neotimo.Presentation.Dtos.PaDirectory.PaDirectoryEditableDto\r\nfor the diff semantics: `null` capabilities = partial patch\r\n(contacts only), `[]` = delete every capability, non-empty =\r\nper-Id diff (add / update / delete in one transaction). A capability\r\nId that doesn't belong to your fiche is rejected with 400 — no\r\ncross-PA writes.",
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/PaDirectoryEditableDto"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PaDirectoryEditableDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/PaDirectoryEditableDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/PaDirectoryEditableDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Entry updated, with the add/update/delete counters in the body.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_PaDirectorySaveResult"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_PaDirectorySaveResult"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_PaDirectorySaveResult"
                }
              }
            }
          },
          "400": {
            "description": "Invalid payload — unknown capability Id, or a capability that doesn't belong to your entry.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "No authenticated EntityId on the principal — the caller is not a PA.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "No directory entry is linked to your account.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ],
            "ApiKey": [ ]
          }
        ]
      }
    },
    "/api/v1/neotimo/annuaire/me/capabilities/{capabilityId}/test": {
      "post": {
        "tags": [
          "Neotimo/Annuaire"
        ],
        "summary": "Probes one of your channels and records the outcome.",
        "description": "We hit the capability endpoint, capture whether it answers and how\r\nfast, then stamp the row with `LastTestStatus` / `LastTestedAt`.\r\nMarked An.Platform.Module.Core.Presentation.Attributes.SkipIdempotencyAttribute: re-running the test\r\nIS the action — replaying a cached \"the endpoint was up ten minutes\r\nago\" answer would defeat the diagnostic.",
        "parameters": [
          {
            "name": "capabilityId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Test result (Success/Failed + message).",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_CapabilityTestResult"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_CapabilityTestResult"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_CapabilityTestResult"
                }
              }
            }
          },
          "403": {
            "description": "No authenticated EntityId on the principal — the caller is not a PA.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Capability unknown, or belongs to another entry.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ],
            "ApiKey": [ ]
          }
        ]
      }
    },
    "/api/v1/core/authz/manifest": {
      "get": {
        "tags": [
          "Core/Authz"
        ],
        "summary": "Returns the in-memory authorization manifest as JSON.",
        "description": "Filter to a single module via `?module=Core` (case-sensitive, matches the\r\nnamespace-derived module name). Add `?includeDrift=true` to receive the drift\r\nsection alongside the entries — comparing the manifest with the effective\r\n`Feature` + `Authorization` state in the database. Drift is computed only\r\nwhen requested because it triggers a DB read; the entry list alone is served from\r\nthe cached scan.\r\n\n\r\nThe payload uses `System.Text.Json` with camelCase property names and enums as\r\nstrings (`\"Page\"`, not `1`). Field names are part of the contract — see\r\n`AuthorizationManifestApiResponse` for the canonical schema.\r\n",
        "parameters": [
          {
            "name": "module",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "includeDrift",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Manifest returned",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_AuthorizationManifestApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_AuthorizationManifestApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_AuthorizationManifestApiResponse"
                }
              }
            }
          },
          "401": {
            "description": "Not authenticated",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but not SuperAdmin",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ],
            "ApiKey": [ ]
          }
        ]
      }
    },
    "/api/v1/neotimo/compliance/invoices/{frInvoiceId}/cash-confirmation": {
      "post": {
        "tags": [
          "Neotimo/Compliance"
        ],
        "summary": "Declares a cash receipt for the specified F2 invoice (SC-07 scenario).",
        "description": "Human action: the issuing client confirms the payment landed on its bank account.\r\nNEOTIMO emits the CDV 212 (Cashed) lifecycle event to the PPF over SFTP (workflow WF16).\r\n            \r\nPrecondition: F2 status in {205 Approved, 211 Payment sent, 212 Cashed (partial)}.\r\nThe F2 status transition to 212 is applied by SC-02 upon CFE0614A 500 reception, not here.\r\n            \r\nPartial payments: may be called several times on the same invoice (212 → 212 loop).",
        "parameters": [
          {
            "name": "frInvoiceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/FrInvoiceCashConfirmationRequestDto"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FrInvoiceCashConfirmationRequestDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/FrInvoiceCashConfirmationRequestDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/FrInvoiceCashConfirmationRequestDto"
              }
            }
          }
        },
        "responses": {
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "202": {
            "description": "Accepted",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_FrInvoiceCashConfirmationResultDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_FrInvoiceCashConfirmationResultDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_FrInvoiceCashConfirmationResultDto"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Content",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ],
            "ApiKey": [ ]
          }
        ]
      }
    },
    "/api/v1/neotimo/compliance/invoices": {
      "post": {
        "tags": [
          "Neotimo/Compliance"
        ],
        "summary": "Creates and qualifies a PPF-compliant F2 invoice (SC-01 scenario).",
        "description": "Runs the 3 lanes sequentially after validation:\r\n- Lane A: recipient classification (F14 lookup → RecipientRoute)\r\n- Lane B: F1 CII staging pre-generation (FFE0112A)\r\n- Lane C: status 200 lifecycle event (CDV) deposit to the PPF over SFTP (workflow WF16)\r\n            \r\nWhen the F2 is invalid (A4.a), returns 422 with the list of failed business controls.\r\nPass the `Idempotency-Key` header to make retries safe.",
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/FrInvoiceCreateRequestDto"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FrInvoiceCreateRequestDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/FrInvoiceCreateRequestDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/FrInvoiceCreateRequestDto"
              }
            }
          }
        },
        "responses": {
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "202": {
            "description": "Accepted",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_FrInvoiceOrchestratorResultDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_FrInvoiceOrchestratorResultDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_FrInvoiceOrchestratorResultDto"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Content",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ],
            "ApiKey": [ ]
          }
        ]
      }
    },
    "/api/v1/core/custom-fields/{modelName}/definitions": {
      "get": {
        "tags": [
          "Core/CustomFields"
        ],
        "summary": "Lists the custom field definitions applicable to an entity of a model.",
        "description": "Returns the deduplicated, ordered union of the model-wide definitions and the\r\nowner-scoped definitions matching the entity's scope owners — the same resolution the UI\r\nperforms when it renders the entity's form. Pass one `scope` query parameter per\r\nowner the entity is attached to, in the compact form `ownerType:ownerId[:depth]`\r\n(e.g. `?scope=EquipmentCategory:42`). No `scope` parameter: only model-wide\r\ndefinitions are returned. Labels (`designation`) are resolved for the request\r\nculture.",
        "parameters": [
          {
            "name": "modelName",
            "in": "path",
            "description": "The carrier model name (e.g. `DefaultModel`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "scope",
            "in": "query",
            "description": "Scope owners of the entity, each as `ownerType:ownerId[:depth]`.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The applicable definitions",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_CustomFieldDefinitionDynamicDtoList"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_CustomFieldDefinitionDynamicDtoList"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_CustomFieldDefinitionDynamicDtoList"
                }
              }
            }
          },
          "400": {
            "description": "A `scope` parameter is malformed",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "The model is not associated with any enabled module",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Not authenticated"
          }
        },
        "security": [
          {
            "Bearer": [ ],
            "ApiKey": [ ]
          }
        ]
      }
    },
    "/api/v1/core/custom-fields/{modelName}/{entityId}/values": {
      "get": {
        "tags": [
          "Core/CustomFields"
        ],
        "summary": "Reads the custom field values stored on an entity.",
        "description": "Returns the stored rows only: a definition the entity never received a value for has no\r\nrow here (merge with the applicable definitions client-side when placeholders are\r\nneeded). Values come back in the single serialization contract described on the\r\ncontroller. Tenant isolation is fail-closed: an entity belonging to another tenant is\r\nindistinguishable from a missing one.",
        "parameters": [
          {
            "name": "modelName",
            "in": "path",
            "description": "The carrier model name (e.g. `DefaultModel`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "entityId",
            "in": "path",
            "description": "Identifier of the entity.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The entity's stored values",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_CustomFieldValueDtoList"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_CustomFieldValueDtoList"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_CustomFieldValueDtoList"
                }
              }
            }
          },
          "404": {
            "description": "Unknown model, or no such entity under the caller's tenant",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Not authenticated"
          }
        },
        "security": [
          {
            "Bearer": [ ],
            "ApiKey": [ ]
          }
        ]
      },
      "put": {
        "tags": [
          "Core/CustomFields"
        ],
        "summary": "Writes custom field values on an entity.",
        "description": "All-or-nothing: every value is checked against the definition's rules — the SAME\r\nvalidations the UI enforces (required fields, conditional obligation, typed constraints)\r\n— on the RESULTING state of the entity, and nothing is persisted unless everything\r\npasses. Definitions not listed in the payload keep their current value. Pass the\r\nentity's scope owners in `scopes` so owner-scoped definitions resolve exactly as in\r\nthe UI; a definition id outside the entity's applicable definitions refuses the write.\r\nA failed validation returns `400` with the localized failure messages.",
        "parameters": [
          {
            "name": "modelName",
            "in": "path",
            "description": "The carrier model name (e.g. `DefaultModel`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "entityId",
            "in": "path",
            "description": "Identifier of the entity.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "description": "The values to write, with the entity's scope owners.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/CustomFieldValueWriteRequest"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CustomFieldValueWriteRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CustomFieldValueWriteRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CustomFieldValueWriteRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Values persisted; the entity's stored values after the write",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_CustomFieldValueDtoList"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_CustomFieldValueDtoList"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_CustomFieldValueDtoList"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed; localized messages in `errors`, nothing persisted",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Unknown model, or no such entity under the caller's tenant",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Not authenticated"
          }
        },
        "security": [
          {
            "Bearer": [ ],
            "ApiKey": [ ]
          }
        ]
      }
    },
    "/directory-service/v1/siren/search": {
      "post": {
        "tags": [
          "AFNOR XP Z12-013/DirectoryService"
        ],
        "summary": "🇫🇷 Norme · SIREN search (or legal unit)",
        "description": "Multi-criteria company search.",
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/SearchSiren"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SearchSiren"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SearchSiren"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SearchSiren"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/SirenSearchPost200Response"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SirenSearchPost200Response"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/SirenSearchPost200Response"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ],
            "ApiKey": [ ]
          }
        ],
        "x-badges": [
          {
            "name": "🇫🇷 Norme"
          }
        ]
      }
    },
    "/directory-service/v1/siren/code-insee:{siren}": {
      "get": {
        "tags": [
          "AFNOR XP Z12-013/DirectoryService"
        ],
        "summary": "🇫🇷 Norme · Consult a siren (legal unit) by SIREN number",
        "description": "Returns the details of a company (legal unit) identified by the SIREN number passed as a parameter.",
        "parameters": [
          {
            "name": "siren",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/SirenField"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/LegalUnitPayloadHistory"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LegalUnitPayloadHistory"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/LegalUnitPayloadHistory"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ],
            "ApiKey": [ ]
          }
        ],
        "x-badges": [
          {
            "name": "🇫🇷 Norme"
          }
        ]
      }
    },
    "/directory-service/v1/siret/search": {
      "post": {
        "tags": [
          "AFNOR XP Z12-013/DirectoryService"
        ],
        "summary": "🇫🇷 Norme · Search for a SIRET (facility)",
        "description": "Multi-criteria search for facilities.",
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/SearchSiret"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SearchSiret"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SearchSiret"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SearchSiret"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/SiretSearchPost200Response"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SiretSearchPost200Response"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/SiretSearchPost200Response"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ],
            "ApiKey": [ ]
          }
        ],
        "x-badges": [
          {
            "name": "🇫🇷 Norme"
          }
        ]
      }
    },
    "/directory-service/v1/siret/code-insee:{siret}": {
      "get": {
        "tags": [
          "AFNOR XP Z12-013/DirectoryService"
        ],
        "summary": "🇫🇷 Norme · Gets a siret (facility) by SIRET number",
        "description": "Returns the details of a facility associated to a SIRET.",
        "parameters": [
          {
            "name": "siret",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/SiretField"
              }
            }
          },
          {
            "name": "include",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/Anonymous"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/FacilityPayloadHistory"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FacilityPayloadHistory"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/FacilityPayloadHistory"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ],
            "ApiKey": [ ]
          }
        ],
        "x-badges": [
          {
            "name": "🇫🇷 Norme"
          }
        ]
      }
    },
    "/directory-service/v1/routing-code/search": {
      "post": {
        "tags": [
          "AFNOR XP Z12-013/DirectoryService"
        ],
        "summary": "🇫🇷 Norme · Search for a routing code",
        "description": "Search for routing codes that meet all the criteria passed as parameters and return the routing codes in the desired format.",
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/RoutingCodeSearch"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RoutingCodeSearch"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RoutingCodeSearch"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RoutingCodeSearch"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/RoutingCodeSearchPost200Response"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoutingCodeSearchPost200Response"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoutingCodeSearchPost200Response"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ],
            "ApiKey": [ ]
          }
        ],
        "x-badges": [
          {
            "name": "🇫🇷 Norme"
          }
        ]
      }
    },
    "/directory-service/v1/routing-code/siret:{siret}/code:{routing-identifier}": {
      "get": {
        "tags": [
          "AFNOR XP Z12-013/DirectoryService"
        ],
        "summary": "🇫🇷 Norme · Get a routing code by SIRET and routing identifier",
        "description": "Retrieve the Routing Code data corresponding to the identifier passed in parameters.",
        "parameters": [
          {
            "name": "siret",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "routing-identifier",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/Anonymous2"
              }
            }
          },
          {
            "name": "fields",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/RoutingCodeField"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/RoutingCodePayloadHistoryLegalUnitFacility"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoutingCodePayloadHistoryLegalUnitFacility"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoutingCodePayloadHistoryLegalUnitFacility"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ],
            "ApiKey": [ ]
          }
        ],
        "x-badges": [
          {
            "name": "🇫🇷 Norme"
          }
        ]
      }
    },
    "/directory-service/v1/directory-line/search": {
      "post": {
        "tags": [
          "AFNOR XP Z12-013/DirectoryService"
        ],
        "summary": "🇫🇷 Norme · Search for a directory line",
        "description": "Search for directory lines that meet all the criteria passed as parameters and return the results in the desired format.",
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/SearchDirectoryLine"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SearchDirectoryLine"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SearchDirectoryLine"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SearchDirectoryLine"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/DirectoryLineSearchPost200Response"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DirectoryLineSearchPost200Response"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/DirectoryLineSearchPost200Response"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ],
            "ApiKey": [ ]
          }
        ],
        "x-badges": [
          {
            "name": "🇫🇷 Norme"
          }
        ]
      }
    },
    "/directory-service/v1/directory-line/code:{addressing-identifier}": {
      "get": {
        "tags": [
          "AFNOR XP Z12-013/DirectoryService"
        ],
        "summary": "🇫🇷 Norme · Get a directory line.",
        "description": "Retrieve the data from the directory line corresponding to the identifier passed in parameters.",
        "parameters": [
          {
            "name": "addressing-identifier",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/Anonymous3"
              }
            }
          },
          {
            "name": "fields",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/DirectoryLineField"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/DirectoryLinePayloadLegalUnitFacilityRoutingCode"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DirectoryLinePayloadLegalUnitFacilityRoutingCode"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/DirectoryLinePayloadLegalUnitFacilityRoutingCode"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ],
            "ApiKey": [ ]
          }
        ],
        "x-badges": [
          {
            "name": "🇫🇷 Norme"
          }
        ]
      }
    },
    "/directory-service/v1/healthcheck": {
      "get": {
        "tags": [
          "AFNOR XP Z12-013/DirectoryService"
        ],
        "summary": "🇫🇷 Norme · Liveness probe — returns 200 when the service is up. Requires the\r\n            \"health.read\" scope since norm v1.3.0 (§4.4).",
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "security": [
          {
            "Bearer": [ ],
            "ApiKey": [ ]
          }
        ],
        "x-badges": [
          {
            "name": "🇫🇷 Norme"
          }
        ]
      }
    },
    "/flow-service/v1/flows": {
      "post": {
        "tags": [
          "AFNOR XP Z12-013/FlowService"
        ],
        "summary": "🇫🇷 Norme · Submit a new flow",
        "description": "Submit a flow. A flow is a single-invoice file, with :\r\n\n  - an XML/PDF file with the data of the invoice\r\n\n\nThe flow is created with a `flowInfo` object, allowing to qualify the flow.\r\n\n\nA flow can be :\r\n\n  - an invoice (CII, UBL, Factur-X,...) \r\n\n  - a lifecycle (CDAR) \r\n\n  - or a e-reporting file",
        "parameters": [
          {
            "name": "Request-Id",
            "in": "header",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Organization-Id",
            "in": "header",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Sha256",
            "in": "query",
            "description": "The sha256 is the fingerprint of the attached file:\r\n\n- if provided in the request: it should be checked once received\r\n\n- if not provided in the request: it may be computed and returned in the response\r\n\n",
            "schema": {
              "pattern": "^[a-f0-9]{64}$",
              "type": "string",
              "format": "byte"
            }
          },
          {
            "name": "TrackingId",
            "in": "query",
            "description": "The tracking id is an external identifier and is used to track the flow by the sender",
            "schema": {
              "maxLength": 64,
              "minLength": 0,
              "type": "string"
            }
          },
          {
            "name": "Name",
            "in": "query",
            "description": "Name of the file",
            "required": true,
            "schema": {
              "maxLength": 255,
              "minLength": 0,
              "type": "string"
            }
          },
          {
            "name": "ProcessingRule",
            "in": "query",
            "description": "- B2B                 : e-invoicing\r\n\n- B2BInt              : International B2B e-reporting\r\n\n- B2C                 : B2C e-reporting\r\n\n- B2G                 : e-invoicing for B2G sales\r\n\n- B2GInt\r\n\n- OutOfScope          : Out of scope (not regulated flow)\r\n\n- B2GOutOfScope\r\n\n- ArchiveOnly         : Archive only, no transmission\r\n\n- NotApplicable       : Not Applicable\r\n\n- Undefined           : Not yet defined when in Pending state or unable to define when in Error state\r\n\n",
            "schema": {
              "$ref": "#/components/schemas/ProcessingRule"
            }
          },
          {
            "name": "FlowSyntax",
            "in": "query",
            "description": "Syntax of the original file belonging to a flow",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/FlowSyntax"
            }
          },
          {
            "name": "FlowProfile",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/FlowProfile"
            }
          },
          {
            "name": "AdditionalProperties",
            "in": "query",
            "schema": {
              "type": "object",
              "additionalProperties": { }
            }
          },
          {
            "name": "Data.CanRead",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "Data.CanWrite",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "Data.CanSeek",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "Data.CanTimeout",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "Data.Length",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "Data.Position",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "Data.ReadTimeout",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Data.WriteTimeout",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "FileName",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ContentType",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/FullFlowInfo"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FullFlowInfo"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/FullFlowInfo"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ],
            "ApiKey": [ ]
          }
        ],
        "x-badges": [
          {
            "name": "🇫🇷 Norme"
          }
        ]
      }
    },
    "/flow-service/v1/flows/search": {
      "post": {
        "tags": [
          "AFNOR XP Z12-013/FlowService"
        ],
        "summary": "🇫🇷 Norme · Select flows upon criteria",
        "description": "Retrieves a set of flows matching the provided search criteria:\r\n\n  - Need at least one criterion to be specified\r\n\n  - Assuming a logical AND when combining criteria\r\n\n  - Assuming a logical OR for criteria allowing a list of values\r\n\n\nPagination works with 2 different ways:\r\n\n  - with dates and the updatedAfter property\r\n\n    - the comparison with current date is strict : updatedAt > updatedAfter\r\n\n  - with cursors (more secure)\r\n\n    - in case of pagination a nextCursor will be returned\r\n\n    - next pagination call shall set cursor value to nextCursor value of last call",
        "parameters": [
          {
            "name": "Request-Id",
            "in": "header",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Organization-Id",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/SearchFlowParams"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SearchFlowParams"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SearchFlowParams"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SearchFlowParams"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/SearchFlowContent"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchFlowContent"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchFlowContent"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ],
            "ApiKey": [ ]
          }
        ],
        "x-badges": [
          {
            "name": "🇫🇷 Norme"
          }
        ]
      }
    },
    "/flow-service/v1/flows/{flowId}": {
      "get": {
        "tags": [
          "AFNOR XP Z12-013/FlowService"
        ],
        "summary": "🇫🇷 Norme · Download the file of a flow",
        "description": "Download a file related to a given flow:\r\n\n  - an invoice\r\n\n  - a life cycle\r\n\n  - an e-reporting",
        "parameters": [
          {
            "name": "Request-Id",
            "in": "header",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Organization-Id",
            "in": "header",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "flowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "docType",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/DocType"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Flow"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Flow"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Flow"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ],
            "ApiKey": [ ]
          }
        ],
        "x-badges": [
          {
            "name": "🇫🇷 Norme"
          }
        ]
      }
    },
    "/flow-service/v1/webhooks": {
      "get": {
        "tags": [
          "AFNOR XP Z12-013/FlowService"
        ],
        "summary": "🇫🇷 Norme · Retrieve the list of webhooks created by the owner of the token",
        "parameters": [
          {
            "name": "Request-Id",
            "in": "header",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Organization-Id",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Response"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ],
            "ApiKey": [ ]
          }
        ],
        "x-badges": [
          {
            "name": "🇫🇷 Norme"
          }
        ]
      },
      "post": {
        "tags": [
          "AFNOR XP Z12-013/FlowService"
        ],
        "summary": "🇫🇷 Norme · Subscribe to a webhook",
        "description": "This operation creates and configures a new webhook, providing:\r\n\n- The callback URL\r\n\n- The metadata to filter on subsets of events\r\n\n\nThe webhook belongs to the owner of the token and cannot be seen from others:\r\n\n- It returns an id and a signing key (256 or 512 bits) that should be kept\r\n\n- The signing key allows to validate the signature of each received event.\r\n\n\nHow the signature is managed:\r\n\n- At webhook creation a signing Key is randomly generated in a secure way\r\n\n  - 256 bits are enough if the random generator is secure \r\n\n  - 512 bits are necessary if the generator is not secure\r\n\n- Each time an event is sent:\r\n\n  - a SHA-256 fingerprint is generated based on the concatenation of:\r\n\n    - the JSON payload of the response (as is, no canonical format)\r\n\n    - a separator : @\r\n\n    - the current epoch time in seconds\r\n\n  - a HMAC signature is computed over the fingerprint with the callback signing key\r\n\n  - the signature is base64 encoded for the transport\r\n\n\nThe signature and the timestamp are returned in the following headers of the callback:\r\n\n  - Afnor-Signature is the signature (base64)\r\n\n  - Afnor-Signature-Timestamp is the epoch timestamp in seconds",
        "parameters": [
          {
            "name": "Request-Id",
            "in": "header",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Organization-Id",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookParams"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookParams"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookParams"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookParams"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookIdParam"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookIdParam"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookIdParam"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ],
            "ApiKey": [ ]
          }
        ],
        "x-badges": [
          {
            "name": "🇫🇷 Norme"
          }
        ]
      }
    },
    "/flow-service/v1/webhooks/{webhookUid}": {
      "delete": {
        "tags": [
          "AFNOR XP Z12-013/FlowService"
        ],
        "summary": "🇫🇷 Norme · Unsubscribe to a webhook",
        "description": "- Delete a subscription owned by the owner of the token\r\n\n- The operation is allowed only buy the owner of the token",
        "parameters": [
          {
            "name": "Request-Id",
            "in": "header",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "webhookUid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Organization-Id",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "security": [
          {
            "Bearer": [ ],
            "ApiKey": [ ]
          }
        ],
        "x-badges": [
          {
            "name": "🇫🇷 Norme"
          }
        ]
      }
    },
    "/flow-service/v1/healthcheck": {
      "get": {
        "tags": [
          "AFNOR XP Z12-013/FlowService"
        ],
        "summary": "🇫🇷 Norme · Check whether the API service is up and running.",
        "parameters": [
          {
            "name": "Request-Id",
            "in": "header",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Organization-Id",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "x-badges": [
          {
            "name": "🇫🇷 Norme"
          }
        ]
      }
    },
    "/api/v1/core/me": {
      "get": {
        "tags": [
          "Core/Me"
        ],
        "summary": "Returns the caller's profile.",
        "description": "Real callers: the Neotimo desktop agent on startup, partner integrations\r\nvia API key checking which identity they hold, and CI scripts asserting\r\nthe token they baked into a pipeline. Cheap on the server — built from\r\nthe request claims, no DB hit.",
        "responses": {
          "200": {
            "description": "Profile returned",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_UserProfileResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_UserProfileResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_UserProfileResponse"
                }
              }
            }
          },
          "401": {
            "description": "Not authenticated",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ],
            "ApiKey": [ ]
          }
        ]
      },
      "delete": {
        "tags": [
          "Core/Me"
        ],
        "summary": "Deletes the caller's account.",
        "description": "Soft-deletes the account, kills every active session, signs the caller out.\r\nRefuses two cases: superadmin self-delete, and \"sole admin of the tenant\" —\r\nboth need an admin handover first. The caller must echo their own email in\r\n`emailConfirmation` as a double-check, because nobody deletes their own\r\naccount by accident on the first try.",
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/DeleteAccountRequest"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeleteAccountRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/DeleteAccountRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/DeleteAccountRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Account soft-deleted, sessions revoked, caller signed out",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_DeleteAccountResult"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_DeleteAccountResult"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_DeleteAccountResult"
                }
              }
            }
          },
          "400": {
            "description": "Refused — read `Reason` in the body for the machine-readable code",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_DeleteAccountResult"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_DeleteAccountResult"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_DeleteAccountResult"
                }
              }
            }
          },
          "401": {
            "description": "Not authenticated",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ],
            "ApiKey": [ ]
          }
        ]
      }
    },
    "/api/v1/core/me/personal-data": {
      "get": {
        "tags": [
          "Core/Me"
        ],
        "summary": "Exports the caller's personal data as a ZIP.",
        "description": "GDPR Art. 15 right of access. See M:An.Platform.Module.Core.Presentation.Interfaces.IMeService.ExportPersonalDataAsync(System.Security.Claims.ClaimsPrincipal,System.Threading.CancellationToken)\r\nfor the exact bundle contents. Built on the fly, no temp file on disk.",
        "responses": {
          "200": {
            "description": "ZIP archive streamed"
          },
          "401": {
            "description": "Not authenticated",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ],
            "ApiKey": [ ]
          }
        ]
      }
    },
    "/api/v1/core/me/email/send-verification": {
      "post": {
        "tags": [
          "Core/Me"
        ],
        "summary": "Re-sends the email verification message.",
        "description": "Targets the caller's primary address. Idempotent — silently no-ops when\r\nthe address is already verified, so the UI can wire it to a \"Resend\"\r\nbutton without checking state first.",
        "responses": {
          "204": {
            "description": "Verification email dispatched (or already verified — same response)"
          },
          "401": {
            "description": "Not authenticated",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ],
            "ApiKey": [ ]
          }
        ]
      }
    },
    "/api/v1/core/me/phone/send-verification": {
      "post": {
        "tags": [
          "Core/Me"
        ],
        "summary": "Sends an SMS OTP to the caller's phone.",
        "description": "Generates a 6-digit OTP and texts it to the caller's phone. Requires a\r\nphone number on file — set one via the profile edit endpoint first.",
        "responses": {
          "204": {
            "description": "OTP sent"
          },
          "400": {
            "description": "No phone number configured on the account",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Not authenticated",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ],
            "ApiKey": [ ]
          }
        ]
      }
    },
    "/api/v1/core/me/phone/verify": {
      "post": {
        "tags": [
          "Core/Me"
        ],
        "summary": "Confirms the caller's phone number.",
        "description": "Validates the OTP the user just typed and, on success, flips\r\n`Account.PhoneNumberConfirmed = true`. Codes expire after a few minutes —\r\nif the user took a coffee break, resend.",
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/VerifyPhoneRequest"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VerifyPhoneRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/VerifyPhoneRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/VerifyPhoneRequest"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "Phone confirmed"
          },
          "400": {
            "description": "Invalid or expired code",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Not authenticated",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ],
            "ApiKey": [ ]
          }
        ]
      }
    },
    "/api/v1/core/me/mfa/setup": {
      "get": {
        "tags": [
          "Core/Me"
        ],
        "summary": "Returns the TOTP 2FA enrollment payload.",
        "description": "The bits an authenticator app needs to enroll the caller: shared key plus\r\nan `otpauth://` URI to feed a QR generator. When 2FA is already on,\r\nonly the `IsEnabled` flag comes back — no leaking the secret twice.",
        "responses": {
          "200": {
            "description": "Setup payload returned",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_MfaSetupResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_MfaSetupResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_MfaSetupResponse"
                }
              }
            }
          },
          "401": {
            "description": "Not authenticated",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ],
            "ApiKey": [ ]
          }
        ]
      }
    },
    "/api/v1/core/me/mfa/enable": {
      "post": {
        "tags": [
          "Core/Me"
        ],
        "summary": "Enables TOTP 2FA on the caller's account.",
        "description": "Validates the first TOTP from the authenticator app, turns 2FA on, and\r\nreturns 10 single-use recovery codes. Show the codes to the user once —\r\nthe platform only stores their hashes. Lose them and call\r\n`/me/mfa/recovery-codes`.",
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/MfaCodeRequest"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MfaCodeRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/MfaCodeRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/MfaCodeRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "2FA enabled, recovery codes returned",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_MfaRecoveryCodesResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_MfaRecoveryCodesResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_MfaRecoveryCodesResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or expired TOTP",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Not authenticated",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ],
            "ApiKey": [ ]
          }
        ]
      }
    },
    "/api/v1/core/me/mfa/disable": {
      "post": {
        "tags": [
          "Core/Me"
        ],
        "summary": "Disables TOTP 2FA on the caller's account.",
        "description": "Disables 2FA after one last TOTP check. The shared secret is wiped —\r\nre-enabling later starts from a fresh QR code and key. Recovery codes\r\nare also invalidated.",
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/MfaCodeRequest"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MfaCodeRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/MfaCodeRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/MfaCodeRequest"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "2FA disabled"
          },
          "400": {
            "description": "Invalid or expired TOTP",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Not authenticated",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ],
            "ApiKey": [ ]
          }
        ]
      }
    },
    "/api/v1/core/me/mfa/recovery-codes": {
      "post": {
        "tags": [
          "Core/Me"
        ],
        "summary": "Regenerates the caller's 2FA recovery codes.",
        "description": "Mints a fresh batch of 10 recovery codes and invalidates the previous\r\nbatch. Use when the user has burnt through their codes or lost them.",
        "responses": {
          "200": {
            "description": "New recovery codes returned",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_MfaRecoveryCodesResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_MfaRecoveryCodesResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_MfaRecoveryCodesResponse"
                }
              }
            }
          },
          "400": {
            "description": "2FA is not enabled on the account",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Not authenticated",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ],
            "ApiKey": [ ]
          }
        ]
      }
    },
    "/api/v1/neotimo/directory/lookup": {
      "get": {
        "tags": [
          "Neotimo/Directory"
        ],
        "summary": "Looks up an entry by SIRET.",
        "parameters": [
          {
            "name": "siret",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_DirectoryLookupResultDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_DirectoryLookupResultDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_DirectoryLookupResultDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ],
            "ApiKey": [ ]
          }
        ]
      }
    },
    "/api/v1/neotimo/directory/search": {
      "get": {
        "tags": [
          "Neotimo/Directory"
        ],
        "summary": "Searches the directory. The search term goes in `q` — not `query`, not `search`.",
        "description": "\n\r\n  `GET /api/v1/neotimo/directory/search?q=Avenir&type=PA&page=1&pageSize=20`\r\n\r\n\n\r\n  `q` matches the entry name or SIRET, case-insensitively. Omitting it\r\n            returns the whole directory, paged — that is the documented behaviour, not\r\n            a fallback. Any query parameter outside the list below is refused with a\r\n            `422` naming it (NEOTIMO-1777): a misspelt filter used to come back as\r\n            a silent unfiltered `200`, which reads exactly like an empty directory.\r\n            ",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "description": "Free-text term matched against name and SIRET. Optional.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "type",
            "in": "query",
            "description": "Directory entry type filter (e.g. `PA`, `PDP`). Optional.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "1-based page number. Defaults to 1.",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "description": "Items per page, capped at 100. Defaults to 20.",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 20
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_PagedResult_DirectoryEntryDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_PagedResult_DirectoryEntryDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_PagedResult_DirectoryEntryDto"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Content",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ],
            "ApiKey": [ ]
          }
        ]
      }
    },
    "/api/v1/neotimo/directory/me": {
      "get": {
        "tags": [
          "Neotimo/Directory"
        ],
        "summary": "Returns the caller's directory entry.",
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_DirectoryEntryDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_DirectoryEntryDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_DirectoryEntryDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ],
            "ApiKey": [ ]
          }
        ]
      },
      "put": {
        "tags": [
          "Neotimo/Directory"
        ],
        "summary": "Updates the caller's directory entry.",
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/DirectoryMeUpdateDto"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DirectoryMeUpdateDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/DirectoryMeUpdateDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/DirectoryMeUpdateDto"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_DirectoryEntryDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_DirectoryEntryDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_DirectoryEntryDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ],
            "ApiKey": [ ]
          }
        ]
      }
    },
    "/api/v1/neotimo/extraction/jobs": {
      "post": {
        "tags": [
          "Neotimo/Extraction"
        ],
        "summary": "Queues an extraction job for an uploaded file.",
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  }
                }
              },
              "encoding": {
                "file": {
                  "style": "form"
                }
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "202": {
            "description": "Accepted",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_ExtractionJobDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_ExtractionJobDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_ExtractionJobDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Content",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ],
            "ApiKey": [ ]
          }
        ]
      }
    },
    "/api/v1/neotimo/extraction/jobs/{id}": {
      "get": {
        "tags": [
          "Neotimo/Extraction"
        ],
        "summary": "Returns the current state of an extraction job.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_ExtractionJobDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_ExtractionJobDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_ExtractionJobDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ],
            "ApiKey": [ ]
          }
        ]
      }
    },
    "/api/v1/neotimo/extraction/inline": {
      "post": {
        "tags": [
          "Neotimo/Extraction"
        ],
        "summary": "Extracts a file inline and returns the result synchronously.",
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  }
                }
              },
              "encoding": {
                "file": {
                  "style": "form"
                }
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_ExtractionJobDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_ExtractionJobDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_ExtractionJobDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Content",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ],
            "ApiKey": [ ]
          }
        ]
      }
    },
    "/api/v1/neotimo/inbox": {
      "get": {
        "tags": [
          "Neotimo/Inbox"
        ],
        "summary": "Lists invoices received by the caller's tenant.",
        "parameters": [
          {
            "name": "Status",
            "in": "query",
            "description": "Restrict to invoices currently in this status.",
            "schema": {
              "$ref": "#/components/schemas/PublicInvoiceStatus"
            }
          },
          {
            "name": "ReceivedFrom",
            "in": "query",
            "description": "Lower bound on the reception date (inclusive).",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "ReceivedTo",
            "in": "query",
            "description": "Upper bound on the reception date (inclusive).",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "SupplierSiret",
            "in": "query",
            "description": "Match the supplier SIRET exactly (14 digits).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Search",
            "in": "query",
            "description": "Full-text search across invoice number, supplier name and notes.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Page",
            "in": "query",
            "description": "1-based page number.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Items per page (max 100).",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_PagedResult_InboxListItemDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_PagedResult_InboxListItemDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_PagedResult_InboxListItemDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ],
            "ApiKey": [ ]
          }
        ]
      }
    },
    "/api/v1/neotimo/inbox/{id}": {
      "get": {
        "tags": [
          "Neotimo/Inbox"
        ],
        "summary": "Returns one received invoice in full.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_InvoicePublicDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_InvoicePublicDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_InvoicePublicDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ],
            "ApiKey": [ ]
          }
        ]
      }
    },
    "/api/v1/neotimo/inbox/{id}/file": {
      "get": {
        "tags": [
          "Neotimo/Inbox"
        ],
        "summary": "Downloads the materialised file for the received invoice.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ],
            "ApiKey": [ ]
          }
        ]
      }
    },
    "/api/v1/neotimo/inbox/{id}/seen": {
      "post": {
        "tags": [
          "Neotimo/Inbox"
        ],
        "summary": "Marks a received invoice as seen.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ],
            "ApiKey": [ ]
          }
        ]
      }
    },
    "/api/v1/neotimo/invoices": {
      "post": {
        "tags": [
          "Neotimo/Invoices"
        ],
        "summary": "Creates an invoice from a typed payload.",
        "description": "Submits the invoice straight away. Pass the `Idempotency-Key` header to make retries safe — the platform\r\nmemoises the response for 24h. A SIRET in the sandbox 00000000000000-04 range arms the corresponding\r\nbehaviour scenario automatically.",
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/InvoicePublicDto"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InvoicePublicDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/InvoicePublicDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/InvoicePublicDto"
              }
            }
          }
        },
        "responses": {
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_InvoicePublicDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_InvoicePublicDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_InvoicePublicDto"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Content",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ],
            "ApiKey": [ ]
          }
        ]
      },
      "get": {
        "tags": [
          "Neotimo/Invoices"
        ],
        "summary": "Lists invoices owned by the caller's tenant.",
        "parameters": [
          {
            "name": "Status",
            "in": "query",
            "description": "Restrict to invoices currently in this status.",
            "schema": {
              "$ref": "#/components/schemas/PublicInvoiceStatus"
            }
          },
          {
            "name": "IssuedFrom",
            "in": "query",
            "description": "Lower bound on the issue date (inclusive).",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "IssuedTo",
            "in": "query",
            "description": "Upper bound on the issue date (inclusive).",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "BuyerSiret",
            "in": "query",
            "description": "Match the buyer SIRET exactly (14 digits).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "SupplierSiret",
            "in": "query",
            "description": "Match the supplier SIRET exactly (14 digits).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Format",
            "in": "query",
            "description": "Restrict to invoices materialised in this wire format.",
            "schema": {
              "$ref": "#/components/schemas/TargetFormat"
            }
          },
          {
            "name": "BillingFrame",
            "in": "query",
            "description": "Restrict to invoices issued under this French invoicing frame.",
            "schema": {
              "$ref": "#/components/schemas/BillingFrame"
            }
          },
          {
            "name": "Search",
            "in": "query",
            "description": "Full-text search across invoice number, buyer / supplier name and notes.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Page",
            "in": "query",
            "description": "1-based page number.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Items per page (max 100).",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Sort",
            "in": "query",
            "description": "Sort field — defaults to `issued_at`. Supports `created_at`, `number`, `amount`.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Order",
            "in": "query",
            "description": "Sort order — `asc` or `desc` (default).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_PagedResult_InvoiceListItemDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_PagedResult_InvoiceListItemDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_PagedResult_InvoiceListItemDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ],
            "ApiKey": [ ]
          }
        ]
      }
    },
    "/api/v1/neotimo/invoices/from-file": {
      "post": {
        "tags": [
          "Neotimo/Invoices"
        ],
        "summary": "Emits an invoice from a PDF — the golden path.",
        "description": "Drop the PDF, the platform extracts, normalises and emits in one round-trip. The response carries the job\r\nid (poll `GET /extraction/jobs/{id}`) and the emitted invoice's stable id.\r\n\n<b>Sandbox behaviour</b>: your file is accepted, guarded and stored, but it is <b>not read</b>. The emitted\r\ninvoice is a fixed specimen (`SPECIMEN-…`, \"Sandbox specimen supplier\") and the extraction job carries\r\n`simulated: true`. That is deliberate — it lets you wire the whole mechanics (upload, poll, invoice,\r\ntimeline, webhook) without depending on model output. Assert on the shape, never on the values.\r\n",
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  }
                }
              },
              "encoding": {
                "file": {
                  "style": "form"
                }
              }
            }
          }
        },
        "responses": {
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "202": {
            "description": "Accepted",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_InvoiceFromFileResponseDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_InvoiceFromFileResponseDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_InvoiceFromFileResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Content",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ],
            "ApiKey": [ ]
          }
        ]
      }
    },
    "/api/v1/neotimo/invoices/preview": {
      "post": {
        "tags": [
          "Neotimo/Invoices"
        ],
        "summary": "Previews routing and totals without persisting anything.",
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/InvoicePublicDto"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InvoicePublicDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/InvoicePublicDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/InvoicePublicDto"
              }
            }
          }
        },
        "responses": {
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_InvoicePreviewResultDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_InvoicePreviewResultDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_InvoicePreviewResultDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ],
            "ApiKey": [ ]
          }
        ]
      }
    },
    "/api/v1/neotimo/invoices/validate": {
      "post": {
        "tags": [
          "Neotimo/Invoices"
        ],
        "summary": "Runs the shape and rules validator on a payload.",
        "responses": {
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_InvoiceValidationResultDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_InvoiceValidationResultDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_InvoiceValidationResultDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ],
            "ApiKey": [ ]
          }
        ]
      }
    },
    "/api/v1/neotimo/invoices/{id}": {
      "get": {
        "tags": [
          "Neotimo/Invoices"
        ],
        "summary": "Returns one invoice by its public id.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_InvoicePublicDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_InvoicePublicDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_InvoicePublicDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ],
            "ApiKey": [ ]
          }
        ]
      }
    },
    "/api/v1/neotimo/invoices/{id}/cancel": {
      "post": {
        "tags": [
          "Neotimo/Invoices"
        ],
        "summary": "Cancels an invoice that hasn't been cashed yet.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/CancelInvoiceRequestDto"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CancelInvoiceRequestDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CancelInvoiceRequestDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CancelInvoiceRequestDto"
              }
            }
          }
        },
        "responses": {
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Boolean"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Boolean"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Boolean"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ],
            "ApiKey": [ ]
          }
        ]
      }
    },
    "/api/v1/neotimo/invoices/{id}/credit": {
      "post": {
        "tags": [
          "Neotimo/Invoices"
        ],
        "summary": "Emits a full credit note for an existing invoice.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/CreditInvoiceRequestDto"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreditInvoiceRequestDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreditInvoiceRequestDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreditInvoiceRequestDto"
              }
            }
          }
        },
        "responses": {
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_InvoicePublicDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_InvoicePublicDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_InvoicePublicDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ],
            "ApiKey": [ ]
          }
        ]
      }
    },
    "/api/v1/neotimo/invoices/{id}/file": {
      "get": {
        "tags": [
          "Neotimo/Invoices"
        ],
        "summary": "Downloads the materialised invoice file in the requested format.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "format",
            "in": "query",
            "description": "Output format on emission and on file download.",
            "schema": {
              "$ref": "#/components/schemas/TargetFormat"
            }
          }
        ],
        "responses": {
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ],
            "ApiKey": [ ]
          }
        ]
      }
    },
    "/api/v1/neotimo/invoices/{invoiceId}/timeline": {
      "get": {
        "tags": [
          "Neotimo/Invoices"
        ],
        "summary": "Returns the timeline of an invoice.",
        "parameters": [
          {
            "name": "invoiceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_TimelineEventDtoList"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_TimelineEventDtoList"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_TimelineEventDtoList"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ],
            "ApiKey": [ ]
          }
        ]
      },
      "post": {
        "tags": [
          "Neotimo/Invoices"
        ],
        "summary": "Pushes a lifecycle transition.",
        "description": "The transition must be in the catalog (see `GET /timeline-transitions`)\r\nand allowed from the invoice's current status — pushing `cashed` on a\r\n`draft` returns 422. Transitions that change the state in an\r\nirreversible way (reject, dispute, litigation, suspend) require a non-empty\r\n`reason_code` or `comment`.",
        "parameters": [
          {
            "name": "invoiceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/TransitionRequestDto"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TransitionRequestDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/TransitionRequestDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/TransitionRequestDto"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_TimelineEventDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_TimelineEventDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_TimelineEventDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Content",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ],
            "ApiKey": [ ]
          }
        ]
      }
    },
    "/api/v1/neotimo/invoices/{invoiceId}/timeline/{eventId}/attachments": {
      "post": {
        "tags": [
          "Neotimo/Invoices"
        ],
        "summary": "Attaches a file to a timeline event.",
        "parameters": [
          {
            "name": "invoiceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "eventId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  }
                }
              },
              "encoding": {
                "file": {
                  "style": "form"
                }
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_TimelineAttachmentDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_TimelineAttachmentDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_TimelineAttachmentDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Content",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ],
            "ApiKey": [ ]
          }
        ]
      }
    },
    "/api/v1/neotimo/me": {
      "get": {
        "tags": [
          "Neotimo/Me"
        ],
        "summary": "Returns the caller's profile.",
        "description": "Resolves the tenant once via the standard pipeline (X-Tenant-Id header or the caller's account binding),\r\nthen projects quota, mandate and a handful of `next_actions` the SDK can render verbatim.",
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_MeDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_MeDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_MeDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ],
            "ApiKey": [ ]
          }
        ]
      }
    },
    "/api/v1/neotimo/annuaire/routing/{id}": {
      "get": {
        "tags": [
          "Neotimo/Annuaire"
        ],
        "summary": "Resolves the responsible Plateforme Agréée for a SIRET or SIREN.",
        "description": "Returns 200 when the identifier is currently routed in the mirror, 404\r\nwhen it isn't (unknown SIRET/SIREN, or no active routing line today),\r\n400 when the identifier is malformed. Responses are cached server-side\r\nfor 24h — a fresh DGFiP publish takes up to a day to propagate.\r\nCross-reference `lastSync` if you need to know how stale the\r\nanswer might be.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Exactly 9 digits (SIREN) or 14 digits (SIRET).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "description": "Identifier is not 9 or 14 digits.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Identifier is not currently routed in the mirror.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Per-IP rate limit exceeded.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "Active routing line found.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_OpenRoutingResponseDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_OpenRoutingResponseDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_OpenRoutingResponseDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/neotimo/reporting/periods": {
      "get": {
        "tags": [
          "Neotimo/Reporting"
        ],
        "summary": "Lists the caller's reporting periods.",
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_ReportingPeriodDtoList"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_ReportingPeriodDtoList"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_ReportingPeriodDtoList"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ],
            "ApiKey": [ ]
          }
        ]
      }
    },
    "/api/v1/neotimo/reporting/periods/{id}/summary": {
      "get": {
        "tags": [
          "Neotimo/Reporting"
        ],
        "summary": "Returns the summary of one period.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_ReportingPeriodSummaryDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_ReportingPeriodSummaryDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_ReportingPeriodSummaryDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ],
            "ApiKey": [ ]
          }
        ]
      }
    },
    "/api/v1/neotimo/reporting/periods/{id}/close": {
      "post": {
        "tags": [
          "Neotimo/Reporting"
        ],
        "summary": "Closes a reporting period.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_ReportingPeriodDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_ReportingPeriodDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_ReportingPeriodDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ],
            "ApiKey": [ ]
          }
        ]
      }
    },
    "/api/v1/neotimo/reporting/transactions": {
      "post": {
        "tags": [
          "Neotimo/Reporting"
        ],
        "summary": "Deposits a batch of transactions into a period.",
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/ReportingTransactionDepositDto"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReportingTransactionDepositDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ReportingTransactionDepositDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ReportingTransactionDepositDto"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_ReportingTransactionDtoList"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_ReportingTransactionDtoList"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_ReportingTransactionDtoList"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ],
            "ApiKey": [ ]
          }
        ]
      },
      "get": {
        "tags": [
          "Neotimo/Reporting"
        ],
        "summary": "Lists reporting transactions.",
        "parameters": [
          {
            "name": "periodId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 20
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_PagedResult_ReportingTransactionDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_PagedResult_ReportingTransactionDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_PagedResult_ReportingTransactionDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ],
            "ApiKey": [ ]
          }
        ]
      }
    },
    "/api/v1/neotimo/reporting/transactions/{id}": {
      "get": {
        "tags": [
          "Neotimo/Reporting"
        ],
        "summary": "Returns one reporting transaction.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_ReportingTransactionDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_ReportingTransactionDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_ReportingTransactionDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ],
            "ApiKey": [ ]
          }
        ]
      }
    },
    "/api/v1/neotimo/sandbox/scenarios/{scenario}/trigger": {
      "post": {
        "tags": [
          "Neotimo/Sandbox"
        ],
        "summary": "Arms a sandbox scenario.",
        "parameters": [
          {
            "name": "scenario",
            "in": "path",
            "description": "Scenarios you can arm in sandbox to force a behaviour.",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/SandboxScenarioType"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "202": {
            "description": "Accepted",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_SandboxScenarioResponseDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_SandboxScenarioResponseDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_SandboxScenarioResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ],
            "ApiKey": [ ]
          }
        ]
      }
    },
    "/api/v1/neotimo/tenants": {
      "get": {
        "tags": [
          "Neotimo/Tenants"
        ],
        "summary": "Lists the tenants the caller belongs to.",
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_TenantPublicDtoList"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_TenantPublicDtoList"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_TenantPublicDtoList"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ],
            "ApiKey": [ ]
          }
        ]
      },
      "post": {
        "tags": [
          "Neotimo/Tenants"
        ],
        "summary": "Creating a tenant from the API is not available.",
        "description": "Sandbox tenants are provisioned by Neotimo when your access is granted — one tenant per\r\npartner, which is what keeps your data out of everyone else's sandbox. Ask your Neotimo\r\ncontact for an extra one; there is nothing to call here.\r\n\n\r\nUntil NEOTIMO-1345 this route answered 201 with a `sandbox-xxxx` id that was never\r\npersisted: the very next `GET /tenants/{id}` returned 404. A documented 501 is worth\r\nmore to an integrator than a success that isn't one.\r\n",
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/TenantCreateRequestDto"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TenantCreateRequestDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/TenantCreateRequestDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/TenantCreateRequestDto"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "501": {
            "description": "Always — tenants are provisioned out of band.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ],
            "ApiKey": [ ]
          }
        ]
      }
    },
    "/api/v1/neotimo/tenants/{id}": {
      "get": {
        "tags": [
          "Neotimo/Tenants"
        ],
        "summary": "Returns one tenant by id.",
        "description": "The caller can only fetch the tenant it is bound to. Reading another tenant returns 404\r\n(indifferent on purpose — never reveals the existence of a tenant the caller can't see).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_TenantPublicDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_TenantPublicDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_TenantPublicDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ],
            "ApiKey": [ ]
          }
        ]
      }
    },
    "/api/v1/neotimo/timeline-transitions": {
      "get": {
        "tags": [
          "Neotimo/TimelineTransitions"
        ],
        "summary": "Lists the transitions partners can push.",
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_IReadOnlyList_TransitionReferenceDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_IReadOnlyList_TransitionReferenceDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_IReadOnlyList_TransitionReferenceDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ],
            "ApiKey": [ ]
          }
        ]
      }
    },
    "/api/v1/neotimo/webhooks/subscriptions": {
      "post": {
        "tags": [
          "Neotimo/Webhooks"
        ],
        "summary": "Creates a webhook subscription.",
        "description": "Returns the cleartext signing secret one time — store it. Later GETs\r\nexpose only the 6-char prefix. The URL must be HTTPS on the default\r\nport 443; raw IP literals are refused and the resolved address is\r\nre-checked at connect time against the SSRF deny-list.",
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookSubscriptionFormDto"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookSubscriptionFormDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookSubscriptionFormDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookSubscriptionFormDto"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_WebhookSubscriptionCreatedDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_WebhookSubscriptionCreatedDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_WebhookSubscriptionCreatedDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Content",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ],
            "ApiKey": [ ]
          }
        ]
      },
      "get": {
        "tags": [
          "Neotimo/Webhooks"
        ],
        "summary": "Lists the caller's subscriptions.",
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_IReadOnlyList_WebhookSubscriptionDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_IReadOnlyList_WebhookSubscriptionDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_IReadOnlyList_WebhookSubscriptionDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ],
            "ApiKey": [ ]
          }
        ]
      }
    },
    "/api/v1/neotimo/webhooks/subscriptions/{id}": {
      "delete": {
        "tags": [
          "Neotimo/Webhooks"
        ],
        "summary": "Soft-deletes a subscription.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ],
            "ApiKey": [ ]
          }
        ]
      }
    },
    "/api/v1/neotimo/webhooks/subscriptions/{id}/test": {
      "post": {
        "tags": [
          "Neotimo/Webhooks"
        ],
        "summary": "Fires a synthetic `neotimo.ping` delivery on a subscription.",
        "description": "Useful for onboarding — verifies your endpoint receives the signed POST,\r\nvalidates your signature check, and proves the SSRF guard accepts your\r\nhost. The synthetic delivery shows up in `GET /deliveries` with\r\nevent name `neotimo.ping`.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "202": {
            "description": "Accepted"
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ],
            "ApiKey": [ ]
          }
        ]
      }
    },
    "/api/v1/neotimo/webhooks/deliveries": {
      "get": {
        "tags": [
          "Neotimo/Webhooks"
        ],
        "summary": "Lists past webhook deliveries.",
        "parameters": [
          {
            "name": "subscriptionId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_IReadOnlyList_WebhookDeliveryDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_IReadOnlyList_WebhookDeliveryDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_IReadOnlyList_WebhookDeliveryDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ],
            "ApiKey": [ ]
          }
        ]
      }
    },
    "/api/v1/neotimo/webhooks/deliveries/{id}/replay": {
      "post": {
        "tags": [
          "Neotimo/Webhooks"
        ],
        "summary": "Re-enqueues one past delivery for a fresh attempt.",
        "description": "Hangfire retries with its own exponential backoff (8 attempts max). Once\r\nretries are exhausted the row stays in `failed`. Replay it once\r\nyou've fixed your endpoint.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "202": {
            "description": "Accepted"
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ],
            "ApiKey": [ ]
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "Acknowledgement": {
        "required": [
          "status"
        ],
        "type": "object",
        "properties": {
          "status": {
            "$ref": "#/components/schemas/FlowAckStatus"
          },
          "details": {
            "minItems": 1,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AcknowledgementDetail"
            },
            "nullable": true
          }
        },
        "additionalProperties": { }
      },
      "AcknowledgementDetail": {
        "required": [
          "item",
          "level",
          "reasonCode",
          "reasonMessage"
        ],
        "type": "object",
        "properties": {
          "level": {
            "$ref": "#/components/schemas/AcknowledgementDetailLevel"
          },
          "item": {
            "type": "string",
            "description": "Item on which the error refers"
          },
          "reasonCode": {
            "type": "string"
          },
          "reasonMessage": {
            "type": "string"
          }
        },
        "additionalProperties": { }
      },
      "AcknowledgementDetailLevel": {
        "enum": [
          "Error",
          "Warning"
        ],
        "type": "string"
      },
      "AddressDto": {
        "type": "object",
        "properties": {
          "line1": {
            "type": "string",
            "description": "BT-35 — main address line.",
            "nullable": true
          },
          "line2": {
            "type": "string",
            "description": "BT-36 — additional address line.",
            "nullable": true
          },
          "postalCode": {
            "type": "string",
            "description": "BT-38 — postal code.",
            "nullable": true
          },
          "city": {
            "type": "string",
            "description": "BT-37 — city.",
            "nullable": true
          },
          "countrySubdivision": {
            "type": "string",
            "description": "BT-39 — country subdivision (region / state).",
            "nullable": true
          },
          "country": {
            "type": "string",
            "description": "BT-40 — ISO 3166-1 alpha-2 country code (e.g. `FR`).",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Postal address block — EN 16931 BG-5 / BG-8."
      },
      "AddressRead": {
        "type": "object",
        "properties": {
          "addressLine1": {
            "maxLength": 255,
            "minLength": 0,
            "type": "string",
            "nullable": true
          },
          "addressLine2": {
            "maxLength": 255,
            "minLength": 0,
            "type": "string",
            "nullable": true
          },
          "addressLine3": {
            "maxLength": 255,
            "minLength": 0,
            "type": "string",
            "nullable": true
          },
          "postalCode": {
            "maxLength": 5,
            "minLength": 0,
            "pattern": "[0-9]*",
            "type": "string",
            "nullable": true
          },
          "countrySubdivision": {
            "maxLength": 255,
            "minLength": 0,
            "type": "string",
            "nullable": true
          },
          "locality": {
            "maxLength": 100,
            "minLength": 0,
            "type": "string",
            "nullable": true
          },
          "countryCode": {
            "maxLength": 2,
            "minLength": 0,
            "type": "string",
            "nullable": true
          },
          "countryName": {
            "maxLength": 100,
            "minLength": 0,
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": { },
        "description": "Wrapper for postal addresses"
      },
      "Anonymous": {
        "enum": [
          "Siren"
        ],
        "type": "string"
      },
      "Anonymous2": {
        "enum": [
          "Siren",
          "Siret"
        ],
        "type": "string"
      },
      "Anonymous3": {
        "enum": [
          "Siren",
          "Siret",
          "RoutingCode"
        ],
        "type": "string"
      },
      "ApiResponse_AuthorizationManifestApiResponse": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/AuthorizationManifestApiResponse"
          },
          "pagination": {
            "$ref": "#/components/schemas/PaginationMeta"
          }
        },
        "additionalProperties": false,
        "description": "Standard API response envelope. All API endpoints return this structure.\r\n\n`data`: the payload (object or collection).\n`pagination`: present only for paginated collections."
      },
      "ApiResponse_Boolean": {
        "type": "object",
        "properties": {
          "data": {
            "type": "boolean"
          },
          "pagination": {
            "$ref": "#/components/schemas/PaginationMeta"
          }
        },
        "additionalProperties": false,
        "description": "Standard API response envelope. All API endpoints return this structure.\r\n\n`data`: the payload (object or collection).\n`pagination`: present only for paginated collections."
      },
      "ApiResponse_CapabilityTestResult": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/CapabilityTestResult"
          },
          "pagination": {
            "$ref": "#/components/schemas/PaginationMeta"
          }
        },
        "additionalProperties": false,
        "description": "Standard API response envelope. All API endpoints return this structure.\r\n\n`data`: the payload (object or collection).\n`pagination`: present only for paginated collections."
      },
      "ApiResponse_CustomFieldDefinitionDynamicDtoList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CustomFieldDefinitionDynamicDto"
            },
            "nullable": true
          },
          "pagination": {
            "$ref": "#/components/schemas/PaginationMeta"
          }
        },
        "additionalProperties": false,
        "description": "Standard API response envelope. All API endpoints return this structure.\r\n\n`data`: the payload (object or collection).\n`pagination`: present only for paginated collections."
      },
      "ApiResponse_CustomFieldValueDtoList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CustomFieldValueDto"
            },
            "nullable": true
          },
          "pagination": {
            "$ref": "#/components/schemas/PaginationMeta"
          }
        },
        "additionalProperties": false,
        "description": "Standard API response envelope. All API endpoints return this structure.\r\n\n`data`: the payload (object or collection).\n`pagination`: present only for paginated collections."
      },
      "ApiResponse_DeleteAccountResult": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/DeleteAccountResult"
          },
          "pagination": {
            "$ref": "#/components/schemas/PaginationMeta"
          }
        },
        "additionalProperties": false,
        "description": "Standard API response envelope. All API endpoints return this structure.\r\n\n`data`: the payload (object or collection).\n`pagination`: present only for paginated collections."
      },
      "ApiResponse_DirectoryEntryDto": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/DirectoryEntryDto"
          },
          "pagination": {
            "$ref": "#/components/schemas/PaginationMeta"
          }
        },
        "additionalProperties": false,
        "description": "Standard API response envelope. All API endpoints return this structure.\r\n\n`data`: the payload (object or collection).\n`pagination`: present only for paginated collections."
      },
      "ApiResponse_DirectoryLookupResultDto": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/DirectoryLookupResultDto"
          },
          "pagination": {
            "$ref": "#/components/schemas/PaginationMeta"
          }
        },
        "additionalProperties": false,
        "description": "Standard API response envelope. All API endpoints return this structure.\r\n\n`data`: the payload (object or collection).\n`pagination`: present only for paginated collections."
      },
      "ApiResponse_ExtractionJobDto": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/ExtractionJobDto"
          },
          "pagination": {
            "$ref": "#/components/schemas/PaginationMeta"
          }
        },
        "additionalProperties": false,
        "description": "Standard API response envelope. All API endpoints return this structure.\r\n\n`data`: the payload (object or collection).\n`pagination`: present only for paginated collections."
      },
      "ApiResponse_FrInvoiceCashConfirmationResultDto": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/FrInvoiceCashConfirmationResultDto"
          },
          "pagination": {
            "$ref": "#/components/schemas/PaginationMeta"
          }
        },
        "additionalProperties": false,
        "description": "Standard API response envelope. All API endpoints return this structure.\r\n\n`data`: the payload (object or collection).\n`pagination`: present only for paginated collections."
      },
      "ApiResponse_FrInvoiceOrchestratorResultDto": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/FrInvoiceOrchestratorResultDto"
          },
          "pagination": {
            "$ref": "#/components/schemas/PaginationMeta"
          }
        },
        "additionalProperties": false,
        "description": "Standard API response envelope. All API endpoints return this structure.\r\n\n`data`: the payload (object or collection).\n`pagination`: present only for paginated collections."
      },
      "ApiResponse_IReadOnlyList_TransitionReferenceDto": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TransitionReferenceDto"
            },
            "nullable": true
          },
          "pagination": {
            "$ref": "#/components/schemas/PaginationMeta"
          }
        },
        "additionalProperties": false,
        "description": "Standard API response envelope. All API endpoints return this structure.\r\n\n`data`: the payload (object or collection).\n`pagination`: present only for paginated collections."
      },
      "ApiResponse_IReadOnlyList_WebhookDeliveryDto": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WebhookDeliveryDto"
            },
            "nullable": true
          },
          "pagination": {
            "$ref": "#/components/schemas/PaginationMeta"
          }
        },
        "additionalProperties": false,
        "description": "Standard API response envelope. All API endpoints return this structure.\r\n\n`data`: the payload (object or collection).\n`pagination`: present only for paginated collections."
      },
      "ApiResponse_IReadOnlyList_WebhookSubscriptionDto": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WebhookSubscriptionDto"
            },
            "nullable": true
          },
          "pagination": {
            "$ref": "#/components/schemas/PaginationMeta"
          }
        },
        "additionalProperties": false,
        "description": "Standard API response envelope. All API endpoints return this structure.\r\n\n`data`: the payload (object or collection).\n`pagination`: present only for paginated collections."
      },
      "ApiResponse_InvoiceFromFileResponseDto": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/InvoiceFromFileResponseDto"
          },
          "pagination": {
            "$ref": "#/components/schemas/PaginationMeta"
          }
        },
        "additionalProperties": false,
        "description": "Standard API response envelope. All API endpoints return this structure.\r\n\n`data`: the payload (object or collection).\n`pagination`: present only for paginated collections."
      },
      "ApiResponse_InvoicePreviewResultDto": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/InvoicePreviewResultDto"
          },
          "pagination": {
            "$ref": "#/components/schemas/PaginationMeta"
          }
        },
        "additionalProperties": false,
        "description": "Standard API response envelope. All API endpoints return this structure.\r\n\n`data`: the payload (object or collection).\n`pagination`: present only for paginated collections."
      },
      "ApiResponse_InvoicePublicDto": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/InvoicePublicDto"
          },
          "pagination": {
            "$ref": "#/components/schemas/PaginationMeta"
          }
        },
        "additionalProperties": false,
        "description": "Standard API response envelope. All API endpoints return this structure.\r\n\n`data`: the payload (object or collection).\n`pagination`: present only for paginated collections."
      },
      "ApiResponse_InvoiceValidationResultDto": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/InvoiceValidationResultDto"
          },
          "pagination": {
            "$ref": "#/components/schemas/PaginationMeta"
          }
        },
        "additionalProperties": false,
        "description": "Standard API response envelope. All API endpoints return this structure.\r\n\n`data`: the payload (object or collection).\n`pagination`: present only for paginated collections."
      },
      "ApiResponse_MeDto": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/MeDto"
          },
          "pagination": {
            "$ref": "#/components/schemas/PaginationMeta"
          }
        },
        "additionalProperties": false,
        "description": "Standard API response envelope. All API endpoints return this structure.\r\n\n`data`: the payload (object or collection).\n`pagination`: present only for paginated collections."
      },
      "ApiResponse_MfaRecoveryCodesResponse": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/MfaRecoveryCodesResponse"
          },
          "pagination": {
            "$ref": "#/components/schemas/PaginationMeta"
          }
        },
        "additionalProperties": false,
        "description": "Standard API response envelope. All API endpoints return this structure.\r\n\n`data`: the payload (object or collection).\n`pagination`: present only for paginated collections."
      },
      "ApiResponse_MfaSetupResponse": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/MfaSetupResponse"
          },
          "pagination": {
            "$ref": "#/components/schemas/PaginationMeta"
          }
        },
        "additionalProperties": false,
        "description": "Standard API response envelope. All API endpoints return this structure.\r\n\n`data`: the payload (object or collection).\n`pagination`: present only for paginated collections."
      },
      "ApiResponse_OpenRoutingResponseDto": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/OpenRoutingResponseDto"
          },
          "pagination": {
            "$ref": "#/components/schemas/PaginationMeta"
          }
        },
        "additionalProperties": false,
        "description": "Standard API response envelope. All API endpoints return this structure.\r\n\n`data`: the payload (object or collection).\n`pagination`: present only for paginated collections."
      },
      "ApiResponse_PaDirectoryDto": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/PaDirectoryDto"
          },
          "pagination": {
            "$ref": "#/components/schemas/PaginationMeta"
          }
        },
        "additionalProperties": false,
        "description": "Standard API response envelope. All API endpoints return this structure.\r\n\n`data`: the payload (object or collection).\n`pagination`: present only for paginated collections."
      },
      "ApiResponse_PaDirectoryPeerDto": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/PaDirectoryPeerDto"
          },
          "pagination": {
            "$ref": "#/components/schemas/PaginationMeta"
          }
        },
        "additionalProperties": false,
        "description": "Standard API response envelope. All API endpoints return this structure.\r\n\n`data`: the payload (object or collection).\n`pagination`: present only for paginated collections."
      },
      "ApiResponse_PaDirectorySaveResult": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/PaDirectorySaveResult"
          },
          "pagination": {
            "$ref": "#/components/schemas/PaginationMeta"
          }
        },
        "additionalProperties": false,
        "description": "Standard API response envelope. All API endpoints return this structure.\r\n\n`data`: the payload (object or collection).\n`pagination`: present only for paginated collections."
      },
      "ApiResponse_PagedResult_DirectoryEntryDto": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/PagedResult_DirectoryEntryDto"
          },
          "pagination": {
            "$ref": "#/components/schemas/PaginationMeta"
          }
        },
        "additionalProperties": false,
        "description": "Standard API response envelope. All API endpoints return this structure.\r\n\n`data`: the payload (object or collection).\n`pagination`: present only for paginated collections."
      },
      "ApiResponse_PagedResult_InboxListItemDto": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/PagedResult_InboxListItemDto"
          },
          "pagination": {
            "$ref": "#/components/schemas/PaginationMeta"
          }
        },
        "additionalProperties": false,
        "description": "Standard API response envelope. All API endpoints return this structure.\r\n\n`data`: the payload (object or collection).\n`pagination`: present only for paginated collections."
      },
      "ApiResponse_PagedResult_InvoiceListItemDto": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/PagedResult_InvoiceListItemDto"
          },
          "pagination": {
            "$ref": "#/components/schemas/PaginationMeta"
          }
        },
        "additionalProperties": false,
        "description": "Standard API response envelope. All API endpoints return this structure.\r\n\n`data`: the payload (object or collection).\n`pagination`: present only for paginated collections."
      },
      "ApiResponse_PagedResult_PaDirectoryPeerDto": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/PagedResult_PaDirectoryPeerDto"
          },
          "pagination": {
            "$ref": "#/components/schemas/PaginationMeta"
          }
        },
        "additionalProperties": false,
        "description": "Standard API response envelope. All API endpoints return this structure.\r\n\n`data`: the payload (object or collection).\n`pagination`: present only for paginated collections."
      },
      "ApiResponse_PagedResult_ReportingTransactionDto": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/PagedResult_ReportingTransactionDto"
          },
          "pagination": {
            "$ref": "#/components/schemas/PaginationMeta"
          }
        },
        "additionalProperties": false,
        "description": "Standard API response envelope. All API endpoints return this structure.\r\n\n`data`: the payload (object or collection).\n`pagination`: present only for paginated collections."
      },
      "ApiResponse_RegisterPaResponseDto": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/RegisterPaResponseDto"
          },
          "pagination": {
            "$ref": "#/components/schemas/PaginationMeta"
          }
        },
        "additionalProperties": false,
        "description": "Standard API response envelope. All API endpoints return this structure.\r\n\n`data`: the payload (object or collection).\n`pagination`: present only for paginated collections."
      },
      "ApiResponse_ReportingPeriodDto": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/ReportingPeriodDto"
          },
          "pagination": {
            "$ref": "#/components/schemas/PaginationMeta"
          }
        },
        "additionalProperties": false,
        "description": "Standard API response envelope. All API endpoints return this structure.\r\n\n`data`: the payload (object or collection).\n`pagination`: present only for paginated collections."
      },
      "ApiResponse_ReportingPeriodDtoList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReportingPeriodDto"
            },
            "nullable": true
          },
          "pagination": {
            "$ref": "#/components/schemas/PaginationMeta"
          }
        },
        "additionalProperties": false,
        "description": "Standard API response envelope. All API endpoints return this structure.\r\n\n`data`: the payload (object or collection).\n`pagination`: present only for paginated collections."
      },
      "ApiResponse_ReportingPeriodSummaryDto": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/ReportingPeriodSummaryDto"
          },
          "pagination": {
            "$ref": "#/components/schemas/PaginationMeta"
          }
        },
        "additionalProperties": false,
        "description": "Standard API response envelope. All API endpoints return this structure.\r\n\n`data`: the payload (object or collection).\n`pagination`: present only for paginated collections."
      },
      "ApiResponse_ReportingTransactionDto": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/ReportingTransactionDto"
          },
          "pagination": {
            "$ref": "#/components/schemas/PaginationMeta"
          }
        },
        "additionalProperties": false,
        "description": "Standard API response envelope. All API endpoints return this structure.\r\n\n`data`: the payload (object or collection).\n`pagination`: present only for paginated collections."
      },
      "ApiResponse_ReportingTransactionDtoList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReportingTransactionDto"
            },
            "nullable": true
          },
          "pagination": {
            "$ref": "#/components/schemas/PaginationMeta"
          }
        },
        "additionalProperties": false,
        "description": "Standard API response envelope. All API endpoints return this structure.\r\n\n`data`: the payload (object or collection).\n`pagination`: present only for paginated collections."
      },
      "ApiResponse_SandboxScenarioResponseDto": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/SandboxScenarioResponseDto"
          },
          "pagination": {
            "$ref": "#/components/schemas/PaginationMeta"
          }
        },
        "additionalProperties": false,
        "description": "Standard API response envelope. All API endpoints return this structure.\r\n\n`data`: the payload (object or collection).\n`pagination`: present only for paginated collections."
      },
      "ApiResponse_TenantPublicDto": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/TenantPublicDto"
          },
          "pagination": {
            "$ref": "#/components/schemas/PaginationMeta"
          }
        },
        "additionalProperties": false,
        "description": "Standard API response envelope. All API endpoints return this structure.\r\n\n`data`: the payload (object or collection).\n`pagination`: present only for paginated collections."
      },
      "ApiResponse_TenantPublicDtoList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TenantPublicDto"
            },
            "nullable": true
          },
          "pagination": {
            "$ref": "#/components/schemas/PaginationMeta"
          }
        },
        "additionalProperties": false,
        "description": "Standard API response envelope. All API endpoints return this structure.\r\n\n`data`: the payload (object or collection).\n`pagination`: present only for paginated collections."
      },
      "ApiResponse_TimelineAttachmentDto": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/TimelineAttachmentDto"
          },
          "pagination": {
            "$ref": "#/components/schemas/PaginationMeta"
          }
        },
        "additionalProperties": false,
        "description": "Standard API response envelope. All API endpoints return this structure.\r\n\n`data`: the payload (object or collection).\n`pagination`: present only for paginated collections."
      },
      "ApiResponse_TimelineEventDto": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/TimelineEventDto"
          },
          "pagination": {
            "$ref": "#/components/schemas/PaginationMeta"
          }
        },
        "additionalProperties": false,
        "description": "Standard API response envelope. All API endpoints return this structure.\r\n\n`data`: the payload (object or collection).\n`pagination`: present only for paginated collections."
      },
      "ApiResponse_TimelineEventDtoList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TimelineEventDto"
            },
            "nullable": true
          },
          "pagination": {
            "$ref": "#/components/schemas/PaginationMeta"
          }
        },
        "additionalProperties": false,
        "description": "Standard API response envelope. All API endpoints return this structure.\r\n\n`data`: the payload (object or collection).\n`pagination`: present only for paginated collections."
      },
      "ApiResponse_UserProfileResponse": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/UserProfileResponse"
          },
          "pagination": {
            "$ref": "#/components/schemas/PaginationMeta"
          }
        },
        "additionalProperties": false,
        "description": "Standard API response envelope. All API endpoints return this structure.\r\n\n`data`: the payload (object or collection).\n`pagination`: present only for paginated collections."
      },
      "ApiResponse_WebhookSubscriptionCreatedDto": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/WebhookSubscriptionCreatedDto"
          },
          "pagination": {
            "$ref": "#/components/schemas/PaginationMeta"
          }
        },
        "additionalProperties": false,
        "description": "Standard API response envelope. All API endpoints return this structure.\r\n\n`data`: the payload (object or collection).\n`pagination`: present only for paginated collections."
      },
      "AttachmentDto": {
        "required": [
          "contentBase64",
          "filename",
          "mimeType"
        ],
        "type": "object",
        "properties": {
          "filename": {
            "type": "string",
            "description": "BT-124 — original filename.",
            "nullable": true
          },
          "contentBase64": {
            "type": "string",
            "description": "BT-125 — base64-encoded content (5 MB max after decoding).",
            "nullable": true
          },
          "mimeType": {
            "type": "string",
            "description": "Mime type (e.g. `application/pdf`).",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "BT-123 — short description shown alongside the attachment.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "EN 16931 attachment block (BG-24)."
      },
      "AuthType": {
        "enum": [
          "OAuth2ClientCreds",
          "ApiKey",
          "MutualTls",
          "Custom"
        ],
        "type": "string",
        "description": "Mécanisme d'authentification utilisé pour se connecter à une PA partenaire\r\n(`PaCapability.AuthType`, NEOTIMO-1291)."
      },
      "AuthorizationManifestApiResponse": {
        "type": "object",
        "properties": {
          "generatedAt": {
            "type": "string",
            "description": "UTC timestamp captured at request handling time.",
            "format": "date-time"
          },
          "environment": {
            "type": "string",
            "description": "Hosting environment name (`Development`, `Preprod`, `Production`, …).",
            "nullable": true
          },
          "entries": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AuthorizationManifestEntryApiDto"
            },
            "description": "All manifest entries, optionally filtered by `?module=`.",
            "nullable": true
          },
          "drift": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DriftEntryApiDto"
            },
            "description": "Drift list — present only when the request asks for it via `?includeDrift=true`.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "JSON payload returned by `GET /api/v1/core/authz/manifest`. Designed for\r\ncross-environment diffs, CI gates, and external audit tooling — every field uses\r\ncamelCase via System.Text.Json.Serialization.JsonPropertyNameAttribute and enums serialize as strings\r\n(`\"Page\"`, not `1`)."
      },
      "AuthorizationManifestEntryApiDto": {
        "type": "object",
        "properties": {
          "source": {
            "$ref": "#/components/schemas/AuthorizationSource"
          },
          "module": {
            "type": "string",
            "nullable": true
          },
          "declaringType": {
            "type": "string",
            "nullable": true
          },
          "memberName": {
            "type": "string",
            "nullable": true
          },
          "fullKey": {
            "type": "string",
            "nullable": true
          },
          "rolesDeclared": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "isSensitivePattern": {
            "type": "boolean"
          },
          "routeTemplate": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "API-shaped projection of An.Platform.Module.Core.Presentation.Api.AuthorizationManifestEntry. Field names are\r\nfixed by System.Text.Json.Serialization.JsonPropertyNameAttribute so they remain stable across refactors —\r\npartners and CI scripts depend on them."
      },
      "AuthorizationSource": {
        "enum": [
          "Menu",
          "Page",
          "Service",
          "ApiEndpoint",
          "SensitivePattern"
        ],
        "type": "string",
        "description": "Origin of an authorization declaration in the platform.\r\n\n\r\nFour declarative Feature sources plus one runtime safety-net source — see\r\n`IAuthorizationManifestService` for the scan strategy of each.\r\n"
      },
      "BillingFrame": {
        "enum": [
          "S1",
          "S2",
          "S3",
          "S4"
        ],
        "type": "string",
        "description": "French invoicing frame (EXT-FR-FE BT-23)."
      },
      "CancelInvoiceRequestDto": {
        "type": "object",
        "properties": {
          "reason": {
            "type": "string",
            "description": "Optional free-text reason captured in the audit trail.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Body for `POST /api/v1/neotimo/invoices/{id}/cancel`."
      },
      "CapabilityTestResult": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "`true` if the endpoint replied with a 2xx status during the probe."
          },
          "testedAt": {
            "type": "string",
            "description": "UTC timestamp of the probe (persisted on the capability).",
            "format": "date-time"
          },
          "message": {
            "type": "string",
            "description": "Descriptive message: HTTP status, truncated exception, etc.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Outcome of M:An.Platform.Module.Neotimo.Presentation.Interfaces.IPaDirectoryService.TestCapabilityAsync(System.Int64,System.Threading.CancellationToken)\r\n(NEOTIMO-1292)."
      },
      "CapabilityTestStatus": {
        "enum": [
          "NotTested",
          "Success",
          "Failed"
        ],
        "type": "string",
        "description": "Résultat du dernier test de connectivité réalisé sur une `PaCapability`\r\nvia le bouton « Tester connexion » de l'UI Admin (NEOTIMO-1291, NEOTIMO-1294)."
      },
      "ContainsOrStartWithOperator": {
        "enum": [
          "Contains",
          "StartWith"
        ],
        "type": "string",
        "description": "\\\"contains\\\" or \\\"startWith\\\" comparison operator"
      },
      "ContainsOrStrictOperator": {
        "enum": [
          "Contains",
          "Strict"
        ],
        "type": "string",
        "description": "\\\"contains\\\" or \\\"strict\\\" comparison operator"
      },
      "ContainsOrStrictOrStartWithOperator": {
        "enum": [
          "Contains",
          "Strict",
          "StartWith"
        ],
        "type": "string",
        "description": "\\\"contains\\\", \\\"strict\\\" or \\\"startWith\\\" comparison operator"
      },
      "CreditInvoiceRequestDto": {
        "required": [
          "reason"
        ],
        "type": "object",
        "properties": {
          "reason": {
            "type": "string",
            "description": "Reason for the credit (mandatory, audited).",
            "nullable": true
          },
          "number": {
            "type": "string",
            "description": "Credit note number assigned by the supplier (optional — the server assigns one if missing).",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Body for `POST /invoices/{id}/credit`."
      },
      "CustomFieldDefinitionDynamicDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "code": {
            "type": "string",
            "description": "Stable, immutable key of the definition (ANP-2149). Set once at creation (derived from\r\nAn.Platform.Module.Core.Presentation.CustomFieldDefinitionDynamicDto.Name when not provided) and NEVER updated afterwards — the repository\r\ndeliberately excludes it from the UPDATE statement. Null on legacy rows only.",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "customFieldTypeId": {
            "$ref": "#/components/schemas/EnumCustomFieldType"
          },
          "configJson": {
            "type": "string",
            "nullable": true
          },
          "tenantId": {
            "type": "integer",
            "description": "Tenant identifier (not used in the first version, kept for backward compatibility).",
            "format": "int32",
            "nullable": true,
            "readOnly": true
          },
          "isRequired": {
            "type": "boolean",
            "description": "Indicates whether the field must be provided when editing the parent entity.\r\nDefaults to false (ANP-2186), aligned with the entity and\r\nAn.Platform.Module.Core.Presentation.CustomFieldDefinitionCreateRequest: an obligation is always an\r\nexplicit opt-in, never inherited from an omitted property."
          },
          "sortOrder": {
            "type": "integer",
            "format": "int32"
          },
          "width": {
            "type": "integer",
            "format": "int32"
          },
          "scopeKind": {
            "$ref": "#/components/schemas/EnumCustomFieldScopeKind"
          },
          "scopeOwnerType": {
            "type": "string",
            "description": "Type of the designated scope owner (module-defined, opaque to Core).",
            "nullable": true
          },
          "scopeOwnerId": {
            "type": "integer",
            "description": "Identifier of the designated scope owner instance.",
            "format": "int32",
            "nullable": true
          },
          "definitionScopeId": {
            "type": "integer",
            "format": "int32",
            "nullable": true,
            "deprecated": true
          },
          "designation": {
            "type": "string",
            "description": "Culture-resolved display label (overlay). Null → fall back to An.Platform.Module.Core.Presentation.CustomFieldDefinitionDynamicDto.Name.",
            "nullable": true
          },
          "localizations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CustomFieldDefinitionLocalizationDto"
            },
            "description": "Localized field values loaded/edited for this definition (module-local type).",
            "nullable": true
          },
          "enableUpdateLocalization": {
            "type": "boolean",
            "description": "When true, an edit upserts the CURRENT culture's translation (mirrors [Localizable] setter intent)."
          },
          "displayLabel": {
            "type": "string",
            "description": "Label to render: An.Platform.Module.Core.Presentation.CustomFieldDefinitionDynamicDto.Designation when set, else the technical An.Platform.Module.Core.Presentation.CustomFieldDefinitionDynamicDto.Name.",
            "nullable": true,
            "readOnly": true
          }
        },
        "additionalProperties": false,
        "description": "DTO describing a custom field definition (name, type, configuration).\r\nThis DTO is used by administrators to configure available custom fields."
      },
      "CustomFieldDefinitionLocalizationDto": {
        "type": "object",
        "properties": {
          "cultureId": {
            "type": "string",
            "nullable": true
          },
          "fieldName": {
            "type": "string",
            "nullable": true
          },
          "value": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Module-local DTO describing one localized field value of a custom-field definition.\r\nIntentionally independent of any external LocalizationDto (no ANP-1329 coupling)."
      },
      "CustomFieldScopeRefDto": {
        "required": [
          "ownerId",
          "ownerType"
        ],
        "type": "object",
        "properties": {
          "ownerType": {
            "minLength": 1,
            "type": "string",
            "description": "Module-defined owner type (opaque to Core), matched case-insensitively."
          },
          "ownerId": {
            "type": "integer",
            "description": "Identifier of the owner instance.",
            "format": "int32"
          },
          "depth": {
            "type": "integer",
            "description": "Depth of the owner within its own hierarchy (0 = root; deepest wins on conflicts).",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "API representation of a scope owner reference (ANP-2150). Mirrors\r\nAn.Platform.Module.Core.Presentation.CustomFieldScopeRef with a serialization-friendly shape."
      },
      "CustomFieldValueDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "customFieldDefinitionId": {
            "type": "integer",
            "description": "Custom field definition identifier.",
            "format": "int32"
          },
          "entityId": {
            "type": "integer",
            "description": "Id of the entity custom field data saved.",
            "format": "int32"
          },
          "value": {
            "type": "string",
            "description": "Raw JSON-serialized value.",
            "nullable": true
          },
          "valueType": {
            "$ref": "#/components/schemas/EnumCustomFieldValueType"
          },
          "valueNumber": {
            "type": "number",
            "description": "ANP-2173 (CF-E1): numeric projection of An.Platform.Module.Core.Presentation.Dtos.CustomField.CustomFieldValueDto.Value (ANP-2174 typed column),\r\nmapped by name from the entity so the localizable DTO path of the request funnel can\r\nevaluate the SAME typed filters/sorts the SQL path runs on the value tables.\r\nDerived — never write it directly, An.Platform.Module.Core.Presentation.Dtos.CustomField.CustomFieldValueDto.Value stays the source of truth.",
            "format": "double",
            "nullable": true
          },
          "valueDate": {
            "type": "string",
            "description": "Date projection of An.Platform.Module.Core.Presentation.Dtos.CustomField.CustomFieldValueDto.Value — same contract as An.Platform.Module.Core.Presentation.Dtos.CustomField.CustomFieldValueDto.ValueNumber.",
            "format": "date-time",
            "nullable": true
          },
          "valueBoolean": {
            "type": "boolean",
            "description": "Boolean projection of An.Platform.Module.Core.Presentation.Dtos.CustomField.CustomFieldValueDto.Value — same contract as An.Platform.Module.Core.Presentation.Dtos.CustomField.CustomFieldValueDto.ValueNumber.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "DTO used to transfer dynamic custom field values between layers."
      },
      "CustomFieldValueWriteItem": {
        "required": [
          "customFieldDefinitionId"
        ],
        "type": "object",
        "properties": {
          "customFieldDefinitionId": {
            "type": "integer",
            "description": "Identifier of the custom field definition the value belongs to.",
            "format": "int32"
          },
          "value": {
            "type": "string",
            "description": "Raw value in the persisted representation of the single value contract\r\n(An.Platform.Module.Core.Presentation.Helpers.CustomFieldValueConverter). Null or empty clears the value.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "One custom field value to write on the entity."
      },
      "CustomFieldValueWriteRequest": {
        "required": [
          "values"
        ],
        "type": "object",
        "properties": {
          "values": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CustomFieldValueWriteItem"
            },
            "description": "Values to write, one per custom field definition. Definitions not listed keep their current value."
          },
          "scopes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CustomFieldScopeRefDto"
            },
            "description": "Scope owners the entity is attached to (ANP-2150), used to resolve the definitions\r\nAPPLICABLE to the entity — the same resolution the UI performs. Omitted or empty:\r\nonly Model-scoped definitions apply (historical behavior).",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "API payload writing custom field values on one entity (ANP-2177).\r\n\n\r\nEach item carries the RAW persisted representation of the value — the format produced by\r\nAn.Platform.Module.Core.Presentation.Helpers.CustomFieldValueConverter, the single write contract (ANP-2141): an\r\ninvariant-culture number (\"150.5\"), a round-trippable ISO 8601 date, \"true\"/\"false\" for a\r\ncheckbox, a JSON string array (`[\"a\",\"b\"]`) for multi-value fields, the plain string\r\notherwise. An empty or null value means \"no value\". The server re-reads every value through\r\nthe same converter and refuses the write when a value cannot be interpreted for its field\r\ntype, then re-normalizes it before persisting — the API never stores a representation the\r\nUI could not read back.\r\n"
      },
      "DeleteAccountRequest": {
        "type": "object",
        "properties": {
          "emailConfirmation": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Request body for `DELETE /me`. The caller must echo their own email\r\nin An.Platform.Module.Core.Controllers.DeleteAccountRequest.EmailConfirmation for the server to confirm intent."
      },
      "DeleteAccountResult": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "True when the account was soft-deleted and sessions revoked."
          },
          "reason": {
            "type": "string",
            "description": "Short stable code: `\"ok\"`, `\"email_mismatch\"`, `\"superadmin_refused\"`,\r\n`\"sole_admin_refused\"`, `\"not_authenticated\"`, `\"exception\"`.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Outcome of M:An.Platform.Module.Core.Presentation.Interfaces.IMeService.DeleteMyAccountAsync(System.Security.Claims.ClaimsPrincipal,System.String,System.Threading.CancellationToken). Always returns\r\na non-null instance with a machine-readable An.Platform.Module.Core.Presentation.Dtos.Me.DeleteAccountResult.Reason; the caller can\r\ninspect it without needing to catch exceptions for the foreseen rejection cases."
      },
      "DirectoryEntryDto": {
        "required": [
          "name",
          "siret"
        ],
        "type": "object",
        "properties": {
          "siret": {
            "type": "string",
            "description": "14-digit French SIRET — primary key of the entry.",
            "nullable": true
          },
          "siren": {
            "type": "string",
            "description": "9-digit SIREN — derived from the SIRET, exposed for convenience.",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "Legal name of the company.",
            "nullable": true
          },
          "vatNumber": {
            "type": "string",
            "description": "Intra-EU VAT number (e.g. `FR12345678901`), when known.",
            "nullable": true
          },
          "paName": {
            "type": "string",
            "description": "Display name of the accredited e-invoicing platform (PA) currently routing for this SIRET.",
            "nullable": true
          },
          "paMatricule": {
            "type": "string",
            "description": "Matricule (e.g. `0156` for PPF) of the routing PA.",
            "nullable": true
          },
          "electronicAddress": {
            "type": "string",
            "description": "Electronic address (Peppol participant id, PPF address, ...) when published.",
            "nullable": true
          },
          "preferredChannel": {
            "type": "string",
            "description": "Preferred channel for inbound mail — `ppf`, `peppol`, `edi`, ...",
            "nullable": true
          },
          "supportedFormats": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Wire formats this entry accepts (e.g. `facturx_basic`, `ubl21`).",
            "nullable": true
          },
          "reachable": {
            "type": "boolean",
            "description": "False when the last verification could not reach the partner PA."
          },
          "lastVerifiedAt": {
            "type": "string",
            "description": "UTC timestamp of the last successful directory verification.",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "One routable entry in the partner directory."
      },
      "DirectoryLineField": {
        "enum": [
          "AddressingIdentifier",
          "Siren",
          "Siret",
          "RoutingIdentifier",
          "AddressingSuffix"
        ],
        "type": "string",
        "description": "Fields of the directory line resource"
      },
      "DirectoryLinePayloadHistoryLegalUnitFacilityRoutingCodeRoutingCode": {
        "type": "object",
        "properties": {
          "routingIdentifier": {
            "maxLength": 100,
            "minLength": 0,
            "pattern": "^(?!\\s+$)[\\-_/a-zA-Z0-9]{1,100}$",
            "type": "string",
            "nullable": true
          },
          "routingIdentifierType": {
            "maxLength": 4,
            "minLength": 0,
            "pattern": "^(?!\\s*$).+",
            "type": "string",
            "nullable": true
          },
          "routingCodeName": {
            "maxLength": 100,
            "minLength": 0,
            "pattern": "^(?!\\s*$).+",
            "type": "string",
            "nullable": true
          },
          "managesLegalCommitment": {
            "type": "boolean",
            "nullable": true
          },
          "administrativeStatus": {
            "$ref": "#/components/schemas/RoutingCodeAdministrativeStatus"
          },
          "address": {
            "$ref": "#/components/schemas/AddressRead"
          }
        },
        "additionalProperties": { }
      },
      "DirectoryLinePayloadLegalUnitFacilityRoutingCode": {
        "type": "object",
        "properties": {
          "addressingIdentifier": {
            "maxLength": 125,
            "minLength": 0,
            "type": "string",
            "nullable": true
          },
          "platformType": {
            "$ref": "#/components/schemas/RecipientPlatformType"
          },
          "directoryLineStatus": {
            "$ref": "#/components/schemas/UniqueDirectoryLineStatus"
          },
          "siren": {
            "maxLength": 9,
            "minLength": 0,
            "pattern": "^([0-9]{9})$",
            "type": "string",
            "nullable": true
          },
          "siret": {
            "maxLength": 14,
            "minLength": 0,
            "pattern": "^([0-9]{14})$",
            "type": "string",
            "nullable": true
          },
          "routingIdentifier": {
            "maxLength": 100,
            "minLength": 0,
            "pattern": "^(?!\\s+$)[\\-_/a-zA-Z0-9]{1,100}$",
            "type": "string",
            "nullable": true
          },
          "addressingSuffix": {
            "maxLength": 100,
            "minLength": 0,
            "type": "string",
            "nullable": true
          },
          "routingCode": {
            "$ref": "#/components/schemas/DirectoryLinePayloadHistoryLegalUnitFacilityRoutingCodeRoutingCode"
          },
          "legalUnit": {
            "$ref": "#/components/schemas/LegalUnitPayloadIncluded"
          },
          "facility": {
            "$ref": "#/components/schemas/FacilityPayloadIncluded"
          }
        },
        "additionalProperties": { }
      },
      "DirectoryLinePayloadStatusLegalUnitFacilityRoutingCode": {
        "type": "object",
        "properties": {
          "addressingIdentifier": {
            "maxLength": 125,
            "minLength": 0,
            "type": "string",
            "nullable": true
          },
          "platformType": {
            "$ref": "#/components/schemas/RecipientPlatformType"
          },
          "directoryLineStatus": {
            "$ref": "#/components/schemas/DirectoryLineStatus"
          },
          "siren": {
            "maxLength": 9,
            "minLength": 0,
            "pattern": "^([0-9]{9})$",
            "type": "string",
            "nullable": true
          },
          "siret": {
            "maxLength": 14,
            "minLength": 0,
            "pattern": "^([0-9]{14})$",
            "type": "string",
            "nullable": true
          },
          "routingIdentifier": {
            "maxLength": 100,
            "minLength": 0,
            "pattern": "^(?!\\s+$)[\\-_/a-zA-Z0-9]{1,100}$",
            "type": "string",
            "nullable": true
          },
          "addressingSuffix": {
            "maxLength": 100,
            "minLength": 0,
            "type": "string",
            "nullable": true
          },
          "routingCode": {
            "$ref": "#/components/schemas/DirectoryLinePayloadHistoryLegalUnitFacilityRoutingCodeRoutingCode"
          },
          "legalUnit": {
            "$ref": "#/components/schemas/LegalUnitPayloadIncluded"
          },
          "facility": {
            "$ref": "#/components/schemas/FacilityPayloadIncluded"
          }
        },
        "additionalProperties": { }
      },
      "DirectoryLineSearchPost200Response": {
        "type": "object",
        "properties": {
          "search": {
            "$ref": "#/components/schemas/SearchDirectoryLine"
          },
          "totalNumberOfResults": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DirectoryLinePayloadStatusLegalUnitFacilityRoutingCode"
            },
            "nullable": true
          }
        },
        "additionalProperties": { }
      },
      "DirectoryLineStatus": {
        "enum": [
          "Enabled",
          "Disabled",
          "Upcoming"
        ],
        "type": "string",
        "description": "Line status of the platform.\r\n\n  - Enabled : Active line linked to a platform\r\n\n  - Disabled : No platform linked to the line\r\n\n  - Upcoming : Line associated with a platform, with an effective date in the future\r\n\n"
      },
      "DirectoryLookupResultDto": {
        "type": "object",
        "properties": {
          "found": {
            "type": "boolean",
            "description": "True when the SIRET resolved to a routable entry."
          },
          "entry": {
            "$ref": "#/components/schemas/DirectoryEntryDto"
          },
          "hint": {
            "type": "string",
            "description": "Human-readable hint when the lookup did not produce a match.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Result envelope for a SIRET lookup."
      },
      "DirectoryMeUpdateDto": {
        "type": "object",
        "properties": {
          "electronicAddress": {
            "type": "string",
            "description": "New electronic address to publish. Set to empty string to clear.",
            "nullable": true
          },
          "preferredChannel": {
            "type": "string",
            "description": "Preferred channel — `ppf`, `peppol`, `edi`, ...",
            "nullable": true
          },
          "supportedFormats": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Wire formats the integration accepts on inbound delivery.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Patch body for `PUT /directory/me`."
      },
      "DocType": {
        "enum": [
          "Metadata",
          "Original",
          "Converted",
          "ReadableView"
        ],
        "type": "string"
      },
      "DriftEntryApiDto": {
        "type": "object",
        "properties": {
          "fullKey": {
            "type": "string",
            "nullable": true
          },
          "kind": {
            "$ref": "#/components/schemas/DriftKind"
          },
          "detail": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "API-shaped projection of An.Platform.Module.Core.Presentation.Api.DriftEntry. Returned only when the request asks\r\nfor the drift section via `?includeDrift=true`."
      },
      "DriftKind": {
        "enum": [
          "OrphanInDb",
          "MissingInDb",
          "RoleMismatch"
        ],
        "type": "string",
        "description": "Kind of drift between the code-declared manifest and the effective DB state."
      },
      "EntityType": {
        "enum": [
          "Public",
          "PrivateVatRegistered"
        ],
        "type": "string",
        "description": "Business structure type"
      },
      "EnumAllowanceChargeType": {
        "enum": [
          "Allowance",
          "Charge"
        ],
        "type": "string",
        "description": "Allowance/Charge indicator for document-level and line-level (BG-20/21/27/28)."
      },
      "EnumCustomFieldScopeKind": {
        "enum": [
          "Model",
          "Owner"
        ],
        "type": "string",
        "description": "Scope of a custom field definition (ANP-2149).\r\nCore stays generic: it never names a specific owner concept (category, folder, ...);\r\nthe owner is designated by the consuming module through ScopeOwnerType/ScopeOwnerId."
      },
      "EnumCustomFieldType": {
        "enum": [
          "RadioButtons",
          "Calendar",
          "Checkbox",
          "UrlField",
          "NumberField",
          "ShortText",
          "Tags",
          "CascadingDropdown",
          "MultiSelectDropdown",
          "SingleSelectDropdown",
          "Paragraph",
          "UserSelector",
          "DateTimePicker"
        ],
        "type": "string"
      },
      "EnumCustomFieldValueType": {
        "enum": [
          "String",
          "Number",
          "Boolean",
          "Date"
        ],
        "type": "string",
        "description": "Defines the runtime data type of a custom field value.\r\nUsed to convert and validate the raw string Value."
      },
      "EnumInvoiceFormatCode": {
        "enum": [
          "Ubl",
          "Cii"
        ],
        "type": "string",
        "description": "Invoice format syntax code.\r\nIdentifies whether the invoice uses UBL or CII format."
      },
      "EnumInvoicePartyRole": {
        "enum": [
          "Seller",
          "Buyer",
          "Payee",
          "SellerTaxRepresentative",
          "Payer",
          "AddressedTo",
          "InvoicingThirdParty"
        ],
        "type": "string",
        "description": "Party role in an invoice (BG-4 to BG-11 + French extensions EXT-FR-FE-BG-xx).\r\nIdentifies the function of a party within the invoice."
      },
      "EnumInvoiceTypeCode": {
        "enum": [
          "SelfBilledCreditNote",
          "Invoice",
          "CreditNote",
          "DebitNote",
          "CorrectedInvoice",
          "PrepaymentInvoice",
          "SelfBilledInvoice",
          "FactoredInvoice",
          "FactoredCreditNote",
          "SelfBilledCorrectedInvoice",
          "FactoredCorrectedInvoice",
          "SelfBilledFactoredCorrectedInvoice",
          "SelfBilledPrepaymentInvoice",
          "SelfBilledFactoredInvoice",
          "SelfBilledFactoredCreditNote",
          "PrepaymentCreditNote",
          "InvoiceInformation"
        ],
        "type": "string",
        "description": "Invoice type codes per UNTDID 1001 subset authorized by PPF (BT-3).\r\nReference: Annexe 7 V1.8 — Règle G1.01 (types de facture autorisés)."
      },
      "ExtractionJobDto": {
        "required": [
          "id"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable job id (e.g. `job_01HZ...`).",
            "nullable": true
          },
          "status": {
            "$ref": "#/components/schemas/ExtractionJobStatus"
          },
          "createdAt": {
            "type": "string",
            "description": "Server timestamp at job creation.",
            "format": "date-time"
          },
          "completedAt": {
            "type": "string",
            "description": "Server timestamp when the job left the pending range.",
            "format": "date-time",
            "nullable": true
          },
          "estimatedCompletion": {
            "type": "string",
            "description": "Best-effort ETA for completion (advisory).",
            "format": "date-time",
            "nullable": true
          },
          "sourceFileName": {
            "type": "string",
            "description": "Original filename uploaded by the partner.",
            "nullable": true
          },
          "sourceMimeType": {
            "type": "string",
            "description": "Mime type detected on the upload.",
            "nullable": true
          },
          "extracted": {
            "$ref": "#/components/schemas/InvoicePublicDto"
          },
          "emittedInvoiceId": {
            "type": "string",
            "description": "Id of the invoice the platform created from this extraction (when applicable).",
            "nullable": true
          },
          "warnings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ExtractionWarningDto"
            },
            "description": "Per-field warnings emitted by the model.",
            "nullable": true
          },
          "simulated": {
            "type": "boolean",
            "description": "`true` when the result is a fixed specimen rather than the reading of your file —\r\n            always the case on the sandbox surface. Branch on it if your tests need to know."
          }
        },
        "additionalProperties": false,
        "description": "State and result of one extraction job."
      },
      "ExtractionJobStatus": {
        "enum": [
          "queued",
          "extracting",
          "completed",
          "failed"
        ],
        "type": "string"
      },
      "ExtractionWarningDto": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string",
            "description": "JSON path of the affected field (e.g. `buyer.siret`).",
            "nullable": true
          },
          "confidence": {
            "type": "number",
            "description": "Model confidence in the 0.0 to 1.0 range.",
            "format": "double"
          },
          "message": {
            "type": "string",
            "description": "Short message explaining the doubt.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "One per-field uncertainty signal from the extraction model."
      },
      "FacilityAdministrativeStatus": {
        "enum": [
          "A",
          "C"
        ],
        "type": "string",
        "description": "Facility administrative status [A - Active , C - Closed]"
      },
      "FacilityPayloadHistory": {
        "type": "object",
        "properties": {
          "siret": {
            "maxLength": 14,
            "minLength": 0,
            "pattern": "^([0-9]{14})$",
            "type": "string",
            "nullable": true
          },
          "siren": {
            "maxLength": 9,
            "minLength": 0,
            "pattern": "^([0-9]{9})$",
            "type": "string",
            "nullable": true
          },
          "name": {
            "maxLength": 100,
            "minLength": 0,
            "type": "string",
            "nullable": true
          },
          "facilityType": {
            "$ref": "#/components/schemas/FacilityType"
          },
          "administrativeStatus": {
            "$ref": "#/components/schemas/FacilityAdministrativeStatus"
          },
          "siretInstructions": {
            "$ref": "#/components/schemas/SiretInstructions"
          },
          "address": {
            "$ref": "#/components/schemas/AddressRead"
          },
          "b2gAdditionalData": {
            "$ref": "#/components/schemas/FacilityPayloadHistoryUleB2gAdditionalData"
          },
          "legalUnit": {
            "$ref": "#/components/schemas/LegalUnitPayloadIncluded"
          }
        },
        "additionalProperties": { }
      },
      "FacilityPayloadHistoryUleB2gAdditionalData": {
        "type": "object",
        "properties": {
          "pm": {
            "type": "boolean",
            "nullable": true
          },
          "pmOnly": {
            "type": "boolean",
            "nullable": true
          },
          "managesPaymentStatus": {
            "type": "boolean",
            "nullable": true
          },
          "managesLegalCommitmentCode": {
            "type": "boolean",
            "nullable": true
          },
          "managesLegalCommitmentOrServiceCode": {
            "type": "boolean",
            "nullable": true
          },
          "serviceCodeStatus": {
            "type": "boolean",
            "nullable": true
          }
        },
        "additionalProperties": { }
      },
      "FacilityPayloadIncluded": {
        "type": "object",
        "properties": {
          "siret": {
            "maxLength": 14,
            "minLength": 0,
            "pattern": "^([0-9]{14})$",
            "type": "string",
            "nullable": true
          },
          "siren": {
            "maxLength": 9,
            "minLength": 0,
            "pattern": "^([0-9]{9})$",
            "type": "string",
            "nullable": true
          },
          "name": {
            "maxLength": 100,
            "minLength": 0,
            "type": "string",
            "nullable": true
          },
          "facilityType": {
            "$ref": "#/components/schemas/FacilityType"
          },
          "administrativeStatus": {
            "$ref": "#/components/schemas/FacilityAdministrativeStatus"
          },
          "instructions": {
            "$ref": "#/components/schemas/SiretInstructions"
          },
          "address": {
            "$ref": "#/components/schemas/AddressRead"
          },
          "b2gAdditionalData": {
            "$ref": "#/components/schemas/FacilityPayloadHistoryUleB2gAdditionalData"
          }
        },
        "additionalProperties": { }
      },
      "FacilityType": {
        "enum": [
          "P",
          "S"
        ],
        "type": "string",
        "description": "Indicates whether the facility is listed as the main facility or not [P - Main facility , S - Secondary facility]"
      },
      "Flow": {
        "required": [
          "acknowledgement",
          "flowDirection",
          "flowId",
          "flowSyntax",
          "flowType",
          "name",
          "processingRuleSource",
          "submittedAt",
          "updatedAt"
        ],
        "type": "object",
        "properties": {
          "trackingId": {
            "maxLength": 64,
            "minLength": 0,
            "type": "string",
            "description": "The tracking id is an external identifier and is used to track the flow by the sender",
            "nullable": true
          },
          "name": {
            "maxLength": 255,
            "minLength": 0,
            "type": "string",
            "description": "Name of the file"
          },
          "processingRule": {
            "$ref": "#/components/schemas/ProcessingRule"
          },
          "flowSyntax": {
            "$ref": "#/components/schemas/FlowSyntax"
          },
          "flowProfile": {
            "$ref": "#/components/schemas/FlowProfile"
          },
          "flowId": {
            "maxLength": 64,
            "minLength": 0,
            "type": "string"
          },
          "submittedAt": {
            "type": "string",
            "description": "The flow submission date and time (the date and time when the flow was created on the system)\r\n\nThis property should be used by the API consumer as a time reference to avoid clock synchronization issues\r\n\n",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "description": "The last update date and time of the flow. When the flow is submitted updatedAt is equal to submittedAt.\r\n\nWhen the flow acknowledgment status is changed updatedAt date and time is updated.\r\n\n",
            "format": "date-time"
          },
          "flowType": {
            "$ref": "#/components/schemas/FlowType"
          },
          "processingRuleSource": {
            "$ref": "#/components/schemas/FlowExtensionProcessingRuleSource"
          },
          "flowDirection": {
            "$ref": "#/components/schemas/FlowDirection"
          },
          "acknowledgement": {
            "$ref": "#/components/schemas/Acknowledgement"
          }
        },
        "additionalProperties": { },
        "description": "The properties of a Flow resource"
      },
      "FlowAckStatus": {
        "enum": [
          "Pending",
          "Ok",
          "Error"
        ],
        "type": "string",
        "description": "- `Ok`: the following checks have passed:\r\n\n  - Anti virus\r\n\n  - Integrity checks\r\n\n  - Technical rules checks\r\n\n  - Unicity checks\r\n\n- `Error`: one of the previous test has failed\r\n\n- `Pending` : the flow is not yet integrated\r\n\n"
      },
      "FlowDirection": {
        "enum": [
          "In",
          "Out"
        ],
        "type": "string",
        "description": "Direction of the flow:\r\n\n  - `In`:  Incoming flow, from the PDP to the OD\r\n\n  - `Out`: Outgoing flow, from the OD to the PDP\r\n\n"
      },
      "FlowExtensionProcessingRuleSource": {
        "enum": [
          "Input",
          "Computed"
        ],
        "type": "string"
      },
      "FlowProfile": {
        "enum": [
          "Basic",
          "CIUS",
          "ExtendedCTCFR",
          "Undefined"
        ],
        "type": "string"
      },
      "FlowSyntax": {
        "enum": [
          "CII",
          "UBL",
          "FacturX",
          "CDAR",
          "FRR"
        ],
        "type": "string",
        "description": "Syntax of the original file belonging to a flow"
      },
      "FlowType": {
        "enum": [
          "CustomerInvoice",
          "SupplierInvoice",
          "CustomerInvoiceLC",
          "SupplierInvoiceLC",
          "StateCustomerInvoiceLC",
          "StateSupplierInvoiceLC",
          "AggregatedCustomerTransactionReport",
          "UnitaryCustomerTransactionReport",
          "AggregatedCustomerPaymentReport",
          "UnitaryCustomerPaymentReport",
          "UnitarySupplierTransactionReport",
          "MultiFlowReport",
          "StateCustomerInvoice",
          "StateSupplierInvoice",
          "StateTransactionReport",
          "StateTransactionReportLC",
          "StatePaymentReport",
          "StatePaymentReportLC",
          "Undefined"
        ],
        "type": "string",
        "description": "- `CustomerInvoice`: a non-self-billed outgoing invoice or a self-billed incoming invoice\r\n\n- `SupplierInvoice`: a non-self-billed incoming invoice or self-billed outgoing invoice\r\n\n- `CustomerInvoiceLC`: a lifecycle (CDAR) related to a customer invoice\r\n\n- `SupplierInvoiceLC`: a lifecycle (CDAR) related to supplier invoice\r\n\n- `StateCustomerInvoiceLC`: a customer invoice LC sent to DFH\r\n\n- `StateSupplierInvoiceLC`: a supplier invoice LC sent to DFH\r\n\n- `AggregatedCustomerTransactionReport` : a transaction e-reporting flow containing aggregated B2C sales (FRR 10.3)\r\n\n- `UnitaryCustomerTransactionReport`: a transaction e-reporting flow containing international B2B sales or a B2C transaction flow reported individually (FRR 10.1)\r\n\n- `AggregatedCustomerPaymentReport` : an e-reporting of collections flow containing collections linked to B2C sales (FRR 10.4)\r\n\n- `UnitaryCustomerPaymentReport` : an e-reporting of collections flow containing collections linked to unit international B2B sales or B2C sales (FRR 10.2)\r\n\n- `UnitarySupplierTransactionReport`: a transaction e-reporting flow containing international B2B purchases (FRR 10.1)\r\n\n- `MultiFlowReport`: an e-reporting flow which contains at least 2 different flow types (FRR 10)\r\n\n- `StateCustomerInvoice` : a reporting flow 1 sent to DFH related to an invoice of type ‘CustomerInvoice’\r\n\n- `StateSupplierInvoice` : a reporting flow 1 sent to DFH related to an invoice of type ‘SupplierInvoice’ for self-billing\r\n\n- `StateTransactionReport` : a transaction e-reporting flow 10.1 or 10.3 sent to the DFH\r\n\n- `StateTransactionReportLC` : a lifecycle for a StateTransactionReport flow\r\n\n- `StatePaymentReport` : a payment e-reporting flow 10.2 or 10.4 sent to DFH\r\n\n- `StatePaymentReportLC` : a lifecycle for a StatePaymentReport flow\r\n\n- `Undefined`            : Not yet defined when in Pending state or unable to define when in Error state\r\n\n"
      },
      "FrInvoiceCashConfirmationRequestDto": {
        "type": "object",
        "properties": {
          "amount": {
            "type": "number",
            "description": "Montant encaissé (peut être partiel — inférieur au solde restant dû).",
            "format": "double"
          },
          "valueDate": {
            "type": "string",
            "description": "Date de valeur du règlement (date de crédit sur le compte du CE).",
            "format": "date"
          }
        },
        "additionalProperties": false,
        "description": "Payload SC-07 A1 : déclaration d'encaissement par le CE.\r\nLe CE confirme avoir reçu le paiement sur son compte après vérification."
      },
      "FrInvoiceCashConfirmationResultDto": {
        "type": "object",
        "properties": {
          "isSuccess": {
            "type": "boolean",
            "description": "True si le CDV 212 a été déclenché (WF16)."
          },
          "errorCode": {
            "type": "string",
            "description": "Code d'erreur métier (A2.a) ; null si succès.",
            "nullable": true
          },
          "errorMessage": {
            "type": "string",
            "description": "Message d'erreur lisible ; null si succès.",
            "nullable": true
          },
          "workflowInstanceId": {
            "type": "integer",
            "description": "ID de l'instance workflow WF16 déclenchée (A3-A5) ; null si non déclenché.",
            "format": "int64",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Résultat de la déclaration d'encaissement SC-07."
      },
      "FrInvoiceCreateAllowanceChargeDto": {
        "type": "object",
        "properties": {
          "type": {
            "$ref": "#/components/schemas/EnumAllowanceChargeType"
          },
          "amount": {
            "type": "number",
            "format": "double"
          },
          "baseAmount": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "percentage": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "vatCategoryCode": {
            "type": "string",
            "nullable": true
          },
          "vatRate": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "reason": {
            "type": "string",
            "nullable": true
          },
          "reasonCode": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Allowance or charge data (BG-20/21 document level, BG-27/28 line level)."
      },
      "FrInvoiceCreateAttachmentDto": {
        "type": "object",
        "properties": {
          "documentReference": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "externalUri": {
            "type": "string",
            "nullable": true
          },
          "content": {
            "type": "string",
            "format": "byte",
            "nullable": true
          },
          "mimeCode": {
            "type": "string",
            "nullable": true
          },
          "filename": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Additional supporting document data (BG-24)."
      },
      "FrInvoiceCreateDeliveryInfoDto": {
        "type": "object",
        "properties": {
          "deliverToName": {
            "type": "string",
            "nullable": true
          },
          "deliverToLocationIdentifier": {
            "type": "string",
            "nullable": true
          },
          "deliverToLocationIdentifierScheme": {
            "type": "string",
            "nullable": true
          },
          "actualDeliveryDate": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "invoicingPeriodStartDate": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "invoicingPeriodEndDate": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "addressLine1": {
            "type": "string",
            "nullable": true
          },
          "addressLine2": {
            "type": "string",
            "nullable": true
          },
          "addressLine3": {
            "type": "string",
            "nullable": true
          },
          "city": {
            "type": "string",
            "nullable": true
          },
          "postalCode": {
            "type": "string",
            "nullable": true
          },
          "countrySubdivision": {
            "type": "string",
            "nullable": true
          },
          "countryCode": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Delivery information data (BG-13)."
      },
      "FrInvoiceCreateDocumentReferenceDto": {
        "type": "object",
        "properties": {
          "precedingInvoiceReference": {
            "type": "string",
            "nullable": true
          },
          "precedingInvoiceIssueDate": {
            "type": "string",
            "format": "date",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Preceding invoice reference data (BG-3)."
      },
      "FrInvoiceCreateLineDto": {
        "type": "object",
        "properties": {
          "lineId": {
            "type": "string",
            "nullable": true
          },
          "note": {
            "type": "string",
            "nullable": true
          },
          "objectIdentifier": {
            "type": "string",
            "nullable": true
          },
          "objectIdentifierScheme": {
            "type": "string",
            "nullable": true
          },
          "quantity": {
            "type": "number",
            "format": "double"
          },
          "quantityUnitCode": {
            "type": "string",
            "nullable": true
          },
          "netAmount": {
            "type": "number",
            "format": "double"
          },
          "orderLineReference": {
            "type": "string",
            "nullable": true
          },
          "buyerAccountingReference": {
            "type": "string",
            "nullable": true
          },
          "periodStartDate": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "periodEndDate": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "itemNetPrice": {
            "type": "number",
            "format": "double"
          },
          "itemPriceDiscount": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "itemGrossPrice": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "priceBaseQuantity": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "priceBaseQuantityUnitCode": {
            "type": "string",
            "nullable": true
          },
          "vatCategoryCode": {
            "type": "string",
            "nullable": true
          },
          "vatRate": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "itemName": {
            "type": "string",
            "nullable": true
          },
          "itemDescription": {
            "type": "string",
            "nullable": true
          },
          "itemSellerIdentifier": {
            "type": "string",
            "nullable": true
          },
          "itemBuyerIdentifier": {
            "type": "string",
            "nullable": true
          },
          "itemStandardIdentifier": {
            "type": "string",
            "nullable": true
          },
          "itemStandardIdentifierScheme": {
            "type": "string",
            "nullable": true
          },
          "itemClassificationIdentifier": {
            "type": "string",
            "nullable": true
          },
          "itemClassificationIdentifierScheme": {
            "type": "string",
            "nullable": true
          },
          "itemClassificationIdentifierSchemeVersion": {
            "type": "string",
            "nullable": true
          },
          "itemCountryOfOrigin": {
            "type": "string",
            "nullable": true
          },
          "allowanceCharges": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FrInvoiceCreateAllowanceChargeDto"
            },
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Invoice line data for invoice creation (BG-25)."
      },
      "FrInvoiceCreatePartyDto": {
        "type": "object",
        "properties": {
          "role": {
            "$ref": "#/components/schemas/EnumInvoicePartyRole"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "tradingName": {
            "type": "string",
            "nullable": true
          },
          "identifier": {
            "type": "string",
            "nullable": true
          },
          "identifierScheme": {
            "type": "string",
            "nullable": true
          },
          "legalIdentifier": {
            "type": "string",
            "nullable": true
          },
          "legalIdentifierScheme": {
            "type": "string",
            "nullable": true
          },
          "vatIdentifier": {
            "type": "string",
            "nullable": true
          },
          "taxRegistrationIdentifier": {
            "type": "string",
            "nullable": true
          },
          "additionalLegalInfo": {
            "type": "string",
            "nullable": true
          },
          "electronicAddress": {
            "type": "string",
            "nullable": true
          },
          "electronicAddressScheme": {
            "type": "string",
            "nullable": true
          },
          "routingCode": {
            "type": "string",
            "nullable": true
          },
          "routingCodeScheme": {
            "type": "string",
            "nullable": true
          },
          "addressLine1": {
            "type": "string",
            "nullable": true
          },
          "addressLine2": {
            "type": "string",
            "nullable": true
          },
          "addressLine3": {
            "type": "string",
            "nullable": true
          },
          "city": {
            "type": "string",
            "nullable": true
          },
          "postalCode": {
            "type": "string",
            "nullable": true
          },
          "countrySubdivision": {
            "type": "string",
            "nullable": true
          },
          "countryCode": {
            "type": "string",
            "nullable": true
          },
          "contactName": {
            "type": "string",
            "nullable": true
          },
          "contactPhone": {
            "type": "string",
            "nullable": true
          },
          "contactEmail": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Party data for invoice creation (Seller, Buyer, Payee, Tax Representative)."
      },
      "FrInvoiceCreatePaymentInfoDto": {
        "type": "object",
        "properties": {
          "paymentMeansCode": {
            "type": "string",
            "nullable": true
          },
          "paymentMeansText": {
            "type": "string",
            "nullable": true
          },
          "remittanceInformation": {
            "type": "string",
            "nullable": true
          },
          "paymentAccountIdentifier": {
            "type": "string",
            "nullable": true
          },
          "paymentAccountName": {
            "type": "string",
            "nullable": true
          },
          "paymentServiceProviderIdentifier": {
            "type": "string",
            "nullable": true
          },
          "paymentCardNumber": {
            "type": "string",
            "nullable": true
          },
          "paymentCardHolderName": {
            "type": "string",
            "nullable": true
          },
          "mandateReferenceIdentifier": {
            "type": "string",
            "nullable": true
          },
          "creditorIdentifier": {
            "type": "string",
            "nullable": true
          },
          "debitedAccountIdentifier": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Payment information data (BG-16)."
      },
      "FrInvoiceCreateRequestDto": {
        "type": "object",
        "properties": {
          "tenantId": {
            "type": "integer",
            "description": "Tenant identifier for multi-tenant isolation.",
            "format": "int32"
          },
          "invoiceNumber": {
            "type": "string",
            "description": "Invoice number (BT-1).",
            "nullable": true
          },
          "issueDate": {
            "type": "string",
            "description": "Invoice issue date (BT-2).",
            "format": "date"
          },
          "invoiceTypeCode": {
            "$ref": "#/components/schemas/EnumInvoiceTypeCode"
          },
          "currencyCode": {
            "type": "string",
            "description": "Invoice currency code (BT-5, ISO 4217). Default: EUR.",
            "nullable": true
          },
          "taxCurrencyCode": {
            "type": "string",
            "description": "Tax currency code (BT-6, ISO 4217). Null if same as invoice currency.",
            "nullable": true
          },
          "taxPointDate": {
            "type": "string",
            "description": "Value added tax point date (BT-7).",
            "format": "date",
            "nullable": true
          },
          "taxPointDateCode": {
            "type": "string",
            "description": "Value added tax point date code (BT-8).",
            "nullable": true
          },
          "dueDate": {
            "type": "string",
            "description": "Payment due date (BT-9).",
            "format": "date",
            "nullable": true
          },
          "buyerReference": {
            "type": "string",
            "description": "Buyer reference (BT-10).",
            "nullable": true
          },
          "projectReference": {
            "type": "string",
            "description": "Project reference (BT-11).",
            "nullable": true
          },
          "contractReference": {
            "type": "string",
            "description": "Contract reference (BT-12).",
            "nullable": true
          },
          "orderReference": {
            "type": "string",
            "description": "Purchase order reference (BT-13).",
            "nullable": true
          },
          "salesOrderReference": {
            "type": "string",
            "description": "Sales order reference (BT-14).",
            "nullable": true
          },
          "receivingAdviceReference": {
            "type": "string",
            "description": "Receiving advice reference (BT-15).",
            "nullable": true
          },
          "despatchAdviceReference": {
            "type": "string",
            "description": "Despatch advice reference (BT-16).",
            "nullable": true
          },
          "tenderReference": {
            "type": "string",
            "description": "Tender or lot reference (BT-17).",
            "nullable": true
          },
          "invoicedObjectIdentifier": {
            "type": "string",
            "description": "Invoiced object identifier (BT-18).",
            "nullable": true
          },
          "invoicedObjectIdentifierScheme": {
            "type": "string",
            "description": "Invoiced object identifier scheme (BT-18-1).",
            "nullable": true
          },
          "buyerAccountingReference": {
            "type": "string",
            "description": "Buyer accounting reference (BT-19).",
            "nullable": true
          },
          "paymentTerms": {
            "type": "string",
            "description": "Payment terms (BT-20).",
            "nullable": true
          },
          "noteSubjectCode": {
            "type": "string",
            "description": "Invoice note subject code (BT-21).",
            "nullable": true
          },
          "note": {
            "type": "string",
            "description": "Invoice note (BT-22).",
            "nullable": true
          },
          "businessProcessType": {
            "type": "string",
            "description": "Business process type / Cadre de facturation (BT-23).",
            "nullable": true
          },
          "specificationIdentifier": {
            "type": "string",
            "description": "Specification identifier (BT-24).",
            "nullable": true
          },
          "lineTotalAmount": {
            "type": "number",
            "description": "Sum of invoice line net amounts (BT-106).",
            "format": "double",
            "nullable": true
          },
          "allowanceTotalAmount": {
            "type": "number",
            "description": "Sum of allowances on document level (BT-107).",
            "format": "double",
            "nullable": true
          },
          "chargeTotalAmount": {
            "type": "number",
            "description": "Sum of charges on document level (BT-108).",
            "format": "double",
            "nullable": true
          },
          "taxExclusiveAmount": {
            "type": "number",
            "description": "Invoice total amount without VAT (BT-109).",
            "format": "double",
            "nullable": true
          },
          "taxAmount": {
            "type": "number",
            "description": "Invoice total VAT amount (BT-110).",
            "format": "double",
            "nullable": true
          },
          "taxAmountInAccountingCurrency": {
            "type": "number",
            "description": "Invoice total VAT amount in accounting currency (BT-111).",
            "format": "double",
            "nullable": true
          },
          "taxInclusiveAmount": {
            "type": "number",
            "description": "Invoice total amount with VAT (BT-112).",
            "format": "double",
            "nullable": true
          },
          "prepaidAmount": {
            "type": "number",
            "description": "Paid amount (BT-113).",
            "format": "double",
            "nullable": true
          },
          "roundingAmount": {
            "type": "number",
            "description": "Rounding amount (BT-114).",
            "format": "double",
            "nullable": true
          },
          "payableAmount": {
            "type": "number",
            "description": "Amount due for payment (BT-115).",
            "format": "double",
            "nullable": true
          },
          "formatCode": {
            "$ref": "#/components/schemas/EnumInvoiceFormatCode"
          },
          "parties": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FrInvoiceCreatePartyDto"
            },
            "description": "Invoice parties (BG-4 Seller, BG-7 Buyer, BG-10 Payee, BG-11 Tax Representative).",
            "nullable": true
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FrInvoiceCreateLineDto"
            },
            "description": "Invoice lines (BG-25).",
            "nullable": true
          },
          "taxBreakdowns": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FrInvoiceCreateTaxBreakdownDto"
            },
            "description": "VAT breakdown (BG-23).",
            "nullable": true
          },
          "allowanceCharges": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FrInvoiceCreateAllowanceChargeDto"
            },
            "description": "Document-level allowances and charges (BG-20, BG-21).",
            "nullable": true
          },
          "documentReferences": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FrInvoiceCreateDocumentReferenceDto"
            },
            "description": "Preceding invoice references (BG-3).",
            "nullable": true
          },
          "deliveryInfo": {
            "$ref": "#/components/schemas/FrInvoiceCreateDeliveryInfoDto"
          },
          "paymentInfo": {
            "$ref": "#/components/schemas/FrInvoiceCreatePaymentInfoDto"
          },
          "attachments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FrInvoiceCreateAttachmentDto"
            },
            "description": "Additional supporting documents (BG-24).",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Request DTO for creating and validating an F2 invoice via `IFrInvoiceCreateService`.\r\nCovers all EN 16931 data groups: header, parties, lines, tax breakdowns,\r\nallowances/charges, delivery, payment, document references, and attachments."
      },
      "FrInvoiceCreateTaxBreakdownDto": {
        "type": "object",
        "properties": {
          "taxableAmount": {
            "type": "number",
            "format": "double"
          },
          "taxAmount": {
            "type": "number",
            "format": "double"
          },
          "vatCategoryCode": {
            "type": "string",
            "nullable": true
          },
          "vatRate": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "exemptionReasonText": {
            "type": "string",
            "nullable": true
          },
          "exemptionReasonCode": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "VAT breakdown data for invoice creation (BG-23)."
      },
      "FrInvoiceOrchestratorResultDto": {
        "type": "object",
        "properties": {
          "isValid": {
            "type": "boolean",
            "description": "True si la facture F2 est valide et les 3 lanes ont démarré."
          },
          "frInvoiceId": {
            "type": "integer",
            "description": "ID de la FrInvoice en production (null si invalide).",
            "format": "int64",
            "nullable": true
          },
          "recipientRoute": {
            "type": "string",
            "description": "Tag de routage destinataire posé sur FrInvoice.",
            "nullable": true
          },
          "validationErrors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FrInvoiceValidationError"
            },
            "description": "Erreurs de validation (A4.a — F2 invalide).",
            "nullable": true
          },
          "workflowInstanceId": {
            "type": "integer",
            "description": "ID de l'instance workflow WF16 déclenchée pour Lane C.",
            "format": "int64",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Résultat de l'orchestration SC-01 (création et qualification F2).\r\nCouvre les branches A4.a (invalide) et A4.b (valide, 3 lanes)."
      },
      "FrInvoiceValidationError": {
        "type": "object",
        "properties": {
          "controlCode": {
            "type": "string",
            "nullable": true
          },
          "controlName": {
            "type": "string",
            "nullable": true
          },
          "message": {
            "type": "string",
            "nullable": true
          },
          "field": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Erreur de contrôle métier retournée par le pipeline de validation F2."
      },
      "FullFlowInfo": {
        "required": [
          "flowId",
          "submittedAt"
        ],
        "type": "object",
        "properties": {
          "flowId": {
            "maxLength": 64,
            "minLength": 0,
            "type": "string"
          },
          "submittedAt": {
            "type": "string",
            "description": "The flow submission date and time (the date and time when the flow was created on the system)\r\n\nThis property should be used by the API consumer as a time reference to avoid clock synchronization issues\r\n\n",
            "format": "date-time"
          },
          "sha256": {
            "pattern": "^[a-f0-9]{64}$",
            "type": "string",
            "description": "The sha256 is the fingerprint of the attached file:\r\n\n- if provided in the request: it should be checked once received\r\n\n- if not provided in the request: it may be computed and returned in the response\r\n\n",
            "format": "byte",
            "nullable": true
          }
        },
        "additionalProperties": { },
        "description": "Identified Flow info: flow info + id + timestamp"
      },
      "InboxListItemDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable invoice id (ULID).",
            "nullable": true
          },
          "number": {
            "type": "string",
            "description": "BT-1 — supplier-assigned invoice number.",
            "nullable": true
          },
          "issuedAt": {
            "type": "string",
            "description": "BT-2 — issue date.",
            "format": "date"
          },
          "receivedAt": {
            "type": "string",
            "description": "UTC timestamp the platform received this invoice on the caller's side.",
            "format": "date-time"
          },
          "status": {
            "$ref": "#/components/schemas/PublicInvoiceStatus"
          },
          "supplierSiret": {
            "type": "string",
            "description": "Supplier SIRET (14 digits) — BT-29.",
            "nullable": true
          },
          "supplierName": {
            "type": "string",
            "description": "Supplier legal name — BT-27.",
            "nullable": true
          },
          "taxInclusiveAmount": {
            "type": "number",
            "description": "BT-112 — total including VAT.",
            "format": "double"
          },
          "currency": {
            "type": "string",
            "description": "BT-5 — invoice currency (ISO 4217).",
            "nullable": true
          },
          "seen": {
            "type": "boolean",
            "description": "True once the receiver acknowledged the invoice via `POST /inbox/{id}/seen`."
          }
        },
        "additionalProperties": false,
        "description": "Light projection for `GET /inbox`."
      },
      "Include": {
        "enum": [
          "Siren"
        ],
        "type": "string"
      },
      "Include2": {
        "enum": [
          "Siren",
          "Siret"
        ],
        "type": "string"
      },
      "Include3": {
        "enum": [
          "Siren",
          "Siret",
          "RoutingCode"
        ],
        "type": "string"
      },
      "InvoiceDeliveryInfoDto": {
        "type": "object",
        "properties": {
          "channel": {
            "$ref": "#/components/schemas/PublicDeliveryChannel"
          },
          "destination": {
            "type": "string",
            "description": "Destination identifier on the chosen channel (electronic address, email, ...).",
            "nullable": true
          },
          "submittedAt": {
            "type": "string",
            "description": "UTC timestamp the platform handed the invoice off to the channel.",
            "format": "date-time",
            "nullable": true
          },
          "deliveredAt": {
            "type": "string",
            "description": "UTC timestamp the downstream channel acknowledged final delivery.",
            "format": "date-time",
            "nullable": true
          },
          "remoteReference": {
            "type": "string",
            "description": "Reference returned by the downstream channel for audit (PPF tx id, Peppol message id, ...).",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Where and how the invoice was actually routed."
      },
      "InvoiceFromFileResponseDto": {
        "required": [
          "jobId"
        ],
        "type": "object",
        "properties": {
          "jobId": {
            "type": "string",
            "description": "Stable id of the spawned extraction job — poll it for progress.",
            "nullable": true
          },
          "status": {
            "$ref": "#/components/schemas/ExtractionJobStatus"
          },
          "estimatedCompletion": {
            "type": "string",
            "description": "Best-effort ETA for the pipeline to finish.",
            "format": "date-time"
          },
          "nextActions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NextActionDto"
            },
            "description": "Dynamic actions callable from this state (poll the job, cancel, ...).",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Response of `POST /invoices/from-file` — the drop-and-go endpoint."
      },
      "InvoiceLinePublicDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "BT-126 — line identifier (string so partners can use `\"1\"`, `\"2a\"`, ...).",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "BT-153 — free-text description.",
            "nullable": true
          },
          "quantity": {
            "type": "number",
            "description": "BT-129 — invoiced quantity.",
            "format": "double"
          },
          "unit": {
            "type": "string",
            "description": "BT-130 — UN/ECE Recommendation 20 unit code (e.g. `C62` = \"one\").",
            "nullable": true
          },
          "unitPrice": {
            "type": "number",
            "description": "BT-146 — unit price, VAT excluded.",
            "format": "double"
          },
          "netAmount": {
            "type": "number",
            "description": "BT-131 — line net amount (BT-129 x BT-146 minus line allowances).",
            "format": "double"
          },
          "vat": {
            "$ref": "#/components/schemas/InvoiceLineVatDto"
          }
        },
        "additionalProperties": false,
        "description": "One invoice line — EN 16931 BG-25."
      },
      "InvoiceLineVatDto": {
        "type": "object",
        "properties": {
          "category": {
            "type": "string",
            "description": "BT-151 — VAT category code (S / Z / E / AE / ...).",
            "nullable": true
          },
          "rate": {
            "type": "number",
            "description": "BT-152 — VAT rate as a percentage (e.g. `20.0`).",
            "format": "double"
          }
        },
        "additionalProperties": false,
        "description": "VAT info for one invoice line — EN 16931 BG-30."
      },
      "InvoiceListItemDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable invoice id (ULID).",
            "nullable": true
          },
          "number": {
            "type": "string",
            "description": "BT-1 — supplier-assigned invoice number.",
            "nullable": true
          },
          "issuedAt": {
            "type": "string",
            "description": "BT-2 — issue date.",
            "format": "date"
          },
          "status": {
            "$ref": "#/components/schemas/PublicInvoiceStatus"
          },
          "type": {
            "$ref": "#/components/schemas/PublicInvoiceType"
          },
          "buyerSiret": {
            "type": "string",
            "description": "Buyer SIRET (14 digits) — BT-47.",
            "nullable": true
          },
          "buyerName": {
            "type": "string",
            "description": "Buyer legal name — BT-44.",
            "nullable": true
          },
          "supplierSiret": {
            "type": "string",
            "description": "Supplier SIRET (14 digits) — BT-29.",
            "nullable": true
          },
          "taxInclusiveAmount": {
            "type": "number",
            "description": "BT-112 — total including VAT.",
            "format": "double"
          },
          "currency": {
            "type": "string",
            "description": "BT-5 — invoice currency (ISO 4217).",
            "nullable": true
          },
          "billingFrame": {
            "$ref": "#/components/schemas/BillingFrame"
          },
          "format": {
            "$ref": "#/components/schemas/TargetFormat"
          },
          "createdAt": {
            "type": "string",
            "description": "UTC timestamp the invoice was created in the platform.",
            "format": "date-time"
          }
        },
        "additionalProperties": false,
        "description": "Light projection for `GET /invoices`."
      },
      "InvoicePreviewResultDto": {
        "type": "object",
        "properties": {
          "wouldBeEmitted": {
            "type": "boolean",
            "description": "True when the platform can route this payload as-is."
          },
          "resolvedDestination": {
            "$ref": "#/components/schemas/ResolvedDestinationDto"
          },
          "computedTotals": {
            "$ref": "#/components/schemas/InvoiceTotalsDto"
          },
          "targetFormatChosen": {
            "$ref": "#/components/schemas/TargetFormat"
          },
          "previewFileUrl": {
            "type": "string",
            "description": "Temporary URL of a preview file (PDF) — null when generation is skipped.",
            "nullable": true
          },
          "validation": {
            "$ref": "#/components/schemas/InvoiceValidationResultDto"
          }
        },
        "additionalProperties": false,
        "description": "Result of `POST /invoices/preview`."
      },
      "InvoicePublicDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Platform-assigned ULID (e.g. `inv_01HZ8K3M9XQ7VYJ4N5P6R7T8W9`). Read-only.",
            "nullable": true
          },
          "number": {
            "type": "string",
            "description": "BT-1 — supplier-assigned invoice number.",
            "nullable": true
          },
          "issuedAt": {
            "type": "string",
            "description": "BT-2 — issue date (ISO 8601).",
            "format": "date"
          },
          "type": {
            "$ref": "#/components/schemas/PublicInvoiceType"
          },
          "currency": {
            "type": "string",
            "description": "BT-5 — invoice currency (ISO 4217, default `EUR`).",
            "nullable": true
          },
          "billingFrame": {
            "$ref": "#/components/schemas/BillingFrame"
          },
          "purchaseOrderRef": {
            "type": "string",
            "description": "BT-13 — buyer purchase order reference.",
            "nullable": true
          },
          "buyerReference": {
            "type": "string",
            "description": "BT-10 — buyer reference (cost center, department, ...).",
            "nullable": true
          },
          "dueDate": {
            "type": "string",
            "description": "BT-9 — payment due date.",
            "format": "date",
            "nullable": true
          },
          "supplier": {
            "$ref": "#/components/schemas/PartyDto"
          },
          "buyer": {
            "$ref": "#/components/schemas/PartyDto"
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InvoiceLinePublicDto"
            },
            "description": "BG-25 — invoice lines (at least one).",
            "nullable": true
          },
          "totals": {
            "$ref": "#/components/schemas/InvoiceTotalsDto"
          },
          "taxBreakdown": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TaxBreakdownDto"
            },
            "description": "BG-23 — VAT breakdown per (category, rate) pair.",
            "nullable": true
          },
          "payment": {
            "$ref": "#/components/schemas/PaymentDto"
          },
          "notes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NoteDto"
            },
            "description": "BG-1 — free-text notes.",
            "nullable": true
          },
          "precedentInvoiceRefs": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "BG-3 — references to previous invoices (credit note, rectifying invoice).",
            "nullable": true
          },
          "attachments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AttachmentDto"
            },
            "description": "BG-24 — file attachments (delivery note, contract, ...).",
            "nullable": true
          },
          "targetFormat": {
            "$ref": "#/components/schemas/TargetFormat"
          },
          "status": {
            "$ref": "#/components/schemas/PublicInvoiceStatus"
          },
          "tenantId": {
            "type": "string",
            "description": "Owner tenant SIRET (filled on response).",
            "nullable": true
          },
          "delivery": {
            "$ref": "#/components/schemas/InvoiceDeliveryInfoDto"
          },
          "fileUrl": {
            "type": "string",
            "description": "Download URL of the materialised invoice file.",
            "nullable": true
          },
          "afnorFlowId": {
            "type": "string",
            "description": "AFNOR XP Z12-013 flow id, when this invoice is correlated to one.",
            "nullable": true
          },
          "nextActions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NextActionDto"
            },
            "description": "Dynamic HATEOAS actions available from the current status.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Strongly-typed invoice payload — the heart of the partner API."
      },
      "InvoiceTotalsDto": {
        "type": "object",
        "properties": {
          "linesNetTotal": {
            "type": "number",
            "description": "BT-106 — sum of line net amounts.",
            "format": "double"
          },
          "allowanceTotal": {
            "type": "number",
            "description": "BT-107 — sum of document-level allowances.",
            "format": "double"
          },
          "chargeTotal": {
            "type": "number",
            "description": "BT-108 — sum of document-level charges.",
            "format": "double"
          },
          "taxExclusiveAmount": {
            "type": "number",
            "description": "BT-109 — total excluding VAT.",
            "format": "double"
          },
          "taxAmount": {
            "type": "number",
            "description": "BT-110 — total VAT amount.",
            "format": "double"
          },
          "taxInclusiveAmount": {
            "type": "number",
            "description": "BT-112 — total including VAT.",
            "format": "double"
          },
          "paidAmount": {
            "type": "number",
            "description": "BT-113 — prepaid amount.",
            "format": "double"
          },
          "amountDue": {
            "type": "number",
            "description": "BT-115 — amount due for payment.",
            "format": "double"
          },
          "currency": {
            "type": "string",
            "description": "BT-5 — invoice currency (ISO 4217).",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Document totals block — EN 16931 BG-22."
      },
      "InvoiceValidationIssueDto": {
        "type": "object",
        "properties": {
          "rule": {
            "type": "string",
            "description": "Stable rule identifier (e.g. `BR-CO-15`, `FR-VAT-RATE`).",
            "nullable": true
          },
          "path": {
            "type": "string",
            "description": "JSON path of the offending field (e.g. `lines[0].vat.rate`).",
            "nullable": true
          },
          "message": {
            "type": "string",
            "description": "Human-readable explanation in English.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "One validation issue (warning or error)."
      },
      "InvoiceValidationResultDto": {
        "type": "object",
        "properties": {
          "valid": {
            "type": "boolean",
            "description": "True when no error was found (warnings may still be present)."
          },
          "warnings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InvoiceValidationIssueDto"
            },
            "description": "Non-blocking issues — partners should review but not block.",
            "nullable": true
          },
          "errors": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/InvoiceValidationIssueDto"
              }
            },
            "description": "Blocking errors, grouped by JSON path (null when `Valid` is true).",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Result of `POST /invoices/validate`."
      },
      "LegalUnitAdministrativeStatus": {
        "enum": [
          "A",
          "C"
        ],
        "type": "string",
        "description": "Refers to the administrative status of the legal unit [A - Active , C - Closed]"
      },
      "LegalUnitPayloadHistory": {
        "type": "object",
        "properties": {
          "siren": {
            "maxLength": 9,
            "minLength": 0,
            "pattern": "^([0-9]{9})$",
            "type": "string",
            "nullable": true
          },
          "businessName": {
            "maxLength": 150,
            "minLength": 0,
            "type": "string",
            "nullable": true
          },
          "entityType": {
            "$ref": "#/components/schemas/EntityType"
          },
          "administrativeStatus": {
            "$ref": "#/components/schemas/LegalUnitAdministrativeStatus"
          },
          "instructions": {
            "$ref": "#/components/schemas/SirenInstructions"
          }
        },
        "additionalProperties": { }
      },
      "LegalUnitPayloadIncluded": {
        "type": "object",
        "properties": {
          "siren": {
            "maxLength": 9,
            "minLength": 0,
            "pattern": "^([0-9]{9})$",
            "type": "string",
            "nullable": true
          },
          "businessName": {
            "maxLength": 150,
            "minLength": 0,
            "type": "string",
            "nullable": true
          },
          "entityType": {
            "$ref": "#/components/schemas/EntityType"
          },
          "administrativeStatus": {
            "$ref": "#/components/schemas/LegalUnitAdministrativeStatus"
          },
          "instructions": {
            "$ref": "#/components/schemas/SirenInstructions"
          }
        },
        "additionalProperties": { }
      },
      "MeDto": {
        "type": "object",
        "properties": {
          "tenant": {
            "$ref": "#/components/schemas/MeTenantDto"
          },
          "mandate": {
            "$ref": "#/components/schemas/MeMandateDto"
          },
          "quota": {
            "$ref": "#/components/schemas/MeQuotaDto"
          },
          "mode": {
            "$ref": "#/components/schemas/SandboxMode"
          },
          "key": {
            "$ref": "#/components/schemas/MeKeyDto"
          },
          "nextActions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NextActionDto"
            },
            "description": "Dynamic HATEOAS actions available from this state.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Profile of the calling credentials."
      },
      "MeKeyDto": {
        "type": "object",
        "properties": {
          "prefix": {
            "type": "string",
            "description": "First characters of the key — enough to name it in a support thread, useless to replay.",
            "nullable": true
          },
          "expiresAt": {
            "type": "string",
            "description": "When the key stops working. Renew it before this date by asking for a new one.",
            "format": "date-time",
            "nullable": true
          },
          "rateLimitPerMinute": {
            "type": "integer",
            "description": "Requests per minute this key is allowed. Exceeding it returns 429.",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The API key the call was authenticated with — never the key itself."
      },
      "MeMandateDto": {
        "type": "object",
        "properties": {
          "active": {
            "type": "boolean",
            "description": "True when an active mandate is in place."
          },
          "since": {
            "type": "string",
            "description": "Date the mandate was signed (or last renewed).",
            "format": "date",
            "nullable": true
          },
          "scope": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Scopes granted by the mandate.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Mandate the tenant has signed for Neotimo to act on its behalf."
      },
      "MeQuotaDto": {
        "type": "object",
        "properties": {
          "invoicesThisMonth": {
            "type": "integer",
            "description": "Invoices emitted since the start of the billing month.",
            "format": "int32"
          },
          "limit": {
            "type": "integer",
            "description": "Monthly hard limit attached to the tenant's plan.",
            "format": "int32"
          },
          "resetsAt": {
            "type": "string",
            "description": "Date the counter resets to zero (start of the next billing month).",
            "format": "date"
          }
        },
        "additionalProperties": false,
        "description": "Per-month invoice quota for the tenant."
      },
      "MeTenantDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Platform-assigned tenant id.",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "Tenant display name.",
            "nullable": true
          },
          "siret": {
            "type": "string",
            "description": "Tenant SIRET (14 digits), when published.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Tenant subset surfaced inside An.Platform.Module.Neotimo.Presentation.Dtos.PublicApi.Me.MeDto."
      },
      "MfaCodeRequest": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Body for `POST /me/mfa/enable` and `/disable` — the TOTP the user just typed."
      },
      "MfaRecoveryCodesResponse": {
        "type": "object",
        "properties": {
          "codes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "10 single-use codes formatted as 11-char strings.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Recovery codes returned after a successful `POST /me/mfa/enable` or a\r\n`POST /me/mfa/recovery-codes` regeneration. The user must store them —\r\nthe platform doesn't keep a plaintext copy past this response."
      },
      "MfaSetupResponse": {
        "type": "object",
        "properties": {
          "isEnabled": {
            "type": "boolean",
            "description": "Whether 2FA is already active on the account."
          },
          "sharedKey": {
            "type": "string",
            "description": "Human-typeable form of the TOTP secret (4-char groups, lowercase). Shown to the\r\nuser as a fallback when their authenticator app can't scan the QR code.",
            "nullable": true
          },
          "otpAuthUri": {
            "type": "string",
            "description": "Standard `otpauth://totp/...` URI — fed straight into a QR generator\r\n(TelerikQRCode component) or invoked as a deep link on mobile.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Carries the data the profile UI needs to walk the user through enabling an\r\nauthenticator-app TOTP. Returned by `GET /me/mfa/setup`."
      },
      "MirrorStatus": {
        "enum": [
          "fresh",
          "stale",
          "obsolete"
        ],
        "type": "string",
        "description": "Freshness of Neotimo's local copy of the DGFiP annuaire — NOT the status of the DGFiP portal."
      },
      "NextActionDto": {
        "required": [
          "href",
          "method",
          "name"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Stable identifier (e.g. `credit`, `cancel`, `mark_cashed`).",
            "nullable": true
          },
          "method": {
            "type": "string",
            "description": "HTTP verb to use (`GET`, `POST`, `DELETE`, ...).",
            "nullable": true
          },
          "href": {
            "type": "string",
            "description": "Absolute path under `/api/v1/neotimo/...`.",
            "nullable": true
          },
          "hint": {
            "type": "string",
            "description": "Human-readable hint about the body to send (optional).",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Pragmatic HATEOAS hint exposed on individual resources."
      },
      "NoteDto": {
        "required": [
          "text"
        ],
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "BT-21 — UNTDID 4451 subject code qualifying the note (e.g. `PAI`).",
            "nullable": true
          },
          "text": {
            "type": "string",
            "description": "BT-22 — free-text content.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Free-text invoice note — EN 16931 BG-1."
      },
      "OpenRoutingLineDto": {
        "required": [
          "level",
          "receptionActive",
          "siren"
        ],
        "type": "object",
        "properties": {
          "level": {
            "type": "string",
            "description": "Precision of the maille — `siren`, `siret`, `routing` or `suffix`.",
            "nullable": true
          },
          "siren": {
            "type": "string",
            "description": "SIREN of the maille (always present).",
            "nullable": true
          },
          "siret": {
            "type": "string",
            "description": "SIRET of the maille (null on SIREN-level lines).",
            "nullable": true
          },
          "routingId": {
            "type": "string",
            "description": "Routing code (ISO 6523 — typically a GLN). Null when the maille is not routing-tagged.",
            "nullable": true
          },
          "suffix": {
            "type": "string",
            "description": "Suffix discriminator. Null on most lines.",
            "nullable": true
          },
          "legalName": {
            "type": "string",
            "description": "Legal unit (entreprise) name as published in the annuaire.",
            "nullable": true
          },
          "receptionActive": {
            "type": "boolean",
            "description": "Whether this maille is active for electronic-invoice reception today."
          }
        },
        "additionalProperties": false,
        "description": "One annuaire line — an addressing maille at a given precision level."
      },
      "OpenRoutingResponseDto": {
        "required": [
          "lines",
          "query",
          "queryType"
        ],
        "type": "object",
        "properties": {
          "query": {
            "type": "string",
            "description": "The identifier that was looked up (as requested — 9 or 14 digits).",
            "nullable": true
          },
          "queryType": {
            "type": "string",
            "description": "`\"siren\"` or `\"siret\"` — interpretation of An.Platform.Module.Neotimo.Presentation.Dtos.PublicApi.OpenRouting.OpenRoutingResponseDto.Query.",
            "nullable": true
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OpenRoutingLineDto"
            },
            "description": "Active annuaire lines for the query. Possibly empty (404).",
            "nullable": true
          },
          "source": {
            "type": "string",
            "description": "Always `\"neotimo-mirror\"` — partners may use this to fingerprint the response.",
            "nullable": true
          },
          "lastSync": {
            "type": "string",
            "description": "Timestamp of the last successful F14 import in our mirror (UTC).",
            "format": "date-time",
            "nullable": true
          },
          "mirrorStatus": {
            "$ref": "#/components/schemas/MirrorStatus"
          }
        },
        "additionalProperties": false,
        "description": "All active annuaire lines (mailles) for a SIRET or SIREN."
      },
      "PaCapabilityDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "paDirectoryId": {
            "type": "integer",
            "format": "int64"
          },
          "protocolType": {
            "$ref": "#/components/schemas/ProtocolType"
          },
          "endpointUrl": {
            "type": "string",
            "nullable": true
          },
          "authType": {
            "$ref": "#/components/schemas/AuthType"
          },
          "priority": {
            "type": "integer",
            "format": "int32"
          },
          "lastTestedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "lastTestStatus": {
            "$ref": "#/components/schemas/CapabilityTestStatus"
          },
          "lastTestMessage": {
            "type": "string",
            "nullable": true
          },
          "peppolSeatId": {
            "type": "string",
            "nullable": true
          },
          "notes": {
            "type": "string",
            "nullable": true
          },
          "dateCreated": {
            "type": "string",
            "format": "date-time"
          },
          "dateUpdated": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Technical send channel a PA exposes in the public directory\r\n(NEOTIMO-1304). No credentials on the directory side: these are public\r\nendpoints other PAs reach with their own secrets."
      },
      "PaCapabilityEditableDto": {
        "required": [
          "endpointUrl",
          "protocolType"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Null when creating; otherwise the Id of the existing capability to update.",
            "format": "int64",
            "nullable": true
          },
          "protocolType": {
            "$ref": "#/components/schemas/ProtocolType"
          },
          "endpointUrl": {
            "type": "string",
            "nullable": true
          },
          "authType": {
            "$ref": "#/components/schemas/AuthType"
          },
          "priority": {
            "type": "integer",
            "description": "Routing priority (0 = preferred). See `PaCapability.Priority`.",
            "format": "int32"
          },
          "peppolSeatId": {
            "type": "string",
            "description": "Peppol Service Provider / Access Point identifier (« Seat ID », e.g.\r\n`PFR001027`). Only meaningful for a `ProtocolType.Peppol`\r\ncapability; ignored otherwise. See `PaCapability.PeppolSeatId`.",
            "nullable": true
          },
          "notes": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Input DTO used to add or update a `PaCapability` through\r\nM:An.Platform.Module.Neotimo.Presentation.Interfaces.IPaDirectoryService.SaveEditableAsync(System.Int64,An.Platform.Module.Neotimo.Presentation.Dtos.PaDirectory.PaDirectoryEditableDto,System.Threading.CancellationToken) (NEOTIMO-1292)."
      },
      "PaCapabilityPeerDto": {
        "type": "object",
        "properties": {
          "protocolType": {
            "type": "string",
            "description": "Protocole d'échange : `Peppol`, `XpZ12013Flux` ou\r\n`XpZ12013Directory`.",
            "nullable": true
          },
          "endpointUrl": {
            "type": "string",
            "description": "Point d'entrée à appeler. `null` pour les protocoles adressés par\r\nidentifiant plutôt que par URL (Peppol : voir An.Platform.Module.Neotimo.Presentation.Dtos.PaDirectory.PaCapabilityPeerDto.PeppolSeatId).",
            "nullable": true
          },
          "authType": {
            "type": "string",
            "description": "Authentification attendue par ce point d'entrée :\r\n`OAuth2ClientCreds`, `ApiKey` ou `MutualTls`.",
            "nullable": true
          },
          "priority": {
            "type": "integer",
            "description": "Ordre de préférence — le plus petit gagne.",
            "format": "int32"
          },
          "peppolSeatId": {
            "type": "string",
            "description": "Identifiant de siège Peppol, quand le canal est Peppol.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Canal technique d'une PA, vue « entre pairs » (NEOTIMO-1601)."
      },
      "PaDirectoryDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "siren": {
            "type": "string",
            "nullable": true
          },
          "matricule": {
            "type": "string",
            "nullable": true
          },
          "denomination": {
            "type": "string",
            "nullable": true
          },
          "operationalContactEmail": {
            "type": "string",
            "nullable": true
          },
          "commercialContactEmail": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "$ref": "#/components/schemas/PaStatus"
          },
          "lastSyncedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "ownerEntityId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "capabilities": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PaCapabilityDto"
            },
            "nullable": true
          },
          "dateCreated": {
            "type": "string",
            "format": "date-time"
          },
          "dateUpdated": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Full view of a partner PA known to Neotimo, including its\r\nAn.Platform.Module.Neotimo.Presentation.Dtos.PaDirectory.PaDirectoryDto.Capabilities (NEOTIMO-1292). Used by the admin detail\r\nview and by services that need the whole graph (sync jobs, send\r\nrouting)."
      },
      "PaDirectoryEditableDto": {
        "type": "object",
        "properties": {
          "operationalContactEmail": {
            "type": "string",
            "nullable": true
          },
          "commercialContactEmail": {
            "type": "string",
            "nullable": true
          },
          "capabilities": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PaCapabilityEditableDto"
            },
            "description": "Desired collection. The service computes the diff against the current\r\nstate and applies add/update/delete in a single transaction.\r\n`null` means \"do not touch\".",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Input DTO for M:An.Platform.Module.Neotimo.Presentation.Interfaces.IPaDirectoryService.SaveEditableAsync(System.Int64,An.Platform.Module.Neotimo.Presentation.Dtos.PaDirectory.PaDirectoryEditableDto,System.Threading.CancellationToken)\r\n(NEOTIMO-1292). Represents the editable surface of a PA directory entry:\r\ncontacts and the desired capability collection."
      },
      "PaDirectoryPeerDto": {
        "type": "object",
        "properties": {
          "matricule": {
            "type": "string",
            "description": "Matricule PA à 4 chiffres publié par la DGFiP.",
            "nullable": true
          },
          "siren": {
            "type": "string",
            "description": "SIREN de la plateforme, quand il est connu.",
            "nullable": true
          },
          "denomination": {
            "type": "string",
            "description": "Raison sociale.",
            "nullable": true
          },
          "operationalContactEmail": {
            "type": "string",
            "description": "Adresse opérationnelle — celle que la DGFiP publie pour ce matricule.\r\nC'est le point de contact des échanges techniques.",
            "nullable": true
          },
          "commercialContactEmail": {
            "type": "string",
            "description": "Adresse commerciale déclarée par la PA elle-même (facultative). Utile\r\npour l'interconnexion entre pairs ; préférez une boîte générique à une\r\nadresse nominative.",
            "nullable": true
          },
          "capabilities": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PaCapabilityPeerDto"
            },
            "description": "Canaux techniques par lesquels joindre cette PA.",
            "nullable": true
          },
          "lastUpdated": {
            "type": "string",
            "description": "Date de dernière évolution de la fiche — pour juger de sa fraîcheur et\r\npiloter un cache. Volontairement à la JOURNÉE : l'horodatage précis de\r\nnos écritures internes n'a pas à être diffusé.",
            "format": "date",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Fiche d'une PA telle que les autres PA inscrites la lisent (NEOTIMO-1601)."
      },
      "PaDirectorySaveResult": {
        "type": "object",
        "properties": {
          "directory": {
            "$ref": "#/components/schemas/PaDirectoryDto"
          },
          "capabilitiesAdded": {
            "type": "integer",
            "description": "Number of capabilities created during this save.",
            "format": "int32"
          },
          "capabilitiesUpdated": {
            "type": "integer",
            "description": "Number of existing capabilities that were modified.",
            "format": "int32"
          },
          "capabilitiesDeleted": {
            "type": "integer",
            "description": "Number of capabilities removed (missing from the desired list).",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "Structured outcome of M:An.Platform.Module.Neotimo.Presentation.Interfaces.IPaDirectoryService.SaveEditableAsync(System.Int64,An.Platform.Module.Neotimo.Presentation.Dtos.PaDirectory.PaDirectoryEditableDto,System.Threading.CancellationToken)\r\n(NEOTIMO-1292): the reloaded entry plus per-operation counters describing\r\nwhat changed in the capability collection."
      },
      "PaStatus": {
        "enum": [
          "Unclaimed",
          "Pending",
          "Active",
          "Dropped"
        ],
        "type": "string",
        "description": "État d'une PA partenaire dans l'annuaire public hébergé par Neotimo\r\n(NEOTIMO-1304). Le cycle de vie standard est\r\n`Unclaimed → Pending → Active`. `Dropped` est un état terminal\r\npour les PA disparues de l'annuaire DGFIP."
      },
      "PagedResult_DirectoryEntryDto": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DirectoryEntryDto"
            },
            "nullable": true
          },
          "totalCount": {
            "type": "integer",
            "format": "int32"
          },
          "page": {
            "type": "integer",
            "format": "int32"
          },
          "pageSize": {
            "type": "integer",
            "format": "int32"
          },
          "totalPages": {
            "type": "integer",
            "format": "int32",
            "readOnly": true
          }
        },
        "additionalProperties": false
      },
      "PagedResult_InboxListItemDto": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InboxListItemDto"
            },
            "nullable": true
          },
          "totalCount": {
            "type": "integer",
            "format": "int32"
          },
          "page": {
            "type": "integer",
            "format": "int32"
          },
          "pageSize": {
            "type": "integer",
            "format": "int32"
          },
          "totalPages": {
            "type": "integer",
            "format": "int32",
            "readOnly": true
          }
        },
        "additionalProperties": false
      },
      "PagedResult_InvoiceListItemDto": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InvoiceListItemDto"
            },
            "nullable": true
          },
          "totalCount": {
            "type": "integer",
            "format": "int32"
          },
          "page": {
            "type": "integer",
            "format": "int32"
          },
          "pageSize": {
            "type": "integer",
            "format": "int32"
          },
          "totalPages": {
            "type": "integer",
            "format": "int32",
            "readOnly": true
          }
        },
        "additionalProperties": false
      },
      "PagedResult_PaDirectoryPeerDto": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PaDirectoryPeerDto"
            },
            "nullable": true
          },
          "totalCount": {
            "type": "integer",
            "format": "int32"
          },
          "page": {
            "type": "integer",
            "format": "int32"
          },
          "pageSize": {
            "type": "integer",
            "format": "int32"
          },
          "totalPages": {
            "type": "integer",
            "format": "int32",
            "readOnly": true
          }
        },
        "additionalProperties": false
      },
      "PagedResult_ReportingTransactionDto": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReportingTransactionDto"
            },
            "nullable": true
          },
          "totalCount": {
            "type": "integer",
            "format": "int32"
          },
          "page": {
            "type": "integer",
            "format": "int32"
          },
          "pageSize": {
            "type": "integer",
            "format": "int32"
          },
          "totalPages": {
            "type": "integer",
            "format": "int32",
            "readOnly": true
          }
        },
        "additionalProperties": false
      },
      "PaginationMeta": {
        "type": "object",
        "properties": {
          "page": {
            "type": "integer",
            "format": "int32"
          },
          "pageSize": {
            "type": "integer",
            "format": "int32"
          },
          "totalCount": {
            "type": "integer",
            "format": "int32"
          },
          "totalPages": {
            "type": "integer",
            "format": "int32",
            "readOnly": true
          }
        },
        "additionalProperties": false,
        "description": "Pagination metadata included in paginated API responses."
      },
      "PartyDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "BT-27 / BT-44 — legal name.",
            "nullable": true
          },
          "siret": {
            "type": "string",
            "description": "BT-29 / BT-47 — 14-digit French SIRET.",
            "nullable": true
          },
          "legalId": {
            "type": "string",
            "description": "BT-30 — French legal identifier (RCS / RM / SIRET string).",
            "nullable": true
          },
          "vatNumber": {
            "type": "string",
            "description": "BT-31 / BT-48 — intra-EU VAT number (e.g. `FR12345678901`).",
            "nullable": true
          },
          "electronicAddress": {
            "type": "string",
            "description": "BT-34 / BT-49 — electronic address (Peppol participant id, PPF address, ...).",
            "nullable": true
          },
          "address": {
            "$ref": "#/components/schemas/AddressDto"
          },
          "contactName": {
            "type": "string",
            "description": "BT-41 / BT-56 — contact name.",
            "nullable": true
          },
          "contactEmail": {
            "type": "string",
            "description": "BT-43 / BT-58 — contact email.",
            "nullable": true
          },
          "contactPhone": {
            "type": "string",
            "description": "BT-42 / BT-57 — contact phone.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Party on the invoice — supplier (BG-4) or buyer (BG-7)."
      },
      "PaymentDto": {
        "type": "object",
        "properties": {
          "terms": {
            "type": "string",
            "description": "BT-20 — payment terms text (e.g. \"Bank transfer due in 30 days\").",
            "nullable": true
          },
          "reference": {
            "type": "string",
            "description": "BT-83 — remittance information / reference number.",
            "nullable": true
          },
          "iban": {
            "type": "string",
            "description": "BT-84 — payee IBAN.",
            "nullable": true
          },
          "bic": {
            "type": "string",
            "description": "BT-86 — payee BIC.",
            "nullable": true
          },
          "accountHolder": {
            "type": "string",
            "description": "BT-85 — payee account holder name.",
            "nullable": true
          },
          "paymentMeansCode": {
            "type": "string",
            "description": "BT-81 — UNTDID 4461 payment means code (`30` = credit transfer, `59` = SEPA, ...).",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Payment instructions block — EN 16931 BG-16 / BG-17."
      },
      "ProblemDetails": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "detail": {
            "type": "string",
            "nullable": true
          },
          "instance": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": { }
      },
      "ProcessingRule": {
        "enum": [
          "B2B",
          "B2BInt",
          "B2C",
          "B2G",
          "B2GInt",
          "OutOfScope",
          "B2GOutOfScope",
          "ArchiveOnly",
          "NotApplicable",
          "Undefined"
        ],
        "type": "string",
        "description": "- B2B                 : e-invoicing\r\n\n- B2BInt              : International B2B e-reporting\r\n\n- B2C                 : B2C e-reporting\r\n\n- B2G                 : e-invoicing for B2G sales\r\n\n- B2GInt\r\n\n- OutOfScope          : Out of scope (not regulated flow)\r\n\n- B2GOutOfScope\r\n\n- ArchiveOnly         : Archive only, no transmission\r\n\n- NotApplicable       : Not Applicable\r\n\n- Undefined           : Not yet defined when in Pending state or unable to define when in Error state\r\n\n"
      },
      "ProtocolType": {
        "enum": [
          "Peppol",
          "XpZ12013Flux",
          "XpZ12013Directory",
          "EdiProprietary",
          "Other"
        ],
        "type": "string",
        "description": "Protocole technique supporté par une PA pour recevoir des factures\r\n(`PaCapability.ProtocolType`, NEOTIMO-1291)."
      },
      "PublicDeliveryChannel": {
        "enum": [
          "ppf",
          "peppol",
          "api",
          "email",
          "chorus_pro",
          "sandbox"
        ],
        "type": "string",
        "description": "Outbound channel resolved at emission time."
      },
      "PublicInvoiceStatus": {
        "enum": [
          "draft",
          "submitted",
          "received",
          "approved",
          "rejected",
          "disputed",
          "in_litigation",
          "suspended",
          "payment_sent",
          "cashed",
          "factored",
          "factor_changed",
          "delivered",
          "delivery_failed",
          "cancelled",
          "archived"
        ],
        "type": "string",
        "description": "Lifecycle status of an invoice on the partner surface."
      },
      "PublicInvoiceType": {
        "enum": [
          "commercial_invoice",
          "credit_note",
          "debit_note",
          "prepayment_invoice",
          "corrected_invoice",
          "self_billed_invoice",
          "factored_invoice"
        ],
        "type": "string",
        "description": "Business type of the invoice (EN 16931 BT-3)."
      },
      "RecipientPlatformType": {
        "enum": [
          "WK",
          "DFH"
        ],
        "type": "string",
        "description": "The type of platform for document reception (from UNCL 3035 list) :\r\n\n  - WK : Value added network provider (PA)\r\n\n  - DFH : Government service requestor (PPF)\r\n\n"
      },
      "RegisterPaRequestDto": {
        "required": [
          "matricule"
        ],
        "type": "object",
        "properties": {
          "matricule": {
            "maxLength": 4,
            "minLength": 4,
            "type": "string"
          }
        },
        "additionalProperties": false,
        "description": "Initial registration payload for a PA joining the directory\r\n(NEOTIMO-1304). The PA hands us only its DGFIP An.Platform.Module.Neotimo.Presentation.Dtos.PaDirectory.RegisterPaRequestDto.Matricule —\r\nthe denomination and operational email come from the pre-seeded fiche\r\non Neotimo's side. See `IPaClaimService.InitClaimAsync`."
      },
      "RegisterPaResponseDto": {
        "type": "object",
        "properties": {
          "result": {
            "$ref": "#/components/schemas/RegisterPaResult"
          },
          "maskedEmail": {
            "type": "string",
            "description": "Masked email the link was sent to (e.g. `j***@neotimo.com`).\r\nPopulated only when An.Platform.Module.Neotimo.Presentation.Dtos.PaDirectory.RegisterPaResponseDto.Result is\r\nAn.Platform.Module.Neotimo.Presentation.Dtos.PaDirectory.RegisterPaResult.EmailSent. Lets the UI render a\r\nreassuring confirmation without exposing the full address.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "RegisterPaResult": {
        "enum": [
          "EmailSent",
          "MatriculeUnknown",
          "AlreadyClaimed",
          "Dropped",
          "ContactNotEmail"
        ],
        "type": "string",
        "description": "Result of `IPaClaimService.InitClaimAsync`. The public UI shows a\r\ngeneric confirmation screen (\"if your matricule is valid, an email has\r\nbeen sent to your operational address\") — we do NOT reveal whether the\r\nmatricule matched server-side (anti-enumeration)."
      },
      "ReportingPeriodDto": {
        "required": [
          "id"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable period id.",
            "nullable": true
          },
          "type": {
            "$ref": "#/components/schemas/ReportingPeriodType"
          },
          "start": {
            "type": "string",
            "description": "First day covered by the period (inclusive).",
            "format": "date"
          },
          "end": {
            "type": "string",
            "description": "Last day covered by the period (inclusive).",
            "format": "date"
          },
          "dueAt": {
            "type": "string",
            "description": "Statutory deadline for filing the declaration.",
            "format": "date"
          },
          "status": {
            "$ref": "#/components/schemas/ReportingPeriodStatus"
          },
          "mustDeclare": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReportingType"
            },
            "description": "Reporting types the tenant must declare in this period.",
            "nullable": true
          },
          "closedAt": {
            "type": "string",
            "description": "UTC timestamp the partner closed the period (null while open).",
            "format": "date-time",
            "nullable": true
          },
          "nextActions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NextActionDto"
            },
            "description": "Dynamic HATEOAS actions available from this period state.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "One declaration period for the F10 e-reporting flow."
      },
      "ReportingPeriodStatus": {
        "enum": [
          "open",
          "overdue",
          "closed"
        ],
        "type": "string",
        "description": "Where a reporting period stands in its lifecycle."
      },
      "ReportingPeriodSummaryDto": {
        "required": [
          "periodId"
        ],
        "type": "object",
        "properties": {
          "periodId": {
            "type": "string",
            "description": "Id of the period this summary describes.",
            "nullable": true
          },
          "paymentsCashedTotal": {
            "type": "number",
            "description": "Sum of cashed payments declared in the period.",
            "format": "double"
          },
          "paymentsCashedCount": {
            "type": "integer",
            "description": "Number of cashed payments declared in the period.",
            "format": "int32"
          },
          "byType": {
            "type": "object",
            "properties": {
              "b2c_aggregated": {
                "$ref": "#/components/schemas/ReportingTypeSummaryDto"
              },
              "international_b2bi": {
                "$ref": "#/components/schemas/ReportingTypeSummaryDto"
              },
              "international_bi2b": {
                "$ref": "#/components/schemas/ReportingTypeSummaryDto"
              },
              "international_b2g": {
                "$ref": "#/components/schemas/ReportingTypeSummaryDto"
              },
              "payment": {
                "$ref": "#/components/schemas/ReportingTypeSummaryDto"
              }
            },
            "additionalProperties": false,
            "description": "Sub-totals broken down by reporting type.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Aggregated view of one reporting period."
      },
      "ReportingPeriodType": {
        "enum": [
          "monthly",
          "bimonthly",
          "quarterly",
          "yearly"
        ],
        "type": "string",
        "description": "Reporting cadence applied to the tenant."
      },
      "ReportingTransactionDepositDto": {
        "required": [
          "periodId",
          "transactions",
          "type"
        ],
        "type": "object",
        "properties": {
          "periodId": {
            "type": "string",
            "description": "Id of the period the batch belongs to.",
            "nullable": true
          },
          "type": {
            "$ref": "#/components/schemas/ReportingType"
          },
          "transactions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReportingTransactionLineDto"
            },
            "description": "Transaction lines making up the batch.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Body for `POST /reporting/transactions`."
      },
      "ReportingTransactionDto": {
        "required": [
          "id",
          "periodId"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable transaction id.",
            "nullable": true
          },
          "periodId": {
            "type": "string",
            "description": "Id of the period the transaction belongs to.",
            "nullable": true
          },
          "type": {
            "$ref": "#/components/schemas/ReportingType"
          },
          "operationDate": {
            "type": "string",
            "description": "Date the operation occurred on (booking date).",
            "format": "date"
          },
          "amount": {
            "type": "number",
            "description": "Taxable amount of the transaction.",
            "format": "double"
          },
          "taxAmount": {
            "type": "number",
            "description": "VAT amount applicable to the transaction.",
            "format": "double"
          },
          "currency": {
            "type": "string",
            "description": "Currency code (ISO 4217).",
            "nullable": true
          },
          "counterpartyCountry": {
            "type": "string",
            "description": "ISO 3166-1 alpha-2 code of the counterparty country.",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "Free-text description recorded on deposit.",
            "nullable": true
          },
          "status": {
            "type": "string",
            "description": "Lifecycle status — typically `accepted` after deposit.",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "description": "UTC timestamp the transaction was created in the platform.",
            "format": "date-time"
          }
        },
        "additionalProperties": false,
        "description": "One persisted reporting transaction."
      },
      "ReportingTransactionLineDto": {
        "type": "object",
        "properties": {
          "operationDate": {
            "type": "string",
            "description": "Date the operation occurred on (booking date).",
            "format": "date"
          },
          "amount": {
            "type": "number",
            "description": "Taxable amount of the transaction.",
            "format": "double"
          },
          "taxAmount": {
            "type": "number",
            "description": "VAT amount applicable to the transaction.",
            "format": "double"
          },
          "currency": {
            "type": "string",
            "description": "Currency code (ISO 4217).",
            "nullable": true
          },
          "counterpartyCountry": {
            "type": "string",
            "description": "ISO 3166-1 alpha-2 code of the counterparty country (mandatory for B2C / B2C export).",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "Free-text description carried into the audit row.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "One transaction line inside a deposit batch."
      },
      "ReportingType": {
        "enum": [
          "b2c_aggregated",
          "international_b2bi",
          "international_bi2b",
          "international_b2g",
          "payment"
        ],
        "type": "string",
        "description": "Kind of e-reporting transaction (F10 flow)."
      },
      "ReportingTypeSummaryDto": {
        "type": "object",
        "properties": {
          "transactionCount": {
            "type": "integer",
            "description": "Number of transactions of this type in the period.",
            "format": "int32"
          },
          "amount": {
            "type": "number",
            "description": "Sum of taxable amounts for this type.",
            "format": "double"
          },
          "currency": {
            "type": "string",
            "description": "Currency of the amounts (ISO 4217).",
            "nullable": true
          },
          "alreadyDeposited": {
            "type": "boolean",
            "description": "True once the deposit for this type has been confirmed."
          }
        },
        "additionalProperties": false,
        "description": "Sub-total for one reporting type inside a period summary."
      },
      "ResolvedDestinationDto": {
        "type": "object",
        "properties": {
          "channel": {
            "$ref": "#/components/schemas/PublicDeliveryChannel"
          },
          "buyerSiret": {
            "type": "string",
            "description": "Buyer SIRET resolved from the payload.",
            "nullable": true
          },
          "buyerPa": {
            "type": "string",
            "description": "Buyer PA matricule (e.g. `0156` for PPF).",
            "nullable": true
          },
          "electronicAddress": {
            "type": "string",
            "description": "Resolved electronic address on the chosen channel.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "How the platform plans to route the invoice."
      },
      "Response": {
        "type": "object",
        "properties": {
          "count": {
            "type": "integer",
            "format": "int32"
          },
          "webhooks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Webhook"
            },
            "nullable": true
          }
        },
        "additionalProperties": { }
      },
      "RoutingCodeAdministrativeStatus": {
        "enum": [
          "A",
          "C"
        ],
        "type": "string",
        "description": "Administrative status of the routing code [A - Active , C - Closed]"
      },
      "RoutingCodeField": {
        "enum": [
          "Siret",
          "RoutingIdentifierType",
          "RoutingCodeName",
          "RoutingIdentifier",
          "ManagesLegalCommitmentCode",
          "AdministrativeStatus",
          "Address"
        ],
        "type": "string",
        "description": "Fields of the routing code resource."
      },
      "RoutingCodePayloadHistoryLegalUnitFacility": {
        "type": "object",
        "properties": {
          "routingIdentifier": {
            "maxLength": 100,
            "minLength": 0,
            "pattern": "^(?!\\s+$)[\\-_/a-zA-Z0-9]{1,100}$",
            "type": "string",
            "nullable": true
          },
          "siret": {
            "maxLength": 14,
            "minLength": 0,
            "pattern": "^([0-9]{14})$",
            "type": "string",
            "nullable": true
          },
          "routingIdentifierType": {
            "maxLength": 4,
            "minLength": 0,
            "pattern": "^(?!\\s*$).+",
            "type": "string",
            "nullable": true
          },
          "routingCodeName": {
            "maxLength": 100,
            "minLength": 0,
            "pattern": "^(?!\\s*$).+",
            "type": "string",
            "nullable": true
          },
          "managesLegalCommitmentCode": {
            "type": "boolean",
            "nullable": true
          },
          "administrativeStatus": {
            "$ref": "#/components/schemas/RoutingCodeAdministrativeStatus"
          },
          "address": {
            "$ref": "#/components/schemas/AddressRead"
          },
          "legalUnit": {
            "$ref": "#/components/schemas/LegalUnitPayloadIncluded"
          },
          "facility": {
            "$ref": "#/components/schemas/FacilityPayloadIncluded"
          }
        },
        "additionalProperties": { }
      },
      "RoutingCodeSearch": {
        "type": "object",
        "properties": {
          "filters": {
            "$ref": "#/components/schemas/RoutingCodeSearchFilters"
          },
          "sorting": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RoutingCodeSearchSortingInner"
            },
            "description": "Sorting criteria on a field and an order (ascending or descending).",
            "nullable": true
          },
          "fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RoutingCodeField"
            },
            "description": "Allows you to filter the desired fields in the response.",
            "nullable": true
          },
          "include": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Include2"
            },
            "nullable": true
          },
          "limit": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "ignore": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": { }
      },
      "RoutingCodeSearchFilters": {
        "type": "object",
        "properties": {
          "routingIdentifier": {
            "$ref": "#/components/schemas/RoutingCodeSearchFiltersRoutingIdentifier"
          },
          "siret": {
            "$ref": "#/components/schemas/SearchSiretFiltersSiret"
          },
          "routingCodeName": {
            "$ref": "#/components/schemas/RoutingCodeSearchFiltersRoutingCodeName"
          },
          "administrativeStatus": {
            "$ref": "#/components/schemas/RoutingCodeSearchFiltersAdministrativeStatus"
          },
          "addressLines": {
            "$ref": "#/components/schemas/SearchSiretFiltersAddressLines"
          },
          "postalCode": {
            "$ref": "#/components/schemas/SearchSiretFiltersPostalCode"
          },
          "locality": {
            "$ref": "#/components/schemas/SearchSiretFiltersLocality"
          }
        },
        "additionalProperties": { }
      },
      "RoutingCodeSearchFiltersAdministrativeStatus": {
        "type": "object",
        "properties": {
          "op": {
            "$ref": "#/components/schemas/StrictOperator"
          },
          "value": {
            "$ref": "#/components/schemas/RoutingCodeAdministrativeStatus"
          }
        },
        "additionalProperties": { }
      },
      "RoutingCodeSearchFiltersRoutingCodeName": {
        "type": "object",
        "properties": {
          "op": {
            "$ref": "#/components/schemas/ContainsOrStrictOperator"
          },
          "value": {
            "maxLength": 100,
            "minLength": 0,
            "pattern": "^$|^(?!\\s*$).+",
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": { }
      },
      "RoutingCodeSearchFiltersRoutingIdentifier": {
        "type": "object",
        "properties": {
          "op": {
            "$ref": "#/components/schemas/ContainsOrStrictOperator"
          },
          "value": {
            "maxLength": 100,
            "minLength": 0,
            "pattern": "^$|^(?!\\s*$).+",
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": { }
      },
      "RoutingCodeSearchPost200Response": {
        "type": "object",
        "properties": {
          "search": {
            "$ref": "#/components/schemas/RoutingCodeSearch"
          },
          "totalNumberOfResults": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RoutingCodePayloadHistoryLegalUnitFacility"
            },
            "nullable": true
          }
        },
        "additionalProperties": { }
      },
      "RoutingCodeSearchSortingInner": {
        "type": "object",
        "properties": {
          "field": {
            "$ref": "#/components/schemas/RoutingCodeField"
          },
          "order": {
            "$ref": "#/components/schemas/SortingOrder"
          }
        },
        "additionalProperties": { },
        "description": "A sort criteria composed of a field and an order (ascending or descending)."
      },
      "SandboxMode": {
        "enum": [
          "test",
          "live"
        ],
        "type": "string"
      },
      "SandboxScenarioResponseDto": {
        "required": [
          "message",
          "triggerId"
        ],
        "type": "object",
        "properties": {
          "scenario": {
            "$ref": "#/components/schemas/SandboxScenarioType"
          },
          "triggerId": {
            "type": "string",
            "description": "Trigger id — handy when correlating with platform logs.",
            "nullable": true
          },
          "scheduledFor": {
            "type": "string",
            "description": "UTC timestamp the trigger was scheduled for.",
            "format": "date-time"
          },
          "message": {
            "type": "string",
            "description": "Human-readable confirmation message.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Response of `POST /sandbox/scenarios/{scenario}/trigger`."
      },
      "SandboxScenarioType": {
        "enum": [
          "invoice_rejected",
          "cashed_late",
          "dispute_opened",
          "factor_subrogation",
          "chaos_monkey"
        ],
        "type": "string",
        "description": "Scenarios you can arm in sandbox to force a behaviour."
      },
      "SearchDirectoryLine": {
        "type": "object",
        "properties": {
          "filters": {
            "$ref": "#/components/schemas/SearchDirectoryLineFilters"
          },
          "sorting": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SearchDirectoryLineSortingInner"
            },
            "description": "Sorting criteria on a field and an order (ascending or descending).",
            "nullable": true
          },
          "fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DirectoryLineField"
            },
            "description": "Allows you to filter the desired fields in the response.",
            "nullable": true
          },
          "include": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Include3"
            },
            "nullable": true
          },
          "limit": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "ignore": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": { }
      },
      "SearchDirectoryLineFilters": {
        "type": "object",
        "properties": {
          "addressingIdentifier": {
            "$ref": "#/components/schemas/SearchDirectoryLineFiltersAddressingIdentifier"
          },
          "siren": {
            "$ref": "#/components/schemas/SearchSirenFiltersSiren"
          },
          "siret": {
            "$ref": "#/components/schemas/SearchSiretFiltersSiret"
          },
          "routingIdentifier": {
            "$ref": "#/components/schemas/RoutingCodeSearchFiltersRoutingIdentifier"
          },
          "addressingSuffix": {
            "$ref": "#/components/schemas/SearchDirectoryLineFiltersAddressingSuffix"
          }
        },
        "additionalProperties": { }
      },
      "SearchDirectoryLineFiltersAddressingIdentifier": {
        "type": "object",
        "properties": {
          "op": {
            "$ref": "#/components/schemas/ContainsOrStrictOperator"
          },
          "value": {
            "maxLength": 125,
            "minLength": 0,
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": { }
      },
      "SearchDirectoryLineFiltersAddressingSuffix": {
        "type": "object",
        "properties": {
          "op": {
            "$ref": "#/components/schemas/ContainsOrStrictOperator"
          },
          "value": {
            "maxLength": 100,
            "minLength": 0,
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": { }
      },
      "SearchDirectoryLineSortingInner": {
        "type": "object",
        "properties": {
          "field": {
            "$ref": "#/components/schemas/DirectoryLineField"
          },
          "order": {
            "$ref": "#/components/schemas/SortingOrder"
          }
        },
        "additionalProperties": { },
        "description": "A sort criteria composed of a field and an order (ascending or descending)."
      },
      "SearchFlowContent": {
        "type": "object",
        "properties": {
          "limit": {
            "maximum": 100,
            "minimum": -2147483648,
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "nextCursor": {
            "type": "string",
            "description": "Pagination management:\r\n\n- If present, says where to start for next page, set nextCursor as the cursor in the next request\r\n\n- If omitted, says that pagination is finished\r\n\n",
            "nullable": true
          },
          "filters": {
            "$ref": "#/components/schemas/SearchFlowFilters"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Flow"
            },
            "nullable": true
          }
        },
        "additionalProperties": { },
        "description": "A set of flows matching criterias, provided into the request"
      },
      "SearchFlowFilters": {
        "type": "object",
        "properties": {
          "updatedAfter": {
            "type": "string",
            "description": "The comparison with current date is strict : updatedAt > updatedAfter",
            "format": "date-time",
            "nullable": true
          },
          "updatedBefore": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "processingRule": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProcessingRule"
            },
            "nullable": true
          },
          "flowType": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FlowType"
            },
            "nullable": true
          },
          "flowDirection": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FlowDirection"
            },
            "nullable": true
          },
          "trackingId": {
            "maxLength": 64,
            "minLength": 0,
            "type": "string",
            "nullable": true
          },
          "ackStatus": {
            "$ref": "#/components/schemas/FlowAckStatus"
          }
        },
        "additionalProperties": { },
        "description": "Filtering criteria, at least one is required"
      },
      "SearchFlowParams": {
        "required": [
          "where"
        ],
        "type": "object",
        "properties": {
          "limit": {
            "maximum": 100,
            "minimum": -2147483648,
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "cursor": {
            "type": "string",
            "description": "If cursor is provided, then start search starting from that cursor",
            "nullable": true
          },
          "where": {
            "$ref": "#/components/schemas/SearchFlowFilters"
          }
        },
        "additionalProperties": { }
      },
      "SearchSiren": {
        "type": "object",
        "properties": {
          "filters": {
            "$ref": "#/components/schemas/SearchSirenFilters"
          },
          "sorting": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SearchSirenSortingInner"
            },
            "description": "Sorting criteria on a field and an order (ascending or descending).",
            "nullable": true
          },
          "fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SirenField"
            },
            "description": "Allows you to filter the desired fields in the response.",
            "nullable": true
          },
          "limit": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "ignore": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": { }
      },
      "SearchSirenFilters": {
        "type": "object",
        "properties": {
          "siren": {
            "$ref": "#/components/schemas/SearchSirenFiltersSiren"
          },
          "businessName": {
            "$ref": "#/components/schemas/SearchSirenFiltersBusinessName"
          },
          "entityType": {
            "$ref": "#/components/schemas/SearchSirenFiltersEntityType"
          },
          "administrativeStatus": {
            "$ref": "#/components/schemas/SearchSirenFiltersAdministrativeStatus"
          }
        },
        "additionalProperties": { }
      },
      "SearchSirenFiltersAdministrativeStatus": {
        "type": "object",
        "properties": {
          "op": {
            "$ref": "#/components/schemas/StrictOperator"
          },
          "value": {
            "$ref": "#/components/schemas/LegalUnitAdministrativeStatus"
          }
        },
        "additionalProperties": { }
      },
      "SearchSirenFiltersBusinessName": {
        "type": "object",
        "properties": {
          "op": {
            "$ref": "#/components/schemas/ContainsOrStrictOrStartWithOperator"
          },
          "value": {
            "maxLength": 150,
            "minLength": 0,
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": { }
      },
      "SearchSirenFiltersEntityType": {
        "type": "object",
        "properties": {
          "op": {
            "$ref": "#/components/schemas/StrictOperator"
          },
          "value": {
            "$ref": "#/components/schemas/EntityType"
          }
        },
        "additionalProperties": { }
      },
      "SearchSirenFiltersSiren": {
        "type": "object",
        "properties": {
          "op": {
            "$ref": "#/components/schemas/StrictOperator"
          },
          "value": {
            "maxLength": 9,
            "minLength": 0,
            "pattern": "[0-9]*",
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": { }
      },
      "SearchSirenSortingInner": {
        "type": "object",
        "properties": {
          "field": {
            "$ref": "#/components/schemas/SirenField"
          },
          "order": {
            "$ref": "#/components/schemas/SortingOrder"
          }
        },
        "additionalProperties": { },
        "description": "A sorting criteria composed of a field and an order (ascending or descending)."
      },
      "SearchSiret": {
        "type": "object",
        "properties": {
          "filters": {
            "$ref": "#/components/schemas/SearchSiretFilters"
          },
          "sorting": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SearchSiretSortingInner"
            },
            "description": "Sorting criteria on a field and an order (ascending or descending).",
            "nullable": true
          },
          "fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SiretField"
            },
            "description": "Allows you to filter the desired fields in the response.",
            "nullable": true
          },
          "include": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Include"
            },
            "nullable": true
          },
          "limit": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "ignore": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": { }
      },
      "SearchSiretFilters": {
        "type": "object",
        "properties": {
          "siret": {
            "$ref": "#/components/schemas/SearchSiretFiltersSiret"
          },
          "siren": {
            "$ref": "#/components/schemas/SearchSirenFiltersSiren"
          },
          "facilityType": {
            "$ref": "#/components/schemas/SearchSiretFiltersFacilityType"
          },
          "name": {
            "$ref": "#/components/schemas/SearchSiretFiltersName"
          },
          "addressLines": {
            "$ref": "#/components/schemas/SearchSiretFiltersAddressLines"
          },
          "postalCode": {
            "$ref": "#/components/schemas/SearchSiretFiltersPostalCode"
          },
          "countrySubdivision": {
            "$ref": "#/components/schemas/SearchSiretFiltersCountrySubdivision"
          },
          "locality": {
            "$ref": "#/components/schemas/SearchSiretFiltersLocality"
          },
          "administrativeStatus": {
            "$ref": "#/components/schemas/SearchSiretFiltersAdministrativeStatus"
          }
        },
        "additionalProperties": { }
      },
      "SearchSiretFiltersAddressLines": {
        "type": "object",
        "properties": {
          "op": {
            "$ref": "#/components/schemas/ContainsOrStartWithOperator"
          },
          "value": {
            "maxLength": 600,
            "minLength": 0,
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": { }
      },
      "SearchSiretFiltersAdministrativeStatus": {
        "type": "object",
        "properties": {
          "op": {
            "$ref": "#/components/schemas/StrictOperator"
          },
          "value": {
            "$ref": "#/components/schemas/FacilityAdministrativeStatus"
          }
        },
        "additionalProperties": { }
      },
      "SearchSiretFiltersCountrySubdivision": {
        "type": "object",
        "properties": {
          "op": {
            "$ref": "#/components/schemas/StrictOperator"
          },
          "value": {
            "maxLength": 255,
            "minLength": 0,
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": { }
      },
      "SearchSiretFiltersFacilityType": {
        "type": "object",
        "properties": {
          "op": {
            "$ref": "#/components/schemas/StrictOperator"
          },
          "value": {
            "$ref": "#/components/schemas/FacilityType"
          }
        },
        "additionalProperties": { }
      },
      "SearchSiretFiltersLocality": {
        "type": "object",
        "properties": {
          "op": {
            "$ref": "#/components/schemas/ContainsOrStrictOrStartWithOperator"
          },
          "value": {
            "maxLength": 100,
            "minLength": 0,
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": { }
      },
      "SearchSiretFiltersName": {
        "type": "object",
        "properties": {
          "op": {
            "$ref": "#/components/schemas/ContainsOrStrictOrStartWithOperator"
          },
          "value": {
            "maxLength": 100,
            "minLength": 0,
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": { }
      },
      "SearchSiretFiltersPostalCode": {
        "type": "object",
        "properties": {
          "op": {
            "$ref": "#/components/schemas/StrictOrStartWithOperator"
          },
          "value": {
            "maxLength": 5,
            "minLength": 0,
            "pattern": "[0-9]*",
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": { }
      },
      "SearchSiretFiltersSiret": {
        "type": "object",
        "properties": {
          "op": {
            "$ref": "#/components/schemas/StrictOperator"
          },
          "value": {
            "maxLength": 14,
            "minLength": 0,
            "pattern": "[0-9]*",
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": { }
      },
      "SearchSiretSortingInner": {
        "type": "object",
        "properties": {
          "field": {
            "$ref": "#/components/schemas/SiretField"
          },
          "order": {
            "$ref": "#/components/schemas/SortingOrder"
          }
        },
        "additionalProperties": { },
        "description": "A sorting criteria composed of a field and an order (ascending or descending)."
      },
      "SirenField": {
        "enum": [
          "Siren",
          "BusinessName",
          "EntityType",
          "AdministrativeStatus",
          "Instructions"
        ],
        "type": "string",
        "description": "Fields of the Siren resource."
      },
      "SirenInstructions": {
        "type": "object",
        "properties": {
          "isSalesProspectingForbidden": {
            "type": "boolean",
            "nullable": true
          }
        },
        "additionalProperties": { },
        "description": "Instructions regarding the SIREN"
      },
      "SirenSearchPost200Response": {
        "type": "object",
        "properties": {
          "search": {
            "$ref": "#/components/schemas/SearchSiren"
          },
          "totalNumberOfResults": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LegalUnitPayloadHistory"
            },
            "nullable": true
          }
        },
        "additionalProperties": { }
      },
      "SiretField": {
        "enum": [
          "Siret",
          "Siren",
          "Name",
          "FacilityType",
          "AdministrativeStatus",
          "SiretInstructions",
          "Address",
          "PmStatus",
          "PmOnly",
          "ManagesPaymentStatus",
          "ManagesLegalCommitment",
          "ManagesLegalCommitmentOrService",
          "ServiceCodeStatus"
        ],
        "type": "string",
        "description": "Fields of the Siret resource."
      },
      "SiretInstructions": {
        "type": "object",
        "properties": {
          "isSalesProspectingForbidden": {
            "type": "boolean",
            "nullable": true
          }
        },
        "additionalProperties": { },
        "description": "Instructions regarding the SIRET"
      },
      "SiretSearchPost200Response": {
        "type": "object",
        "properties": {
          "search": {
            "$ref": "#/components/schemas/SearchSiret"
          },
          "totalNumberOfResults": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FacilityPayloadHistory"
            },
            "nullable": true
          }
        },
        "additionalProperties": { }
      },
      "SortingOrder": {
        "enum": [
          "Ascending",
          "Descending"
        ],
        "type": "string",
        "description": "Sorting order (ascending or descending)"
      },
      "StrictOperator": {
        "enum": [
          "Strict"
        ],
        "type": "string",
        "description": "\\\"strict\\\" comparison operator"
      },
      "StrictOrStartWithOperator": {
        "enum": [
          "StartWith",
          "Strict"
        ],
        "type": "string",
        "description": "\\\"strict\\\" or \\\"startWith\\\" comparison operator"
      },
      "TargetFormat": {
        "enum": [
          "ubl",
          "cii",
          "facturx_basic",
          "facturx_extended"
        ],
        "type": "string",
        "description": "Output format on emission and on file download."
      },
      "TaxBreakdownDto": {
        "type": "object",
        "properties": {
          "category": {
            "type": "string",
            "description": "BT-118 — VAT category code (S / Z / E / AE / ...).",
            "nullable": true
          },
          "rate": {
            "type": "number",
            "description": "BT-119 — VAT rate as a percentage.",
            "format": "double"
          },
          "taxableAmount": {
            "type": "number",
            "description": "BT-116 — taxable amount for this (category, rate).",
            "format": "double"
          },
          "taxAmount": {
            "type": "number",
            "description": "BT-117 — VAT amount for this (category, rate).",
            "format": "double"
          },
          "exemptionReason": {
            "type": "string",
            "description": "BT-120 — VAT exemption reason text (mandatory when the category triggers exemption).",
            "nullable": true
          },
          "exemptionReasonCode": {
            "type": "string",
            "description": "BT-121 — VAT exemption reason code.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "VAT breakdown row — EN 16931 BG-23, one entry per (category, rate) pair."
      },
      "TenantCreateRequestDto": {
        "required": [
          "name",
          "siret"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Display name for the new tenant.",
            "nullable": true
          },
          "siret": {
            "type": "string",
            "description": "SIRET (14 digits) the tenant will identify as.",
            "nullable": true
          },
          "subdomain": {
            "type": "string",
            "description": "Optional subdomain to use for the tenant URL — generated from `Name` when missing.",
            "nullable": true
          },
          "contactEmail": {
            "type": "string",
            "description": "Contact email used for service notifications.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Body for `POST /tenants` in sandbox."
      },
      "TenantPublicDto": {
        "required": [
          "id",
          "name"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Platform-assigned tenant id.",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "Tenant display name.",
            "nullable": true
          },
          "siret": {
            "type": "string",
            "description": "Tenant SIRET (14 digits), when published.",
            "nullable": true
          },
          "subdomain": {
            "type": "string",
            "description": "Tenant subdomain on the platform (e.g. `acme` for `acme.neotimo.com`).",
            "nullable": true
          },
          "mandateActive": {
            "type": "boolean",
            "description": "True when a mandate is currently active for this tenant."
          },
          "paMatricule": {
            "type": "string",
            "description": "Matricule of the PA currently routing for this tenant (e.g. `0156` for PPF).",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "description": "UTC timestamp the tenant was provisioned.",
            "format": "date-time"
          }
        },
        "additionalProperties": false,
        "description": "Public projection of a tenant."
      },
      "TimelineActorDto": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "description": "Actor kind — `user`, `platform`, `partner`, `system`.",
            "nullable": true
          },
          "id": {
            "type": "string",
            "description": "Free-form id (PA matricule, user id, system component name).",
            "nullable": true
          },
          "displayName": {
            "type": "string",
            "description": "Display name to surface in UIs (when available).",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Who produced a timeline event."
      },
      "TimelineAttachmentDto": {
        "type": "object",
        "properties": {
          "fileUrl": {
            "type": "string",
            "description": "Download URL of the attachment.",
            "nullable": true
          },
          "filename": {
            "type": "string",
            "description": "Original filename of the attachment.",
            "nullable": true
          },
          "mimeType": {
            "type": "string",
            "description": "Mime type of the attachment.",
            "nullable": true
          },
          "sizeBytes": {
            "type": "integer",
            "description": "Size of the attachment in bytes.",
            "format": "int64",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "One file attached to a timeline event."
      },
      "TimelineEventDto": {
        "required": [
          "id"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable event id.",
            "nullable": true
          },
          "transition": {
            "$ref": "#/components/schemas/TimelineTransition"
          },
          "resultingStatus": {
            "$ref": "#/components/schemas/PublicInvoiceStatus"
          },
          "occurredAt": {
            "type": "string",
            "description": "UTC timestamp the event occurred.",
            "format": "date-time"
          },
          "actor": {
            "$ref": "#/components/schemas/TimelineActorDto"
          },
          "reasonCode": {
            "type": "string",
            "description": "Stable reason code (e.g. `buyer_dispute`, `partial_payment`).",
            "nullable": true
          },
          "comment": {
            "type": "string",
            "description": "Free-text comment captured with the event.",
            "nullable": true
          },
          "attachments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TimelineAttachmentDto"
            },
            "description": "Files attached to the event (proof of payment, dispute letter, ...).",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "One lifecycle event on an invoice timeline."
      },
      "TimelineTransition": {
        "enum": [
          "submit",
          "acknowledge_receipt",
          "approve",
          "reject",
          "dispute",
          "litigation",
          "suspend",
          "payment_sent",
          "cashed",
          "factored",
          "factor_changed",
          "archived"
        ],
        "type": "string",
        "description": "Business transition you can push on an invoice's timeline."
      },
      "TransitionPaymentDataDto": {
        "type": "object",
        "properties": {
          "paidAt": {
            "type": "string",
            "description": "Date the payment was actually cashed.",
            "format": "date",
            "nullable": true
          },
          "amount": {
            "type": "number",
            "description": "Amount cashed (partial payments allowed).",
            "format": "double",
            "nullable": true
          },
          "currency": {
            "type": "string",
            "description": "Currency code (ISO 4217).",
            "nullable": true
          },
          "reference": {
            "type": "string",
            "description": "Bank reference / wire id.",
            "nullable": true
          },
          "paymentMeansCode": {
            "type": "string",
            "description": "UNTDID 4461 payment means code (`30` = credit transfer, `59` = SEPA, ...).",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Payment metadata carried by payment transitions."
      },
      "TransitionReferenceDto": {
        "type": "object",
        "properties": {
          "transition": {
            "$ref": "#/components/schemas/TimelineTransition"
          },
          "resultingStatus": {
            "$ref": "#/components/schemas/PublicInvoiceStatus"
          },
          "description": {
            "type": "string",
            "description": "One-line English explanation of what the transition means.",
            "nullable": true
          },
          "typicalActor": {
            "type": "string",
            "description": "Hint about who typically pushes this transition (supplier, buyer, platform).",
            "nullable": true
          },
          "allowedFromStatuses": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicInvoiceStatus"
            },
            "description": "Statuses the transition can be pushed from — empty means \"any\".",
            "nullable": true
          },
          "requiresReason": {
            "type": "boolean",
            "description": "True when `ReasonCode` is required on the request body."
          }
        },
        "additionalProperties": false,
        "description": "One transition entry in the timeline catalog."
      },
      "TransitionRequestDto": {
        "required": [
          "transition"
        ],
        "type": "object",
        "properties": {
          "transition": {
            "$ref": "#/components/schemas/TimelineTransition"
          },
          "reasonCode": {
            "type": "string",
            "description": "Stable reason code (required when the catalog says so).",
            "nullable": true
          },
          "comment": {
            "type": "string",
            "description": "Free-text comment carried into the audit row.",
            "nullable": true
          },
          "paymentData": {
            "$ref": "#/components/schemas/TransitionPaymentDataDto"
          }
        },
        "additionalProperties": false,
        "description": "Body for `POST /invoices/{id}/timeline`."
      },
      "UniqueDirectoryLineStatus": {
        "enum": [
          "Enabled",
          "Disabled"
        ],
        "type": "string",
        "description": "Current line status of the platform.\r\n\n  - Enabled : Active line linked to a platform\r\n\n  - Disabled : No platform linked to the line\r\n\n"
      },
      "UserOrganizationResponse": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "subdomain": {
            "type": "string",
            "nullable": true
          },
          "externalId": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Organization context for the current user."
      },
      "UserProfileResponse": {
        "type": "object",
        "properties": {
          "userId": {
            "type": "string",
            "description": "User identifier (e.g. \"oidc|1\" or \"apikey:42\").",
            "nullable": true
          },
          "accountId": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "roles": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "portalUrl": {
            "type": "string",
            "nullable": true
          },
          "isMfaEnabled": {
            "type": "boolean",
            "description": "Whether the user has enrolled multi-factor authentication on their account.\r\nSourced from the agnostic 'core:mfaenabled' claim emitted by the provider module.\r\nFalse when the claim is absent — see ICurrentUserContext.IsMfaEnabled."
          },
          "organization": {
            "$ref": "#/components/schemas/UserOrganizationResponse"
          }
        },
        "additionalProperties": false,
        "description": "User profile returned by GET /api/v1/core/me."
      },
      "VerifyPhoneRequest": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Request body for `POST /me/phone/verify` — the OTP the user typed in the\r\nverification dialog after receiving the SMS."
      },
      "Webhook": {
        "required": [
          "callbackUrl"
        ],
        "type": "object",
        "properties": {
          "webhookId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "signingKey": {
            "type": "string",
            "format": "byte",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "callbackUrl": {
            "type": "string",
            "format": "uri"
          },
          "flowTypes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FlowType"
            },
            "nullable": true
          },
          "flowDirection": {
            "$ref": "#/components/schemas/FlowDirection"
          },
          "ackStatus": {
            "$ref": "#/components/schemas/FlowAckStatus"
          }
        },
        "additionalProperties": { }
      },
      "WebhookDeliveryDto": {
        "required": [
          "eventName",
          "id",
          "subscriptionId"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable delivery id.",
            "nullable": true
          },
          "subscriptionId": {
            "type": "string",
            "description": "Public id of the subscription that produced this delivery.",
            "nullable": true
          },
          "eventName": {
            "type": "string",
            "description": "Event name (dotted, e.g. `invoice.delivered`) that triggered the delivery.",
            "nullable": true
          },
          "status": {
            "type": "string",
            "description": "Current state — `pending`, `success`, `failed`.",
            "nullable": true
          },
          "lastHttpStatusCode": {
            "type": "integer",
            "description": "HTTP status code of the last attempt, or `null` if none happened yet.",
            "format": "int32",
            "nullable": true
          },
          "lastError": {
            "type": "string",
            "description": "Short descriptor on the last failure (≤ 200 chars). Never the response body.",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "description": "UTC timestamp the delivery row was created.",
            "format": "date-time"
          },
          "deliveredAt": {
            "type": "string",
            "description": "UTC timestamp the first 2xx response arrived.",
            "format": "date-time",
            "nullable": true
          },
          "payloadSnippet": {
            "type": "string",
            "description": "First 200 chars of the payload — partner-side debugging aid.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "One webhook delivery attempt."
      },
      "WebhookIdParam": {
        "type": "object",
        "properties": {
          "webhookId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "signingKey": {
            "type": "string",
            "format": "byte",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": { }
      },
      "WebhookParams": {
        "required": [
          "callbackUrl"
        ],
        "type": "object",
        "properties": {
          "callbackUrl": {
            "type": "string",
            "format": "uri"
          },
          "flowTypes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FlowType"
            },
            "nullable": true
          },
          "flowDirection": {
            "$ref": "#/components/schemas/FlowDirection"
          },
          "ackStatus": {
            "$ref": "#/components/schemas/FlowAckStatus"
          }
        },
        "additionalProperties": { }
      },
      "WebhookSubscriptionCreatedDto": {
        "required": [
          "secretCleartext",
          "subscription"
        ],
        "type": "object",
        "properties": {
          "subscription": {
            "$ref": "#/components/schemas/WebhookSubscriptionDto"
          },
          "secretCleartext": {
            "type": "string",
            "description": "Cleartext signing secret. Partners must store it on their side to verify `X-Neotimo-Signature` on incoming deliveries.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "One-shot response returned when a webhook subscription is created."
      },
      "WebhookSubscriptionDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Internal numeric id — handy for joins, not for partner persistence.",
            "format": "int64"
          },
          "publicId": {
            "type": "string",
            "description": "Public ULID-style identifier (e.g. `sub_01HZ8K…`).",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "Partner-supplied label, surfaced in the dashboard.",
            "nullable": true
          },
          "url": {
            "type": "string",
            "description": "HTTPS endpoint receiving signed deliveries.",
            "nullable": true
          },
          "events": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Comma-separated list of event names this subscription listens for.",
            "nullable": true
          },
          "active": {
            "type": "boolean",
            "description": "Whether the subscription is actively delivering."
          },
          "secretPrefix": {
            "type": "string",
            "description": "First 6 chars of the signing secret — fingerprint shown in dashboards.",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "description": "When the subscription was created.",
            "format": "date-time"
          },
          "lastDeliveryAt": {
            "type": "string",
            "description": "Most recent 2xx response from the endpoint, or `null` if none yet.",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Read-side view of a webhook subscription — the signing secret never leaks here."
      },
      "WebhookSubscriptionFormDto": {
        "required": [
          "events",
          "url"
        ],
        "type": "object",
        "properties": {
          "name": {
            "maxLength": 120,
            "minLength": 0,
            "type": "string",
            "description": "Caller-supplied label, surfaced in the partner dashboard. Optional: the partner API\r\ndocuments a subscription as `{url, events}`, so a missing name gets a default\r\nrather than a 422 on a field the caller never heard of.",
            "nullable": true
          },
          "url": {
            "minLength": 1,
            "type": "string",
            "description": "HTTPS endpoint that receives the signed payload."
          },
          "events": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Event names to subscribe to, e.g. `[\"invoice.delivered\", \"invoice.timeline.changed\"]`."
          },
          "active": {
            "type": "boolean",
            "description": "Whether the subscription is delivering events. Default `true`."
          }
        },
        "additionalProperties": false,
        "description": "Payload for creating a webhook subscription."
      }
    },
    "securitySchemes": {
      "Bearer": {
        "type": "http",
        "description": "JWT Bearer token from your auth server. Example: `Bearer eyJhbG...`",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      },
      "ApiKey": {
        "type": "apiKey",
        "description": "API Key for partners and integrations. Example: `ak_live_AbCdEfGh...`",
        "name": "X-Api-Key",
        "in": "header"
      }
    }
  },
  "tags": [
    {
      "name": "AFNOR XP Z12-013/FlowService",
      "description": "Normative AFNOR XP Z12-013 surface (v1.3.0): mounted outside /api/, conforms to the standard's own response/error envelope (not ApiResponse<T>), authenticated via OAuth2 client-credentials + bearer JWT (§4.2)."
    },
    {
      "name": "AFNOR XP Z12-013/DirectoryService",
      "description": "Normative AFNOR XP Z12-013 surface (v1.3.0): mounted outside /api/, conforms to the standard's own response/error envelope (not ApiResponse<T>), authenticated via OAuth2 client-credentials + bearer JWT (§4.2)."
    },
    {
      "name": "AuthorizationManifest",
      "description": "Diagnostic surface for the authorization manifest. SuperAdmin only."
    },
    {
      "name": "CustomFields",
      "description": "Exposes the custom fields (dynamic attributes) of the platform's models: the definitions\r\nAPPLICABLE to an entity, and the entity's values — read and write."
    },
    {
      "name": "Me",
      "description": "Self-service endpoints for the signed-in user."
    },
    {
      "name": "Annuaire",
      "description": "Self-service PA enrolment into the Neotimo directory."
    },
    {
      "name": "AnnuaireDirectory",
      "description": "Peer-to-peer consultation of the Neotimo PA directory."
    },
    {
      "name": "AnnuaireMe",
      "description": "Self-service surface for a PA's own directory entry."
    },
    {
      "name": "ComplianceCash",
      "description": "SC-07 endpoint — cash receipt declaration by the issuing client (emits lifecycle\r\nevent CDV 212 to the PPF)."
    },
    {
      "name": "ComplianceInvoice",
      "description": "SC-01 endpoint — creates and qualifies a PPF-compliant F2 invoice.\r\nDelegates to IFrInvoiceOrchestratorService: validation (A1-A4) + the 3 lanes (A/B/C)."
    },
    {
      "name": "PublicDirectory",
      "description": "Partner directory surface."
    },
    {
      "name": "PublicExtraction",
      "description": "Document extraction surface."
    },
    {
      "name": "PublicInbox",
      "description": "Partner reception surface."
    },
    {
      "name": "PublicInvoice",
      "description": "Partner emission surface."
    },
    {
      "name": "PublicInvoiceTimeline",
      "description": "Per-invoice timeline — lifecycle events and evidence attachments."
    },
    {
      "name": "PublicMe",
      "description": "Caller identity surface."
    },
    {
      "name": "PublicOpenRouting",
      "description": "Public mirror of the DGFiP annuaire — routing lookup by SIRET/SIREN."
    },
    {
      "name": "PublicReporting",
      "description": "E-reporting surface."
    },
    {
      "name": "PublicSandbox",
      "description": "Sandbox-only triggers to force a specific outcome on the next emission."
    },
    {
      "name": "PublicTenants",
      "description": "Tenant directory the caller can act on."
    },
    {
      "name": "PublicTimelineCatalog",
      "description": "Catalogue of transitions partners can push on an invoice timeline."
    },
    {
      "name": "PublicWebhook",
      "description": "Webhook subscriptions and delivery history — partner-managed push surface."
    },
    {
      "name": "FlowService",
      "description": "Concrete AFNOR XP Z12-013 Flow Service controller (Annex A), mounted at `/flow-service/v1`.\r\nThin controller: it binds and validates the protocol surface (§4/§5) and delegates every\r\nbusiness decision to the An.Platform.Module.XpZ12013.Presentation.Ports.IFlowStore / An.Platform.Module.XpZ12013.Presentation.Ports.IWebhookSubscriptionStore\r\nports implemented by the host PA. Flux operations are wired (NEOTIMO-1404); webhooks remain\r\n501 pending NEOTIMO-1406."
    },
    {
      "name": "DirectoryService",
      "description": "Concrete AFNOR XP Z12-013 Directory Service controller (Annex B), mounted at\r\n`/directory-service/v1`. Thin controller: it binds and validates the protocol surface\r\n(§4/§6) and delegates every business decision (directoryLineStatus, isSalesProspectingForbidden,\r\npublishable filtering, DGFiP/ChorusPro sourcing) to the An.Platform.Module.XpZ12013.Presentation.Ports.IDirectoryProvider port\r\nimplemented by the host PA (lot NEOTIMO-1409)."
    }
  ],
  "x-tagGroups": [
    {
      "name": "AFNOR XP Z12-013",
      "tags": [
        "AFNOR XP Z12-013/DirectoryService",
        "AFNOR XP Z12-013/FlowService"
      ]
    },
    {
      "name": "Core",
      "tags": [
        "Core/Authz",
        "Core/CustomFields",
        "Core/Me"
      ]
    },
    {
      "name": "Neotimo",
      "tags": [
        "Neotimo/Annuaire",
        "Neotimo/Compliance",
        "Neotimo/Directory",
        "Neotimo/Extraction",
        "Neotimo/Inbox",
        "Neotimo/Invoices",
        "Neotimo/Me",
        "Neotimo/Reporting",
        "Neotimo/Sandbox",
        "Neotimo/Tenants",
        "Neotimo/TimelineTransitions",
        "Neotimo/Webhooks"
      ]
    }
  ]
}