Retrieve a return receipt
All field references · Returns
GET /v1/returns/commands/{idempotencyKey}
Reads your own API operation, subject to current access; null does not prove that an unclear physical booking never happened. Keep the original key and the original body for recovery.
Required scopes: "returns:read".
#Parameters
#path: idempotencyKey
Required. The original idempotency key, unchanged.
| Field | Type | Presence | null | Meaning, limits and examples |
|---|---|---|---|---|
| $ (whole value) | string | Whole value | Not allowed | format: "uuid". |
#Request body
No request body is defined for this operation.
#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 | alternative (anyOf) | Required when parent is present | Allowed by schema | Authorized response payload or documented event data. |
| data | object | Conditional: anyOf 1/2 | Not allowed | anyOf 1/2: At least one alternative must match. Authorized response payload or documented event data. Additional properties are not allowed. |
| data.event_id | string | Required when parent is present | Not allowed | anyOf 1/2: At least one alternative must match. Identifier of the accepted business event returned by the command. format: "uuid". |
| data.return_id | string | Required when parent is present | Not allowed | anyOf 1/2: At least one alternative must match. Return UUID: new on announce; reuse for reads/changes/retries. format: "uuid". |
| data.kind | string | Required when parent is present | Not allowed | anyOf 1/2: At least one alternative must match. Kind selects required fields. enum: ["announce","report_unknown","identify","receive","receive_direct","inspect","decide","execute_disposition","reinspect","close","handoff_recovery","attach_evidence","attach_inspection_evidence"]. |
| data.version | integer | Required when parent is present | Not allowed | anyOf 1/2: At least one alternative must match. Current record version; use unchanged as expected_version. minimum: 1. maximum: 2147483647. |
| data.stock_event_id | alternative (anyOf) | Required when parent is present | Allowed by schema | anyOf 1/2: At least one alternative must match. Identifier of the resulting stock movement; null when this action created no stock movement. |
| data.stock_event_id | string | Conditional: anyOf 1/2 | Not allowed | anyOf 1/2: At least one alternative must match.; anyOf 1/2: At least one alternative must match. Identifier of the resulting stock movement; null when this action created no stock movement. format: "uuid". |
| data.stock_event_id | null | Conditional: anyOf 2/2 | Allowed by schema | anyOf 1/2: At least one alternative must match.; anyOf 2/2: At least one alternative must match. Identifier of the resulting stock movement; null when this action created no stock movement. |
| data.recovery_movements | array | Optional | Not allowed | anyOf 1/2: At least one alternative must match. Stock movements recorded when goods are recovered after an interrupted handover. maxItems: 1000. |
| data.recovery_movements[] | object | Every array item | Not allowed | anyOf 1/2: At least one alternative must match. Additional properties are not allowed. |
| data.recovery_movements[].stock_item_id | string | Required when parent is present | Not allowed | anyOf 1/2: At least one alternative must match. Offered stock item ID for this owner/warehouse; not a SKU. format: "uuid". |
| data.recovery_movements[].quantity | string | Required when parent is present | Not allowed | anyOf 1/2: At least one alternative must match. Positive decimal string in the stated unit. pattern: "^(?=.*[1-9])(0|[1-9]\\d{0,8})(\\.\\d{1,6})?$". |
| data.recovery_movements[].source_balance_id | string | Required when parent is present | Not allowed | anyOf 1/2: At least one alternative must match. Exact stock balance from which goods are consumed or moved. format: "uuid". |
| data.recovery_movements[].target_balance_id | string | Required when parent is present | Not allowed | anyOf 1/2: At least one alternative must match. Stock balance receiving the moved goods. format: "uuid". |
| data.recovery_movements[].stock_event_id | alternative (anyOf) | Required when parent is present | Allowed by schema | anyOf 1/2: At least one alternative must match. Identifier of the resulting stock movement; null when this action created no stock movement. |
| data.recovery_movements[].stock_event_id | string | Conditional: anyOf 1/2 | Not allowed | anyOf 1/2: At least one alternative must match.; anyOf 1/2: At least one alternative must match. Identifier of the resulting stock movement; null when this action created no stock movement. format: "uuid". |
| data.recovery_movements[].stock_event_id | null | Conditional: anyOf 2/2 | Allowed by schema | anyOf 1/2: At least one alternative must match.; anyOf 2/2: At least one alternative must match. Identifier of the resulting stock movement; null when this action created no stock movement. |
| data | null | Conditional: anyOf 2/2 | Allowed by schema | anyOf 2/2: At least one alternative must match. Authorized response payload or documented event data. |
#Response 401, 403, 404, 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". 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-read-return-command.md