For clean Markdown of any page, append .md to the page URL. For a complete documentation index, see https://developer.shipbob.com/2025-07/api/returns/llms.txt. For full documentation content, see https://developer.shipbob.com/2025-07/api/returns/llms-full.txt.

# 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

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: api-2025-07
  version: 1.0.0
paths:
  /2025-07/return:
    post:
      operationId: create-a-return
      summary: |
        Create a return.
      tags:
        - subpackage_returns
      parameters:
        - 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
        - name: creationSourceId
          in: header
          description: ''
          required: false
          schema:
            type: integer
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Returns.PublicReturnV1Dto'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Returns.ProblemDetails'
        '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.ApiError'
      requestBody:
        description: >-
          The return order creation request containing return details, items,
          and configuration.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Returns.CreateReturnRequest'
servers:
  - url: https://api.shipbob.com
  - url: https://sandbox-api.shipbob.com
components:
  schemas:
    Returns.Facility:
      type: object
      properties:
        id:
          type: integer
        name:
          type:
            - string
            - 'null'
      title: Returns.Facility
    Returns.ReturnAction:
      type: string
      enum:
        - '0'
        - '1'
        - '2'
        - '3'
      title: Returns.ReturnAction
    Returns.ReturnInventory:
      type: object
      properties:
        id:
          type: integer
        lot_date:
          type:
            - string
            - 'null'
          format: date-time
        lot_number:
          type:
            - string
            - 'null'
        quantity:
          type: integer
        requested_action:
          $ref: '#/components/schemas/Returns.ReturnAction'
      title: Returns.ReturnInventory
    Returns.CreateReturnRequest:
      type: object
      properties:
        fulfillment_center:
          $ref: '#/components/schemas/Returns.Facility'
        inventory:
          type:
            - array
            - 'null'
          items:
            $ref: '#/components/schemas/Returns.ReturnInventory'
        original_shipment_id:
          type:
            - integer
            - 'null'
        reference_id:
          type:
            - string
            - 'null'
        tracking_number:
          type:
            - string
            - 'null'
      title: Returns.CreateReturnRequest
    Returns.ChannelDto:
      type: object
      properties:
        id:
          type: integer
        name:
          type:
            - string
            - 'null'
      title: Returns.ChannelDto
    Returns.FulfillmentCenterDto:
      type: object
      properties:
        id:
          type: integer
        name:
          type:
            - string
            - 'null'
      title: Returns.FulfillmentCenterDto
    Returns.ActionRequestedDto:
      type: object
      properties:
        action:
          type:
            - string
            - 'null'
        action_type:
          type:
            - string
            - 'null'
        instructions:
          type:
            - string
            - 'null'
      title: Returns.ActionRequestedDto
    Returns.ActionTakenDto:
      type: object
      properties:
        action:
          type:
            - string
            - 'null'
        action_reason:
          type:
            - string
            - 'null'
        image_url:
          type:
            - string
            - 'null'
          format: uri
        quantity_processed:
          type: integer
      title: Returns.ActionTakenDto
    Returns.InventoryItemV1Dto:
      type: object
      properties:
        action_requested:
          $ref: '#/components/schemas/Returns.ActionRequestedDto'
        action_taken:
          type:
            - array
            - 'null'
          items:
            $ref: '#/components/schemas/Returns.ActionTakenDto'
        id:
          type: integer
        name:
          type:
            - string
            - 'null'
        quantity:
          type: integer
      title: Returns.InventoryItemV1Dto
    Returns.TransactionDto:
      type: object
      properties:
        amount:
          type: number
          format: double
        transaction_type:
          type:
            - string
            - 'null'
      title: Returns.TransactionDto
    Returns.PublicReturnV1Dto:
      type: object
      properties:
        channel:
          $ref: '#/components/schemas/Returns.ChannelDto'
        completed_date:
          type:
            - string
            - 'null'
          format: date-time
        customer_name:
          type:
            - string
            - 'null'
        fulfillment_center:
          $ref: '#/components/schemas/Returns.FulfillmentCenterDto'
        id:
          type: integer
        insert_date:
          type: string
          format: date-time
        inventory:
          type:
            - array
            - 'null'
          items:
            $ref: '#/components/schemas/Returns.InventoryItemV1Dto'
        invoice_amount:
          type:
            - number
            - 'null'
          format: double
        original_shipment_id:
          type:
            - integer
            - 'null'
        reference_id:
          type:
            - string
            - 'null'
        return_type:
          type:
            - string
            - 'null'
        status:
          type:
            - string
            - 'null'
        store_order_id:
          type:
            - string
            - 'null'
        tracking_number:
          type:
            - string
            - 'null'
        transactions:
          type:
            - array
            - 'null'
          items:
            $ref: '#/components/schemas/Returns.TransactionDto'
      title: Returns.PublicReturnV1Dto
    Returns.ProblemDetails:
      type: object
      properties:
        detail:
          type:
            - string
            - 'null'
        instance:
          type:
            - string
            - 'null'
        status:
          type:
            - integer
            - 'null'
        title:
          type:
            - string
            - 'null'
        type:
          type:
            - string
            - 'null'
      title: Returns.ProblemDetails
    Returns.ApiError:
      type: object
      properties:
        details:
          oneOf:
            - description: Any type
            - type: 'null'
        errors:
          type:
            - array
            - 'null'
          items:
            type: string
        message:
          type:
            - string
            - 'null'
        stackTrace:
          type:
            - string
            - 'null'
          description: StackTrace of the Exception
      title: Returns.ApiError
  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_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()
```