**Versions de l’API** · **V2 (Latest)** · [V1](/integrations/v1/docs?lang=fr)

# SEPA batches

OpenAPI 3.0.3 · API 2.0.0

```json
[
  {
    "url": "https://api.unisoft.world/integrations/v2",
    "description": "API"
  }
]
```

## Opérations

## GET /sepa/collections

Lister les états persistés des prélèvements et rejets SEPA

`list_sepa_collections`

Les scopes financiers sont attribués explicitement et vérifiés séparément ; les clés limitées à des collectes sont refusées. L’organisation, l’association, l’activation SEPA et les objets liés sont réadmis actuellement avec des identités scalaires. Les montants sont en unités MINEURES EUR (5000 = 50 EUR), sans conversion ni zéro inventé. Les inconnues restent null/UNKNOWN. Les réponses JSON excluent IBAN, comptes bancaires, RUM, identité du payeur/donateur, signature, document, réglages, jeton, secret réutilisable, XML et erreur privée. Les GET lisent uniquement les données persistées, sans génération, récupération native mutante, initialisation, index, fournisseur, daemon, notification ni paiement. Arguments inconnus et corps GET non vides sont refusés. L’authentification partagée peut enregistrer l’usage de la clé. Exige sepa:read, abonnements:read et paiements:read. Les états transitoires PREPARING/VALIDATING sont observés sans appeler getBatch natif, dont la récupération peut écrire.

### Authentification

```json
[
  {
    "bearerAuth": []
  },
  {
    "apiKeyHeader": []
  }
]
```

### Permissions requises

```json
{
  "accepted": "sepa:read",
  "additional": [
    "abonnements:read",
    "paiements:read"
  ]
}
```

### Paramètres

```json
{
  "name": "assoc",
  "in": "query",
  "required": true,
  "description": "Association actuelle MAIN ou UUID.",
  "schema": {
    "type": "string",
    "minLength": 1,
    "maxLength": 128
  }
}
```

```json
{
  "name": "limit",
  "in": "query",
  "schema": {
    "type": "integer",
    "minimum": 1,
    "maximum": 200
  }
}
```

```json
{
  "name": "after",
  "in": "query",
  "schema": {
    "type": "string",
    "minLength": 1,
    "maxLength": 128
  }
}
```

```json
{
  "name": "subscriptionId",
  "in": "query",
  "schema": {
    "type": "string",
    "format": "uuid"
  }
}
```

### Réponses

#### HTTP 200

```json
{
  "description": "Observations persistées qualifiées, prévisualisation native ou preuve de commande.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/SepaCollectionList"
      }
    }
  }
}
```

#### HTTP 400

```json
{
  "description": "Demande invalide : identifiant/UUID, commande, révision/hash, sélection, date, ordinal, motif, pagination, champ/query inconnu ou corps GET non vide.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/SepaBatchError"
      }
    }
  }
}
```

#### HTTP 401

```json
{
  "description": "Authentification absente ou invalide.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/SepaBatchError"
      }
    }
  }
}
```

#### HTTP 403

```json
{
  "description": "Scope financier indépendant absent, clé limitée aux collectes, organisation désactivée ou acteur API indisponible.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/SepaBatchError"
      }
    }
  }
}
```

#### HTTP 404

```json
{
  "description": "Ressource ou preuve explicite d’export absente pour le principal, l’organisation et l’association actuels.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/SepaBatchError"
      }
    }
  }
}
```

#### HTTP 409

```json
{
  "description": "Propriété/historique ambigu ; précondition native refusée ; échéancier, aperçu, XML, paiement, mandat, notification ou configuration modifiés ; fence/verrou ; commande réutilisée ou preuve incertaine. Conserver l’ID initial, sans nouvel ID ni réessai automatique.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/SepaBatchError"
      }
    }
  }
}
```

#### HTTP 500

```json
{
  "description": "Erreur interne sans XML, donnée bancaire/personnelle ni diagnostic privé.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/SepaBatchError"
      }
    }
  }
}
```

#### HTTP 503

```json
{
  "description": "Index natifs existants ou chiffrement indisponibles ; aucune migration automatique.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/SepaBatchError"
      }
    }
  }
}
```

### OpenAPI

```json
{
  "x-unisoft-mcp-output-schema": true,
  "x-unisoft-scope": "sepa:read",
  "x-unisoft-additional-scopes": [
    "abonnements:read",
    "paiements:read"
  ],
  "x-unisoft-mcp": {
    "category": "read",
    "readOnly": true,
    "destructive": false,
    "idempotent": true,
    "warn": false
  }
}
```

## POST /sepa/batches/preview

Prévisualiser une sélection explicite sans réserver de lot

`preview_sepa_batch`

Les scopes financiers sont attribués explicitement et vérifiés séparément ; les clés limitées à des collectes sont refusées. L’organisation, l’association, l’activation SEPA et les objets liés sont réadmis actuellement avec des identités scalaires. Les montants sont en unités MINEURES EUR (5000 = 50 EUR), sans conversion ni zéro inventé. Les inconnues restent null/UNKNOWN. Les réponses JSON excluent IBAN, comptes bancaires, RUM, identité du payeur/donateur, signature, document, réglages, jeton, secret réutilisable, XML et erreur privée. Les GET lisent uniquement les données persistées, sans génération, récupération native mutante, initialisation, index, fournisseur, daemon, notification ni paiement. Arguments inconnus et corps GET non vides sont refusés. L’authentification partagée peut enregistrer l’usage de la clé. Exige sepa:read, abonnements:read et paiements:read. POST de lecture seule délégué à previewBatch : renvoie éligibilité, codes sûrs, IDs éligibles et previewHash natif nécessaire à la génération. Aucun lot réservé, aucune échéance modifiée ni XML créé.

### Authentification

```json
[
  {
    "bearerAuth": []
  },
  {
    "apiKeyHeader": []
  }
]
```

### Permissions requises

```json
{
  "accepted": "sepa:read",
  "additional": [
    "abonnements:read",
    "paiements:read"
  ]
}
```

### Corps de la requête

