HomeInterfacesRecipesChangelogFAQ
Log In
Interfaces

Update Taskgroup

Endpoint

TASK_INTERFACE_API_ENDPOINT

Request parameters

ParameterMandatory?Data typeDescription
taskgroup_idTrueInt
(1-2147483647)
Identifies the taskgroup_id that should be updated.
shipmentFalseInt
(1-2147483647)
Sets the shipment property.
categoryTrueInt
(1-10000000)
Sets the category property.
req_timeTrueDate and time.
Between 1971.01.01 and 2038.01.18.
Sets the req_time property. The req_time property must conform to UTC ISO 8601 timezone format.
priorityTrueInt
(1-2147483647)
Sets the priority property.
start_timeFalseDate 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 timezone format.
suspendedFalseBooleanSets the suspended property. The default value is false.

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>update_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>
  </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>update_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>
  </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>update_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>
  </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>update_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>
  </params>
</methodcall>
{
    "method": "update_taskgroup",
    "params": {
        "taskgroup_id": 123004,
        "shipment": 20961,
        "category": 1,
        "req_time": "2009-03-20T14:00:00Z",
        "priority": 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 CodeDescription
1007Parameter category is not valid (invalid format or out of range).
1008Parameter req_time is not valid (invalid format or out of range).
1013Parameter taskgroup_id is not valid (invalid format or out of range).
1014Parameter shipment is not valid (invalid format or out of range)
1018The specified task group does not exist.
1031Mandatory parameter taskgroup_id is missing.
1034Mandatory parameter category is missing.
1035Mandatory parameter req_time is missing.
1036Mandatory parameter priority is missing.
1037Parameter priority is not valid (invalid format or out of range).
1038Parameter start_time is not valid (invalid format or out of range).
1039Parameter suspended is not valid (invalid format or out of range).
1044The task group is selected by a Port.

Software version requirement

Software Release October 2022 and newer