GET
/bodegas
🔒 Requiere clave de API
Ejemplo
curl -X GET "https://fenix.kalkulusapp.com/api/bodegas" \
-H "X-API-KEY: TU_API_KEY"
const respuesta = await fetch("https://fenix.kalkulusapp.com/api/bodegas", {
method: "GET",
headers: {
"X-API-KEY": "TU_API_KEY"
}
});
const datos = await respuesta.json();
import requests
respuesta = requests.request(
"GET",
"https://fenix.kalkulusapp.com/api/bodegas",
headers={
"X-API-KEY": "TU_API_KEY"
},
)
print(respuesta.json())
<?php
$ch = curl_init("https://fenix.kalkulusapp.com/api/bodegas");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"X-API-KEY: TU_API_KEY",
],
]);
$respuesta = json_decode(curl_exec($ch), true);
curl_close($ch);
Parámetros
| Nombre | Tipo | Descripción |
|---|---|---|
| sucursal en consulta |
entero | Si se manda, filtra solo las bodegas de esa sucursal. |
Respuestas
200Lista de bodegas5 campos
Cada elemento de la lista tiene estos campos
| Campo | Tipo |
|---|---|
| id | entero |
| empresa | entero |
| sucursal | entero |
| nombre | texto |
| activo | verdadero/falso |
Listar bodegas (opcionalmente filtradas por sucursal)
[
{
"id": 5,
"empresa": 10,
"sucursal": 1,
"nombre": "Principal",
"activo": true
},
{
"id": 6,
"empresa": 10,
"sucursal": 1,
"nombre": "Bodega Tienda Física",
"activo": true
}
]
401Unauthorized
403Ruta no disponible