GET
Obtener niveles de stock de un almacén
Scope:
inventory:warehouses.readhttps://api.holded.com/api/v2/warehouses/{warehouseId}/stockDevuelve los niveles de stock de todos los productos almacenados en un almacén específico.
Parámetros
Parámetros de ruta
warehouseId
stringobligatorioID del almacén (ObjectId hexadecimal de 24 caracteres)
Petición
python
import requests
url = "https://api.holded.com/api/v2/warehouses/{warehouseId}/stock"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Accept": "application/json",
}
response = requests.get(url, headers=headers)
print(response.json())Respuestas
Respuesta
json
{
"items": [
{
"product_id": "string",
"variant_id": "string",
"stock": "15.3"
}
],
"cursor": "string",
"has_more": false
}Respuestas exitosas
200Stock del almacénapplication/jsonobject
items[]object[]
product_idstring
Identifier of the product
variant_idstring | null
Identifier of the product variant, if applicable
stockstring
Current stock quantity in this warehouse as a decimal string
cursorstring | null
has_moreboolean
Respuestas de error
401API key inválida o no proporcionadaapplication/json403Permisos insuficientesapplication/json404Almacén no encontradoapplication/json429Límite de solicitudes excedidoapplication/json