Ditextil Inventory

Operaciones completas para la API de inventario Ditextil

📊 Stock → Crear Movimiento

AI-generated

Summary

Records a manual inventory movement (entry, exit, or adjustment) for one product in one warehouse via the Ditextil API, for each input item.

Inputs

  • ID Producto (movementProductId) (required) — Numeric ID of the product to move.
  • ID Bodega (movementWarehouseId) (required) — Warehouse the movement applies to, chosen from a list loaded from the API.
  • Tipo Movimiento (movementType) — Entrada (+) = 'in' (default), Salida (-) = 'out', or Ajuste = 'adjustment'. Adjustment uses a different endpoint.
  • Cantidad (quantity) (required) — Quantity to move. Default 1.
  • Motivo (reason) — Free-text reason for the movement. Sent as an empty string if blank.
  • Actor (actor) — Who performed the movement, for audit. Defaults to 'n8n'.

Output shape

The JSON response from the Ditextil API, emitted as one or more n8n items for each input item. Each is linked to its input item.

The source doesn't show the response fields. Entry and exit types POST to /api/inventory/movements with movement_type. Adjustment POSTs to /api/inventory/adjustments with no movement_type, so the API decides how quantity is interpreted. If Continue On Fail is on, a failed item returns {error: message} instead of stopping the workflow.

Examples

Example 1: Add 50 units of product 15 to the main warehouse after a manual count.

ID Producto=15, ID Bodega=main warehouse, Tipo=Entrada (+), Cantidad=50, Motivo='Conteo manual'

Example 2: Correct stock for a product after an inventory audit.

Tipo=Ajuste, ID Producto and ID Bodega set, Cantidad=corrected value, Actor='auditoria'

Links

Discussion