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

# Update AR Invoice

PUT https://connect.plex.com/accounting/v1/ar-invoices/{id}
Content-Type: application/json

Update an existing AR invoice.

Reference: https://rockwell.ferndocs.com/api-reference/accounts-receivable-invoices-api/update-ar-invoice

## Request

### Path parameters

- `id` (string, required)

### Body (application/json)

This endpoint expects an object.

- `status` (string, optional)
- `paidDate` (datetime, optional)

## Response

### 200

200 OK - Successfully Updated AR Invoice

- `id` (string, optional)
- `customerId` (string, optional)
- `customerName` (string, optional)
- `invoiceDate` (date, optional)
- `dueDate` (date, optional)
- `currency` (string, optional)
- `status` (string, optional)
- `referenceNumber` (string, optional)
- `notes` (string, optional)
- `lineItems` (list of AccountingV1ArInvoicesIdPutResponsesContentApplicationJsonSchemaLineItemsItems, optional)
- `subtotal` (integer, optional)
- `taxTotal` (double, optional)
- `totalAmount` (double, optional)
- `createdAt` (datetime, optional)
- `updatedAt` (datetime, optional)

## Errors

### 400 Bad Request Error

400 Bad Request - Validation Error

- `error` (AccountingV1ArInvoicesIdPutResponsesContentApplicationJsonSchemaError, optional)

### 401 Unauthorized Error

401 Unauthorized - Missing or Invalid Bearer Token

- `error` (AccountingV1ArInvoicesIdPutResponsesContentApplicationJsonSchemaError, optional)

### 404 Not Found Error

404 Not Found - Invoice Does Not Exist

- `error` (AccountingV1ArInvoicesIdPutResponsesContentApplicationJsonSchemaError, optional)

### 500 Internal Server Error

500 Internal Server Error - Server-Side Failure

- `error` (AccountingV1ArInvoicesIdPutResponsesContentApplicationJsonSchemaError, optional)

## Types

### AccountingV1ArInvoicesIdPutResponsesContentApplicationJsonSchemaLineItemsItems

- `lineId` (string, optional)
- `description` (string, optional)
- `quantity` (integer, optional)
- `unitPrice` (double, optional)
- `taxCode` (string, optional)
- `taxRate` (double, optional)
- `amount` (integer, optional)

### AccountingV1ArInvoicesIdPutResponsesContentApplicationJsonSchemaError

- `code` (string, optional)
- `message` (string, optional)
- `details` (AccountingV1ArInvoicesIdPutResponsesContentApplicationJsonSchemaErrorDetails, optional)
- `requestId` (string, optional)
- `timestamp` (datetime, optional)

### AccountingV1ArInvoicesIdPutResponsesContentApplicationJsonSchemaErrorDetails

- `component` (string, optional)
- `operation` (string, optional)
- `hint` (string, optional)

## Examples

**Request**

```json
{
  "status": "Paid",
  "paidDate": "2026-03-15T00:00:00Z"
}
```

**Response**

```json
{
  "id": "inv_7f3a92bc1d04e",
  "customerId": "cust_4a1b2c3d5e6f",
  "customerName": "Acme Manufacturing Corp.",
  "invoiceDate": "2024-03-15",
  "dueDate": "2024-05-01",
  "currency": "USD",
  "status": "REVISED",
  "referenceNumber": "PO-2024-00892",
  "notes": "Revised per customer request — updated line items and extended due date.",
  "lineItems": [
    {
      "lineId": "line_001a2b3c4d",
      "description": "Industrial Grade Steel Components — Revised Qty",
      "quantity": 120,
      "unitPrice": 85.5,
      "taxCode": "TAX_US_STD",
      "taxRate": 0.08,
      "amount": 10260
    },
    {
      "lineId": "line_002e3f4g5h",
      "description": "Precision Machined Parts — Batch B",
      "quantity": 60,
      "unitPrice": 142,
      "taxCode": "TAX_US_STD",
      "taxRate": 0.08,
      "amount": 8520
    }
  ],
  "subtotal": 18780,
  "taxTotal": 1502.4,
  "totalAmount": 20282.4,
  "createdAt": "2024-03-15T08:22:11Z",
  "updatedAt": "2024-04-02T14:37:55Z"
}
```

**SDK Code**

```python updateArInvoice_example
import requests

url = "https://connect.plex.com/accounting/v1/ar-invoices/id"

payload = {
    "status": "Paid",
    "paidDate": "2026-03-15T00:00:00Z"
}
headers = {"Content-Type": "application/json"}

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

print(response.json())
```

```javascript updateArInvoice_example
const url = 'https://connect.plex.com/accounting/v1/ar-invoices/id';
const options = {
  method: 'PUT',
  headers: {'Content-Type': 'application/json'},
  body: '{"status":"Paid","paidDate":"2026-03-15T00:00:00Z"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go updateArInvoice_example
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://connect.plex.com/accounting/v1/ar-invoices/id"

	payload := strings.NewReader("{\n  \"status\": \"Paid\",\n  \"paidDate\": \"2026-03-15T00:00:00Z\"\n}")

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

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

url = URI("https://connect.plex.com/accounting/v1/ar-invoices/id")

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

request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n  \"status\": \"Paid\",\n  \"paidDate\": \"2026-03-15T00:00:00Z\"\n}"

response = http.request(request)
puts response.read_body
```

```java updateArInvoice_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.put("https://connect.plex.com/accounting/v1/ar-invoices/id")
  .header("Content-Type", "application/json")
  .body("{\n  \"status\": \"Paid\",\n  \"paidDate\": \"2026-03-15T00:00:00Z\"\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'https://connect.plex.com/accounting/v1/ar-invoices/id', [
  'body' => '{
  "status": "Paid",
  "paidDate": "2026-03-15T00:00:00Z"
}',
  'headers' => [
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp updateArInvoice_example
using RestSharp;

var client = new RestClient("https://connect.plex.com/accounting/v1/ar-invoices/id");
var request = new RestRequest(Method.PUT);
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"status\": \"Paid\",\n  \"paidDate\": \"2026-03-15T00:00:00Z\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift updateArInvoice_example
import Foundation

let headers = ["Content-Type": "application/json"]
let parameters = [
  "status": "Paid",
  "paidDate": "2026-03-15T00:00:00Z"
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://connect.plex.com/accounting/v1/ar-invoices/id")! 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()
```