Create Taskgroup
Endpoint
http://<server>:44000/api/v2/task
Request parameters
| Parameter | Mandatory? | Data type | Description |
|---|---|---|---|
| taskgroup_id | True | Int (1-2147483647) | Sets the taskgroup_id property. |
| shipment | False | Int (1-2147483647) | Sets the shipment property. |
| category | True | Int (1-CATEGORY_MAX) | Sets the category property. |
| req_time | True | Date and time: Between 1971.01.01and 2038.01.18. | Sets the req_time property. The req_time property must conform to UTC ISO 8601 |
| priority | True | Int (1-2147483647) | Sets the priority property. |
| start_time | False | Date and time: Between 1971.01.01 and 2038.01.18. | Sets the start_time property. The start_time property must conform to UTC ISO 8601 |
| suspended | False | Boolean | Sets the suspended property. The default value is "false". |
| 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>create_taskgroup</name>
<params>
<taskgroup_id>123004</taskgroup_id>
<shipment>20961</shipment>
<category>1</category>
<req_time>2009-03-20T14:00:00Z</req_time>
<priority>20</priority>
<tasks>
<task>
<task_id>420192</task_id>
<bin_id>10304</bin_id>
<item>1</item>
<estpicktime>20</estpicktime>
</task>
<task>
<task_id>420193</task_id>
<bin_id>33570</bin_id>
<item>1</item>
<estpicktime>20</estpicktime>
</task>
<task>
<task_id>420194</task_id>
<bin_id>22655</bin_id>
<item>2</item>
<estpicktime>20</estpicktime>
</task>
</tasks>
</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>create_taskgroup</name>
<params>
<taskgroup_id>123004</taskgroup_id>
<shipment>20961</shipment>
<category>1</category>
<req_time>2009-03-20T14:00:00Z</req_time>
<priority>20</priority>
<tasks>
<task>
<task_id>420192</task_id>
<bin_id>10304</bin_id>
<item>1</item>
<estpicktime>20</estpicktime>
</task>
<task>
<task_id>420193</task_id>
<bin_id>33570</bin_id>
<item>1</item>
<estpicktime>20</estpicktime>
</task>
<task>
<task_id>420194</task_id>
<bin_id>22655</bin_id>
<item>2</item>
<estpicktime>20</estpicktime>
</task>
</tasks>
</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>create_taskgroup</name>
<params>
<taskgroup_id>123004</taskgroup_id>
<shipment>20961</shipment>
<category>1</category>
<req_time>2009-03-20T14:00:00Z</req_time>
<priority>20</priority>
<tasks>
<task>
<task_id>420192</task_id>
<bin_id>10304</bin_id>
<item>1</item>
<estpicktime>20</estpicktime>
</task>
<task>
<task_id>420193</task_id>
<bin_id>33570</bin_id>
<item>1</item>
<estpicktime>20</estpicktime>
</task>
<task>
<task_id>420194</task_id>
<bin_id>22655</bin_id>
<item>2</item>
<estpicktime>20</estpicktime>
</task>
</tasks>
</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>create_taskgroup</name>
<params>
<taskgroup_id>123004</taskgroup_id>
<shipment>20961</shipment>
<category>1</category>
<req_time>2009-03-20T14:00:00Z</req_time>
<priority>20</priority>
<tasks>
<task>
<task_id>420192</task_id>
<bin_id>10304</bin_id>
<item>1</item>
<estpicktime>20</estpicktime>
</task>
<task>
<task_id>420193</task_id>
<bin_id>33570</bin_id>
<item>1</item>
<estpicktime>20</estpicktime>
</task>
<task>
<task_id>420194</task_id>
<bin_id>22655</bin_id>
<item>2</item>
<estpicktime>20</estpicktime>
</task>
</tasks>
</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 Code | Description |
|---|---|
| 1007 | Parameter category is not valid (invalid format or out of range). |
| 1008 | Parameter req_time is not valid (invalid format or out of range). |
| 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). |
| 1014 | Parameter shipment is not valid (invalid format or out of range) |
| 1024 | Mandatory parameter bin_id is missing. |
| 1025 | Parameter taskcomplete is not valid (invalid format or out of range). |
| 1031 | Mandatory parameter taskgroup_id is missing. |
| 1032 | The task group already exists. |
| 1033 | The task already exists. |
| 1034 | Mandatory parameter category is missing. |
| 1035 | Mandatory parameter req_time is missing. |
| 1036 | Mandatory parameter priority is missing. |
| 1037 | Parameter priority is not valid (invalid format or out of range). |
| 1038 | Parameter start_time is not valid (invalid format or out of range). |
| 1039 | Parameter suspended is not valid (invalid format or out of range). |
| 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). |
| 1043 | The task group has no tasks |
| 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 2 months ago