> This page is for Developer.

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

# Place Order

PUT https://marketplace-order-api.feedamp.feedonomics.com/api/v1/orders/{mp_order_number}
Content-Type: application/json

Insert an order into or update an existing order in FeedAMP. If updating an order, we only allow specific fields to be updated.

Reference: https://docs.feedonomics.com/developer/api-reference/rest/feed-amp-order-source-api/orders/create-orders

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Path parameters

- `mp_order_number` (string, required) — The unique Id for an order that is generated by the marketplace

### Body (application/json)

This endpoint expects an OrderModel.

- `mp_order_number` (string, required) — The primary order number used to identify the order in the marketplace's system
- `sales_channel` (string, required) — The specific channel within a marketplace in which orders are processed (typically corresponds to region)
- `customer` (Customer, required)
- `purchase_date` (datetime, required) — The datetime of the purchase date. ISO 8601 date-time YYYY-MM-DDTH:i:sZ (all times must be in UTC)
- `currency` (enum, required) — ISO 4217 Currency codes
  - Allowed values: `AED`, `AFN`, `ALL`, `AMD`, `ANG`, `AOA`, `ARS`, `AUD`, `AWG`, `AZN`, `BAM`, `BBD`, `BDT`, `BGN`, `BHD`, `BIF`, `BMD`, `BND`, `BOB`, `BOV`, `BRL`, `BSD`, `BTN`, `BWP`, `BYN`, `BZD`, `CAD`, `CDF`, `CHE`, `CHF`, `CHW`, `CLF`, `CLP`, `COP`, `COU`, `CRC`, `CUC`, `CUP`, `CVE`, `CZK`, `DJF`, `DKK`, `DOP`, `DZD`, `EGP`, `ERN`, `ETB`, `EUR`, `FJD`, `FKP`, `GBP`, `GEL`, `GHS`, `GIP`, `GMD`, `GNF`, `GTQ`, `GYD`, `HKD`, `HNL`, `HTG`, `HUF`, `IDR`, `ILS`, `INR`, `IQD`, `IRR`, `ISK`, `JMD`, `JOD`, `JPY`, `KES`, `KGS`, `KHR`, `KMF`, `KPW`, `KRW`, `KWD`, `KYD`, `KZT`, `LAK`, `LBP`, `LKR`, `LRD`, `LSL`, `LYD`, `MAD`, `MDL`, `MGA`, `MKD`, `MMK`, `MNT`, `MOP`, `MRU`, `MUR`, `MVR`, `MWK`, `MXN`, `MXV`, `MYR`, `MZN`, `NAD`, `NGN`, `NIO`, `NOK`, `NPR`, `NZD`, `OMR`, `PAB`, `PEN`, `PGK`, `PHP`, `PKR`, `PLN`, `PYG`, `QAR`, `RON`, `RSD`, `CNY`, `RUB`, `RWF`, `SAR`, `SBD`, `SCR`, `SDG`, `SEK`, `SGD`, `SHP`, `SLE`, `SLL`, `SOS`, `SRD`, `SSP`, `STN`, `SVC`, `SYP`, `SZL`, `THB`, `TJS`, `TMT`, `TND`, `TOP`, `TRY`, `TTD`, `TWD`, `TZS`, `UAH`, `UGX`, `USD`, `USN`, `UYI`, `UYU`, `UYW`, `UZS`, `VED`, `VES`, `VND`, `VUV`, `WST`, `XAF`, `XAG`, `XAU`, `XBA`, `XBB`, `XBC`, `XBD`, `XCD`, `XDR`, `XOF`, `XPD`, `XPF`, `XPT`, `XSU`, `XTS`, `XUA`, `XXX`, `YER`, `ZAR`, `ZMW`, `ZWL`
