---
search:
  tags:
    - Prodotti
    - POST
seo:
  description: Crea un prodotto. Richiede una chiave Write.
sidebar:
  label: Crea prodotto
  badge: POST
title: Crea prodotto
type: openapi-operation
---
Crea un prodotto. Richiede una chiave Write.

`POST /products`

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

- `name` (string, required)
- `price` (number, required) — Prezzo in centesimi
- `taxCategory` (string, required)
- `supplier` (string)
- `category` (string)
- `declarations` (string)
- `barcode` (string) — Normalizzato in minuscolo; se vuoto diventa l'id del documento
- `barcodeAliases` (object[]) — EAN aggiuntivi facoltativi. Omettere se non usati. Disponibile se la funzione alias dei codici a barre è attiva per l’organizzazione; altrimenti 403 \`Feature not available\`.
- `externalId` (string)
- `depositProduct` (number) — Cauzione in centesimi
- `depositProductLabel` (string)
- `description` (string)
- `salePrice` (number)
- `salePercentage` (number)
- `salePriceDateFrom` (string<date-time>)
- `salePriceDateTo` (string<date-time>)
- `costPrice` (number)
- `margin` (number)
- `showOnScreen` (boolean)
- `ageRestriction` (boolean)
- `showOnScale` (boolean)
- `saleStop` (boolean)
- `deactivated` (boolean)
- `imageUrl` (string) — URL dell’immagine, salvato così com’è. Per caricare un file usa \`POST /products/{productId}/image\`.
- `index` (number)

Request body example:

```json
{
  "name": "Succo d'arancia 1L",
  "price": 349,
  "taxCategory": "2.6",
  "description": "Succo d'arancia fresco",
  "supplier": "sup_01",
  "category": "cat_beverages",
  "barcode": "7610800009999",
  "externalId": "sku-oj-1l",
  "showOnScreen": true,
  "ageRestriction": false,
  "showOnScale": false,
  "saleStop": false
}
```

**Responses**

- `200` — Prodotto creato
- `400` — Parametri o body non validi.
- `403` — Chiave API mancante, sconosciuta o inattiva, oppure chiave Read su un’operazione di scrittura.

Response example, 200:

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

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"
}
```
