Methods

These methods were added in version 2024.2


Entity Properties


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.

stock_movement.list

stock_movement.list (null|object $filters, null|object $options)

Retrieve list of stock movements.

Parameters

0 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”
1 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:

{
    "jsonrpc" : 2.0,
    "id" : 1234,
    "method" : "call",
    "params" : [
        "be1c13ed4e03f0ed7f1e4053dfff9658",
        "stock_movement.list"
    ]
}

Get all stock movements for warehouse “2”:

{
    "jsonrpc" : 2.0,
    "id" : 1234,
    "method" : "call",
    "params" : [
        "be1c13ed4e03f0ed7f1e4053dfff9658",
        "stock_movement.list",
        [
            {
                "warehouse_id": {
                    "eq": "2"
                }
            }
        ]
    ]
}

Example 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

code message
101 Invalid filters given. Details in error message.

Stock Movement Properties

id
{ "id" : "1" }
The internal stock movement ID.
entity_type
{ "entity_type" : "order" }
The "Type" property. Allowed values: "delivery", "order", "work_order", "stock", "relocation".
entity_action
{ "entity_action" : "pick" }
The "Action" property. Allowed values: "create", "edit", "cancel", "void", "adjust", "process", "unprocess" "putaway", "commit", "transfer", "ship", "unship", "pick", "unpick", "relocate", "pull", "push", "convert", "allocate", "deallocate", "correction", "assemble".
entity_id
{ "entity_id" : "100000001" }
The "Entity ID" property.
product_id
{ "product_id" : "4" }
The internal product ID.
sku
{ "sku" : "12-345-6789" }
The "Product SKU" property.
warehouse_id
{ "warehouse_id" : "2" }
The internal warehouse ID.
qty_expected
{ "qty_expected" : null }
The "Expected" qty.
qty_processed
{ "qty_processed" : null }
The "Processed" qty.
qty_putaway
{ "qty_putaway" : null }
The "Put-Away" qty.
qty_available
{ "qty_available" : null }
The "Available" qty.
qty_allocated
{ "qty_allocated" : null }
The "Allocated" qty.
qty_reserved
{ "qty_reserved" : "-1.0000" }
The "Reserved" qty.
qty_picked
{ "qty_picked" : un }
The expected qty.
qty_backordered
{ "qty_backordered" : null }
The "Backordered" qty.
created_at
{ "created_at" : "2020-10-26T16:42:03+00:00" }
The "Timestamp" property.
comment
{ "comment" : "" }
The "Comment" property.
location
{ "location" : "A01-W01-001" }
The "Location" property.