- `shipping_address` (StreetAddress, required)
- `order_lines` (list of OrderLine, required) — A collection of OrderLine objects. This property contains the individual order lines that the seller is to fulfill
- `marketplace_state` (enum, required) — The state of the order in the marketplace&#x20; PENDING - Order is still awaiting payment or other finalization before being eligible for fulfillment AWAITING\_SHIPMENT - The marketplace does not yet have any fulfillment information for the order SHIPPED - The marketplace has successfully retrieved fulfillment information for the entire order CANCELLED - The order has been cancelled, either due to action initiated by the marketplace (customer cancelled) or the entire order has been cancelled during fulfillment processing (seller cancelled)
  - Allowed values: `PENDING`, `AWAITING_SHIPMENT`, `SHIPPED`, `CANCELLED`
- `location` (Location, optional) — Details about the location (e.g. store) associated with an order
- `delivery_notes` (string, optional) — The customer's instructions to the delivery service regarding where/how to leave the package.
- `earliest_ship_date` (datetime, optional) — The earliest expected ship-by date. ISO 8601 date-time YYYY-MM-DDTH:i:sZ (all times must be in UTC)
- `latest_ship_date` (datetime, optional) — The latest expected ship-by date. ISO 8601 date-time YYYY-MM-DDTH:i:sZ (all times must be in UTC)
- `latest_delivery_date` (datetime, optional) — The latest expected deliver-by date. ISO 8601 date-time YYYY-MM-DDTH:i:sZ (all times must be in UTC)
- `earliest_delivery_date` (datetime, optional) — The earliest expected deliver-by date. ISO 8601 date-time YYYY-MM-DDTH:i:sZ (all times must be in UTC)
- `gift_message` (string, optional) — Gift message attached to order
- `marketing_opt_in` (boolean, optional) — Whether the customer opted in to marketing emails
- `billing_address` (StreetAddress, optional)
- `order_additional_properties` (map from string to any, optional) — Key/Value pairs of data the marketplace wants to associate with an order
- `is_marketplace_fulfilled` (boolean, optional, default: false) — Whether the order is fulfilled by the marketplace, and no further action is required by the seller to fulfill&#x20; True - The order is fulfilled by the marketplace &#x20;False - The seller must fulfill the order
- `fulfillment_type` (enum, optional) — Type of fulfillment required for the order&#x20; shipment - Requires shipment by the seller digital - No physical fulfillment pickup - Order prepared for local pickup by buyer
  - Allowed values: `shipment`, `digital`, `pickup`

## Response

### 200

Successful update of an existing order

### 201

Successful insertion of a new order

## Errors

### 400 Bad Request Error

Error occurred when attempting to insert the order

- `list of FeedAMPError`

### 401 Unauthorized Error

Invalid token

- `error` (string, optional) — Message describing the authentication failure

## Types

### Customer

- `full_name` (string, optional) — The full name of the customer
- `email` (string, optional) — The customer's email address
- `phone` (string, optional) — The phone number of the customer
- `vat` (string, optional) — International Value-Added Tax identification number of customer

### StreetAddress

