Stock Movements record every change to inventory items such as when an order is received and allocated to a warehouse or a shipment is picked from the shelf.

Methods


Entity Properties


stock_movement.list

stock_movement.list (null|object $filters, null|object $options) Retrieve list of stock movements.

Parameters

filters
object | null
Filters to apply to the request. Allowed properties for filtering: “id”, “entity_type”, “entity_action”, “entity_id”, “product_id”, “sku”, “created_at”, “warehouse_id”, “location”
options
object | null
Options to apply to the request.

Return Value

An array of Stock Movements or an empty array.

Example Request

Get all stock movements:
Request
{
    "jsonrpc" : 2.0,
    "id" : 1234,
    "method" : "call",
    "params" : [
        "be1c13ed4e03f0ed7f1e4053dfff9658",
        "stock_movement.list"
    ]
}
Get all stock movements for warehouse “2”:
Request
{
    "jsonrpc" : 2.0,
    "id" : 1234,
    "method" : "call",
    "params" : [
        "be1c13ed4e03f0ed7f1e4053dfff9658",
        "stock_movement.list",
        [
            {
                "warehouse_id": {
                    "eq": "2"
                }
            }
        ]
    ]
}

Example Response

Response
{
    "result": {
        "results": [
            {
                "id": "12",
                "entity_type": "order",
                "entity_action": "create",
                "product_id": "4",
                "qty_expected": null,
                "qty_processed": null,
                "qty_putaway": null,
                "qty_available": "-1.0000",
                "qty_allocated": "1.0000",
                "qty_reserved": null,
                "qty_picked": null,
                "qty_backordered": null,
                "created_at": "2022-09-12T19:47:50+00:00",
                "sku": "12-345-6789",
                "comment": null,
                "warehouse_id": "2",
                "entity_id": "100000001",
                "location": ""
            }
        ],
        "totalCount": 1,
        "numPages": 1
    },
    "id": "1",
    "jsonrpc": "2.0"
}

Error Codes

codemessage
101Invalid filters given. Details in error message.

Entity Properties

Stock Movement Properties