Operator Products

Products in Nayax represent the items or services operators offer, such as snacks, beverages, or digital products. Each product is uniquely identified and tied to specific attributes like pricing, barcode, packaging, and nutritional details. Products are essential for creating catalogs, managing inventory, and ensuring accurate transactions in vending machines or other systems.

In Nayax Core, you can create a product in the following way:

  1. Go to Administration> Products.
  2. Click Create > Add Product
  3. Fill in the required fields in the form:
    1. Operator: Choose under which operator the product is located.
    2. Group: Choose the group of products from the operator to which this product belongs.
    3. Product Name
    4. Status: whether the product is active or not.
  4. Click Save to finish.

Lynx API

This process can also be completed through Lynx API. In the step-by-step guide below, you'll use the following endpoint:

🚧

Authentication

Refer to the Security & Token page of this documentation to learn how to access your tokens and how to properly use them to authenticate your API requests.

Create a new Product

You can add a new product to an operator's catalog using the Create New Operator Product endpoint. See an example request in the code block below:

curl --request POST \
     --url https://qa-lynx.nayax.com/operational/v1/operators/{OperatorID}/products \
     --header 'Authorization: BEARER-TOKEN' \
     --header 'accept: application/json' \
     --header 'Content-Type: application/json' \
     --data '{
       "NayaxProductID": 12345,
       "ProductGroupID": 1001,
       "ActorID": 67890,
       "ProductManufacturerID": 55,
       "ProductName": "Energy Drink",
       "ProductCatalogNumber": "ED123",
       "ProductBarcode": "0123456789123",
       "ProductPackageQuantity": 24,
       "ProductDescription": "A refreshing energy drink.",
       "ProductVolumeTypeID": 3,
       "DEXProductName": "Energy_Drink",
       "ProductCostPrice": 1.20,
       "ProductDefaultRetailPrice": 2.50,
       "ProductMinimumPickQTY": 5,
       "ProductStatus": 1,
       "ProductCashPrice": 2.40,
       "ProductCreditCardPrice": 2.60,
       "ProductPrepaidCardPrice": 2.50,
       "ProductExternalPrepaidCardPrice": 2.55,
       "ProductMemberTypePriceBit": true,
       "ProductPictureURL": "https://example.com/energy-drink.jpg",
       "CaloriesPer100g": 45.0,
       "CaloriesPerServing": 110.0,
       "EANCode": "0123456789123",
       "ProductCreatedBy": 7890,
       "ProductCreationDate": "2024-11-25T14:00:00Z",
       "ProductUpdatedBy": 7890,
       "ProductLastUpdated": "2024-11-25T14:30:00Z",
       "VatId": 10
     }'

📘

Path Param

Ensure that you send the OperatorID as a path param to specify what operator the product belongs too.

In the body parameters, send the following details about the product:

ParameterTypeDescription
NayaxProductIDint64/nullThe unique identifier for the product in the Nayax system.
ProductGroupIDint32/nullThe unique identifier of the product group to which the product belongs.
ActorIDint64/nullThe unique identifier of the actor associated with the product.
ProductManufacturerIDint32/nullThe unique identifier of the product's manufacturer.
ProductNamestring/nullThe name of the product.
ProductCatalogNumberstring/nullThe catalog number assigned to the product.
ProductBarcodestring/nullThe barcode associated with the product.
ProductPackageQuantityint32/nullThe quantity of product units per package.
ProductDescriptionstring/nullA description of the product.
ProductVolumeTypeIDint32/nullThe volume type identifier associated with the product.
DEXProductNamestring/nullThe name of the product in the DEX (Data Exchange) format.
ProductCostPricedouble/nullThe cost price of the product.
ProductDefaultRetailPricedouble/nullThe default retail price of the product.
ProductMinimumPickQTYint32/nullThe minimum quantity of the product that can be picked.
ProductStatusint32/nullThe status of the product, typically representing availability.
ProductCashPricedouble/nullThe price of the product when paid with cash.
ProductCreditCardPricedouble/nullThe price of the product when paid with a credit card.
ProductPrepaidCardPricedouble/nullThe price of the product when paid with a prepaid card.
ProductExternalPrepaidCardPricedouble/nullThe price of the product when paid with an external prepaid card.
ProductMemberTypePriceBitboolean/nullIndicates if the product has member-type-specific pricing.
ProductPictureURLstring/nullThe URL of the product's picture.
CaloriesPer100gdouble/nullThe number of calories per 100 grams of the product.
CaloriesPerServingdouble/nullThe number of calories per serving of the product.
EANCodestring/nullThe European Article Number (EAN) code associated with the product.
ProductCreatedByint64/nullThe identifier of the user who created the product entry.
ProductCreationDatedate-time/nullThe date and time when the product was created.
ProductUpdatedByint64/nullThe identifier of the user who last updated the product entry.
ProductLastUpdateddate-time/nullThe date and time when the product was last updated.
VatIdint32/nullThe VAT (Value Added Tax) identifier associated with the product.

Create Multiple Products at Once

You can create multiple products for a single machine using the Create Machine Products endpoint. This allows you to add several products in one request, even if they belong to different product groups.

