Add Task
Endpoint
TASK_INTERFACE_API_ENDPOINT
Request parameters
| Parameter | Mandatory? | Data type | Description |
|---|---|---|---|
taskgroup_id | True | Int (1-2147483647) | Identifies the taskgroup_id to which new tasks should be added. |
task_id | True | Int (1-2147483647) | Sets the task_id property of a task. |
bin_id | True | Int (1-4000000) | Sets the bin_id property of a task. |
item | False | Int (1-2147483647) | Sets the item property of a task. |
order | False | Int (1-2147483647) | Sets the order property of a task. |
estpicktime | False | Int (1-2147483647) | Estimated handling time, specified in seconds. |
Request example
//Interface installation location(Ip adress)
string ip = "127.0.0.1";
//The URL to the task interface
string url = "http://" + ip + ":44000/api/v2/task";
//XML that will be POST'ed
string xmlData = string.Format(
@"<?xml version=""1.0""?>
<methodcall>
<name>add_task</name>
<params>
<taskgroup_id>123004</taskgroup_id>
<task>
<task_id>420233</task_id>
<bin_id>23255</bin_id>
<estpicktime>20</estpicktime>
</task>
</params>
</methodcall>");
//POST to interface
HttpResponseMessage response = await new HttpClient().PostAsync(url, new StringContent(xmlData,
Encoding.UTF8, "application/xml"));
string responseString = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseString);# Interface installation location (IP address)
ip = "127.0.0.1"
# The URL to the task interface
url = f"http://{ip}:44000/api/v2/task"
# XML that will be POST'ed
xmlData ="""<?xml version="1.0"?>
<methodcall>
<name>add_task</name>
<params>
<taskgroup_id>123004</taskgroup_id>
<task>
<task_id>420233</task_id>
<bin_id>23255</bin_id>
<estpicktime>20</estpicktime>
</task>
</params>
</methodcall>"""
# POST to interface
response = requests.post(url, data=xmlData.encode('utf-8'), headers={"Content-Type": "application/xml"})
print(response.text)const ip = "127.0.0.1";
const url = `http://${ip}:44000/api/v2/task`;
const xmlData =
`<?xml version="1.0"?>
<methodcall>
<name>add_task</name>
<params>
<taskgroup_id>123004</taskgroup_id>
<task>
<task_id>420233</task_id>
<bin_id>23255</bin_id>
<estpicktime>20</estpicktime>
</task>
</params>
</methodcall>`;
fetch(url, {
method: 'POST',
body: xmlData,
headers: {
'Content-Type': 'application/xml'
}
})
.then(response => response.text())
.then(responseString => console.log(responseString));<?xml version="1.0"?>
<methodcall>
<name>add_task</name>
<params>
<taskgroup_id>123004</taskgroup_id>
<task>
<task_id>420233</task_id>
<bin_id>23255</bin_id>
<estpicktime>20</estpicktime>
</task>
</params>
</methodcall>{
"method": "add_task",
"params": {
"taskgroup_id": 123004,
"task": {
"task_id": 420233,
"bin_id": 23255,
"estpicktime": 20
}
}
}Response parameters
This method has no response parameters.
Response example
<?xml version="1.0"?>
<response>
<params/>
</response>
OR
<?xml version="1.0"?>
<response>
<fault>
<code>1000</code>
</fault>
</response>Error Codes
| Error Code | Description |
|---|---|
| 1010 | Parameter bin_id is not valid (invalid format or out of range). |
| 1011 | The specified Bin does not exist. |
| 1012 | Parameter task_id is not valid (invalid format or out of range). |
| 1013 | Parameter taskgroup_id is not valid (invalid format or out of range). |
| 1018 | The specified task group does not exist. |
| 1024 | Mandatory parameter bin_id is missing. |
| 1031 | Mandatory parameter taskgroup_id is missing. |
| 1033 | The task already exists. |
| 1040 | Mandatory parameter task_id is missing. |
| 1041 | Parameter item is not valid (invalid format or out of range). |
| 1042 | Parameter order is not valid (invalid format or out of range). |
| 1057 | Parameter estpicktime is not valid (invalid format or out of range). |
| 1059 | Too many tasks included. Max 4000 tasks per taskgroup. |
Software version requirement
Software Release October 2022 and newer
Updated about 2 months ago