Inspecting a returned part and deciding what happens to itAll articles

Inspecting a returned part and deciding what happens to it

The refund ends the reversal for the customer, not for the part. This case shows what happens to a returned used part in the warehouse.

Published: 2026-09-12Reading time: 4 mintapinomahub API & workflows
API & processesLogistics & inventoryRecyclingAPI

A control unit comes back: the buyer writes that it does not fit. On unpacking, a damaged connector turns up. Whether the part may go back on sale, has to be repaired or is recycled is decided not by the buyer’s return reason but by inspection at goods-in.

Inspecting a returned part and deciding what happens to itInput: a returned part is lying in goods-in 1. Record the return (POST /commerce/v1/returns): reasonCode such as damaged, incompatible or buyer_withdrawal, plus receivedAt 2. Inspect the goods (POST /commerce/v1/returns/{returnId}/review): per line reviewedQuantity and finding: accepted, rejected or attention_required 3. Decide the disposition (POST /commerce/v1/returns/{returnId}/disposition): restock, repair, recycle, dispose or hold — per line 4. Read the inventory ledger (GET /commerce/v1/inventory/ledger): entryType, quantityDelta and balance per stocked piece 5. Update the stocked piece (PUT /commerce/v1/stock-items/{stockItemId}): condition and locationKey after inspection Output: a returned part whose further path is decided and traceable in stock Inspection and disposition are two decisions. Accepted does not mean sellable again.Inspecting a returned part and deciding what happens to itInput: a returned part is lying in goods-in01Record the returnPOST /commerce/v1/returnsreasonCode such as damaged, incompatible or buyer_withdrawal, plus receivedAt02Inspect the goodsPOST /commerce/v1/returns/{returnId}/reviewper line reviewedQuantity and finding: accepted, rejected or attention_required03Decide the dispositionPOST /commerce/v1/returns/{returnId}/dispositionrestock, repair, recycle, dispose or hold — per line04Read the inventory ledgerGET /commerce/v1/inventory/ledgerentryType, quantityDelta and balance per stocked piece05Update the stocked piecePUT /commerce/v1/stock-items/{stockItemId}condition and locationKey after inspectionOutput: a returned part whose further path is decided and traceable in stockInspection and disposition are two decisions. Accepted does not mean sellable again.
Five calls from goods-in to the updated stocked piece. Inspection and disposition are separate decisions.

The contract therefore separates three statements that everyday practice likes to put in one field: why the buyer is returning, what inspection finds and what happens to the part. Accepted does not mean sellable again — the disposition is decided in a call of its own.

SurfaceRoles
CommerceParts trading, Vehicle recyclers

What this case requires

  • An order with lines. The return references salesOrderId and the returned lines.
  • Inspection by someone who knows the part. The disposition decision is technical, not administrative.
  • Fixed reasons for findings and disposition. reasonCode is your own lower-case code here; an in-house catalogue keeps it consistent.
  • An expected revision. Inspection and disposition require expectedRevision; according to the contract, the return itself carries no revision.

The sequence

The table names the responsible call per stage and what exists afterwards. The reasoning for why a stage cannot be skipped follows below it.

The call chain of this use case
StageCallWhat exists afterwards
Record the returnPOST /commerce/v1/returnsreasonCode such as damaged, incompatible or buyer_withdrawal, plus receivedAt
Inspect the goodsPOST /commerce/v1/returns/{returnId}/reviewper line reviewedQuantity and finding: accepted, rejected or attention_required
Decide the dispositionPOST /commerce/v1/returns/{returnId}/dispositionrestock, repair, recycle, dispose or hold — per line
Read the inventory ledgerGET /commerce/v1/inventory/ledgerentryType, quantityDelta and balance per stocked piece
Update the stocked piecePUT /commerce/v1/stock-items/{stockItemId}condition and locationKey after inspection

Why each stage is needed

  1. Record the return. POST /commerce/v1/returns takes salesOrderId, the lines, reasonCode with not_as_described, damaged, incompatible, buyer_withdrawal or other, and optionally receivedAt. That is the buyer’s reason — not yet a finding.
  2. Inspect the goods. POST /commerce/v1/returns/{returnId}/review takes decision with accept, reject, partial or attention_required and per line reviewedQuantity, finding and reasonCode. The response names decisionActorReference: the inspection is attributed to an actor.
  3. Decide the disposition. POST /commerce/v1/returns/{returnId}/disposition decides per line between restock, repair, recycle, dispose and hold. hold is a value of its own for disposition; the contract describes no effect on offers.
  4. Read the inventory ledger. GET /commerce/v1/inventory/ledger returns per entry entryType, quantityDelta and balance. entryType knows physical_set, safety_stock_set, reserved, released, consumed and expired; the contract describes no link to the disposition decision.
  5. Update the stocked piece. PUT /commerce/v1/stock-items/{stockItemId} sets condition with new, used or refurbished and locationKey afresh. If condition or location changes after inspection or repair, the change belongs in the stocked piece, not in a note.
Decide the disposition of a line
curl -X POST \
  -H 'X-Api-Key: <API_KEY>' \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: verwendung-ruecksendung-4711' \
  -d '{"lines":[{"lineId":"<lineId>","quantity":1,"disposition":"repair","reasonCode":"<reasonCode>"}],"expectedRevision":"<revision>"}' \
  'https://commerce-preview.invalid/commerce/v1/returns/<returnId>/disposition'

What you end up with

In the end every returned part has a decided path, an attributed inspection and updated stock. For the control unit with the damaged connector, repair has been set.

Where to find this in the documentation

The binding field lists, error codes and sample responses live in this surface’s OpenAPI contract at docs.tapinomahub.com (tapinoma-commerce). All use cases arranged by surface and role: overview of the use cases.

Frequently asked

Why are inspection and disposition two calls?

Because they answer two questions. Inspection says what arrived; disposition says what happens to it. An accepted part can still go into repair.

What is hold for?

hold is one of the five values of disposition. The contract describes neither a purpose nor an effect on offers.

Does the disposition automatically change the stocked piece’s condition?

You update condition and location in the stocked piece. The inventory ledger shows the entries per stocked piece; the contract describes no link to the disposition decision.