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

# Get Dataset Import Status

GET https://api.prolific.com/api/v1/data-collection/datasets/{dataset_id}/imports/{import_id}

Returns the current status of a V4 dataset import job. Each import job represents one ingestion operation and transitions through the following statuses:
- `uninitialised` — Presigned url requested, but not yet used
- `processing` — Datapoints received for ingestion, work underway
- `queued` — Datapoints received for ingestion, awaiting a previous import job to complete before processing can commence

**Terminal statuses:**
- `complete` — all records were accepted. `accepted_count` is populated.
- `partial` — some records were accepted and some rejected. `accepted_count`, `rejected_count`, and `errors` are populated. The accepted records are available for use.
- `failed` — extraction failed entirely (e.g. file could not be parsed). `reason` is populated. No records were ingested.
- `pending_schema` — the dataset has no schema set; upload is paused until a schema is defined.

Continue polling while the status is `uninitialised`, `queued`, or `processing`.

Reference: https://docs.prolific.com/api-reference/ai-task-builder/get-dataset-import-status

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: Prolific API for Data Collectors
  version: 1.0.0
paths:
  /api/v1/data-collection/datasets/{dataset_id}/imports/{import_id}:
    get:
      operationId: get-dataset-import-status
      summary: Get Dataset Import Status
      description: >-
        Returns the current status of a V4 dataset import job. Each import job
        represents one ingestion operation and transitions through the following
        statuses:

        - `uninitialised` — Presigned url requested, but not yet used

        - `processing` — Datapoints received for ingestion, work underway

        - `queued` — Datapoints received for ingestion, awaiting a previous
        import job to complete before processing can commence


        **Terminal statuses:**

        - `complete` — all records were accepted. `accepted_count` is populated.

        - `partial` — some records were accepted and some rejected.
        `accepted_count`, `rejected_count`, and `errors` are populated. The
        accepted records are available for use.

        - `failed` — extraction failed entirely (e.g. file could not be parsed).
        `reason` is populated. No records were ingested.

        - `pending_schema` — the dataset has no schema set; upload is paused
        until a schema is defined.


        Continue polling while the status is `uninitialised`, `queued`, or
        `processing`.
      tags:
        - subpackage_aiTaskBuilder
      parameters:
        - name: dataset_id
          in: path
          description: The unique identifier of the dataset
          required: true
          schema:
            type: string
            format: uuid
        - name: import_id
          in: path
          description: >-
            The import job ID returned by `GET
            /datasets/{dataset_id}/upload-url/{filename}`
          required: true
          schema:
            type: string
            format: uuid
        - name: Authorization
          in: header
          description: >-
            The Prolific API uses API token to authenticate requests. You can
            create an API token directly from your settings.


            Your API token does not have an expiry date and carries full
            permission, so be sure to keep them secure.


            If your token is leaked, delete it and create a new one directly in
            the app.


            In your requests add `Authorization` header with the value `Token
            <your token>`.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Import job status
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DatasetImportJob'
        '400':
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Import job not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
servers:
  - url: https://api.prolific.com
    description: Production
