Skip to Content
Client API 2026-09Held Shipments (Stocks)

Held Shipments (Stocks)

A stock (Italian giacenza) is opened by the carrier when a shipment cannot be delivered — recipient absent, wrong address, refused parcel — and is held at the depot waiting for the sender’s instructions. The shipment status becomes held_at_depot (6) or awaiting_instructions (9).

Stocks are visible to the client with the stock.opened / stock.closed webhook events and through these endpoints.

List stocks

GET /stocks?status=open|instructed|closed|all&trackingNumber= — paginated

Query parameterDescription
statusopen (default) — waiting for instructions; instructed — instructions sent (confirmed or not); closed; all
trackingNumberExact LDV

Stock detail

GET /stocks/{id}

{ "id": 9812, "trackingNumber": "DEMO05407027", "shipmentId": 4454058, "dossierId": "GIA-2026-000123", "status": { "code": 0, "key": "open", "label": "Aperta" }, "carrier": { "code": "brt", "name": "BRT", "contractCode": "brt-standard", "contractName": "BRT Standard" }, "notes": "Destinatario assente", "deposit": { "status": "IN GIACENZA", "releasable": true, "startDate": "2026-09-05T09:12:00+02:00", "endDate": null, "motivationId": "03" }, "cod": { "oldAmount": 25.5, "newAmount": null }, "totalPrice": 0, "lastAction": null, "releasedTrackingNumber": null, "openedAt": "2026-09-05T09:12:00+02:00", "releasedAt": null, "createdAt": "2026-09-05T09:15:31+02:00" }
FieldTypeDescription
idintegerStock id — use it in /stocks/{id}/actions
trackingNumber, shipmentIdstring, integerShipment the stock belongs to
dossierIdstring|nullDossier number assigned by the carrier. After a release the carrier may reissue the LDV and open a second dossier
status.keystringopen, instructed (sent, not confirmed by the carrier), confirmed, closed
depositobjectRaw depot information from the carrier: status, releasable, startDate, endDate, motivationId (carrier reason code)
codobjectoldAmount — original COD; newAmount — COD requested with the instructions
totalPricenumberTotal cost of the actions charged for this stock
lastActionobject|nullLast instruction sent: action, actionCode, label, scheduledAt, confirmed, notes, createdAt
releasedTrackingNumberstring|nullNew LDV issued by the carrier after the release
openedAt, releasedAt, createdAtdatetime|null

Send release instructions

POST /stocks/{id}/actions

Tells the carrier what to do with the held parcel. Possible once per stock: a second call answers 409 invalid_state.

FieldTypeRequiredDescription
actionstringYesRETRY — deliver again · NEWADDRESS — deliver to a new address · RETURN — return to sender · DESTROY — destroy the parcel · ONSITECOLLECTION — the recipient collects it at the depot
scheduledAtdateNoYYYY-MM-DD date of the new delivery attempt (default: tomorrow)
notesstring (255)NoNotes for the carrier
cod.oldAmount, cod.newAmountnumberNoChange the cash on delivery amount on the redelivery
newAddressobjectFor NEWADDRESSname, street, city, province, postalCode required; countryCode (default IT), phone, notes optional
{ "action": "NEWADDRESS", "scheduledAt": "2026-09-08", "notes": "Deliver to the office", "newAddress": { "name": "Giulia Bianchi", "street": "Via Nazionale 5", "city": "Roma", "province": "RM", "postalCode": "00184", "countryCode": "IT", "phone": "+39 333 7654321" } }

What happens:

  1. The instruction is recorded and the stock becomes instructed.
  2. On carriers with canManageStocks: true the instruction is sent to the carrier immediately; if accepted, the stock becomes confirmed and lastAction.confirmed is true. On the other carriers the platform operators forward it.
  3. The cost of the action according to your price list is charged to the credit and added to totalPrice.
HTTPcodeWhen
404not_foundUnknown stock or stock of another client
409invalid_stateInstructions were already sent for this stock
422validation_failedUnknown action, missing newAddress for NEWADDRESS, …
502carrier_errorThe carrier refused the instruction; the reason is in message

Carriers keep parcels for a limited number of days before returning them automatically. Subscribe to stock.opened to react in time.

Last updated on