HomeInterfacesRecipesChangelogFAQ
Log In
Interfaces

Get Bin Location

Endpoint

TASK_INTERFACE_API_ENDPOINT

Request parameters

ParameterMandatory?Data typeDescription
bin_idFalseInt
(1-4000000)
If the parameter bin_id is provided, only information about that specific Bin is returned.
min_bin_idFalseInt
(1-4000000)
If the parameter min_bin_id is provided, only bins with bin_id greater than or equal to min_bin_id are returned.
max_bin_idFalseInt
(1-4000000)
If the parameter max_bin_id is provided, only bins with bin_id less than or equal to max_bin_id are 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>getbinloc</name>
  <params>
    <bin_id>12004</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>getbinloc</name>
  <params>
    <bin_id>12004</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>getbinloc</name>
  <params>
    <bin_id>12004</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>getbinloc</name>
  <params>
    <bin_id>12004</bin_id>
  </params>
</methodcall>
{
    "method": "getbinloc",
    "params": {
        "bin_id": 12004
    }
}

Response parameters

ParameterData typeDescription
bin_idInt
(1-4000000)
Identifies the Bin.
grid_idInt
(1-1024)
The actual Grid where the Bin is located.
bins_aboveInt
(1-32767)
The number of physical Bins that are stacked above the Bin.
xposInt
(1-32767)
The physical X position of the Bin.
yposInt
(1-32767)
The physical Y position of the Bin.
depthInt
(1-32767)
The physical depth in mm of the Bin.
bin_modeStringThe current Bin mode.
📘

For available bin modes refer to: Value Codes

Response example

<?xml version="1.0"?>
<response>
  <params>
    <bins>
      <bin>
        <bin_id>12004</bin_id>
        <grid_id>1</grid_id>
        <bins_above>1</bins_above>
        <xpos>21</xpos>
        <ypos>21</ypos>
        <depth>362</depth>
        <bin_mode>GRID</bin_mode>
      </bin>
    </bins>
  </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.
1049Response overflow.

Software version requirement

Software Release October 2022 and newer