curl --request POST \
--url https://qa-lynx.nayax.com/operational/v2/machines/attributes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
[
{
"MachineIds": [
123
],
"allowCollectDt": "2023-11-07T05:31:56Z",
"Attributes": [
{
"Id": 123,
"Value": "<string>",
"CodeId": 123
}
],
"UpdateQueue": true,
"UpdateValues": true
}
]
'import requests
url = "https://qa-lynx.nayax.com/operational/v2/machines/attributes"
payload = [
{
"MachineIds": [123],
"allowCollectDt": "2023-11-07T05:31:56Z",
"Attributes": [
{
"Id": 123,
"Value": "<string>",
"CodeId": 123
}
],
"UpdateQueue": True,
"UpdateValues": True
}
]
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify([
{
MachineIds: [123],
allowCollectDt: '2023-11-07T05:31:56Z',
Attributes: [{Id: 123, Value: '<string>', CodeId: 123}],
UpdateQueue: true,
UpdateValues: true
}
])
};
fetch('https://qa-lynx.nayax.com/operational/v2/machines/attributes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://qa-lynx.nayax.com/operational/v2/machines/attributes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
[
'MachineIds' => [
123
],
'allowCollectDt' => '2023-11-07T05:31:56Z',
'Attributes' => [
[
'Id' => 123,
'Value' => '<string>',
'CodeId' => 123
]
],
'UpdateQueue' => true,
'UpdateValues' => true
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://qa-lynx.nayax.com/operational/v2/machines/attributes"
payload := strings.NewReader("[\n {\n \"MachineIds\": [\n 123\n ],\n \"allowCollectDt\": \"2023-11-07T05:31:56Z\",\n \"Attributes\": [\n {\n \"Id\": 123,\n \"Value\": \"<string>\",\n \"CodeId\": 123\n }\n ],\n \"UpdateQueue\": true,\n \"UpdateValues\": true\n }\n]")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://qa-lynx.nayax.com/operational/v2/machines/attributes")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("[\n {\n \"MachineIds\": [\n 123\n ],\n \"allowCollectDt\": \"2023-11-07T05:31:56Z\",\n \"Attributes\": [\n {\n \"Id\": 123,\n \"Value\": \"<string>\",\n \"CodeId\": 123\n }\n ],\n \"UpdateQueue\": true,\n \"UpdateValues\": true\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://qa-lynx.nayax.com/operational/v2/machines/attributes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "[\n {\n \"MachineIds\": [\n 123\n ],\n \"allowCollectDt\": \"2023-11-07T05:31:56Z\",\n \"Attributes\": [\n {\n \"Id\": 123,\n \"Value\": \"<string>\",\n \"CodeId\": 123\n }\n ],\n \"UpdateQueue\": true,\n \"UpdateValues\": true\n }\n]"
response = http.request(request)
puts response.read_body{
"Ok": true,
"Message": "<string>",
"SystemMessage": "<string>",
"code": "<string>"
}Insert/Update Machine Attributes
Allows bulk insertion or updating of machine attributes. The request body should include an array of machine attributes to be processed.
curl --request POST \
--url https://qa-lynx.nayax.com/operational/v2/machines/attributes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
[
{
"MachineIds": [
123
],
"allowCollectDt": "2023-11-07T05:31:56Z",
"Attributes": [
{
"Id": 123,
"Value": "<string>",
"CodeId": 123
}
],
"UpdateQueue": true,
"UpdateValues": true
}
]
'import requests
url = "https://qa-lynx.nayax.com/operational/v2/machines/attributes"
payload = [
{
"MachineIds": [123],
"allowCollectDt": "2023-11-07T05:31:56Z",
"Attributes": [
{
"Id": 123,
"Value": "<string>",
"CodeId": 123
}
],
"UpdateQueue": True,
"UpdateValues": True
}
]
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify([
{
MachineIds: [123],
allowCollectDt: '2023-11-07T05:31:56Z',
Attributes: [{Id: 123, Value: '<string>', CodeId: 123}],
UpdateQueue: true,
UpdateValues: true
}
])
};
fetch('https://qa-lynx.nayax.com/operational/v2/machines/attributes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://qa-lynx.nayax.com/operational/v2/machines/attributes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
[
'MachineIds' => [
123
],
'allowCollectDt' => '2023-11-07T05:31:56Z',
'Attributes' => [
[
'Id' => 123,
'Value' => '<string>',
'CodeId' => 123
]
],
'UpdateQueue' => true,
'UpdateValues' => true
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://qa-lynx.nayax.com/operational/v2/machines/attributes"
payload := strings.NewReader("[\n {\n \"MachineIds\": [\n 123\n ],\n \"allowCollectDt\": \"2023-11-07T05:31:56Z\",\n \"Attributes\": [\n {\n \"Id\": 123,\n \"Value\": \"<string>\",\n \"CodeId\": 123\n }\n ],\n \"UpdateQueue\": true,\n \"UpdateValues\": true\n }\n]")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://qa-lynx.nayax.com/operational/v2/machines/attributes")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("[\n {\n \"MachineIds\": [\n 123\n ],\n \"allowCollectDt\": \"2023-11-07T05:31:56Z\",\n \"Attributes\": [\n {\n \"Id\": 123,\n \"Value\": \"<string>\",\n \"CodeId\": 123\n }\n ],\n \"UpdateQueue\": true,\n \"UpdateValues\": true\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://qa-lynx.nayax.com/operational/v2/machines/attributes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "[\n {\n \"MachineIds\": [\n 123\n ],\n \"allowCollectDt\": \"2023-11-07T05:31:56Z\",\n \"Attributes\": [\n {\n \"Id\": 123,\n \"Value\": \"<string>\",\n \"CodeId\": 123\n }\n ],\n \"UpdateQueue\": true,\n \"UpdateValues\": true\n }\n]"
response = http.request(request)
puts response.read_body{
"Ok": true,
"Message": "<string>",
"SystemMessage": "<string>",
"code": "<string>"
}Authorizations
Enter your Bearer token. It's required to authenticate API requests.
Body
A list of unique identifiers for the machines that the attributes will be applied to.
The date and time when the attributes are allowed to be collected.
A list of attributes to be inserted or updated for the specified machines.
Show child attributes
Show child attributes
Indicates whether the attributes should be added to an update queue for processing.
Indicates whether the existing attribute values should be updated with the new values provided.
Response
The machine attributes were successfully processed.
Schema representing the result of an API operation, including status and messages.
Indicates whether the API operation was successful (true) or not (false).
A user-friendly message describing the result of the operation, if applicable.
A system-level message providing additional details about the operation's result, often used for debugging or logging.
An optional code representing the result of the operation, which can be used for more granular handling of responses.
Was this page helpful?