{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/direction-generale-des-finances-publiques/json-schema/direction-generale-des-finances-publiques-reponse-liste-finale-comptes-schema.json",
  "title": "ReponseListeFinaleComptes",
  "x-generated": "2026-11-24",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/direction-generale-des-finances-publiques-ficoba-openapi.yml#/components/schemas/ReponseListeFinaleComptes",
  "type": "object",
  "properties": {
    "caracteristiquesDemande": {
      "$ref": "#/$defs/DemandeRestit"
    },
    "referenceDemande": {
      "type": "string"
    },
    "nombreReponses": {
      "type": "string"
    },
    "messageInformatif": {
      "$ref": "#/$defs/ReponseErreur"
    },
    "reponses": {
      "$ref": "#/$defs/ReponseListeComptes"
    }
  },
  "$defs": {
    "AdresseGuichet": {
      "type": "object",
      "properties": {
        "libAdr1": {
          "type": "string"
        },
        "libAdr2": {
          "type": "string"
        },
        "libAdr3": {
          "type": "string"
        },
        "libAdr4": {
          "type": "string"
        }
      }
    },
    "CaracteristiqueCompte": {
      "type": "object",
      "properties": {
        "codeCaracteristique": {
          "type": "integer",
          "format": "int32"
        },
        "libelleCaracteristique": {
          "type": "string"
        }
      }
    },
    "CompteCaracteristiques": {
      "type": "object",
      "properties": {
        "iban": {
          "type": "string"
        },
        "dateOuverture": {
          "type": "string"
        },
        "dateFiscale": {
          "type": "string"
        },
        "codeMotifOuverture": {
          "type": "string"
        },
        "libelleMotifOuverture": {
          "type": "string"
        },
        "dateCloture": {
          "type": "string"
        },
        "nature": {
          "$ref": "#/$defs/NatureCompteDto"
        },
        "type": {
          "$ref": "#/$defs/TypeCompte"
        },
        "formatCompte": {
          "type": "string"
        },
        "caracteristique": {
          "$ref": "#/$defs/CaracteristiqueCompte"
        },
        "succession": {
          "type": "string"
        },
        "resident": {
          "type": "string"
        },
        "devise": {
          "$ref": "#/$defs/DeviseCompte"
        }
      }
    },
    "CompteStructure": {
      "type": "object",
      "properties": {
        "caracteristiqueCompte": {
          "$ref": "#/$defs/CompteCaracteristiques"
        },
        "etablissementGestionnaire": {
          "$ref": "#/$defs/EtablissementGestionnaire"
        },
        "ayantsDroits": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/TitulaireCompte"
          }
        }
      }
    },
    "DemandeRestit": {
      "type": "object",
      "properties": {
        "dateDemande": {
          "type": "string"
        },
        "motif": {
          "type": "string"
        },
        "siretDemandeur": {
          "type": "string"
        },
        "sirenDemandeur": {
          "type": "string"
        },
        "justification": {
          "type": "string"
        }
      }
    },
    "DeviseCompte": {
      "type": "object",
      "properties": {
        "codeDevise": {
          "type": "string"
        }
      }
    },
    "EtablissementBancaire": {
      "type": "object",
      "properties": {
        "numeroEtablissement": {
          "type": "string"
        },
        "libelleEtablissement": {
          "type": "string"
        },
        "bicEtablissement": {
          "type": "string"
        }
      }
    },
    "EtablissementGestionnaire": {
      "type": "object",
      "properties": {
        "etablissement": {
          "$ref": "#/$defs/EtablissementBancaire"
        },
        "guichet": {
          "$ref": "#/$defs/GuichetDto"
        }
      }
    },
    "GuichetDto": {
      "type": "object",
      "properties": {
        "numeroGuichet": {
          "type": "string"
        },
        "libelleGuichet": {
          "type": "string"
        },
        "adresse": {
          "$ref": "#/$defs/AdresseGuichet"
        }
      }
    },
    "NatureCompteDto": {
      "type": "object",
      "properties": {
        "codeNature": {
          "type": "integer",
          "format": "int32"
        },
        "libelleNature": {
          "type": "string"
        }
      }
    },
    "ReponseErreur": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        },
        "horodatage": {
          "type": "string"
        }
      }
    },
    "ReponseListeComptes": {
      "type": "object",
      "properties": {
        "caracteristiquesDemande": {
          "$ref": "#/$defs/DemandeRestit"
        },
        "referenceDemande": {
          "type": "string"
        },
        "nombreReponses": {
          "type": "string"
        },
        "messageInformatif": {
          "$ref": "#/$defs/ReponseErreur"
        },
        "comptes": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CompteStructure"
          }
        },
        "verificationCompte": {
          "$ref": "#/$defs/ReponseVerifCompte"
        }
      }
    },
    "ReponseVerifCompte": {
      "type": "object",
      "properties": {
        "ibanExistant": {
          "type": "string"
        },
        "dateCloture": {
          "type": "string"
        }
      }
    },
    "TitulaireCompte": {
      "type": "object"
    },
    "TypeCompte": {
      "type": "object",
      "properties": {
        "codeType": {
          "type": "integer",
          "format": "int32"
        },
        "libelleType": {
          "type": "string"
        }
      }
    }
  }
}