curl -X POST "https://lynx.nayax.com/operational/api/v1/machines/<MACHINE_ID>/machineProducts" \
-H "Authorization: Bearer <YOUR_ACCESS_TOKEN>" \
-H "Content-Type: application/json" \
-d '[
  {
    "MachineID": 5001,
    "ProductName": "Cola Drink",
    "MDBCode": 1,
    "CashPrice": 1.75,
    "CreditCardPrice": 1.80,
    "RetailPrice": 1.85,
    "ProductGroupID": 201,
    "DEXProductName": "Cola Drink",
    "IsActive": true
  },
  {
    "MachineID": 5001,
    "ProductName": "Potato Chips",
    "MDBCode": 2,
    "CashPrice": 2.25,
    "CreditCardPrice": 2.30,
    "RetailPrice": 2.40,
    "ProductGroupID": 202,
    "DEXProductName": "Potato Chips",
    "IsActive": true
  }
]'

📘

Path Paarams

In the example above, replace <MACHINE_ID> with the actual machine identifier you need products added.

The response JSON returned from this API call will confirm that the products have been successfully added by returning the objects representing each product in a list.

[
  {
    "DexPrice": 1.75,
    "ProductRef": "PROD001",
    "MachineProductRef": "MACH001-A1",
    "ProductGroupRef": "BEVERAGES",
    "MachineRef": "MACH001",
    "MachineProductID": 101,
    "NayaxProductID": 1001,
    "MachineID": 5001,
    "MDBCode": 1,
    "PAR": 10,
    "CashPrice": 1.75,
    "CreditCardPrice": 1.80,
    "MachinePrice": 1.70,
    "RetailPrice": 1.85,
    "DEXProductName": "Cola Drink",
    "PACode": "PA001",
    "PCCode": "PC001",
    "ProductMinimumPickQTY": 5,
    "VendOutAlertThreshold": 2,
    "LastUpdated": "2024-10-10T17:30:00.000Z",
    "MissingStockByDEX": 0,
    "DEXMissingStockLastUpdated": "2024-10-10T17:30:00.000Z",
    "PrePaidCardPrice": 1.65,
    "OperatorButtonCode": "BTN001",
    "LastUpdatedByMobile": "2024-10-10T17:30:00.000Z",
    "ProductGroupID": 201,
    "MissingStockByMDB": 0,
    "MDBMissingStockLastUpdated": "2024-10-10T17:30:00.000Z",
    "SelectionVendOutBit": false,
    "CommissionValue": 0.05,
    "ExternalPrepaidPrice": 1.60,
    "product_mark_for_alerts": 1,
    "last_sale_dt": "2024-10-09T16:30:00.000Z",
    "last_sale_mdb_dt": "2024-10-09T16:30:00.000Z",
    "slow_mover": false
  },
  {
    "DexPrice": 2.25,
    "ProductRef": "PROD002",
    "MachineProductRef": "MACH001-B2",
    "ProductGroupRef": "SNACKS",
    "MachineRef": "MACH001",
    "MachineProductID": 102,
    "NayaxProductID": 1002,
    "MachineID": 5001,
    "MDBCode": 2,
    "PAR": 15,
    "CashPrice": 2.25,
    "CreditCardPrice": 2.30,
    "MachinePrice": 2.20,
    "RetailPrice": 2.40,
    "DEXProductName": "Potato Chips",
    "PACode": "PA002",
    "PCCode": "PC002",
    "ProductMinimumPickQTY": 3,
    "VendOutAlertThreshold": 1,
    "LastUpdated": "2024-10-10T17:30:00.000Z",
    "MissingStockByDEX": 0,
    "DEXMissingStockLastUpdated": "2024-10-10T17:30:00.000Z",
    "PrePaidCardPrice": 2.10,
    "OperatorButtonCode": "BTN002",
    "LastUpdatedByMobile": "2024-10-10T17:30:00.000Z",
    "ProductGroupID": 202,
    "MissingStockByMDB": 1,
    "MDBMissingStockLastUpdated": "2024-10-10T17:30:00.000Z",
    "SelectionVendOutBit": true,
    "CommissionValue": 0.10,
    "ExternalPrepaidPrice": 2.05,
    "product_mark_for_alerts": 1,
    "last_sale_dt": "2024-10-08T15:00:00.000Z",
    "last_sale_mdb_dt": "2024-10-08T15:00:00.000Z",
    "slow_mover": true
  }
]

Where:

ParameterDescription
DexPriceThe DEX protocol price of the product.
ProductRefReference identifier for the product.
MachineProductIDUnique identifier for the product in the machine.
MachineIDIdentifier of the associated machine.
MDBCodeMDB protocol code for the product.
CashPricePrice of the product for cash payments.
CreditCardPricePrice for credit card payments.
RetailPriceThe retail price set for the product.
DEXProductNameName of the product as recorded by DEX.
ProductGroupIDIdentifier for the product group.
LastUpdatedTimestamp of the last update.
IsActiveIndicates if the product is active.

Update Product

You can use the Update Specific Product endpoint to change a product's details by adding the product's NayaxProductID in the path params and the information to change in the body request. As in the example request below:

curl --request PUT \
     --url https://qa-lynx.nayax.com/operational/v1/products/{NayaxProductID} \
     --header 'Authorization: BEARER-TOKEN' \
     --header 'accept: application/json' \
     --header 'Content-Type: application/json' \
     --data '{
       "ProductName": "Updated Chocolate Bar",
       "ProductGroupID": 1002,
       "ProductDefaultRetailPrice": 3.00,
       "ProductCashPrice": 2.90,
       "ProductCreditCardPrice": 3.10,
       "ProductDescription": "Updated description for the chocolate bar.",
       "IsActive": true
     }'

The body parameters are the same as in the Create Product request. If the request is successful, the response will contain the updated details of the product.