Machine Attributes
This page uses the Lynx API to update an attribute of a machine. 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 it to authenticate your API requests.
Updating Machine's Attribute
Use the Bulk Update Machine Attributes endpoint to update specific machine attributes. Provide the MachineID
as a path parameter, along with the attributes you want to change as body parameters, as exemplified below:
curl -X PUT "https://lynx.nayax.com/operational/api/v1/machines/<MACHINE_ID>/attributes" \
-H "Authorization: Bearer <YOUR_ACCESS_TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"DeviceAttributeID": 1001,
"MachineID": 942488501,
"DeviceAttributeValue": "Updated Vending Machine Name",
"DeviceAttributeCodeID": 3002,
"DeviceAttributeName": "MachineName",
"DeviceAttributeGroup": "General",
"DeviceAttributeReadOnlyBit": false
}'
Replace
<MACHINE_ID>
with the actual machine's unique identifier, you want to update the attributes.
This table outlines the key attributes available for update:
Name | Type | Description |
---|---|---|
DeviceAttributeID | int64 | A unique ID that identifies the specific attribute of the device. |
MachineID | int64 | The unique identifier of the machine associated with this attribute. |
DeviceAttributeValue | string | The value assigned to the device attribute. |
DeviceAttributeCodeID | int32 | The code identifier that categorizes the device attribute. |
DeviceAttributeName | string | The name of the device attribute being modified. |
DeviceAttributeGroup | string | The group or category to which the device attribute belongs. |
DeviceAttributeReadOnlyBit | boolean | Indicates whether the device attribute is read-only. |
The response will indicate whether the update was entirely successful or if there were any failures.
{
"isFullySuccess": true,
"failureItems": [
{
"id": "123456",
"error": "Attribute update failed due to invalid value."
}
]
}
Where:
isFullySuccess
indicates whether the update was entirely successful (true
if successful,false
if there were any issues).failureItems
is an array of any failed items, where each entry includes:id
: The identifier of the failed item (e.g., attribute ID).error
: A description of the error encountered during the update.
If
isFullySuccess
istrue
andfailureItems
is empty. The update was completed successfully without any errors.
Updated about 2 months ago