Skip to main content
GET
https://api.zenflow.com.ar
/
api
/
v1
/
stock
/
movements
Get Stock Movements
curl --request GET \
  --url https://api.zenflow.com.ar/api/v1/stock/movements \
  --header 'X-API-Key: <api-key>'

Get Stock Movements

Retrieve the history of stock movements (additions, removals, transfers).
Requires read:stock scope.

Request

GET /api/v1/stock/movements

Query Parameters

page
integer
default:"1"
Page number
limit
integer
default:"50"
Items per page (max 100)
product_id
integer
Filter by product ID
location_id
string
Filter by location ID
movement_type
string
Filter by movement type (IN, OUT, TRANSFER, ADJUSTMENT)
start_date
string
Filter from date (YYYY-MM-DD)
end_date
string
Filter to date (YYYY-MM-DD)

Example

curl -X GET "https://api.zenflow.com.ar/api/v1/stock/movements?product_id=100&start_date=2024-01-01" \
  -H "X-API-Key: zenflow_live_your_key"

Response

{
  "success": true,
  "data": {
    "movements": [
      {
        "id": "MOV-12345",
        "product_id": 100,
        "product_name": "Widget A",
        "location_id": "LOC-A1",
        "movement_type": "IN",
        "quantity": 50,
        "previous_quantity": 25,
        "new_quantity": 75,
        "reason": "Stock replenishment",
        "user_id": 1,
        "created_at": "2024-01-14T10:30:00Z"
      },
      {
        "id": "MOV-12344",
        "product_id": 100,
        "product_name": "Widget A",
        "location_id": "LOC-A1",
        "movement_type": "OUT",
        "quantity": 5,
        "previous_quantity": 30,
        "new_quantity": 25,
        "reason": "Order fulfillment",
        "order_id": 12345,
        "created_at": "2024-01-13T15:00:00Z"
      }
    ],
    "pagination": {
      "page": 1,
      "limit": 50,
      "total": 150,
      "total_pages": 3
    }
  }
}

Movement Types

TypeDescription
INStock added (receiving, returns)
OUTStock removed (orders, damages)
TRANSFERStock moved between locations
ADJUSTMENTInventory count correction