Contents

Connect a warehouse

Hand orders to your warehouse system and get back shipments, stock and returns, with a T-Data or FFW compatible interface.

How it works

Nucleo Commerce hands orders to your warehouse management system (WMS) and receives back acknowledgements, shipments, stock levels and return outcomes. Nucleo offers two compatible interfaces, so a WMS that already integrates one of these protocols only changes the base URL and the credentials:

InterfaceProtocolFormatReference
T-DataT-Data "Integration MoR/WMS" /V1JSONWMS T-Data
FFWFFW / Smart Shop web servicesXML (ISO-8859-1)WMS FFW

In both cases the warehouse is always the caller: Nucleo never calls the WMS. The WMS polls for new orders and returns, and pushes everything else.

Before you start

The merchant does these steps in Nucleo; you need their output.

  1. In Nucleo, go to Commerce > Orders > Channels and logistics and add a warehouse connection of type T-Data or FFW.
  2. Copy the credentials shown on screen. They are shown once: endpoint, username and password, plus an API key for T-Data. Share them with the warehouse over a channel separate from the documentation.
  3. Link the warehouse location(s) to the connection and set the warehouse codes the WMS uses (IdWarehouse for T-Data, IDMagazzino for FFW).
  4. Check that every destination the warehouse serves has a carrier rule: an order without a carrier stays on hold and never reaches the WMS.
  5. Optionally restrict the connection to the warehouse's static outbound IPs (IP allowlist).
  6. Set the connection status to Active. A new connection is a draft and answers service not active until then.

Base URL: https://api-commerce.nucleoplatform.com (or the endpoint shown with the credentials). Paths are exactly those of the protocol.

Credentials on every call: send them preemptively. A 401 carries no WWW-Authenticate challenge.

Rotating credentials: Rotate credentials on the connection page invalidates the old ones immediately.

Warehouse connections are part of Nucleo Orders. If the menu is not visible, ask Nucleo to enable Orders for the company.

T-Data flow

Authenticate with X-Api-Key: <key> (recommended), Authorization: Bearer <key>, or HTTP Basic.

  1. Poll new orders: GET /V1/Orders/New every 1 to 5 minutes. You get the paid, released orders allocated to your warehouse, only your lines, at most 500 per call, oldest first.
  2. Acknowledge each order: POST /V1/Orders/Acknowledge (object or array).
    • Success: true with your WmsOrderNumber: the order is yours and leaves Orders/New.
    • Success: false with an ErrorcCode: the merchant fixes the order and releases it again; it comes back in Orders/New.
    • Until you acknowledge, the order is returned at every call. A lost response is never a lost order.
  3. Keep stock flowing: PUT /V1/Stock/Update whenever stock changes, with absolute levels per item and classification. Your levels must already exclude the orders you acknowledged; Nucleo subtracts the ones you have not acknowledged yet. Items you do not send are not zeroed.
  4. Report the pick: POST /V1/Orders/Processed with picked quantities, lots, serials and parcels. A short pick marks the missing quantity as unfulfillable and alerts the merchant.
  5. Report the shipment: POST /V1/Orders/Shipped with CourierCode and CourierWaybill. Nucleo creates the fulfilment on the sales channel and the customer gets the tracking.
  6. Cannot fulfil: POST /V1/Orders/Canceled on an acknowledged order the warehouse cannot ship. The merchant cancels and refunds it.
  7. Poll expected returns: GET /V1/Returns/New, then POST /V1/Returns/Acknowledge.
  8. Report the inspection: POST /V1/Return/Update with ExternalReference1 = the OmsReturnNumber, quantities and Classification per line. All expected items Sellable = compliant, refund follows; anything else goes to customer service. A parcel nobody announced still goes through Return/Update: Nucleo opens an unannounced return.
  9. Expected return that will not arrive: POST /V1/Returns/Canceled.

Optional services are off by default and answer 404 until the merchant enables them: courier labels generated by Nucleo (/V1/Labels/Get, /V1/Labels/Add), order documents (/V1/Documents/Get), WMS item registry (/V1/Catalogue).

Cancellations seen from the warehouse

  • Cancelled on the sales channel before you download it: you never see it.
  • Cancelled after download but before acknowledgement: it disappears from Orders/New. If you acknowledge it anyway, the merchant is alerted and contacts you.
  • Cancelled after acknowledgement: the T-Data contract has no cancel call towards the WMS. The merchant contacts you through the procedure you agreed. If you ship it meanwhile, Nucleo records the shipment and alerts the merchant.

