> ## Documentation Index
> Fetch the complete documentation index at: https://devzone.nayax.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 机械产品

将产品映射到机器（货架规划图设置）会将特定产品分配到机器的货位或选择项，从而定义其用于库存跟踪和补货的布局。

您可以按照以下步骤在 Nayax Core 中创建产品地图：

1. 前往**管理 > 产品地图**。
2. 点击 Add New Product Map。
3. 填写产品映射所需的字段：
   * Operator Name：指定该映射所属的运营商。
   * **机器型号**：选择地图适用的机器。
   * Map Name：产品映射的名称。
   * **状态**：地图是否处于活动状态。
4. 点击 Save。

![](https://mintcdn.com/nayax-44d6e37b/27KIupf5oHU9adsO/images/docs/machine-products-1/image1.png?fit=max\&auto=format\&n=27KIupf5oHU9adsO\&q=85\&s=760c49928c2283334a430d03218acc73)

现在，您可以将产品添加到此地图。请按照以下步骤操作：

1. 从列表中选择该映射。
2. 单击“地图项目”选项卡。
3. 使用以下选项之一将产品添加到映射中：
   * Add BIN：直接将一个产品添加到列表中。
   * Add Multiple BINS：打开一个弹出窗口，可一次选择多个产品。

![](https://mintcdn.com/nayax-44d6e37b/27KIupf5oHU9adsO/images/docs/machine-products-1/image2.png?fit=max\&auto=format\&n=27KIupf5oHU9adsO\&q=85\&s=ec1abc552ac346e4faac3c47c7444cb1)

## 通过 API 添加机器产品

使用 [Create Machine Products](https://devzone.nayax.com/reference/lynx/machine-products/create-machine-products.md) 端点以编程方式向机器的产品映射中添加一个或多个产品。

[/reference/lynx/machine-products/create-machine-products](https://devzone.nayax.com/reference/lynx/machine-products/create-machine-products.md)

> [!WARNING]
>
> 验证
>
> 请参阅本文档的[“安全和令牌”](https://devzone.nayax.com/docs/manage-data-operations/lynx-api/security)页面，了解如何访问您的令牌，以及如何正确使用它来验证您的 API 请求。

发送 POST 请求，将 `MachineID` 作为路径参数，并在请求正文中提供产品对象数组：

```sh Request theme={null}
curl --request POST \
     --url https://qa-lynx.nayax.com/operational/v1/machines/{MachineID}/machineProducts \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '
[
  {
    "NayaxProductID": 0,
    "MDBCode": 0,
    "PAR": 0,
    "CashPrice": 0,
    "CreditCardPrice": 0,
    "MachinePrice": 0,
    "RetailPrice": 0,
    "DEXProductName": "string",
    "PACode": "string",
    "PCCode": "string",
    "ProductMinimumPickQTY": 0,
    "VendOutAlertThreshold": 0,
    "PrePaidCardPrice": 0,
    "OperatorButtonCode": "string",
    "CommissionValue": 0,
    "ExternalPrepaidPrice": 0
  }
]
'
```

您可以在数组中添加多个产品对象，以便在单次请求中向映射添加多个产品。

> [!NOTE]
>
> 路径参数
>
> 将 `MachineID` 更改为要映射其产品的机器的唯一标识符。

在body参数中填写以下内容：

| 范围 | 描述 |
| - | - |
| `NayaxProductID` | Nayax 系统中产品的唯一标识符。 |
| `MDBCode` | 与产品相关的 MDB（多点总线）代码。 |
| `PAR` | 该产品的价格调整比例。 |
| `CashPrice` | 使用现金购买产品时的价格。 |
| `CreditCardPrice` | 使用信用卡购买时的产品价格。 |
| `MachinePrice` | 产品的价格直接在自动售货机上设定。 |
| `RetailPrice` | 产品的建议零售价。 |
| `DEXProductName` | 以 DEX（数据交换）格式显示的产品名称。 |
| `PACode` | 与产品相关的 PA（价格调整）代码。 |
| `PCCode` | 与产品相关的 PC（产品类别）代码。 |
| `ProductMinimumPickQTY` | 补货或拣货所需的最小产品数量。 |
| `VendOutAlertThreshold` | 触发售罄警报的库存水平阈值。 |
| `PrePaidCardPrice` | 使用预付卡购买时的产品价格。 |
| `OperatorButtonCode` | 操作员手动选择产品所使用的代码。 |
| `CommissionValue` | 与产品相关的佣金价值。 |
| `ExternalPrepaidPrice` | 使用外部预付费解决方案购买时的产品价格。 |

After mapping products to your machines, you're ready to [generate pick lists](https://devzone.nayax.com/docs/manage-data-operations/lynx-api/inventory-management/pick-lists.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.