{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/hypotheques-en-ligne-fr/json-schema/hypotheques-en-ligne-fr-commande-status-response-schema.json",
  "title": "CommandeStatusResponse",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/hypotheques-en-ligne-fr-api-openapi.yml#/components/schemas/CommandeStatusResponse",
  "type": "object",
  "properties": {
    "success": {
      "type": "boolean"
    },
    "jobId": {
      "type": "string"
    },
    "status": {
      "type": "string",
      "description": "Statut de la commande.",
      "enum": [
        "New",
        "In Progress",
        "Awaiting Customer",
        "Closed",
        "Cancelled"
      ]
    },
    "share_folder": {
      "type": [
        "string",
        "null"
      ],
      "format": "uri",
      "description": "Lien vers le dossier partagé contenant les documents."
    },
    "errors": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ErrorItem"
      }
    }
  },
  "$defs": {
    "ErrorItem": {
      "type": "object",
      "description": "Détail d'une erreur de validation.",
      "properties": {
        "code": {
          "type": "string",
          "description": "Code machine de l'erreur.",
          "enum": [
            "AUTH_REQUIRED",
            "INVALID_TOKEN",
            "INVALID_JSON",
            "MISSING_FIELD",
            "INVALID_VALUE",
            "INVALID_COMBINATION",
            "LIMIT_EXCEEDED",
            "ALSACE_MOSELLE_RESTRICTION",
            "DUPLICATE_VALUE",
            "LOT_INCOMPLETE",
            "SERVER_ERROR"
          ]
        },
        "message": {
          "type": "string",
          "description": "Message explicatif en français."
        },
        "field": {
          "type": [
            "string",
            "null"
          ],
          "description": "Chemin du champ concerné (ex `parcelles[2].section_cadastrale`)."
        }
      }
    }
  }
}