> For the complete documentation index, see [llms.txt](https://daton-sarasanalytics.gitbook.io/daton/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://daton-sarasanalytics.gitbook.io/daton/integrations/data-sources/ecommerce/loopreturns.md).

# Loopreturns

### Snapshot

| Features                        | Details                                          |
| ------------------------------- | ------------------------------------------------ |
| Release Status                  | Released                                         |
| Source API Version              | V1                                               |
| Table Selection                 | Yes                                              |
| Column Selection                | Yes                                              |
| Edit Integration                | Yes                                              |
| Replication Type Selection      | No                                               |
| Authentication Parameters       | API Key                                          |
| Replication Type                | <p>Full Replication<br>Key Based Incremental</p> |
| Replication Key                 | Date                                             |
| Suggested Replication Frequency | 1 hour                                           |

### Tables/APIs supported

<table data-header-hidden><thead><tr><th width="380">Tables/APIs Supported</th><th></th></tr></thead><tbody><tr><td>Return_list</td><td>Return_detail</td></tr></tbody></table>

### Integrate Loopreturns with Daton

1. Sign in to Daton&#x20;
2. Select Loopreturns from the list of Integrations&#x20;
3. Provide Integration Name, Replication Frequency, and History. Integration name would be used in creating tables for the integration and cannot be changed later&#x20;
4. Provide Loopreturns API Key. Follow this [link](https://docs.loopreturns.com/reference/introduction) for more information.
5. Post successful authentication, you will be prompted to choose from the list of available tables
6. Then select all required fields for each table
7. Submit the integration

### Workflow

1. Integrations would be in Pending state initially and will be moved to Active state as soon as the first job loads data successfully on to the configured warehouse
2. Users would be able to edit/pause/re-activate/delete integration anytime
3. Users can view job status and process logs from the integration details page by clicking on the integration name from the active list

### Loopreturns Data

#### Return list

Purpose: This endpoint is used to fetch a list of all returns that were created within a given timeframe

Source API Documentation: <https://docs.loopreturns.com/reference/detailed-returns-list>

Replication: Key-Based Incremental

**Fields**

| fullname                  | type      |
| ------------------------- | --------- |
| id                        | STRING    |
| state                     | STRING    |
| created\_at               | TIMESTAMP |
| updated\_at               | TIMESTAMP |
| total                     | STRING    |
| order\_id                 | STRING    |
| order\_name               | STRING    |
| provider\_order\_id       | STRING    |
| order\_number             | STRING    |
| customer                  | STRING    |
| multi\_currency           | BOOLEAN   |
| currency                  | STRING    |
| return\_product\_total    | STRING    |
| return\_discount\_total   | STRING    |
| return\_tax\_total        | STRING    |
| return\_total             | STRING    |
| return\_credit\_total     | STRING    |
| exchange\_product\_total  | STRING    |
| exchange\_discount\_total | STRING    |
| exchange\_tax\_total      | STRING    |
| exchange\_total           | STRING    |
| exchange\_credit\_total   | STRING    |
| gift\_card                | STRING    |
| handling\_fee             | STRING    |
| refund                    | STRING    |
| upsell                    | STRING    |
| line\_items               | RECORD    |
| carrier                   | STRING    |
| tracking\_number          | STRING    |
| label\_status             | STRING    |
| status\_page\_url         | STRING    |
| label\_updated\_at        | TIMESTAMP |
| destination\_id           | NUMERIC   |
| package\_reference        | STRING    |
| outcome                   | STRING    |
| label\_url                | STRING    |
| label\_rate               | NUMERIC   |
| exchanges                 | RECORD    |
| gift\_card\_order\_name   | STRING    |
| gift\_card\_order\_id     | NUMERIC   |
| edited\_at                | TIMESTAMP |

#### Return detail

Purpose: This API is used to get the details of a specific return&#x20;

Source API Documentation: <https://docs.loopreturns.com/reference/return-details>

Replication: Key-Based Incremental

**Fields**

| fullname                | type     |
| ----------------------- | -------- |
| id                      | NUMERIC  |
| created\_at             | DATETIME |
| order\_id               | NUMERIC  |
| order\_name             | STRING   |
| order\_number           | NUMERIC  |
| state                   | STRING   |
| currency                | STRING   |
| exchange                | STRING   |
| gift\_card              | STRING   |
| refund                  | STRING   |
| return\_total           | STRING   |
| line\_items             | RECORD   |
| customer\_email         | STRING   |
| carrier                 | STRING   |
| label\_status           | STRING   |
| label\_updated\_at      | STRING   |
| tracking\_number        | STRING   |
| destination\_id         | NUMERIC  |
| status\_page\_url       | STRING   |
| package\_reference      | STRING   |
| \_daton\_user\_id       | NUMERIC  |
| \_daton\_batch\_runtime | NUMERIC  |
| \_daton\_batch\_id      | NUMERIC  |
| label\_url              | STRING   |
| label\_rate             | NUMERIC  |
| outcome                 | STRING   |
| created\_at\_st         | STRING   |
| exchange\_order\_name   | STRING   |
| exchange\_order\_id     | STRING   |
| gift\_card\_order\_name | STRING   |
| gift\_card\_order\_id   | NUMERIC  |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://daton-sarasanalytics.gitbook.io/daton/integrations/data-sources/ecommerce/loopreturns.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
