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

# PFStatisticsDeleteStatisticDefinitionAsync

> Reference for PFStatisticsDeleteStatisticDefinitionAsync, a PlayFab Services C API function that deletes a statistic definition and its data.

Delete an entity statistic definition. Will delete all statistics on entity profiles and leaderboards.

## Syntax

```cpp theme={null}
HRESULT PFStatisticsDeleteStatisticDefinitionAsync(  
    PFEntityHandle entityHandle,  
    const PFStatisticsDeleteStatisticDefinitionRequest* request,  
    XAsyncBlock* async  
)  
```

### Parameters

**`entityHandle`**   PFEntityHandle

PFEntityHandle to use for authentication.

**`request`**   [PFStatisticsDeleteStatisticDefinitionRequest\*](/services/playfab/api-references/c/pfstatisticstypes/structs/pfstatisticsdeletestatisticdefinitionrequest)

Populated request object.

**`async`**   XAsyncBlock\*<br />*Inout*

XAsyncBlock for the async operation.

### Return value

Type: HRESULT

Result code for this API operation.

## Remarks

This API is available on Windows, Linux, and macOS. See also StatisticCreateStatisticDefinitionAsync. Call XAsyncGetStatus to get the status of the operation. If the service call is unsuccessful, the async result will be E\_PF\_STATISTIC\_DEFINITION\_MODIFICATION\_NOT\_ALLOWED\_WHILE\_LINKED, E\_PF\_STATISTIC\_NOT\_FOUND, E\_PF\_STATISTIC\_UPDATE\_IN\_PROGRESS or any of the global PlayFab Service errors. See doc page "Handling PlayFab Errors" for more details on error handling.

## Requirements

**Header:** PFStatistics.h

## See also

[PFStatistics members](/services/playfab/api-references/c/pfstatistics/pfstatistics_members)


## Related topics

- [Services C API overview - PFStatistics.h](/services/playfab/api-references/c/pfstatistics/pfstatistics_members.md)
- [PFStatisticsGetStatisticDefinitionAsync](/services/playfab/api-references/c/pfstatistics/functions/pfstatisticsgetstatisticdefinitionasync.md)
- [PFStatisticsListStatisticDefinitionsAsync](/services/playfab/api-references/c/pfstatistics/functions/pfstatisticsliststatisticdefinitionsasync.md)
- [PFStatisticsDeleteStatisticDefinitionRequest](/services/playfab/api-references/c/pfstatisticstypes/structs/pfstatisticsdeletestatisticdefinitionrequest.md)
- [PFStatisticsCreateStatisticDefinitionAsync](/services/playfab/api-references/c/pfstatistics/functions/pfstatisticscreatestatisticdefinitionasync.md)
