Ditextil Inventory

Operaciones completas para la API de inventario Ditextil

📥 Recepción → Crear Recepción

AI-generated

Summary

Creates a stock reception (goods-in order) in the Ditextil inventory system by POSTing to /api/orders/receptions with a warehouse, optional supplier, and a JSON list of line items. The request is tagged with source "n8n".

Inputs

  • receptionWarehouseId (required) — Destination warehouse ID, chosen from a list loaded from /api/warehouses. Sent as warehouse_id.
  • receptionItemsJson (required) — JSON array of reception lines, e.g. [{"product_id": 15, "quantity": 1}]. Parsed and sent as items. Invalid JSON throws "Líneas JSON debe ser JSON válido". The node does not validate line structure; the API does.
  • receptionSupplierId — Supplier ID, chosen from a list loaded from /api/supplier-records. Sent as supplier_id only if it converts to a non-zero number.
  • receptionSupplierName — Free-text supplier name, sent as supplier_name. Omitted if empty.

Output shape

The parsed JSON response from the Ditextil API for the created reception, emitted as one output item per input item (an array response would be split into multiple items). The exact fields depend on the API.

Empty body fields are dropped before sending. If Continue On Fail is enabled, a failed item returns {error: message} instead of stopping the workflow. The parameters are read per input item, so expressions can vary each run. Requires ditextilApi credentials with a base URL.

Examples

Example 1: Register a supplier delivery of fabric rolls into the main warehouse

Select the supplier in ID Proveedor, select the warehouse in ID Bodega, and set Líneas JSON to [{"product_id": 15, "quantity": 20}, {"product_id": 22, "quantity": 8}].

Example 2: Create a reception from upstream data for a supplier not in the catalog

Set Proveedor / Nombre to {{$json.supplier}}, set ID Bodega, and set Líneas JSON to the expression {{JSON.stringify($json.lines)}}.

Links

Discussion