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:
- Go to Administration> Products.
- Click Create > Add Product
- Fill in the required fields in the form:
- Operator: Choose under which operator the product is located.
- Group: Choose the group of products from the operator to which this product belongs.
- Product Name
- Status: whether the product is active or not.
- 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:
Parameter | Type | Description |
---|---|---|
NayaxProductID | int64/null | The unique identifier for the product in the Nayax system. |
ProductGroupID | int32/null | The unique identifier of the product group to which the product belongs. |
ActorID | int64/null | The unique identifier of the actor associated with the product. |
ProductManufacturerID | int32/null | The unique identifier of the product's manufacturer. |
ProductName | string/null | The name of the product. |
ProductCatalogNumber | string/null | The catalog number assigned to the product. |
ProductBarcode | string/null | The barcode associated with the product. |
ProductPackageQuantity | int32/null | The quantity of product units per package. |
ProductDescription | string/null | A description of the product. |
ProductVolumeTypeID | int32/null | The volume type identifier associated with the product. |
DEXProductName | string/null | The name of the product in the DEX (Data Exchange) format. |
ProductCostPrice | double/null | The cost price of the product. |
ProductDefaultRetailPrice | double/null | The default retail price of the product. |
ProductMinimumPickQTY | int32/null | The minimum quantity of the product that can be picked. |
ProductStatus | int32/null | The status of the product, typically representing availability. |
ProductCashPrice | double/null | The price of the product when paid with cash. |
ProductCreditCardPrice | double/null | The price of the product when paid with a credit card. |
ProductPrepaidCardPrice | double/null | The price of the product when paid with a prepaid card. |
ProductExternalPrepaidCardPrice | double/null | The price of the product when paid with an external prepaid card. |
ProductMemberTypePriceBit | boolean/null | Indicates if the product has member-type-specific pricing. |
ProductPictureURL | string/null | The URL of the product's picture. |
CaloriesPer100g | double/null | The number of calories per 100 grams of the product. |
CaloriesPerServing | double/null | The number of calories per serving of the product. |
EANCode | string/null | The European Article Number (EAN) code associated with the product. |
ProductCreatedBy | int64/null | The identifier of the user who created the product entry. |
ProductCreationDate | date-time/null | The date and time when the product was created. |
ProductUpdatedBy | int64/null | The identifier of the user who last updated the product entry. |
ProductLastUpdated | date-time/null | The date and time when the product was last updated. |
VatId | int32/null | The 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:
Parameter | Description |
---|---|
DexPrice | The DEX protocol price of the product. |
ProductRef | Reference identifier for the product. |
MachineProductID | Unique identifier for the product in the machine. |
MachineID | Identifier of the associated machine. |
MDBCode | MDB protocol code for the product. |
CashPrice | Price of the product for cash payments. |
CreditCardPrice | Price for credit card payments. |
RetailPrice | The retail price set for the product. |
DEXProductName | Name of the product as recorded by DEX. |
ProductGroupID | Identifier for the product group. |
LastUpdated | Timestamp of the last update. |
IsActive | Indicates 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.
Updated 5 months ago