- `full_name` (string, required) — Name of primary recipient
- `address1` (string, required) — Street address, line 1
- `city` (string, required) — Address (City)
- `state` (string, required) — Address (State or Province)
- `postal_code` (string, required) — Address (Postal or Zip code)
- `country_code` (enum, required) — ISO 3166-1 alpha-3 country codes
  - Allowed values: `ABW`, `AFG`, `AGO`, `AIA`, `ALA`, `ALB`, `AND`, `ARE`, `ARG`, `ARM`, `ASM`, `ATA`, `ATF`, `ATG`, `AUS`, `AUT`, `AZE`, `BDI`, `BEL`, `BEN`, `BES`, `BFA`, `BGD`, `BGR`, `BHR`, `BHS`, `BIH`, `BLM`, `BLR`, `BLZ`, `BMU`, `BOL`, `BRA`, `BRB`, `BRN`, `BTN`, `BVT`, `BWA`, `CAF`, `CAN`, `CCK`, `CHE`, `CHL`, `CHN`, `CIV`, `CMR`, `COD`, `COG`, `COK`, `COL`, `COM`, `CPV`, `CRI`, `CUB`, `CUW`, `CXR`, `CYM`, `CYP`, `CZE`, `DEU`, `DJI`, `DMA`, `DNK`, `DOM`, `DZA`, `ECU`, `EGY`, `ERI`, `ESH`, `ESP`, `EST`, `ETH`, `FIN`, `FJI`, `FLK`, `FRA`, `FRO`, `FSM`, `GAB`, `GBR`, `GEO`, `GGY`, `GHA`, `GIB`, `GIN`, `GLP`, `GMB`, `GNB`, `GNQ`, `GRC`, `GRD`, `GRL`, `GTM`, `GUF`, `GUM`, `GUY`, `HKG`, `HMD`, `HND`, `HRV`, `HTI`, `HUN`, `IDN`, `IMN`, `IND`, `IOT`, `IRL`, `IRN`, `IRQ`, `ISL`, `ISR`, `ITA`, `JAM`, `JEY`, `JOR`, `JPN`, `KAZ`, `KEN`, `KGZ`, `KHM`, `KIR`, `KNA`, `KOR`, `KWT`, `LAO`, `LBN`, `LBR`, `LBY`, `LCA`, `LIE`, `LKA`, `LSO`, `LTU`, `LUX`, `LVA`, `MAC`, `MAF`, `MAR`, `MCO`, `MDA`, `MDG`, `MDV`, `MEX`, `MHL`, `MKD`, `MLI`, `MLT`, `MMR`, `MNE`, `MNG`, `MNP`, `MOZ`, `MRT`, `MSR`, `MTQ`, `MUS`, `MWI`, `MYS`, `MYT`, `NAM`, `NCL`, `NER`, `NFK`, `NGA`, `NIC`, `NIU`, `NLD`, `NOR`, `NPL`, `NRU`, `NZL`, `OMN`, `PAK`, `PAN`, `PCN`, `PER`, `PHL`, `PLW`, `PNG`, `POL`, `PRI`, `PRK`, `PRT`, `PRY`, `PSE`, `PYF`, `QAT`, `REU`, `ROU`, `RUS`, `RWA`, `SAU`, `SDN`, `SEN`, `SGP`, `SGS`, `SHN`, `SJM`, `SLB`, `SLE`, `SLV`, `SMR`, `SOM`, `SPM`, `SRB`, `SSD`, `STP`, `SUR`, `SVK`, `SVN`, `SWE`, `SWZ`, `SXM`, `SYC`, `SYR`, `TCA`, `TCD`, `TGO`, `THA`, `TJK`, `TKL`, `TKM`, `TLS`, `TON`, `TTO`, `TUN`, `TUR`, `TUV`, `TWN`, `TZA`, `UGA`, `UKR`, `UMI`, `URY`, `USA`, `UZB`, `VAT`, `VCT`, `VEN`, `VGB`, `VIR`, `VNM`, `VUT`, `WLF`, `WSM`, `YEM`, `ZAF`, `ZMB`, `ZWE`
- `address_type` (string, optional) — What kind of establishment is located at this address?
- `address2` (string, optional) — Street address, line 2
- `address3` (string, optional) — Street address, line 3 (international shipping address info)
- `phone` (string, optional) — Phone number associated with address

### OrderLine

An object representing a line in an order

- `mp_line_number` (string, required) — The marketplace identifier of this unique order line
- `sku` (string, required) — The SKU of the marketplace product represented by this order line
- `product_name` (string, required) — The product title, as displayed in the marketplace listing
- `quantity` (integer, required) — The amount of product ordered
- `unit_price` (double, required) — The price for a single (1) quantity of product (not including tax, shipping, or discounts)
- `shipping_method` (string, optional) — The shipping method the seller is required to use to fulfill this order line
- `shipping_price` (double, optional) — The total shipping price for this order line
- `taxes` (list of Tax, optional) — A collection of taxes that are levied against the order line
- `discounts` (list of Discount, optional) — A collection of discounts that are applied to the order line
- `is_tax_collected_by_marketplace` (boolean, optional) — Indicates whether taxes are collected by the marketplace
- `order_line_additional_properties` (map from string to any, optional) — Key/Value pairs of data the marketplace wants to associate with an order line

