# \_find

Returns rows from the stock\_container table showing where elements of a selected stock item are allocated.

### Parameters

#### id

Integer. The ID of the stock item sought.

### Example

```
FM_api('Stock_find',
		[
			'id'=>'5'
		]
	);
```

### Result

#### On Success

Returns all rows from the stock\_container table for that stock\_id. Each row contains the following fields:

* stock\_id
* container\_id
* container\_type
* amt
* last\_edited
* amt\_trigger

Example:

```
[{"stock_id":"5","container_id":"1","container_type":"3","amt":"1","last_edited":"2016-05-27 15:23:25","amt_trigger":""},{"stock_id":"5","container_id":"4360","container_type":"1","amt":"-4","last_edited":"2017-05-25 16:06:54","amt_trigger":null},{"stock_id":"5","container_id":"5204","container_type":"1","amt":"-1","last_edited":"2017-10-05 09:13:45","amt_trigger":null},{"stock_id":"5","container_id":"5205","container_type":"1","amt":"-3","last_edited":"2017-12-22 10:58:40","amt_trigger":null}]
```

#### On Failure

If no stock id provided:

```
{"error":"no stock id provided"}


	
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.fieldmotion.com/fieldmotion-api-docs/stock/_find.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
