> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developer-stage.shipbob.dev/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developer-stage.shipbob.dev/_mcp/server.

# Modify Return Order


PUT https://sandbox-api.shipbob.com/2.0/return/{id}
Content-Type: application/json

Reference: https://developer-stage.shipbob.dev/v2.0/api/returns/modify-return-order

## Authentication

- `Authorization` header (bearer token, required) — Authentication using Personal Access Token (PAT) token
- `Authorization` header (bearer token, required) — OAuth2 authentication using JWT tokens

## Request

### Path parameters

- `id` (string, required) — Id of the return order

### Headers

- `shipbob_channel_id` (string, required) — Channel Id for Operation

### Body (application/json)

- `fulfillment_center` (object, required) — Information about a fulfillment center
  - `id` (integer, required) — Unique identifier of the fulfillment center
  - `name` (string, optional, nullable) — Name of the fulfillment center
- `inventory` (list of object, required, nullable) — Array of inventory items being returned
  - `id` (integer, required) — ID of the inventory item to return
  - `quantity` (integer, required) — Quantity of the returned inventory item in the return
  - `requested_action` (enum, optional)
    - Allowed values: `0`, `1`, `2`, `3`
- `reference_id` (string, required, nullable) — Client-defined external unique identifier for the return order
- `original_shipment_id` (integer, optional, nullable) — Shipment from which the items in the return originated
- `tracking_number` (string, optional, nullable) — Tracking number for the return shipment

## Response

### 200

Success

- `channel` (object, optional)
  - `id` (integer, optional)
  - `name` (string, optional, nullable)
- `completed_date` (datetime, optional, nullable)
- `customer_name` (string, optional, nullable)
- `fulfillment_center` (object, optional)
  - `id` (integer, required)
  - `name` (string, optional, nullable)
- `id` (integer, optional)
- `insert_date` (datetime, optional)
- `inventory` (list of object, optional, nullable)
  - `action_requested` (object, optional)
    - `action` (enum, optional)
      - Allowed values: `0`, `1`, `2`, `3`
    - `action_type` (enum, optional) — InventoryDefault Override
      - Allowed values: `InventoryDefault`, `Override`
    - `instructions` (string, optional, nullable)
  - `action_taken` (list of object, optional, nullable)
    - `action` (enum, optional)
      - Allowed values: `0`, `1`, `2`, `3`
    - `action_reason` (string, optional, nullable) — Reason the given action was taken
    - `lot_information` (list of object, optional)
      - `expiration_date` (datetime, optional)
      - `lot_number` (string, optional, nullable)
      - `quantity_processed` (integer, optional)
    - `quantity_processed` (integer, optional) — Quantity of inventory processed with the taken action
  - `id` (integer, optional)
  - `name` (string, optional, nullable)
  - `quantity` (integer, optional)
- `invoice_amount` (double, optional, nullable)
- `original_shipment_id` (integer, optional, nullable)
- `reference_id` (string, optional, nullable)
- `return_type` (enum, optional) — Regular ReturnToSender
  - Allowed values: `Regular`, `ReturnToSender`
- `status` (enum, optional) — AwaitingArrival Arrived Processing Completed Cancelled
  - Allowed values: `AwaitingArrival`, `Arrived`, `Processing`, `Completed`, `Cancelled`
- `store_order_id` (string, optional, nullable)
- `tags` (list of object, optional, nullable)
  - `name` (string, required)
  - `value` (string, required)
- `tracking_number` (string, optional, nullable)
- `transactions` (list of object, optional, nullable)
  - `amount` (double, optional)
  - `transaction_type` (enum, optional) — ReturnLabelInvoice ReturnProcessingFee ReturnToSenderFee
    - Allowed values: `ReturnLabelInvoice`, `ReturnProcessingFee`, `ReturnToSenderFee`

## Examples

**Request**

```json
{
  "fulfillment_center": {
    "id": 0,
    "name": "Cicero (IL)"
  },
  "inventory": [
    {
      "id": 111222,
      "quantity": 1,
      "requested_action": 0
    }
  ],
  "reference_id": "ShipBob_Return_123",
  "original_shipment_id": 123456,
  "tracking_number": "1Z9999999999999999"
}
```

**Response**

```json
{
  "channel": {
    "id": 0,
    "name": "ShipBobs-Shopify-Store"
  },
  "completed_date": "2019-08-24T14:15:22+00:00",
  "customer_name": "string",
  "fulfillment_center": {
    "id": 0,
    "name": "Cicero (IL)"
  },
  "id": 0,
  "insert_date": "2019-08-24T14:15:22+00:00",
  "inventory": [
    {
      "action_requested": {
        "action": 0,
        "action_type": "InventoryDefault",
        "instructions": "string"
      },
      "action_taken": [
        {
          "action": 0,
          "action_reason": "string",
          "lot_information": [
            {
              "expiration_date": "2019-08-24T14:15:22+00:00",
              "lot_number": "string",
              "quantity_processed": 0
            }
          ],
          "quantity_processed": 1
        }
      ],
      "id": 0,
      "name": "string",
      "quantity": 0
    }
  ],
  "invoice_amount": 0.1,
  "original_shipment_id": 0,
  "reference_id": "string",
  "return_type": "Regular",
  "status": "AwaitingArrival",
  "store_order_id": "string",
  "tracking_number": "860C8CDC8F0B4FC7AB69AC86C20539EC",
  "transactions": [
    {
      "amount": 2.5,
      "transaction_type": "ReturnLabelInvoice"
    }
  ]
}
```

