> This page is for version v2.
> For other versions, use one of these documentation indexes:
> - v1 (default): https://developers.outpave.com/v1/llms.txt
> - v2: https://developers.outpave.com/v2/llms.txt

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

# Update an invoice

POST https://api.outpave.com/api/v1/invoice/{id}
Content-Type: application/json

Updates an existing invoice, identified by its `id` or your `externalId`. Accepts the same JSON or multipart body as create. Files are added to the invoice's existing attachments; none are replaced or removed.

Reference: https://developers.outpave.com/api-reference/customer-portal-api/invoices/post-api-v-1-invoice-id

## Authentication

- `Authorization` header (bearer token, required) — A short-lived access token from `POST /api/v1/access-token` (30 minutes by default). Send as `Authorization: Bearer <jwt>`.

## Request

### Path parameters

- `id` (string, required) — The record's `id` (a UUID), or your own `externalId` (any non-UUID value is treated as an `externalId`).

### Body (application/json)

This endpoint expects an object.

- `merchant` (ApiV1InvoiceIdPostRequestBodyContentApplicationJsonSchemaMerchant, required) — The merchant billing the invoice.
- `referenceNumber` (string, required) — Your human-readable reference for the invoice.
- `issueDate` (datetime, required) — The date the invoice was issued (ISO 8601).
- `totalAmount` (double, required) — The total amount due, in the invoice's currency.
- `externalId` (string, optional) — The invoice's identifier in your system. Send it again on a later request to update the same record.
- `recipientContact` (ApiV1InvoiceIdPostRequestBodyContentApplicationJsonSchemaRecipientContact, optional) — The contact the invoice is addressed to. Mutually exclusive with `recipientBusiness`.
- `recipientBusiness` (ApiV1InvoiceIdPostRequestBodyContentApplicationJsonSchemaRecipientBusiness, optional) — The business the invoice is addressed to. Mutually exclusive with `recipientContact`.
- `type` (enum, optional) — The document type.
  - Allowed values: `INVOICE`, `PAYMENT_REQUEST`, `ESTIMATE`
- `invoiceName` (string, optional) — An optional display name for the invoice.
- `dueDate` (datetime, optional, nullable) — The date payment is due (ISO 8601). Null for open-ended requests.
- `amountPaid` (double, optional) — The amount already paid.
- `status` (enum, optional) — The invoice's current status.
  - Allowed values: `DUE_SOON`, `OVERDUE`, `PENDING`, `PAID`, `PROCESSING`, `FAILED`
- `isPartial` (boolean, optional) — Whether the invoice has been partially paid.
- `requiresSignature` (boolean, optional) — Whether the invoice requires a signature before payment.
- `paymentLink` (string, optional) — A hosted link where the recipient can pay the invoice.
- `note` (string, optional) — An optional note shown with the invoice.

## Response

### 200

Invoice updated.

- `data` (ApiV1InvoiceIdPostResponsesContentApplicationJsonSchemaData, required) — An invoice addressed to a contact or a business.

## Errors

### 400 Bad Request Error

The request was malformed or failed validation.

- `error` (string, required) — A short, human-readable error message.
- `details` (list of string, optional) — Additional error details (returned on validation failures).

### 401 Unauthorized Error

The credential is missing, invalid, expired, or not permitted on this endpoint.

- `error` (string, required) — A short, human-readable error message.
- `details` (list of string, optional) — Additional error details (returned on validation failures).

### 409 Conflict Error

A unique-constraint conflict (e.g. duplicate EIN, website, or externalId).

- `error` (string, required) — A short, human-readable error message.
- `details` (list of string, optional) — Additional error details (returned on validation failures).

### 500 Internal Server Error

An unexpected server error occurred. Files in a multipart request may already be attached, so retry without `files` unless a duplicate attachment is acceptable. If the problem persists, contact support.

- `error` (string, required) — A short, human-readable error message.
- `details` (list of string, optional) — Additional error details (returned on validation failures).

## Types

### ApiV1InvoiceIdPostRequestBodyContentApplicationJsonSchemaMerchant

The merchant billing the invoice.

- `id` (string, optional) — The record's unique identifier.
- `externalId` (string, optional) — The record's identifier in your system.

### ApiV1InvoiceIdPostRequestBodyContentApplicationJsonSchemaRecipientContact

The contact the invoice is addressed to. Mutually exclusive with `recipientBusiness`.

- `email` (string, required) — The recipient contact's email address.
- `firstName` (string, optional) — The recipient contact's first name.
- `lastName` (string, optional) — The recipient contact's last name.
- `externalId` (string, optional) — The recipient contact's identifier in your system.

