# Return - admin-graphql - OBJECT
Version: unstable

## Description
Represents a return.

### Access Scopes
`read_returns` access scope.


## Fields
* [createdAt](/docs/api/admin-graphql/unstable/scalars/DateTime): DateTime! - The date and time when the return was created.
* [decline](/docs/api/admin-graphql/unstable/objects/ReturnDecline): ReturnDecline - Additional information about the declined return.
* [id](/docs/api/admin-graphql/unstable/scalars/ID): ID! - A globally-unique ID.
* [name](/docs/api/admin-graphql/unstable/scalars/String): String! - The name of the return.
* [order](/docs/api/admin-graphql/unstable/objects/Order): Order! - The order that the return belongs to.
* [returnShippingFees](/docs/api/admin-graphql/unstable/objects/ReturnShippingFee): ReturnShippingFee! - The return shipping fees for the return.
* [status](/docs/api/admin-graphql/unstable/enums/ReturnStatus): ReturnStatus! - The status of the return.
* [suggestedRefund](/docs/api/admin-graphql/unstable/objects/SuggestedReturnRefund): SuggestedReturnRefund - A suggested refund for the return.
* [totalQuantity](/docs/api/admin-graphql/unstable/scalars/Int): Int! - The sum of all return line item quantities for the return.

## Connections
* [exchangeLineItems](/docs/api/admin-graphql/unstable/connections/ExchangeLineItemConnection): ExchangeLineItemConnection!
* [refunds](/docs/api/admin-graphql/unstable/connections/RefundConnection): RefundConnection!
* [returnLineItems](/docs/api/admin-graphql/unstable/connections/ReturnLineItemConnection): ReturnLineItemConnection!
* [reverseFulfillmentOrders](/docs/api/admin-graphql/unstable/connections/ReverseFulfillmentOrderConnection): ReverseFulfillmentOrderConnection!



## Related queries
* [return](/docs/api/admin-graphql/unstable/queries/return) Returns a Return resource by ID.

## Related mutations
* [returnApproveRequest](/docs/api/admin-graphql/unstable/mutations/returnApproveRequest) Approves a customer's return request.
If this mutation is successful, then the `Return.status` field of the
approved return is set to `OPEN`.
* [returnCancel](/docs/api/admin-graphql/unstable/mutations/returnCancel) Cancels a return and restores the items back to being fulfilled.
Canceling a return is only available before any work has been done
on the return (such as an inspection or refund).
* [returnClose](/docs/api/admin-graphql/unstable/mutations/returnClose) Indicates a return is complete, either when a refund has been made and items restocked,
or simply when it has been marked as returned in the system.
* [returnCreate](/docs/api/admin-graphql/unstable/mutations/returnCreate) Creates a return.
* [returnDeclineRequest](/docs/api/admin-graphql/unstable/mutations/returnDeclineRequest) Declines a return on an order.
When a return is declined, each `ReturnLineItem.fulfillmentLineItem` can be associated to a new return.
Use the `ReturnCreate` or `ReturnRequest` mutation to initiate a new return.
* [returnLineItemRemoveFromReturn](/docs/api/admin-graphql/unstable/mutations/returnLineItemRemoveFromReturn) Removes return lines from a return.
* [returnReopen](/docs/api/admin-graphql/unstable/mutations/returnReopen) Reopens a closed return.
* [returnRequest](/docs/api/admin-graphql/unstable/mutations/returnRequest) A customer's return request that hasn't been approved or declined.
This mutation sets the value of the `Return.status` field to `REQUESTED`.
To create a return that has the `Return.status` field set to `OPEN`, use the `returnCreate` mutation.

## Related Unions

