### Overview

In order to update an existing Order, you can consume the endpoint presented in this article. In order to consume it, you must:

- Be authenticated user

For information on how you can authenticate, see: [Authentication](https://developer.sellercloud.com/dev-article/authentication/)

As soon as you do authentication and receive a valid token, it needs to be passed to the service call.

### Endpoint

Example for such endpoint for **TT** server is:

https://tt.api.sellercloud.com/rest/api/Orders/{id}

For your server endpoint will be:

https://{your_server_id}.api.sellercloud.com/rest/api/Orders/{id}

### Request

Information about expected request parameters can be found on swagger UI [https://tt.api.sellercloud.com/rest/swagger](https://tt.api.sellercloud.com/rest/swagger).

- Method Type: **HttpPut**  
- Authorization: Use **Bearer Token** (where ‘Token’ is the token received from token authentication)  
- Header info: **Content-Type: application/json**  
- Parameters: ID of existing Order  
- Request Body:

```
{
  "CompanyId": 0,
  "CustomerId": 0,
  "OrderSource": "Local_Store",
  "OrderSubType": "None",
  "SalesRep1": 0,
  "CurrencyCode": "USD",
  "DisableInventoryCount": true,
  "ShippingAddress": {
    "FirstName": "string",
    "LastName": "string",
    "MiddleName": "string",
    "ZipCode": "string",
    "City": "string",
    "Country": "string",
    "Business": "string",
    "AddressLine1": "string",
    "AddressLine2": "string",
    "Fax": "string",
    "Region": "string",
    "State": "string",
    "Phone": "string"
  },
  "BillingAddress": {
    "FirstName": "string",
    "LastName": "string",
    "MiddleName": "string",
    "ZipCode": "string",
    "City": "string",
    "Country": "string",
    "Business": "string",
    "AddressLine1": "string",
    "AddressLine2": "string",
    "Fax": "string",
    "Region": "string",
    "State": "string",
    "Phone": "string"
  }
}
```

| **Parameter**         | **Data Type** | **Description**                                                                                                                                  | **Is Required** |
|-----------------------|----------------|--------------------------------------------------------------------------------------------------------------------------------------------------|-----------------|
| CompanyId             | integer        | Order company ID.<br>Do not provide or set to “null” if no update is needed.                                                                 | false           |
| CustomerId            | integer        | Order customer ID.<br>Do not provide or set to “null” if no update is needed.                                                                 | false           |
| OrderSource           | enum           | Order source (channel). Possible values can be found [here](https://developer.sellercloud.com/dev-article/channels/).<br>Do not provide... | false           |
| OrderSubType          | enum           | Order sub type. Possible values can be found [here](https://developer.sellercloud.com/dev-article/order-sub-types/).<br>Do not provide... | false           |
| SalesRep1            | integer        | First sales rep ID.<br>Do not provide or set to “null” if no update is needed.                                                                  | false           |
| CurrencyCode          | enum           | Order currency code.<br>Do not provide or set to “null” if no update is needed.                                                                | false           |
| DisableInventoryCount  | bool           | Specifies if inventory count is disabled for the order.<br>Do not provide or set to “null” if no update is needed.                             | false           |
| ShippingAddress       | address        | Order shipping address.<br>Do not provide or set to “null” if no update is needed.<br>**NOTE:** When address is provided all of its inform...| false           |
| BillingAddress        | address        | Order billing address.<br>Do not provide or set to “null” if no update is needed.<br>**NOTE:** When address is provided all of its inform...| false           |
| Address.FirstName     | string         | Address first name                                                                                                                             | true            |
| Address.MiddleName    | string         | Address middle name                                                                                                                            | false           |
| Address.LastName      | string         | Address last name                                                                                                                                  | true            |
| Address.ZipCode       | string         | Address zip code                                                                                                                                  | true            |
| Address.City          | string         | Address city                                                                                                                                     | true            |
| Address.Country       | string         | Address two letter country code.                                                                                                              | true            |
| Address.Business      | string         | Address business name                                                                                                                            | false           |
| Address.AddressLine1  | string         | Address line 1                                                                                                                                  | true            |
| Address.AddressLine2  | string         | Address line 2                                                                                                                                  | false           |
| Address.Fax          | string         | Address fax                                                                                                                                     | false           |
| Address.Region        | string         | Address region                                                                                                                                  | false           |
| Address.State         | string         | Address state/province two letter code. Required when country is set to “US” or “CA”.                                                        | false           |
| Address.Phone         | string         | Address phone                                                                                                                                   | false           |

### Response

- If user is authenticated and Order update is successful, then response will be **Status Code 200 => OK**
- If user is not authenticated, then response will be **Status Code 401 => Not Valid Token**
- If there are missing or invalid values in the request, then reponse will be **Status Code 400 => Bad Request**
- In case of error, response will be **Status Code 500 => Internal Server Error**
