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

# Get invoice by ID

GET https://api.caresquareapi.com/api/public/v1/invoices/{invoice_id}

Returns a single invoice including line items. Requires X-Plan-Manager-Id header.

Reference: https://docs.caresquareapi.com/api-reference/invoices-and-claims/invoices/get-invoice-by-id

## Authentication

- `Authorization` header (bearer token, required) — API key issued for your account. Send as Bearer token in the Authorization header.
- `X-Plan-Manager-Id` header (required) — Plan manager UUID. Required on all public API requests to scope data access.

## Request

### Path parameters

- `invoice_id` (string, required) — Invoice ID (numeric or UUID)

## Response

### 200

Invoice with line items

- `id` (string, optional)
- `invoice_number` (string, optional)
- `invoice_date` (date, optional)
- `total` (double, optional)
- `tax` (double, optional)
- `subtotal` (double, optional)
- `plan_manager` (string, optional)
- `participant_id` (string, optional)
- `claim_status` (string, optional)
- `approval_status` (string, optional)
- `created_at` (datetime, optional)
- `pm_provider_id` (string, optional)
- `s3_key` (string, optional)
- `email_message_id` (string, optional) — Email message ID associated with the invoice
- `errors` (boolean, optional)
- `state_management` (InvoiceDetailResponseStateManagement, optional) — State management (object with errors/ignored_errors or string)
- `is_deleted` (boolean, optional)
- `wont_claim` (boolean, optional)
- `is_reimbursement` (boolean, optional)
- `is_duplicate` (boolean, optional)
- `line_items` (list of InvoiceLineItemResponse, optional)

## Errors

### 400 Bad Request Error

Invalid request parameters

- `success` (boolean, optional)
- `error` (string, optional) — Error type or code
- `detail` (string, optional) — Human-readable error message

### 403 Forbidden Error

Access denied for plan manager

- `success` (boolean, optional)
- `error` (string, optional) — Error type or code
- `detail` (string, optional) — Human-readable error message

### 404 Not Found Error

Resource not found

- `success` (boolean, optional)
- `error` (string, optional) — Error type or code
- `detail` (string, optional) — Human-readable error message

### 500 Internal Server Error

Internal server error

- `success` (boolean, optional)
- `error` (string, optional) — Error type or code
- `detail` (string, optional) — Human-readable error message

## Types

### InvoiceDetailResponseStateManagement

State management (object with errors/ignored_errors or string)

### InvoiceLineItemResponse

Line item (returned with get invoice by ID).

- `id` (string, optional)
- `invoice` (string, optional)
- `description` (string, optional)
- `quantity` (double, optional)
- `unit_price` (double, optional)
- `total_price` (double, optional)
- `service_item_number` (string, optional)
- `service_date_from` (date, optional, nullable) — First day of service
- `service_date_to` (date, optional, nullable) — Last day of service
- `claim_status` (string, optional)
- `claim_batch_ref` (string, optional)
- `claim_number` (string, optional)
- `payment_ref` (string, optional)
- `is_deleted` (boolean, optional)
- `created_at` (datetime, optional)

## Examples

**Response**

```json
{
  "id": "string",
  "invoice_number": "string",
  "invoice_date": "2023-01-15",
  "total": 1.1,
  "tax": 1.1,
  "subtotal": 1.1,
  "plan_manager": "string",
  "participant_id": "string",
  "claim_status": "string",
  "approval_status": "string",
  "created_at": "2024-01-15T09:30:00Z",
  "pm_provider_id": "string",
  "s3_key": "string",
  "email_message_id": "string",
  "errors": true,
  "state_management": {},
  "is_deleted": true,
  "wont_claim": true,
  "is_reimbursement": true,
  "is_duplicate": true,
  "line_items": [
    {
      "id": "string",
      "invoice": "string",
      "description": "string",
      "quantity": 1.1,
      "unit_price": 1.1,
      "total_price": 1.1,
      "service_item_number": "string",
      "service_date_from": "2023-01-15",
      "service_date_to": "2023-01-15",
      "claim_status": "string",
      "claim_batch_ref": "string",
      "claim_number": "string",
      "payment_ref": "string",
      "is_deleted": true,
      "created_at": "2024-01-15T09:30:00Z"
    }
  ]
}
```

**SDK Code**

```python
import requests

url = "https://api.caresquareapi.com/api/public/v1/invoices/invoice_id"

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

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

print(response.json())
```

```javascript
const url = 'https://api.caresquareapi.com/api/public/v1/invoices/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.caresquareapi.com/api/public/v1/invoices/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.caresquareapi.com/api/public/v1/invoices/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.caresquareapi.com/api/public/v1/invoices/invoice_id")
  .header("Authorization", "Bearer <token>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.caresquareapi.com/api/public/v1/invoices/invoice_id', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.caresquareapi.com/api/public/v1/invoices/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.caresquareapi.com/api/public/v1/invoices/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()
```