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

# Create an RMA with a return label

POST https://dream.rushorder.com/api/rma/withlabel
Content-Type: application/json

Create an RMA in the Rush Order system, automatically creating a return label.

Reference: https://docs.rushorder.com/api-reference/returns/create-with-label

## Authentication

- `Authorization` header (basic auth, required) — Basic authentication of the form `Basic <base64(username:password)>`.

## Request

### Headers

- `RushOrderMomCode` (string, required) — All requests require the header to contain RushOrderMomCode, a 3 character string that represents the client internally in Rush Order. This should be given to you by Rush Order.

### Body (application/json)

This endpoint expects a RMA.CreateRmaWithLabelRequest.

- `ServiceId` (integer, required)
- `RmaNumber` (string, required)
- `Items` (list of RMA.Item, required)
- `Customer` (RMAWithLabel.Customer, required)
- `Instructions` (string, optional)

## Response

### 200

OK

- `Error` (string, optional)
- `Message` (string, optional)
- `Success` (boolean, optional)
- `RMA` (RMA.CreateRmaResponse, optional)
- `ReturnLabel` (ReturnLabel.CreateReturnLabelResult, optional)

## Errors

### 400 Bad Request Error

BadRequest

- `Error` (string, optional)
- `Message` (string, optional)
- `Success` (boolean, optional)
- `RMA` (RMA.CreateRmaResponse, optional)
- `ReturnLabel` (ReturnLabel.CreateReturnLabelResult, optional)

## Types

### RMA.Item

- `Sku` (string, required)
- `Quantity` (integer, required)
- `Price` (double, optional)
- `Reason` (string, optional)
- `Reasoncode` (string, optional)
- `LineNumber` (string, optional)

### RMAWithLabel.Customer

- `Firstname` (string, required)
- `Lastname` (string, required)
- `Address1` (string, required)
- `City` (string, required)
- `Zipcode` (string, required)
- `Country` (string, required)
- `Address2` (string, optional)
- `State` (string, optional)
- `Phone` (string, optional)
- `Email` (string, optional)

### RMA.CreateRmaResponse

- `Error` (string, optional)
- `Message` (string, optional)
- `Success` (boolean, optional)
- `RmaNumber` (integer, optional)
- `AltRmaNumber` (string, optional)

### ReturnLabel.CreateReturnLabelResult

- `TrackingNumber` (string, optional)
- `Carrier` (string, optional)
- `Invoice` (string, optional)
- `ImageBase64` (string, optional)
- `ImageType` (string, optional)
- `LabelURL` (string, optional, nullable)
- `Message` (string, optional)
- `LocalFile` (string, optional)
- `Name` (string, optional)
- `Email` (string, optional)
- `RmaNumber` (string, optional)
- `AssetUrl` (string, optional)
- `Destination` (ReturnLabel.CreateReturnLabelResult.Destination, optional)
- `Errors` (map from string to list of string, optional)
- `Success` (boolean, optional)

### ReturnLabel.CreateReturnLabelResult.Destination

- `Street` (string, optional)
- `StreetLine2` (string, optional, nullable)
- `StreetLine3` (string, optional, nullable)
- `City` (string, optional)
- `State` (string, optional, nullable)
- `Zip` (string, optional)
- `Country` (string, optional)

## Examples

**Request**

```json
{
  "ServiceId": 1,
  "RmaNumber": "string",
  "Items": [
    {
      "Sku": "string",
      "Quantity": 1
    }
  ],
  "Customer": {
    "Firstname": "string",
    "Lastname": "string",
    "Address1": "string",
    "City": "string",
    "Zipcode": "string",
    "Country": "string"
  }
}
```

**Response**

```json
{
  "Error": "string",
  "Message": "string",
  "Success": true,
  "RMA": {
    "Error": "string",
    "Message": "string",
    "Success": true,
    "RmaNumber": 1,
    "AltRmaNumber": "string"
  },
  "ReturnLabel": {
    "TrackingNumber": "string",
    "Carrier": "string",
    "Invoice": "string",
    "ImageBase64": "string",
    "ImageType": "string",
    "LabelURL": "string",
    "Message": "string",
    "LocalFile": "string",
    "Name": "string",
    "Email": "string",
    "RmaNumber": "string",
    "AssetUrl": "string",
    "Destination": {
      "Street": "string",
      "StreetLine2": "string",
      "StreetLine3": "string",
      "City": "string",
      "State": "string",
      "Zip": "string",
      "Country": "string"
    },
    "Errors": {},
    "Success": true
  }
}
```

**SDK Code**

```python
import requests

url = "https://dream.rushorder.com/api/rma/withlabel"

payload = {
    "ServiceId": 1,
    "RmaNumber": "string",
    "Items": [
        {
            "Sku": "string",
            "Quantity": 1
        }
    ],
    "Customer": {
        "Firstname": "string",
        "Lastname": "string",
        "Address1": "string",
        "City": "string",
        "Zipcode": "string",
        "Country": "string"
    }
}
headers = {
    "RushOrderMomCode": "ABC"
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers, auth=("<username>", "<password>"))

print(response.json())
```

