JSON Connector: Inventory Reports

  • Updated

The JSON connector can both send your stock to a partner and receive a partner's stock as JSON files. Use it when the partner can ingest a simple JSON payload over webhook, FTP, SFTP, or email.

Before you start

  • An active JSON connector with a delivery target configured (webhook, FTP, SFTP, or email).
  • Your brand uses the modern inventory engine (reservations v4). Contact support if you are unsure.
  • Every inventory location you intend to share has a unique Location code.

Set a code on every inventory location

  1. Go to Settings → Inventory Locations in the left menu.
  2. Open the location you want to share.
  3. In the Location code field, enter a short identifier you and the partner agree on (e.g. WH-MAIN, DK-CPH-1, or the location's GLN).
  4. Click Save location.

Important: Location codes must be unique within the brand. The partner uses these codes to address rows in inbound files.

Configure the connector

  1. Go to Settings → Connectors and open the JSON connector.
  2. Scroll to Inventory report settings.
  3. Pick the locations to share in Inventory locations.
  4. Pick a Default inventory location (for imports). This is used when an inbound file does not name a location.
  5. Configure the remaining options (see field reference below).
  6. Click Save.
FieldDescriptionRequired
Inventory locationsThe locations whose stock is exported and that imports may write to.Yes
Default inventory location (for imports)Fallback target when an inbound file omits the code.No
Include incoming inventory in exportWhen on, future PO arrivals are added to each item as incoming entries.No
Emit one export file per inventory locationOn (default): one JSON file per location. Off: all locations are merged into a single file.No
Export interval (minutes)How often an automatic export runs. Leave blank to use the default of 60 minutes.No

Set up the customer connection

  1. On the connector page, find the customer in the connections table and click Edit. (Or edit the customer profile and add the JSON connection there.)
  2. Under Export documents, tick Inventory Reports to enable outbound exports.
  3. Under Import documents, tick Inventory Reports to enable inbound imports.
  4. Optionally fill in Inventory report export interval (minutes) to override the connector's interval for just this customer.
  5. Click Save connection.

How export works

TRAEDE automatically queues an export for each customer connection where the export interval has elapsed. The default schedule runs every 5 minutes and dispatches the export only when the interval has elapsed for the connection.

Each scheduled run produces one or more JSON files (depending on Emit one export file per inventory location) and delivers them via the connector's configured target.

The payload looks like this:

Field pathDescription
inventory_report.generated_atISO 8601 timestamp the export was generated.
inventory_report.locations[]One entry per inventory location.
locations[].id / locations[].nameThe TRAEDE location id and its display name.
locations[].codeThe Location code — use this to match rows on import.
locations[].glnThe location address GLN, if set.
locations[].items[]One entry per variant with stock at the location.
items[].sku / items[].ean / items[].item_numberVariant identifiers.
items[].quantityAvailable (disposable) quantity.
items[].allocated / items[].level_quantityCurrently allocated quantity and the underlying physical stock level.
items[].incoming[]Future PO arrivals (only present when Include incoming inventory in export is on).

Tip: Stock with zero available quantity and no incoming arrivals is omitted from the payload.

How import works

Inbound JSON files are received via the delivery target you have configured (FTP/SFTP scan, webhook ingestion, or email attachment) and routed to the connector. For each file:

  1. Each locations[] entry's code is matched to a TRAEDE inventory location with the same Location code.
  2. If the entry has no code, the connector's Default inventory location is used.
  3. If the code is not in the connector's allowed locations, the file fails with a validation error.
  4. Each items[] entry's quantity (or available_quantity) is treated as the partner's available stock for that variant.
  5. TRAEDE sets the location's in-stock quantity to available + currently allocated, so the available quantity in TRAEDE matches the file.

Note: incoming rows are dropped on import. Future arrivals must go through the purchase order system, not inventory adjustments.

Verifying

Open the connector and find the connection in the list. Each connection shows a Last exported at timestamp, updated after every successful export.

For deeper inspection, go to Document exchange in the left menu and filter by document type:

  • inventory_report_push — outbound JSON exports.
  • inventory_report — inbound JSON imports.

Each entry stores the JSON payload and a processing log so you can confirm what was sent or received.

Limitations

  • Requires the modern inventory engine. Brands still on the legacy engine cannot use inventory reports yet.
  • Sell-ahead and future-dated stock cannot be imported — only the current available quantity is honored.
  • Bundles are included in the export but are not specially handled on import (they are treated as regular variants).
  • If the connector has multiple customer connections, the inbound JSON file must include enough context to identify the customer (typically the connection id, set by your delivery integration). Without it, TRAEDE only auto-detects the customer when the connector has a single connection.

Was this article helpful?

0 out of 0 found this helpful