```json
{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "properties": {
          "assoc": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "collectionIds": {
            "type": "array",
            "minItems": 1,
            "maxItems": 1000,
            "uniqueItems": true,
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            }
          }
        },
        "required": [
          "assoc",
          "collectionIds"
        ],
        "additionalProperties": false
      }
    }
  }
}
```

### Réponses

#### HTTP 200

```json
{
  "description": "Observations persistées qualifiées, prévisualisation native ou preuve de commande.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/SepaBatchPreview"
      }
    }
  }
}
```

#### HTTP 400

```json
{
  "description": "Demande invalide : identifiant/UUID, commande, révision/hash, sélection, date, ordinal, motif, pagination, champ/query inconnu ou corps GET non vide.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/SepaBatchError"
      }
    }
  }
}
```

#### HTTP 401

```json
{
  "description": "Authentification absente ou invalide.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/SepaBatchError"
      }
    }
  }
}
```

#### HTTP 403

```json
{
  "description": "Scope financier indépendant absent, clé limitée aux collectes, organisation désactivée ou acteur API indisponible.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/SepaBatchError"
      }
    }
  }
}
```

#### HTTP 404

```json
{
  "description": "Ressource ou preuve explicite d’export absente pour le principal, l’organisation et l’association actuels.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/SepaBatchError"
      }
    }
  }
}
```

#### HTTP 409

```json
{
  "description": "Propriété/historique ambigu ; précondition native refusée ; échéancier, aperçu, XML, paiement, mandat, notification ou configuration modifiés ; fence/verrou ; commande réutilisée ou preuve incertaine. Conserver l’ID initial, sans nouvel ID ni réessai automatique.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/SepaBatchError"
      }
    }
  }
}
```

#### HTTP 500

```json
{
  "description": "Erreur interne sans XML, donnée bancaire/personnelle ni diagnostic privé.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/SepaBatchError"
      }
    }
  }
}
```

#### HTTP 503

```json
{
  "description": "Index natifs existants ou chiffrement indisponibles ; aucune migration automatique.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/SepaBatchError"
      }
    }
  }
}
```

### OpenAPI

```json
{
  "x-unisoft-mcp-output-schema": true,
  "x-unisoft-scope": "sepa:read",
  "x-unisoft-additional-scopes": [
    "abonnements:read",
    "paiements:read"
  ],
  "x-unisoft-mcp": {
    "category": "read",
    "readOnly": true,
    "destructive": false,
    "idempotent": true,
    "warn": false
  }
}
```

## POST /sepa/batches

Générer explicitement un lot XML SEPA natif

`generate_sepa_batch`

Les scopes financiers sont attribués explicitement et vérifiés séparément ; les clés limitées à des collectes sont refusées. L’organisation, l’association, l’activation SEPA et les objets liés sont réadmis actuellement avec des identités scalaires. Les montants sont en unités MINEURES EUR (5000 = 50 EUR), sans conversion ni zéro inventé. Les inconnues restent null/UNKNOWN. Les réponses JSON excluent IBAN, comptes bancaires, RUM, identité du payeur/donateur, signature, document, réglages, jeton, secret réutilisable, XML et erreur privée. Les GET lisent uniquement les données persistées, sans génération, récupération native mutante, initialisation, index, fournisseur, daemon, notification ni paiement. Arguments inconnus et corps GET non vides sont refusés. L’authentification partagée peut enregistrer l’usage de la clé. La commande exige un commandId UUID généré par le client, propre à l’organisation et au principal API, et les préconditions actuelles de l’opération. Le vrai propriétaire natif et son commandBus restent utilisés ; l’acteur APIKEY_<id de clé> est visible, SYSTEM est uniquement sa classification d’audit et n’accorde aucun droit. Aucun ADMIN n’est fabriqué. Les index natifs existants sont vérifiés sans migration. Le fence commun de chaque abonnement est acquis avant l’entrée du propriétaire ; il est supprimé uniquement après achèvement natif acquitté et finalisation acquittée du journal. Une incertitude le conserve, sans TTL, vol ni nettoyage en GET. Les claims exigent acknowledged:true et insertedId exact ; les écritures natives et finales forcent majority+j:true et un acquittement positif du pilote. Acquittement perdu, absent ou false : SEPA_COMMAND_UNCERTAIN. Une lecture ultérieure peut résoudre une preuve native DONE sans nouvel effet. Rejeu identique : lecture du reçu seulement ; contenu différent : refus. Conserver l’ID initial, sans nouvel ID automatique, réessai financier ni reprise native implicite. Exige sepa:batches:write, sepa:read, abonnements:read, paiements:read, abonnements:write et paiements:write. POST délégué à generateBatch avec collectionIds exacts et previewHash natif. Éligibilité, dates, prénotifications, mandat/document/compte/configuration, plafonds et CAS natifs sont conservés. Snapshot et XML sont stockés chiffrés, les lignes deviennent EXPORTED ; seul un reçu de métadonnées est renvoyé. Aucun téléchargement, téléversement bancaire, règlement, rapprochement, notification ou nouvelle échéance.

### Authentification

```json
[
  {
    "bearerAuth": []
  },
  {
    "apiKeyHeader": []
  }
]
```

### Permissions requises

```json
{
  "accepted": "sepa:batches:write",
  "additional": [
    "sepa:read",
    "abonnements:read",
    "paiements:read",
    "abonnements:write",
    "paiements:write"
  ]
}
```

### Corps de la requête

```json
{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "properties": {
          "assoc": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "collectionIds": {
            "type": "array",
            "minItems": 1,
            "maxItems": 1000,
            "uniqueItems": true,
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            }
          },
          "previewHash": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "commandId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "assoc",
          "collectionIds",
          "previewHash",
          "commandId"
        ],
        "additionalProperties": false
      }
    }
  }
}
```

### Réponses

#### HTTP 200

```json
{
  "description": "Observations persistées qualifiées, prévisualisation native ou preuve de commande.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/SepaBatchCommand"
      }
    }
  }
}
```

#### HTTP 400

```json
{
  "description": "Demande invalide : identifiant/UUID, commande, révision/hash, sélection, date, ordinal, motif, pagination, champ/query inconnu ou corps GET non vide.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/SepaBatchError"
      }
    }
  }
}
```

