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

# Get image import status

GET https://api.rechain.co/public/v1/image_imports/{id}

Poll an import with the same API credential that submitted it. Product access must still be available. queued and processing are non-terminal; completed and failed are terminal. A failed batch can contain successful image results, which remain available. Failures are reported per entry; resubmit failed entries with a new Idempotency-Key. Revoked permissions stop processing. Abandoned queued/processing imports expire after seven days; completed results are preserved and staged originals are removed.

Reference: https://dev.rechain.co/api-reference/image-import/get-image-import

## Authentication

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

## Request

### Path parameters

- `id` (string, required) — Import ID returned by a batch submission.

## Response

### 200

Current import state and finished entry results.

- `id` (string, required)
- `state` (enum, required) — completed means every entry succeeded. failed may contain successful entries alongside failures.
  - Allowed values: `queued`, `processing`, `completed`, `failed`
- `total` (integer, required)
- `completed` (integer, required)
- `failed` (integer, required)
- `results` (list of ImageImportResultsItems, required) — Finished entries only; pending entries have no result yet.
- `statusUrl` (string, required) — Relative URL to poll with the same API credential that submitted the batch.

## Errors

### 401 Unauthorized Error

Missing, invalid, or revoked API credential.

- `any`

### 403 Forbidden Error

The credential does not allow this product operation.

- `any`

### 404 Not Found Error

The record does not exist or is outside the credential's company/product scope.

- `any`

## Types

### ImageImportResultsItems

- CompletedImageImportResult: CompletedImageImportResult
- FailedImageImportResult: FailedImageImportResult

### CompletedImageImportResult

- `index` (integer, required) — Zero-based index in the submitted array.
- `state` (enum, required)
  - Allowed values: `completed`
- `id` (string, required) — Created image ID. Fetch using the corresponding product_photos, variant_photos, or product_sketches endpoint.

### FailedImageImportResult

- `index` (integer, required) — Zero-based index in the submitted array.
- `state` (enum, required)
  - Allowed values: `failed`
- `error` (string, required)

## Examples

**Response**

```json
{
  "id": "123e4567-e89b-12d3-a456-426614174005",
  "state": "failed",
  "total": 2,
  "completed": 1,
  "failed": 1,
  "results": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174001",
      "index": 0,
      "state": "completed"
    },
    {
      "error": "Image download failed",
      "index": 1,
      "state": "failed"
    }
  ],
  "statusUrl": "/public/v1/image_imports/123e4567-e89b-12d3-a456-426614174005"
}
```

**SDK Code**

```python image_import_getImageImport_example
import requests

url = "https://api.rechain.co/public/v1/image_imports/id"

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

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

print(response.json())
```

```javascript image_import_getImageImport_example
const url = 'https://api.rechain.co/public/v1/image_imports/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 image_import_getImageImport_example
package main

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

func main() {

	url := "https://api.rechain.co/public/v1/image_imports/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 image_import_getImageImport_example
require 'uri'
require 'net/http'

url = URI("https://api.rechain.co/public/v1/image_imports/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 image_import_getImageImport_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.rechain.co/public/v1/image_imports/id")
  .header("Authorization", "Bearer <token>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.rechain.co/public/v1/image_imports/id', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp image_import_getImageImport_example
using RestSharp;

var client = new RestClient("https://api.rechain.co/public/v1/image_imports/id");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift image_import_getImageImport_example
import Foundation

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.rechain.co/public/v1/image_imports/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()
```