Loop Returns
Use Loop Returns to inspect and action ecommerce returns, create return deep links, manage notes, and retrieve returns reports.
Authentication
| Method | Kind | Status | Details |
|---|---|---|---|
| API Key | api_key | available | — |
Call a tool
import { createClient } from "@open-connector/sdk";const oc = createClient({ baseUrl: "https://api.openconnector.dev", apiKey: process.env.OPEN_CONNECTOR_API_KEY!,});const result = await oc.executeTool({ slug: "LOOP_RETURNS_CANCEL_RETURN", connectedAccountId: "conn_...", arguments: { /* match this tool's input schema */ },});import Composio from "@composio/client";const composio = new Composio({ baseURL: "https://api.openconnector.dev/composio", apiKey: process.env.OPEN_CONNECTOR_API_KEY!,});const result = await composio.tools.execute("LOOP_RETURNS_CANCEL_RETURN", { connected_account_id: "conn_...", arguments: { /* match this tool's input schema */ },});oc tools execute LOOP_RETURNS_CANCEL_RETURN --data '{ }'Tool catalog
Available tools
12 callable operations
Cancel ReturnLOOP_RETURNS_CANCEL_RETURNCancel a return in Loop. Canceling a return will allow a customer to make another return with the same items. ### Required API key scope - ReturnsConnection
Cancel a return in Loop. Canceling a return will allow a customer to make another return with the same items. ### Required API key scope - Returns
Authentication
Connected account requiredTags
Close ReturnLOOP_RETURNS_CLOSE_RETURNClose a return. Closing a return will not fulfill any outcomes such as exchanges or gift cards, and the items are not able to be used in a new return. Returns closed using this endpoint will also be closed in the commerce provider (e.g. Shopify). ### Required API key scope - ReturnsConnection
Close a return. Closing a return will not fulfill any outcomes such as exchanges or gift cards, and the items are not able to be used in a new return. Returns closed using this endpoint will also be closed in the commerce provider (e.g. Shopify). ### Required API key scope - Returns
Authentication
Connected account requiredTags
Create Return Deep LinkLOOP_RETURNS_CREATE_RETURN_DEEP_LINKCreate a deep link URL. Depending on a shop's settings, the `zip` value could be an email, phone number, or postal code. All use the key `zip`. ### Required API key scope - OrdersConnection
Create a deep link URL. Depending on a shop's settings, the `zip` value could be an email, phone number, or postal code. All use the key `zip`. ### Required API key scope - Orders
Authentication
Connected account requiredTags
Create Return Deep Link with QR CodeLOOP_RETURNS_CREATE_RETURN_DEEP_LINK_WITH_QR_CODEGenerate a link to a QR code image file that, when scanned, will take the user directly to their order in Loop so they can initiate a return without requiring them to enter their order information. The deep link URL is also returned. If `type` is not included in the request, or is a non-supported format, a `png` will be returned. ### Required API key scope - OrdersConnection
Generate a link to a QR code image file that, when scanned, will take the user directly to their order in Loop so they can initiate a return without requiring them to enter their order information. The deep link URL is also returned. If `type` is not included in the request, or is a non-supported format, a `png` will be returned. ### Required API key scope - Orders
Authentication
Connected account requiredTags
Create Return NoteLOOP_RETURNS_CREATE_RETURN_NOTEPost a new note to a return. ### Required API key scope - ReturnsConnection
Post a new note to a return. ### Required API key scope - Returns
Authentication
Connected account requiredTags
Flag ReturnLOOP_RETURNS_FLAG_RETURNFlag a return in Loop for review. This will prevent automated processing and will require a human to go into the merchant admin in Loop and review this return. ### Required API key scope - ReturnsConnection
Flag a return in Loop for review. This will prevent automated processing and will require a human to go into the merchant admin in Loop and review this return. ### Required API key scope - Returns
Authentication
Connected account requiredTags
Advanced Shipping NoticeLOOP_RETURNS_GET_ADVANCED_SHIPPING_NOTICEThis endpoint will pull all packages by tracking statuses/timeframe. The ASN endpoint will return an array of objects. Those objects will contain order and return information. ### Required API key scope - ReturnsConnection
This endpoint will pull all packages by tracking statuses/timeframe. The ASN endpoint will return an array of objects. Those objects will contain order and return information. ### Required API key scope - Returns
Authentication
Connected account requiredTags
Detailed Returns ListLOOP_RETURNS_GET_DETAILED_RETURNS_LISTPull a detailed list of returns created within a given timeframe. This endpoint supports pagination. We _highly_ encourage using [pagination](https://docs.loopreturns.com/reference/paginated-requests) for this endpoint. Read the guide on [paginating requests](https://docs.loopreturns.com/reference/paginated-requests) for details. **Note**: If neither `from` nor `to` is passed, the response defaults to only contain returns from the previous 24 hours. See [`from`](#parameter-from) and [`to`](#parameter-to) below for more information. **Note**: The maximum number of days in the range of the from and to properties is 120 days. If the number of days in this range exceeds 120 days, a validation error will be returned. **Note**: If no `state` is passed, the response defaults to only contain open, closed, and expired returns. See [`state`](#parameter-state) below for more information. ### Required API key scope - ReturnsConnection
Pull a detailed list of returns created within a given timeframe. This endpoint supports pagination. We _highly_ encourage using [pagination](https://docs.loopreturns.com/reference/paginated-requests) for this endpoint. Read the guide on [paginating requests](https://docs.loopreturns.com/reference/paginated-requests) for details. **Note**: If neither `from` nor `to` is passed, the response defaults to only contain returns from the previous 24 hours. See [`from`](#parameter-from) and [`to`](#parameter-to) below for more information. **Note**: The maximum number of days in the range of the from and to properties is 120 days. If the number of days in this range exceeds 120 days, a validation error will be returned. **Note**: If no `state` is passed, the response defaults to only contain open, closed, and expired returns. See [`state`](#parameter-state) below for more information. ### Required API key scope - Returns
Authentication
Connected account requiredTags
Get Return DetailsLOOP_RETURNS_GET_RETURN_DETAILSGet the details of a specific return based on a return's ID, an order name, or an order ID from the commerce provider (e.g. Shopify) depending on the query value of the call. ### Required API key scope - ReturnsConnection
Get the details of a specific return based on a return's ID, an order name, or an order ID from the commerce provider (e.g. Shopify) depending on the query value of the call. ### Required API key scope - Returns
Authentication
Connected account requiredTags
Get Return NotesLOOP_RETURNS_GET_RETURN_NOTESGet notes on a specific return using the return's ID. ### Required API key scope - ReturnsConnection
Get notes on a specific return using the return's ID. ### Required API key scope - Returns
Authentication
Connected account requiredTags
Process ReturnLOOP_RETURNS_PROCESS_RETURNProcess a return in Loop based on the return ID. Processing a return will archive it in Loop and fulfill any remaining outcomes, such as placing exchange orders or creating gift cards. > ⚡ **Processing Note** > > This endpoint queues the return for processing. The actual processing occurs in the background. > A successful response indicates the return has been queued, not that processing has completed. > **Note on instant refunds** > > If the return has an open Reshop instant-refund credit, processing is intentionally skipped: a > successful (`true`) response is returned without dispatching any processing jobs. Optionally, you may include a JSON payload in the request body. If you choose to do so, Loop will add these values to any new orders in the commerce provider (e.g. Shopify) that result from processing the return. For example, if the return includes an exchange when the return is processed, Loop will create that exchange order and these values will be added to the order as "Additional Details." Loop will also add a note to the return timeline with the values in the request body. > 🚧 Process Error Codes > > Returns must be in a processable state to successfully process. If your return is not in a > processable state, your response will include an `errors` object with a corresponding message and > error code. > > > If you would like to configure your flagged returns to process, please reach out to > [email protected]. ```json { "errors": { "message": "Return is open and therefore cannot be processed.", "code": "UNPROCESSABLE_FLAGGED_RETURN" } } ``` ### Required API key scope - ReturnsConnection
Process a return in Loop based on the return ID. Processing a return will archive it in Loop and fulfill any remaining outcomes, such as placing exchange orders or creating gift cards. > ⚡ **Processing Note** > > This endpoint queues the return for processing. The actual processing occurs in the background. > A successful response indicates the return has been queued, not that processing has completed. > **Note on instant refunds** > > If the return has an open Reshop instant-refund credit, processing is intentionally skipped: a > successful (`true`) response is returned without dispatching any processing jobs. Optionally, you may include a JSON payload in the request body. If you choose to do so, Loop will add these values to any new orders in the commerce provider (e.g. Shopify) that result from processing the return. For example, if the return includes an exchange when the return is processed, Loop will create that exchange order and these values will be added to the order as "Additional Details." Loop will also add a note to the return timeline with the values in the request body. > 🚧 Process Error Codes > > Returns must be in a processable state to successfully process. If your return is not in a > processable state, your response will include an `errors` object with a corresponding message and > error code. > > > If you would like to configure your flagged returns to process, please reach out to > [email protected]. ```json { "errors": { "message": "Return is open and therefore cannot be processed.", "code": "UNPROCESSABLE_FLAGGED_RETURN" } } ``` ### Required API key scope - Returns
Authentication
Connected account requiredTags
Remove Line ItemsLOOP_RETURNS_REMOVE_LINE_ITEMSRemove line items from a return and process the return. Currently, only line items tied to a refund or store credit outcome allow for line items to be removed programmatically. ### Required API key scope - ReturnsConnection
Remove line items from a return and process the return. Currently, only line items tied to a refund or store credit outcome allow for line items to be removed programmatically. ### Required API key scope - Returns
Authentication
Connected account requiredTags