> This page is for Developer.

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

# Get Import by ID

GET https://meta.feedonomics.com/api.php/dbs/{db_id}/imports/{import_id}

Retrieves an import by its ID.

Reference: https://docs.feedonomics.com/developer/api-reference/rest/platform-api/imports/get-import

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Path parameters

- `db_id` (double, required) — ID of the database that the import belongs to
- `import_id` (double, required) — ID of the import

### Headers

- `x-api-key` (string, required)

## Response

### 200

Get Import by ID

- `id` (string, optional)
- `db_id` (string, optional)
- `name` (string, optional)
- `cron` (string, optional)
- `next_run_time` (string, optional)
- `status` (string, optional)
- `file_location` (string, optional)
- `import_info` (DbsDbIdImportsImportIdGetResponsesContentApplicationJsonSchemaImportInfo, optional)
- `file_type` (string, optional)
- `file_map` (DbsDbIdImportsImportIdGetResponsesContentApplicationJsonSchemaFileMap, optional)
- `line_terminator` (string, optional)
- `join_type` (string, optional)
- `running` (string, optional)
- `cxn_id` (string, optional)
- `name_based_maps` (string, optional)
- `xml_force_parse` (string, optional)
- `force_encoding` (string, optional)
- `timestamp` (string, optional)
- `ignore_lines` (string, optional)
- `load_threshold` (string, optional)
- `update_threshold` (string, optional)
- `max_attempts` (string, optional)
- `time_between_attempts` (string, optional)
- `limits` (string, optional)
- `backup_cxn_id` (string, optional)
- `backup_failures` (string, optional)
- `last_download_time` (string, optional)
- `last_backup_time` (string, optional)
- `needs_backup` (string, optional)
- `xmlreader` (string, optional)
- `clean_file_headers` (string, optional)
- `download_activity_timeout` (string, optional)
- `timeout` (string, optional)
- `last_download_status` (string, optional)
- `ftp_allow_minio_direct` (string, optional)
- `created_at` (string, optional)

## Types

### DbsDbIdImportsImportIdGetResponsesContentApplicationJsonSchemaImportInfo

- `url` (string, optional)
- `CURLOPT_USERAGENT` (string, optional)
- `preprocess_info` (DbsDbIdImportsImportIdGetResponsesContentApplicationJsonSchemaImportInfoPreprocessInfo, optional)

### DbsDbIdImportsImportIdGetResponsesContentApplicationJsonSchemaFileMap

- `encoding` (string, optional)
- `separator` (string, optional)
- `enclosure` (string, optional)
- `escaper` (string, optional)
- `maps` (DbsDbIdImportsImportIdGetResponsesContentApplicationJsonSchemaFileMapMaps, optional)

### DbsDbIdImportsImportIdGetResponsesContentApplicationJsonSchemaImportInfoPreprocessInfo

- `connection_info` (DbsDbIdImportsImportIdGetResponsesContentApplicationJsonSchemaImportInfoPreprocessInfoConnectionInfo, optional)
- `file_info` (DbsDbIdImportsImportIdGetResponsesContentApplicationJsonSchemaImportInfoPreprocessInfoFileInfo, optional)
- `actions` (list of string, optional)

### DbsDbIdImportsImportIdGetResponsesContentApplicationJsonSchemaFileMapMaps

### DbsDbIdImportsImportIdGetResponsesContentApplicationJsonSchemaImportInfoPreprocessInfoConnectionInfo

### DbsDbIdImportsImportIdGetResponsesContentApplicationJsonSchemaImportInfoPreprocessInfoFileInfo

## Examples

**Response**

