> 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 order

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

Submit an order for Rush Order to process.

Reference: https://docs.rushorder.com/api-reference/orders/create

## 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 CreateOrderRequest.

- `AdCode` (string, required) — The order type, used for filtering. `PROD` and `TEST` are set up initially, and Rush Order can create custom order types for you. Longer values are accepted by the API and silently truncated to 9 characters.
- `AltOrderNumber` (string, required) — Longer values are accepted by the API and silently truncated to 18 characters.
- `ShipMethod` (string, required) — The ship method code, 1 to 3 characters, such as `UPS`, `FEG`, `UP2`, or `FE2`. The full list of ship methods is provided once you are onboarded.
- `OrderDate` (datetime, required)
- `LineItems` (list of CreateOrderLineItem, required)
- `BillToCustomer` (CreateOrderCustomer, required)
- `PoNumber` (string, optional) — Longer values are accepted by the API and silently truncated to 15 characters.
- `Total` (double, optional)
- `Paid` (double, optional)
- `Tax` (double, optional)
- `Shipcost` (double, optional)
- `Signature` (boolean, optional) — When true, a signature is required upon attempted delivery. Only certain ship methods support signature required.
- `CustomNote` (string, optional)
- `Note1` (string, optional)
- `Note2` (string, optional)
- `Note3` (string, optional)
- `Note4` (string, optional)
- `ShipToCustomer` (CreateOrderCustomer, optional)
- `ThirdPartyShippingAccount` (string, optional) — Third party shipping account to bill the shipment to.
- `HoldOrder` (boolean, optional) — When true, the order is placed on hold on arrival instead of being released for fulfillment.

## Response

### 200

Success

- `Success` (boolean, optional)
- `ErrorMessage` (string, optional, nullable)
- `RefId` (string, optional, nullable)
- `AltOrderNumber` (string, optional, nullable)

## Errors

### 400 Bad Request Error

The request failed validation, or the order could not be created. Field-level validation failures return a ModelState dictionary keyed by property name; order-level failures return the standard order response with an ErrorMessage.

- `CreateAnOrderRequestBadRequestError`
  - ValidationFailureResponse: ValidationFailureResponse
  - CreateOrderResponse: CreateOrderResponse

### 409 Conflict Error

Duplicate Order Insert. Note that the error message will contain either a PONumber, AltOrderNumber, or both depending on what was provided in the request body.

- `Success` (boolean, optional)
- `ErrorMessage` (string, optional, nullable)
- `RefId` (string, optional, nullable)
- `AltOrderNumber` (string, optional, nullable)

## Types

### CreateOrderLineItem

- `Sku` (string, required)
- `Quantity` (integer, required)
- `Price` (double, optional)
- `ExtendedPrice` (double, optional)
- `Shipping` (double, optional)
- `Weight` (double, optional)
- `Description` (string, optional)
- `LineNumber` (string, optional) — Your line identifier, echoed back on order and shipment reads. The API accepts up to 25 characters, but only about 10 are retained downstream, so keep it short. Platform-generated identifiers such as Shopify global ids are too long; map them to a short ordinal.

### CreateOrderCustomer

- `Address1` (string, required) — Address1 and Address2 are capped at 40 characters each, and their combined length may not exceed 105 characters.
- `City` (string, required)
- `Country` (string, required) — Letters and spaces only. ISO-2 codes are accepted.
- `Zip` (string, required)
- `Address2` (string, optional) — Address1 and Address2 are capped at 40 characters each, and their combined length may not exceed 105 characters.
- `State` (string, optional)
- `FirstName` (string, optional) — At least one of Company, FirstName, or LastName must be supplied. None of the three is individually required.
- `LastName` (string, optional) — At least one of Company, FirstName, or LastName must be supplied. None of the three is individually required.
- `Company` (string, optional) — At least one of Company, FirstName, or LastName must be supplied. None of the three is individually required.
- `Phone` (string, optional) — Validated as a maximum of 15 digits. Separators and formatting characters do not count toward the limit.
- `Email` (string, optional)

### ValidationFailureResponse

- `Message` (string, optional)
- `ModelState` (map from string to list of string, optional)

### CreateOrderResponse

- `Success` (boolean, optional)
- `ErrorMessage` (string, optional, nullable)
- `RefId` (string, optional, nullable)
- `AltOrderNumber` (string, optional, nullable)

## Examples

**Request**

```json
{
  "AdCode": "PROD",
  "AltOrderNumber": "string",
  "ShipMethod": "UPS",
  "OrderDate": "2024-01-15T09:30:00Z",
  "LineItems": [
    {
      "Sku": "string",
      "Quantity": 1
    }
  ],
  "BillToCustomer": {
    "Address1": "string",
    "City": "string",
    "Country": "string",
    "Zip": "string"
  }
}
```

