# dce.download

Obtenir un téléchargement autorisé de DCE. Un lien signé est temporaire, ne constitue pas une citation durable et ne doit pas être journalisé.

POST `/api/mcp/v1/dce.download` · contrat 1.0.0 · OAuth `mcp:read` · offre payante : false.

Outil MCP : `prescriptio_dce_download` ; même handler métier.

## Entrée

```json
{
  "additionalProperties": false,
  "properties": {
    "filename": {
      "description": "Nom exact d'une piece a telecharger (facultatif). Omis, ou piece non stockee isolement : l'archive complete du dossier est renvoyee.",
      "type": "string"
    },
    "marche_id": {
      "description": "Identifiant du dossier : UUID de marche OU annonce_id betterplace (ex \"2833189\").",
      "type": "string"
    }
  },
  "required": [
    "marche_id"
  ],
  "type": "object"
}
```

## Exemple synthétique

```json
{
  "marche_id": "fixture-dce-001"
}
```

## Sortie

```json
{
  "properties": {
    "action": {
      "const": "telechargement_dce"
    },
    "content_type": {
      "type": "string"
    },
    "count": {
      "type": "integer"
    },
    "doc_type": {
      "type": "string"
    },
    "download_url": {
      "description": "Lien temporaire ; ne pas journaliser ni indexer.",
      "type": "string"
    },
    "expires_in": {
      "type": "integer"
    },
    "fichiers": {
      "items": {
        "properties": {
          "filename": {
            "type": "string"
          },
          "pages_estimees": {
            "type": "integer"
          },
          "parties": {
            "type": "integer"
          }
        },
        "type": "object"
      },
      "type": "array"
    },
    "fields": {
      "type": "object"
    },
    "filename": {
      "type": "string"
    },
    "hint": {
      "type": "string"
    },
    "marche_id": {
      "type": "string"
    },
    "ok": {
      "const": true
    },
    "page": {
      "type": "integer"
    },
    "pages_total": {
      "type": "integer"
    },
    "query": {
      "type": "string"
    },
    "results": {
      "items": {
        "properties": {
          "acheteur": {
            "type": [
              "string",
              "null"
            ]
          },
          "doc_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "extrait": {
            "type": "string"
          },
          "filename": {
            "type": "string"
          },
          "lieu": {
            "type": [
              "string",
              "null"
            ]
          },
          "marche_id": {
            "type": "string"
          },
          "titre": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "type": "array"
    },
    "texte": {
      "type": "string"
    },
    "titre": {
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "ok",
    "action",
    "marche_id",
    "filename",
    "download_url",
    "content_type",
    "expires_in"
  ],
  "type": "object"
}
```

[Authentification, quotas, pagination et erreurs](/docs/reference/concepts.md). Les propriétés additionnelles des résultats historiques restent autorisées ; ce schéma n'invente pas les champs manquants.