### Location

Details about the location (e.g. store) associated with an order

- `source_location_id` (string, optional) — The location identifier assigned by the source platform
- `client_location_id` (string, optional) — The location identifier assigned by the client platform
- `name` (string, optional) — The assigned name for the location
- `address` (string, optional) — The address of the location

### FeedAMPError

Validation error detected when placing/updating an order

- `code` (enum, required) — Code to uniquely identify the type of error
  - Allowed values: `FEEDAMP_FIELD_INCORRECT_DATA_TYPE`, `FEEDAMP_FIELD_INVALID_VALUE`, `FEEDAMP_MISSING_REQUIRED_FIELD`, `FEEDAMP_UNKNOWN_FIELD_PRESENT`
- `message` (string, required) — The error message for the error code

### Tax

An object representing a tax applied to an order line

- `type` (enum, required) — The type of tax
  - Allowed values: `SHIPPING`, `SALES`, `GST`, `PST`, `VAT`
- `amount` (double, required) — The tax amount

### Discount

An object representing a discount applied to an order line

- `name` (string, required) — The discount identifier, as configured in the marketplace
- `amount` (double, required) — The order line total discount amount
- `type` (enum, required) — The type of discount&#x20; ITEM - Discount applies to item price SHIPPING - Discount applies to shipping price
  - Allowed values: `ITEM`, `SHIPPING`

## Examples

### Example 1

**Request**

```json
{
  "mp_order_number": "111-99998888-55555",
  "sales_channel": "Marketplace.com",
  "currency": "USD",
  "shipping_address": {
    "full_name": "John M. Doe",
    "address1": "123 Fake Street",
    "city": "Ghost Town",
    "state": "DC",
    "postal_code": "91234",
    "country_code": "USA"
  },
  "order_lines": [
    {
      "mp_line_number": "XX-111-FF-1111",
      "sku": "1234-12353",
      "product_name": "ACME Super Product",
      "quantity": 1,
      "unit_price": 200
    }
  ],
  "marketplace_state": "PENDING"
}
```

**Response**

```json
{}
```

**SDK Code**

