meta { name: 05 Create duplicate (409) type: http seq: 5 } post { url: {{baseUrl}}/api/v1/clients body: json auth: inherit } body:json { { "name": "BOULANGERIE MARTIN SARL", "email": "autre@martin.fr" } } tests { test("409 Conflict", function () { expect(res.getStatus()).to.equal(409); }); test("error code = duplicate_client", function () { const err = res.getBody().errors[0]; expect(err.code).to.equal("duplicate_client"); expect(err.field).to.equal("name"); }); test("existing payload returned", function () { expect(res.getBody().existing).to.have.property("id"); }); } docs { Démontre la détection de doublon par nom (case-insensitive). Réponse 409 avec : ```json { "errors": [ { "code": "duplicate_client", "message": "...", "field": "name" } ], "existing": { "id": "...", "name": "Boulangerie Martin SARL", ... } } ``` Le SPA peut proposer "Voir le client existant" plutôt que créer. }