**SDK Code**

```python default
import requests

url = "https://sandbox-api.shipbob.com/2.0/return/id"

payload = {
    "fulfillment_center": {
        "id": 0,
        "name": "Cicero (IL)"
    },
    "inventory": [
        {
            "id": 111222,
            "quantity": 1,
            "requested_action": 0
        }
    ],
    "reference_id": "ShipBob_Return_123",
    "original_shipment_id": 123456,
    "tracking_number": "1Z9999999999999999"
}
headers = {
    "shipbob_channel_id": "shipbob_channel_id",
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.json())
```

```javascript default
const url = 'https://sandbox-api.shipbob.com/2.0/return/id';
const options = {
  method: 'PUT',
  headers: {
    shipbob_channel_id: 'shipbob_channel_id',
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json'
  },
  body: '{"fulfillment_center":{"id":0,"name":"Cicero (IL)"},"inventory":[{"id":111222,"quantity":1,"requested_action":0}],"reference_id":"ShipBob_Return_123","original_shipment_id":123456,"tracking_number":"1Z9999999999999999"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go default
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://sandbox-api.shipbob.com/2.0/return/id"

	payload := strings.NewReader("{\n  \"fulfillment_center\": {\n    \"id\": 0,\n    \"name\": \"Cicero (IL)\"\n  },\n  \"inventory\": [\n    {\n      \"id\": 111222,\n      \"quantity\": 1,\n      \"requested_action\": 0\n    }\n  ],\n  \"reference_id\": \"ShipBob_Return_123\",\n  \"original_shipment_id\": 123456,\n  \"tracking_number\": \"1Z9999999999999999\"\n}")

	req, _ := http.NewRequest("PUT", url, payload)

	req.Header.Add("shipbob_channel_id", "shipbob_channel_id")
	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby default
require 'uri'
require 'net/http'

url = URI("https://sandbox-api.shipbob.com/2.0/return/id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["shipbob_channel_id"] = 'shipbob_channel_id'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"fulfillment_center\": {\n    \"id\": 0,\n    \"name\": \"Cicero (IL)\"\n  },\n  \"inventory\": [\n    {\n      \"id\": 111222,\n      \"quantity\": 1,\n      \"requested_action\": 0\n    }\n  ],\n  \"reference_id\": \"ShipBob_Return_123\",\n  \"original_shipment_id\": 123456,\n  \"tracking_number\": \"1Z9999999999999999\"\n}"

response = http.request(request)
puts response.read_body
```

```java default
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.put("https://sandbox-api.shipbob.com/2.0/return/id")
  .header("shipbob_channel_id", "shipbob_channel_id")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"fulfillment_center\": {\n    \"id\": 0,\n    \"name\": \"Cicero (IL)\"\n  },\n  \"inventory\": [\n    {\n      \"id\": 111222,\n      \"quantity\": 1,\n      \"requested_action\": 0\n    }\n  ],\n  \"reference_id\": \"ShipBob_Return_123\",\n  \"original_shipment_id\": 123456,\n  \"tracking_number\": \"1Z9999999999999999\"\n}")
  .asString();
```

```php default
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'https://sandbox-api.shipbob.com/2.0/return/id', [
  'body' => '{
  "fulfillment_center": {
    "id": 0,
    "name": "Cicero (IL)"
  },
  "inventory": [
    {
      "id": 111222,
      "quantity": 1,
      "requested_action": 0
    }
  ],
  "reference_id": "ShipBob_Return_123",
  "original_shipment_id": 123456,
  "tracking_number": "1Z9999999999999999"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
    'shipbob_channel_id' => 'shipbob_channel_id',
  ],
]);

echo $response->getBody();
```

```csharp default
using RestSharp;

var client = new RestClient("https://sandbox-api.shipbob.com/2.0/return/id");
var request = new RestRequest(Method.PUT);
request.AddHeader("shipbob_channel_id", "shipbob_channel_id");
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"fulfillment_center\": {\n    \"id\": 0,\n    \"name\": \"Cicero (IL)\"\n  },\n  \"inventory\": [\n    {\n      \"id\": 111222,\n      \"quantity\": 1,\n      \"requested_action\": 0\n    }\n  ],\n  \"reference_id\": \"ShipBob_Return_123\",\n  \"original_shipment_id\": 123456,\n  \"tracking_number\": \"1Z9999999999999999\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift default
import Foundation

let headers = [
  "shipbob_channel_id": "shipbob_channel_id",
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "fulfillment_center": [
    "id": 0,
    "name": "Cicero (IL)"
  ],
  "inventory": [
    [
      "id": 111222,
      "quantity": 1,
      "requested_action": 0
    ]
  ],
  "reference_id": "ShipBob_Return_123",
  "original_shipment_id": 123456,
  "tracking_number": "1Z9999999999999999"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://sandbox-api.shipbob.com/2.0/return/id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```