#### HTTP 401

```json
{
  "description": "Authentification absente ou invalide.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/SepaBatchError"
      }
    }
  }
}
```

#### HTTP 403

```json
{
  "description": "Scope financier indépendant absent, clé limitée aux collectes, organisation désactivée ou acteur API indisponible.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/SepaBatchError"
      }
    }
  }
}
```

#### HTTP 404

```json
{
  "description": "Ressource ou preuve explicite d’export absente pour le principal, l’organisation et l’association actuels.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/SepaBatchError"
      }
    }
  }
}
```

#### HTTP 409

```json
{
  "description": "Propriété/historique ambigu ; précondition native refusée ; échéancier, aperçu, XML, paiement, mandat, notification ou configuration modifiés ; fence/verrou ; commande réutilisée ou preuve incertaine. Conserver l’ID initial, sans nouvel ID ni réessai automatique.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/SepaBatchError"
      }
    }
  }
}
```

#### HTTP 500

```json
{
  "description": "Erreur interne sans XML, donnée bancaire/personnelle ni diagnostic privé.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/SepaBatchError"
      }
    }
  }
}
```

#### HTTP 503

```json
{
  "description": "Index natifs existants ou chiffrement indisponibles ; aucune migration automatique.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/SepaBatchError"
      }
    }
  }
}
```

### OpenAPI

```json
{
  "x-unisoft-mcp-output-schema": true,
  "x-unisoft-scope": "sepa:batches:write",
  "x-unisoft-additional-scopes": [
    "sepa:read",
    "abonnements:read",
    "paiements:read",
    "abonnements:write",
    "paiements:write"
  ],
  "x-unisoft-mcp": {
    "category": "write",
    "readOnly": false,
    "destructive": true,
    "idempotent": true,
    "warn": true
  }
}
```

## GET /sepa/batches/{id}

Lire les métadonnées persistées d’un lot sans récupération mutante

`get_sepa_batch`

Les scopes financiers sont attribués explicitement et vérifiés séparément ; les clés limitées à des collectes sont refusées. L’organisation, l’association, l’activation SEPA et les objets liés sont réadmis actuellement avec des identités scalaires. Les montants sont en unités MINEURES EUR (5000 = 50 EUR), sans conversion ni zéro inventé. Les inconnues restent null/UNKNOWN. Les réponses JSON excluent IBAN, comptes bancaires, RUM, identité du payeur/donateur, signature, document, réglages, jeton, secret réutilisable, XML et erreur privée. Les GET lisent uniquement les données persistées, sans génération, récupération native mutante, initialisation, index, fournisseur, daemon, notification ni paiement. Arguments inconnus et corps GET non vides sont refusés. L’authentification partagée peut enregistrer l’usage de la clé. Exige sepa:read, abonnements:read et paiements:read. Les états transitoires PREPARING/VALIDATING sont observés sans appeler getBatch natif, dont la récupération peut écrire.

### Authentification

```json
[
  {
    "bearerAuth": []
  },
  {
    "apiKeyHeader": []
  }
]
```

### Permissions requises

```json
{
  "accepted": "sepa:read",
  "additional": [
    "abonnements:read",
    "paiements:read"
  ]
}
```

### Paramètres

```json
{
  "name": "id",
  "in": "path",
  "required": true,
  "description": "ID opaque du lot natif issu de la génération, distinct d’un ID de paiement ou de mandat.",
  "schema": {
    "type": "string",
    "minLength": 1,
    "maxLength": 128
  }
}
```

```json
{
  "name": "assoc",
  "in": "query",
  "required": true,
  "description": "Association actuelle MAIN ou UUID.",
  "schema": {
    "type": "string",
    "minLength": 1,
    "maxLength": 128
  }
}
```

### Réponses

#### HTTP 200

```json
{
  "description": "Observations persistées qualifiées, prévisualisation native ou preuve de commande.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/SepaBatchResponse"
      }
    }
  }
}
```

#### HTTP 400

```json
{
  "description": "Demande invalide : identifiant/UUID, commande, révision/hash, sélection, date, ordinal, motif, pagination, champ/query inconnu ou corps GET non vide.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/SepaBatchError"
      }
    }
  }
}
```

#### HTTP 401

```json
{
  "description": "Authentification absente ou invalide.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/SepaBatchError"
      }
    }
  }
}
```

#### HTTP 403

```json
{
  "description": "Scope financier indépendant absent, clé limitée aux collectes, organisation désactivée ou acteur API indisponible.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/SepaBatchError"
      }
    }
  }
}
```

#### HTTP 404

```json
{
  "description": "Ressource ou preuve explicite d’export absente pour le principal, l’organisation et l’association actuels.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/SepaBatchError"
      }
    }
  }
}
```

#### HTTP 409

```json
{
  "description": "Propriété/historique ambigu ; précondition native refusée ; échéancier, aperçu, XML, paiement, mandat, notification ou configuration modifiés ; fence/verrou ; commande réutilisée ou preuve incertaine. Conserver l’ID initial, sans nouvel ID ni réessai automatique.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/SepaBatchError"
      }
    }
  }
}
```

#### HTTP 500

```json
{
  "description": "Erreur interne sans XML, donnée bancaire/personnelle ni diagnostic privé.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/SepaBatchError"
      }
    }
  }
}
```

#### HTTP 503

```json
{
  "description": "Index natifs existants ou chiffrement indisponibles ; aucune migration automatique.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/SepaBatchError"
      }
    }
  }
}
```

### OpenAPI

```json
{
  "x-unisoft-mcp-output-schema": true,
  "x-unisoft-scope": "sepa:read",
  "x-unisoft-additional-scopes": [
    "abonnements:read",
    "paiements:read"
  ],
  "x-unisoft-mcp": {
    "category": "read",
    "readOnly": true,
    "destructive": false,
    "idempotent": true,
    "warn": false
  }
}
```

## GET /sepa/batches/{id}/returns

Lire les retours SEPA enregistrés et leurs codes de rejet

`list_sepa_batch_returns`

