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.

# Modify Return Order


PUT https://api.shipbob.com/2025-07/return/{id}
Content-Type: application/json

Reference: https://developer.shipbob.com/2025-07/api/returns/modify-return-order

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: api-2025-07
  version: 1.0.0
paths:
  /2025-07/return/{id}:
    put:
      operationId: modify-return-order
      summary: |
        Modify Return Order
      tags:
        - subpackage_returns
      parameters:
        - name: id
          in: path
          description: Id of the return order
          required: true
          schema:
            type: string
            format: int32
        - 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
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Returns.ReturnOrderViewModel'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Returns.ValidationProblemDetails'
        '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.ValidationProblemDetails'
      requestBody:
        description: Model defining the return
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Returns.CreateReturnViewModel'
servers:
  - url: https://api.shipbob.com
  - url: https://sandbox-api.shipbob.com
components:
  schemas:
    Returns.FulfillmentCenterViewModel:
      type: object
      properties:
        id:
          type: integer
          description: Unique identifier of the fulfillment center
        name:
          type:
            - string
            - 'null'
          description: Name of the fulfillment center
      required:
        - id
      description: Information about a fulfillment center
      title: Returns.FulfillmentCenterViewModel
    Returns.ReturnAction:
      type: string
      enum:
        - '0'
        - '1'
        - '2'
        - '3'
      title: Returns.ReturnAction
    Returns.ReturnInventoryViewModel:
      type: object
      properties:
        id:
          type: integer
          description: ID of the inventory item to return
        quantity:
          type: integer
          description: Quantity of the returned inventory item in the return
        requested_action:
          $ref: '#/components/schemas/Returns.ReturnAction'
      required:
        - id
        - quantity
      title: Returns.ReturnInventoryViewModel
    Returns.CreateReturnViewModel:
      type: object
      properties:
        fulfillment_center:
          $ref: '#/components/schemas/Returns.FulfillmentCenterViewModel'
        inventory:
          type:
            - array
            - 'null'
          items:
            $ref: '#/components/schemas/Returns.ReturnInventoryViewModel'
          description: Array of inventory items being returned
        original_shipment_id:
          type:
            - integer
            - 'null'
          description: Shipment from which the items in the return originated
        reference_id:
          type:
            - string
            - 'null'
          description: Client-defined external unique identifier for the return order
        tracking_number:
          type:
            - string
            - 'null'
          description: Tracking number for the return shipment
      required:
        - fulfillment_center
        - inventory
        - reference_id
      title: Returns.CreateReturnViewModel
    Returns.ChannelInfoViewModel:
      type: object
      properties:
        id:
          type: integer
          description: Unique id of the channel
        name:
          type:
            - string
            - 'null'
          description: Name of the channel
      description: Created by channel metadata
      title: Returns.ChannelInfoViewModel
    Returns.ReturnActionSource:
      type: string
      enum:
        - InventoryDefault
        - Override
      description: |-


        InventoryDefault

        Override
      title: Returns.ReturnActionSource
    Returns.ReturnActionRequestedViewModel:
      type: object
      properties:
        action:
          $ref: '#/components/schemas/Returns.ReturnAction'
        action_type:
          $ref: '#/components/schemas/Returns.ReturnActionSource'
        instructions:
          type:
            - string
            - 'null'
      title: Returns.ReturnActionRequestedViewModel
    Returns.ReturnActionTakenViewModel:
      type: object
      properties:
        action:
          $ref: '#/components/schemas/Returns.ReturnAction'
        action_reason:
          type:
            - string
            - 'null'
        quantity_processed:
          type: integer
      title: Returns.ReturnActionTakenViewModel
    Returns.InventoryItemViewModel:
      type: object
      properties:
        action_requested:
          $ref: '#/components/schemas/Returns.ReturnActionRequestedViewModel'
        action_taken:
          type:
            - array
            - 'null'
          items:
            $ref: '#/components/schemas/Returns.ReturnActionTakenViewModel'
        id:
          type: integer
        name:
          type:
            - string
            - 'null'
        quantity:
          type: integer
      title: Returns.InventoryItemViewModel
    Returns.ReturnType:
      type: string
      enum:
        - Regular
        - ReturnToSender
      description: |-


        Regular

        ReturnToSender
      title: Returns.ReturnType
    Returns.ReturnStatus:
      type: string
      enum:
        - AwaitingArrival
        - Arrived
        - Processing
        - Completed
        - Cancelled
      description: |-


        AwaitingArrival

        Arrived

        Processing

        Completed

        Cancelled
      title: Returns.ReturnStatus
    Returns.TransactionLogSource:
      type: string
      enum:
        - ReturnLabelInvoice
        - ReturnProcessingFee
        - ReturnToSenderFee
      description: |-


        ReturnLabelInvoice

        ReturnProcessingFee

        ReturnToSenderFee
      title: Returns.TransactionLogSource
    Returns.TransactionViewModel:
      type: object
      properties:
        amount:
          type: number
          format: double
        transaction_type:
          $ref: '#/components/schemas/Returns.TransactionLogSource'
      title: Returns.TransactionViewModel
    Returns.ReturnOrderViewModel:
      type: object
      properties:
        channel:
          $ref: '#/components/schemas/Returns.ChannelInfoViewModel'
        completed_date:
          type:
            - string
            - 'null'
          format: date-time
          description: Completed date for a return order.
        customer_name:
          type:
            - string
            - 'null'
          description: Customer name from the related shipment.
        fulfillment_center:
          $ref: '#/components/schemas/Returns.FulfillmentCenterViewModel'
        id:
          type: integer
          description: Unique id of the Return Order
        insert_date:
          type: string
          format: date-time
          description: Date this return order was created
        inventory:
          type:
            - array
            - 'null'
          items:
            $ref: '#/components/schemas/Returns.InventoryItemViewModel'
          description: List of inventory included in the return order
        invoice_amount:
          type:
            - number
            - 'null'
          format: double
          description: Invoiced amount of return order (sum of transaction amounts)
        original_shipment_id:
          type:
            - integer
            - 'null'
          description: Id of the corresponding shipment that is the souce of the return
        reference_id:
          type:
            - string
            - 'null'
          description: Client-defined external unique id of the return order
        return_type:
          $ref: '#/components/schemas/Returns.ReturnType'
        status:
          $ref: '#/components/schemas/Returns.ReturnStatus'
        store_order_id:
          type:
            - string
            - 'null'
          description: Store order for the related shipment.
        tracking_number:
          type:
            - string
            - 'null'
          description: Tracking number of the return shipment
        transactions:
          type:
            - array
            - 'null'
          items:
            $ref: '#/components/schemas/Returns.TransactionViewModel'
          description: Array of transactions affiliated with the return order
      title: Returns.ReturnOrderViewModel
    ReturnsValidationProblemDetailsExtensions:
      type: object
      properties: {}
      title: ReturnsValidationProblemDetailsExtensions
    Returns.ValidationProblemDetails:
      type: object
      properties:
        detail:
          type:
            - string
            - 'null'
        errors:
          type:
            - object
            - 'null'
          additionalProperties:
            type: array
            items:
              type: string
        extensions:
          type:
            - object
            - 'null'
          additionalProperties:
            $ref: '#/components/schemas/ReturnsValidationProblemDetailsExtensions'
        instance:
          type:
            - string
            - 'null'
        status:
          type:
            - integer
            - 'null'
        title:
          type:
            - string
            - 'null'
        type:
          type:
            - string
            - 'null'
      title: Returns.ValidationProblemDetails
  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_modifyReturnOrder_example
