Get Returnable Lines
GET/api/portal/orders/:order/returnable
For a delivered order, list which lines can still be returned and the maximum returnable quantity for each (ordered/fulfilled minus already-returned), plus ineligible lines with a reason (not_delivered, window_expired, already_returned). delivered_at is an ISO 8601 timestamp. Returns 404 if the order is not on the active account.
Called by a B2B portal buyer with the bearer token POST /api/portal/auth/login returns (or the buyer's feed key) — not with a staff Personal Access Token.
dropship is null for a normal order. For a dropship order it carries the return terms to give the end customer: retailer_order_number; destination — merchant_warehouse_retailer_named (returns go to the merchant's warehouse, addressed in the retailer's name so the merchant stays hidden) or retailer (returns go to the retailer's own address); return_address and return_address_lines (the same address as structured fields and as printable lines; null / empty when no return address is known yet, e.g. nothing has shipped); and restocking_fee_percent deducted from the credit for returned goods.
Which orders: by default every order the account has, whatever channel it came through (the portal, the merchant's store, phone or email orders entered by staff) — another channel's draft orders are never shown. A merchant can limit this to orders placed in the portal (Portal Settings → Order history).
Each line also carries pieces: for a set (bundle or kit), the pieces a repair request can name — id (pass it as lines.*.component_product_id on Create Repair Request), sku and name — so a buyer can claim one piece of the set; an empty array for a single item. pieces is listed whatever the line's return eligibility, since repair claims are not limited by the return window.
Request
Responses
- 200
- 401
- 403
- 404
- 429
OK
Response Headers
Unauthenticated — the bearer token is missing, revoked, expired, or malformed. Never retry automatically; fix the credential. See the Errors guide.
Forbidden — the token lacks a required scope, the endpoint is not available to API tokens, or the user behind the token lacks the permission. A human must adjust the token scopes or user permissions; do not retry.
Not Found
Response Headers
Rate limited — platform limit is 1,000 requests/min; individual tokens may carry lower limits. Honor the Retry-After header before retrying. See the Rate Limits guide.