Les scopes financiers sont attribués explicitement et vérifiés séparément ; les clés limitées à des collectes sont refusées. L’organisation, l’association, l’activation SEPA et les objets liés sont réadmis actuellement avec des identités scalaires. Les montants sont en unités MINEURES EUR (5000 = 50 EUR), sans conversion ni zéro inventé. Les inconnues restent null/UNKNOWN. Les réponses JSON excluent IBAN, comptes bancaires, RUM, identité du payeur/donateur, signature, document, réglages, jeton, secret réutilisable, XML et erreur privée. Les GET lisent uniquement les données persistées, sans génération, récupération native mutante, initialisation, index, fournisseur, daemon, notification ni paiement. Arguments inconnus et corps GET non vides sont refusés. L’authentification partagée peut enregistrer l’usage de la clé. Exige sepa:read, abonnements:read et paiements:read. Au plus 200 retours déjà enregistrés. Références, message, affectation et plans de mutation financière sont omis. Aucun import bancaire, enregistrement de retour, résolution d’ambiguïté, réessai ou confirmation de règlement.

### Authentification

```json
[
  {
    "bearerAuth": []
  },
  {
    "apiKeyHeader": []
  }
]
```

### Permissions requises

```json
{
  "accepted": "sepa:read",
  "additional": [
    "abonnements:read",
    "paiements:read"
  ]
}
```

### Paramètres

```json
{
  "name": "id",
  "in": "path",
  "required": true,
  "description": "ID opaque du lot natif issu de la génération, distinct d’un ID de paiement ou de mandat.",
  "schema": {
    "type": "string",
    "minLength": 1,
    "maxLength": 128
  }
}
```

```json
{
  "name": "assoc",
  "in": "query",
  "required": true,
  "description": "Association actuelle MAIN ou UUID.",
  "schema": {
    "type": "string",
    "minLength": 1,
    "maxLength": 128
  }
}
```

### Réponses

#### HTTP 200

```json
{
  "description": "Observations persistées qualifiées, prévisualisation native ou preuve de commande.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/SepaBatchReturns"
      }
    }
  }
}
```

#### HTTP 400

```json
{
  "description": "Demande invalide : identifiant/UUID, commande, révision/hash, sélection, date, ordinal, motif, pagination, champ/query inconnu ou corps GET non vide.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/SepaBatchError"
      }
    }
  }
}
```

#### HTTP 401

```json
{
  "description": "Authentification absente ou invalide.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/SepaBatchError"
      }
    }
  }
}
```

#### HTTP 403

```json
{
  "description": "Scope financier indépendant absent, clé limitée aux collectes, organisation désactivée ou acteur API indisponible.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/SepaBatchError"
      }
    }
  }
}
```

#### HTTP 404

```json
{
  "description": "Ressource ou preuve explicite d’export absente pour le principal, l’organisation et l’association actuels.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/SepaBatchError"
      }
    }
  }
}
```

#### HTTP 409

```json
{
  "description": "Propriété/historique ambigu ; précondition native refusée ; échéancier, aperçu, XML, paiement, mandat, notification ou configuration modifiés ; fence/verrou ; commande réutilisée ou preuve incertaine. Conserver l’ID initial, sans nouvel ID ni réessai automatique.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/SepaBatchError"
      }
    }
  }
}
```

#### HTTP 500

```json
{
  "description": "Erreur interne sans XML, donnée bancaire/personnelle ni diagnostic privé.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/SepaBatchError"
      }
    }
  }
}
```

#### HTTP 503

```json
{
  "description": "Index natifs existants ou chiffrement indisponibles ; aucune migration automatique.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/SepaBatchError"
      }
    }
  }
}
```

### OpenAPI

```json
{
  "x-unisoft-mcp-output-schema": true,
  "x-unisoft-scope": "sepa:read",
  "x-unisoft-additional-scopes": [
    "abonnements:read",
    "paiements:read"
  ],
  "x-unisoft-mcp": {
    "category": "read",
    "readOnly": true,
    "destructive": false,
    "idempotent": true,
    "warn": false
  }
}
```

## POST /sepa/batches/{id}/export

Enregistrer un export XML explicite et sa remise native

`export_sepa_batch`

Les scopes financiers sont attribués explicitement et vérifiés séparément ; les clés limitées à des collectes sont refusées. L’organisation, l’association, l’activation SEPA et les objets liés sont réadmis actuellement avec des identités scalaires. Les montants sont en unités MINEURES EUR (5000 = 50 EUR), sans conversion ni zéro inventé. Les inconnues restent null/UNKNOWN. Les réponses JSON excluent IBAN, comptes bancaires, RUM, identité du payeur/donateur, signature, document, réglages, jeton, secret réutilisable, XML et erreur privée. Les GET lisent uniquement les données persistées, sans génération, récupération native mutante, initialisation, index, fournisseur, daemon, notification ni paiement. Arguments inconnus et corps GET non vides sont refusés. L’authentification partagée peut enregistrer l’usage de la clé. L’export exige en plus sepa:export. Le POST appelle réellement downloadBatch : vérification/déchiffrement du XML existant, journalisation native du téléchargement et de la remise, lignes EXPORTED vers SUBMITTED, paiements SEPA_PENDING vers PRELEVEMENT-SUBMITED et mise à jour lastUsedAt du mandat. Aucun téléversement bancaire, acceptation ni règlement n’est prouvé (NOT_REPORTED). Le XML est écarté avant le journal de commande ; seul un reçu sûr et son digest sont conservés. Le GET fichier exige ensuite le même principal, le commandId d’export et le sha256 exact : il déchiffre seulement l’artefact existant, vérifie SHA256 et renvoie une pièce jointe application/xml sans générer, remettre, recompter ou stocker le texte clair. Ce fichier contient IBAN et données personnelles : export uniquement sur demande explicite, sans journalisation ni répétition du contenu. Utiliser download_exported_sepa_batch via le MCP pour récupérer le fichier XML privé déjà exporté. Exige les mêmes sept scopes d’export. GET de fichier privé déjà autorisé, sans nouvel effet.

### Authentification

```json
[
  {
    "bearerAuth": []
  },
  {
    "apiKeyHeader": []
  }
]
```

### Permissions requises

