Skip to main content

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.

Buyer portal token

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​

OK

Response Headers
    Content-Type