**Response**

```json
{
  "Success": true,
  "ErrorMessage": "string",
  "RefId": "string",
  "AltOrderNumber": "PO1234A"
}
```

**SDK Code**

```python
import requests

url = "https://dream.rushorder.com/api/orders"

payload = {
    "AdCode": "PROD",
    "AltOrderNumber": "string",
    "ShipMethod": "UPS",
    "OrderDate": "2024-01-15T09:30:00Z",
    "LineItems": [
        {
            "Sku": "string",
            "Quantity": 1
        }
    ],
    "BillToCustomer": {
        "Address1": "string",
        "City": "string",
        "Country": "string",
        "Zip": "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/orders';
const credentials = btoa("<username>:<password>");

const options = {
  method: 'POST',
  headers: {
    RushOrderMomCode: 'ABC',
    Authorization: `Basic ${credentials}`,
    'Content-Type': 'application/json'
  },
  body: '{"AdCode":"PROD","AltOrderNumber":"string","ShipMethod":"UPS","OrderDate":"2024-01-15T09:30:00Z","LineItems":[{"Sku":"string","Quantity":1}],"BillToCustomer":{"Address1":"string","City":"string","Country":"string","Zip":"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/orders"

	payload := strings.NewReader("{\n  \"AdCode\": \"PROD\",\n  \"AltOrderNumber\": \"string\",\n  \"ShipMethod\": \"UPS\",\n  \"OrderDate\": \"2024-01-15T09:30:00Z\",\n  \"LineItems\": [\n    {\n      \"Sku\": \"string\",\n      \"Quantity\": 1\n    }\n  ],\n  \"BillToCustomer\": {\n    \"Address1\": \"string\",\n    \"City\": \"string\",\n    \"Country\": \"string\",\n    \"Zip\": \"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/orders")

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  \"AdCode\": \"PROD\",\n  \"AltOrderNumber\": \"string\",\n  \"ShipMethod\": \"UPS\",\n  \"OrderDate\": \"2024-01-15T09:30:00Z\",\n  \"LineItems\": [\n    {\n      \"Sku\": \"string\",\n      \"Quantity\": 1\n    }\n  ],\n  \"BillToCustomer\": {\n    \"Address1\": \"string\",\n    \"City\": \"string\",\n    \"Country\": \"string\",\n    \"Zip\": \"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/orders")
  .header("RushOrderMomCode", "ABC")
  .basicAuth("<username>", "<password>")
  .header("Content-Type", "application/json")
  .body("{\n  \"AdCode\": \"PROD\",\n  \"AltOrderNumber\": \"string\",\n  \"ShipMethod\": \"UPS\",\n  \"OrderDate\": \"2024-01-15T09:30:00Z\",\n  \"LineItems\": [\n    {\n      \"Sku\": \"string\",\n      \"Quantity\": 1\n    }\n  ],\n  \"BillToCustomer\": {\n    \"Address1\": \"string\",\n    \"City\": \"string\",\n    \"Country\": \"string\",\n    \"Zip\": \"string\"\n  }\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://dream.rushorder.com/api/orders', [
  'body' => '{
  "AdCode": "PROD",
  "AltOrderNumber": "string",
  "ShipMethod": "UPS",
  "OrderDate": "2024-01-15T09:30:00Z",
  "LineItems": [
    {
      "Sku": "string",
      "Quantity": 1
    }
  ],
  "BillToCustomer": {
    "Address1": "string",
    "City": "string",
    "Country": "string",
    "Zip": "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/orders");
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  \"AdCode\": \"PROD\",\n  \"AltOrderNumber\": \"string\",\n  \"ShipMethod\": \"UPS\",\n  \"OrderDate\": \"2024-01-15T09:30:00Z\",\n  \"LineItems\": [\n    {\n      \"Sku\": \"string\",\n      \"Quantity\": 1\n    }\n  ],\n  \"BillToCustomer\": {\n    \"Address1\": \"string\",\n    \"City\": \"string\",\n    \"Country\": \"string\",\n    \"Zip\": \"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 = [
  "AdCode": "PROD",
  "AltOrderNumber": "string",
  "ShipMethod": "UPS",
  "OrderDate": "2024-01-15T09:30:00Z",
  "LineItems": [
    [
      "Sku": "string",
      "Quantity": 1
    ]
  ],
  "BillToCustomer": [
    "Address1": "string",
    "City": "string",
    "Country": "string",
    "Zip": "string"
  ]
] as [String : Any]

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

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