> This documentation belongs to Invofox, an AI-powered document processing
> platform. The API extracts structured data (fields) from unstructured
> documents (invoices, contracts, forms, bank statements, and more).
> Key concepts: Account, Environment, Document Type, Field, File, Import,
> and Document. When answering, prefer the exact terminology defined in the
> Glossary and cite the relevant API Reference endpoint when applicable.

# Get info of your imports

GET https://api.invofox.com/v1/ingest/imports

Get a list of your latest imports (last 7 days)

Reference: https://developers.invofox.com/api-reference/ingest-reference/imports/list-imports-controller-list-imports

## Authentication

- `x-api-key` header (required) — API key authentication for programmatic access. Used by server-to-server integrations and API clients.

## Request

### Query parameters

- `environmentId` (string, optional) — Environment ID to filter imports. If not provided, uses the user's default environment.
- `skip` (integer, optional, default: 0) — Number of imports to skip for pagination
- `limit` (integer, optional, default: 5) — Maximum number of imports to return (max 100)

## Response

### 200

List of imports retrieved successfully

- `count` (double, required) — Total number of imports matching the criteria
- `result` (list of ImportSummaryDto, required) — Array of import summaries for the requested page

## Errors

### 400 Bad Request Error

Bad Request - Invalid query parameters

- `message` (list of string, optional)
- `error` (string, optional)
- `statusCode` (double, optional)

## Types

### ImportSummaryDto

- `id` (string, required) — Unique identifier for the import
- `accountId` (string, required) — Account identifier
- `environmentId` (string, required) — Environment identifier
- `channel` (enum, required) — Import channel
  - Allowed values: `api`, `upload`, `email`, `gdrive`
- `status` (enum, required) — Current processing status of the import
  - Allowed values: `processing`, `processed`
- `createdAt` (string, required) — Import creation timestamp
- `documents` (double, required) — Total number of documents extracted from all files in this import

## Examples

**Response**

```json
{
  "count": 156,
  "result": [
    {
      "id": "000000000000000000000011",
      "accountId": "507f1f77bcf86cd799439011",
      "environmentId": "507f1f77bcf86cd799439012",
      "channel": "upload",
      "status": "processed",
      "createdAt": "2023-10-15T10:30:00.000Z",
      "documents": 42
    }
  ]
}
```

**SDK Code**

```python
import requests

url = "https://api.invofox.com/v1/ingest/imports"

headers = {"x-api-key": "<apiKey>"}

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

print(response.json())
```

```javascript
const url = 'https://api.invofox.com/v1/ingest/imports';
const options = {method: 'GET', headers: {'x-api-key': '<apiKey>'}};

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.invofox.com/v1/ingest/imports"

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

	req.Header.Add("x-api-key", "<apiKey>")

	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.invofox.com/v1/ingest/imports")

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

request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<apiKey>'

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.invofox.com/v1/ingest/imports")
  .header("x-api-key", "<apiKey>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.invofox.com/v1/ingest/imports', [
  'headers' => [
    'x-api-key' => '<apiKey>',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.invofox.com/v1/ingest/imports");
var request = new RestRequest(Method.GET);
request.AddHeader("x-api-key", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["x-api-key": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.invofox.com/v1/ingest/imports")! 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()
```