Obtener Movimientos de Stock
curl --request GET \
--url https://api.zenflow.com.ar/api/v1/stock/movements \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.zenflow.com.ar/api/v1/stock/movements"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.zenflow.com.ar/api/v1/stock/movements', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.zenflow.com.ar/api/v1/stock/movements",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.zenflow.com.ar/api/v1/stock/movements"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.zenflow.com.ar/api/v1/stock/movements")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zenflow.com.ar/api/v1/stock/movements")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_bodyStock
Obtener Movimientos de Stock
Obtener historial de movimientos de stock
GET
/
api
/
v1
/
stock
/
movements
Obtener Movimientos de Stock
curl --request GET \
--url https://api.zenflow.com.ar/api/v1/stock/movements \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.zenflow.com.ar/api/v1/stock/movements"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.zenflow.com.ar/api/v1/stock/movements', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.zenflow.com.ar/api/v1/stock/movements",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.zenflow.com.ar/api/v1/stock/movements"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.zenflow.com.ar/api/v1/stock/movements")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zenflow.com.ar/api/v1/stock/movements")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_bodyObtener Movimientos de Stock
Obtén el historial de movimientos de stock (adiciones, remociones, transferencias).Requiere scope
read:stock.Solicitud
GET /api/v1/stock/movements
Parámetros de Consulta
integer
default:"1"
Número de página
integer
default:"50"
Items por página (máx 100)
integer
Filtrar por ID de producto
string
Filtrar por ID de ubicación
string
Filtrar por tipo de movimiento (IN, OUT, TRANSFER, ADJUSTMENT)
string
Filtrar desde fecha (YYYY-MM-DD)
string
Filtrar hasta fecha (YYYY-MM-DD)
Ejemplo
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"
Respuesta
{
"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": "Reposición de stock",
"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": "Fulfillment de pedido",
"order_id": 12345,
"created_at": "2024-01-13T15:00:00Z"
}
],
"pagination": {
"page": 1,
"limit": 50,
"total": 150,
"total_pages": 3
}
}
}
Tipos de Movimiento
| Tipo | Descripción |
|---|---|
IN | Stock agregado (recepción, devoluciones) |
OUT | Stock removido (pedidos, daños) |
TRANSFER | Stock movido entre ubicaciones |
ADJUSTMENT | Corrección de conteo de inventario |
⌘I

