> ## Documentation Index
> Fetch the complete documentation index at: https://docs.occtoo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# analyzeCardsImportTask

> Checks the uploaded file of a cards import and counts the cards it would add or update. The task turns `PENDING` when the file is valid and `FAILED` when it isn't. A file over 10 MB is checked in the background: the result has `isAsync` set, and the task's `status` gives the verdict.



**mutation** `analyzeCardsImportTask(input: AnalyzeCardsImportTaskInput!): AnalyzeCardsImportTaskPayload!`

## Arguments

**`input`**: `AnalyzeCardsImportTaskInput!` (required)

## Returns

`AnalyzeCardsImportTaskPayload!`

**`analyzeImportFileResult`**: `AnalyzeImportFileResult`

---

**`errors`**: `[AnalyzeCardsImportTaskError!]`

## Examples

```graphql Mutation
mutation AnalyzeCardsImportTask($input: AnalyzeCardsImportTaskInput!) {
  analyzeCardsImportTask(input: $input) {
    analyzeImportFileResult {
      additionsCount
      isAsync
      updatesCount
      validationResult {
        errors {
          __typename
        }
        invalidRecords
        isValid
        validatedRecords
      }
    }
    errors {
      __typename
      ... on GraphQlError {
        code
        details {
          __typename
        }
        message
      }
    }
  }
}
```

```json Variables
{
  "input": {
    "id": "id"
  }
}
```

```json Response
{
  "data": {
    "analyzeCardsImportTask": {
      "analyzeImportFileResult": {
        "additionsCount": 1,
        "isAsync": true,
        "updatesCount": 1,
        "validationResult": {
          "errors": {
            "__typename": "AggregatedImportError"
          },
          "invalidRecords": 1,
          "isValid": true,
          "validatedRecords": 1
        }
      },
      "errors": [
        {
          "__typename": "GraphQlError",
          "code": "string",
          "details": [
            {
              "__typename": "KeyValuePairOfStringAndString"
            }
          ],
          "message": "string"
        }
      ]
    }
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.