---
title: "Class FetchCommand"
slug: "cli--sitecore.ch.cli.plugin.orders.commands.fetchcommand"
abstract: ""
---
# Class FetchCommand

Fetch an order.

## Inheritance

object

System.CommandLine.Symbol

System.CommandLine.IdentifierSymbol

[Command](https://learn.microsoft.com/dotnet/api/system.commandline.command)

Sitecore.CH.Cli.Core.Abstractions.Commands.BaseCommand

Sitecore.CH.Cli.Core.Abstractions.Commands.BaseCommand<THandler>Sitecore.CH.Cli.Plugin.Orders.CommandHandlers.FetchCommandHandler

FetchCommand

## Namespace: SitecoreSitecore.CHSitecore.CH.CliSitecore.CH.Cli.PluginSitecore.CH.Cli.Plugin.OrdersCommands

## Assembly: Sitecore.CH.Cli.Plugin.Orders.dll

## Syntax

```csharp
public class FetchCommand : BaseCommand<FetchCommandHandler>
```

## Remarks

**Required parameters**

- `--id` Specifies the order id

**Optional parameters**

- `--wait -w` Waits until the order is ready for download.
- `--out -o` Waits until the order is ready for download and stores the file on disk in the specified location.
- `--endpoint -e` Specifies an alternative endpoint name for the execution of this command.

**Global parameters**

- `-? --help -h` Show this help message and exit.
- `-v --verbosity` Enables verbose logging.

## Examples

Outputs the order's download url if the order is ready for download.

```csharp
ch-cli orders fetch --id "<order id>"
```

With wait option, outputs the order's download url.

```csharp
ch-cli orders fetch --id "<order id>" --wait
```

With out option, downloads the order to the specific location.

```csharp
ch-cli orders fetch --id "<order id>" --out
```

With wait and out option, downloads the order to the specific location.

```csharp
ch-cli orders fetch --id "<order id>" --wait --out
```
