{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-@l10n/fr-FR/guides/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["code-group"]},"type":"markdown"},"seo":{"title":"Créer des clients et des mandats","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"créer-des-clients-et-des-mandats","__idx":0},"children":["Créer des clients et des mandats"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Ce guide vous accompagne dans l'enregistrement d'un client et la création de mandats couvrant les quatre types d'entrées d'annuaire supportés."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"prérequis","__idx":1},"children":["Prérequis"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Un token API valide (en-tête ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Authorization: <token>"]},")"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["URL de base : ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["https://pdp.seqino.dev/api"]}]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"étape-1--créer-un-client","__idx":2},"children":["Étape 1 : Créer un client"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Un ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["client"]}," représente une entreprise pour laquelle vous gérez la facturation. Chaque client reçoit un ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["client_id"]}," unique à transmettre via l'en-tête ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["X-PDP-Client-Id"]}," dans les appels suivants."]},{"$$mdtype":"Tag","name":"CodeGroup","attributes":{"mode":"tabs"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","data-title":"cURL","header":{"title":"cURL","controls":{"copy":{}}},"source":"curl -X POST https://pdp.seqino.dev/api/clients \\\n  -H \"Authorization: <votre-token>\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"organization_name\": \"Dupont & Fils SAS\",\n    \"contact_email\": \"facturation@dupont-fils.fr\",\n    \"external_ref\": \"CLIENT-001\"\n  }'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"python","data-title":"Python","header":{"title":"Python","controls":{"copy":{}}},"source":"import httpx\n\nclient = httpx.Client(base_url=\"https://pdp.seqino.dev/api\", headers={\"Authorization\": \"<votre-token>\"})\n\nresponse = client.post(\"/clients\", json={\n    \"organization_name\": \"Dupont & Fils SAS\",\n    \"contact_email\": \"facturation@dupont-fils.fr\",\n    \"external_ref\": \"CLIENT-001\",\n})\nresponse.raise_for_status()\nclient_id = response.json()[\"id\"]\nprint(f\"Client ID : {client_id}\")\n","lang":"python"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","data-title":"TypeScript","header":{"title":"TypeScript","controls":{"copy":{}}},"source":"const response = await fetch(\"https://pdp.seqino.dev/api/clients\", {\n  method: \"POST\",\n  headers: {\n    \"Authorization\": \"<votre-token>\",\n    \"Content-Type\": \"application/json\",\n  },\n  body: JSON.stringify({\n    organization_name: \"Dupont & Fils SAS\",\n    contact_email: \"facturation@dupont-fils.fr\",\n    external_ref: \"CLIENT-001\",\n  }),\n});\nconst { id: clientId } = await response.json();\nconsole.log(\"Client ID :\", clientId);\n","lang":"typescript"},"children":[]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["La réponse retourne l'objet client créé avec son ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["id"]},". Conservez cette valeur — elle sera utilisée comme ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["X-PDP-Client-Id"]}," pour toutes les opérations de mandat ci-dessous."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"étape-2--créer-des-mandats","__idx":3},"children":["Étape 2 : Créer des mandats"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Un ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["mandat"]}," autorise votre client à envoyer ou recevoir des factures pour le compte d'une entrée d'annuaire spécifique. La portée du mandat est déterminée par les champs identifiants renseignés."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Toutes les requêtes de mandat nécessitent l'en-tête ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["X-PDP-Client-Id"]}," avec le client ID obtenu à l'étape 1."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"mandat-siren","__idx":4},"children":["Mandat SIREN"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Couvre tous les établissements d'une entreprise. À utiliser lorsque le destinataire n'a pas spécifié de routage plus granulaire."]},{"$$mdtype":"Tag","name":"CodeGroup","attributes":{"mode":"tabs"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","data-title":"cURL","header":{"title":"cURL","controls":{"copy":{}}},"source":"curl -X POST https://pdp.seqino.dev/api/mandates \\\n  -H \"Authorization: <votre-token>\" \\\n  -H \"X-PDP-Client-Id: <client-id>\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"start_date\": \"2026-01-01T00:00:00Z\",\n    \"directory_entry\": {\n      \"siren\": \"123456789\",\n      \"name\": \"Dupont & Fils SAS\"\n    }\n  }'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"python","data-title":"Python","header":{"title":"Python","controls":{"copy":{}}},"source":"response = client.post(\"/mandates\",\n    headers={\"X-PDP-Client-Id\": client_id},\n    json={\n        \"start_date\": \"2026-01-01T00:00:00Z\",\n        \"directory_entry\": {\n            \"siren\": \"123456789\",\n            \"name\": \"Dupont & Fils SAS\",\n        },\n    },\n)\nresponse.raise_for_status()\n","lang":"python"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","data-title":"TypeScript","header":{"title":"TypeScript","controls":{"copy":{}}},"source":"await fetch(\"https://pdp.seqino.dev/api/mandates\", {\n  method: \"POST\",\n  headers: {\n    \"Authorization\": \"<votre-token>\",\n    \"X-PDP-Client-Id\": clientId,\n    \"Content-Type\": \"application/json\",\n  },\n  body: JSON.stringify({\n    start_date: \"2026-01-01T00:00:00Z\",\n    directory_entry: {\n      siren: \"123456789\",\n      name: \"Dupont & Fils SAS\",\n    },\n  }),\n});\n","lang":"typescript"},"children":[]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"mandat-siren--suffixe","__idx":5},"children":["Mandat SIREN + suffixe"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Cible un service ou département spécifique au sein d'une entreprise, identifié par un suffixe libre. À utiliser lorsque le destinataire route ses factures par département (ex. ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Achats"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["DAF"]},")."]},{"$$mdtype":"Tag","name":"CodeGroup","attributes":{"mode":"tabs"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","data-title":"cURL","header":{"title":"cURL","controls":{"copy":{}}},"source":"curl -X POST https://pdp.seqino.dev/api/mandates \\\n  -H \"Authorization: <votre-token>\" \\\n  -H \"X-PDP-Client-Id: <client-id>\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"start_date\": \"2026-01-01T00:00:00Z\",\n    \"directory_entry\": {\n      \"siren\": \"123456789\",\n      \"name\": \"Dupont & Fils SAS\",\n      \"suffix\": \"Achats\"\n    }\n  }'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"python","data-title":"Python","header":{"title":"Python","controls":{"copy":{}}},"source":"response = client.post(\"/mandates\",\n    headers={\"X-PDP-Client-Id\": client_id},\n    json={\n        \"start_date\": \"2026-01-01T00:00:00Z\",\n        \"directory_entry\": {\n            \"siren\": \"123456789\",\n            \"name\": \"Dupont & Fils SAS\",\n            \"suffix\": \"Achats\",\n        },\n    },\n)\nresponse.raise_for_status()\n","lang":"python"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","data-title":"TypeScript","header":{"title":"TypeScript","controls":{"copy":{}}},"source":"await fetch(\"https://pdp.seqino.dev/api/mandates\", {\n  method: \"POST\",\n  headers: {\n    \"Authorization\": \"<votre-token>\",\n    \"X-PDP-Client-Id\": clientId,\n    \"Content-Type\": \"application/json\",\n  },\n  body: JSON.stringify({\n    start_date: \"2026-01-01T00:00:00Z\",\n    directory_entry: {\n      siren: \"123456789\",\n      name: \"Dupont & Fils SAS\",\n      suffix: \"Achats\",\n    },\n  }),\n});\n","lang":"typescript"},"children":[]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"mandat-siret","__idx":6},"children":["Mandat SIRET"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Cible un établissement spécifique au sein d'une entreprise. À utiliser lorsque le destinataire route ses factures par établissement."]},{"$$mdtype":"Tag","name":"CodeGroup","attributes":{"mode":"tabs"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","data-title":"cURL","header":{"title":"cURL","controls":{"copy":{}}},"source":"curl -X POST https://pdp.seqino.dev/api/mandates \\\n  -H \"Authorization: <votre-token>\" \\\n  -H \"X-PDP-Client-Id: <client-id>\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"start_date\": \"2026-01-01T00:00:00Z\",\n    \"directory_entry\": {\n      \"siren\": \"123456789\",\n      \"name\": \"Dupont & Fils SAS — Siège social\",\n      \"siret\": \"12345678900012\"\n    }\n  }'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"python","data-title":"Python","header":{"title":"Python","controls":{"copy":{}}},"source":"response = client.post(\"/mandates\",\n    headers={\"X-PDP-Client-Id\": client_id},\n    json={\n        \"start_date\": \"2026-01-01T00:00:00Z\",\n        \"directory_entry\": {\n            \"siren\": \"123456789\",\n            \"name\": \"Dupont & Fils SAS — Siège social\",\n            \"siret\": \"12345678900012\",\n        },\n    },\n)\nresponse.raise_for_status()\n","lang":"python"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","data-title":"TypeScript","header":{"title":"TypeScript","controls":{"copy":{}}},"source":"await fetch(\"https://pdp.seqino.dev/api/mandates\", {\n  method: \"POST\",\n  headers: {\n    \"Authorization\": \"<votre-token>\",\n    \"X-PDP-Client-Id\": clientId,\n    \"Content-Type\": \"application/json\",\n  },\n  body: JSON.stringify({\n    start_date: \"2026-01-01T00:00:00Z\",\n    directory_entry: {\n      siren: \"123456789\",\n      name: \"Dupont & Fils SAS — Siège social\",\n      siret: \"12345678900012\",\n    },\n  }),\n});\n","lang":"typescript"},"children":[]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"mandat-siret--code-de-routage","__idx":7},"children":["Mandat SIRET + code de routage"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Cible un établissement spécifique avec un identifiant de routage supplémentaire (ex. GLN, ODETTE). À utiliser lorsque la PDP du destinataire requiert un routage structuré au-delà du SIRET."]},{"$$mdtype":"Tag","name":"CodeGroup","attributes":{"mode":"tabs"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","data-title":"cURL","header":{"title":"cURL","controls":{"copy":{}}},"source":"curl -X POST https://pdp.seqino.dev/api/mandates \\\n  -H \"Authorization: <votre-token>\" \\\n  -H \"X-PDP-Client-Id: <client-id>\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"start_date\": \"2026-01-01T00:00:00Z\",\n    \"directory_entry\": {\n      \"siren\": \"123456789\",\n      \"name\": \"Dupont & Fils SAS — Siège social\",\n      \"siret\": \"12345678900012\",\n      \"routing_identifier\": \"3012345678906\",\n      \"routing_identifier_type\": \"0088\"\n    }\n  }'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"python","data-title":"Python","header":{"title":"Python","controls":{"copy":{}}},"source":"response = client.post(\"/mandates\",\n    headers={\"X-PDP-Client-Id\": client_id},\n    json={\n        \"start_date\": \"2026-01-01T00:00:00Z\",\n        \"directory_entry\": {\n            \"siren\": \"123456789\",\n            \"name\": \"Dupont & Fils SAS — Siège social\",\n            \"siret\": \"12345678900012\",\n            \"routing_identifier\": \"3012345678906\",\n            \"routing_identifier_type\": \"0088\",\n        },\n    },\n)\nresponse.raise_for_status()\n","lang":"python"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","data-title":"TypeScript","header":{"title":"TypeScript","controls":{"copy":{}}},"source":"await fetch(\"https://pdp.seqino.dev/api/mandates\", {\n  method: \"POST\",\n  headers: {\n    \"Authorization\": \"<votre-token>\",\n    \"X-PDP-Client-Id\": clientId,\n    \"Content-Type\": \"application/json\",\n  },\n  body: JSON.stringify({\n    start_date: \"2026-01-01T00:00:00Z\",\n    directory_entry: {\n      siren: \"123456789\",\n      name: \"Dupont & Fils SAS — Siège social\",\n      siret: \"12345678900012\",\n      routing_identifier: \"3012345678906\",\n      routing_identifier_type: \"0088\",\n    },\n  }),\n});\n","lang":"typescript"},"children":[]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Les valeurs supportées pour ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["routing_identifier_type"]}," sont :"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Valeur"},"children":["Valeur"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Standard"},"children":["Standard"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["0088"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["GS1"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["GLN (Global Location Number)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["0060"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["DUNS"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Numéro Dun & Bradstreet"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["0224"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["SIREN/SIRET"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Identifiant national français"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Internal"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["—"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Code de routage interne défini par la PDP du destinataire"]}]}]}]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"prochaines-étapes","__idx":8},"children":["Prochaines étapes"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Une fois vos mandats actifs, vous pouvez commencer à soumettre des factures. Consultez la ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/openapi"},"children":["référence API"]}," pour les endpoints de facturation complets."]}]},"headings":[{"value":"Créer des clients et des mandats","id":"créer-des-clients-et-des-mandats","depth":1},{"value":"Prérequis","id":"prérequis","depth":2},{"value":"Étape 1 : Créer un client","id":"étape-1--créer-un-client","depth":2},{"value":"Étape 2 : Créer des mandats","id":"étape-2--créer-des-mandats","depth":2},{"value":"Mandat SIREN","id":"mandat-siren","depth":3},{"value":"Mandat SIREN + suffixe","id":"mandat-siren--suffixe","depth":3},{"value":"Mandat SIRET","id":"mandat-siret","depth":3},{"value":"Mandat SIRET + code de routage","id":"mandat-siret--code-de-routage","depth":3},{"value":"Prochaines étapes","id":"prochaines-étapes","depth":2}],"frontmatter":{"seo":{"title":"Créer des clients et des mandats"}},"lastModified":"2026-04-09T08:26:38.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/fr-fr/guides/clients-and-mandates","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}