> 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 a given import

GET https://api.invofox.com/v1/ingest/imports/{importId}

Get detailed information of a given import

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

## Authentication

- `x-api-key` header (required) — API key authentication for programmatic access. Used by server-to-server integrations and API clients.
- `x-access-token` header (required) — Access token authentication for web users. Used by browser-based applications and authenticated user sessions.

## Request

### Path parameters

- `importId` (string, required) — The ID of the import

## Response

### 200

Import details retrieved successfully

- `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
- `files` (list of FileResponseDto, required) — Array of files associated with this import
- `clientData` (GetImportResponseDtoClientData, optional) — Provider-specific information and metadata
- `providerInfo` (GetImportResponseDtoProviderInfo, optional)

## Errors

### 404 Not Found Error

Import not found or access denied

- `any`

## Types

### FileResponseDto

- `id` (string, required) — Unique identifier of the file
- `accountId` (string, required) — Account identifier
- `environmentId` (string, required) — Environment identifier
- `importId` (string, required) — Import identifier
- `filename` (string, required) — Name of the file
- `compressed` (boolean, required) — Indicates if the file is compressed
- `status` (enum, required) — Current processing status of the file
  - Allowed values: `pending`, `processing`, `processed`, `rejected`
- `mimeType` (string, required) — MIME type of the file
- `companyId` (string, optional) — Company identifier
- `parentFileId` (string, optional) — Parent file identifier if this file was extracted from another
- `documentIds` (list of string, optional) — Array of document identifiers extracted from this file
- `error` (string, optional) — Error code if processing failed
- `createdAt` (string, optional) — Timestamp when the file was created
- `updatedAt` (string, optional) — Timestamp when the file was last updated
- `clientData` (FileResponseDtoClientData, optional) — Client data associated to the file

### GetImportResponseDtoClientData

Provider-specific information and metadata

### GetImportResponseDtoProviderInfo

### FileResponseDtoClientData

Client data associated to the file

## Examples

**Response**

```json
{
  "id": "000000000000000000000011",
  "accountId": "507f1f77bcf86cd799439011",
  "environmentId": "507f1f77bcf86cd799439012",
  "channel": "upload",
  "status": "processed",
  "createdAt": "2023-10-15T10:30:00.000Z",
  "documents": 42,
  "files": [
    {
      "id": "000000000000000000000011",
      "accountId": "00000000000000000000000f",
      "environmentId": "000000000000000000000010",
      "importId": "00000000000000000000000c",
      "filename": "invoice.pdf",
      "compressed": false,
      "status": "processed",
      "mimeType": "application/pdf",
      "companyId": "000000000000000000000007",
      "parentFileId": "000000000000000000000011",
      "documentIds": [
        "00000000000000000000000d",
        "00000000000000000000000e"
      ],
      "error": "ERR_UNSUPPORTED_FILE_FORMAT",
      "createdAt": "2024-09-26T10:30:00.000Z",
      "updatedAt": "2024-09-26T10:35:00.000Z",
      "clientData": {
        "invofoxAccountName": "company-name",
        "invofoxCompanyId": "12345",
        "userId": "507f1f77bcf86cd799439015"
      }
    }
  ],
  "clientData": {
    "invofoxAccountName": "company-name",
    "invofoxCompanyId": "12345",
    "userId": "507f1f77bcf86cd799439015"
  },
  "providerInfo": {}
}
```

**SDK Code**

```python
import requests

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

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

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

print(response.json())
```

```javascript
const url = 'https://api.invofox.com/v1/ingest/imports/000000000000000000000011';
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/000000000000000000000011"

	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/000000000000000000000011")

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/000000000000000000000011")
  .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/000000000000000000000011', [
  'headers' => [
    'x-api-key' => '<apiKey>',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.invofox.com/v1/ingest/imports/000000000000000000000011");
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/000000000000000000000011")! 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()
```