Klu Docs

GET inventory logs

List restocks, adjustments, transfers, sales, and other stock movements.

Endpoint

GET /public-api/v1/inventory/logs

Purpose

Returns timestamped stock movement history for the key organization. Use it to trace restocks, adjustments, room moves, transfers, conversions, and sale-driven inventory changes.

Authentication

Required.

Parameters

  • limit: optional page size, default 25, maximum 100.
  • cursor: optional UUID from pagination.nextCursor.
  • storeIds: optional branch filter.
  • categoryIds: optional category filter.
  • productIds: optional product filter.
  • types: optional comma-separated or repeated movement types.
  • search: optional product name or SKU search.
  • from: optional ISO timestamp.
  • to: optional ISO timestamp.

Supported types are RESTOCK, ADD_WASTE, REMOVE_WASTE, MOVE_SEND, MOVE_RECEIVE, DELETE, CONVERT_FROM, CONVERT_TO, DELETE_RESTOCK, RECONCILE_APPROVE, RECONCILE_REVERT, SALE_CREATE, SALE_REVERT, TRANSFER_ORDER_SEND, TRANSFER_ORDER_RECEIVE, and SUPPLIER_PURCHASE_ORDER_RECEIVE.

If from and to are omitted, the endpoint uses the last 30 days through the end of the current UTC day.

Response fields

Each log includes id, createdAt, type, quantity, previousStock, currentStock, product, store, room, moveRoom, and references.

Quantities are returned in product units rather than the internal hundredths representation. room and moveRoom can be null. Reference IDs can connect a movement to a sale, shipment, purchase order, transfer order, or supplier purchase order; unused references are null.

Example request

curl "https://api.klupos.com/public-api/v1/inventory/logs?limit=100&types=RESTOCK,SUPPLIER_PURCHASE_ORDER_RECEIVE&from=2026-06-01T00:00:00.000Z" \
  -H "Authorization: Bearer klu_live_replace_me"

Example response

{
  "data": [
    {
      "id": "inventory-log-id",
      "createdAt": "2026-06-24T09:30:00.000Z",
      "type": "RESTOCK",
      "quantity": 20,
      "previousStock": 5,
      "currentStock": 25,
      "product": {
        "id": "product-id",
        "sku": "SKU-001",
        "name": "Blue Dream",
        "category": { "id": "category-id", "name": "Flower", "unit": "WEIGHT" }
      },
      "store": { "id": "store-id", "name": "Main Branch", "branchNo": "001" },
      "room": { "id": "room-id", "name": "Back Room", "forSale": false },
      "moveRoom": null,
      "references": {
        "saleId": null,
        "shipmentId": "shipment-id",
        "purchaseOrderId": null,
        "transferOrderId": null,
        "supplierPurchaseOrderId": null
      }
    }
  ],
  "pagination": { "nextCursor": "next-log-uuid" },
  "meta": {
    "dateRange": {
      "from": "2026-06-01T00:00:00.000Z",
      "to": "2026-06-24T23:59:59.999Z"
    }
  }
}

Common errors

  • 400: invalid movement type, date range, filter, limit, cursor, or UUID.
  • 401: invalid key.
  • 403: requested storeIds are outside the organization.
  • 429: rate limit exceeded.

AI-agent notes

Read pages until pagination.nextCursor is absent to build complete movement history. Use createdAt as the movement timestamp and the before/after stock fields to verify the effect. This read-only response intentionally omits internal reasons, employee identities, and cost data.

On this page