## Propose title, texts and product group for an article (tenant:trade:purchasing:read)

`POST /api/trade/v1/itsp/articles/enrich`

Module: Trade · operationId: `enrichArticle` · Tag: ITSP · Auth: access token (`Authorization: Bearer <accessToken>`)

Rule-based; with `useAi` also through the AI service unless the tenant switched AI enrichment off. Never fails on AI errors (falls back to the rules).

### Request body

`application/json` (required)

- `article` (NormalizedArticle, required)
  - `bestPurchasePrice` (number): Lowest purchase price of all supplier offers.
  - `canonicalMpn` (string): Manufacturer part number normalized for matching.
  - `currency` (string): Currency (ISO 4217).
  - `description` (string): Description of the article.
  - `descriptions` (array of object): Every text the catalogs have for the article.
    - `recommended` (boolean): The catalog flags the text as recommended.
    - `source` (string): Catalog of the text, e.g. `CNET`, `ICECAT`, `EGIS`.
    - `text` (string): The text.
    - `title` (string): Title of the text, e.g. `Marketing-Text (CNET)`.
    - `type` (string): `main`, `marketing`, `short_summary`, `long_summary` or `short_desc`. (one of `main`, `marketing`, `short_summary`, `long_summary`, `short_desc`)
  - `ean` (string): EAN (GTIN) of the article.
  - `existingArticleId` (string): Masterdata id of the existing article.
  - `existingArticleNumber` (string): Article number of the article that exists in masterdata already.
  - `features` (array of object): Technical features of the article.
    - `name` (string): Name of the feature.
    - `value` (string): Value of the feature.
  - `fldSerienNrKz` (boolean): Serial number tracked.
  - `height` (number): Height of the article.
  - `id` (string): Id of the article in the merged search result.
  - `imageUrl` (string): Link to a product image.
  - `inStock` (boolean): Stock confirmed without a quantity.
  - `length` (number): Length of the article.
  - `manufacturerCode` (string): Manufacturer code in masterdata.
  - `manufacturerId` (string): The catalog's id of the manufacturer.
  - `manufacturerName` (string): Name of the manufacturer.
  - `marketingText` (string): Marketing text of the article.
  - `microtechArticleNumber` (string): Article number of the article in the ERP, when it exists there.
  - `microtechStatus` (string): Whether the article exists in masterdata. (one of `NOT_FOUND`, `EXISTS`, `MULTIPLE_MATCHES`, `REQUIRES_MANUAL_MAPPING`)
  - `mpn` (string): Manufacturer part number.
  - `productGroup` (string): Name of the product group.
  - `productGroupNumber` (string): Number of the product group in masterdata.
  - `requiresManualMapping` (boolean): The manufacturer could not be mapped to masterdata automatically.
  - `searchTerm` (string): Search term (Suchbegriff) of the article.
  - `shortDescription` (string): Short description of the article.
  - `source` (string): Catalog the article came from; comma-separated when several had it.
  - `sourceArticleId` (string): The catalog's id of the article.
  - `sourceIdentifiers` (object): Connector → its article id.
  - `suppliers` (array of SupplierArticle): Supplier offers of the article.
    - `availableQuantity` (number): Quantity available at the distributor.
    - `currency` (string): Currency of the purchase price (ISO 4217).
    - `deliveryTimeDays` (integer): Delivery time in days.
    - `directOrderable` (boolean): The article can be ordered from the distributor through trade.
    - `distributorId` (string): EGIS id of the distributor.
    - `distributorName` (string): Name of the distributor.
    - `isDefault` (boolean): This supplier is the default supplier of the article.
    - `microtechAddressNo` (integer): Address number of the supplier in masterdata.
    - `purchasePrice` (number): Net purchase price.
    - `source` (string): Catalog of the offer (`egis`, `ingram`, …).
    - `supplierAddressId` (string): Masterdata address the distributor is assigned to.
    - `supplierAddressName` (string): Name of the masterdata supplier address of the distributor.
    - `supplierArticleNumber` (string): The distributor's article number.
  - `title` (string): Title of the article.
  - `totalAvailableQuantity` (number): Quantity available across all distributors.
  - `unit` (string): Unit of measure.
  - `weight` (number): Weight of the article.
  - `width` (number): Width of the article.
