Stock Movements
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 |
The internal stock movement ID.
|
---|---|
entity_type |
The "Type" property. Allowed values: "delivery", "order", "work_order", "stock", "relocation".
|
entity_action |
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 |
The "Entity ID" property.
|
product_id |
The internal product ID.
|
sku |
The "Product SKU" property.
|
warehouse_id |
The internal warehouse ID.
|
qty_expected |
The "Expected" qty.
|
qty_processed |
The "Processed" qty.
|
qty_putaway |
The "Put-Away" qty.
|
qty_available |
The "Available" qty.
|
qty_allocated |
The "Allocated" qty.
|
qty_reserved |
The "Reserved" qty.
|
qty_picked |
The expected qty.
|
qty_backordered |
The "Backordered" qty.
|
created_at |
The "Timestamp" property.
|
comment |
The "Comment" property.
|
location |
The "Location" property.
|