# Create Return Order POST https://api.shipbob.com/2026-01/return Content-Type: application/json Creates a new return order for a previously shipped order. Specify the original shipment, inventory items to return, and requested return actions. Reference: https://developer.shipbob.com/api/returns/create-return-order ## OpenAPI Specification ```yaml openapi: 3.1.1 info: title: | Create Return Order version: endpoint_returns.createReturnOrder paths: /2026-01/return: post: operationId: create-return-order summary: | Create Return Order description: > Creates a new return order for a previously shipped order. Specify the original shipment, inventory items to return, and requested return actions. tags: - - subpackage_returns parameters: - name: Authorization in: header description: Authentication using Personal Access Token (PAT) token or OAuth2 required: true schema: type: string - name: shipbob_channel_id in: header description: >- Retrieve your channel ID from the [GET /channel](/api/channels/get-channels) endpoint. Use the channel ID that has write scopes. required: true schema: type: string format: int32 responses: '201': description: Created content: application/json: schema: $ref: '#/components/schemas/Returns.PublicReturnV1Dto' '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: Unprocessable Content content: {} requestBody: description: >- The return order creation request containing return details, items, and configuration. 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_createReturnOrder_example import requests url = "https://api.shipbob.com/2026-01/return" 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 = { "shipbob_channel_id": "shipbob_channel_id", "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.json()) ``` ```javascript Returns_createReturnOrder_example const url = 'https://api.shipbob.com/2026-01/return'; const options = { method: 'POST', headers: { shipbob_channel_id: 'shipbob_channel_id', 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_createReturnOrder_example package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.shipbob.com/2026-01/return" 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("POST", 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_createReturnOrder_example require 'uri' require 'net/http' url = URI("https://api.shipbob.com/2026-01/return") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.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\": \"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_createReturnOrder_example import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api.shipbob.com/2026-01/return") .header("shipbob_channel_id", "shipbob_channel_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_createReturnOrder_example request('POST', 'https://api.shipbob.com/2026-01/return', [ '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', 'shipbob_channel_id' => 'shipbob_channel_id', ], ]); echo $response->getBody(); ``` ```csharp Returns_createReturnOrder_example using RestSharp; var client = new RestClient("https://api.shipbob.com/2026-01/return"); var request = new RestRequest(Method.POST); 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\": \"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_createReturnOrder_example import Foundation let headers = [ "shipbob_channel_id": "shipbob_channel_id", "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")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" 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() ```