> This page is for version v1.0.
> For other versions, use one of these documentation indexes:
> - 2026-07 (default): https://developer-stage.shipbob.dev/2026-07/llms.txt
> - 2026-01: https://developer-stage.shipbob.dev/2026-01/llms.txt
> - 2025-07: https://developer-stage.shipbob.dev/2025-07/llms.txt
> - v2.0: https://developer-stage.shipbob.dev/v2.0/llms.txt
> - v1.0: https://developer-stage.shipbob.dev/v1.0/llms.txt
> - Experimental: https://developer-stage.shipbob.dev/experimental/llms.txt

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

# Create Return Order


POST https://sandbox-api.shipbob.com/1.0/return
Content-Type: application/json

Reference: https://developer-stage.shipbob.dev/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

## Request

### Headers

- `shipbob_channel_id` (integer, required)
- `creationSourceId` (integer, optional, default: 3)

### Body (application/json)

This endpoint expects a Returns.CreateReturnRequest.

- `fulfillmentCenter` (Returns.Facility, optional)
- `inventory` (list of Returns.ReturnInventory, optional, nullable)
- `originalShipmentId` (integer, optional, nullable)
- `referenceId` (string, optional, nullable)
- `trackingNumber` (string, optional, nullable)

## Response

### 200

Success

## Errors

### 400 Bad Request Error

Bad Request

- `any`

### 401 Unauthorized Error

Authorization missing or invalid

- `any`

### 403 Forbidden Error

The provided credentials are not authorized to access this resource

- `any`

## Types

### Returns.Facility

- `id` (integer, optional)
- `name` (string, optional, nullable)

### Returns.ReturnInventory

- `id` (integer, optional)
- `lotDate` (datetime, optional, nullable)
- `lotNumber` (string, optional, nullable)
- `quantity` (integer, optional)
- `requestedAction` (enum, optional)
  - Allowed values: `0`, `1`, `2`, `3`

## Examples

**Request**

```json
{
  "fulfillmentCenter": {
    "id": 0,
    "name": "string"
  },
  "inventory": [
    {
      "id": 0,
      "lotDate": "2019-08-24T14:15:22+00:00",
      "lotNumber": "string",
      "quantity": 0,
      "requestedAction": 0
    }
  ],
  "originalShipmentId": 0,
  "referenceId": "string",
  "trackingNumber": "string"
}
```

**Response**

```json
{}
```

**SDK Code**

```python
import requests

url = "https://sandbox-api.shipbob.com/1.0/return"

payload = {
    "fulfillmentCenter": {
        "id": 0,
        "name": "string"
    },
    "inventory": [
        {
            "id": 0,
            "lotDate": "2019-08-24T14:15:22+00:00",
            "lotNumber": "string",
            "quantity": 0,
            "requestedAction": 0
        }
    ],
    "originalShipmentId": 0,
    "referenceId": "string",
    "trackingNumber": "string"
}
headers = {
    "shipbob_channel_id": "1",
    "creationSourceId": "3",
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript
const url = 'https://sandbox-api.shipbob.com/1.0/return';
const options = {
  method: 'POST',
  headers: {
    shipbob_channel_id: '1',
    creationSourceId: '3',
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json'
  },
  body: '{"fulfillmentCenter":{"id":0,"name":"string"},"inventory":[{"id":0,"lotDate":"2019-08-24T14:15:22+00:00","lotNumber":"string","quantity":0,"requestedAction":0}],"originalShipmentId":0,"referenceId":"string","trackingNumber":"string"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://sandbox-api.shipbob.com/1.0/return"

	payload := strings.NewReader("{\n  \"fulfillmentCenter\": {\n    \"id\": 0,\n    \"name\": \"string\"\n  },\n  \"inventory\": [\n    {\n      \"id\": 0,\n      \"lotDate\": \"2019-08-24T14:15:22+00:00\",\n      \"lotNumber\": \"string\",\n      \"quantity\": 0,\n      \"requestedAction\": 0\n    }\n  ],\n  \"originalShipmentId\": 0,\n  \"referenceId\": \"string\",\n  \"trackingNumber\": \"string\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("shipbob_channel_id", "1")
	req.Header.Add("creationSourceId", "3")
	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
require 'uri'
require 'net/http'

url = URI("https://sandbox-api.shipbob.com/1.0/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["creationSourceId"] = '3'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"fulfillmentCenter\": {\n    \"id\": 0,\n    \"name\": \"string\"\n  },\n  \"inventory\": [\n    {\n      \"id\": 0,\n      \"lotDate\": \"2019-08-24T14:15:22+00:00\",\n      \"lotNumber\": \"string\",\n      \"quantity\": 0,\n      \"requestedAction\": 0\n    }\n  ],\n  \"originalShipmentId\": 0,\n  \"referenceId\": \"string\",\n  \"trackingNumber\": \"string\"\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://sandbox-api.shipbob.com/1.0/return")
  .header("shipbob_channel_id", "1")
  .header("creationSourceId", "3")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"fulfillmentCenter\": {\n    \"id\": 0,\n    \"name\": \"string\"\n  },\n  \"inventory\": [\n    {\n      \"id\": 0,\n      \"lotDate\": \"2019-08-24T14:15:22+00:00\",\n      \"lotNumber\": \"string\",\n      \"quantity\": 0,\n      \"requestedAction\": 0\n    }\n  ],\n  \"originalShipmentId\": 0,\n  \"referenceId\": \"string\",\n  \"trackingNumber\": \"string\"\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://sandbox-api.shipbob.com/1.0/return', [
  'body' => '{
  "fulfillmentCenter": {
    "id": 0,
    "name": "string"
  },
  "inventory": [
    {
      "id": 0,
      "lotDate": "2019-08-24T14:15:22+00:00",
      "lotNumber": "string",
      "quantity": 0,
      "requestedAction": 0
    }
  ],
  "originalShipmentId": 0,
  "referenceId": "string",
  "trackingNumber": "string"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
    'creationSourceId' => '3',
    'shipbob_channel_id' => '1',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://sandbox-api.shipbob.com/1.0/return");
var request = new RestRequest(Method.POST);
request.AddHeader("shipbob_channel_id", "1");
request.AddHeader("creationSourceId", "3");
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"fulfillmentCenter\": {\n    \"id\": 0,\n    \"name\": \"string\"\n  },\n  \"inventory\": [\n    {\n      \"id\": 0,\n      \"lotDate\": \"2019-08-24T14:15:22+00:00\",\n      \"lotNumber\": \"string\",\n      \"quantity\": 0,\n      \"requestedAction\": 0\n    }\n  ],\n  \"originalShipmentId\": 0,\n  \"referenceId\": \"string\",\n  \"trackingNumber\": \"string\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "shipbob_channel_id": "1",
  "creationSourceId": "3",
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "fulfillmentCenter": [
    "id": 0,
    "name": "string"
  ],
  "inventory": [
    [
      "id": 0,
      "lotDate": "2019-08-24T14:15:22+00:00",
      "lotNumber": "string",
      "quantity": 0,
      "requestedAction": 0
    ]
  ],
  "originalShipmentId": 0,
  "referenceId": "string",
  "trackingNumber": "string"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://sandbox-api.shipbob.com/1.0/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()
```