> 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 a return.


POST https://api.shipbob.com/2025-07/return
Content-Type: application/json

Reference: https://developer.shipbob.com/2025-07/api/returns/create-a-return

## 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` (string, required) — Channel Id for operation
- `creationSourceId` (integer, optional)

### Body (application/json)

- `fulfillment_center` (object, optional)
  - `id` (integer, optional)
  - `name` (string, optional, nullable)
- `inventory` (list of object, optional, nullable)
  - `id` (integer, optional)
  - `lot_date` (datetime, optional, nullable)
  - `lot_number` (string, optional, nullable)
  - `quantity` (integer, optional)
  - `requested_action` (enum, optional)
    - Allowed values: `0`, `1`, `2`, `3`
- `original_shipment_id` (integer, optional, nullable)
- `reference_id` (string, optional, nullable)
- `tracking_number` (string, optional, nullable)

## Response

### 201

Success

- `channel` (object, optional)
  - `id` (integer, optional)
  - `name` (string, optional, nullable)
- `completed_date` (datetime, optional, nullable)
- `customer_name` (string, optional, nullable)
- `fulfillment_center` (object, optional)
  - `id` (integer, optional)
  - `name` (string, optional, nullable)
- `id` (integer, optional)
- `insert_date` (datetime, optional)
- `inventory` (list of object, optional, nullable)
  - `action_requested` (object, optional)
    - `action` (string, optional, nullable)
    - `action_type` (string, optional, nullable)
    - `instructions` (string, optional, nullable)
  - `action_taken` (list of object, optional, nullable)
    - `action` (string, optional, nullable)
    - `action_reason` (string, optional, nullable)
    - `image_url` (string, optional, nullable)
    - `quantity_processed` (integer, optional)
  - `id` (integer, optional)
  - `name` (string, optional, nullable)
  - `quantity` (integer, optional)
- `invoice_amount` (double, optional, nullable)
- `original_shipment_id` (integer, optional, nullable)
- `reference_id` (string, optional, nullable)
- `return_type` (string, optional, nullable)
- `status` (string, optional, nullable)
- `store_order_id` (string, optional, nullable)
- `tracking_number` (string, optional, nullable)
- `transactions` (list of object, optional, nullable)
  - `amount` (double, optional)
  - `transaction_type` (string, optional, nullable)

## Examples

**Request**

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

**Response**

```json
{
  "channel": {
    "id": 0,
    "name": "string"
  },
  "completed_date": "2019-08-24T14:15:22Z",
  "customer_name": "string",
  "fulfillment_center": {
    "id": 0,
    "name": "string"
  },
  "id": 0,
  "insert_date": "2019-08-24T14:15:22Z",
  "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 Returns_createAReturn_example
import requests

url = "https://api.shipbob.com/2025-07/return"

payload = {
    "fulfillment_center": {
        "id": 0,
        "name": "string"
    },
    "inventory": [
        {
            "id": 0,
            "lot_date": "2019-08-24T14:15:22Z",
            "lot_number": "string",
            "quantity": 0,
            "requested_action": 0
        }
    ],
    "original_shipment_id": 0,
    "reference_id": "string",
    "tracking_number": "string"
}
headers = {
    "shipbob_channel_id": "shipbob_channel_id",
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Returns_createAReturn_example
const url = 'https://api.shipbob.com/2025-07/return';
const options = {
  method: 'POST',
  headers: {
    shipbob_channel_id: 'shipbob_channel_id',
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json'
  },
  body: '{"fulfillment_center":{"id":0,"name":"string"},"inventory":[{"id":0,"lot_date":"2019-08-24T14:15:22Z","lot_number":"string","quantity":0,"requested_action":0}],"original_shipment_id":0,"reference_id":"string","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_createAReturn_example
package main

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

func main() {

	url := "https://api.shipbob.com/2025-07/return"

	payload := strings.NewReader("{\n  \"fulfillment_center\": {\n    \"id\": 0,\n    \"name\": \"string\"\n  },\n  \"inventory\": [\n    {\n      \"id\": 0,\n      \"lot_date\": \"2019-08-24T14:15:22Z\",\n      \"lot_number\": \"string\",\n      \"quantity\": 0,\n      \"requested_action\": 0\n    }\n  ],\n  \"original_shipment_id\": 0,\n  \"reference_id\": \"string\",\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 <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 Returns_createAReturn_example
require 'uri'
require 'net/http'

url = URI("https://api.shipbob.com/2025-07/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 <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      \"lot_date\": \"2019-08-24T14:15:22Z\",\n      \"lot_number\": \"string\",\n      \"quantity\": 0,\n      \"requested_action\": 0\n    }\n  ],\n  \"original_shipment_id\": 0,\n  \"reference_id\": \"string\",\n  \"tracking_number\": \"string\"\n}"

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

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

HttpResponse<String> response = Unirest.post("https://api.shipbob.com/2025-07/return")
  .header("shipbob_channel_id", "shipbob_channel_id")
  .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      \"lot_date\": \"2019-08-24T14:15:22Z\",\n      \"lot_number\": \"string\",\n      \"quantity\": 0,\n      \"requested_action\": 0\n    }\n  ],\n  \"original_shipment_id\": 0,\n  \"reference_id\": \"string\",\n  \"tracking_number\": \"string\"\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.shipbob.com/2025-07/return', [
  'body' => '{
  "fulfillment_center": {
    "id": 0,
    "name": "string"
  },
  "inventory": [
    {
      "id": 0,
      "lot_date": "2019-08-24T14:15:22Z",
      "lot_number": "string",
      "quantity": 0,
      "requested_action": 0
    }
  ],
  "original_shipment_id": 0,
  "reference_id": "string",
  "tracking_number": "string"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
    'shipbob_channel_id' => 'shipbob_channel_id',
  ],
]);

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

```csharp Returns_createAReturn_example
using RestSharp;

var client = new RestClient("https://api.shipbob.com/2025-07/return");
var request = new RestRequest(Method.POST);
request.AddHeader("shipbob_channel_id", "shipbob_channel_id");
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      \"lot_date\": \"2019-08-24T14:15:22Z\",\n      \"lot_number\": \"string\",\n      \"quantity\": 0,\n      \"requested_action\": 0\n    }\n  ],\n  \"original_shipment_id\": 0,\n  \"reference_id\": \"string\",\n  \"tracking_number\": \"string\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Returns_createAReturn_example
import Foundation

let headers = [
  "shipbob_channel_id": "shipbob_channel_id",
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "fulfillment_center": [
    "id": 0,
    "name": "string"
  ],
  "inventory": [
    [
      "id": 0,
      "lot_date": "2019-08-24T14:15:22Z",
      "lot_number": "string",
      "quantity": 0,
      "requested_action": 0
    ]
  ],
  "original_shipment_id": 0,
  "reference_id": "string",
  "tracking_number": "string"
] as [String : Any]

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

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