# Modify Return Order PUT https://api.shipbob.com/2.0/return/{id} Content-Type: application/json Reference: https://developer.shipbob.com/2025-07/api/returns/modify-return-order ## OpenAPI Specification ```yaml openapi: 3.1.0 info: title: api-2.0 version: 1.0.0 paths: /2.0/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: application/json: schema: $ref: '#/components/schemas/Returns.ValidationProblemDetails' '401': description: Authorization missing or invalid content: application/json: schema: description: Any type '403': description: The provided credentials are not authorized to access this resource content: application/json: schema: description: Any type '422': description: Client Error content: application/json: schema: $ref: '#/components/schemas/Returns.ValidationProblemDetails' requestBody: description: Model defining the return content: application/json: schema: $ref: '#/components/schemas/Returns.CreateReturnViewModel' servers: - url: https://api.shipbob.com - url: https://sandbox-api.shipbob.com 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 description: Information about a fulfillment center title: Returns.FulfillmentCenterViewModel Returns.ReturnAction: type: string enum: - '0' - '1' - '2' - '3' title: Returns.ReturnAction 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 title: Returns.ReturnInventoryViewModel 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 title: Returns.CreateReturnViewModel Returns.ChannelInfoModel: type: object properties: id: type: integer name: type: - string - 'null' title: Returns.ChannelInfoModel Returns.FulfillmentCenterModel: type: object properties: id: type: integer name: type: - string - 'null' required: - id title: Returns.FulfillmentCenterModel Returns.ReturnActionSource: type: string enum: - InventoryDefault - Override description: |- InventoryDefault Override title: Returns.ReturnActionSource Returns.ReturnActionRequestedViewModel: type: object properties: action: $ref: '#/components/schemas/Returns.ReturnAction' action_type: $ref: '#/components/schemas/Returns.ReturnActionSource' instructions: type: - string - 'null' title: Returns.ReturnActionRequestedViewModel Returns.LotInformationViewModel: type: object properties: expiration_date: type: string format: date-time lot_number: type: - string - 'null' quantity_processed: type: integer title: Returns.LotInformationViewModel Returns.ReturnActionTakenViewModel: type: object properties: action: $ref: '#/components/schemas/Returns.ReturnAction' action_reason: type: - string - 'null' description: Reason the given action was taken lot_information: type: array items: $ref: '#/components/schemas/Returns.LotInformationViewModel' quantity_processed: type: integer description: Quantity of inventory processed with the taken action title: Returns.ReturnActionTakenViewModel 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 title: Returns.InventoryItemViewModel Returns.ReturnType: type: string enum: - Regular - ReturnToSender description: |- Regular ReturnToSender title: Returns.ReturnType Returns.ReturnStatus: type: string enum: - AwaitingArrival - Arrived - Processing - Completed - Cancelled description: |- AwaitingArrival Arrived Processing Completed Cancelled title: Returns.ReturnStatus Returns.TagModel: type: object properties: name: type: string value: type: string required: - name - value title: Returns.TagModel Returns.TransactionLogSource: type: string enum: - ReturnLabelInvoice - ReturnProcessingFee - ReturnToSenderFee description: |- ReturnLabelInvoice ReturnProcessingFee ReturnToSenderFee title: Returns.TransactionLogSource Returns.TransactionViewModel: type: object properties: amount: type: number format: double transaction_type: $ref: '#/components/schemas/Returns.TransactionLogSource' title: Returns.TransactionViewModel Returns.ReturnOrderViewModel: type: object properties: channel: $ref: '#/components/schemas/Returns.ChannelInfoModel' completed_date: type: - string - 'null' format: date-time customer_name: type: - string - 'null' fulfillment_center: $ref: '#/components/schemas/Returns.FulfillmentCenterModel' id: type: integer insert_date: type: string format: date-time inventory: type: - array - 'null' items: $ref: '#/components/schemas/Returns.InventoryItemViewModel' invoice_amount: type: - number - 'null' format: double original_shipment_id: type: - integer - 'null' reference_id: type: - string - 'null' return_type: $ref: '#/components/schemas/Returns.ReturnType' status: $ref: '#/components/schemas/Returns.ReturnStatus' store_order_id: type: - string - 'null' tags: type: - array - 'null' items: $ref: '#/components/schemas/Returns.TagModel' tracking_number: type: - string - 'null' transactions: type: - array - 'null' items: $ref: '#/components/schemas/Returns.TransactionViewModel' title: Returns.ReturnOrderViewModel ReturnsValidationProblemDetailsExtensions: type: object properties: {} title: ReturnsValidationProblemDetailsExtensions Returns.ValidationProblemDetails: type: object properties: detail: type: - string - 'null' errors: type: - object - 'null' additionalProperties: type: array items: type: string extensions: type: - object - 'null' additionalProperties: $ref: '#/components/schemas/ReturnsValidationProblemDetailsExtensions' instance: type: - string - 'null' status: type: - integer - 'null' title: type: - string - 'null' type: type: - string - 'null' title: Returns.ValidationProblemDetails securitySchemes: PAT: type: http scheme: bearer description: Authentication using Personal Access Token (PAT) token OAuth2: type: http scheme: bearer description: OAuth2 authentication using JWT tokens ``` ## SDK Code Examples ```python Returns_modifyReturnOrder_example import requests url = "https://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 ", "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/2.0/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/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 ") 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/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 ' 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/2.0/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/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 ', '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/2.0/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/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() ```