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

# 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/2026-01/api/returns/create-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

## Servers

- `https://api.shipbob.com` (https://api.shipbob.com, default)
- `https://sandbox-api.shipbob.com` (https://sandbox-api.shipbob.com)

## Request

### Headers

- `shipbob_channel_id` (integer, required) — Channel Id for operation

### Body (application/json)

This endpoint expects an object.

- `fulfillment_center` (object, required) — A Facility to process Returns.
  - `id` (integer, required) — Unique identifier of the facility
  - `name` (string, optional, nullable) — Name of the facility (It is optional because public API integrations do not pass this)
- `inventory` (list of object, required) — 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, required)
    - Allowed values: `Default`, `Restock`, `Quarantine`, `Dispose`, `Donation`
  - `lot_date` (datetime, optional, nullable) — Lot date associated with the inventory item, if applicable.
  - `lot_number` (string, optional, nullable) — Lot number associated with the inventory item, if applicable.
- `reference_id` (string, required) — Client-defined external unique identifier for the return order. If tracking id is not provided, this value must appear on the box label as RMA. Example: ShipBob\_Return\_123
- `original_shipment_id` (integer, optional, nullable) — Shipment from which the items in the return originated 123456
- `tracking_number` (string, optional, nullable) — Tracking number for the return shipment 1Z9999999999999999

## Response

### 201

Created

- `channel` (object, optional) — The details of a Channel
  - `id` (integer, optional) — Unique Id of the channel
  - `name` (string, optional, nullable) — Name given to the channel
- `completed_date` (datetime, optional, nullable) — The date and time for when the return order was completely processed
- `customer_name` (string, optional, nullable) — Name of merchant that return belongs to
- `fulfillment_center` (object, optional) — The details of a Fulfillment Center
  - `id` (integer, optional) — Unique id of the fulfillment center
  - `name` (string, optional, nullable) — Name give to the fulfillment center
- `id` (integer, optional) — Unique id of the return order
- `insert_date` (datetime, optional) — The date and time for when the return order was created
- `inventory` (list of object, optional, nullable) — List of inventory items in return order
  - `action_requested` (object, optional) — The details of the action requested for inventory
    - `action` (string, optional, nullable) — The action to take
    - `action_type` (string, optional, nullable) — The source of the action to take, i.e. Inventory Default or Overriden by Merchant at creation
    - `instructions` (string, optional, nullable) — The instructions for how to take the action given by inventory owning Merchant
  - `action_taken` (list of object, optional, nullable) — List of actions taken
    - `action` (string, optional, nullable) — The return action taken
    - `action_reason` (string, optional, nullable) — The reason the action was taken
    - `image_url` (string, optional, nullable) — Image of inventory processed with this action.
    - `quantity_processed` (integer, optional) — The quantity of inventory items processed with this reason and action
  - `bundle_parent_sku` (string, optional, nullable) — SKU of the parent bundle if this item was expanded from a bundle. Null for non-bundle items
  - `id` (integer, optional) — Unique id of the inventory
  - `name` (string, optional, nullable) — Name of the product
  - `quantity` (integer, optional) — Number of inventory that is being returned
- `invoice_amount` (double, optional, nullable) — Amount merchant was invoiced for processing the return
- `original_shipment_id` (integer, optional, nullable) — ShipmentId for which return was created
- `reference_id` (string, optional, nullable) — Unique reference id of the return order. Created by merchant if a regular return.
- `return_type` (string, optional, nullable) — Type of the return, i.e. Regular, RTS
- `status` (string, optional, nullable) — Status of the return order, i.e. `Awaiting Arrival`, `Arrived`, `Processing`, `Completed` `Cancelled`
- `store_order_id` (string, optional, nullable) — Reference to external order id
- `tracking_number` (string, optional, nullable) — The tracking number of the return shipping label
- `transactions` (list of object, optional, nullable) — List of transactions that make up the billable amount to invoice a merchant
  - `amount` (double, optional) — The amount charged for this transaction
  - `transaction_type` (string, optional, nullable) — The type of transaction

## Errors

### 400 Bad Request Error

Bad Request

- `detail` (string, optional, nullable)
- `instance` (string, optional, nullable)
- `status` (integer, optional, nullable)
- `title` (string, optional, nullable)
- `type` (string, optional, nullable)

### 401 Unauthorized Error

Authorization missing or invalid

- `any`

### 403 Forbidden Error

The provided credentials are not authorized to access this resource

- `any`

### 422 Unprocessable Entity Error

Unprocessable Content

- `details` (any, optional, nullable)
- `errors` (list of string, optional, nullable)
- `message` (string, optional, nullable)
- `stackTrace` (string, optional, nullable) — StackTrace of the Exception

## Examples

**Request**

```json
{
  "fulfillment_center": {
    "id": 0,
    "name": "string"
  },
  "inventory": [
    {
      "id": 0,
      "quantity": 0,
      "requested_action": "Default",
      "lot_date": "2019-08-24T14:15:22+00:00",
      "lot_number": "string"
    }
  ],
  "reference_id": "string",
  "original_shipment_id": 0,
  "tracking_number": "string"
}
```

**Response**

```json
{
  "channel": {
    "id": 0,
    "name": "string"
  },
  "completed_date": "2019-08-24T14:15:22+00:00",
  "customer_name": "string",
  "fulfillment_center": {
    "id": 0,
    "name": "string"
  },
  "id": 0,
  "insert_date": "2019-08-24T14:15:22+00:00",
  "inventory": [
    {
      "action_requested": {
        "action": "string",
        "action_type": "string",
        "instructions": "string"
      },
      "action_taken": [
        {
          "action": "string",
          "action_reason": "string",
          "image_url": "http://example.com",
          "quantity_processed": 0
        }
      ],
      "id": 0,
      "name": "string",
      "quantity": 0
    }
  ],
  "invoice_amount": 0.1,
  "original_shipment_id": 0,
  "reference_id": "string",
  "return_type": "string",
  "status": "string",
  "store_order_id": "string",
  "tracking_number": "string",
  "transactions": [
    {
      "amount": 0.1,
      "transaction_type": "string"
    }
  ]
}
```

**SDK Code**

```python default
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:22+00:00",
            "lot_number": "string"
        }
    ],
    "reference_id": "string",
    "original_shipment_id": 0,
    "tracking_number": "string"
}
headers = {
    "shipbob_channel_id": "1",
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript default
const url = 'https://api.shipbob.com/2026-01/return';
const options = {
  method: 'POST',
  headers: {
    shipbob_channel_id: '1',
    Authorization: 'Bearer <token>',
    '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:22+00:00","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 default
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:22+00:00\",\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", "1")
	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://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"] = '1'
request["Authorization"] = 'Bearer <token>'
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:22+00:00\",\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 default
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.shipbob.com/2026-01/return")
  .header("shipbob_channel_id", "1")
  .header("Authorization", "Bearer <token>")
  .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:22+00:00\",\n      \"lot_number\": \"string\"\n    }\n  ],\n  \"reference_id\": \"string\",\n  \"original_shipment_id\": 0,\n  \"tracking_number\": \"string\"\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->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:22+00:00",
      "lot_number": "string"
    }
  ],
  "reference_id": "string",
  "original_shipment_id": 0,
  "tracking_number": "string"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
    'shipbob_channel_id' => '1',
  ],
]);

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

```csharp default
using RestSharp;

var client = new RestClient("https://api.shipbob.com/2026-01/return");
var request = new RestRequest(Method.POST);
request.AddHeader("shipbob_channel_id", "1");
request.AddHeader("Authorization", "Bearer <token>");
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:22+00:00\",\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 default
import Foundation

let headers = [
  "shipbob_channel_id": "1",
  "Authorization": "Bearer <token>",
  "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:22+00:00",
      "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()
```