# Edit Return Order
PUT https://api.shipbob.com/2026-01/return/{id}
Content-Type: application/json
Updates an existing return using the provided request body and returns the updated return payload.
Reference: https://developer.shipbob.com/api/returns/edit-return-order
## OpenAPI Specification
```yaml
openapi: 3.1.1
info:
title: |
Edit Return Order
version: endpoint_returns.editReturnOrder
paths:
/2026-01/return/{id}:
put:
operationId: edit-return-order
summary: |
Edit Return Order
description: >
Updates an existing return using the provided request body and returns
the updated return payload.
tags:
- - subpackage_returns
parameters:
- name: id
in: path
description: ''
required: true
schema:
type: string
format: int32
- name: Authorization
in: header
description: Authentication using Personal Access Token (PAT) token or OAuth2
required: true
schema:
type: string
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/Returns.PublicReturnV1Dto'
'401':
description: Authorization missing or invalid
content: {}
'403':
description: The provided credentials are not authorized to access this resource
content: {}
'404':
description: Not Found
content: {}
'422':
description: Client Error
content: {}
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Returns.CreateReturnRequest'
components:
schemas:
Returns.Facility:
type: object
properties:
id:
type: integer
description: Unique identifier of the facility
name:
type:
- string
- 'null'
description: >-
Name of the facility (It is optional because public API integrations
do not pass this)
required:
- id
Returns.ReturnAction:
type: string
enum:
- value: Default
- value: Restock
- value: Quarantine
- value: Dispose
Returns.ReturnInventory:
type: object
properties:
id:
type: integer
description: ID of the inventory item to return.
lot_date:
type:
- string
- 'null'
format: date-time
lot_number:
type:
- string
- 'null'
quantity:
type: integer
description: Quantity of the returned inventory item in the return.
requested_action:
$ref: '#/components/schemas/Returns.ReturnAction'
required:
- id
- quantity
- requested_action
Returns.CreateReturnRequest:
type: object
properties:
fulfillment_center:
$ref: '#/components/schemas/Returns.Facility'
inventory:
type: array
items:
$ref: '#/components/schemas/Returns.ReturnInventory'
description: Array of inventory items being returned
original_shipment_id:
type:
- integer
- 'null'
description: >-
Shipment from which the items in the return originated
123456
reference_id:
type: string
description: "Client-defined external unique identifier for the return order.\r\n If tracking id is not provided, this value must appear on the box label as RMA. Example: ShipBob_Return_123"
tracking_number:
type:
- string
- 'null'
description: >-
Tracking number for the return shipment
1Z9999999999999999
required:
- fulfillment_center
- inventory
- reference_id
Returns.ChannelDto:
type: object
properties:
id:
type: integer
description: Unique Id of the channel
name:
type:
- string
- 'null'
description: Name given to the channel
Returns.FulfillmentCenterDto:
type: object
properties:
id:
type: integer
description: Unique id of the fulfillment center
name:
type:
- string
- 'null'
description: Name give to the fulfillment center
Returns.ActionRequestedDto:
type: object
properties:
action:
type:
- string
- 'null'
description: The action to take
action_type:
type:
- string
- 'null'
description: >-
The source of the action to take, i.e. Inventory Default or
Overriden by Merchant at creation
instructions:
type:
- string
- 'null'
description: >-
The instructions for how to take the action given by inventory
owning Merchant
Returns.ActionTakenDto:
type: object
properties:
action:
type:
- string
- 'null'
description: The return action taken
action_reason:
type:
- string
- 'null'
description: The reason the action was taken
image_url:
type:
- string
- 'null'
format: uri
description: Image of inventory processed with this action.
quantity_processed:
type: integer
description: >-
The quantity of inventory items processed with this reason and
action
Returns.InventoryItemV1Dto:
type: object
properties:
action_requested:
$ref: '#/components/schemas/Returns.ActionRequestedDto'
action_taken:
type:
- array
- 'null'
items:
$ref: '#/components/schemas/Returns.ActionTakenDto'
description: List of actions taken
id:
type: integer
description: Unique id of the inventory
name:
type:
- string
- 'null'
description: Name of the product
quantity:
type: integer
description: Number of inventory that is being returned
Returns.TransactionDto:
type: object
properties:
amount:
type: number
format: double
description: The amount charged for this transaction
transaction_type:
type:
- string
- 'null'
description: The type of transaction
Returns.PublicReturnV1Dto:
type: object
properties:
channel:
$ref: '#/components/schemas/Returns.ChannelDto'
completed_date:
type:
- string
- 'null'
format: date-time
description: The date and time for when the return order was completely processed
customer_name:
type:
- string
- 'null'
description: Name of merchant that return belongs to
fulfillment_center:
$ref: '#/components/schemas/Returns.FulfillmentCenterDto'
id:
type: integer
description: Unique id of the return order
insert_date:
type: string
format: date-time
description: The date and time for when the return order was created
inventory:
type:
- array
- 'null'
items:
$ref: '#/components/schemas/Returns.InventoryItemV1Dto'
description: List of inventory items in return order
invoice_amount:
type:
- number
- 'null'
format: double
description: Amount merchant was invoiced for processing the return
original_shipment_id:
type:
- integer
- 'null'
description: ShipmentId for which return was created
reference_id:
type:
- string
- 'null'
description: >-
Unique reference id of the return order. Created by merchant if a
regular return.
return_type:
type:
- string
- 'null'
description: Type of the return, i.e. Regular, RTS
status:
type:
- string
- 'null'
description: Status of the return order, i.e. AwaitingArrival
store_order_id:
type:
- string
- 'null'
description: Reference to external order id
tracking_number:
type:
- string
- 'null'
description: The tracking number of the return shipping label
transactions:
type:
- array
- 'null'
items:
$ref: '#/components/schemas/Returns.TransactionDto'
description: >-
List of transactions that make up the billable amount to invoice a
merchant
```
## SDK Code Examples
```python Returns_editReturnOrder_example
import requests
url = "https://api.shipbob.com/2026-01/return/id"
payload = {
"fulfillment_center": {
"id": 0,
"name": "string"
},
"inventory": [
{
"id": 0,
"quantity": 0,
"requested_action": "Default",
"lot_date": "2019-08-24T14:15:22Z",
"lot_number": "string"
}
],
"reference_id": "string",
"original_shipment_id": 0,
"tracking_number": "string"
}
headers = {
"Authorization": "Bearer ",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
```
```javascript Returns_editReturnOrder_example
const url = 'https://api.shipbob.com/2026-01/return/id';
const options = {
method: 'PUT',
headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'},
body: '{"fulfillment_center":{"id":0,"name":"string"},"inventory":[{"id":0,"quantity":0,"requested_action":"Default","lot_date":"2019-08-24T14:15:22Z","lot_number":"string"}],"reference_id":"string","original_shipment_id":0,"tracking_number":"string"}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
```
```go Returns_editReturnOrder_example
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.shipbob.com/2026-01/return/id"
payload := strings.NewReader("{\n \"fulfillment_center\": {\n \"id\": 0,\n \"name\": \"string\"\n },\n \"inventory\": [\n {\n \"id\": 0,\n \"quantity\": 0,\n \"requested_action\": \"Default\",\n \"lot_date\": \"2019-08-24T14:15:22Z\",\n \"lot_number\": \"string\"\n }\n ],\n \"reference_id\": \"string\",\n \"original_shipment_id\": 0,\n \"tracking_number\": \"string\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer ")
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 Returns_editReturnOrder_example
require 'uri'
require 'net/http'
url = URI("https://api.shipbob.com/2026-01/return/id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer '
request["Content-Type"] = 'application/json'
request.body = "{\n \"fulfillment_center\": {\n \"id\": 0,\n \"name\": \"string\"\n },\n \"inventory\": [\n {\n \"id\": 0,\n \"quantity\": 0,\n \"requested_action\": \"Default\",\n \"lot_date\": \"2019-08-24T14:15:22Z\",\n \"lot_number\": \"string\"\n }\n ],\n \"reference_id\": \"string\",\n \"original_shipment_id\": 0,\n \"tracking_number\": \"string\"\n}"
response = http.request(request)
puts response.read_body
```
```java Returns_editReturnOrder_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;
HttpResponse response = Unirest.put("https://api.shipbob.com/2026-01/return/id")
.header("Authorization", "Bearer ")
.header("Content-Type", "application/json")
.body("{\n \"fulfillment_center\": {\n \"id\": 0,\n \"name\": \"string\"\n },\n \"inventory\": [\n {\n \"id\": 0,\n \"quantity\": 0,\n \"requested_action\": \"Default\",\n \"lot_date\": \"2019-08-24T14:15:22Z\",\n \"lot_number\": \"string\"\n }\n ],\n \"reference_id\": \"string\",\n \"original_shipment_id\": 0,\n \"tracking_number\": \"string\"\n}")
.asString();
```
```php Returns_editReturnOrder_example
request('PUT', 'https://api.shipbob.com/2026-01/return/id', [
'body' => '{
"fulfillment_center": {
"id": 0,
"name": "string"
},
"inventory": [
{
"id": 0,
"quantity": 0,
"requested_action": "Default",
"lot_date": "2019-08-24T14:15:22Z",
"lot_number": "string"
}
],
"reference_id": "string",
"original_shipment_id": 0,
"tracking_number": "string"
}',
'headers' => [
'Authorization' => 'Bearer ',
'Content-Type' => 'application/json',
],
]);
echo $response->getBody();
```
```csharp Returns_editReturnOrder_example
using RestSharp;
var client = new RestClient("https://api.shipbob.com/2026-01/return/id");
var request = new RestRequest(Method.PUT);
request.AddHeader("Authorization", "Bearer ");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n \"fulfillment_center\": {\n \"id\": 0,\n \"name\": \"string\"\n },\n \"inventory\": [\n {\n \"id\": 0,\n \"quantity\": 0,\n \"requested_action\": \"Default\",\n \"lot_date\": \"2019-08-24T14:15:22Z\",\n \"lot_number\": \"string\"\n }\n ],\n \"reference_id\": \"string\",\n \"original_shipment_id\": 0,\n \"tracking_number\": \"string\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```
```swift Returns_editReturnOrder_example
import Foundation
let headers = [
"Authorization": "Bearer ",
"Content-Type": "application/json"
]
let parameters = [
"fulfillment_center": [
"id": 0,
"name": "string"
],
"inventory": [
[
"id": 0,
"quantity": 0,
"requested_action": "Default",
"lot_date": "2019-08-24T14:15:22Z",
"lot_number": "string"
]
],
"reference_id": "string",
"original_shipment_id": 0,
"tracking_number": "string"
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "https://api.shipbob.com/2026-01/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()
```