> 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.

# Retrieve an invoice

GET https://api.outpave.com/api/v1/invoice/{id}

Returns a single invoice by its `id` or your `externalId`.

Reference: https://developers.outpave.com/api-reference/customer-portal-api/invoices/get-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`).

## Response

### 200

Invoice retrieved.

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

## Errors

### 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).

### 404 Not Found Error

The requested resource doesn't exist or isn't accessible to your platform.

- `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. Retry the request; 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

### ApiV1InvoiceIdGetResponsesContentApplicationJsonSchemaData

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

**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"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.outpave.com/api/v1/invoice/id';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

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"
	"net/http"
	"io"
)

func main() {

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

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	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::Get.new(url)
request["Authorization"] = 'Bearer <token>'

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.get("https://api.outpave.com/api/v1/invoice/id")
  .header("Authorization", "Bearer <token>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.outpave.com/api/v1/invoice/id', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.outpave.com/api/v1/invoice/id");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.outpave.com/api/v1/invoice/id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

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()
```