```python
import requests

url = "https://marketplace-order-api.feedamp.feedonomics.com/api/v1/orders/mp_order_number"

payload = {
    "mp_order_number": "111-99998888-55555",
    "sales_channel": "Marketplace.com",
    "currency": "USD",
    "shipping_address": {
        "full_name": "John M. Doe",
        "address1": "123 Fake Street",
        "city": "Ghost Town",
        "state": "DC",
        "postal_code": "91234",
        "country_code": "USA"
    },
    "order_lines": [
        {
            "mp_line_number": "XX-111-FF-1111",
            "sku": "1234-12353",
            "product_name": "ACME Super Product",
            "quantity": 1,
            "unit_price": 200
        }
    ],
    "marketplace_state": "PENDING"
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript
const url = 'https://marketplace-order-api.feedamp.feedonomics.com/api/v1/orders/mp_order_number';
const options = {
  method: 'PUT',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"mp_order_number":"111-99998888-55555","sales_channel":"Marketplace.com","currency":"USD","shipping_address":{"full_name":"John M. Doe","address1":"123 Fake Street","city":"Ghost Town","state":"DC","postal_code":"91234","country_code":"USA"},"order_lines":[{"mp_line_number":"XX-111-FF-1111","sku":"1234-12353","product_name":"ACME Super Product","quantity":1,"unit_price":200}],"marketplace_state":"PENDING"}'
};

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://marketplace-order-api.feedamp.feedonomics.com/api/v1/orders/mp_order_number"

	payload := strings.NewReader("{\n  \"mp_order_number\": \"111-99998888-55555\",\n  \"sales_channel\": \"Marketplace.com\",\n  \"currency\": \"USD\",\n  \"shipping_address\": {\n    \"full_name\": \"John M. Doe\",\n    \"address1\": \"123 Fake Street\",\n    \"city\": \"Ghost Town\",\n    \"state\": \"DC\",\n    \"postal_code\": \"91234\",\n    \"country_code\": \"USA\"\n  },\n  \"order_lines\": [\n    {\n      \"mp_line_number\": \"XX-111-FF-1111\",\n      \"sku\": \"1234-12353\",\n      \"product_name\": \"ACME Super Product\",\n      \"quantity\": 1,\n      \"unit_price\": 200\n    }\n  ],\n  \"marketplace_state\": \"PENDING\"\n}")

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

	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
require 'uri'
require 'net/http'

url = URI("https://marketplace-order-api.feedamp.feedonomics.com/api/v1/orders/mp_order_number")

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

request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"mp_order_number\": \"111-99998888-55555\",\n  \"sales_channel\": \"Marketplace.com\",\n  \"currency\": \"USD\",\n  \"shipping_address\": {\n    \"full_name\": \"John M. Doe\",\n    \"address1\": \"123 Fake Street\",\n    \"city\": \"Ghost Town\",\n    \"state\": \"DC\",\n    \"postal_code\": \"91234\",\n    \"country_code\": \"USA\"\n  },\n  \"order_lines\": [\n    {\n      \"mp_line_number\": \"XX-111-FF-1111\",\n      \"sku\": \"1234-12353\",\n      \"product_name\": \"ACME Super Product\",\n      \"quantity\": 1,\n      \"unit_price\": 200\n    }\n  ],\n  \"marketplace_state\": \"PENDING\"\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.put("https://marketplace-order-api.feedamp.feedonomics.com/api/v1/orders/mp_order_number")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"mp_order_number\": \"111-99998888-55555\",\n  \"sales_channel\": \"Marketplace.com\",\n  \"currency\": \"USD\",\n  \"shipping_address\": {\n    \"full_name\": \"John M. Doe\",\n    \"address1\": \"123 Fake Street\",\n    \"city\": \"Ghost Town\",\n    \"state\": \"DC\",\n    \"postal_code\": \"91234\",\n    \"country_code\": \"USA\"\n  },\n  \"order_lines\": [\n    {\n      \"mp_line_number\": \"XX-111-FF-1111\",\n      \"sku\": \"1234-12353\",\n      \"product_name\": \"ACME Super Product\",\n      \"quantity\": 1,\n      \"unit_price\": 200\n    }\n  ],\n  \"marketplace_state\": \"PENDING\"\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'https://marketplace-order-api.feedamp.feedonomics.com/api/v1/orders/mp_order_number', [
  'body' => '{
  "mp_order_number": "111-99998888-55555",
  "sales_channel": "Marketplace.com",
  "currency": "USD",
  "shipping_address": {
    "full_name": "John M. Doe",
    "address1": "123 Fake Street",
    "city": "Ghost Town",
    "state": "DC",
    "postal_code": "91234",
    "country_code": "USA"
  },
  "order_lines": [
    {
      "mp_line_number": "XX-111-FF-1111",
      "sku": "1234-12353",
      "product_name": "ACME Super Product",
      "quantity": 1,
      "unit_price": 200
    }
  ],
  "marketplace_state": "PENDING"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://marketplace-order-api.feedamp.feedonomics.com/api/v1/orders/mp_order_number");
var request = new RestRequest(Method.PUT);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"mp_order_number\": \"111-99998888-55555\",\n  \"sales_channel\": \"Marketplace.com\",\n  \"currency\": \"USD\",\n  \"shipping_address\": {\n    \"full_name\": \"John M. Doe\",\n    \"address1\": \"123 Fake Street\",\n    \"city\": \"Ghost Town\",\n    \"state\": \"DC\",\n    \"postal_code\": \"91234\",\n    \"country_code\": \"USA\"\n  },\n  \"order_lines\": [\n    {\n      \"mp_line_number\": \"XX-111-FF-1111\",\n      \"sku\": \"1234-12353\",\n      \"product_name\": \"ACME Super Product\",\n      \"quantity\": 1,\n      \"unit_price\": 200\n    }\n  ],\n  \"marketplace_state\": \"PENDING\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "mp_order_number": "111-99998888-55555",
  "sales_channel": "Marketplace.com",
  "currency": "USD",
  "shipping_address": [
    "full_name": "John M. Doe",
    "address1": "123 Fake Street",
    "city": "Ghost Town",
    "state": "DC",
    "postal_code": "91234",
    "country_code": "USA"
  ],
  "order_lines": [
    [
      "mp_line_number": "XX-111-FF-1111",
      "sku": "1234-12353",
      "product_name": "ACME Super Product",
      "quantity": 1,
      "unit_price": 200
    ]
  ],
  "marketplace_state": "PENDING"
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://marketplace-order-api.feedamp.feedonomics.com/api/v1/orders/mp_order_number")! 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()
```

