HomeInterfacesRecipesChangelogFAQ
Log In
Interfaces

Add Task

Endpoint

http://<server>:44000/api/v2/task

Request parameters

ParameterMandatory?Data typeDescription
taskgroup_idTrueInt
(1-2147483647)
Identifies the task group to which new tasks should be added.
task_idTrueInt
(1-2147483647)
Sets the task_id property of a task.
bin_idTrueInt
(1-4000000)
Sets the bin_id property of a task.
itemFalseInt
(1-2147483647)
Sets the item property of a task.
orderFalseInt
(1-2147483647)
Sets the order property of a task.
estpicktimeFalseInt
(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>

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 CodeDescription
1010Parameter bin_id is not valid (invalid format or out of range).
1011The specified Bin does not exist.
1012Parameter task_id is not valid (invalid format or out of range).
1013Parameter taskgroup_id is not valid (invalid format or out of range).
1018The specified task group does not exist.
1024Mandatory parameter bin_id is missing.
1031Mandatory parameter taskgroup_id is missing.
1033The task already exists.
1040Mandatory parameter task_id is missing.
1041Parameter item is not valid (invalid format or out of range).
1042Parameter order is not valid (invalid format or out of range).
1057Parameter estpicktime is not valid (invalid format or out of range).
1059Too many tasks included. Max 4000 tasks per taskgroup.

Software version requirement

Software Release October 2022 and newer