# \_list

Get a list of common details for all stock

### Parameters

#### all (optional)

Integer. If this is set to 1, then details of all existing stock items will be returned. Otherwise, only details of non-archived stock items will be returned.

### Example

```
FM_api('Stock_list',
	[
		'all'=>'7'
	]
);
```

### Example Result

```
[{"id":"7","name":"2kg 1.75mm PLA Filament","code":"PLA001","in_stock":"9","average_cost":"12.99","price":"15.9900","nominal_code":"0"},{"id":"4","name":"34W Fan Motor","code":"n\/a","in_stock":"4","average_cost":"40","price":"48.0000","nominal_code":"0"},{"id":"3","name":"another live one","code":"another live one","in_stock":"-2","average_cost":"2","price":"22.0000","nominal_code":"0"},{"id":"5","name":"stock4","code":"stock4","in_stock":"-4","average_cost":"1","price":"2.0000","nominal_code":"0"},{"id":"6","name":"stock5","code":"stock5","in_stock":"2","average_cost":"2","price":"3.0000","nominal_code":"0"},{"id":"1","name":"test","code":"test","in_stock":"12","average_cost":"12","price":"12.0000","nominal_code":"0"},{"id":"2","name":"test archive","code":"test archive","in_stock":"2","average_cost":"12","price":"12.0000","nominal_code":"0"}]
```

The returned object is an array of Stock items


---

# 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/_list.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.
