Inventory Movements
Track and create inventory movements between warehouses.
Use cases: Use movements to transfer stock between warehouses and maintain an audit trail of all inventory changes.
GET
/inventory/movementsList inventory movements with optional filtering.
Query Parameters
| Name | Type | Description | |
|---|---|---|---|
productId | number | Filter by product ID. | |
warehouseId | number | Filter by warehouse ID (source or destination). | |
type | string | Movement type filter. | |
startDate | string | Start date filter (YYYY-MM-DD). | |
endDate | string | End date filter (YYYY-MM-DD). | |
page | number | Page number (default 1). | |
limit | number | Items per page (default 50). |
Request
curl -X GET "https://api.glance.co.il/inventory/movements" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"Response
Response
{
"data": [
{
"id": 1,
"product": {
"id": 1,
"name": "Widget Pro",
"sku": "WDG-001"
},
"fromWarehouse": {
"id": 1,
"name": "Main Warehouse"
},
"toWarehouse": {
"id": 2,
"name": "Secondary Storage"
},
"quantity": 20,
"reason": "Restock secondary location",
"createdAt": "2024-03-15T09:00:00Z"
}
],
"pagination": {
"total": 230,
"limit": 50,
"offset": 0,
"hasMore": true
}
}POST
/inventory/movements/createCreate an inventory movement (transfer between warehouses).
Body Parameters
| Name | Type | Description | |
|---|---|---|---|
productId | number | required | The product ID. |
fromWarehouseId | number | Source warehouse ID. | |
toWarehouseId | number | Destination warehouse ID. | |
quantity | number | required | Number of units to move. |
reason | string | Reason for the movement. |
Request
curl -X POST "https://api.glance.co.il/inventory/movements/create" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"productId": 0,
"fromWarehouseId": 0,
"toWarehouseId": 0,
"quantity": 0,
"reason": "example_reason"
}'Response
Response
{
"data": {
"id": 15,
"productId": 1,
"fromWarehouseId": 1,
"toWarehouseId": 2,
"quantity": 10,
"reason": "Customer demand shift",
"createdAt": "2024-03-20T14:00:00Z"
}
}