components:
  schemas:
    DatasetImportJobType:
      type: string
      enum:
        - file_upload
      description: The type of import. Currently always `file_upload`.
      title: DatasetImportJobType
    DatasetImportJobStatus:
      type: string
      enum:
        - uninitialised
        - queued
        - processing
        - complete
        - partial
        - failed
        - pending_schema
      description: Current status of the import job.
      title: DatasetImportJobStatus
    ImportJobError:
      type: object
      properties:
        record_index:
          type:
            - integer
            - 'null'
          description: Zero-based index of the rejected record in the uploaded file.
        field:
          type:
            - string
            - 'null'
          description: >-
            The schema field key that caused the rejection, or `null` if no
            specific field is implicated.

            The special value `_raw` indicates a whole-record parse failure
            (e.g. malformed JSON) rather than a field-level error.
        reason:
          type:
            - string
            - 'null'
          description: Human-readable description of why the record was rejected.
      description: A record-level validation error from a partial import.
      title: ImportJobError
    DatasetImportJob:
      type: object
      properties:
        dataset_id:
          type: string
          format: uuid
          description: The dataset this import job belongs to.
        import_id:
          type: string
          format: uuid
          description: The unique identifier of the import job.
        type:
          $ref: '#/components/schemas/DatasetImportJobType'
          description: The type of import. Currently always `file_upload`.
        filename:
          type:
            - string
            - 'null'
          description: The original filename supplied when the upload URL was requested.
        created_at:
          type: string
          format: date-time
          description: When the import job was created (ISO 8601, UTC).
        updated_at:
          type: string
          format: date-time
          description: When the import job was last updated (ISO 8601, UTC).
        status:
          $ref: '#/components/schemas/DatasetImportJobStatus'
          description: Current status of the import job.
        accepted_count:
          type: integer
          description: >-
            Number of records successfully ingested. Present when status is
            `complete` or `partial`.
        rejected_count:
          type: integer
          description: Number of records rejected. Present when status is `partial`.
        errors:
          type: array
          items:
            $ref: '#/components/schemas/ImportJobError'
          description: Record-level validation errors. Present when status is `partial`.
        reason:
          type: string
          description: Human-readable reason for failure. Present when status is `failed`.
      required:
        - dataset_id
        - import_id
        - type
        - created_at
        - updated_at
        - status
      description: >-
        Tracks the lifecycle of a single file upload to a V4 dataset.


        An import job is created when `GET
        /datasets/{dataset_id}/upload-url/{filename}` is called. It transitions
        through the following statuses:


        | Status | Meaning |

        |---|---|

        | `uninitialised` | Import job created; file not yet uploaded to S3 |

        | `queued` | File uploaded; queued for extraction |

        | `processing` | Extraction in progress |

        | `complete` | All records accepted |

        | `partial` | Some records accepted, some rejected — see `errors` |

        | `failed` | Extraction failed entirely — see `reason` |

        | `pending_schema` | Dataset has no schema; upload paused until schema
        is set |


        Poll `GET /datasets/{dataset_id}/imports/{import_id}` until a terminal
        status is reached (`complete`, `partial`, `failed`, or
        `pending_schema`).
      title: DatasetImportJob
    ErrorDetailDetail2:
      type: object
      properties:
        any_field:
          type: array
          items:
            type: string
          description: >-
            Name of the field with a validation error and as a value an array
            with the error descriptions
      description: All fields with validation errors
      title: ErrorDetailDetail2
    ErrorDetailDetail:
      oneOf:
        - type: string
        - type: array
          items:
            type: string
        - $ref: '#/components/schemas/ErrorDetailDetail2'
      description: Error detail
      title: ErrorDetailDetail
    ErrorDetail:
      type: object
      properties:
        status:
          type: integer
          description: Status code as in the http standards
        error_code:
          type: integer
          description: Internal error code
        title:
          type: string
          description: Error title
        detail:
          $ref: '#/components/schemas/ErrorDetailDetail'
          description: Error detail
        additional_information:
          type: string
          description: Optional extra information
        traceback:
          type: string
          description: Optional debug information
        interactive:
          type: boolean
      required:
        - status
        - error_code
        - title
        - detail
      title: ErrorDetail
    Error:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/ErrorDetail'
      required:
        - error
      title: Error
  securitySchemes:
    token:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        The Prolific API uses API token to authenticate requests. You can create
        an API token directly from your settings.


        Your API token does not have an expiry date and carries full permission,
        so be sure to keep them secure.


        If your token is leaked, delete it and create a new one directly in the
        app.


        In your requests add `Authorization` header with the value `Token <your
        token>`.

```

## Examples



**Request**

```json
{}
```

**Response**

```json
{
  "dataset_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "import_id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
  "type": "file_upload",
  "created_at": "2024-01-15T09:30:00Z",
  "updated_at": "2024-01-15T10:00:00Z",
  "status": "partial",
  "filename": "participant_responses.csv",
  "accepted_count": 150,
  "rejected_count": 5,
  "errors": [
    {
      "record_index": 23,
      "field": "age",
      "reason": "Value must be a positive integer"
    },
    {
      "record_index": 47,
      "field": "_raw",
      "reason": "Malformed JSON in record"
    }
  ],
  "reason": null
}
```

**SDK Code**

```python
import requests

url = "https://api.prolific.com/api/v1/data-collection/datasets/dataset_id/imports/import_id"

payload = {}
headers = {
    "Authorization": "Token <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript
const url = 'https://api.prolific.com/api/v1/data-collection/datasets/dataset_id/imports/import_id';
const options = {
  method: 'GET',
  headers: {Authorization: 'Token <token>', 'Content-Type': 'application/json'},
  body: '{}'
};

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"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.prolific.com/api/v1/data-collection/datasets/dataset_id/imports/import_id"

	payload := strings.NewReader("{}")

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

	req.Header.Add("Authorization", "Token <token>")
	req.Header.Add("Content-Type", "application/json")

	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.prolific.com/api/v1/data-collection/datasets/dataset_id/imports/import_id")

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

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Token <token>'
request["Content-Type"] = 'application/json'
request.body = "{}"

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.prolific.com/api/v1/data-collection/datasets/dataset_id/imports/import_id")
  .header("Authorization", "Token <token>")
  .header("Content-Type", "application/json")
  .body("{}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.prolific.com/api/v1/data-collection/datasets/dataset_id/imports/import_id', [
  'body' => '{}',
  'headers' => [
    'Authorization' => 'Token <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.prolific.com/api/v1/data-collection/datasets/dataset_id/imports/import_id");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Token <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Token <token>",
  "Content-Type": "application/json"
]
let parameters = [] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.prolific.com/api/v1/data-collection/datasets/dataset_id/imports/import_id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

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()
```