> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stateset.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Return

> This endpoint updates an existing return.

### Body

<ParamField body="return_id" type="string">
  The ID provided in the data tab may be used to identify the return
</ParamField>

<ParamField body="return" type="object">
  The return object
</ParamField>

### Response

<ResponseField name="id" type="string">
  The ID of the return
</ResponseField>

<ResponseField name="order_id" type="string">
  The ID of the order
</ResponseField>

<ResponseField name="description" type="string">
  The description of the return
</ResponseField>

<ResponseField name="issue" type="string">
  The issue of the return
</ResponseField>

<ResponseField name="status" type="string">
  The status of the return
</ResponseField>

<ResponseField name="tracking_number" type="string">
  The tracking number of the return
</ResponseField>

<ResponseField name="action_needed" type="string">
  The action needed of the return
</ResponseField>

<ResponseField name="customerEmail" type="string">
  The customer email of the return
</ResponseField>

<ResponseField name="rma" type="string">
  The RMA of the return
</ResponseField>

<ResponseField name="serial_number" type="string">
  The serial number of the return
</ResponseField>

<ResponseField name="scanned_serial_number" type="string">
  The scanned serial number of the return
</ResponseField>

<ResponseField name="zendesk_number" type="string">
  The zendesk number of the return
</ResponseField>

<ResponseField name="enteredBy" type="string">
  The entered by of the return
</ResponseField>

<ResponseField name="order_date" type="string">
  The order date of the return
</ResponseField>

<ResponseField name="shipped_date" type="string">
  The shipped date of the return
</ResponseField>

<ResponseField name="requested_date" type="string">
  The requested date of the return
</ResponseField>

<ResponseField name="condition" type="string">
  The condition of the return
</ResponseField>

<ResponseField name="reported_condition" type="string">
  The reported condition of the return
</ResponseField>

<ResponseField name="created_date" type="string">
  The created date of the return
</ResponseField>

<ResponseField name="amount" type="string">
  The amount of the return
</ResponseField>

<ResponseField name="flat_rate_shipping" type="string">
  The flat rate shipping of the return
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl --location --request PUT 'https://api.stateset.com/v1/return' \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Token <token>' \
  --data-raw '{
        'id': '0901f083-aa1c-43c5-af5c-0a9d2fc64e30',
        'status': 'RCV'
        'condition': 'B'
  }'
  ```

  ```graphQL GraphQL theme={null}
                 mutation (
                  $return_id: String
                  $return_x: returns_set_input!
                ) {
                  update_returns (
                  where: { id : { _eq: $return_id }}
                  _set: $return_x
                  ) {
                    returning {
                      id
                      order_id
                      description
                      issue
                      status
                      tracking_number
                      action_needed
                      customerEmail
                      rma
                      serial_number
                      scanned_serial_number
                      zendesk_number
                      enteredBy
                      order_date
                      shipped_date
                      requested_date
                      condition
                      reported_condition
                      created_date
                      amount
                      flat_rate_shipping
                    }
                  }
                }`;
  ```

  ```js Node.js theme={null}
  const returns = await stateset.returns.update({
    '0901f083-aa1c-43c5-af5c-0a9d2fc64e30'
  });

  ```

  ```python Python theme={null}
  returns = stateset.Return.modify(
    '0901f083-aa1c-43c5-af5c-0a9d2fc64e30'
  )

  ```

  ```ruby Ruby theme={null}
  returns = Stateset::Return.update(
    '0901f083-aa1c-43c5-af5c-0a9d2fc64e30'
  )

  ```

  ```go Go theme={null}
  returns, err := stateset.Returns.Update(
    '0901f083-aa1c-43c5-af5c-0a9d2fc64e30'
  )

  ```

  ```java Java theme={null}
  Return[] returns = stateset.returns.update(
    '0901f083-aa1c-43c5-af5c-0a9d2fc64e30'
  )

  ```

  ```php PHP theme={null}
  $returns = $stateset->returns->update(
    '0901f083-aa1c-43c5-af5c-0a9d2fc64e30'
  );

  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
      "returns": [
          {
              "id": "0901f083-aa1c-43c5-af5c-0a9d2fc64e30",
              "created_date": "2023-06-28T19:34:59.189838+00:00",
              "amount": null,
              "action_needed": null,
              "condition": null,
              "customerEmail": "customer@gmail.com",
              "customer_id": null,
              "description": null,
              "enteredBy": null,
              "flat_rate_shipping": null,
              "order_date": null,
              "order_id": "524213310335630636",
              "reason_category": null,
              "reported_condition": null,
              "requested_date": null,
              "rma": "#1014-R5",
              "serial_number": null,
              "shipped_date": null,
              "status": "RCV",
              "tax_refunded": null,
              "total_refunded": null,
              "tracking_number": null,
          },
      ]
  }   
  ```
</ResponseExample>
