Choose documented shipped quantities for a return
All field references · Returns
GET /v1/returns/sources
Reads only an original API order of your own from this connection and its currently accessible shipment records. The items contain quantities already reported as returned and quantities that can still be announced; a return does not undo historical shipments.
Required scopes: "returns:read", "orders:read".
#Parameters
#query: order_id
Required. Your own original order from this API connection.
| 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 | object | Required when parent is present | Not allowed | Authorized response payload or documented event data. Additional properties are not allowed. |
| data.order_id | string | Required when parent is present | Not allowed | Meykt order identifier from an authorized order read; not the order number or external reference. format: "uuid". |
| data.shipments | array | Required when parent is present | Not allowed | Documented physical shipments and their exact line and package contents. maxItems: 250. |
| data.shipments[] | object | Every array item | Not allowed | Additional properties are not allowed. |
| data.shipments[].id | string | Required when parent is present | Not allowed | Identifier of this entry. Keep it unchanged when referring to the same entry in subsequent requests. format: "uuid". |
| data.shipments[].shipped_at | string | Required when parent is present | Not allowed | Time the physical shipment was confirmed. format: "date-time". |
| data.shipments[].operator_id | string | Required when parent is present | Not allowed | Identifier of the warehouse operator shown in this authorized shipment read. format: "uuid". |
| data.shipments[].operator_name | string | Required when parent is present | Not allowed | Display name of the warehouse operator. |
| data.shipments[].lines | array | Required when parent is present | Not allowed | All selected lines; each must satisfy this action’s quantity/identity rules. maxItems: 250. |
| data.shipments[].lines[] | object | Every array item | Not allowed | Additional properties are not allowed. |
| data.shipments[].lines[].order_item_id | string | Required when parent is present | Not allowed | Identifier of the specific order line from the current order response. format: "uuid". |
| data.shipments[].lines[].component_id | alternative (anyOf) | Required when parent is present | Allowed by schema | Identifier of the specific component within the relevant order, shipment or dispatch section. |
| data.shipments[].lines[].component_id | string | Conditional: anyOf 1/2 | Not allowed | anyOf 1/2: At least one alternative must match. Identifier of the specific component within the relevant order, shipment or dispatch section. format: "uuid". |
| data.shipments[].lines[].component_id | null | Conditional: anyOf 2/2 | Allowed by schema | anyOf 2/2: At least one alternative must match. Identifier of the specific component within the relevant order, shipment or dispatch section. |
| data.shipments[].lines[].product_id | string | Required when parent is present | Not allowed | Meykt article identifier; not its SKU or an external system identifier. format: "uuid". |
| data.shipments[].lines[].variant_id | alternative (anyOf) | Required when parent is present | Allowed by schema | Native Meykt variant identifier; null refers to the main article where allowed. |
| data.shipments[].lines[].variant_id | string | Conditional: anyOf 1/2 | Not allowed | anyOf 1/2: At least one alternative must match. Native Meykt variant identifier; null refers to the main article where allowed. format: "uuid". |
| data.shipments[].lines[].variant_id | null | Conditional: anyOf 2/2 | Allowed by schema | anyOf 2/2: At least one alternative must match. Native Meykt variant identifier; null refers to the main article where allowed. |
| data.shipments[].lines[].name | string | Required when parent is present | Not allowed | Display name of this catalog entry or resource. |
| data.shipments[].lines[].unit | string | Required when parent is present | Not allowed | Unit of the quantity. Follow the offered value exactly; no implicit carton, weight or dimension conversion is performed. const: "piece". |
| data.shipments[].lines[].shipped | string | Required when parent is present | Not allowed | Quantity whose physical shipment has been confirmed. |
| data.shipments[].lines[].returnable | string | Required when parent is present | Not allowed | Shipped quantity still eligible to be announced as a return. |
#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-sources.md