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

# Commands for Products

> Retrieve the list of available commands that can be executed on Product records.

Commands are actions that can be executed on one or more Product records. Use this endpoint to discover which commands are available, then execute them via the [Run command](/rest-api/billing/post-products-run-command) endpoint.

## Authentication

<Note>
  This endpoint requires OAuth2 authentication. Include a valid bearer token in the `Authorization` header.
  The authenticated user must be a full unrestricted administrator or have the **`Product-List`** role.
</Note>

## Query Parameters

<ParamField query="id" type="integer">
  If provided, only commands available for this specific Product will be returned.
</ParamField>

## Code Examples

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET \
    "https://spaces.nexudus.com/api/billing/products/commands" \
    -H "Authorization: Bearer YOUR_TOKEN"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    'https://spaces.nexudus.com/api/billing/products/commands',
    {
      headers: {
        'Authorization': 'Bearer YOUR_TOKEN'
      }
    }
  );

  const commands = await response.json();
  ```

  ```python Python theme={null}
  import requests

  response = requests.get(
      'https://spaces.nexudus.com/api/billing/products/commands',
      headers={
          'Authorization': 'Bearer YOUR_TOKEN'
      }
  )

  commands = response.json()
  ```
</CodeGroup>

## Response

### 200

Returns an array of available commands.

<ResponseField name="Key" type="string">
  Unique identifier for the command. Pass this to the [Run command](/rest-api/billing/post-products-run-command) endpoint.
</ResponseField>

<ResponseField name="Name" type="string">
  Human-readable name of the command.
</ResponseField>

<ResponseField name="AppliesOnlyToMultipleEntities" type="boolean">
  Whether the command can only be run on multiple records at once.
</ResponseField>

<ResponseField name="AppliesOnlyToOneEntity" type="boolean">
  Whether the command can only be run on a single record.
</ResponseField>

<ResponseField name="NeedsEntitiesToRun" type="boolean">
  Whether the command requires record Ids to execute.
</ResponseField>

<ResponseField name="Order" type="integer">
  Display order for the command.
</ResponseField>

<ResponseField name="RequiresParameters" type="object[]">
  List of parameters required by this command, each containing `Name` and `Type`.
</ResponseField>

```json Example Response theme={null}
[
  {
    "Key": "COMMAND_KEY_1",
    "Name": "Command name",
    "AppliesOnlyToMultipleEntities": false,
    "DisplayInDropdown": false,
    "DisplayInDropdownV2": true,
    "AppliesOnlyToOneEntity": true,
    "AppliesOnlyToTwoEntities": false,
    "DisplayInGrid": false,
    "Icon": "/Content/Themes/Admin/Images/Icons/Fugue/gear.png",
    "NeedsEntitiesToRun": true,
    "Order": 8,
    "RequiresParameters": [
      {
        "Name": "Parameter name",
        "Type": "parameterType"
      }
    ]
  }
]
```
