## Restore a dismissed purchase recommendation (tenant:purchase-recommendation:write)

`POST /api/trade/v1/purchase-recommendations/{id}/restore`

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

### Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `id` | path | string (uuid) | yes |  |

### Responses

- **200** Open again (`application/json`)
- **401** No valid session or bearer token (no body).
- **403** Missing permission, no active tenant in the token, or a missing CSRF token on a cookie write. (`application/json`)
- **404** Not found in the tenant. (`application/json`)
- **409** Not dismissed (`invalid_state`). (`application/json`)

Fields of the 200 answer:

- `articleId` (string): Masterdata product id (empty for an order line without article).
- `cartId` (string (uuid)): The cart of an `in_cart` recommendation.
- `dismissReason` (string): Why it was dismissed; set while dismissed.
- `dropShip` (boolean): The supplier delivers straight to the customer (`shipTo`).
- `id` (string (uuid)): Id of the recommendation.
- `key` (string): Stable key: the first revision of the order line, or the article and warehouse of a stock refill.
- `orderId` (string (uuid)): Sales order the recommendation is for; absent for minimum stock.
- `orderLineId` (string (uuid)): The current revision of the sales order line.
- `orderNumber` (string): Number of that sales order.
- `pendingNeed` (number): Set while `in_cart` when the need changed since: the current need (0 = no need any more).
- `quantity` (number): The need; while `in_cart` the quantity in the cart.
- `reason` (string): Why (German), e.g. `Auftrag AB-2026-00012 Pos. 3 nicht gedeckt`.
- `removedNeed` (number): Set on an open recommendation a person took out of a cart: the automatic cart leaves it alone up to this quantity.
- `shipTo` (object): Delivery address of a drop-ship recommendation.
- `source` (string): `order`: the uncovered rest of a sales order line; `stock`: refill below the minimum stock. (one of `order`, `stock`)
- `status` (string): `open`, `in_cart`, `ordered` or `dismissed`. (one of `open`, `in_cart`, `ordered`, `dismissed`)
- `updatedAt` (string (date-time)): When the recommendation was last changed.
- `warehouseId` (string): Warehouse of a stock line (empty for drop shipment).

Example 200 answer:

```json
{
  "articleId": "4b7d9f13-5e6a-4c8b-a1d2-3e4f5a6b7d07",
  "dropShip": false,
  "id": "6a9b0c1d-2e3f-4a4b-9c5d-7e8f9a0b1c01",
  "key": "stock:4b7d9f13-5e6a-4c8b-a1d2-3e4f5a6b7d07:HAUPT",
  "quantity": 16,
  "reason": "Mindestbestand 10 unterschritten (frei 4)",
  "source": "stock",
  "status": "open",
  "updatedAt": "2026-11-19T06:15:00Z",
  "warehouseId": "HAUPT"
}
```

### Example request

```bash
curl -X POST 'https://api.mbcom.cloud/api/trade/v1/purchase-recommendations/3f2b8c1e-7d4a-4e9b-9c2a-5b1d6e8f0a12/restore' \
  -H "Authorization: Bearer $ACCESS_TOKEN"
```
