# Get invoice

Get one invoice by number.

Returns the invoice, its payment-schedule installments, live matches, wallet applications, and recovery totals. Identify the invoice with its `invoice_number`, which is unique in the tenant.


- HTTP method: `GET`
- Path: `/api/v1/invoices/:code`
- URL: `https://api.invunion.com/api/v1/invoices/:code`
- Required scope: `invoices:read`
- HTML docs: https://www.invunion.com/knowledge-base/api/get-invoice/
- Markdown docs: https://www.invunion.com/knowledge-base/api/get-invoice.md

## Path parameters

| Name | Type | Required | Description | Allowed values | Example |
| --- | --- | --- | --- | --- | --- |
| `code` | string, max 100 | required | Invoice number (`invoice_number`). Invoices without a number cannot be addressed by path. |  | `INV-2026-0042` |



## Errors

| Error | HTTP code | Description |
| --- | --- | --- |
| `Missing Bearer token` | `401` | The Authorization header is missing or is not a Bearer token. |
| `Invalid or revoked API key` | `401` | The API key is unknown, malformed, expired, or has been revoked. |
| `API key is missing scope invoices:read` | `403` | The key does not include invoices:read. A write scope does not imply the matching read scope. |
| `Too many requests, please try again later` | `429` | Wait and retry. The Retry-After header is the number of seconds to wait. |
| `Invoice not found` | `404` | No invoice with this number exists in the authenticated tenant. |
| `Internal server error` | `500` | Unexpected server error. The JSON body includes correlationId. Retry with backoff. |

## Request (curl)

```bash
curl --request GET \
  --url https://api.invunion.com/api/v1/invoices/INV-2026-0042 \
  --header 'accept: application/json' \
  --header 'authorization: Bearer uk_live_YOUR_API_KEY'
```

## Request (Python)

```python
import requests

url = "https://api.invunion.com/api/v1/invoices/INV-2026-0042"
headers = {
    "Accept": "application/json",
    "Authorization": "Bearer uk_live_YOUR_API_KEY",
}
response = requests.get(url, headers=headers)
print(response.json())
```

## Request (Ruby)

```ruby
require 'net/http'
require 'json'
require 'uri'

uri = URI("https://api.invunion.com/api/v1/invoices/INV-2026-0042")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Get.new(uri)
request['Accept'] = 'application/json'
request['Authorization'] = 'Bearer uk_live_YOUR_API_KEY'
response = http.request(request)
puts response.body
```

## Request (JavaScript)

```javascript
const response = await fetch("https://api.invunion.com/api/v1/invoices/INV-2026-0042", {
  method: "GET",
  headers: {
    "Accept": "application/json",
    "Authorization": "Bearer uk_live_YOUR_API_KEY"
  },
});
const data = await response.json();
```

## Request (Go)

```go
package main

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

func main() {
	req, err := http.NewRequest("GET", "https://api.invunion.com/api/v1/invoices/INV-2026-0042", nil)
	if err != nil {
		panic(err)
	}
	req.Header.Set("Accept", "application/json")
	req.Header.Set("Authorization", "Bearer uk_live_YOUR_API_KEY")
	resp, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer resp.Body.Close()
	body, _ := io.ReadAll(resp.Body)
	fmt.Println(string(body))
}
```

## Request (Node)

```javascript
const response = await fetch("https://api.invunion.com/api/v1/invoices/INV-2026-0042", {
  method: "GET",
  headers: {
    "Accept": "application/json",
    "Authorization": "Bearer uk_live_YOUR_API_KEY"
  },
});
console.log(await response.json());
```

## Success (200)

```json
{
  "success": true,
  "data": {
    "id": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
    "tenant_id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
    "counterparty_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "invoice_number": "INV-2026-0042",
    "kind": "invoice",
    "invoice_type": "issued",
    "status": "partial",
    "currency": "EUR",
    "amount_excl_vat": 10000,
    "vat_amount": 2000,
    "amount_incl_vat": 12000,
    "settled_amount": 1000,
    "open_amount": 11000,
    "recovery_percent": 8.33,
    "invoice_date": "2026-09-01T00:00:00.000Z",
    "due_date": "2026-10-01T00:00:00.000Z",
    "payment_expected_date": "2026-10-01T00:00:00.000Z",
    "payment_term_days": null,
    "recipient_name": "Leones Cars",
    "customer_name": "Leones Cars",
    "description": "Fleet maintenance — September 2026",
    "external_reference": "LC-SO-9081",
    "counterparty_name_display": "Leones Cars",
    "is_overdue": false,
    "next_due_date": "2026-10-01",
    "created_at": "2026-09-01T10:00:00.000Z",
    "updated_at": "2026-09-12T09:00:00.000Z",
    "settlement_status": "partial",
    "installments": [
      {
        "sequence": 1,
        "label": null,
        "dueDate": "2026-10-01",
        "expectedPaymentDate": "2026-10-01",
        "amount": 12000,
        "source": "default",
        "settledAmount": 1000,
        "openAmount": 11000,
        "status": "partial",
        "isOverdue": false
      }
    ],
    "matches": [
      {
        "id": "1c9e6679-7425-40de-944b-e07fc1f90ae7",
        "transaction_id": "2d0e6679-7425-40de-944b-e07fc1f90ae7",
        "matched_amount": 1000,
        "match_type": "manual",
        "status": "active",
        "transaction_code": "TX-8891"
      }
    ],
    "appliedCredits": [],
    "walletMatches": [],
    "adjustments": [],
    "recovery": {
      "percent": 8.33,
      "settled": 1000,
      "open": 11000,
      "creditSettled": 0,
      "cashSettled": 1000,
      "matchCount": 1
    }
  }
}
```