FFW flow

Authenticate with HTTP Basic.

  1. Poll orders: GET /api/admin/ws/ws_orders?documenti_stati_ID[]=17&documenti_stati_ID[]=2&documenti_stati_ID[]=31&last_upd=YYYYMMDDHHMMSS every 1 to 5 minutes. As next last_upd, use either the last ord_DataUltimaModifica you received or the time of your previous call: both are safe. If you receive a full page (500 orders), call again at once.
  2. Take over: there is no acknowledgement call. An order returned with state 17 is taken over by the warehouse, as in FFW.
  3. Follow changes: the same call returns again
    • with state 17 an order the merchant changed (address, notes, cancelled lines): update it by ord_ID;
    • with state 2 an order cancelled after you downloaded it: stop picking it;
    • with state 31 an order you reported as shipped.
  4. Keep stock flowing: POST /api/aggiorna-giacenze-impegni with absolute levels per EAN and warehouse code, at most 500 <articolo> per call (above the limit nothing is processed). Add ?full=1 for a complete snapshot. Items you do not send are not zeroed.
  5. Report the shipment: POST /api/admin/spedizioni/notify-spedizione with carrier, tracking per parcel and shipped items (Nucleo extension; XML, or JSON with the T-Data Orders/Shipped fields). Nucleo creates the fulfilment on the sales channel.
  6. Poll returns: GET /api/admin/resi/list?last_upd=dd/mm/yyyy hh:mm:ss. The filter is >=, so a return can come back twice: update it by reso_ID.
  7. Report what arrived: POST /api/admin/resi/notify-reso with items and quantities received. Exactly as expected = confirmed (state 2); otherwise anomalous (state 3) and handled by customer service.
  8. Documents (when needed): GET /api/admin/documenti/get-order-docs?documenti_testa_ID=<ord_ID>&type=sell returns base64 PDFs.

When the merchant has Nucleo generate courier labels (off by default), replace step 5 with: POST get-etichette-corriere (one PDF label per parcel) → optionally POST del-etichette-corriere to void → POST ws-close-bordero at the end of the day, which confirms the shipments and marks the orders shipped.

Cancellations seen from the warehouse

  • Cancelled before you download it: you never see it, with any state.
  • Cancelled after download: it comes back with state 2. Nucleo considers the cancellation done once you have read it.

Rules for both interfaces

TopicRule
Polling cadenceEvery 1 to 5 minutes for orders and returns. If the WMS stays silent for more than 30 minutes while orders are waiting, the connection turns to Error and the merchant is alerted; the next successful call clears it.
Rate limit600 calls per minute per connection, all endpoints together. 30 failed logins in 5 minutes block the caller IP for the rest of the window. No Retry-After header: back off at least 60 seconds on 429.
RetriesEvery write can be retried after a timeout: repeated acknowledgements, shipments with the same tracking, stock levels and return outcomes have no double effect.
All or nothingCalls carrying several items are validated first; one invalid item rejects the whole call.
Item codeThe variant barcode (EAN), unless the merchant agreed another code with you.
HoldsOrders on hold (payment pending, hold tag, fraud risk, manual hold, no carrier rule, item without code) never reach the warehouse.
Paused connectionThe merchant can pause the connection. Calls then answer service paused and nothing is read or written: retry later.
SupportEvery call is logged in full. Report the time, the endpoint, the order or return number and, if present, the ref of an Internal error (ref …) response.

Go-live checklist

Run the scenarios in order against a test merchant with test orders before switching production. Use a WMS test environment if you have one; otherwise make sure test orders are never picked or shipped physically.

T-Data

