# \_containerAdd

Allocate stock to a container

### Parameters

#### container\_id

Integer. The ID of the container to which stock is being allocated

#### container\_type

Integer. The type of container.

Recognised types:

* 1 - User
* 2 - Vehicle
* 3 - Location

#### stock\_id

Integer. The ID of the stock item being allocated

#### amt

Integer. The quantity of the stock item being allocated

### Example

```
FM_api('Stock_containerAdd', 
	[
			'container_id'=>'1234',
			'container_type'=>'1',
			'stock_id'=>'5',
			'amt'=>'20'
	]
	);
```

### Result

#### On Success

An empty array is returned.

#### On Failure

If no container\_id supplied:

```
{"error":"You must select a container to move the stock to"}
```


---

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