# Get support case attachment status

Source: https://developer.avalara.com/products/returns/integration-guides/managed-returns/blk7823376375696/

Guide: Avalara Managed Returns API (U.S. and Canada)

# Get support case attachment status

Learn how to check the asynchronous validation and processing status of an uploaded support case attachment using the GraphQL API.

Retrieve the current processing and validation status of a file uploaded to a support case using `SupportCaseAttachmentStatus`.

Because support case attachments are processed and validated asynchronously, use the `supportCaseAttachmentStatus` query to monitor the file validation lifecycle. Pass the unique `attachmentId` returned during file upload (either from creating a support case or adding attachments to an existing case).

When the query runs, the API returns the following attachment details:

-   `validationId`: The unique identifier for the asynchronous validation job.

-   `fileName`: The original name of the uploaded file.

-   `status`: The current processing state of the attachment.

    -   `PENDING`: Validation is in progress. Continue polling the endpoint until processing finishes.
    -   `ACCEPTED`: The file passed security and format validations and is attached to the support case.
    -   `REJECTED`: The file failed validation (for example, due to invalid Base64 encoding or an unsupported format) and was not attached.

**View request**:

```
query SupportCaseAttachmentStatus {
  supportCaseAttachmentStatus(attachmentId: "0934bc4c-496c-457c-a068-aca7a7671565") {
    validationId
    fileName
    status
  }
}
```

**View response**:

```
{
  "data": {
    "supportCaseAttachmentStatus": {
      "validationId": "0934bc4c-496c-457c-a068-aca7a7671565",
      "fileName": "q3-reference.pdf",
      "status": "ACCEPTED"
    }
  }
}
```