Create Machine Tasks
curl --request POST \
--url https://qa-lynx.nayax.com/operational/v1/Scheduling/schedule/machine-tasks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
[
{
"MachineId": 123,
"TaskLutId": "<string>",
"DriverId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ScheduleDate": "2023-11-07T05:31:56Z",
"StatusId": 123,
"Notes": "<string>",
"GeneratePickList": true,
"GeneratePickListTime": "<string>",
"GeneratePickListRange": 123,
"ScheduleNextWorkingDay": true,
"TimezoneOffset": 123,
"AssignedToPatternId": 123,
"AssignedToScheduleId": 123,
"Pattern": {
"PatternId": 123,
"Name": "<string>",
"Description": "<string>",
"RepeatType": 123,
"RepeatInterval": 123,
"IsStatic": true,
"StartOn": "2023-11-07T05:31:56Z",
"EndOn": "2023-11-07T05:31:56Z",
"EndAfter": 123,
"RepeatOn": [
{
"Tasks": "<string>",
"Days": "<string>",
"Week": "<string>",
"MonthDay": "<string>",
"SetPos": "<string>",
"RecurrenceEx": "<string>",
"WeekNumber": "<string>"
}
]
},
"IsMobile": true,
"IsSeriesUpdate": true,
"OriginalDate": "2023-11-07T05:31:56Z",
"IncompletionReasonId": 123,
"IncompletionReason": "<string>"
}
]
'import requests
url = "https://qa-lynx.nayax.com/operational/v1/Scheduling/schedule/machine-tasks"
payload = [
{
"MachineId": 123,
"TaskLutId": "<string>",
"DriverId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ScheduleDate": "2023-11-07T05:31:56Z",
"StatusId": 123,
"Notes": "<string>",
"GeneratePickList": True,
"GeneratePickListTime": "<string>",
"GeneratePickListRange": 123,
"ScheduleNextWorkingDay": True,
"TimezoneOffset": 123,
"AssignedToPatternId": 123,
"AssignedToScheduleId": 123,
"Pattern": {
"PatternId": 123,
"Name": "<string>",
"Description": "<string>",
"RepeatType": 123,
"RepeatInterval": 123,
"IsStatic": True,
"StartOn": "2023-11-07T05:31:56Z",
"EndOn": "2023-11-07T05:31:56Z",
"EndAfter": 123,
"RepeatOn": [
{
"Tasks": "<string>",
"Days": "<string>",
"Week": "<string>",
"MonthDay": "<string>",
"SetPos": "<string>",
"RecurrenceEx": "<string>",
"WeekNumber": "<string>"
}
]
},
"IsMobile": True,
"IsSeriesUpdate": True,
"OriginalDate": "2023-11-07T05:31:56Z",
"IncompletionReasonId": 123,
"IncompletionReason": "<string>"
}
]
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([
{
MachineId: 123,
TaskLutId: '<string>',
DriverId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
ScheduleDate: '2023-11-07T05:31:56Z',
StatusId: 123,
Notes: '<string>',
GeneratePickList: true,
GeneratePickListTime: '<string>',
GeneratePickListRange: 123,
ScheduleNextWorkingDay: true,
TimezoneOffset: 123,
AssignedToPatternId: 123,
AssignedToScheduleId: 123,
Pattern: {
PatternId: 123,
Name: '<string>',
Description: '<string>',
RepeatType: 123,
RepeatInterval: 123,
IsStatic: true,
StartOn: '2023-11-07T05:31:56Z',
EndOn: '2023-11-07T05:31:56Z',
EndAfter: 123,
RepeatOn: [
{
Tasks: '<string>',
Days: '<string>',
Week: '<string>',
MonthDay: '<string>',
SetPos: '<string>',
RecurrenceEx: '<string>',
WeekNumber: '<string>'
}
]
},
IsMobile: true,
IsSeriesUpdate: true,
OriginalDate: '2023-11-07T05:31:56Z',
IncompletionReasonId: 123,
IncompletionReason: '<string>'
}
])
};
fetch('https://qa-lynx.nayax.com/operational/v1/Scheduling/schedule/machine-tasks', 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/v1/Scheduling/schedule/machine-tasks",
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([
[
'MachineId' => 123,
'TaskLutId' => '<string>',
'DriverId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'ScheduleDate' => '2023-11-07T05:31:56Z',
'StatusId' => 123,
'Notes' => '<string>',
'GeneratePickList' => true,
'GeneratePickListTime' => '<string>',
'GeneratePickListRange' => 123,
'ScheduleNextWorkingDay' => true,
'TimezoneOffset' => 123,
'AssignedToPatternId' => 123,
'AssignedToScheduleId' => 123,
'Pattern' => [
'PatternId' => 123,
'Name' => '<string>',
'Description' => '<string>',
'RepeatType' => 123,
'RepeatInterval' => 123,
'IsStatic' => true,
'StartOn' => '2023-11-07T05:31:56Z',
'EndOn' => '2023-11-07T05:31:56Z',
'EndAfter' => 123,
'RepeatOn' => [
[
'Tasks' => '<string>',
'Days' => '<string>',
'Week' => '<string>',
'MonthDay' => '<string>',
'SetPos' => '<string>',
'RecurrenceEx' => '<string>',
'WeekNumber' => '<string>'
]
]
],
'IsMobile' => true,
'IsSeriesUpdate' => true,
'OriginalDate' => '2023-11-07T05:31:56Z',
'IncompletionReasonId' => 123,
'IncompletionReason' => '<string>'
]
]),
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/v1/Scheduling/schedule/machine-tasks"
payload := strings.NewReader("[\n {\n \"MachineId\": 123,\n \"TaskLutId\": \"<string>\",\n \"DriverId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"ScheduleDate\": \"2023-11-07T05:31:56Z\",\n \"StatusId\": 123,\n \"Notes\": \"<string>\",\n \"GeneratePickList\": true,\n \"GeneratePickListTime\": \"<string>\",\n \"GeneratePickListRange\": 123,\n \"ScheduleNextWorkingDay\": true,\n \"TimezoneOffset\": 123,\n \"AssignedToPatternId\": 123,\n \"AssignedToScheduleId\": 123,\n \"Pattern\": {\n \"PatternId\": 123,\n \"Name\": \"<string>\",\n \"Description\": \"<string>\",\n \"RepeatType\": 123,\n \"RepeatInterval\": 123,\n \"IsStatic\": true,\n \"StartOn\": \"2023-11-07T05:31:56Z\",\n \"EndOn\": \"2023-11-07T05:31:56Z\",\n \"EndAfter\": 123,\n \"RepeatOn\": [\n {\n \"Tasks\": \"<string>\",\n \"Days\": \"<string>\",\n \"Week\": \"<string>\",\n \"MonthDay\": \"<string>\",\n \"SetPos\": \"<string>\",\n \"RecurrenceEx\": \"<string>\",\n \"WeekNumber\": \"<string>\"\n }\n ]\n },\n \"IsMobile\": true,\n \"IsSeriesUpdate\": true,\n \"OriginalDate\": \"2023-11-07T05:31:56Z\",\n \"IncompletionReasonId\": 123,\n \"IncompletionReason\": \"<string>\"\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/v1/Scheduling/schedule/machine-tasks")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("[\n {\n \"MachineId\": 123,\n \"TaskLutId\": \"<string>\",\n \"DriverId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"ScheduleDate\": \"2023-11-07T05:31:56Z\",\n \"StatusId\": 123,\n \"Notes\": \"<string>\",\n \"GeneratePickList\": true,\n \"GeneratePickListTime\": \"<string>\",\n \"GeneratePickListRange\": 123,\n \"ScheduleNextWorkingDay\": true,\n \"TimezoneOffset\": 123,\n \"AssignedToPatternId\": 123,\n \"AssignedToScheduleId\": 123,\n \"Pattern\": {\n \"PatternId\": 123,\n \"Name\": \"<string>\",\n \"Description\": \"<string>\",\n \"RepeatType\": 123,\n \"RepeatInterval\": 123,\n \"IsStatic\": true,\n \"StartOn\": \"2023-11-07T05:31:56Z\",\n \"EndOn\": \"2023-11-07T05:31:56Z\",\n \"EndAfter\": 123,\n \"RepeatOn\": [\n {\n \"Tasks\": \"<string>\",\n \"Days\": \"<string>\",\n \"Week\": \"<string>\",\n \"MonthDay\": \"<string>\",\n \"SetPos\": \"<string>\",\n \"RecurrenceEx\": \"<string>\",\n \"WeekNumber\": \"<string>\"\n }\n ]\n },\n \"IsMobile\": true,\n \"IsSeriesUpdate\": true,\n \"OriginalDate\": \"2023-11-07T05:31:56Z\",\n \"IncompletionReasonId\": 123,\n \"IncompletionReason\": \"<string>\"\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://qa-lynx.nayax.com/operational/v1/Scheduling/schedule/machine-tasks")
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 \"MachineId\": 123,\n \"TaskLutId\": \"<string>\",\n \"DriverId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"ScheduleDate\": \"2023-11-07T05:31:56Z\",\n \"StatusId\": 123,\n \"Notes\": \"<string>\",\n \"GeneratePickList\": true,\n \"GeneratePickListTime\": \"<string>\",\n \"GeneratePickListRange\": 123,\n \"ScheduleNextWorkingDay\": true,\n \"TimezoneOffset\": 123,\n \"AssignedToPatternId\": 123,\n \"AssignedToScheduleId\": 123,\n \"Pattern\": {\n \"PatternId\": 123,\n \"Name\": \"<string>\",\n \"Description\": \"<string>\",\n \"RepeatType\": 123,\n \"RepeatInterval\": 123,\n \"IsStatic\": true,\n \"StartOn\": \"2023-11-07T05:31:56Z\",\n \"EndOn\": \"2023-11-07T05:31:56Z\",\n \"EndAfter\": 123,\n \"RepeatOn\": [\n {\n \"Tasks\": \"<string>\",\n \"Days\": \"<string>\",\n \"Week\": \"<string>\",\n \"MonthDay\": \"<string>\",\n \"SetPos\": \"<string>\",\n \"RecurrenceEx\": \"<string>\",\n \"WeekNumber\": \"<string>\"\n }\n ]\n },\n \"IsMobile\": true,\n \"IsSeriesUpdate\": true,\n \"OriginalDate\": \"2023-11-07T05:31:56Z\",\n \"IncompletionReasonId\": 123,\n \"IncompletionReason\": \"<string>\"\n }\n]"
response = http.request(request)
puts response.read_body[
{
"MachineId": 123,
"TaskLutId": "<string>",
"SchedulingId": 123,
"DriverId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"DriverName": "<string>",
"TimezoneOffset": 123,
"ScheduleDate": "2023-11-07T05:31:56Z",
"StatusId": 123,
"Notes": "<string>",
"GeneratePickList": true,
"GeneratePickListTime": "<string>",
"GeneratePickListRange": 123,
"ScheduleNextWorkingDay": true,
"AssignedToPatternId": 123,
"AssignedToScheduleId": 123,
"IncompletionReason": "<string>",
"IncompletionReasonImages": [
{
"EntityPictureId": 123,
"EntityPictureUrl": "<string>"
}
],
"Pattern": {
"PatternId": 123,
"Name": "<string>",
"Description": "<string>",
"RepeatType": 123,
"RepeatInterval": 123,
"IsStatic": true,
"StartOn": "2023-11-07T05:31:56Z",
"EndOn": "2023-11-07T05:31:56Z",
"EndAfter": 123,
"RepeatOn": [
{
"Tasks": "<string>",
"Days": "<string>",
"Week": "<string>",
"MonthDay": "<string>",
"SetPos": "<string>",
"RecurrenceEx": "<string>",
"WeekNumber": "<string>"
}
]
},
"IsClustered": true,
"ClusterIds": "<string>",
"CreatedBy": 123,
"CreatedDt": "2023-11-07T05:31:56Z",
"UpdatedBy": 123,
"UpdatedDt": "2023-11-07T05:31:56Z",
"isMobile": true,
"isSeriesUpdate": true,
"originalDate": "<string>",
"IncompletionReasonId": 123,
"IncompletionReasonName": "<string>"
}
]Scheduling
Create Machine Tasks
Creates new scheduled tasks for machines. The request body should include details of the tasks to be scheduled.
Create Machine Tasks
curl --request POST \
--url https://qa-lynx.nayax.com/operational/v1/Scheduling/schedule/machine-tasks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
[
{
"MachineId": 123,
"TaskLutId": "<string>",
"DriverId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ScheduleDate": "2023-11-07T05:31:56Z",
"StatusId": 123,
"Notes": "<string>",
"GeneratePickList": true,
"GeneratePickListTime": "<string>",
"GeneratePickListRange": 123,
"ScheduleNextWorkingDay": true,
"TimezoneOffset": 123,
"AssignedToPatternId": 123,
"AssignedToScheduleId": 123,
"Pattern": {
"PatternId": 123,
"Name": "<string>",
"Description": "<string>",
"RepeatType": 123,
"RepeatInterval": 123,
"IsStatic": true,
"StartOn": "2023-11-07T05:31:56Z",
"EndOn": "2023-11-07T05:31:56Z",
"EndAfter": 123,
"RepeatOn": [
{
"Tasks": "<string>",
"Days": "<string>",
"Week": "<string>",
"MonthDay": "<string>",
"SetPos": "<string>",
"RecurrenceEx": "<string>",
"WeekNumber": "<string>"
}
]
},
"IsMobile": true,
"IsSeriesUpdate": true,
"OriginalDate": "2023-11-07T05:31:56Z",
"IncompletionReasonId": 123,
"IncompletionReason": "<string>"
}
]
'import requests
url = "https://qa-lynx.nayax.com/operational/v1/Scheduling/schedule/machine-tasks"
payload = [
{
"MachineId": 123,
"TaskLutId": "<string>",
"DriverId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ScheduleDate": "2023-11-07T05:31:56Z",
"StatusId": 123,
"Notes": "<string>",
"GeneratePickList": True,
"GeneratePickListTime": "<string>",
"GeneratePickListRange": 123,
"ScheduleNextWorkingDay": True,
"TimezoneOffset": 123,
"AssignedToPatternId": 123,
"AssignedToScheduleId": 123,
"Pattern": {
"PatternId": 123,
"Name": "<string>",
"Description": "<string>",
"RepeatType": 123,
"RepeatInterval": 123,
"IsStatic": True,
"StartOn": "2023-11-07T05:31:56Z",
"EndOn": "2023-11-07T05:31:56Z",
"EndAfter": 123,
"RepeatOn": [
{
"Tasks": "<string>",
"Days": "<string>",
"Week": "<string>",
"MonthDay": "<string>",
"SetPos": "<string>",
"RecurrenceEx": "<string>",
"WeekNumber": "<string>"
}
]
},
"IsMobile": True,
"IsSeriesUpdate": True,
"OriginalDate": "2023-11-07T05:31:56Z",
"IncompletionReasonId": 123,
"IncompletionReason": "<string>"
}
]
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([
{
MachineId: 123,
TaskLutId: '<string>',
DriverId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
ScheduleDate: '2023-11-07T05:31:56Z',
StatusId: 123,
Notes: '<string>',
GeneratePickList: true,
GeneratePickListTime: '<string>',
GeneratePickListRange: 123,
ScheduleNextWorkingDay: true,
TimezoneOffset: 123,
AssignedToPatternId: 123,
AssignedToScheduleId: 123,
Pattern: {
PatternId: 123,
Name: '<string>',
Description: '<string>',
RepeatType: 123,
RepeatInterval: 123,
IsStatic: true,
StartOn: '2023-11-07T05:31:56Z',
EndOn: '2023-11-07T05:31:56Z',
EndAfter: 123,
RepeatOn: [
{
Tasks: '<string>',
Days: '<string>',
Week: '<string>',
MonthDay: '<string>',
SetPos: '<string>',
RecurrenceEx: '<string>',
WeekNumber: '<string>'
}
]
},
IsMobile: true,
IsSeriesUpdate: true,
OriginalDate: '2023-11-07T05:31:56Z',
IncompletionReasonId: 123,
IncompletionReason: '<string>'
}
])
};
fetch('https://qa-lynx.nayax.com/operational/v1/Scheduling/schedule/machine-tasks', 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/v1/Scheduling/schedule/machine-tasks",
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([
[
'MachineId' => 123,
'TaskLutId' => '<string>',
'DriverId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'ScheduleDate' => '2023-11-07T05:31:56Z',
'StatusId' => 123,
'Notes' => '<string>',
'GeneratePickList' => true,
'GeneratePickListTime' => '<string>',
'GeneratePickListRange' => 123,
'ScheduleNextWorkingDay' => true,
'TimezoneOffset' => 123,
'AssignedToPatternId' => 123,
'AssignedToScheduleId' => 123,
'Pattern' => [
'PatternId' => 123,
'Name' => '<string>',
'Description' => '<string>',
'RepeatType' => 123,
'RepeatInterval' => 123,
'IsStatic' => true,
'StartOn' => '2023-11-07T05:31:56Z',
'EndOn' => '2023-11-07T05:31:56Z',
'EndAfter' => 123,
'RepeatOn' => [
[
'Tasks' => '<string>',
'Days' => '<string>',
'Week' => '<string>',
'MonthDay' => '<string>',
'SetPos' => '<string>',
'RecurrenceEx' => '<string>',
'WeekNumber' => '<string>'
]
]
],
'IsMobile' => true,
'IsSeriesUpdate' => true,
'OriginalDate' => '2023-11-07T05:31:56Z',
'IncompletionReasonId' => 123,
'IncompletionReason' => '<string>'
]
]),
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/v1/Scheduling/schedule/machine-tasks"
payload := strings.NewReader("[\n {\n \"MachineId\": 123,\n \"TaskLutId\": \"<string>\",\n \"DriverId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"ScheduleDate\": \"2023-11-07T05:31:56Z\",\n \"StatusId\": 123,\n \"Notes\": \"<string>\",\n \"GeneratePickList\": true,\n \"GeneratePickListTime\": \"<string>\",\n \"GeneratePickListRange\": 123,\n \"ScheduleNextWorkingDay\": true,\n \"TimezoneOffset\": 123,\n \"AssignedToPatternId\": 123,\n \"AssignedToScheduleId\": 123,\n \"Pattern\": {\n \"PatternId\": 123,\n \"Name\": \"<string>\",\n \"Description\": \"<string>\",\n \"RepeatType\": 123,\n \"RepeatInterval\": 123,\n \"IsStatic\": true,\n \"StartOn\": \"2023-11-07T05:31:56Z\",\n \"EndOn\": \"2023-11-07T05:31:56Z\",\n \"EndAfter\": 123,\n \"RepeatOn\": [\n {\n \"Tasks\": \"<string>\",\n \"Days\": \"<string>\",\n \"Week\": \"<string>\",\n \"MonthDay\": \"<string>\",\n \"SetPos\": \"<string>\",\n \"RecurrenceEx\": \"<string>\",\n \"WeekNumber\": \"<string>\"\n }\n ]\n },\n \"IsMobile\": true,\n \"IsSeriesUpdate\": true,\n \"OriginalDate\": \"2023-11-07T05:31:56Z\",\n \"IncompletionReasonId\": 123,\n \"IncompletionReason\": \"<string>\"\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/v1/Scheduling/schedule/machine-tasks")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("[\n {\n \"MachineId\": 123,\n \"TaskLutId\": \"<string>\",\n \"DriverId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"ScheduleDate\": \"2023-11-07T05:31:56Z\",\n \"StatusId\": 123,\n \"Notes\": \"<string>\",\n \"GeneratePickList\": true,\n \"GeneratePickListTime\": \"<string>\",\n \"GeneratePickListRange\": 123,\n \"ScheduleNextWorkingDay\": true,\n \"TimezoneOffset\": 123,\n \"AssignedToPatternId\": 123,\n \"AssignedToScheduleId\": 123,\n \"Pattern\": {\n \"PatternId\": 123,\n \"Name\": \"<string>\",\n \"Description\": \"<string>\",\n \"RepeatType\": 123,\n \"RepeatInterval\": 123,\n \"IsStatic\": true,\n \"StartOn\": \"2023-11-07T05:31:56Z\",\n \"EndOn\": \"2023-11-07T05:31:56Z\",\n \"EndAfter\": 123,\n \"RepeatOn\": [\n {\n \"Tasks\": \"<string>\",\n \"Days\": \"<string>\",\n \"Week\": \"<string>\",\n \"MonthDay\": \"<string>\",\n \"SetPos\": \"<string>\",\n \"RecurrenceEx\": \"<string>\",\n \"WeekNumber\": \"<string>\"\n }\n ]\n },\n \"IsMobile\": true,\n \"IsSeriesUpdate\": true,\n \"OriginalDate\": \"2023-11-07T05:31:56Z\",\n \"IncompletionReasonId\": 123,\n \"IncompletionReason\": \"<string>\"\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://qa-lynx.nayax.com/operational/v1/Scheduling/schedule/machine-tasks")
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 \"MachineId\": 123,\n \"TaskLutId\": \"<string>\",\n \"DriverId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"ScheduleDate\": \"2023-11-07T05:31:56Z\",\n \"StatusId\": 123,\n \"Notes\": \"<string>\",\n \"GeneratePickList\": true,\n \"GeneratePickListTime\": \"<string>\",\n \"GeneratePickListRange\": 123,\n \"ScheduleNextWorkingDay\": true,\n \"TimezoneOffset\": 123,\n \"AssignedToPatternId\": 123,\n \"AssignedToScheduleId\": 123,\n \"Pattern\": {\n \"PatternId\": 123,\n \"Name\": \"<string>\",\n \"Description\": \"<string>\",\n \"RepeatType\": 123,\n \"RepeatInterval\": 123,\n \"IsStatic\": true,\n \"StartOn\": \"2023-11-07T05:31:56Z\",\n \"EndOn\": \"2023-11-07T05:31:56Z\",\n \"EndAfter\": 123,\n \"RepeatOn\": [\n {\n \"Tasks\": \"<string>\",\n \"Days\": \"<string>\",\n \"Week\": \"<string>\",\n \"MonthDay\": \"<string>\",\n \"SetPos\": \"<string>\",\n \"RecurrenceEx\": \"<string>\",\n \"WeekNumber\": \"<string>\"\n }\n ]\n },\n \"IsMobile\": true,\n \"IsSeriesUpdate\": true,\n \"OriginalDate\": \"2023-11-07T05:31:56Z\",\n \"IncompletionReasonId\": 123,\n \"IncompletionReason\": \"<string>\"\n }\n]"
response = http.request(request)
puts response.read_body[
{
"MachineId": 123,
"TaskLutId": "<string>",
"SchedulingId": 123,
"DriverId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"DriverName": "<string>",
"TimezoneOffset": 123,
"ScheduleDate": "2023-11-07T05:31:56Z",
"StatusId": 123,
"Notes": "<string>",
"GeneratePickList": true,
"GeneratePickListTime": "<string>",
"GeneratePickListRange": 123,
"ScheduleNextWorkingDay": true,
"AssignedToPatternId": 123,
"AssignedToScheduleId": 123,
"IncompletionReason": "<string>",
"IncompletionReasonImages": [
{
"EntityPictureId": 123,
"EntityPictureUrl": "<string>"
}
],
"Pattern": {
"PatternId": 123,
"Name": "<string>",
"Description": "<string>",
"RepeatType": 123,
"RepeatInterval": 123,
"IsStatic": true,
"StartOn": "2023-11-07T05:31:56Z",
"EndOn": "2023-11-07T05:31:56Z",
"EndAfter": 123,
"RepeatOn": [
{
"Tasks": "<string>",
"Days": "<string>",
"Week": "<string>",
"MonthDay": "<string>",
"SetPos": "<string>",
"RecurrenceEx": "<string>",
"WeekNumber": "<string>"
}
]
},
"IsClustered": true,
"ClusterIds": "<string>",
"CreatedBy": 123,
"CreatedDt": "2023-11-07T05:31:56Z",
"UpdatedBy": 123,
"UpdatedDt": "2023-11-07T05:31:56Z",
"isMobile": true,
"isSeriesUpdate": true,
"originalDate": "<string>",
"IncompletionReasonId": 123,
"IncompletionReasonName": "<string>"
}
]Authorizations
Body
application/json
Response
200 - application/json
The newly created scheduled tasks.
Was this page helpful?