### Example 2

**Request**

```json
{
  "mp_order_number": "111-99998888-55555",
  "sales_channel": "Marketplace.com",
  "currency": "USD",
  "shipping_address": {
    "full_name": "John M. Doe",
    "address1": "123 Fake Street",
    "city": "Ghost Town",
    "state": "DC",
    "postal_code": "91234",
    "country_code": "USA"
  },
  "order_lines": [
    {
      "mp_line_number": "XX-111-FF-1111",
      "sku": "1234-12353",
      "product_name": "ACME Super Product",
      "quantity": 1,
      "unit_price": 200
    }
  ],
  "marketplace_state": "PENDING"
}
```

**Response**

```json
{}
```

**SDK Code**

```python
import requests

url = "https://marketplace-order-api.feedamp.feedonomics.com/api/v1/orders/mp_order_number"

payload = {
    "mp_order_number": "111-99998888-55555",
    "sales_channel": "Marketplace.com",
    "currency": "USD",
    "shipping_address": {
        "full_name": "John M. Doe",
        "address1": "123 Fake Street",
        "city": "Ghost Town",
        "state": "DC",
        "postal_code": "91234",
        "country_code": "USA"
    },
    "order_lines": [
        {
            "mp_line_number": "XX-111-FF-1111",
            "sku": "1234-12353",
            "product_name": "ACME Super Product",
            "quantity": 1,
            "unit_price": 200
        }
    ],
    "marketplace_state": "PENDING"
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript
const url = 'https://marketplace-order-api.feedamp.feedonomics.com/api/v1/orders/mp_order_number';
const options = {
  method: 'PUT',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"mp_order_number":"111-99998888-55555","sales_channel":"Marketplace.com","currency":"USD","shipping_address":{"full_name":"John M. Doe","address1":"123 Fake Street","city":"Ghost Town","state":"DC","postal_code":"91234","country_code":"USA"},"order_lines":[{"mp_line_number":"XX-111-FF-1111","sku":"1234-12353","product_name":"ACME Super Product","quantity":1,"unit_price":200}],"marketplace_state":"PENDING"}'
};

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://marketplace-order-api.feedamp.feedonomics.com/api/v1/orders/mp_order_number"

	payload := strings.NewReader("{\n  \"mp_order_number\": \"111-99998888-55555\",\n  \"sales_channel\": \"Marketplace.com\",\n  \"currency\": \"USD\",\n  \"shipping_address\": {\n    \"full_name\": \"John M. Doe\",\n    \"address1\": \"123 Fake Street\",\n    \"city\": \"Ghost Town\",\n    \"state\": \"DC\",\n    \"postal_code\": \"91234\",\n    \"country_code\": \"USA\"\n  },\n  \"order_lines\": [\n    {\n      \"mp_line_number\": \"XX-111-FF-1111\",\n      \"sku\": \"1234-12353\",\n      \"product_name\": \"ACME Super Product\",\n      \"quantity\": 1,\n      \"unit_price\": 200\n    }\n  ],\n  \"marketplace_state\": \"PENDING\"\n}")

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

	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
require 'uri'
require 'net/http'

url = URI("https://marketplace-order-api.feedamp.feedonomics.com/api/v1/orders/mp_order_number")

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

request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"mp_order_number\": \"111-99998888-55555\",\n  \"sales_channel\": \"Marketplace.com\",\n  \"currency\": \"USD\",\n  \"shipping_address\": {\n    \"full_name\": \"John M. Doe\",\n    \"address1\": \"123 Fake Street\",\n    \"city\": \"Ghost Town\",\n    \"state\": \"DC\",\n    \"postal_code\": \"91234\",\n    \"country_code\": \"USA\"\n  },\n  \"order_lines\": [\n    {\n      \"mp_line_number\": \"XX-111-FF-1111\",\n      \"sku\": \"1234-12353\",\n      \"product_name\": \"ACME Super Product\",\n      \"quantity\": 1,\n      \"unit_price\": 200\n    }\n  ],\n  \"marketplace_state\": \"PENDING\"\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.put("https://marketplace-order-api.feedamp.feedonomics.com/api/v1/orders/mp_order_number")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"mp_order_number\": \"111-99998888-55555\",\n  \"sales_channel\": \"Marketplace.com\",\n  \"currency\": \"USD\",\n  \"shipping_address\": {\n    \"full_name\": \"John M. Doe\",\n    \"address1\": \"123 Fake Street\",\n    \"city\": \"Ghost Town\",\n    \"state\": \"DC\",\n    \"postal_code\": \"91234\",\n    \"country_code\": \"USA\"\n  },\n  \"order_lines\": [\n    {\n      \"mp_line_number\": \"XX-111-FF-1111\",\n      \"sku\": \"1234-12353\",\n      \"product_name\": \"ACME Super Product\",\n      \"quantity\": 1,\n      \"unit_price\": 200\n    }\n  ],\n  \"marketplace_state\": \"PENDING\"\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'https://marketplace-order-api.feedamp.feedonomics.com/api/v1/orders/mp_order_number', [
  'body' => '{
  "mp_order_number": "111-99998888-55555",
  "sales_channel": "Marketplace.com",
  "currency": "USD",
  "shipping_address": {
    "full_name": "John M. Doe",
    "address1": "123 Fake Street",
    "city": "Ghost Town",
    "state": "DC",
    "postal_code": "91234",
    "country_code": "USA"
  },
  "order_lines": [
    {
      "mp_line_number": "XX-111-FF-1111",
      "sku": "1234-12353",
      "product_name": "ACME Super Product",
      "quantity": 1,
      "unit_price": 200
    }
  ],
  "marketplace_state": "PENDING"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://marketplace-order-api.feedamp.feedonomics.com/api/v1/orders/mp_order_number");
var request = new RestRequest(Method.PUT);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"mp_order_number\": \"111-99998888-55555\",\n  \"sales_channel\": \"Marketplace.com\",\n  \"currency\": \"USD\",\n  \"shipping_address\": {\n    \"full_name\": \"John M. Doe\",\n    \"address1\": \"123 Fake Street\",\n    \"city\": \"Ghost Town\",\n    \"state\": \"DC\",\n    \"postal_code\": \"91234\",\n    \"country_code\": \"USA\"\n  },\n  \"order_lines\": [\n    {\n      \"mp_line_number\": \"XX-111-FF-1111\",\n      \"sku\": \"1234-12353\",\n      \"product_name\": \"ACME Super Product\",\n      \"quantity\": 1,\n      \"unit_price\": 200\n    }\n  ],\n  \"marketplace_state\": \"PENDING\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "mp_order_number": "111-99998888-55555",
  "sales_channel": "Marketplace.com",
  "currency": "USD",
  "shipping_address": [
    "full_name": "John M. Doe",
    "address1": "123 Fake Street",
    "city": "Ghost Town",
    "state": "DC",
    "postal_code": "91234",
    "country_code": "USA"
  ],
  "order_lines": [
    [
      "mp_line_number": "XX-111-FF-1111",
      "sku": "1234-12353",
      "product_name": "ACME Super Product",
      "quantity": 1,
      "unit_price": 200
    ]
  ],
  "marketplace_state": "PENDING"
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://marketplace-order-api.feedamp.feedonomics.com/api/v1/orders/mp_order_number")! 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()
```