## Examples
### Get status and return line items for a return
Curl example: "curl -X POST \\\nhttps://your-development-store.myshopify.com/admin/api/unstable/graphql.json \\\n-H 'Content-Type: application/json' \\\n-H 'X-Shopify-Access-Token: {access_token}' \\\n-d '{\n\"query\": \"query { return(id: \\\"gid://shopify/Return/945000954\\\") { status name order { id } returnLineItems(first: 10) { edges { node { ... on ReturnLineItem { fulfillmentLineItem { lineItem { name } } totalWeight { value } } quantity returnReason returnReasonNote } } } } }\"\n}'\n"
Node example: "const client = new shopify.clients.Graphql({session});\nconst data = await client.query({\n  data: `query {\n    return(id: \"gid://shopify/Return/945000954\") {\n      status\n      name\n      order {\n        id\n      }\n      returnLineItems(first: 10) {\n        edges {\n          node {\n            ... on ReturnLineItem {\n              fulfillmentLineItem {\n                lineItem {\n                  name\n                }\n              }\n              totalWeight {\n                value\n              }\n            }\n            quantity\n            returnReason\n            returnReasonNote\n          }\n        }\n      }\n    }\n  }`,\n});\n"
Ruby example: "session = ShopifyAPI::Auth::Session.new(\n  shop: \"your-development-store.myshopify.com\",\n  access_token: access_token\n)\nclient = ShopifyAPI::Clients::Graphql::Admin.new(\n  session: session\n)\n\nquery = <<~QUERY\n  query {\n    return(id: \"gid://shopify/Return/945000954\") {\n      status\n      name\n      order {\n        id\n      }\n      returnLineItems(first: 10) {\n        edges {\n          node {\n            ... on ReturnLineItem {\n              fulfillmentLineItem {\n                lineItem {\n                  name\n                }\n              }\n              totalWeight {\n                value\n              }\n            }\n            quantity\n            returnReason\n            returnReasonNote\n          }\n        }\n      }\n    }\n  }\nQUERY\n\nresponse = client.query(query: query)\n" 
Remix example: "const { admin } = await authenticate.admin(request);\n\nconst response = await admin.graphql(\n  `#graphql\n  query {\n    return(id: \"gid://shopify/Return/945000954\") {\n      status\n      name\n      order {\n        id\n      }\n      returnLineItems(first: 10) {\n        edges {\n          node {\n            ... on ReturnLineItem {\n              fulfillmentLineItem {\n                lineItem {\n                  name\n                }\n              }\n              totalWeight {\n                value\n              }\n            }\n            quantity\n            returnReason\n            returnReasonNote\n          }\n        }\n      }\n    }\n  }`,\n);\n\nconst data = await response.json();\n"
Graphql query: "query {\n  return(id: \"gid://shopify/Return/945000954\") {\n    status\n    name\n    order {\n      id\n    }\n    returnLineItems(first: 10) {\n      edges {\n        node {\n          ... on ReturnLineItem {\n            fulfillmentLineItem {\n              lineItem {\n                name\n              }\n            }\n            totalWeight {\n              value\n            }\n          }\n          quantity\n          returnReason\n          returnReasonNote\n        }\n      }\n    }\n  }\n}"
#### Graphql Input
null
#### Graphql Response
{
  "data": {
    "return": {
      "status": "OPEN",
      "name": "#1001-R1",
      "order": {
        "id": "gid://shopify/Order/625362839"
      },
      "returnLineItems": {
        "edges": [
          {
            "node": {
              "fulfillmentLineItem": {
                "lineItem": {
                  "name": "Draft - 151cm"
                }
              },
              "totalWeight": {
                "value": 1500.0
              },
              "quantity": 1,
              "returnReason": "UNKNOWN",
              "returnReasonNote": ""
            }
          }
        ]
      }
    }
  }
}

### Get status and return line items for a return (API Version 2024-04 and older)
Curl example: "curl -X POST \\\nhttps://your-development-store.myshopify.com/admin/api/unstable/graphql.json \\\n-H 'Content-Type: application/json' \\\n-H 'X-Shopify-Access-Token: {access_token}' \\\n-d '{\n\"query\": \"query { return(id: \\\"gid://shopify/Return/945000954\\\") { status name order { id } returnLineItems(first: 10) { edges { node { quantity returnReason returnReasonNote fulfillmentLineItem { lineItem { name } } totalWeight { value } } } } } }\"\n}'\n"
Node example: "const client = new shopify.clients.Graphql({session});\nconst data = await client.query({\n  data: `query {\n    return(id: \"gid://shopify/Return/945000954\") {\n      status\n      name\n      order {\n        id\n      }\n      returnLineItems(first: 10) {\n        edges {\n          node {\n            quantity\n            returnReason\n            returnReasonNote\n            fulfillmentLineItem {\n              lineItem {\n                name\n              }\n            }\n            totalWeight {\n              value\n            }\n          }\n        }\n      }\n    }\n  }`,\n});\n"
Ruby example: "session = ShopifyAPI::Auth::Session.new(\n  shop: \"your-development-store.myshopify.com\",\n  access_token: access_token\n)\nclient = ShopifyAPI::Clients::Graphql::Admin.new(\n  session: session\n)\n\nquery = <<~QUERY\n  query {\n    return(id: \"gid://shopify/Return/945000954\") {\n      status\n      name\n      order {\n        id\n      }\n      returnLineItems(first: 10) {\n        edges {\n          node {\n            quantity\n            returnReason\n            returnReasonNote\n            fulfillmentLineItem {\n              lineItem {\n                name\n              }\n            }\n            totalWeight {\n              value\n            }\n          }\n        }\n      }\n    }\n  }\nQUERY\n\nresponse = client.query(query: query)\n" 
Remix example: "const { admin } = await authenticate.admin(request);\n\nconst response = await admin.graphql(\n  `#graphql\n  query {\n    return(id: \"gid://shopify/Return/945000954\") {\n      status\n      name\n      order {\n        id\n      }\n      returnLineItems(first: 10) {\n        edges {\n          node {\n            quantity\n            returnReason\n            returnReasonNote\n            fulfillmentLineItem {\n              lineItem {\n                name\n              }\n            }\n            totalWeight {\n              value\n            }\n          }\n        }\n      }\n    }\n  }`,\n);\n\nconst data = await response.json();\n"
Graphql query: "query {\n  return(id: \"gid://shopify/Return/945000954\") {\n    status\n    name\n    order {\n      id\n    }\n    returnLineItems(first: 10) {\n      edges {\n        node {\n          quantity\n          returnReason\n          returnReasonNote\n          fulfillmentLineItem {\n            lineItem {\n              name\n            }\n          }\n          totalWeight {\n            value\n          }\n        }\n      }\n    }\n  }\n}"
#### Graphql Input
null
#### Graphql Response
{
  "data": {
    "return": {
      "status": "OPEN",
      "name": "#1001-R1",
      "order": {
        "id": "gid://shopify/Order/625362839"
      },
      "returnLineItems": {
        "edges": [
          {
            "node": {
              "quantity": 1,
              "returnReason": "UNKNOWN",
              "returnReasonNote": "",
              "fulfillmentLineItem": {
                "lineItem": {
                  "name": "Draft - 151cm"
                }
              },
              "totalWeight": {
                "value": 1500.0
              }
            }
          }
        ]
      }
    }
  }
}