- `productGroups` (array of ProductGroup): Product groups the proposal may choose from.
  - `name` (string): Name of the product group.
  - `number` (string): Number of the product group in masterdata.
- `useAi` (boolean)

Example:

```json
{
  "article": {
    "bestPurchasePrice": 1049,
    "canonicalMpn": "21MC0012GE",
    "currency": "EUR",
    "descriptions": [
      {
        "recommended": true,
        "source": "EGIS",
        "text": "Business-Notebook mit 14-Zoll-WUXGA-Display, Intel Core Ultra 7 155U, 32 GB RAM und 1 TB SSD.",
        "title": "Produktbeschreibung (EGIS)",
        "type": "main"
      }
    ],
    "ean": "0197529876543",
    "features": [
      {
        "name": "Bildschirmdiagonale",
        "value": "35,6 cm (14\")"
      },
      {
        "name": "Prozessor",
        "value": "Intel Core Ultra 7 155U"
      }
    ],
    "fldSerienNrKz": true,
    "id": "art-21MC0012GE",
    "inStock": true,
    "manufacturerCode": "LNV",
    "manufacturerName": "Lenovo",
    "microtechStatus": "NOT_FOUND",
    "mpn": "21MC0012GE",
    "productGroup": "Notebooks",
    "productGroupNumber": "120",
    "requiresManualMapping": false,
    "searchTerm": "THINKPAD T14 G5",
    "shortDescription": "Lenovo ThinkPad T14 Gen 5",
    "source": "egis,ingram",
    "sourceArticleId": "PCS512377",
    "sourceIdentifiers": {
      "egis": "PCS512377",
      "ingram": "7J0815"
    },
    "suppliers": [
      {
        "availableQuantity": 25,
        "currency": "EUR",
        "deliveryTimeDays": 1,
        "directOrderable": true,
        "distributorId": "70044",
        "distributorName": "Nordlicht IT-Distribution GmbH",
        "isDefault": true,
        "microtechAddressNo": 70001,
        "purchasePrice": 1049,
        "source": "egis",
        "supplierAddressId": "6d8f0a12-3c4e-4a5b-9d6f-7e8a9b0c1d01",
        "supplierAddressName": "Nordlicht IT-Distribution GmbH",
        "supplierArticleNumber": "NL-T14G5-32"
      },
      {
        "availableQuantity": 12,
        "currency": "EUR",
        "deliveryTimeDays": 2,
        "directOrderable": true,
        "distributorName": "Ingram Micro",
        "isDefault": false,
        "microtechAddressNo": 70010,
        "purchasePrice": 1067.5,
        "source": "ingram",
        "supplierAddressId": "6d8f0a12-3c4e-4a5b-9d6f-7e8a9b0c1d10",
        "supplierAddressName": "Ingram Micro Distribution GmbH",
        "supplierArticleNumber": "7J0815"
      }
    ],
    "title": "Lenovo ThinkPad T14 Gen 5, 14\" WUXGA, Core Ultra 7 155U, 32 GB, 1 TB SSD, Win 11 Pro",
    "totalAvailableQuantity": 37,
    "unit": "Stk",
    "weight": 1.37
  },
  "productGroups": [
    {
      "name": "Notebooks",
      "number": "120"
    },
    {
      "name": "Monitore",
      "number": "130"
    }
  ],
  "useAi": true
}
```

### Responses

- **200** Proposal (`application/json`)
- **400** Error (`application/json`)
- **401** No valid session or bearer token (no body).
- **503** The configuration store is not available. (`application/json`)

Fields of the 200 answer:

