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

# Get exports

GET https://api.joincandidhealth.com/api/exports/v3

API-based exports are in the process of being deprecated in favor of Candid Data Share and are not being offered to new customers.
Please see the [Candid Data Share docs](https://docs.joincandidhealth.com/introduction/candid-data-share) for more information.

Retrieve CSV-formatted reports on claim submissions and outcomes. This endpoint returns Export objects that contain an
authenticated URL to a customer's reports with a 2min TTL. The schema for the CSV export can be found [here](https://app.joincandidhealth.com/files/exports_schema.csv).

**Schema changes:** Changing column order, removing columns, or changing the name of a column is considered a
[Breaking Change](../../../api-principles/breaking-changes). Adding new columns to the end of the Exports file is not considered a
Breaking Change and happens periodically. For this reason, it is important that any downstream automation or processes built on top
of Candid Health's export files be resilient to the addition of new columns at the end of the file.

**SLA guarantees:** Files for a given date are guaranteed to be available after 3 business days. For example, Friday's file will be
available by Wednesday at the latest. If file generation is still in progress upon request before 3 business days have passed, the
caller will receive a 422 response. If the file has already been generated, it will be served. Historic files should be available
up to 90 days in the past by default. Please email our [Support team](mailto:support@joincandidhealth.com) with any data requests
outside of these stated guarantees.

Reference: https://docs.joincandidhealth.com/api-reference/exports/v-3/get-exports

## Authentication

- OAuth2 — send the obtained token as `Authorization: Bearer <token>`

## Servers

- `https://api.joincandidhealth.com` (Production, default)
- `https://api-staging.joincandidhealth.com` (Staging)
- `https://sandbox-api.joincandidhealth.com` (CandidSandbox)
- `https://staging-api.joincandidhealth.com` (CandidStaging)
- `http://localhost:5050` (Local)

## Request

### Query parameters

- `start_date` (date, required) — Beginning date of claim versions returned in the export, ISO 8601 date e.g. 2019-08-24. Must be at least 1 calendar day in the past. Cannot be earlier than 2022-10-07.
- `end_date` (date, required) — Ending date of claim versions returned in the export, ISO 8601 date; e.g. 2019-08-24. Must be within 30 days of start_date.

## Response

### 200

- `name` (string, required) — Report name; contains date strings representing the start and end date of the export.
- `created_at` (datetime, required)
- `authenticated_download_url` (string, required) — Authenticated URL where a customer's report can be retrieved.
- `authenticated_download_url_expiration` (datetime, required) — Expiration datetime of the authenticated URL. URLs expire after 2 minutes.

## Errors

### 422 HTTP Request Validations Error

- `errorName` ("HttpRequestValidationsError", required)
- `content` (list of RequestValidationError, required)

### 503 Export Files Unavailable Error

- `errorName` ("ExportFilesUnavailableError", required)
- `content` (string, required)

### 503 Missing Daily Incremental Export File Error

- `errorName` ("MissingDailyIncrementalExportFileError", required)
- `content` (string, required)

### 422 Export Not yet Available Error

- `errorName` ("ExportNotYetAvailableError", required)
- `content` (string, required)

### 422 Export Date Too Early Error

- `errorName` ("ExportDateTooEarlyError", required)
- `content` (string, required)

### 422 Unsupported Export Window Error

- `errorName` ("UnsupportedExportWindowError", required)
- `content` (string, required)

### 403 Export Disabled Error

- `errorName` ("ExportDisabledError", required)
- `content` (string, required)

## Types

### RequestValidationError

- `fieldName` (string, required)
- `humanReadableMessage` (string, optional)

## Examples

**Response**

```json
{
  "name": "John Doe",
  "created_at": "2021-10-07T00:00:00Z",
  "authenticated_download_url": "https://example.com",
  "authenticated_download_url_expiration": "2021-10-07T00:02:00Z"
}
```

**SDK Code**

```python
import requests

url = "https://api.joincandidhealth.com/api/exports/v3"

querystring = {"end_date":"2023-10-02","start_date":"2023-10-01"}

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

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

print(response.json())
```

```javascript
const url = 'https://api.joincandidhealth.com/api/exports/v3?end_date=2023-10-02&start_date=2023-10-01';
const options = {method: 'GET', headers: {Authorization: '<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.joincandidhealth.com/api/exports/v3?end_date=2023-10-02&start_date=2023-10-01"

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

	req.Header.Add("Authorization", "<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.joincandidhealth.com/api/exports/v3?end_date=2023-10-02&start_date=2023-10-01")

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

request = Net::HTTP::Get.new(url)
request["Authorization"] = '<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.joincandidhealth.com/api/exports/v3?end_date=2023-10-02&start_date=2023-10-01")
  .header("Authorization", "<token>.")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.joincandidhealth.com/api/exports/v3?end_date=2023-10-02&start_date=2023-10-01', [
  'headers' => [
    'Authorization' => '<token>.',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.joincandidhealth.com/api/exports/v3?end_date=2023-10-02&start_date=2023-10-01");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "<token>.");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.joincandidhealth.com/api/exports/v3?end_date=2023-10-02&start_date=2023-10-01")! 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()
```