```javascript
const url = 'https://dream.rushorder.com/api/rma/withlabel';
const credentials = btoa("<username>:<password>");

const options = {
  method: 'POST',
  headers: {
    RushOrderMomCode: 'ABC',
    Authorization: `Basic ${credentials}`,
    'Content-Type': 'application/json'
  },
  body: '{"ServiceId":1,"RmaNumber":"string","Items":[{"Sku":"string","Quantity":1}],"Customer":{"Firstname":"string","Lastname":"string","Address1":"string","City":"string","Zipcode":"string","Country":"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://dream.rushorder.com/api/rma/withlabel"

	payload := strings.NewReader("{\n  \"ServiceId\": 1,\n  \"RmaNumber\": \"string\",\n  \"Items\": [\n    {\n      \"Sku\": \"string\",\n      \"Quantity\": 1\n    }\n  ],\n  \"Customer\": {\n    \"Firstname\": \"string\",\n    \"Lastname\": \"string\",\n    \"Address1\": \"string\",\n    \"City\": \"string\",\n    \"Zipcode\": \"string\",\n    \"Country\": \"string\"\n  }\n}")

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

	req.Header.Add("RushOrderMomCode", "ABC")
	req.SetBasicAuth("<username>", "<password>")
	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://dream.rushorder.com/api/rma/withlabel")

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

request = Net::HTTP::Post.new(url)
request["RushOrderMomCode"] = 'ABC'
request.basic_auth("<username>", "<password>")
request["Content-Type"] = 'application/json'
request.body = "{\n  \"ServiceId\": 1,\n  \"RmaNumber\": \"string\",\n  \"Items\": [\n    {\n      \"Sku\": \"string\",\n      \"Quantity\": 1\n    }\n  ],\n  \"Customer\": {\n    \"Firstname\": \"string\",\n    \"Lastname\": \"string\",\n    \"Address1\": \"string\",\n    \"City\": \"string\",\n    \"Zipcode\": \"string\",\n    \"Country\": \"string\"\n  }\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://dream.rushorder.com/api/rma/withlabel")
  .header("RushOrderMomCode", "ABC")
  .basicAuth("<username>", "<password>")
  .header("Content-Type", "application/json")
  .body("{\n  \"ServiceId\": 1,\n  \"RmaNumber\": \"string\",\n  \"Items\": [\n    {\n      \"Sku\": \"string\",\n      \"Quantity\": 1\n    }\n  ],\n  \"Customer\": {\n    \"Firstname\": \"string\",\n    \"Lastname\": \"string\",\n    \"Address1\": \"string\",\n    \"City\": \"string\",\n    \"Zipcode\": \"string\",\n    \"Country\": \"string\"\n  }\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://dream.rushorder.com/api/rma/withlabel', [
  'body' => '{
  "ServiceId": 1,
  "RmaNumber": "string",
  "Items": [
    {
      "Sku": "string",
      "Quantity": 1
    }
  ],
  "Customer": {
    "Firstname": "string",
    "Lastname": "string",
    "Address1": "string",
    "City": "string",
    "Zipcode": "string",
    "Country": "string"
  }
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'RushOrderMomCode' => 'ABC',
  ],
    'auth' => ['<username>', '<password>'],
]);

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

```csharp
using RestSharp;
using RestSharp.Authenticators;

var client = new RestClient("https://dream.rushorder.com/api/rma/withlabel");
client.Authenticator = new HttpBasicAuthenticator("<username>", "<password>");
var request = new RestRequest(Method.POST);
request.AddHeader("RushOrderMomCode", "ABC");

request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"ServiceId\": 1,\n  \"RmaNumber\": \"string\",\n  \"Items\": [\n    {\n      \"Sku\": \"string\",\n      \"Quantity\": 1\n    }\n  ],\n  \"Customer\": {\n    \"Firstname\": \"string\",\n    \"Lastname\": \"string\",\n    \"Address1\": \"string\",\n    \"City\": \"string\",\n    \"Zipcode\": \"string\",\n    \"Country\": \"string\"\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let credentials = Data("<username>:<password>".utf8).base64EncodedString()

let headers = [
  "RushOrderMomCode": "ABC",
  "Authorization": "Basic \(credentials)",
  "Content-Type": "application/json"
]
let parameters = [
  "ServiceId": 1,
  "RmaNumber": "string",
  "Items": [
    [
      "Sku": "string",
      "Quantity": 1
    ]
  ],
  "Customer": [
    "Firstname": "string",
    "Lastname": "string",
    "Address1": "string",
    "City": "string",
    "Zipcode": "string",
    "Country": "string"
  ]
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://dream.rushorder.com/api/rma/withlabel")! 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()
```