#ScenarioWarehouse doesExpected in Nucleo
1CredentialsGET /V1/Orders/New without, then with credentials401 without; 200 with an empty or full Content
2New ordersRead Orders/New after the merchant creates 4 test orders (domestic standard, foreign with company and notes, express, multi-line with quantity 2)All 4 returned with the documented fields; status Exported
3Re-readRead again without acknowledgingSame 4 orders, no duplicates
4AcknowledgeAcknowledge 3 orders with Success: true and WmsOrderNumberStatus Acknowledged, WMS number visible; only the 4th remains in Orders/New
5RejectAcknowledge the 4th with Success: false and a codeRejected by warehouse, merchant alerted; after the fix it reappears and you acknowledge it
6Full pickOrders/Processed with all quantities and 2 parcelsProcessed, parcels with weight and size
7ShipmentOrders/Shipped with courier, waybill, return waybill; send it twiceShipped, fulfilment with tracking on the sales channel; no second shipment
8Short pickOn the multi-line order, Processed with 1 of 2, then Shipped1 fulfilled, 1 unfulfillable, merchant alerted; channel fulfilment of 1 item
9Cannot fulfilOrders/Canceled on an acknowledged orderCancelled by warehouse, merchant alerted
10Channel cancellationsMerchant cancels one order before your read, one between read and acknowledge, one after acknowledgeFirst never seen; second leaves Orders/New; third follows the agreed manual procedure
11Stock, deltaStock/Update with a few items, Sellable and UnsellableLevels stored per classification; published availability net of unacknowledged orders
12Stock, edge casesFull snapshot; unknown EAN; older EventDateTime; StockLevel: 0Snapshot applied; unknown EAN skipped with an alert; old value ignored; item at zero
13Expected returnReturns/New, then Returns/AcknowledgeReturn listed with items; then Awaited at warehouse
14Compliant returnReturn/Update with the expected quantities, SellableCompliant, refund forwarded
15Non-compliant returnReturn/Update with an Unsellable line and a ReturnCode, or a different quantityNot compliant, customer service alerted, code stored
16Unannounced returnReturn/Update with an unknown ExternalReference1, sent twiceOne unannounced return, merchant alerted
17Cancelled returnReturns/Canceled on an expected return; then a Return/Update on itCancelled; goods recorded and merchant alerted
18RobustnessMalformed JSON; an Acknowledge array with one unknown order; lowercase path; Stock/Update via POST400 with a message and nothing applied; path and method accepted
19Optional servicesLabels/Get, Documents/Get, Catalogue404 with message, unless the merchant enabled them
20VolumeRead and acknowledge at least 50 consecutive ordersNo order lost or duplicated

FFW

#ScenarioWarehouse doesExpected in Nucleo
1Credentialsws_orders without, then with credentials and last_upd one hour ago401 with the KO envelope; then <ordini/> or orders
2New ordersws_orders with state 17 and last_upd, after the merchant creates 4 test orders (domestic, EU, with company and notes, multi-line)All 4 with state 17; taken over in Nucleo
3Incremental readCall again with last_upd = last ord_DataUltimaModifica, then with the time of the previous callNothing repeated or lost; a new order appears exactly once
4Filters and errorsdata_dal/data_al; a range over one month; no date; documenti_tipo_ID=3Results and KO messages as documented; empty list for type 3
5Change after readMerchant changes the address of a downloaded order; you re-readOrder back with state 17 and the new address; WMS updates it by ord_ID
6Cancel after readMerchant cancels a downloaded order; you read states 17 and 2Order back with state 2; then Cancelled in Nucleo
7Cancel before readMerchant cancels a new order before your readNever returned
8Shipmentnotify-spedizione with 2 parcels and tracking; send it twiceShipped, channel fulfilment with tracking, order back with state 31; no second shipment
9Partial shipmentnotify-spedizione with only one of two itemsOnly that item fulfilled; the rest stays open for customer service
10StockSame EAN on two warehouse codes; an unknown EAN; an item at 0OK; quantities summed; unknown EAN skipped with an alert; availability published net of unread orders
11Stock limitsMore than 500 items; malformed XML; ?full=1KO with nothing processed; KO; OK with full republication
12Read returnsMerchant creates 2 returns; resi/list with data_dal, then last_upd, then resi_stati_ID=1&limit=10Returns with state 1, reason and items
13Compliant returnnotify-reso with the expected itemsConfirmed; state 2 in resi/list
14Anomalous returnnotify-reso with a different quantity or an unexpected itemAnomalous, customer service alerted; state 3
15All or nothingnotify-reso with one valid and one unknown returnKO, nothing updated
16Cancelled returnMerchant cancels a return; you send notify-reso anywayOK, goods recorded, merchant alerted; state 4
17DocumentsDocuments call with type=sellACK OK with a readable PDF, or ERROR without documents
18Labels and bordereauget-etichette-corriere, ws-close-bordero (also as //api/…)404 with their envelopes, unless the merchant enabled Nucleo labels
19EncodingOrder with accented and non-Latin names (Łukasz, Kraków)Accented letters readable in ISO-8859-1, others as numeric entities
20VolumeAt least 50 consecutive orders and a 500-item stock callNo order lost or duplicated

Ready for production when every scenario passes, the code tables you use (state, reason, country, carrier, rejection and return codes) are loaded on the connection by the merchant and re-tested, and the production connection has new credentials of its own.