# The return object

A return object is returned as part of the response body of each successful list, retrieve, create or update API call to the `/api/returns` endpoint.

## Fields

| Field                                               | Type       | Description                                                                                                                                                                                         |
| --------------------------------------------------- | ---------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **type**                                            | `string`   | `returns`                                                                                                                                                                                           |
| **id**                                              | `string`   | The return unique identifier                                                                                                                                                                        |
| links.**self**                                      | `string`   | The return endpoint URL                                                                                                                                                                             |
| attributes.**number**                               | `string`   | Unique identifier for the return.                                                                                                                                                                   |
| attributes.**status**                               | `string`   | The return status. One of 'draft' (default), 'requested', 'approved', 'cancelled', 'shipped', 'rejected', 'received', or 'refunded'.                                                                |
| attributes.**customer\_email**                      | `string`   | The email address of the associated customer.                                                                                                                                                       |
| attributes.**skus\_count**                          | `integer`  | The total number of SKUs in the return's line items. This can be useful to display a preview of the return content.                                                                                 |
| attributes.**approved\_at**                         | `datetime` | Time at which the return was approved.                                                                                                                                                              |
| attributes.**cancelled\_at**                        | `datetime` | Time at which the return was cancelled.                                                                                                                                                             |
| attributes.**shipped\_at**                          | `datetime` | Time at which the return was shipped.                                                                                                                                                               |
| attributes.**rejected\_at**                         | `datetime` | Time at which the return was rejected.                                                                                                                                                              |
| attributes.**received\_at**                         | `datetime` | Time at which the return was received.                                                                                                                                                              |
| attributes.**refunded\_at**                         | `datetime` | Time at which the return was refunded.                                                                                                                                                              |
| attributes.**archived\_at**                         | `datetime` | Time at which the resource has been archived.                                                                                                                                                       |
| attributes.**\_request**                            | `boolean`  | Send this attribute if you want to activate this return.                                                                                                                                            |
| attributes.**\_approve**                            | `boolean`  | Send this attribute if you want to mark this return as approved.                                                                                                                                    |
| attributes.**\_cancel**                             | `boolean`  | Send this attribute if you want to mark this return as cancelled.                                                                                                                                   |
| attributes.**\_ship**                               | `boolean`  | Send this attribute if you want to mark this return as shipped.                                                                                                                                     |
| attributes.**\_reject**                             | `boolean`  | Send this attribute if you want to mark this return as rejected.                                                                                                                                    |
| attributes.**\_receive**                            | `boolean`  | Send this attribute if you want to mark this return as received.                                                                                                                                    |
| attributes.**\_restock**                            | `boolean`  | Send this attribute if you want to restock all of the return line items.                                                                                                                            |
| attributes.**\_archive**                            | `boolean`  | Send this attribute if you want to archive the return.                                                                                                                                              |
| attributes.**\_unarchive**                          | `boolean`  | Send this attribute if you want to unarchive the return.                                                                                                                                            |
| attributes.**\_refund**                             | `boolean`  | Send this attribute if you want to create a refund for this return.                                                                                                                                 |
| attributes.**\_refund\_amount\_cents**              | `integer`  | Send this attribute as a value in cents to specify the amount to be refunded.                                                                                                                       |
| attributes.**estimated\_refund\_amount\_cents**     | `integer`  | The amount to be refunded, estimated by associated return line items, in cents.                                                                                                                     |
| attributes.**estimated\_refund\_amount\_float**     | `float`    | The amount to be refunded, estimated by associated return line items, float.                                                                                                                        |
| attributes.**formatted\_estimated\_refund\_amount** | `string`   | The amount to be refunded, estimated by associated return line items, formatted.                                                                                                                    |
| attributes.**\_add\_tags**                          | `string`   | Comma separated list of tags to be added. Duplicates, invalid and non existing ones are discarded. Cannot be passed by sales channels.                                                              |
| attributes.**\_remove\_tags**                       | `string`   | Comma separated list of tags to be removed. Duplicates, invalid and non existing ones are discarded. Cannot be passed by sales channels.                                                            |
| attributes.**created\_at**                          | `datetime` | Time at which the resource was created.                                                                                                                                                             |
| attributes.**updated\_at**                          | `datetime` | Time at which the resource was last updated.                                                                                                                                                        |
| attributes.**reference**                            | `string`   | A string that you can use to add any external identifier to the resource. This can be useful for integrating the resource to an external system, like an ERP, a marketing tool, a CRM, or whatever. |
| attributes.**reference\_origin**                    | `string`   | Any identifier of the third party system that defines the reference code.                                                                                                                           |
| attributes.**metadata**                             | `object`   | Set of key-value pairs that you can attach to the resource. This can be useful for storing additional information about the resource in a structured format.                                        |
| relationships.**order**                             | `object`   | The associated order.                                                                                                                                                                               |
| relationships.**customer**                          | `object`   | The associated customer.                                                                                                                                                                            |
| relationships.**stock\_location**                   | `object`   | The stock location to which the return will be shipped.                                                                                                                                             |
| relationships.**origin\_address**                   | `object`   | The customer shipping address.                                                                                                                                                                      |
| relationships.**destination\_address**              | `object`   | The associated stock location address.                                                                                                                                                              |
| relationships.**reference\_capture**                | `object`   | The associated succeded capture to be refunded. The order last succeeded one unless specified.                                                                                                      |
| relationships.**reference\_refund**                 | `object`   | The associated refund.                                                                                                                                                                              |
| relationships.**return\_line\_items**               | `array`    | The order line items associated to the return.                                                                                                                                                      |
| relationships.**attachments**                       | `array`    | The associated attachments.                                                                                                                                                                         |
| relationships.**resource\_errors**                  | `array`    | The associated resource errors.                                                                                                                                                                     |
| relationships.**events**                            | `array`    | The associated events.                                                                                                                                                                              |
| relationships.**tags**                              | `array`    | The associated tags. Cannot be passed by sales channels.                                                                                                                                            |
| relationships.**versions**                          | `array`    | The associated changes.                                                                                                                                                                             |
| relationships.**event\_stores**                     | `array`    | The associated event stores.                                                                                                                                                                        |
| meta.**mode**                                       | `string`   | The resource environment (can be one of `test` or `live`)                                                                                                                                           |


---

# Agent Instructions: 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:

```
GET https://docs.commercelayer.io/core-api-reference/returns/object.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
