Adds a specific item to the draft return’s ReturningItems.
The unique identifier of the shop associated with the draft return.
This header is not required, as the merchant's shop is identified by the API key present in the request.
The unique identifier of the draft return.
The unique identifier created by Loop of the order line item to add.
Successful response with draft return data.
The draft return object.
Contextual information about the draft return. The context object provides data needed for actions (e.g., eligible items, return reasons, shipping methods). Context fields are dynamically populated based on the current state and available actions.
HATEOAS links representing available actions for the current draft return state.
How to use links:
rel field to identify the actionfields array to see what data is requiredhref using the specified methodis_required: trueState-based availability:
created state: Links for adding items, setting customer, finalizing itemsitems-finalized state: Links for setting credit type, selecting return method, submittingsubmitted, cancelled, expired): No action links (empty array)The links array dynamically changes based on:
An array of error codes. In the event of a partial failure, the API will return all possible data as well as any error codes that were thrown.
See Error codes for a full list of possible errors.