# Modify Return Order PUT https://api.shipbob.com/2025-07/return/{id} Content-Type: application/json Reference: https://developer.shipbob.com/2025-07/api/returns/modify-return-order ## OpenAPI Specification ```yaml openapi: 3.1.1 info: title: | Modify Return Order version: endpoint_returns.modifyReturnOrder paths: /2025-07/return/{id}: put: operationId: modify-return-order summary: | Modify Return Order tags: - - subpackage_returns parameters: - name: id in: path description: Id of the return order required: true schema: type: string format: int32 - name: Authorization in: header description: Authentication using Personal Access Token (PAT) token required: true schema: type: string - name: shipbob_channel_id in: header description: | Channel Id for Operation required: true schema: type: string format: int32 responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/Returns.ReturnOrderViewModel' '400': description: Bad Request content: {} '401': description: Authorization missing or invalid content: {} '403': description: The provided credentials are not authorized to access this resource content: {} '422': description: Client Error content: {} requestBody: description: Model defining the return content: application/json: schema: $ref: '#/components/schemas/Returns.CreateReturnViewModel' components: schemas: Returns.FulfillmentCenterViewModel: type: object properties: id: type: integer description: Unique identifier of the fulfillment center name: type: - string - 'null' description: Name of the fulfillment center required: - id Returns.ReturnAction: type: string enum: - value: '0' - value: '1' - value: '2' - value: '3' Returns.ReturnInventoryViewModel: type: object properties: id: type: integer description: ID of the inventory item to return quantity: type: integer description: Quantity of the returned inventory item in the return requested_action: $ref: '#/components/schemas/Returns.ReturnAction' required: - id - quantity Returns.CreateReturnViewModel: type: object properties: fulfillment_center: $ref: '#/components/schemas/Returns.FulfillmentCenterViewModel' inventory: type: - array - 'null' items: $ref: '#/components/schemas/Returns.ReturnInventoryViewModel' description: Array of inventory items being returned original_shipment_id: type: - integer - 'null' description: Shipment from which the items in the return originated reference_id: type: - string - 'null' description: Client-defined external unique identifier for the return order tracking_number: type: - string - 'null' description: Tracking number for the return shipment required: - fulfillment_center - inventory - reference_id Returns.ChannelInfoViewModel: type: object properties: id: type: integer description: Unique id of the channel name: type: - string - 'null' description: Name of the channel Returns.ReturnActionSource: type: string enum: - value: InventoryDefault - value: Override Returns.ReturnActionRequestedViewModel: type: object properties: action: $ref: '#/components/schemas/Returns.ReturnAction' action_type: $ref: '#/components/schemas/Returns.ReturnActionSource' instructions: type: - string - 'null' Returns.ReturnActionTakenViewModel: type: object properties: action: $ref: '#/components/schemas/Returns.ReturnAction' action_reason: type: - string - 'null' quantity_processed: type: integer Returns.InventoryItemViewModel: type: object properties: action_requested: $ref: '#/components/schemas/Returns.ReturnActionRequestedViewModel' action_taken: type: - array - 'null' items: $ref: '#/components/schemas/Returns.ReturnActionTakenViewModel' id: type: integer name: type: - string - 'null' quantity: type: integer Returns.ReturnType: type: string enum: - value: Regular - value: ReturnToSender Returns.ReturnStatus: type: string enum: - value: AwaitingArrival - value: Arrived - value: Processing - value: Completed - value: Cancelled Returns.TransactionLogSource: type: string enum: - value: ReturnLabelInvoice - value: ReturnProcessingFee - value: ReturnToSenderFee Returns.TransactionViewModel: type: object properties: amount: type: number format: double transaction_type: $ref: '#/components/schemas/Returns.TransactionLogSource' Returns.ReturnOrderViewModel: type: object properties: channel: $ref: '#/components/schemas/Returns.ChannelInfoViewModel' completed_date: type: - string - 'null' format: date-time description: Completed date for a return order. customer_name: type: - string - 'null' description: Customer name from the related shipment. fulfillment_center: $ref: '#/components/schemas/Returns.FulfillmentCenterViewModel' id: type: integer description: Unique id of the Return Order insert_date: type: string format: date-time description: Date this return order was created inventory: type: - array - 'null' items: $ref: '#/components/schemas/Returns.InventoryItemViewModel' description: List of inventory included in the return order invoice_amount: type: - number - 'null' format: double description: Invoiced amount of return order (sum of transaction amounts) original_shipment_id: type: - integer - 'null' description: Id of the corresponding shipment that is the souce of the return reference_id: type: - string - 'null' description: Client-defined external unique id of the return order return_type: $ref: '#/components/schemas/Returns.ReturnType' status: $ref: '#/components/schemas/Returns.ReturnStatus' store_order_id: type: - string - 'null' description: Store order for the related shipment. tracking_number: type: - string - 'null' description: Tracking number of the return shipment transactions: type: - array - 'null' items: $ref: '#/components/schemas/Returns.TransactionViewModel' description: Array of transactions affiliated with the return order ``` ## SDK Code Examples ```python Returns_modifyReturnOrder_example import requests url = "https://api.shipbob.com/2025-07/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 ", "Content-Type": "application/json" } response = requests.put(url, json=payload, headers=headers) print(response.json()) ``` ```javascript Returns_modifyReturnOrder_example const url = 'https://api.shipbob.com/2025-07/return/id'; const options = { method: 'PUT', headers: { shipbob_channel_id: 'shipbob_channel_id', Authorization: 'Bearer ', '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 Returns_modifyReturnOrder_example package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.shipbob.com/2025-07/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 ") 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_modifyReturnOrder_example require 'uri' require 'net/http' url = URI("https://api.shipbob.com/2025-07/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 ' 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 Returns_modifyReturnOrder_example import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.put("https://api.shipbob.com/2025-07/return/id") .header("shipbob_channel_id", "shipbob_channel_id") .header("Authorization", "Bearer ") .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 Returns_modifyReturnOrder_example request('PUT', 'https://api.shipbob.com/2025-07/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 ', 'Content-Type' => 'application/json', 'shipbob_channel_id' => 'shipbob_channel_id', ], ]); echo $response->getBody(); ``` ```csharp Returns_modifyReturnOrder_example using RestSharp; var client = new RestClient("https://api.shipbob.com/2025-07/return/id"); var request = new RestRequest(Method.PUT); request.AddHeader("shipbob_channel_id", "shipbob_channel_id"); request.AddHeader("Authorization", "Bearer "); 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 Returns_modifyReturnOrder_example import Foundation let headers = [ "shipbob_channel_id": "shipbob_channel_id", "Authorization": "Bearer ", "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://api.shipbob.com/2025-07/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() ```