Saltar al contenido principal
GET

Obtener niveles de stock de un almacén

Scope:inventory:warehouses.read
https://api.holded.com/api/v2/warehouses/{warehouseId}/stock

Devuelve los niveles de stock de todos los productos almacenados en un almacén específico.

Parámetros

Parámetros de ruta

warehouseIdstringobligatorio

ID 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/json
object
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/json
403Permisos insuficientesapplication/json
404Almacén no encontradoapplication/json
429Límite de solicitudes excedidoapplication/json