Authorizations
Headers
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.
Body
The Shopify order name.
"#1001"
Any secondary input included by the shopper when looking up their order (for example, ZIP/postal code or email address).
Whether or not the return will use Loop's Gift flow. For details, see Gift Returns.
false
Response
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:
- Check the
relfield to identify the action - Review the
fieldsarray to see what data is required - Make an HTTP request to the
hrefusing the specifiedmethod - Include all fields marked with
is_required: true
State-based availability:
- In
createdstate: Links for adding items, setting customer, finalizing items - In
items-finalizedstate: Links for setting credit type, selecting return method, submitting - In terminal states (
submitted,cancelled,expired): No action links (empty array)
The links array dynamically changes based on:
- Current draft return state
- Available context (eligible items, return reasons, return methods, etc.)
- Merchant policy configuration
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.