```json
{
  "accepted": "sepa:export",
  "additional": [
    "sepa:batches:write",
    "sepa:read",
    "abonnements:read",
    "paiements:read",
    "abonnements:write",
    "paiements:write"
  ]
}
```

### Paramètres

```json
{
  "name": "id",
  "in": "path",
  "required": true,
  "description": "ID opaque du lot natif issu de la génération, distinct d’un ID de paiement ou de mandat.",
  "schema": {
    "type": "string",
    "minLength": 1,
    "maxLength": 128
  }
}
```

### Corps de la requête

```json
{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "properties": {
          "assoc": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "sha256": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "expectedRevision": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "commandId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "assoc",
          "sha256",
          "expectedRevision",
          "commandId"
        ],
        "additionalProperties": false
      }
    }
  }
}
```

### Réponses

#### HTTP 200

```json
{
  "description": "Observations persistées qualifiées, prévisualisation native ou preuve de commande.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/SepaBatchCommand"
      }
    }
  }
}
```

#### HTTP 400

```json
{
  "description": "Demande invalide : identifiant/UUID, commande, révision/hash, sélection, date, ordinal, motif, pagination, champ/query inconnu ou corps GET non vide.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/SepaBatchError"
      }
    }
  }
}
```

#### HTTP 401

```json
{
  "description": "Authentification absente ou invalide.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/SepaBatchError"
      }
    }
  }
}
```

#### HTTP 403

```json
{
  "description": "Scope financier indépendant absent, clé limitée aux collectes, organisation désactivée ou acteur API indisponible.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/SepaBatchError"
      }
    }
  }
}
```

#### HTTP 404

```json
{
  "description": "Ressource ou preuve explicite d’export absente pour le principal, l’organisation et l’association actuels.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/SepaBatchError"
      }
    }
  }
}
```

#### HTTP 409

```json
{
  "description": "Propriété/historique ambigu ; précondition native refusée ; échéancier, aperçu, XML, paiement, mandat, notification ou configuration modifiés ; fence/verrou ; commande réutilisée ou preuve incertaine. Conserver l’ID initial, sans nouvel ID ni réessai automatique.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/SepaBatchError"
      }
    }
  }
}
```

#### HTTP 500

```json
{
  "description": "Erreur interne sans XML, donnée bancaire/personnelle ni diagnostic privé.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/SepaBatchError"
      }
    }
  }
}
```

#### HTTP 503

```json
{
  "description": "Index natifs existants ou chiffrement indisponibles ; aucune migration automatique.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/SepaBatchError"
      }
    }
  }
}
```

### OpenAPI

```json
{
  "x-unisoft-mcp-output-schema": true,
  "x-unisoft-scope": "sepa:export",
  "x-unisoft-additional-scopes": [
    "sepa:batches:write",
    "sepa:read",
    "abonnements:read",
    "paiements:read",
    "abonnements:write",
    "paiements:write"
  ],
  "x-unisoft-mcp": {
    "category": "write",
    "readOnly": false,
    "destructive": true,
    "idempotent": true,
    "warn": true
  }
}
```

## GET /sepa/batch-commands/{commandId}

Lire un reçu de génération de lot SEPA sans la rejouer

`get_sepa_batch_command`

Les scopes financiers sont attribués explicitement et vérifiés séparément ; les clés limitées à des collectes sont refusées. L’organisation, l’association, l’activation SEPA et les objets liés sont réadmis actuellement avec des identités scalaires. Les montants sont en unités MINEURES EUR (5000 = 50 EUR), sans conversion ni zéro inventé. Les inconnues restent null/UNKNOWN. Les réponses JSON excluent IBAN, comptes bancaires, RUM, identité du payeur/donateur, signature, document, réglages, jeton, secret réutilisable, XML et erreur privée. Les GET lisent uniquement les données persistées, sans génération, récupération native mutante, initialisation, index, fournisseur, daemon, notification ni paiement. Arguments inconnus et corps GET non vides sont refusés. L’authentification partagée peut enregistrer l’usage de la clé. Exige les six scopes de génération, sans sepa:export. Lecture seule de la preuve native DONE et du lot actuellement autorisé, sans génération, export, verrou ou effet répété. Le reçu initial ne remplace pas l’état actuel du lot.

### Authentification

```json
[
  {
    "bearerAuth": []
  },
  {
    "apiKeyHeader": []
  }
]
```

### Permissions requises

```json
{
  "accepted": "sepa:batches:write",
  "additional": [
    "sepa:read",
    "abonnements:read",
    "paiements:read",
    "abonnements:write",
    "paiements:write"
  ]
}
```

### Paramètres

```json
{
  "name": "commandId",
  "in": "path",
  "required": true,
  "schema": {
    "type": "string",
    "format": "uuid"
  }
}
```

### Réponses

#### HTTP 200

```json
{
  "description": "Observations persistées qualifiées, prévisualisation native ou preuve de commande.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/SepaBatchCommand"
      }
    }
  }
}
```

#### HTTP 400

```json
{
  "description": "Demande invalide : identifiant/UUID, commande, révision/hash, sélection, date, ordinal, motif, pagination, champ/query inconnu ou corps GET non vide.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/SepaBatchError"
      }
    }
  }
}
```

#### HTTP 401

```json
{
  "description": "Authentification absente ou invalide.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/SepaBatchError"
      }
    }
  }
}
```

#### HTTP 403

```json
{
  "description": "Scope financier indépendant absent, clé limitée aux collectes, organisation désactivée ou acteur API indisponible.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/SepaBatchError"
      }
    }
  }
}
```

#### HTTP 404

```json
{
  "description": "Ressource ou preuve explicite d’export absente pour le principal, l’organisation et l’association actuels.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/SepaBatchError"
      }
    }
  }
}
```

#### HTTP 409

```json
{
  "description": "Propriété/historique ambigu ; précondition native refusée ; échéancier, aperçu, XML, paiement, mandat, notification ou configuration modifiés ; fence/verrou ; commande réutilisée ou preuve incertaine. Conserver l’ID initial, sans nouvel ID ni réessai automatique.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/SepaBatchError"
      }
    }
  }
}
```

#### HTTP 500

