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.
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.
| Surface | Roles |
|---|---|
| Commerce | Parts trading, Vehicle recyclers |
What this case requires
- An order with lines. The return references
salesOrderIdand the returned lines. - Inspection by someone who knows the part. The disposition decision is technical, not administrative.
- Fixed reasons for findings and disposition.
reasonCodeis 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.
| Stage | Call | What exists afterwards |
|---|---|---|
| Record the return | POST /commerce/v1/returns | reasonCode such as damaged, incompatible or buyer_withdrawal, plus receivedAt |
| Inspect the goods | POST /commerce/v1/returns/{returnId}/review | per line reviewedQuantity and finding: accepted, rejected or attention_required |
| Decide the disposition | POST /commerce/v1/returns/{returnId}/disposition | restock, repair, recycle, dispose or hold — per line |
| Read the inventory ledger | GET /commerce/v1/inventory/ledger | entryType, quantityDelta and balance per stocked piece |
| Update the stocked piece | PUT /commerce/v1/stock-items/{stockItemId} | condition and locationKey after inspection |
Why each stage is needed
- Record the return.
POST /commerce/v1/returnstakessalesOrderId, the lines,reasonCodewithnot_as_described,damaged,incompatible,buyer_withdrawalorother, and optionallyreceivedAt. That is the buyer’s reason — not yet a finding. - Inspect the goods.
POST /commerce/v1/returns/{returnId}/reviewtakesdecisionwithaccept,reject,partialorattention_requiredand per linereviewedQuantity,findingandreasonCode. The response namesdecisionActorReference: the inspection is attributed to an actor. - Decide the disposition.
POST /commerce/v1/returns/{returnId}/dispositiondecides per line betweenrestock,repair,recycle,disposeandhold.holdis a value of its own fordisposition; the contract describes no effect on offers. - Read the inventory ledger.
GET /commerce/v1/inventory/ledgerreturns per entryentryType,quantityDeltaandbalance.entryTypeknowsphysical_set,safety_stock_set,reserved,released,consumedandexpired; the contract describes no link to the disposition decision. - Update the stocked piece.
PUT /commerce/v1/stock-items/{stockItemId}setsconditionwithnew,usedorrefurbishedandlocationKeyafresh. If condition or location changes after inspection or repair, the change belongs in the stocked piece, not in a note.
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.
Sources and legal references
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.
