> ## 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.

# Restock Return

> This endpoint restocks a returned item back into inventory.

### Body

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

<ParamField body="warehouse_id" type="string">
  The warehouse ID where the item will be restocked
</ParamField>

<ParamField body="location_id" type="string">
  The specific location within the warehouse
</ParamField>

<ParamField body="condition_code" type="string">
  The condition code for inventory classification (e.g., "new", "refurbished", "open\_box")
</ParamField>

<ParamField body="quantity" type="number">
  The quantity to restock
</ParamField>

<ParamField body="restocking_fee_applied" type="boolean">
  Whether a restocking fee was applied to this return
</ParamField>

### Response

<ResponseField name="id" type="string">
  The ID provided in the data tab may be used to identify the return
</ResponseField>

<ResponseField name="object" type="string">
  The object type
</ResponseField>

<ResponseField name="restocked" type="boolean">
  Indicates whether the item was successfully restocked
</ResponseField>

<ResponseField name="inventory_adjustment_id" type="string">
  The ID of the inventory adjustment record
</ResponseField>

<ResponseField name="new_inventory_level" type="number">
  The new inventory level after restocking
</ResponseField>

<ResponseField name="warehouse_id" type="string">
  The warehouse where the item was restocked
</ResponseField>

<ResponseField name="restocked_at" type="string">
  The timestamp when the item was restocked
</ResponseField>

<ResponseField name="success" type="number">
  Indicates whether the call was successful. true if successful, false if not.
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl --location --request POST 'https://api.stateset.com/v1/returns/:id/restock' \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Token <token>' \
  --data-raw '{
      "id": "rt_1NXWPnCo6bFb1KQto6C8OWvE",
      "warehouse_id": "wh_east_01",
      "location_id": "loc_a1_shelf_3",
      "condition_code": "new",
      "quantity": 1,
      "restocking_fee_applied": true
  }'
  ```

  ```graphQL GraphQL theme={null}
        mutation returnRestockMutation {
          returnRestock(
            id: "${returnId}",
            warehouseId: "${warehouseId}",
            locationId: "${locationId}",
            conditionCode: "${conditionCode}",
            quantity: ${quantity},
            restockingFeeApplied: ${restockingFeeApplied}
          ) {
            return {
              id,
              status,
              inventory_adjustment_id,
              new_inventory_level,
              restocked_at
            }
            userErrors {
              field
              message
            }
          }
        }
      `;
  ```

  ```js Node.js theme={null}
  const returns = await stateset.returns.restock({
    id: 'rt_1NXWPnCo6bFb1KQto6C8OWvE',
    warehouse_id: 'wh_east_01',
    location_id: 'loc_a1_shelf_3',
    condition_code: 'new',
    quantity: 1,
    restocking_fee_applied: true
  });
  ```

  ```python Python theme={null}
  returns = stateset.returns.restock({
    'id': 'rt_1NXWPnCo6bFb1KQto6C8OWvE',
    'warehouse_id': 'wh_east_01',
    'location_id': 'loc_a1_shelf_3',
    'condition_code': 'new',
    'quantity': 1,
    'restocking_fee_applied': True
  })
  ```

  ```ruby Ruby theme={null}
  returns = Stateset::Return.restock({
    id: 'rt_1NXWPnCo6bFb1KQto6C8OWvE',
    warehouse_id: 'wh_east_01',
    location_id: 'loc_a1_shelf_3',
    condition_code: 'new',
    quantity: 1,
    restocking_fee_applied: true
  })
  ```

  ```go Go theme={null}
  returns, err := stateset.Returns.restock({
    ID: 'rt_1NXWPnCo6bFb1KQto6C8OWvE',
    WarehouseID: 'wh_east_01',
    LocationID: 'loc_a1_shelf_3',
    ConditionCode: 'new',
    Quantity: 1,
    RestockingFeeApplied: true
  })
  ```

  ```java Java theme={null}
  Return returns = stateset.Returns.restock({
    id: 'rt_1NXWPnCo6bFb1KQto6C8OWvE',
    warehouseId: 'wh_east_01',
    locationId: 'loc_a1_shelf_3',
    conditionCode: 'new',
    quantity: 1,
    restockingFeeApplied: true
  });
  ```

  ```php PHP theme={null}
  $returns = $stateset->returns->restock([
    'id' => 'rt_1NXWPnCo6bFb1KQto6C8OWvE',
    'warehouse_id' => 'wh_east_01',
    'location_id' => 'loc_a1_shelf_3',
    'condition_code' => 'new',
    'quantity' => 1,
    'restocking_fee_applied' => true
  ]);
  ```

  ```csharp C# theme={null}
  var returns = await stateset.Returns.Restock(new {
    Id = 'rt_1NXWPnCo6bFb1KQto6C8OWvE',
    WarehouseId = 'wh_east_01',
    LocationId = 'loc_a1_shelf_3',
    ConditionCode = 'new',
    Quantity = 1,
    RestockingFeeApplied = true
  });
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "id": "rt_1NXWPnCo6bFb1KQto6C8OWvE",
    "object": "return",
    "restocked": true,
    "inventory_adjustment_id": "inv_adj_456",
    "new_inventory_level": 150,
    "warehouse_id": "wh_east_01",
    "location_id": "loc_a1_shelf_3",
    "condition_code": "new",
    "restocked_at": "2024-01-15T11:00:00Z"
  }
  ```
</ResponseExample>
