### Overview

This endpoint can be used to update the invoice information of a single existing Purchase Order. Note that it will only work if the Client Settings **Enable Vendor Invoices Workflow** and **Enable Multiple Invoices for Purchase Orders** are disabled.

To consume the endpoint, you must:

- Be an authenticated user.

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

After you authenticate and receive a valid token, you must pass it to service calls.

### Endpoint

An example of this endpoint for XX server is:

- https://XX.api.sellercloud.com/rest/api/PurchaseOrders/{id}/Invoice

### Request

- Method Type: **HttpPut**
- Authorization: Use **Bearer Token** \+ token received from token authentication
- Header info: **Content-Type: application/json**

### Request Body

| **Parameter** | **Parameter Type** | **Data Type** | **Description** | **Required** |
| --- | --- | --- | --- | --- |
| id | path | Integer | ID of the targeted Purchase Order. | yes |
| InvoiceDate | body | DateTime | Date and time when the PO was invoiced.<br>Set to null or omit in the request if update of this field is not needed. | no |
| InvoiceNumber | body | String | The Invoice number.<br>Set to null or omit in the request if update of this field is not needed. | no |

The request body should be formatted as follows:

```
{
  "InvoiceDate": "2024-05-17T17:39:37.526Z",
  "InvoiceNumber": "string"
}
```

### Response

- If the user is authenticated and the request is successful, the response is **Status Code 200 => OK**
- If the user is not authenticated, the response is **Status Code 401 => Invalid Token**
- In case of an error, the response is **Status Code 500 => Internal Server Error**
- In case of an incorrect request, the response is **Status Code 400 => Bad Request**