```json
{
  "description": "Erreur interne sans XML, donnée bancaire/personnelle ni diagnostic privé.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/SepaBatchError"
      }
    }
  }
}
```

#### HTTP 503

```json
{
  "description": "Index natifs existants ou chiffrement indisponibles ; aucune migration automatique.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/SepaBatchError"
      }
    }
  }
}
```

### OpenAPI

```json
{
  "x-unisoft-mcp-output-schema": true,
  "x-unisoft-scope": "sepa:batches:write",
  "x-unisoft-additional-scopes": [
    "sepa:read",
    "abonnements:read",
    "paiements:read",
    "abonnements:write",
    "paiements:write"
  ],
  "x-unisoft-mcp": {
    "category": "read",
    "readOnly": true,
    "destructive": false,
    "idempotent": true,
    "warn": false
  }
}
```

## GET /sepa/export-commands/{commandId}

Lire un reçu d’export SEPA sans exporter à nouveau

`get_sepa_export_command`

Les scopes financiers sont attribués explicitement et vérifiés séparément ; les clés limitées à des collectes sont refusées. L’organisation, l’association, l’activation SEPA et les objets liés sont réadmis actuellement avec des identités scalaires. Les montants sont en unités MINEURES EUR (5000 = 50 EUR), sans conversion ni zéro inventé. Les inconnues restent null/UNKNOWN. Les réponses JSON excluent IBAN, comptes bancaires, RUM, identité du payeur/donateur, signature, document, réglages, jeton, secret réutilisable, XML et erreur privée. Les GET lisent uniquement les données persistées, sans génération, récupération native mutante, initialisation, index, fournisseur, daemon, notification ni paiement. Arguments inconnus et corps GET non vides sont refusés. L’authentification partagée peut enregistrer l’usage de la clé. Exige les sept scopes d’export. Lecture seule de la preuve native DONE du principal et du lot actuel ; aucune répétition, génération, export ou nettoyage de verrou. Pour le parcours d’export distinct, l’accès REST au fichier existant exige le même principal, le commandId d’export et le sha256 exact ; cette lecture vérifie SHA256. La présente lecture de reçu ne génère, n’exporte et ne télécharge aucun fichier.

### Authentification

```json
[
  {
    "bearerAuth": []
  },
  {
    "apiKeyHeader": []
  }
]
```

### Permissions requises

```json
{
  "accepted": "sepa:export",
  "additional": [
    "sepa:batches:write",
    "sepa:read",
    "abonnements:read",
    "paiements:read",
    "abonnements:write",
    "paiements:write"
  ]
}
```

### Paramètres

```json
{
  "name": "commandId",
  "in": "path",
  "required": true,
  "schema": {
    "type": "string",
    "format": "uuid"
  }
}
```

### Réponses

#### HTTP 200

```json
{
  "description": "Observations persistées qualifiées, prévisualisation native ou preuve de commande.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/SepaBatchCommand"
      }
    }
  }
}
```

#### HTTP 400

```json
{
  "description": "Demande invalide : identifiant/UUID, commande, révision/hash, sélection, date, ordinal, motif, pagination, champ/query inconnu ou corps GET non vide.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/SepaBatchError"
      }
    }
  }
}
```

#### HTTP 401

```json
{
  "description": "Authentification absente ou invalide.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/SepaBatchError"
      }
    }
  }
}
```

#### HTTP 403

```json
{
  "description": "Scope financier indépendant absent, clé limitée aux collectes, organisation désactivée ou acteur API indisponible.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/SepaBatchError"
      }
    }
  }
}
```

#### HTTP 404

```json
{
  "description": "Ressource ou preuve explicite d’export absente pour le principal, l’organisation et l’association actuels.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/SepaBatchError"
      }
    }
  }
}
```

#### HTTP 409

```json
{
  "description": "Propriété/historique ambigu ; précondition native refusée ; échéancier, aperçu, XML, paiement, mandat, notification ou configuration modifiés ; fence/verrou ; commande réutilisée ou preuve incertaine. Conserver l’ID initial, sans nouvel ID ni réessai automatique.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/SepaBatchError"
      }
    }
  }
}
```

#### HTTP 500

```json
{
  "description": "Erreur interne sans XML, donnée bancaire/personnelle ni diagnostic privé.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/SepaBatchError"
      }
    }
  }
}
```

#### HTTP 503

```json
{
  "description": "Index natifs existants ou chiffrement indisponibles ; aucune migration automatique.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/SepaBatchError"
      }
    }
  }
}
```

### OpenAPI

```json
{
  "x-unisoft-mcp-output-schema": true,
  "x-unisoft-scope": "sepa:export",
  "x-unisoft-additional-scopes": [
    "sepa:batches:write",
    "sepa:read",
    "abonnements:read",
    "paiements:read",
    "abonnements:write",
    "paiements:write"
  ],
  "x-unisoft-mcp": {
    "category": "read",
    "readOnly": true,
    "destructive": false,
    "idempotent": true,
    "warn": false
  }
}
```

## GET /sepa/batches/{id}/file

Télécharger le XML SEPA existant explicitement exporté

`download_exported_sepa_batch`

Les scopes financiers sont attribués explicitement et vérifiés séparément ; les clés limitées à des collectes sont refusées. L’organisation, l’association, l’activation SEPA et les objets liés sont réadmis actuellement avec des identités scalaires. Les montants sont en unités MINEURES EUR (5000 = 50 EUR), sans conversion ni zéro inventé. Les inconnues restent null/UNKNOWN. Les réponses JSON excluent IBAN, comptes bancaires, RUM, identité du payeur/donateur, signature, document, réglages, jeton, secret réutilisable, XML et erreur privée. Les GET lisent uniquement les données persistées, sans génération, récupération native mutante, initialisation, index, fournisseur, daemon, notification ni paiement. Arguments inconnus et corps GET non vides sont refusés. L’authentification partagée peut enregistrer l’usage de la clé. L’export exige en plus sepa:export. Le POST appelle réellement downloadBatch : vérification/déchiffrement du XML existant, journalisation native du téléchargement et de la remise, lignes EXPORTED vers SUBMITTED, paiements SEPA_PENDING vers PRELEVEMENT-SUBMITED et mise à jour lastUsedAt du mandat. Aucun téléversement bancaire, acceptation ni règlement n’est prouvé (NOT_REPORTED). Le XML est écarté avant le journal de commande ; seul un reçu sûr et son digest sont conservés. Le GET fichier exige ensuite le même principal, le commandId d’export et le sha256 exact : il déchiffre seulement l’artefact existant, vérifie SHA256 et renvoie une pièce jointe application/xml sans générer, remettre, recompter ou stocker le texte clair. Ce fichier contient IBAN et données personnelles : export uniquement sur demande explicite, sans journalisation ni répétition du contenu. Utiliser download_exported_sepa_batch via le MCP pour récupérer le fichier XML privé déjà exporté. Exige les mêmes sept scopes d’export. GET de fichier privé déjà autorisé, sans nouvel effet.