import requests

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

payload = {
    "fulfillment_center": {
        "id": 0,
        "name": "Cicero (IL)"
    },
    "inventory": [
        {
            "id": 111222,
            "quantity": 1,
            "requested_action": 0
        }
    ],
    "reference_id": "ShipBob_Return_123",
    "original_shipment_id": 123456,
    "tracking_number": "1Z9999999999999999"
}
headers = {
    "shipbob_channel_id": "shipbob_channel_id",
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Returns_modifyReturnOrder_example
const url = 'https://api.shipbob.com/2025-07/return/id';
const options = {
  method: 'PUT',
  headers: {
    shipbob_channel_id: 'shipbob_channel_id',
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json'
  },
  body: '{"fulfillment_center":{"id":0,"name":"Cicero (IL)"},"inventory":[{"id":111222,"quantity":1,"requested_action":0}],"reference_id":"ShipBob_Return_123","original_shipment_id":123456,"tracking_number":"1Z9999999999999999"}'
};

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

```go Returns_modifyReturnOrder_example
package main

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

func main() {

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

	payload := strings.NewReader("{\n  \"fulfillment_center\": {\n    \"id\": 0,\n    \"name\": \"Cicero (IL)\"\n  },\n  \"inventory\": [\n    {\n      \"id\": 111222,\n      \"quantity\": 1,\n      \"requested_action\": 0\n    }\n  ],\n  \"reference_id\": \"ShipBob_Return_123\",\n  \"original_shipment_id\": 123456,\n  \"tracking_number\": \"1Z9999999999999999\"\n}")

	req, _ := http.NewRequest("PUT", 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_modifyReturnOrder_example
require 'uri'
require 'net/http'

url = URI("https://api.shipbob.com/2025-07/return/id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.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\": \"Cicero (IL)\"\n  },\n  \"inventory\": [\n    {\n      \"id\": 111222,\n      \"quantity\": 1,\n      \"requested_action\": 0\n    }\n  ],\n  \"reference_id\": \"ShipBob_Return_123\",\n  \"original_shipment_id\": 123456,\n  \"tracking_number\": \"1Z9999999999999999\"\n}"

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

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

HttpResponse<String> response = Unirest.put("https://api.shipbob.com/2025-07/return/id")
  .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\": \"Cicero (IL)\"\n  },\n  \"inventory\": [\n    {\n      \"id\": 111222,\n      \"quantity\": 1,\n      \"requested_action\": 0\n    }\n  ],\n  \"reference_id\": \"ShipBob_Return_123\",\n  \"original_shipment_id\": 123456,\n  \"tracking_number\": \"1Z9999999999999999\"\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'https://api.shipbob.com/2025-07/return/id', [
  'body' => '{
  "fulfillment_center": {
    "id": 0,
    "name": "Cicero (IL)"
  },
  "inventory": [
    {
      "id": 111222,
      "quantity": 1,
      "requested_action": 0
    }
  ],
  "reference_id": "ShipBob_Return_123",
  "original_shipment_id": 123456,
  "tracking_number": "1Z9999999999999999"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
    'shipbob_channel_id' => 'shipbob_channel_id',
  ],
]);

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

```csharp Returns_modifyReturnOrder_example
using RestSharp;

var client = new RestClient("https://api.shipbob.com/2025-07/return/id");
var request = new RestRequest(Method.PUT);
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\": \"Cicero (IL)\"\n  },\n  \"inventory\": [\n    {\n      \"id\": 111222,\n      \"quantity\": 1,\n      \"requested_action\": 0\n    }\n  ],\n  \"reference_id\": \"ShipBob_Return_123\",\n  \"original_shipment_id\": 123456,\n  \"tracking_number\": \"1Z9999999999999999\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Returns_modifyReturnOrder_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": "Cicero (IL)"
  ],
  "inventory": [
    [
      "id": 111222,
      "quantity": 1,
      "requested_action": 0
    ]
  ],
  "reference_id": "ShipBob_Return_123",
  "original_shipment_id": 123456,
  "tracking_number": "1Z9999999999999999"
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.shipbob.com/2025-07/return/id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"
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()
```