```json
{
  "id": "135",
  "db_id": "132",
  "name": "ftp",
  "status": "0",
  "file_location": "preprocess_script",
  "import_info": {
    "url": "https://haproxy-preprocess.feedonomics.com/preprocess/run_preprocess.php?connection_info%5Bprotocol%5D=ftp&amp;connection_info%5Bhost%5D=ftp2.feedonomics.com&amp;connection_info%5Busername%5D=username&amp;connection_info%5Bpassword%5D=password&amp;file_info%5Brequest_type%5D=get&amp;file_info%5Bfile_type_name%5D=File%20Name&amp;file_info%5Bclean_ftp%5D=false&amp;file_info%5Bdirectory%5D=%2FFEED110&amp;file_info%5Bfilename%5D=1_import_practical.txt&amp;",
    "CURLOPT_USERAGENT": "",
    "preprocess_info": {
      "connection_info": {
        "host": "ftp2.feedonomics.com",
        "password": "password",
        "protocol": "ftp",
        "username": "username"
      },
      "file_info": {
        "clean_ftp": false,
        "directory": "\\/FEED110",
        "file_match": "",
        "file_type_name": "File Name",
        "filename": "1_import_practical.txt",
        "keep_files_count": "",
        "request_type": "get"
      },
      "actions": []
    }
  },
  "file_type": "delimited",
  "file_map": {
    "encoding": "",
    "separator": "\\\\t",
    "enclosure": "",
    "escaper": "",
    "maps": {
      "body-html": "body_html",
      "id": "id",
      "title": "title"
    }
  },
  "line_terminator": "\\\\r\\\\n",
  "join_type": "product_feed",
  "running": "0",
  "cxn_id": "23935",
  "name_based_maps": "1",
  "xml_force_parse": "0",
  "force_encoding": "0",
  "timestamp": "2021-09-22 16:35:55",
  "ignore_lines": "1",
  "load_threshold": "1",
  "update_threshold": "1",
  "max_attempts": "1",
  "time_between_attempts": "1",
  "limits": "",
  "backup_failures": "0",
  "last_download_time": "2021-09-22 16:35:56",
  "last_backup_time": "0000-00-00 00:00:00",
  "needs_backup": "1",
  "xmlreader": "0",
  "clean_file_headers": "0",
  "download_activity_timeout": "0",
  "timeout": "900",
  "last_download_status": "success",
  "ftp_allow_minio_direct": "0",
  "created_at": "2021-09-22 16:19:38"
}
```

**SDK Code**

```python Imports_getImport_example
import requests

url = "https://meta.feedonomics.com/api.php/dbs/1.1/imports/1.1"

headers = {
    "x-api-key": "x-api-key",
    "Authorization": "Bearer <token>"
}

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

print(response.json())
```

```javascript Imports_getImport_example
const url = 'https://meta.feedonomics.com/api.php/dbs/1.1/imports/1.1';
const options = {
  method: 'GET',
  headers: {'x-api-key': 'x-api-key', Authorization: 'Bearer <token>'}
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Imports_getImport_example
package main

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

func main() {

	url := "https://meta.feedonomics.com/api.php/dbs/1.1/imports/1.1"

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

	req.Header.Add("x-api-key", "x-api-key")
	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 Imports_getImport_example
require 'uri'
require 'net/http'

url = URI("https://meta.feedonomics.com/api.php/dbs/1.1/imports/1.1")

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

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

response = http.request(request)
puts response.read_body
```

```java Imports_getImport_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://meta.feedonomics.com/api.php/dbs/1.1/imports/1.1")
  .header("x-api-key", "x-api-key")
  .header("Authorization", "Bearer <token>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://meta.feedonomics.com/api.php/dbs/1.1/imports/1.1', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'x-api-key' => 'x-api-key',
  ],
]);

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

```csharp Imports_getImport_example
using RestSharp;

var client = new RestClient("https://meta.feedonomics.com/api.php/dbs/1.1/imports/1.1");
var request = new RestRequest(Method.GET);
request.AddHeader("x-api-key", "x-api-key");
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift Imports_getImport_example
import Foundation

let headers = [
  "x-api-key": "x-api-key",
  "Authorization": "Bearer <token>"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://meta.feedonomics.com/api.php/dbs/1.1/imports/1.1")! 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()
```