Le MCP renvoie le fichier privé réel dans une ressource embarquée avec son type MIME et son blob base64, ainsi que filename, byteLength et le SHA-256 des octets décodés. Utiliser la capacité fichiers de l’hôte pour enregistrer ou joindre ces octets sous le nom renvoyé et vérifier leur taille et leur SHA-256. L’URI unisoft identifie uniquement cette réponse. Elle ne constitue ni une URL publique ni une référence de téléchargement réutilisable. Fournir le fichier au destinataire autorisé, sans recopier le blob dans le texte du chat, publier un document financier ou inventer une URL de partage. Le propriétaire REST authentifié recontrôle l’organisation, les permissions et toutes les sources ou preuves d’export requises à chaque appel. REST conserve sa réponse binaire. Le fichier prouve uniquement la récupération de ces octets. Il ne prouve ni règlement bancaire, ni validité juridique du document, ni remise à un destinataire.

### Authentification

```json
[
  {
    "bearerAuth": []
  },
  {
    "apiKeyHeader": []
  }
]
```

### Permissions requises

```json
{
  "accepted": "sepa:export",
  "additional": [
    "sepa:batches:write",
    "sepa:read",
    "abonnements:read",
    "paiements:read",
    "abonnements:write",
    "paiements:write"
  ]
}
```

### Paramètres

```json
{
  "name": "id",
  "in": "path",
  "required": true,
  "description": "ID opaque du lot natif issu de la génération, distinct d’un ID de paiement ou de mandat.",
  "schema": {
    "type": "string",
    "minLength": 1,
    "maxLength": 128
  }
}
```

```json
{
  "name": "assoc",
  "in": "query",
  "required": true,
  "description": "Association actuelle MAIN ou UUID.",
  "schema": {
    "type": "string",
    "minLength": 1,
    "maxLength": 128
  }
}
```

```json
{
  "name": "commandId",
  "in": "query",
  "required": true,
  "schema": {
    "type": "string",
    "format": "uuid"
  }
}
```

```json
{
  "name": "sha256",
  "in": "query",
  "required": true,
  "schema": {
    "type": "string",
    "pattern": "^[a-f0-9]{64}$"
  }
}
```

### Réponses

#### HTTP 200

```json
{
  "description": "Pièce jointe XML privée existante ; contient des données bancaires et personnelles du payeur.",
  "headers": {
    "X-Content-SHA256": {
      "schema": {
        "type": "string",
        "pattern": "^[a-f0-9]{64}$"
      }
    },
    "Content-Disposition": {
      "schema": {
        "type": "string"
      }
    }
  },
  "content": {
    "application/xml": {
      "schema": {
        "type": "string",
        "format": "binary"
      }
    }
  }
}
```

#### HTTP 400

```json
{
  "description": "Demande invalide : identifiant/UUID, commande, révision/hash, sélection, date, ordinal, motif, pagination, champ/query inconnu ou corps GET non vide.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/SepaBatchError"
      }
    }
  }
}
```

#### HTTP 401

```json
{
  "description": "Authentification absente ou invalide.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/SepaBatchError"
      }
    }
  }
}
```

#### HTTP 403

```json
{
  "description": "Scope financier indépendant absent, clé limitée aux collectes, organisation désactivée ou acteur API indisponible.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/SepaBatchError"
      }
    }
  }
}
```

#### HTTP 404

```json
{
  "description": "Ressource ou preuve explicite d’export absente pour le principal, l’organisation et l’association actuels.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/SepaBatchError"
      }
    }
  }
}
```

#### HTTP 409

```json
{
  "description": "Propriété/historique ambigu ; précondition native refusée ; échéancier, aperçu, XML, paiement, mandat, notification ou configuration modifiés ; fence/verrou ; commande réutilisée ou preuve incertaine. Conserver l’ID initial, sans nouvel ID ni réessai automatique.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/SepaBatchError"
      }
    }
  }
}
```

#### HTTP 500

```json
{
  "description": "Erreur interne sans XML, donnée bancaire/personnelle ni diagnostic privé.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/SepaBatchError"
      }
    }
  }
}
```

#### HTTP 503

```json
{
  "description": "Index natifs existants ou chiffrement indisponibles ; aucune migration automatique.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/SepaBatchError"
      }
    }
  }
}
```

### OpenAPI

```json
{
  "x-unisoft-scope": "sepa:export",
  "x-unisoft-additional-scopes": [
    "sepa:batches:write",
    "sepa:read",
    "abonnements:read",
    "paiements:read",
    "abonnements:write",
    "paiements:write"
  ],
  "x-unisoft-mcp": {
    "category": "read",
    "readOnly": true,
    "destructive": false,
    "idempotent": true,
    "warn": false
  },
  "x-unisoft-mcp-file": {
    "mimeType": "application/xml",
    "maxBytes": 26214400
  }
}
```

## Schémas