### ApiV1InvoiceIdPostRequestBodyContentApplicationJsonSchemaRecipientBusiness

The business the invoice is addressed to. Mutually exclusive with `recipientContact`.

- `id` (string, optional) — The record's unique identifier.
- `externalId` (string, optional) — The record's identifier in your system.

### ApiV1InvoiceIdPostResponsesContentApplicationJsonSchemaData

An invoice addressed to a contact or a business.

- `id` (string, required) — The invoice's unique identifier.
- `merchantId` (string, required) — The merchant billing the invoice.
- `type` (enum, required) — The document type.
  - Allowed values: `INVOICE`, `PAYMENT_REQUEST`, `ESTIMATE`
- `referenceNumber` (string, required) — Your human-readable reference for the invoice.
- `issueDate` (datetime, required) — The date the invoice was issued (ISO 8601).
- `totalAmount` (double, required) — The total amount due.
- `amountPaid` (double, required) — The amount already paid.
- `status` (enum, required) — The invoice's current status.
  - Allowed values: `DUE_SOON`, `OVERDUE`, `PENDING`, `PAID`, `PROCESSING`, `FAILED`
- `isPartial` (boolean, required) — Whether the invoice has been partially paid.
- `requiresSignature` (boolean, required) — Whether the invoice requires a signature before payment.
- `externalId` (string, optional, nullable) — The invoice's identifier in your system.
- `recipientContactId` (string, optional, nullable) — The contact the invoice is addressed to (mutually exclusive with `recipientBusinessId`).
- `recipientBusinessId` (string, optional, nullable) — The business the invoice is addressed to (mutually exclusive with `recipientContactId`).
- `invoiceName` (string, optional, nullable) — An optional display name for the invoice.
- `dueDate` (datetime, optional, nullable) — The date payment is due (ISO 8601).
- `paymentLink` (string, optional, nullable) — A hosted link where the recipient can pay.

## Examples

**Request**

```json
{
  "referenceNumber": "#617297329",
  "issueDate": "2026-06-12T00:00:00.000Z",
  "totalAmount": 14100
}
```

**Response**

```json
{
  "data": {
    "id": "string",
    "merchantId": "string",
    "type": "INVOICE",
    "referenceNumber": "#617297329",
    "issueDate": "2024-01-15T09:30:00Z",
    "totalAmount": 14100,
    "amountPaid": 0,
    "status": "DUE_SOON",
    "isPartial": true,
    "requiresSignature": true,
    "externalId": "string",
    "recipientContactId": "string",
    "recipientBusinessId": "string",
    "invoiceName": "string",
    "dueDate": "2024-01-15T09:30:00Z",
    "paymentLink": "string"
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.outpave.com/api/v1/invoice/id"

payload = {
    "referenceNumber": "#617297329",
    "issueDate": "2026-06-12T00:00:00.000Z",
    "totalAmount": 14100
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript
const url = 'https://api.outpave.com/api/v1/invoice/id';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"referenceNumber":"#617297329","issueDate":"2026-06-12T00:00:00.000Z","totalAmount":14100}'
};

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://api.outpave.com/api/v1/invoice/id"

	payload := strings.NewReader("{\n  \"referenceNumber\": \"#617297329\",\n  \"issueDate\": \"2026-06-12T00:00:00.000Z\",\n  \"totalAmount\": 14100\n}")

	req, _ := http.NewRequest("POST", 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://api.outpave.com/api/v1/invoice/id")

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

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"referenceNumber\": \"#617297329\",\n  \"issueDate\": \"2026-06-12T00:00:00.000Z\",\n  \"totalAmount\": 14100\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.post("https://api.outpave.com/api/v1/invoice/id")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"referenceNumber\": \"#617297329\",\n  \"issueDate\": \"2026-06-12T00:00:00.000Z\",\n  \"totalAmount\": 14100\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.outpave.com/api/v1/invoice/id', [
  'body' => '{
  "referenceNumber": "#617297329",
  "issueDate": "2026-06-12T00:00:00.000Z",
  "totalAmount": 14100
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.outpave.com/api/v1/invoice/id");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"referenceNumber\": \"#617297329\",\n  \"issueDate\": \"2026-06-12T00:00:00.000Z\",\n  \"totalAmount\": 14100\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "referenceNumber": "#617297329",
  "issueDate": "2026-06-12T00:00:00.000Z",
  "totalAmount": 14100
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.outpave.com/api/v1/invoice/id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
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()
```