# Retrieve file processing status

> For the complete machine-readable documentation index, see [llms.txt](https://apidocs.chargebee.com/llms.txt).


Use this endpoint to get the current status and details of a usage events file.

## Sample Request

#### cURL

```bash
curl  https://{site}.file-ingest.chargebee.com/api/v2/usage_files/6fa7df05-9d4a-4c29-a161-bded616459c4/processing_status \
     -u {site_api_key}:
```

#### .NET

```dotnet
using ChargeBee.Api;
using ChargeBee.Models;

ApiConfig.Configure("{site}","{site_api_key}");
EntityResult result = UsageFile.ProcessingStatus("6fa7df05-9d4a-4c29-a161-bded616459c4").Request();

UsageFile usageFile = result.UsageFile;
```

#### Go

```go
package main
import (
    "fmt"
    "github.com/chargebee/chargebee-go/v3"
    usagefileAction "github.com/chargebee/chargebee-go/v3/actions/usagefile"
)
func main() {
    chargebee.Configure("{site_api_key}","{site}");
    res,err := usagefileAction.ProcessingStatus("6fa7df05-9d4a-4c29-a161-bded616459c4").Request()
    if err != nil {
        fmt.Println(err)
    } else {
        UsageFile := res.UsageFile
    }
}
```

#### Go

```go
package main

import (
  "fmt"
  "github.com/chargebee/chargebee-go/v4"
)

func main() {
  config := &chargebee.ClientConfig{
    SiteName: "{site}",
    ApiKey: "{site_api_key}",
  }    
  client := chargebee.NewClient(config)
  req := &chargebee.UsageFileProcessingStatusRequest{
    Id : "6fa7df05-9d4a-4c29-a161-bded616459c4",
}
  res, err := client.UsageFile.ProcessingStatus(req)
      if err != nil {
        fmt.Println(err)
    } else {
        UsageFile := res.UsageFile
    }
}
```

#### Java

```java
import com.chargebee.*;
import com.chargebee.ListResult;
import com.chargebee.models.*;
import com.chargebee.models.enums.*;
import java.io.IOException;

public class Sample {

    public static void main(String args[]) throws IOException, Exception {
        Environment.configure("{site}", "{site_api_key}");
        Result result = UsageFile.processingStatus("6fa7df05-9d4a-4c29-a161-bded616459c4").request();

        UsageFile usageFile = result.usageFile();
    }
}
```

#### Java

```java
import com.chargebee.v4.client.ChargebeeClient;
import com.chargebee.v4.models.usageFile.UsageFile;
import com.chargebee.v4.models.usageFile.params.UsageFileProcessingStatusParams;
import com.chargebee.v4.models.usageFile.responses.UsageFileProcessingStatusResponse;

public class UsageFileProcessingStatus {

    public static void main(String[] args) {
        ChargebeeClient client = ChargebeeClient.builder()
            .apiKey("{site_api_key}")
            .siteName("{site}")
            .build();

        UsageFileProcessingStatusResponse response = client.usageFiles().processingStatus("6fa7df05-9d4a-4c29-a161-bded616459c4");

        UsageFile usageFile = response.getUsageFile();
    }
}
```

#### Node.js

```node
import Chargebee from "chargebee";

const chargebee = new Chargebee({
    site: "{site}",
    apiKey: "{site_api_key}",
});

try {
    const result = await chargebee.usageFile.processingStatus("6fa7df05-9d4a-4c29-a161-bded616459c4");

    console.log(result);
    const usageFile = result.usage_file;
} catch (err) {
    console.log(err);
}
```

#### PHP

```php
<?php

require __DIR__ . '/vendor/autoload.php';

use Chargebee\ChargebeeClient;

$chargebee = new ChargebeeClient(options: [
    "site" => "{site}",
    "apiKey" => "{site_api_key}",
]);
$result = $chargebee->usageFile()->processingStatus("6fa7df05-9d4a-4c29-a161-bded616459c4");
$usageFile = $result->usage_file;
```

#### Python

```python
from chargebee import Chargebee

cb_client = Chargebee(api_key="{site_api_key}", site="{site}")
response = cb_client.UsageFile.processing_status("6fa7df05-9d4a-4c29-a161-bded616459c4")
usage_file = response.usage_file
```

#### Ruby

```ruby
require 'chargebee'

ChargeBee.configure(:site => "{site}",
  :api_key => "{site_api_key}")

result = ChargeBee::UsageFile.processing_status("6fa7df05-9d4a-4c29-a161-bded616459c4")

usage_file = result.usage_file
```

## Sample Response

```json
{
  "usage_file": {
    "id": "6fa7df05-9d4a-4c29-a161-bded616459c4",
    "name": "usage_events-1743661346062.csv",
    "mime_type": "text/csv",
    "error_code": "PARTIAL_FAILURE",
    "error_reason": "Some records in the file could not be processed successfully. Please check the failed records in the [UI/Failed Queue] for more details.",
    "status": "PROCESSED",
    "total_records_count": 5000,
    "processed_records_count": 2331,
    "failed_records_count": 2669,
    "file_size_in_bytes": 1157858,
    "processing_started_at": 1743661350150,
    "processing_completed_at": 1743661354109,
    "uploaded_by": "full_access_key_v1",
    "uploaded_at": 1743661348120
  }
}
```

## URL Format

**GET** https://[site].file-ingest.chargebee.com/api/v2/usage_files/{usage-file-id}/processing_status

## Returns

- `usage_file` (Usage file object)
  Resource object representing usage\_file