```json
{
  "components": {
    "schemas": {
      "SepaCollectionList": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "success",
          "data",
          "meta"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "id",
                "subscriptionId",
                "paymentId",
                "state",
                "amountMinor",
                "currency",
                "ordinal",
                "attempt",
                "contractualDate",
                "scheduledDate",
                "requestedDate",
                "batchId"
              ],
              "properties": {
                "id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128
                },
                "subscriptionId": {
                  "type": "string",
                  "format": "uuid"
                },
                "paymentId": {
                  "type": "string",
                  "format": "uuid"
                },
                "state": {
                  "type": "string"
                },
                "amountMinor": {
                  "type": "integer",
                  "minimum": 1
                },
                "currency": {
                  "type": "string",
                  "enum": [
                    "eur"
                  ]
                },
                "ordinal": {
                  "type": "integer",
                  "minimum": 0,
                  "nullable": true
                },
                "attempt": {
                  "type": "integer",
                  "minimum": 0,
                  "nullable": true
                },
                "contractualDate": {
                  "type": "string",
                  "format": "date",
                  "nullable": true
                },
                "scheduledDate": {
                  "type": "string",
                  "format": "date",
                  "nullable": true
                },
                "requestedDate": {
                  "type": "string",
                  "format": "date",
                  "nullable": true
                },
                "batchId": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128,
                  "nullable": true
                }
              }
            }
          },
          "meta": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "hasMore",
              "after"
            ],
            "properties": {
              "hasMore": {
                "type": "boolean"
              },
              "after": {
                "type": "string",
                "minLength": 1,
                "maxLength": 128,
                "nullable": true
              }
            }
          }
        }
      },
      "SepaBatchError": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      },
      "SepaBatchPreview": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "success",
          "data"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "data": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "previewHash",
              "eligibleIds",
              "amountMinor",
              "currency",
              "transactionCount",
              "maximum",
              "overLimit",
              "rows"
            ],
            "properties": {
              "previewHash": {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              },
              "eligibleIds": {
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128
                }
              },
              "amountMinor": {
                "type": "integer",
                "minimum": 0,
                "nullable": true
              },
              "currency": {
                "type": "string",
                "enum": [
                  "eur"
                ]
              },
              "transactionCount": {
                "type": "integer",
                "minimum": 0,
                "nullable": true
              },
              "maximum": {
                "type": "integer",
                "minimum": 0,
                "nullable": true
              },
              "overLimit": {
                "type": "boolean",
                "nullable": true
              },
              "rows": {
                "type": "array",
                "items": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "id",
                    "selectable",
                    "issues"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "selectable": {
                      "type": "boolean"
                    },
                    "issues": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "SepaBatchCommand": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "success",
          "commandId",
          "outcome",
          "replayed",
          "data"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "commandId": {
            "type": "string",
            "format": "uuid"
          },
          "outcome": {
            "type": "string",
            "enum": [
              "APPLIED"
            ]
          },
          "replayed": {
            "type": "boolean"
          },
          "data": {
            "oneOf": [
              {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "batchId",
                  "sha256",
                  "amountMinor",
                  "transactionCount",
                  "currency",
                  "state"
                ],
                "properties": {
                  "batchId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "sha256": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  },
                  "amountMinor": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "transactionCount": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "currency": {
                    "type": "string",
                    "enum": [
                      "eur"
                    ]
                  },
                  "state": {
                    "type": "string",
                    "enum": [
                      "GENERATED"
                    ]
                  }
                }
              },
              {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "batchId",
                  "sha256",
                  "exportRecorded",
                  "bankTransmission",
                  "settlement"
                ],
                "properties": {
                  "batchId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "sha256": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  },
                  "exportRecorded": {
                    "type": "boolean",
                    "enum": [
                      true
                    ]
                  },
                  "bankTransmission": {
                    "type": "string",
                    "enum": [
                      "NOT_REPORTED"
                    ]
                  },
                  "settlement": {
                    "type": "string",
                    "enum": [
                      "NOT_REPORTED"
                    ]
                  }
                }
              }
            ]
          }
        }
      },
      "SepaBatchResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "success",
          "data"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "data": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "id",
              "assoc",
              "state",
              "sha256",
              "amountMinor",
              "currency",
              "transactionCount",
              "receivedMinor",
              "settledCount",
              "createdAt",
              "downloadedAt",
              "submittedAt",
              "downloadCount",
              "transmittedDate",
              "revision"
            ],
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 128
              },
              "assoc": {
                "type": "string",
                "minLength": 1,
                "maxLength": 128
              },
              "state": {
                "type": "string"
              },
              "sha256": {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$",
                "nullable": true
              },
              "amountMinor": {
                "type": "integer",
                "minimum": 0,
                "nullable": true
              },
              "currency": {
                "type": "string",
                "enum": [
                  "eur"
                ]
              },
              "transactionCount": {
                "type": "integer",
                "minimum": 0,
                "nullable": true
              },
              "receivedMinor": {
                "type": "integer",
                "minimum": 0,
                "nullable": true
              },
              "settledCount": {
                "type": "integer",
                "minimum": 0,
                "nullable": true
              },
              "createdAt": {
                "type": "string",
                "format": "date-time",
                "nullable": true
              },
              "downloadedAt": {
                "type": "string",
                "format": "date-time",
                "nullable": true
              },
              "submittedAt": {
                "type": "string",
                "format": "date-time",
                "nullable": true
              },
              "downloadCount": {
                "type": "integer",
                "minimum": 0,
                "nullable": true
              },
              "transmittedDate": {
                "type": "string",
                "format": "date",
                "nullable": true
              },
              "revision": {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              }
            }
          }
        }
      },
      "SepaBatchReturns": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "success",
          "data"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "id",
                "type",
                "collectionIds",
                "reasonCode",
                "amountMinor",
                "currency",
                "occurredAt",
                "processingState"
              ],
              "properties": {
                "id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128
                },
                "type": {
                  "type": "string"
                },
                "collectionIds": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  }
                },
                "reasonCode": {
                  "type": "string",
                  "nullable": true
                },
                "amountMinor": {
                  "type": "integer",
                  "minimum": 0,
                  "nullable": true
                },
                "currency": {
                  "type": "string",
                  "enum": [
                    "eur"
                  ]
                },
                "occurredAt": {
                  "type": "string",
                  "format": "date-time",
                  "nullable": true
                },
                "processingState": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "API Key",
        "description": "Format : `ke_live_xxx`"
      },
      "apiKeyHeader": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key"
      }
    }
  }
}
```
