◂ Retour à [README](./README.md)

# Import (bulk create/update)

```
POST {api}/{shardId}/{entity}/import
```

**Request body:**

```json
{
  "entities": [
    { "mail": "user0@mail.com" },
    { "id": "existing-uuid", "mail": "user1@mail.com" }
  ],
  "identifiers": { "mail": {} },
  "selects": { }
}
```

- If an entity includes `id`, it's treated as an **update**.
- If no `id` is present, the `identifiers` map is used as a unique constraint to determine create vs. update. In the example above, `mail` is used to match existing records.
- This is much more performant than individual create/edit calls.