- `catalogSource` (string): Catalog the proposal is based on.
- `description` (string): Suggested Beschreibung (long text).
- `productGroup` (string): Name of the product group.
- `productGroupNumber` (string): Number of the product group in masterdata.
- `searchTerm` (string): Search term (Suchbegriff) of the article.
- `shortDescription` (string): Suggested Kurzbezeichnung (max. 80 characters).
- `title` (string): Suggested Bezeichnung (max. 2000 characters).

Example 200 answer:

```json
{
  "catalogSource": "EGIS",
  "description": "Robustes 14-Zoll-Business-Notebook mit Intel Core Ultra 7, 32 GB Arbeitsspeicher und 1 TB SSD – für den mobilen Einsatz in Vertrieb und Technik.",
  "productGroup": "Notebooks",
  "productGroupNumber": "120",
  "searchTerm": "THINKPAD T14 G5",
  "shortDescription": "Lenovo ThinkPad T14 Gen 5 Ultra 7 32 GB 1 TB",
  "title": "Lenovo ThinkPad T14 Gen 5 – 14\" WUXGA IPS, Intel Core Ultra 7 155U, 32 GB RAM, 1 TB SSD, Windows 11 Pro"
}
```

### Example request

```bash
curl -X POST 'https://api.mbcom.cloud/api/trade/v1/itsp/articles/enrich' \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H 'Content-Type: application/json' \
  --data '{"article":{"bestPurchasePrice":1049,"canonicalMpn":"21MC0012GE","currency":"EUR","descriptions":[{"recommended":true,"source":"EGIS","text":"Business-Notebook mit 14-Zoll-WUXGA-Display, Intel Core Ultra 7 155U, 32 GB RAM und 1 TB SSD.","title":"Produktbeschreibung (EGIS)","type":"main"}],"ean":"0197529876543","features":[{"name":"Bildschirmdiagonale","value":"35,6 cm (14\")"},{"name":"Prozessor","value":"Intel Core Ultra 7 155U"}],"fldSerienNrKz":true,"id":"art-21MC0012GE","inStock":true,"manufacturerCode":"LNV","manufacturerName":"Lenovo","microtechStatus":"NOT_FOUND","mpn":"21MC0012GE","productGroup":"Notebooks","productGroupNumber":"120","requiresManualMapping":false,"searchTerm":"THINKPAD T14 G5","shortDescription":"Lenovo ThinkPad T14 Gen 5","source":"egis,ingram","sourceArticleId":"PCS512377","sourceIdentifiers":{"egis":"PCS512377","ingram":"7J0815"},"suppliers":[{"availableQuantity":25,"currency":"EUR","deliveryTimeDays":1,"directOrderable":true,"distributorId":"70044","distributorName":"Nordlicht IT-Distribution GmbH","isDefault":true,"microtechAddressNo":70001,"purchasePrice":1049,"source":"egis","supplierAddressId":"6d8f0a12-3c4e-4a5b-9d6f-7e8a9b0c1d01","supplierAddressName":"Nordlicht IT-Distribution GmbH","supplierArticleNumber":"NL-T14G5-32"},{"availableQuantity":12,"currency":"EUR","deliveryTimeDays":2,"directOrderable":true,"distributorName":"Ingram Micro","isDefault":false,"microtechAddressNo":70010,"purchasePrice":1067.5,"source":"ingram","supplierAddressId":"6d8f0a12-3c4e-4a5b-9d6f-7e8a9b0c1d10","supplierAddressName":"Ingram Micro Distribution GmbH","supplierArticleNumber":"7J0815"}],"title":"Lenovo ThinkPad T14 Gen 5, 14\" WUXGA, Core Ultra 7 155U, 32 GB, 1 TB SSD, Win 11 Pro","totalAvailableQuantity":37,"unit":"Stk","weight":1.37},"productGroups":[{"name":"Notebooks","number":"120"},{"name":"Monitore","number":"130"}],"useAi":true}'
```
