Passer au contenu

📋 Create multiple mandates

Requête

Create multiple mandates in a single batch operation.

This endpoint allows creating multiple mandates for a client at once, which is useful when onboarding clients with multiple entities or when importing existing mandate data.

All mandates in the batch will use the same client_id from the header. If any mandate fails to create, the entire batch will be rolled back.

Sécurité
APIKeyHeader
En-têtes
X-PDP-Client-Idstring(X-Pdp-Client-Id)obligatoire

ID of the PDP Client for which the operation is performed

Examples:
Sandbox client
client_abc123
Corpsapplication/jsonobligatoire
mandatesArray of objects, [ 1 .. 50 ] items(Mandates)obligatoire

List of mandates to create

curl -i -X POST \
  https://pdp.seqino.dev/api/mandates/batch \
  -H 'Authorization: YOUR_API_KEY_HERE' \
  -H 'Content-Type: application/json' \
  -H 'X-PDP-Client-Id: client_abc123' \
  -d '{
    "mandates": [
      {
        "start_date": "2024-01-15T00:00:00Z",
        "end_date": "2024-12-31T23:59:59Z",
        "directory_entry": {
          "siren": "123456789",
          "name": "string",
          "suffix": "Administration",
          "siret": "12345678901234",
          "routing_identifier": "GLN_987654321",
          "routing_identifier_type": "0224",
          "routing_code_label": "string",
          "establishment_nature": "Private",
          "legal_commitment_management": true,
          "administrative_status": "A",
          "addressable": true,
          "address": {
            "address_line_1": "16 BIS RUE HENRI BARBUSSE",
            "address_line_2": "CEDEX 1",
            "address_line_3": "Bâtiment le Callipso",
            "postal_code": "38100",
            "subdivision": "Bretagne",
            "city": "Grenoble",
            "country_code": "FR"
          }
        },
        "file_attachment": "string",
        "vat_regime": "real_normal_monthly"
      }
    ]
  }'

Réponses

Mandates created successfully

Corpsapplication/json
mandatesArray of objects(Mandates)obligatoire

Created mandates

messagestring(Message)obligatoire

Success message

created_countinteger(Created Count)obligatoire

Number of mandates created

Response
{ "mandates": [ {} ], "message": "string", "created_count": 0 }