---
search:
  tags:
    - Fournisseurs
    - POST
seo:
  description: Crée un fournisseur. Nécessite une clé Write.
sidebar:
  label: Créer un fournisseur
  badge: POST
title: Créer un fournisseur
type: openapi-operation
---
Crée un fournisseur. Nécessite une clé Write.

`POST /suppliers`

**Request body** (`application/json`, required)

- `name` (string, required)
- `externalId` (string) — Identifiant externe facultatif
- `company` (string)
- `city` (string)
- `street` (string)
- `plz` (string)
- `email` (string)
- `payoutEmail` (string)
- `orderEmail` (string)
- `phone` (string)
- `contactPerson` (string)
- `contactPhone` (string)
- `dailyMail` (string)
- `supplierMargin` (number)
- `iban` (string)
- `bic` (string)
- `bankName` (string)
- `payoutsEnabled` (boolean)

Request body example:

```json
{
  "name": "Exemple SA",
  "company": "Exemple SA",
  "city": "Zürich",
  "street": "Bahnhofstrasse 1",
  "plz": "8001",
  "email": "orders@example.ch"
}
```

**Responses**

- `200` — Fournisseur créé
- `400` — Paramètres ou corps invalides.
- `403` — Clé API absente, inconnue ou inactive, ou clé Read sur une opération d’écriture.

Response example, 200:

```json
{
  "success": true,
  "id": "newSupplierId"
}
```

Response example, 400:

```json
{
  "statusCode": 400,
  "message": "Validation failed for Field: name, Error: Required",
  "timestamp": "2024-04-20T12:00:00.000Z",
  "path": "/api/v1/suppliers"
}
```

Response example, 403:

```json
{
  "statusCode": 403,
  "message": "Unknown Error",
  "timestamp": "2024-04-20T12:00:00.000Z",
  "path": "/api/v1/products"
}
```
