### Overview

This endpoint lets you update the General panel details of an existing Purchase Order. In order to use it, you must:

- Be an 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

An example of such an endpoint for XX server is:

`https://xx.api.sellercloud.com/rest/api/PurchaseOrders/{id}`

For your server, the endpoint will be:

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

### Request

- 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 **Purchase Order**  
- Request Body:

```
{
  "CompanyId": 0,
  "VendorId": 0,
  "Description": "string",
  "OrderedOnDate": "2024-03-06T08:25:03.403Z",
  "RequestedOnDate": "2024-03-06T08:25:03.403Z",
  "ExpectedDeliveryDate": "2024-03-06T08:25:03.403Z",
  "CancelByDate": "2024-03-06T08:25:03.403Z",
  "Instructions": "string"
}
```

| **Parameter** | **Data Type** | **Description** | **Is Required** |
| --- | --- | --- | --- |
| CompanyId | integer | Purchase Order company ID.<br>Do not provide or set to “null” if no update is needed. | No |
| VendorId | integer | PO Vendor ID.<br>Do not provide or set to “null” if no update is needed. | No |
| Description | string | Description/Name of the PO.<br>Do not provide or set to “null” if no update is needed. | No |
| OrderedOnDate | Datetime | The date when the PO was placed.<br>Do not provide or set to “null” if no update is needed. | No |
| RequestedOnDate | Datetime | The date when the PO was requested.<br>Do not provide or set to “null” if no update is needed. | No |
| ExpectedDeliveryDate | Datetime | The expected delivery date for the products in the PO.<br>Do not provide or set to “null” if no update is needed. | No |
| CancelByDate | Datetime | The deadline for canceling the PO.<br>Do not provide or set to “null” if no update is needed. | No |
| Instructions | string | Any special instructions provided for the PO.<br>Do not provide or set to “null” if no update is needed. | No |

### Response

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