Decide a returned parcel as the goods owner
All field references · Returns
POST /v1/returns/parcels/decisions
The goods owner decides reship, unpack, scrap or hold, or replaces the note. Send the client order and the parcel code or id. The warehouse still carries out the physical step. A stale expected_version is rejected. A test key cannot change real parcels.
Required scopes: "returns:decide".
#Request body
Request body required.
Content type: application/json
| Field | Type | Presence | null | Meaning, limits and examples |
|---|---|---|---|---|
| $ (whole value) | object | Whole value | Not allowed | Additional properties are not allowed. |
| idempotency_key | string | Required when parent is present | Not allowed | New UUID per intended owner decision. Retry the same key and body for the same result. format: "uuid". |
| source_order_id | string | Required when parent is present | Not allowed | The goods owner's own order. The parcel is resolved through the fulfillment transfer of this order. format: "uuid". |
| parcel_id | string | Optional | Not allowed | Return parcel on the fulfiller copy. Omit when code is sent. format: "uuid". |
| code | string | Optional | Not allowed | KF code of the parcel, for example KF-0002. Omit when parcel_id is sent. minLength: 1. maxLength: 40. |
| expected_version | integer | Required when parent is present | Not allowed | Parcel version from the last read. A mismatch is wms_version_conflict. minimum: 1. maximum: 2147483647. |
| kind | string | Required when parent is present | Not allowed | decide records the outcome. note replaces the note. enum: ["decide","note"]. |
| decision | string | Optional | Not allowed | Required for decide: reship, unpack, scrap, or hold. enum: ["reship","unpack","scrap","hold"]. |
| note | string | Optional | Not allowed | Decision note or the note body, 1 to 1000 characters. Required for note. minLength: 1. maxLength: 1000. |
| reship_address | object | Optional | Not allowed | Replacement address stored with a reship decision. The label itself is created separately. Omit when the decision is not reship. |
| reship_address.{key} | string or number or boolean or null | Every additional entry | Allowed by schema | One replacement-address field: text, number, boolean or null. Omit the whole address when the decision is not reship. |
#Response 200
200: Success
Content type: application/json
| Field | Type | Presence | null | Meaning, limits and examples |
|---|---|---|---|---|
| $ (whole value) | object | Whole value | Not allowed | Additional properties are not allowed. |
| data | object | Required when parent is present | Not allowed | Authorized response payload or documented event data. Additional properties are not allowed. |
| data.parcel_id | string | Required when parent is present | Not allowed | Return parcel the decision applied to. format: "uuid". |
| data.code | string | Required when parent is present | Not allowed | Case code, for example KF-0001. |
| data.kind | string | Required when parent is present | Not allowed | decide or note. |
| data.status | string | Required when parent is present | Not allowed | Parcel status after the decision. enum: ["open","awaiting_owner","decided","closed"]. |
| data.decision | alternative (anyOf) | Required when parent is present | Allowed by schema | Stored decision. Null until someone decides. |
| data.decision | string | Conditional: anyOf 1/2 | Not allowed | anyOf 1/2: At least one alternative must match. Stored decision. Null until someone decides. enum: ["reship","unpack","scrap","hold"]. |
| data.decision | null | Conditional: anyOf 2/2 | Allowed by schema | anyOf 2/2: At least one alternative must match. Stored decision. Null until someone decides. |
| data.decision_side | alternative (anyOf) | Required when parent is present | Allowed by schema | Who decided. Null until someone decides. |
| data.decision_side | string | Conditional: anyOf 1/2 | Not allowed | anyOf 1/2: At least one alternative must match. Who decided. Null until someone decides. enum: ["operator","owner"]. |
| data.decision_side | null | Conditional: anyOf 2/2 | Allowed by schema | anyOf 2/2: At least one alternative must match. Who decided. Null until someone decides. |
| data.version | integer | Required when parent is present | Not allowed | Parcel version after the decision. exclusiveMinimum: 0. |
#Response 401, 403, 404, 409, 422, 429, 500, 503
401: The key is missing, unknown, revoked or expired. 403: The key lacks a required scope, or the operation requires a live key. 404: Not found. Also applies to IDs that belong to another organization — we deliberately do not distinguish between "does not exist" and "does not belong to you". 409: The same ID already exists with different content. It is never overwritten. 422: Content validation failed. The response lists all affected locations at once. 429: A rate limit was reached and the request did not run. Wait for Retry-After, then repeat it unchanged. X-RateLimit-Scope names the limit: key (120 requests per minute), organization (300 per minute across all keys), write (1,000 at once, refilling at 60 per minute) or list (300 unfiltered list pages at once, refilling at 10 per minute). 500: Unexpected error on our side. 503: Temporarily unavailable. Repeat the same request with the same business identity.
Content type: application/json
| Field | Type | Presence | null | Meaning, limits and examples |
|---|---|---|---|---|
| $ (whole value) | object | Whole value | Not allowed | — |
| error | object | Required when parent is present | Not allowed | Machine-readable error code; use it to select the documented recovery path. |
| error.code | string | Required when parent is present | Not allowed | Machine-readable, permanently stable error code. Program against it, not against message. |
| error.message | string | Required when parent is present | Not allowed | Explanation for humans. May change at any time. |
| error.field | string | Optional | Not allowed | Affected location in the request, if it can be determined. |
| error.doc_url | string | Required when parent is present | Not allowed | Documentation link explaining this API error. format: "uri". |
Machine-readable version of this page: https://www.meykt.com/developers/fields-decide-return-parcel.md