Get Bin State
Endpoint
http://<server>:44000/api/v2/task
Request parameters
| Parameter | Mandatory? | Data type | Description |
|---|---|---|---|
| bin_id | False | Int (1-4000000) | If the parameter bin_id is provided, only information about that specific Bin is returned. |
| min_bin_id | False | Int (1-4000000) | If the parameter min_bin_id is provided, only information about Bins with bin_id greater than or equal to min_bin_id is returned. |
| max_bin_id | False | Int (1-4000000) | If the parameter max_bin_id is provided, only information about Bins with bin_id less than or equal to max_bin_id is returned. |
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>getbinstate</name>
<params>
<bin_id>10000</bin_id>
</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>getbinstate</name>
<params>
<bin_id>10000</bin_id>
</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>getbinstate</name>
<params>
<bin_id>10000</bin_id>
</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>getbinstate</name>
<params>
<bin_id>10000</bin_id>
</params>
</methodcall>Response parameters
| Parameter | Data type | Description |
|---|---|---|
| bin_id | Int (1-4000000) | Identifies the Bin. |
| bin_mode | String | The current Bin mode, same codes as from LogPublisher |
| content | Int (0 and CONTENT_MAX) | The content of the Bin. |
| xpos | Int (1-32767) | The physical X position of the Bin. |
| ypos | Int (1-32767) | The physical Y position of the Bin. |
| depth | Int (1-32767) | The physical depth in mm of the Bin. |
| port_id | Int (1-2000) | The port in which the Bin is located. (Numeric 0 if the Bin is not in a Port.) |
| target_grid | Int (1-1024) | The preferred storage Grid for the Bin. |
| Mode | Description |
|---|---|
| G | Bin is in a Grid. |
| F | Bin is in a Grid and is forecast. |
| T | Bin is prepared in a Grid. |
| P | Bin is in a Port, ready to be opened. |
| R | Same as PORT, but the bin is requested back to Grid because it is needed elsewhere. |
| O | Bin is open in a Port. |
| C | Bin is in a Port, ready to be returned to Grid. |
| X | Bin is removed (temporary) from the system. |
Response example
<?xml version="1.0"?>
<response>
<params>
<bins>
<bin>
<bin_id>10000</bin_id>
<bin_mode>G</bin_mode>
<content>1</content>
<xpos>34</xpos>
<ypos>38</ypos>
<depth>1124</depth>
<port_id>0</port_id>
<target_grid>1</target_grid>
</bin>
</bins>
</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. |
| 1049 | Response overflow. |
| 1055 | Parameter min_bin_id is not valid (invalid format or out of range). |
| 1056 | Parameter max_bin_id is not valid (invalid format or out of range). |
Software version requirement
Software Release October 2022 and newer
Updated 2 months ago